/* Generated by Cython 3.2.4 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "define_macros": [
            [
                "CYTHON_EXTERN_C",
                "extern \"C++\""
            ]
        ],
        "depends": [
            "/usr/include/fplll/bkz.h",
            "/usr/include/fplll/bkz_param.h",
            "/usr/include/fplll/defs.h",
            "/usr/include/fplll/enum/enumerate.h",
            "/usr/include/fplll/enum/enumerate_ext.h",
            "/usr/include/fplll/enum/evaluator.h",
            "/usr/include/fplll/fplll.h",
            "/usr/include/fplll/fplll_config.h",
            "/usr/include/fplll/gso.h",
            "/usr/include/fplll/gso_gram.h",
            "/usr/include/fplll/gso_interface.h",
            "/usr/include/fplll/lll.h",
            "/usr/include/fplll/nr/matrix.h",
            "/usr/include/fplll/nr/nr.h",
            "/usr/include/fplll/nr/numvect.h",
            "/usr/include/fplll/pruner/pruner.h",
            "/usr/include/fplll/svpcvp.h",
            "/usr/include/fplll/threadpool.h",
            "/usr/include/fplll/util.h",
            "/usr/include/fplll/wrapper.h",
            "/usr/include/gmp.h",
            "/usr/include/mpfr.h",
            "/usr/include/qd/dd_real.h",
            "/usr/include/qd/qd_real.h",
            "/usr/lib/python3.14/site-packages/cysignals/macros.h",
            "/usr/lib/python3.14/site-packages/cysignals/struct_signals.h",
            "src/fpylll/fplll/enumeration_callback_helper.h"
        ],
        "extra_compile_args": [
            "-std=c++11",
            "-march=x86-64",
            "-mtune=generic",
            "-O2",
            "-pipe",
            "-fno-plt",
            "-fexceptions",
            "-Wp,-D_FORTIFY_SOURCE=3",
            "-Wformat",
            "-Werror=format-security",
            "-fstack-clash-protection",
            "-fcf-protection",
            "-fno-omit-frame-pointer",
            "-mno-omit-leaf-frame-pointer",
            "-Wp,-D_GLIBCXX_ASSERTIONS",
            "-g",
            "-ffile-prefix-map=/build/fpylll/src=/usr/src/debug/fpylll",
            "-flto=auto"
        ],
        "extra_link_args": [
            "-std=c++11"
        ],
        "include_dirs": [
            "src/fpylll/fplll",
            "/usr/lib/python3.14/site-packages/cysignals",
            "/usr/include",
            "/usr/lib/python3.14/site-packages/numpy/_core/include"
        ],
        "language": "c++",
        "libraries": [
            "gmp",
            "mpfr",
            "fplll",
            "qd"
        ],
        "library_dirs": [
            "/usr/lib"
        ],
        "name": "fpylll.fplll.integer_matrix",
        "sources": [
            "src/fpylll/fplll/integer_matrix.pyx"
        ]
    },
    "module_name": "fpylll.fplll.integer_matrix"
}
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_4"
#define CYTHON_HEX_VERSION 0x030204F0
#define CYTHON_FUTURE_DIVISION 0
/* 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))

/* CppInitCode */
#ifndef __cplusplus
  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
#endif
#ifndef CYTHON_INLINE
  #if defined(__clang__)
    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  #else
    #define CYTHON_INLINE inline
  #endif
#endif
template<typename T>
void __Pyx_call_destructor(T& x) {
    x.~T();
}
template<typename T>
class __Pyx_FakeReference {
  public:
    __Pyx_FakeReference() : ptr(NULL) { }
    __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
    T *operator->() { return ptr; }
    T *operator&() { return ptr; }
    operator T&() { return *ptr; }
    template<typename U> bool operator ==(const U& other) const { return *ptr == other; }
    template<typename U> bool operator !=(const U& other) const { return *ptr != other; }
    template<typename U> bool operator==(const __Pyx_FakeReference<U>& other) const { return *ptr == *other.ptr; }
    template<typename U> bool operator!=(const __Pyx_FakeReference<U>& other) const { return *ptr != *other.ptr; }
  private:
    T *ptr;
};

/* 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
    #define __PYX_EXTERN_C extern "C++"
#endif

#define __PYX_HAVE__fpylll__fplll__integer_matrix
#define __PYX_HAVE_API__fpylll__fplll__integer_matrix
/* Early includes */
#include <string.h>
#include <stdio.h>
#include "gmp.h"
#include <stdint.h>
#include "mpfr.h"
#include "ios"
#include "new"
#include "stdexcept"
#include "typeinfo"
#include <vector>
#include <string_view>
#include <string>
#include <utility>

    #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)
    // move should be defined for these versions of MSVC, but __cplusplus isn't set usefully
    #include <type_traits>

    namespace cython_std {
    template <typename T> typename std::remove_reference<T>::type&& move(T& t) noexcept { return std::move(t); }
    template <typename T> typename std::remove_reference<T>::type&& move(T&& t) noexcept { return std::move(t); }
    }

    #endif
    
#include <functional>
#include <map>
#include "fplll/fplll_config.h"

    #ifdef FPLLL_WITH_RECURSIVE_ENUM
    #define FPLLL_HAVE_RECURSIVE_ENUM 1
    #else
    #define FPLLL_HAVE_RECURSIVE_ENUM 0
    #endif
    
#include "fplll/nr/nr.h"
#include "fplll/defs.h"
#include "fplll/nr/numvect.h"
#include "fplll/nr/matrix.h"
#include "fplll/gso.h"
#include "fplll/gso_gram.h"
#include "fplll/gso_interface.h"
#include "fplll/lll.h"
#include "fplll/wrapper.h"
#include "enumeration_callback_helper.h"
#include "fplll/enum/evaluator.h"
#include "fplll/enum/enumerate.h"
#include "fplll/enum/enumerate_ext.h"
#include "fplll/svpcvp.h"
#include "fplll/bkz_param.h"
#include "fplll/bkz.h"
#include "fplll/util.h"
#include "fplll/pruner/pruner.h"
#include "fplll/threadpool.h"
#include "fplll/fplll.h"
#include "qd/dd_real.h"
#include "qd/qd_real.h"

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

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

    static CYTHON_INLINE int
    __Pyx_CAPI_PyList_Clear(PyObject *list)
    {
        return PyList_SetSlice(list, 0, PY_SSIZE_T_MAX, NULL);
    }
    #else
    #define __Pyx_CAPI_PyList_Extend PyList_Extend
    #define __Pyx_CAPI_PyList_Clear PyList_Clear
    #endif
    

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

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

    #if __PYX_LIMITED_VERSION_HEX < 0x030d0000
    static CYTHON_INLINE int
    __Pyx_CAPI_PyDict_GetItemStringRef(PyObject *mp, const char *key, PyObject **result)
    {
        int res;
        PyObject *key_obj = PyUnicode_FromString(key);
        if (key_obj == NULL) {
            *result = NULL;
            return -1;
        }
        res = __Pyx_PyDict_GetItemRef(mp, key_obj, result);
        Py_DECREF(key_obj);
        return res;
    }
    #else
    #define __Pyx_CAPI_PyDict_GetItemStringRef PyDict_GetItemStringRef
    #endif
    #if PY_VERSION_HEX < 0x030d0000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030F0000)
    static CYTHON_INLINE int
    __Pyx_CAPI_PyDict_SetDefaultRef(PyObject *d, PyObject *key, PyObject *default_value,
                        PyObject **result)
    {
        PyObject *value;
        if (__Pyx_PyDict_GetItemRef(d, key, &value) < 0) {
            // get error
            if (result) {
                *result = NULL;
            }
            return -1;
        }
        if (value != NULL) {
            // present
            if (result) {
                *result = value;
            }
            else {
                Py_DECREF(value);
            }
            return 1;
        }

        // missing: set the item
        if (PyDict_SetItem(d, key, default_value) < 0) {
            // set error
            if (result) {
                *result = NULL;
            }
            return -1;
        }
        if (result) {
            Py_INCREF(default_value);
            *result = default_value;
        }
        return 0;
    }
    #else
    #define __Pyx_CAPI_PyDict_SetDefaultRef PyDict_SetDefaultRef
    #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
    
#include "struct_signals.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

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

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


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


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

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

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

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

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

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

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

/* "decl.pxd":23
 * from libcpp.vector cimport vector
 * 
 * ctypedef double d_t             # <<<<<<<<<<<<<<
 * 
 * IF HAVE_LONG_DOUBLE:
*/
typedef double __pyx_t_6fpylll_5fplll_4decl_d_t;

/* "decl.pxd":26
 * 
 * IF HAVE_LONG_DOUBLE:
 *     ctypedef long double ld_t             # <<<<<<<<<<<<<<
 * 
 * IF HAVE_QD:
*/
typedef long double __pyx_t_6fpylll_5fplll_4decl_ld_t;
/* #### Code section: complex_type_declarations ### */
/* #### Code section: type_declarations ### */

/*--- Type declarations ---*/
struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix;
struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow;
union __pyx_t_6fpylll_5fplll_4decl_zz_mat_core_t;
typedef union __pyx_t_6fpylll_5fplll_4decl_zz_mat_core_t __pyx_t_6fpylll_5fplll_4decl_zz_mat_core_t;
struct __pyx_t_6fpylll_5fplll_4decl_z_nr_t;
typedef struct __pyx_t_6fpylll_5fplll_4decl_z_nr_t __pyx_t_6fpylll_5fplll_4decl_z_nr_t;
struct __pyx_t_6fpylll_5fplll_4decl_fp_nr_t;
typedef struct __pyx_t_6fpylll_5fplll_4decl_fp_nr_t __pyx_t_6fpylll_5fplll_4decl_fp_nr_t;
union __pyx_t_6fpylll_5fplll_4decl_mat_gso_core_t;
typedef union __pyx_t_6fpylll_5fplll_4decl_mat_gso_core_t __pyx_t_6fpylll_5fplll_4decl_mat_gso_core_t;
union __pyx_t_6fpylll_5fplll_4decl_lll_reduction_core_t;
typedef union __pyx_t_6fpylll_5fplll_4decl_lll_reduction_core_t __pyx_t_6fpylll_5fplll_4decl_lll_reduction_core_t;
union __pyx_t_6fpylll_5fplll_4decl_bkz_auto_abort_core_t;
typedef union __pyx_t_6fpylll_5fplll_4decl_bkz_auto_abort_core_t __pyx_t_6fpylll_5fplll_4decl_bkz_auto_abort_core_t;
union __pyx_t_6fpylll_5fplll_4decl_bkz_reduction_core_t;
typedef union __pyx_t_6fpylll_5fplll_4decl_bkz_reduction_core_t __pyx_t_6fpylll_5fplll_4decl_bkz_reduction_core_t;
union __pyx_t_6fpylll_5fplll_4decl_fast_evaluator_core_t;
typedef union __pyx_t_6fpylll_5fplll_4decl_fast_evaluator_core_t __pyx_t_6fpylll_5fplll_4decl_fast_evaluator_core_t;
union __pyx_t_6fpylll_5fplll_4decl_evaluator_core_t;
typedef union __pyx_t_6fpylll_5fplll_4decl_evaluator_core_t __pyx_t_6fpylll_5fplll_4decl_evaluator_core_t;
union __pyx_t_6fpylll_5fplll_4decl_enumeration_core_t;
typedef union __pyx_t_6fpylll_5fplll_4decl_enumeration_core_t __pyx_t_6fpylll_5fplll_4decl_enumeration_core_t;
union __pyx_t_6fpylll_5fplll_4decl_pruner_core_t;
typedef union __pyx_t_6fpylll_5fplll_4decl_pruner_core_t __pyx_t_6fpylll_5fplll_4decl_pruner_core_t;
struct __pyx_t_6fpylll_5fplll_4decl_vector_fp_nr_t;
typedef struct __pyx_t_6fpylll_5fplll_4decl_vector_fp_nr_t __pyx_t_6fpylll_5fplll_4decl_vector_fp_nr_t;
struct __pyx_t_6fpylll_5fplll_4decl_vector_z_nr_t;
typedef struct __pyx_t_6fpylll_5fplll_4decl_vector_z_nr_t __pyx_t_6fpylll_5fplll_4decl_vector_z_nr_t;

/* "decl.pxd":32
 *     ctypedef qd_real qd_t
 * 
 * ctypedef enum fplll_mat_gso_alg_type_t:             # <<<<<<<<<<<<<<
 *     mat_gso_gso_t  = 0
 *     mat_gso_gram_t = 1
*/
enum __pyx_t_6fpylll_5fplll_4decl_fplll_mat_gso_alg_type_t {
  __pyx_e_6fpylll_5fplll_4decl_mat_gso_gso_t = 0,
  __pyx_e_6fpylll_5fplll_4decl_mat_gso_gram_t = 1
};
typedef enum __pyx_t_6fpylll_5fplll_4decl_fplll_mat_gso_alg_type_t __pyx_t_6fpylll_5fplll_4decl_fplll_mat_gso_alg_type_t;

/* "decl.pxd":37
 * 
 * IF HAVE_QD:
 *     ctypedef enum fplll_mat_gso_data_type_t:             # <<<<<<<<<<<<<<
 *         mat_gso_mpz_d      =    1
 *         mat_gso_mpz_ld     =    2
*/
enum __pyx_t_6fpylll_5fplll_4decl_fplll_mat_gso_data_type_t {
  __pyx_e_6fpylll_5fplll_4decl_mat_gso_mpz_d = 1,
  __pyx_e_6fpylll_5fplll_4decl_mat_gso_mpz_ld = 2,
  __pyx_e_6fpylll_5fplll_4decl_mat_gso_mpz_dpe = 4,
  __pyx_e_6fpylll_5fplll_4decl_mat_gso_mpz_dd = 8,
  __pyx_e_6fpylll_5fplll_4decl_mat_gso_mpz_qd = 16,
  __pyx_e_6fpylll_5fplll_4decl_mat_gso_mpz_mpfr = 32,
  __pyx_e_6fpylll_5fplll_4decl_mat_gso_long_d = 64,
  __pyx_e_6fpylll_5fplll_4decl_mat_gso_long_ld = 0x80,
  __pyx_e_6fpylll_5fplll_4decl_mat_gso_long_dpe = 0x100,
  __pyx_e_6fpylll_5fplll_4decl_mat_gso_long_dd = 0x200,
  __pyx_e_6fpylll_5fplll_4decl_mat_gso_long_qd = 0x400,
  __pyx_e_6fpylll_5fplll_4decl_mat_gso_long_mpfr = 0x800
};
typedef enum __pyx_t_6fpylll_5fplll_4decl_fplll_mat_gso_data_type_t __pyx_t_6fpylll_5fplll_4decl_fplll_mat_gso_data_type_t;

/* "decl.pxd":63
 * 
 * IF HAVE_QD:
 *     ctypedef enum fplll_nr_type_t:             # <<<<<<<<<<<<<<
 *         nr_d      =  1
 *         nr_ld     =  2
*/
enum __pyx_t_6fpylll_5fplll_4decl_fplll_nr_type_t {
  __pyx_e_6fpylll_5fplll_4decl_nr_d = 1,
  __pyx_e_6fpylll_5fplll_4decl_nr_ld = 2,
  __pyx_e_6fpylll_5fplll_4decl_nr_dpe = 4,
  __pyx_e_6fpylll_5fplll_4decl_nr_dd = 8,
  __pyx_e_6fpylll_5fplll_4decl_nr_qd = 16,
  __pyx_e_6fpylll_5fplll_4decl_nr_mpfr = 32
};
typedef enum __pyx_t_6fpylll_5fplll_4decl_fplll_nr_type_t __pyx_t_6fpylll_5fplll_4decl_fplll_nr_type_t;

/* "decl.pxd":77
 *         nr_mpfr   = 32
 * 
 * ctypedef enum fplll_z_type_t:             # <<<<<<<<<<<<<<
 *     z_long    =  1
 *     z_mpz     =  2
*/
enum __pyx_t_6fpylll_5fplll_4decl_fplll_z_type_t {
  __pyx_e_6fpylll_5fplll_4decl_z_long = 1,
  __pyx_e_6fpylll_5fplll_4decl_z_mpz = 2
};
typedef enum __pyx_t_6fpylll_5fplll_4decl_fplll_z_type_t __pyx_t_6fpylll_5fplll_4decl_fplll_z_type_t;

/* "decl.pxd":29
 * 
 * IF HAVE_QD:
 *     ctypedef dd_real dd_t             # <<<<<<<<<<<<<<
 *     ctypedef qd_real qd_t
 * 
*/
typedef dd_real __pyx_t_6fpylll_5fplll_4decl_dd_t;

/* "decl.pxd":30
 * IF HAVE_QD:
 *     ctypedef dd_real dd_t
 *     ctypedef qd_real qd_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef enum fplll_mat_gso_alg_type_t:
*/
typedef qd_real __pyx_t_6fpylll_5fplll_4decl_qd_t;

/* "decl.pxd":81
 *     z_mpz     =  2
 * 
 * ctypedef union zz_mat_core_t:             # <<<<<<<<<<<<<<
 *     ZZ_mat[long]  *long
 *     ZZ_mat[mpz_t] *mpz
*/
union __pyx_t_6fpylll_5fplll_4decl_zz_mat_core_t {
  fplll::ZZ_mat<long>  *__pyx_long;
  fplll::ZZ_mat<mpz_t>  *mpz;
};

/* "decl.pxd":85
 *     ZZ_mat[mpz_t] *mpz
 * 
 * ctypedef struct z_nr_t:             # <<<<<<<<<<<<<<
 *     Z_NR[long] long
 *     Z_NR[mpz_t] mpz
*/
struct __pyx_t_6fpylll_5fplll_4decl_z_nr_t {
  fplll::Z_NR<long>  __pyx_long;
  fplll::Z_NR<mpz_t>  mpz;
};

/* "decl.pxd":92
 *     IF HAVE_QD:
 *         # we cannot use a union because of non-trivial constructors
 *         ctypedef struct fp_nr_t:             # <<<<<<<<<<<<<<
 *             FP_NR[d_t] d
 *             FP_NR[ld_t] ld
*/
struct __pyx_t_6fpylll_5fplll_4decl_fp_nr_t {
  fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_d_t>  d;
  fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_ld_t>  ld;
  fplll::FP_NR<dpe_t>  dpe;
  fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_dd_t>  dd;
  fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_qd_t>  qd;
  fplll::FP_NR<mpfr_t>  mpfr;
};

/* "decl.pxd":107
 * 
 *     IF HAVE_QD:
 *         ctypedef union mat_gso_core_t:             # <<<<<<<<<<<<<<
 *             MatGSOInterface[Z_NR[mpz_t], FP_NR[d_t]] *mpz_d
 *             MatGSOInterface[Z_NR[mpz_t], FP_NR[ld_t]] *mpz_ld
*/
union __pyx_t_6fpylll_5fplll_4decl_mat_gso_core_t {
  fplll::MatGSOInterface<fplll::Z_NR<mpz_t> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_d_t> >  *mpz_d;
  fplll::MatGSOInterface<fplll::Z_NR<mpz_t> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_ld_t> >  *mpz_ld;
  fplll::MatGSOInterface<fplll::Z_NR<mpz_t> ,fplll::FP_NR<dpe_t> >  *mpz_dpe;
  fplll::MatGSOInterface<fplll::Z_NR<mpz_t> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_dd_t> >  *mpz_dd;
  fplll::MatGSOInterface<fplll::Z_NR<mpz_t> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_qd_t> >  *mpz_qd;
  fplll::MatGSOInterface<fplll::Z_NR<mpz_t> ,fplll::FP_NR<mpfr_t> >  *mpz_mpfr;
  fplll::MatGSOInterface<fplll::Z_NR<long> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_d_t> >  *long_d;
  fplll::MatGSOInterface<fplll::Z_NR<long> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_ld_t> >  *long_ld;
  fplll::MatGSOInterface<fplll::Z_NR<long> ,fplll::FP_NR<dpe_t> >  *long_dpe;
  fplll::MatGSOInterface<fplll::Z_NR<long> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_dd_t> >  *long_dd;
  fplll::MatGSOInterface<fplll::Z_NR<long> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_qd_t> >  *long_qd;
  fplll::MatGSOInterface<fplll::Z_NR<long> ,fplll::FP_NR<mpfr_t> >  *long_mpfr;
};

/* "decl.pxd":132
 * 
 *     IF HAVE_QD:
 *         ctypedef union lll_reduction_core_t:             # <<<<<<<<<<<<<<
 *             LLLReduction[Z_NR[mpz_t], FP_NR[d_t]] *mpz_d
 *             LLLReduction[Z_NR[mpz_t], FP_NR[ld_t]] *mpz_ld
*/
union __pyx_t_6fpylll_5fplll_4decl_lll_reduction_core_t {
  fplll::LLLReduction<fplll::Z_NR<mpz_t> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_d_t> >  *mpz_d;
  fplll::LLLReduction<fplll::Z_NR<mpz_t> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_ld_t> >  *mpz_ld;
  fplll::LLLReduction<fplll::Z_NR<mpz_t> ,fplll::FP_NR<dpe_t> >  *mpz_dpe;
  fplll::LLLReduction<fplll::Z_NR<mpz_t> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_dd_t> >  *mpz_dd;
  fplll::LLLReduction<fplll::Z_NR<mpz_t> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_qd_t> >  *mpz_qd;
  fplll::LLLReduction<fplll::Z_NR<mpz_t> ,fplll::FP_NR<mpfr_t> >  *mpz_mpfr;
  fplll::LLLReduction<fplll::Z_NR<long> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_d_t> >  *long_d;
  fplll::LLLReduction<fplll::Z_NR<long> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_ld_t> >  *long_ld;
  fplll::LLLReduction<fplll::Z_NR<long> ,fplll::FP_NR<dpe_t> >  *long_dpe;
  fplll::LLLReduction<fplll::Z_NR<long> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_dd_t> >  *long_dd;
  fplll::LLLReduction<fplll::Z_NR<long> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_qd_t> >  *long_qd;
  fplll::LLLReduction<fplll::Z_NR<long> ,fplll::FP_NR<mpfr_t> >  *long_mpfr;
};

/* "decl.pxd":157
 * 
 *     IF HAVE_QD:
 *         ctypedef union bkz_auto_abort_core_t:             # <<<<<<<<<<<<<<
 *             BKZAutoAbort[Z_NR[mpz_t], FP_NR[d_t]] *mpz_d
 *             BKZAutoAbort[Z_NR[mpz_t], FP_NR[ld_t]] *mpz_ld
*/
union __pyx_t_6fpylll_5fplll_4decl_bkz_auto_abort_core_t {
  fplll::BKZAutoAbort<fplll::Z_NR<mpz_t> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_d_t> >  *mpz_d;
  fplll::BKZAutoAbort<fplll::Z_NR<mpz_t> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_ld_t> >  *mpz_ld;
  fplll::BKZAutoAbort<fplll::Z_NR<mpz_t> ,fplll::FP_NR<dpe_t> >  *mpz_dpe;
  fplll::BKZAutoAbort<fplll::Z_NR<mpz_t> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_dd_t> >  *mpz_dd;
  fplll::BKZAutoAbort<fplll::Z_NR<mpz_t> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_qd_t> >  *mpz_qd;
  fplll::BKZAutoAbort<fplll::Z_NR<mpz_t> ,fplll::FP_NR<mpfr_t> >  *mpz_mpfr;
  fplll::BKZAutoAbort<fplll::Z_NR<long> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_d_t> >  *long_d;
  fplll::BKZAutoAbort<fplll::Z_NR<long> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_ld_t> >  *long_ld;
  fplll::BKZAutoAbort<fplll::Z_NR<long> ,fplll::FP_NR<dpe_t> >  *long_dpe;
  fplll::BKZAutoAbort<fplll::Z_NR<long> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_dd_t> >  *long_dd;
  fplll::BKZAutoAbort<fplll::Z_NR<long> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_qd_t> >  *long_qd;
  fplll::BKZAutoAbort<fplll::Z_NR<long> ,fplll::FP_NR<mpfr_t> >  *long_mpfr;
};

/* "decl.pxd":182
 * 
 *     IF HAVE_QD:
 *         ctypedef union bkz_reduction_core_t:             # <<<<<<<<<<<<<<
 *             BKZReduction[Z_NR[mpz_t], FP_NR[d_t]] *mpz_d
 *             BKZReduction[Z_NR[mpz_t], FP_NR[ld_t]] *mpz_ld
*/
union __pyx_t_6fpylll_5fplll_4decl_bkz_reduction_core_t {
  fplll::BKZReduction<fplll::Z_NR<mpz_t> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_d_t> >  *mpz_d;
  fplll::BKZReduction<fplll::Z_NR<mpz_t> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_ld_t> >  *mpz_ld;
  fplll::BKZReduction<fplll::Z_NR<mpz_t> ,fplll::FP_NR<dpe_t> >  *mpz_dpe;
  fplll::BKZReduction<fplll::Z_NR<mpz_t> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_dd_t> >  *mpz_dd;
  fplll::BKZReduction<fplll::Z_NR<mpz_t> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_qd_t> >  *mpz_qd;
  fplll::BKZReduction<fplll::Z_NR<mpz_t> ,fplll::FP_NR<mpfr_t> >  *mpz_mpfr;
  fplll::BKZReduction<fplll::Z_NR<long> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_d_t> >  *long_d;
  fplll::BKZReduction<fplll::Z_NR<long> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_ld_t> >  *long_ld;
  fplll::BKZReduction<fplll::Z_NR<long> ,fplll::FP_NR<dpe_t> >  *long_dpe;
  fplll::BKZReduction<fplll::Z_NR<long> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_dd_t> >  *long_dd;
  fplll::BKZReduction<fplll::Z_NR<long> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_qd_t> >  *long_qd;
  fplll::BKZReduction<fplll::Z_NR<long> ,fplll::FP_NR<mpfr_t> >  *long_mpfr;
};

/* "decl.pxd":207
 * 
 *     IF HAVE_QD:
 *         ctypedef union fast_evaluator_core_t:             # <<<<<<<<<<<<<<
 *             FastEvaluator[FP_NR[d_t]] *d
 *             FastEvaluator[FP_NR[ld_t]] *ld
*/
union __pyx_t_6fpylll_5fplll_4decl_fast_evaluator_core_t {
  fplll::FastEvaluator<fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_d_t> >  *d;
  fplll::FastEvaluator<fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_ld_t> >  *ld;
  fplll::FastEvaluator<fplll::FP_NR<dpe_t> >  *dpe;
  fplll::FastEvaluator<fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_dd_t> >  *dd;
  fplll::FastEvaluator<fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_qd_t> >  *qd;
  fplll::FastErrorBoundedEvaluator *mpfr;
};

/* "decl.pxd":222
 * 
 *     IF HAVE_QD:
 *         ctypedef union evaluator_core_t:             # <<<<<<<<<<<<<<
 *             Evaluator[FP_NR[d_t]] *d
 *             Evaluator[FP_NR[ld_t]] *ld
*/
union __pyx_t_6fpylll_5fplll_4decl_evaluator_core_t {
  fplll::Evaluator<fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_d_t> >  *d;
  fplll::Evaluator<fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_ld_t> >  *ld;
  fplll::Evaluator<fplll::FP_NR<dpe_t> >  *dpe;
  fplll::Evaluator<fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_dd_t> >  *dd;
  fplll::Evaluator<fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_qd_t> >  *qd;
  fplll::ErrorBoundedEvaluator *mpfr;
};

/* "decl.pxd":237
 * 
 *     IF HAVE_QD:
 *         ctypedef union enumeration_core_t:             # <<<<<<<<<<<<<<
 *             Enumeration[Z_NR[mpz_t], FP_NR[d_t]] *mpz_d
 *             Enumeration[Z_NR[mpz_t], FP_NR[ld_t]] *mpz_ld
*/
union __pyx_t_6fpylll_5fplll_4decl_enumeration_core_t {
  fplll::Enumeration<fplll::Z_NR<mpz_t> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_d_t> >  *mpz_d;
  fplll::Enumeration<fplll::Z_NR<mpz_t> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_ld_t> >  *mpz_ld;
  fplll::Enumeration<fplll::Z_NR<mpz_t> ,fplll::FP_NR<dpe_t> >  *mpz_dpe;
  fplll::Enumeration<fplll::Z_NR<mpz_t> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_dd_t> >  *mpz_dd;
  fplll::Enumeration<fplll::Z_NR<mpz_t> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_qd_t> >  *mpz_qd;
  fplll::Enumeration<fplll::Z_NR<mpz_t> ,fplll::FP_NR<mpfr_t> >  *mpz_mpfr;
  fplll::Enumeration<fplll::Z_NR<long> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_d_t> >  *long_d;
  fplll::Enumeration<fplll::Z_NR<long> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_ld_t> >  *long_ld;
  fplll::Enumeration<fplll::Z_NR<long> ,fplll::FP_NR<dpe_t> >  *long_dpe;
  fplll::Enumeration<fplll::Z_NR<long> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_dd_t> >  *long_dd;
  fplll::Enumeration<fplll::Z_NR<long> ,fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_qd_t> >  *long_qd;
  fplll::Enumeration<fplll::Z_NR<long> ,fplll::FP_NR<mpfr_t> >  *long_mpfr;
};

/* "decl.pxd":262
 * 
 *     IF HAVE_QD:
 *         ctypedef union pruner_core_t:             # <<<<<<<<<<<<<<
 *             Pruner[FP_NR[d_t]] *d
 *             Pruner[FP_NR[ld_t]] *ld
*/
union __pyx_t_6fpylll_5fplll_4decl_pruner_core_t {
  fplll::Pruner<fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_d_t> >  *d;
  fplll::Pruner<fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_ld_t> >  *ld;
  fplll::Pruner<fplll::FP_NR<dpe_t> >  *dpe;
  fplll::Pruner<fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_dd_t> >  *dd;
  fplll::Pruner<fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_qd_t> >  *qd;
  fplll::Pruner<fplll::FP_NR<mpfr_t> >  *mpfr;
};

/* "decl.pxd":278
 *     IF HAVE_QD:
 *         # we cannot use a union because of non-trivial constructors
 *         ctypedef struct vector_fp_nr_t:             # <<<<<<<<<<<<<<
 *             vector[FP_NR[d_t]] d
 *             vector[FP_NR[ld_t]] ld
*/
struct __pyx_t_6fpylll_5fplll_4decl_vector_fp_nr_t {
  std::vector<fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_d_t> >  d;
  std::vector<fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_ld_t> >  ld;
  std::vector<fplll::FP_NR<dpe_t> >  dpe;
  std::vector<fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_dd_t> >  dd;
  std::vector<fplll::FP_NR<__pyx_t_6fpylll_5fplll_4decl_qd_t> >  qd;
  std::vector<fplll::FP_NR<mpfr_t> >  mpfr;
};

/* "decl.pxd":464
 *             vector[FP_NR[mpfr_t]] mpfr
 * 
 * ctypedef struct vector_z_nr_t:             # <<<<<<<<<<<<<<
 *     vector[Z_NR[mpz_t]] mpz
 *     vector[Z_NR[long]] long
*/
struct __pyx_t_6fpylll_5fplll_4decl_vector_z_nr_t {
  std::vector<fplll::Z_NR<mpz_t> >  mpz;
  std::vector<fplll::Z_NR<long> >  __pyx_long;
};
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;
};

/* "fpylll/fplll/integer_matrix.pxd":7
 * from .decl cimport zz_mat_core_t
 * 
 * cdef class IntegerMatrix:             # <<<<<<<<<<<<<<
 *     cdef IntType _type
 *     cdef zz_mat_core_t _core
*/
struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix {
  PyObject_HEAD
  struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_vtab;
  enum fplll::IntType _type;
  __pyx_t_6fpylll_5fplll_4decl_zz_mat_core_t _core;
};


/* "fpylll/fplll/integer_matrix.pxd":15
 *     cdef int _set(self, int i, int j, value) except -1
 * 
 * cdef class IntegerMatrixRow:             # <<<<<<<<<<<<<<
 *     cdef int row
 *     cdef IntegerMatrix m
*/
struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow {
  PyObject_HEAD
  int row;
  struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *m;
};



/* "fpylll/fplll/integer_matrix.pyx":293
 * 
 * 
 * cdef class IntegerMatrix:             # <<<<<<<<<<<<<<
 *     """
 *     Dense matrices over the Integers.
*/

struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix {
  long (*_nrows)(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *);
  long (*_ncols)(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *);
  PyObject *(*_get)(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *, int, int);
  int (*_set)(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *, int, int, PyObject *);
};
static struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_vtabptr_6fpylll_5fplll_14integer_matrix_IntegerMatrix;
/* #### 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);

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

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

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

/* 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 (used by PyObjectCallOneArg) */
#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);

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

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

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

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

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

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

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

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

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

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

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

/* PyNotImplementedError_Check.proto */
#define __Pyx_PyExc_NotImplementedError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_NotImplementedError)

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

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

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

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

/* HasAttr.proto */
#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

/* CallableCheck.proto */
#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY
#define __Pyx_PyCallable_Check(obj)   (Py_TYPE(obj)->tp_call != NULL)
#else
#define __Pyx_PyCallable_Check(obj)   PyCallable_Check(obj)
#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);

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

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

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

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

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

/* IterNextPlain.proto (used by IterNext) */
static CYTHON_INLINE PyObject *__Pyx_PyIter_Next_Plain(PyObject *iterator);
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
static PyObject *__Pyx_GetBuiltinNext_LimitedAPI(void);
#endif

/* IterNext.proto */
#define __Pyx_PyIter_Next(obj) __Pyx_PyIter_Next2(obj, NULL)
static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject *, PyObject *);

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

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

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

/* PyNumber_Hex.proto */
#define __Pyx_PyNumber_Hex(obj) PyNumber_ToBase((obj), 16)

/* py_abs.proto */
#if CYTHON_USE_PYLONG_INTERNALS
static PyObject *__Pyx_PyLong_AbsNeg(PyObject *num);
#define __Pyx_PyNumber_Absolute(x)\
    ((likely(PyLong_CheckExact(x))) ?\
         (likely(__Pyx_PyLong_IsNonNeg(x)) ? __Pyx_NewRef(x) : __Pyx_PyLong_AbsNeg(x)) :\
         PyNumber_Absolute(x))
#else
#define __Pyx_PyNumber_Absolute(x)  PyNumber_Absolute(x)
#endif

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

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

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

/* append.proto */
static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);

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

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

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

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

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

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

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

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

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

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

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

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

/* PyStopIteration_Check.proto */
#define __Pyx_PyExc_StopIteration_Check(obj)  __Pyx_TypeCheck(obj, PyExc_StopIteration)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* TypeImport.proto */
#ifndef __PYX_HAVE_RT_ImportType_proto_3_2_4
#define __PYX_HAVE_RT_ImportType_proto_3_2_4
#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_4(s) alignof(s)
#else
#define __PYX_GET_STRUCT_ALIGNMENT_3_2_4(s) sizeof(void*)
#endif
enum __Pyx_ImportType_CheckSize_3_2_4 {
   __Pyx_ImportType_CheckSize_Error_3_2_4 = 0,
   __Pyx_ImportType_CheckSize_Warn_3_2_4 = 1,
   __Pyx_ImportType_CheckSize_Ignore_3_2_4 = 2
};
static PyTypeObject *__Pyx_ImportType_3_2_4(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_4 check_size);
#endif

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(enum fplll::IntType value);

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

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

/* CIntFromPy.proto */
static CYTHON_INLINE enum fplll::IntType __Pyx_PyLong_As_enum__fplll_3a__3a_IntType(PyObject *);

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

#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 long __pyx_f_6fpylll_5fplll_14integer_matrix_13IntegerMatrix__nrows(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self); /* proto*/
static long __pyx_f_6fpylll_5fplll_14integer_matrix_13IntegerMatrix__ncols(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_6fpylll_5fplll_14integer_matrix_13IntegerMatrix__get(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, int __pyx_v_i, int __pyx_v_j); /* proto*/
static int __pyx_f_6fpylll_5fplll_14integer_matrix_13IntegerMatrix__set(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, int __pyx_v_i, int __pyx_v_j, PyObject *__pyx_v_value); /* proto*/

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

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

/* Module declarations from "fpylll.gmp.types" */

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

/* Module declarations from "fpylll.gmp.mpz" */

/* Module declarations from "fpylll.mpfr.mpfr" */

/* Module declarations from "fpylll.gmp.random" */

/* Module declarations from "libcpp.vector" */

/* Module declarations from "libcpp.string_view" */

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

/* Module declarations from "libcpp.utility" */

/* Module declarations from "libcpp.pair" */

/* Module declarations from "libcpp" */

/* Module declarations from "libcpp.functional" */

/* Module declarations from "fpylll.fplll.fplll" */

/* Module declarations from "fpylll.qd.qd" */

/* Module declarations from "fpylll.fplll.decl" */

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

/* Module declarations from "__builtin__" */

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

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

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

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

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

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

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

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

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

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

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

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

/* Module declarations from "__builtin__" */

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

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

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

/* Module declarations from "cython" */

/* Module declarations from "__builtin__" */

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* Module declarations from "cpython" */

/* Module declarations from "cysignals.signals" */
static cysigs_t *__pyx_vp_9cysignals_7signals_cysigs = 0;
#define cysigs (*__pyx_vp_9cysignals_7signals_cysigs)
static void (*__pyx_f_9cysignals_7signals_verify_exc_value)(void); /*proto*/
static void (*_sig_on_interrupt_received)(void); /*proto*/
static void (*_sig_on_recover)(void); /*proto*/
static void (*_do_raise_exception)(int); /*proto*/
static void (*_sig_off_warning)(char const *, int); /*proto*/
static void (*print_backtrace)(void); /*proto*/

/* Module declarations from "fpylll.util" */
static PyObject *(*__pyx_f_6fpylll_4util_check_int_type)(PyObject *); /*proto*/
static int (*__pyx_f_6fpylll_4util_preprocess_indices)(int &, int &, int, int); /*proto*/

/* Module declarations from "fpylll.io" */
static int (*__pyx_f_6fpylll_2io_assign_Z_NR_mpz)(fplll::Z_NR<mpz_t>  &, PyObject *); /*proto*/
static int (*__pyx_f_6fpylll_2io_assign_mpz)(__mpz_struct *, PyObject *); /*proto*/
static PyObject *(*__pyx_f_6fpylll_2io_mpz_get_python)(mpz_srcptr); /*proto*/

/* Module declarations from "__builtin__" */

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

/* Module declarations from "fpylll.gmp.pylong" */
static PyObject *(*__pyx_f_6fpylll_3gmp_6pylong_mpz_get_pyintlong)(mpz_srcptr); /*proto*/

/* Module declarations from "fpylll.fplll.integer_matrix" */
/* #### Code section: typeinfo ### */
/* #### Code section: before_global_var ### */
#define __Pyx_MODULE_NAME "fpylll.fplll.integer_matrix"
extern int __pyx_module_is_main_fpylll__fplll__integer_matrix;
int __pyx_module_is_main_fpylll__fplll__integer_matrix = 0;

/* Implementation of "fpylll.fplll.integer_matrix" */
/* #### Code section: global_var ### */
static PyObject *__pyx_builtin_id;
static PyObject *__pyx_builtin_open;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_map;
/* #### Code section: string_decls ### */
static const char __pyx_k_Dense_matrices_over_the_Integer[] = "\nDense matrices over the Integers.\n\n.. moduleauthor:: Martin R. Albrecht <martinralbrecht+fpylll@googlemail.com>\n\n";
/* #### Code section: decls ### */
static int __pyx_pf_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow___init__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *__pyx_v_self, struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_M, int __pyx_v_row); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_2__getitem__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *__pyx_v_self, int __pyx_v_column); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_4__str__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_6__repr__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_8__reduce__(CYTHON_UNUSED struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_10__abs__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_pf_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_12__len__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_14is_zero(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *__pyx_v_self, int __pyx_v_frm); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_16size_nz(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_18__iadd__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *__pyx_v_self, struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *__pyx_v_v); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_20__isub__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *__pyx_v_self, struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *__pyx_v_v); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_22addmul(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *__pyx_v_self, struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *__pyx_v_v, PyObject *__pyx_v_x, int __pyx_v_expo); /* proto */
static int __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix___init__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, PyObject *__pyx_v_arg0, PyObject *__pyx_v_arg1, PyObject *__pyx_v_int_type); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_2from_matrix(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_A, PyObject *__pyx_v_nrows, PyObject *__pyx_v_ncols, PyObject *__pyx_v_kwds); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_4from_iterable(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_nrows, PyObject *__pyx_v_ncols, PyObject *__pyx_v_it, PyObject *__pyx_v_kwds); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_6identity(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_nrows, PyObject *__pyx_v_int_type); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_8random(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_d, PyObject *__pyx_v_algorithm, PyObject *__pyx_v_int_type, PyObject *__pyx_v_kwds); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_10set_matrix(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, PyObject *__pyx_v_A); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_12set_iterable(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, PyObject *__pyx_v_A); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_14to_matrix(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, PyObject *__pyx_v_A); /* proto */
static void __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_16__dealloc__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_18__repr__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_20__str__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_8int_type___get__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_22__copy__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_24__reduce__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_5nrows___get__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_5ncols___get__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_26__getitem__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static int __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_28__setitem__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_30randomize(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, PyObject *__pyx_v_algorithm, PyObject *__pyx_v_kwds); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_32gen_identity(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, int __pyx_v_nrows); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_34clear(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_36is_empty(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_38resize(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, int __pyx_v_rows, int __pyx_v_cols); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_40set_rows(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, int __pyx_v_rows); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_42set_cols(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, int __pyx_v_cols); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_44swap_rows(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, int __pyx_v_r1, int __pyx_v_r2); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_46rotate_left(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, int __pyx_v_first, int __pyx_v_last); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_48rotate_right(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, int __pyx_v_first, int __pyx_v_last); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_50rotate(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, int __pyx_v_first, int __pyx_v_middle, int __pyx_v_last); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_52rotate_gram_left(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, int __pyx_v_first, int __pyx_v_last, int __pyx_v_n_valid_rows); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_54rotate_gram_right(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, int __pyx_v_first, int __pyx_v_last, int __pyx_v_n_valid_rows); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_56transpose(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_58get_max_exp(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_60__mul__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_A, struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_B); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_62__mod__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, PyObject *__pyx_v_q); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_64mod(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, PyObject *__pyx_v_q, int __pyx_v_start_row, int __pyx_v_start_col, int __pyx_v_stop_row, int __pyx_v_stop_col); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_66__richcmp__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_other, int __pyx_v_op); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_68apply_transform(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_U, int __pyx_v_start_row); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_70submatrix(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_72multiply_left(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, PyObject *__pyx_v_v, PyObject *__pyx_v_start); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_74from_file(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_filename, PyObject *__pyx_v_kwds); /* proto */
static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_unpickle_IntegerMatrix(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_nrows, PyObject *__pyx_v_ncols, PyObject *__pyx_v_l, PyObject *__pyx_v_int_type); /* proto */
static PyObject *__pyx_tp_new_6fpylll_5fplll_14integer_matrix_IntegerMatrix(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
/* #### Code section: late_includes ### */
#include "macros.h"
/* #### Code section: module_state ### */
/* SmallCodeConfig */
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
    #define CYTHON_SMALL_CODE __attribute__((cold))
#else
    #define CYTHON_SMALL_CODE
#endif
#endif

typedef struct {
  PyObject *__pyx_d;
  PyObject *__pyx_b;
  PyObject *__pyx_cython_runtime;
  PyObject *__pyx_empty_tuple;
  PyObject *__pyx_empty_bytes;
  PyObject *__pyx_empty_unicode;
  PyTypeObject *__pyx_ptype_7cpython_4type_type;
  PyTypeObject *__pyx_ptype_7cpython_4bool_bool;
  PyTypeObject *__pyx_ptype_7cpython_7complex_complex;
  PyTypeObject *__pyx_ptype_7cpython_11longintrepr_py_long;
  PyObject *__pyx_type_6fpylll_5fplll_14integer_matrix_IntegerMatrix;
  PyObject *__pyx_type_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow;
  PyTypeObject *__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix;
  PyTypeObject *__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values;
  PyObject *__pyx_tuple[8];
  PyObject *__pyx_codeobj_tab[34];
  PyObject *__pyx_string_tab[335];
  PyObject *__pyx_number_tab[4];
/* #### Code section: module_state_contents ### */
/* IterNextPlain.module_state_decls */
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
PyObject *__Pyx_GetBuiltinNext_LimitedAPI_cache;
#endif

/* 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_A_IntegerMatrix_from_matrix_0_2 __pyx_string_tab[1]
#define __pyx_kp_u_Algorithm_s_unknown __pyx_string_tab[2]
#define __pyx_kp_u_Apply_moduluar_reduction_modulo __pyx_string_tab[3]
#define __pyx_kp_u_Assign_value_to_index_param_key __pyx_string_tab[4]
#define __pyx_kp_u_Cannot_determine_number_of_rows __pyx_string_tab[5]
#define __pyx_kp_u_Construct_a_new_identity_matrix __pyx_string_tab[6]
#define __pyx_kp_u_Construct_a_new_integer_matrix_f __pyx_string_tab[7]
#define __pyx_kp_u_Construct_a_new_integer_matrix_f_2 __pyx_string_tab[8]
#define __pyx_kp_u_Construct_a_new_integer_matrix_p __pyx_string_tab[9]
#define __pyx_kp_u_Construct_a_new_submatrix_param __pyx_string_tab[10]
#define __pyx_kp_u_Construct_new_matrix_from_file_i __pyx_string_tab[11]
#define __pyx_kp_u_Construct_new_random_matrix_par __pyx_string_tab[12]
#define __pyx_kp_u_Create_a_row_reference_param_Int __pyx_string_tab[13]
#define __pyx_kp_u_Either_q_or_bits_is_required __pyx_string_tab[14]
#define __pyx_kp_u_Example_from_fpylll_import_Inte __pyx_string_tab[15]
#define __pyx_kp_u_In_place_add_row_vector_2_expo_x __pyx_string_tab[16]
#define __pyx_kp_u_In_place_add_row_vector_v_param __pyx_string_tab[17]
#define __pyx_kp_u_In_place_subtract_row_vector_v __pyx_string_tab[18]
#define __pyx_kp_u_Index_at_which_an_all_zero_vect __pyx_string_tab[19]
#define __pyx_kp_u_Inline_transpose_A_IntegerMatri __pyx_string_tab[20]
#define __pyx_kp_u_Inputs_to_submatrix_not_understo __pyx_string_tab[21]
#define __pyx_kp_u_IntegerMatrix __pyx_string_tab[22]
#define __pyx_kp_u_IntegerMatrixRow___abs___line_10 __pyx_string_tab[23]
#define __pyx_kp_u_IntegerMatrixRow___iadd___line_2 __pyx_string_tab[24]
#define __pyx_kp_u_IntegerMatrixRow___init___line_3 __pyx_string_tab[25]
#define __pyx_kp_u_IntegerMatrixRow___isub___line_2 __pyx_string_tab[26]
#define __pyx_kp_u_IntegerMatrixRow___repr___line_9 __pyx_string_tab[27]
#define __pyx_kp_u_IntegerMatrixRow___str___line_70 __pyx_string_tab[28]
#define __pyx_kp_u_IntegerMatrixRow_addmul_line_252 __pyx_string_tab[29]
#define __pyx_kp_u_IntegerMatrixRow_is_zero_line_15 __pyx_string_tab[30]
#define __pyx_kp_u_IntegerMatrixRow_size_nz_line_17 __pyx_string_tab[31]
#define __pyx_kp_u_IntegerMatrix___getitem___line_8 __pyx_string_tab[32]
#define __pyx_kp_u_IntegerMatrix___init___line_298 __pyx_string_tab[33]
#define __pyx_kp_u_IntegerMatrix___mul___line_1364 __pyx_string_tab[34]
#define __pyx_kp_u_IntegerMatrix___reduce___line_80 __pyx_string_tab[35]
#define __pyx_kp_u_IntegerMatrix___setitem___line_9 __pyx_string_tab[36]
#define __pyx_kp_u_IntegerMatrix_from_file_line_166 __pyx_string_tab[37]
#define __pyx_kp_u_IntegerMatrix_from_iterable_line __pyx_string_tab[38]
#define __pyx_kp_u_IntegerMatrix_from_matrix_line_3 __pyx_string_tab[39]
#define __pyx_kp_u_IntegerMatrix_get_max_exp_line_1 __pyx_string_tab[40]
#define __pyx_kp_u_IntegerMatrix_identity_line_431 __pyx_string_tab[41]
#define __pyx_kp_u_IntegerMatrix_mod_line_1417 __pyx_string_tab[42]
#define __pyx_kp_u_IntegerMatrix_ncols___get___line __pyx_string_tab[43]
#define __pyx_kp_u_IntegerMatrix_nrows___get___line __pyx_string_tab[44]
#define __pyx_kp_u_IntegerMatrix_random_line_449 __pyx_string_tab[45]
#define __pyx_kp_u_IntegerMatrix_rotate_gram_left_l __pyx_string_tab[46]
#define __pyx_kp_u_IntegerMatrix_rotate_gram_right_2 __pyx_string_tab[47]
#define __pyx_kp_u_IntegerMatrix_rotate_left_line_1 __pyx_string_tab[48]
#define __pyx_kp_u_IntegerMatrix_rotate_line_1250 __pyx_string_tab[49]
#define __pyx_kp_u_IntegerMatrix_rotate_right_line __pyx_string_tab[50]
#define __pyx_kp_u_IntegerMatrix_set_iterable_line __pyx_string_tab[51]
#define __pyx_kp_u_IntegerMatrix_set_matrix_line_63 __pyx_string_tab[52]
#define __pyx_kp_u_IntegerMatrix_submatrix_line_154 __pyx_string_tab[53]
#define __pyx_kp_u_IntegerMatrix_swap_rows_line_119 __pyx_string_tab[54]
#define __pyx_kp_u_IntegerMatrix_to_matrix_line_705 __pyx_string_tab[55]
#define __pyx_kp_u_IntegerMatrix_transpose_line_132 __pyx_string_tab[56]
#define __pyx_kp_u_Integer_type_s_not_understood __pyx_string_tab[57]
#define __pyx_kp_u_Last_column __pyx_string_tab[58]
#define __pyx_kp_u_Last_row __pyx_string_tab[59]
#define __pyx_kp_u_Naive_matrix_matrix_products_par __pyx_string_tab[60]
#define __pyx_kp_u_None __pyx_string_tab[61]
#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[62]
#define __pyx_kp_u_Number_of_Columns_returns_number __pyx_string_tab[63]
#define __pyx_kp_u_Number_of_Rows_returns_number_of __pyx_string_tab[64]
#define __pyx_kp_u_Number_of_columns_must_be_0 __pyx_string_tab[65]
#define __pyx_kp_u_Number_of_columns_of_A __pyx_string_tab[66]
#define __pyx_kp_u_Number_of_rows_must_be_0 __pyx_string_tab[67]
#define __pyx_kp_u_Only_and_are_implemented_for_int __pyx_string_tab[68]
#define __pyx_kp_u_Parameter_s_not_understood __pyx_string_tab[69]
#define __pyx_kp_u_Parameters_arg0_and_arg1_not_und __pyx_string_tab[70]
#define __pyx_kp_u_Return_True_if_this_vector_cons __pyx_string_tab[71]
#define __pyx_kp_u_Return__2_norm_of_this_vector_Ex __pyx_string_tab[72]
#define __pyx_kp_u_Rotates_the_order_of_the_elemen __pyx_string_tab[73]
#define __pyx_kp_u_Row_permutation_M_first_M_last_b __pyx_string_tab[74]
#define __pyx_kp_u_Row_permutation_M_first_M_last_b_2 __pyx_string_tab[75]
#define __pyx_kp_u_Select_a_row_or_entry_param_key __pyx_string_tab[76]
#define __pyx_kp_u_Serialize_this_matrix_import_pic __pyx_string_tab[77]
#define __pyx_kp_u_Set_this_matrix_from_iterable_A __pyx_string_tab[78]
#define __pyx_kp_u_Set_this_matrix_from_matrix_like __pyx_string_tab[79]
#define __pyx_kp_u_String_representation_of_this_r __pyx_string_tab[80]
#define __pyx_kp_u_Transformation_needed_to_update __pyx_string_tab[81]
#define __pyx_kp_u_Transformation_needed_to_update_2 __pyx_string_tab[82]
#define __pyx_kp_u_Write_this_matrix_to_matrix_like __pyx_string_tab[83]
#define __pyx_kp_u__10 __pyx_string_tab[84]
#define __pyx_kp_u__11 __pyx_string_tab[85]
#define __pyx_kp_u__12 __pyx_string_tab[86]
#define __pyx_kp_u__2 __pyx_string_tab[87]
#define __pyx_kp_u__3 __pyx_string_tab[88]
#define __pyx_kp_u__4 __pyx_string_tab[89]
#define __pyx_kp_u__5 __pyx_string_tab[90]
#define __pyx_kp_u__6 __pyx_string_tab[91]
#define __pyx_kp_u__7 __pyx_string_tab[92]
#define __pyx_kp_u__8 __pyx_string_tab[93]
#define __pyx_kp_u__9 __pyx_string_tab[94]
#define __pyx_kp_u_add_note __pyx_string_tab[95]
#define __pyx_kp_u_at __pyx_string_tab[96]
#define __pyx_kp_u_dd __pyx_string_tab[97]
#define __pyx_kp_u_disable __pyx_string_tab[98]
#define __pyx_kp_u_does_not_match_number_of_rows_o __pyx_string_tab[99]
#define __pyx_kp_u_enable __pyx_string_tab[100]
#define __pyx_kp_u_first_column __pyx_string_tab[101]
#define __pyx_kp_u_first_row __pyx_string_tab[102]
#define __pyx_kp_u_fpylll_fplll_math __pyx_string_tab[103]
#define __pyx_kp_u_fpylll_fplll_re __pyx_string_tab[104]
#define __pyx_kp_u_gc __pyx_string_tab[105]
#define __pyx_kp_u_isenabled __pyx_string_tab[106]
#define __pyx_kp_u_of __pyx_string_tab[107]
#define __pyx_kp_u_param_int_r1_param_int_r2_A_Int __pyx_string_tab[108]
#define __pyx_kp_u_row_2 __pyx_string_tab[109]
#define __pyx_kp_u_src_fpylll_fplll_integer_matrix __pyx_string_tab[110]
#define __pyx_n_u_A __pyx_string_tab[111]
#define __pyx_n_u_B __pyx_string_tab[112]
#define __pyx_n_u_IntegerMatrixRow __pyx_string_tab[113]
#define __pyx_n_u_IntegerMatrixRow___reduce __pyx_string_tab[114]
#define __pyx_n_u_IntegerMatrixRow_addmul __pyx_string_tab[115]
#define __pyx_n_u_IntegerMatrixRow_is_zero __pyx_string_tab[116]
#define __pyx_n_u_IntegerMatrixRow_size_nz __pyx_string_tab[117]
#define __pyx_n_u_IntegerMatrix_2 __pyx_string_tab[118]
#define __pyx_n_u_IntegerMatrix___copy __pyx_string_tab[119]
#define __pyx_n_u_IntegerMatrix___reduce __pyx_string_tab[120]
#define __pyx_n_u_IntegerMatrix_apply_transform __pyx_string_tab[121]
#define __pyx_n_u_IntegerMatrix_clear __pyx_string_tab[122]
#define __pyx_n_u_IntegerMatrix_from_file __pyx_string_tab[123]
#define __pyx_n_u_IntegerMatrix_from_iterable __pyx_string_tab[124]
#define __pyx_n_u_IntegerMatrix_from_matrix __pyx_string_tab[125]
#define __pyx_n_u_IntegerMatrix_gen_identity __pyx_string_tab[126]
#define __pyx_n_u_IntegerMatrix_get_max_exp __pyx_string_tab[127]
#define __pyx_n_u_IntegerMatrix_identity __pyx_string_tab[128]
#define __pyx_n_u_IntegerMatrix_is_empty __pyx_string_tab[129]
#define __pyx_n_u_IntegerMatrix_mod __pyx_string_tab[130]
#define __pyx_n_u_IntegerMatrix_multiply_left __pyx_string_tab[131]
#define __pyx_n_u_IntegerMatrix_random __pyx_string_tab[132]
#define __pyx_n_u_IntegerMatrix_randomize __pyx_string_tab[133]
#define __pyx_n_u_IntegerMatrix_resize __pyx_string_tab[134]
#define __pyx_n_u_IntegerMatrix_rotate __pyx_string_tab[135]
#define __pyx_n_u_IntegerMatrix_rotate_gram_left __pyx_string_tab[136]
#define __pyx_n_u_IntegerMatrix_rotate_gram_right __pyx_string_tab[137]
#define __pyx_n_u_IntegerMatrix_rotate_left __pyx_string_tab[138]
#define __pyx_n_u_IntegerMatrix_rotate_right __pyx_string_tab[139]
#define __pyx_n_u_IntegerMatrix_set_cols __pyx_string_tab[140]
#define __pyx_n_u_IntegerMatrix_set_iterable __pyx_string_tab[141]
#define __pyx_n_u_IntegerMatrix_set_matrix __pyx_string_tab[142]
#define __pyx_n_u_IntegerMatrix_set_rows __pyx_string_tab[143]
#define __pyx_n_u_IntegerMatrix_submatrix __pyx_string_tab[144]
#define __pyx_n_u_IntegerMatrix_swap_rows __pyx_string_tab[145]
#define __pyx_n_u_IntegerMatrix_to_matrix __pyx_string_tab[146]
#define __pyx_n_u_IntegerMatrix_transpose __pyx_string_tab[147]
#define __pyx_n_u_M __pyx_string_tab[148]
#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[149]
#define __pyx_n_u_S __pyx_string_tab[150]
#define __pyx_n_u_U __pyx_string_tab[151]
#define __pyx_n_u_a __pyx_string_tab[152]
#define __pyx_n_u_abs __pyx_string_tab[153]
#define __pyx_n_u_addmul __pyx_string_tab[154]
#define __pyx_n_u_algorithm __pyx_string_tab[155]
#define __pyx_n_u_alpha __pyx_string_tab[156]
#define __pyx_n_u_append __pyx_string_tab[157]
#define __pyx_n_u_apply_transform __pyx_string_tab[158]
#define __pyx_n_u_arg0 __pyx_string_tab[159]
#define __pyx_n_u_arg1 __pyx_string_tab[160]
#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[161]
#define __pyx_n_u_b __pyx_string_tab[162]
#define __pyx_n_u_bits __pyx_string_tab[163]
#define __pyx_n_u_bits2 __pyx_string_tab[164]
#define __pyx_n_u_c __pyx_string_tab[165]
#define __pyx_n_u_ceil __pyx_string_tab[166]
#define __pyx_n_u_class_getitem __pyx_string_tab[167]
#define __pyx_n_u_clear __pyx_string_tab[168]
#define __pyx_n_u_cline_in_traceback __pyx_string_tab[169]
#define __pyx_n_u_cls __pyx_string_tab[170]
#define __pyx_n_u_col __pyx_string_tab[171]
#define __pyx_n_u_cols __pyx_string_tab[172]
#define __pyx_n_u_copy __pyx_string_tab[173]
#define __pyx_n_u_d __pyx_string_tab[174]
#define __pyx_n_u_dict __pyx_string_tab[175]
#define __pyx_n_u_e __pyx_string_tab[176]
#define __pyx_n_u_enter __pyx_string_tab[177]
#define __pyx_n_u_enumerate __pyx_string_tab[178]
#define __pyx_n_u_exit __pyx_string_tab[179]
#define __pyx_n_u_expo __pyx_string_tab[180]
#define __pyx_n_u_fh __pyx_string_tab[181]
#define __pyx_n_u_filename __pyx_string_tab[182]
#define __pyx_n_u_first __pyx_string_tab[183]
#define __pyx_n_u_floor __pyx_string_tab[184]
#define __pyx_n_u_fpylll_fplll_integer_matrix __pyx_string_tab[185]
#define __pyx_n_u_frm __pyx_string_tab[186]
#define __pyx_n_u_from_file __pyx_string_tab[187]
#define __pyx_n_u_from_iterable __pyx_string_tab[188]
#define __pyx_n_u_from_matrix __pyx_string_tab[189]
#define __pyx_n_u_func __pyx_string_tab[190]
#define __pyx_n_u_gen_identity __pyx_string_tab[191]
#define __pyx_n_u_get_max_exp __pyx_string_tab[192]
#define __pyx_n_u_groups __pyx_string_tab[193]
#define __pyx_n_u_i __pyx_string_tab[194]
#define __pyx_n_u_id __pyx_string_tab[195]
#define __pyx_n_u_identity __pyx_string_tab[196]
#define __pyx_n_u_indices __pyx_string_tab[197]
#define __pyx_n_u_int_type __pyx_string_tab[198]
#define __pyx_n_u_intrel __pyx_string_tab[199]
#define __pyx_n_u_is_coroutine __pyx_string_tab[200]
#define __pyx_n_u_is_empty __pyx_string_tab[201]
#define __pyx_n_u_is_zero __pyx_string_tab[202]
#define __pyx_n_u_it __pyx_string_tab[203]
#define __pyx_n_u_items __pyx_string_tab[204]
#define __pyx_n_u_j __pyx_string_tab[205]
#define __pyx_n_u_k __pyx_string_tab[206]
#define __pyx_n_u_kwds __pyx_string_tab[207]
#define __pyx_n_u_l __pyx_string_tab[208]
#define __pyx_n_u_last __pyx_string_tab[209]
#define __pyx_n_u_len __pyx_string_tab[210]
#define __pyx_n_u_line __pyx_string_tab[211]
#define __pyx_n_u_log10 __pyx_string_tab[212]
#define __pyx_n_u_long __pyx_string_tab[213]
#define __pyx_n_u_m __pyx_string_tab[214]
#define __pyx_n_u_m_2 __pyx_string_tab[215]
#define __pyx_n_u_main __pyx_string_tab[216]
#define __pyx_n_u_map __pyx_string_tab[217]
#define __pyx_n_u_match __pyx_string_tab[218]
#define __pyx_n_u_math __pyx_string_tab[219]
#define __pyx_n_u_middle __pyx_string_tab[220]
#define __pyx_n_u_mod __pyx_string_tab[221]
#define __pyx_n_u_module __pyx_string_tab[222]
#define __pyx_n_u_mpz __pyx_string_tab[223]
#define __pyx_n_u_msg __pyx_string_tab[224]
#define __pyx_n_u_multiply_left __pyx_string_tab[225]
#define __pyx_n_u_n __pyx_string_tab[226]
#define __pyx_n_u_n_valid_rows __pyx_string_tab[227]
#define __pyx_n_u_name __pyx_string_tab[228]
#define __pyx_n_u_ncols __pyx_string_tab[229]
#define __pyx_n_u_next __pyx_string_tab[230]
#define __pyx_n_u_norm __pyx_string_tab[231]
#define __pyx_n_u_nrows __pyx_string_tab[232]
#define __pyx_n_u_ntrulike __pyx_string_tab[233]
#define __pyx_n_u_ntrulike2 __pyx_string_tab[234]
#define __pyx_n_u_open __pyx_string_tab[235]
#define __pyx_n_u_pop __pyx_string_tab[236]
#define __pyx_n_u_pyx_vtable __pyx_string_tab[237]
#define __pyx_n_u_q __pyx_string_tab[238]
#define __pyx_n_u_q2 __pyx_string_tab[239]
#define __pyx_n_u_q_2 __pyx_string_tab[240]
#define __pyx_n_u_qary __pyx_string_tab[241]
#define __pyx_n_u_qualname __pyx_string_tab[242]
#define __pyx_n_u_r __pyx_string_tab[243]
#define __pyx_n_u_r1 __pyx_string_tab[244]
#define __pyx_n_u_r2 __pyx_string_tab[245]
#define __pyx_n_u_random __pyx_string_tab[246]
#define __pyx_n_u_randomize __pyx_string_tab[247]
#define __pyx_n_u_re __pyx_string_tab[248]
#define __pyx_n_u_readlines __pyx_string_tab[249]
#define __pyx_n_u_reduce __pyx_string_tab[250]
#define __pyx_n_u_resize __pyx_string_tab[251]
#define __pyx_n_u_rotate __pyx_string_tab[252]
#define __pyx_n_u_rotate_gram_left __pyx_string_tab[253]
#define __pyx_n_u_rotate_gram_right __pyx_string_tab[254]
#define __pyx_n_u_rotate_left __pyx_string_tab[255]
#define __pyx_n_u_rotate_right __pyx_string_tab[256]
#define __pyx_n_u_row __pyx_string_tab[257]
#define __pyx_n_u_rows __pyx_string_tab[258]
#define __pyx_n_u_self __pyx_string_tab[259]
#define __pyx_n_u_set_cols __pyx_string_tab[260]
#define __pyx_n_u_set_iterable __pyx_string_tab[261]
#define __pyx_n_u_set_matrix __pyx_string_tab[262]
#define __pyx_n_u_set_name __pyx_string_tab[263]
#define __pyx_n_u_set_rows __pyx_string_tab[264]
#define __pyx_n_u_setdefault __pyx_string_tab[265]
#define __pyx_n_u_simdioph __pyx_string_tab[266]
#define __pyx_n_u_size_nz __pyx_string_tab[267]
#define __pyx_n_u_split __pyx_string_tab[268]
#define __pyx_n_u_sqrt __pyx_string_tab[269]
#define __pyx_n_u_start __pyx_string_tab[270]
#define __pyx_n_u_start_col __pyx_string_tab[271]
#define __pyx_n_u_start_row __pyx_string_tab[272]
#define __pyx_n_u_stop_col __pyx_string_tab[273]
#define __pyx_n_u_stop_row __pyx_string_tab[274]
#define __pyx_n_u_strip __pyx_string_tab[275]
#define __pyx_n_u_submatrix __pyx_string_tab[276]
#define __pyx_n_u_swap_rows __pyx_string_tab[277]
#define __pyx_n_u_t1 __pyx_string_tab[278]
#define __pyx_n_u_t2 __pyx_string_tab[279]
#define __pyx_n_u_t_long __pyx_string_tab[280]
#define __pyx_n_u_t_mpz __pyx_string_tab[281]
#define __pyx_n_u_test __pyx_string_tab[282]
#define __pyx_n_u_tmp __pyx_string_tab[283]
#define __pyx_n_u_tmp_l __pyx_string_tab[284]
#define __pyx_n_u_tmp_mpz __pyx_string_tab[285]
#define __pyx_n_u_to_matrix __pyx_string_tab[286]
#define __pyx_n_u_transpose __pyx_string_tab[287]
#define __pyx_n_u_trg __pyx_string_tab[288]
#define __pyx_n_u_type __pyx_string_tab[289]
#define __pyx_n_u_uniform __pyx_string_tab[290]
#define __pyx_n_u_unpickle_IntegerMatrix __pyx_string_tab[291]
#define __pyx_n_u_v __pyx_string_tab[292]
#define __pyx_n_u_values __pyx_string_tab[293]
#define __pyx_n_u_x __pyx_string_tab[294]
#define __pyx_n_u_x_l __pyx_string_tab[295]
#define __pyx_n_u_x_mpz __pyx_string_tab[296]
#define __pyx_kp_b_PyObject_PyObject_int_int_int_in __pyx_string_tab[297]
#define __pyx_kp_b_PyObject_mpz_srcptr_int___mpz_st __pyx_string_tab[298]
#define __pyx_kp_b_PyObject_mpz_srcptr_mpz_get_pyin __pyx_string_tab[299]
#define __pyx_kp_b_cysigs_t_cysigs __pyx_string_tab[300]
#define __pyx_kp_b_iso88591_11BBSSddeJ_k_WD_G1_Zt7_AS_G2Qa __pyx_string_tab[301]
#define __pyx_kp_b_iso88591_A6_4wc_fE_PQ_1_V6_PQ_a_B_4q __pyx_string_tab[302]
#define __pyx_kp_b_iso88591_A6_T_T_T_E_aq_U_1_E_S_AQ __pyx_string_tab[303]
#define __pyx_kp_b_iso88591_A8_T_T_U_1_E_aq_Qc_AQc_U_1_E_aq __pyx_string_tab[304]
#define __pyx_kp_b_iso88591_A_4r_1_4r_t1Bat5_7_Q_4r_uARq_E_a __pyx_string_tab[305]
#define __pyx_kp_b_iso88591_A_4wc_4r_t6_fA_1_4r_d_fA_a_B_4q __pyx_string_tab[306]
#define __pyx_kp_b_iso88591_A_4wc_4vU_1A_1_fF_1A_a_B_4q __pyx_string_tab[307]
#define __pyx_kp_b_iso88591_A_4wc_4vU_A_1_fF_A_a_B_4q_q __pyx_string_tab[308]
#define __pyx_kp_b_iso88591_A_4wc_fE9J_7RXXY_1_V69J_7RXXY_a __pyx_string_tab[309]
#define __pyx_kp_b_iso88591_A_4wc_fE9K1GSYYZ_1_V69K1GSYYZ_a __pyx_string_tab[310]
#define __pyx_kp_b_iso88591_A_4wc_fE_1D_1_V6_1D_a_B_4q __pyx_string_tab[311]
#define __pyx_kp_b_iso88591_A_4wc_fE_Q_1_V6_Q_a_B_4q __pyx_string_tab[312]
#define __pyx_kp_b_iso88591_A_4wc_fE_QgQ_1_V6_QgQ_a_B_4q __pyx_string_tab[313]
#define __pyx_kp_b_iso88591_A_4wc_fE_awa_1_V6_awa_a_B_4q __pyx_string_tab[314]
#define __pyx_kp_b_iso88591_A_4wc_fE_q_1_V6_q_a_B_4q __pyx_string_tab[315]
#define __pyx_kp_b_iso88591_A_4wc_fE_q_1_V6_q_a_B_4q_2 __pyx_string_tab[316]
#define __pyx_kp_b_iso88591_A_AT_D_t9TXXY_E_at7_U_4wa_as_T_a __pyx_string_tab[317]
#define __pyx_kp_b_iso88591_A_A_4wc_U_4wa_E_at7_WAS_2_4vT_AR __pyx_string_tab[318]
#define __pyx_kp_b_iso88591_A_B_S_Qc_3iq_s_Qc_IQ_s_Qc_IQ_s_Q __pyx_string_tab[319]
#define __pyx_kp_b_iso88591_A_Cq_5_HA_89ARz_r_q_31_5_1_t7_AQ __pyx_string_tab[320]
#define __pyx_kp_b_iso88591_A_Cq_y_aq_q __pyx_string_tab[321]
#define __pyx_kp_b_iso88591_A_M_aq_q __pyx_string_tab[322]
#define __pyx_kp_b_iso88591_A_S_3at1A_t7_Q_F_k_WCq_F_1_l_Fat __pyx_string_tab[323]
#define __pyx_kp_b_iso88591_A_T_T_U_1_E_aq_Qc_d_q_1_U_1_E_aq __pyx_string_tab[324]
#define __pyx_kp_b_iso88591_A_a __pyx_string_tab[325]
#define __pyx_kp_b_iso88591_A_a_6_A_was_A_1A_j_t_81A_E_AQ_6 __pyx_string_tab[326]
#define __pyx_kp_b_iso88591_A_awgS __pyx_string_tab[327]
#define __pyx_kp_b_iso88591_Q_ARq_G1_E_as_1_U_4wa_AT_auAS_u __pyx_string_tab[328]
#define __pyx_kp_b_iso88591_Q_D_c_2Qhd_q_E_aq_U_1A_auAS_E_1 __pyx_string_tab[329]
#define __pyx_kp_b_iso88591_T_Q_Q_2S_T_3a_AQ_q_AQ_q_j_Qa_Qa __pyx_string_tab[330]
#define __pyx_kp_b_iso88591_a_4r_1_4q_BfD_1D_XQa_7_Q_4q_BfE __pyx_string_tab[331]
#define __pyx_kp_b_iso88591_a_6_Q_D_4wc_d_q_1_e_a_B_4q __pyx_string_tab[332]
#define __pyx_kp_b_iso88591_q_4r_1_1HA_ARq_E_Qar_t1Baq_xW_7 __pyx_string_tab[333]
#define __pyx_kp_b_void_char_const_int_void_int_voi __pyx_string_tab[334]
#define __pyx_int_0 __pyx_number_tab[0]
#define __pyx_int_neg_1 __pyx_number_tab[1]
#define __pyx_int_1 __pyx_number_tab[2]
#define __pyx_int_2 __pyx_number_tab[3]
/* #### Code section: module_state_clear ### */
#if CYTHON_USE_MODULE_STATE
static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) {
  __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m);
  if (!clear_module_state) return 0;
  Py_CLEAR(clear_module_state->__pyx_d);
  Py_CLEAR(clear_module_state->__pyx_b);
  Py_CLEAR(clear_module_state->__pyx_cython_runtime);
  Py_CLEAR(clear_module_state->__pyx_empty_tuple);
  Py_CLEAR(clear_module_state->__pyx_empty_bytes);
  Py_CLEAR(clear_module_state->__pyx_empty_unicode);
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __Pyx_State_RemoveModule(NULL);
  #endif
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4bool_bool);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_7complex_complex);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_11longintrepr_py_long);
  Py_CLEAR(clear_module_state->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix);
  Py_CLEAR(clear_module_state->__pyx_type_6fpylll_5fplll_14integer_matrix_IntegerMatrix);
  Py_CLEAR(clear_module_state->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow);
  Py_CLEAR(clear_module_state->__pyx_type_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow);
  for (int i=0; i<8; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); }
  for (int i=0; i<34; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); }
  for (int i=0; i<335; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); }
  for (int i=0; i<4; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); }
/* #### Code section: module_state_clear_contents ### */
/* CommonTypesMetaclass.module_state_clear */
Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType);

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

/* #### Code section: module_state_clear_end ### */
return 0;
}
#endif
/* #### Code section: module_state_traverse ### */
#if CYTHON_USE_MODULE_STATE
static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
  __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m);
  if (!traverse_module_state) return 0;
  Py_VISIT(traverse_module_state->__pyx_d);
  Py_VISIT(traverse_module_state->__pyx_b);
  Py_VISIT(traverse_module_state->__pyx_cython_runtime);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4bool_bool);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_7complex_complex);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_11longintrepr_py_long);
  Py_VISIT(traverse_module_state->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix);
  Py_VISIT(traverse_module_state->__pyx_type_6fpylll_5fplll_14integer_matrix_IntegerMatrix);
  Py_VISIT(traverse_module_state->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow);
  Py_VISIT(traverse_module_state->__pyx_type_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow);
  for (int i=0; i<8; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); }
  for (int i=0; i<34; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); }
  for (int i=0; i<335; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); }
  for (int i=0; i<4; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); }
/* #### Code section: module_state_traverse_contents ### */
/* CommonTypesMetaclass.module_state_traverse */
Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* "cysignals/signals.pxd":62
 * # (PyErr_Occurred() is non-NULL). To Cython, it will look like
 * # cython_check_exception() actually raised the exception.
 * cdef inline void cython_check_exception() except * nogil:             # <<<<<<<<<<<<<<
 *     pass
 * 
*/

static CYTHON_INLINE void __pyx_f_9cysignals_7signals_cython_check_exception(void) {

  /* function exit code */
}

/* "cysignals/signals.pxd":68
 * cdef void verify_exc_value() noexcept
 * 
 * cdef inline PyObject* sig_occurred() noexcept:             # <<<<<<<<<<<<<<
 *     """
 *     Borrowed reference to the exception which is currently being
*/

static CYTHON_INLINE PyObject *__pyx_f_9cysignals_7signals_sig_occurred(void) {
  PyObject *__pyx_r;
  int __pyx_t_1;

  /* "cysignals/signals.pxd":82
 *     exception is stored somewhere.
 *     """
 *     if unlikely(cysigs.exc_value is not NULL):             # <<<<<<<<<<<<<<
 *         verify_exc_value()
 *     return cysigs.exc_value
*/
  __pyx_t_1 = (unlikely((cysigs.exc_value != NULL)) != 0);
  if (__pyx_t_1) {

    /* "cysignals/signals.pxd":83
 *     """
 *     if unlikely(cysigs.exc_value is not NULL):
 *         verify_exc_value()             # <<<<<<<<<<<<<<
 *     return cysigs.exc_value
 * 
*/
    __pyx_f_9cysignals_7signals_verify_exc_value();

    /* "cysignals/signals.pxd":82
 *     exception is stored somewhere.
 *     """
 *     if unlikely(cysigs.exc_value is not NULL):             # <<<<<<<<<<<<<<
 *         verify_exc_value()
 *     return cysigs.exc_value
*/
  }

  /* "cysignals/signals.pxd":84
 *     if unlikely(cysigs.exc_value is not NULL):
 *         verify_exc_value()
 *     return cysigs.exc_value             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = cysigs.exc_value;
  goto __pyx_L0;

  /* "cysignals/signals.pxd":68
 * cdef void verify_exc_value() noexcept
 * 
 * cdef inline PyObject* sig_occurred() noexcept:             # <<<<<<<<<<<<<<
 *     """
 *     Borrowed reference to the exception which is currently being
*/

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

/* "cysignals/signals.pxd":99
 * 
 * 
 * cdef inline void __generate_declarations() noexcept:             # <<<<<<<<<<<<<<
 *     cysigs
 *     _sig_on_interrupt_received
*/

static CYTHON_INLINE void __pyx_f_9cysignals_7signals___generate_declarations(void) {

  /* "cysignals/signals.pxd":100
 * 
 * cdef inline void __generate_declarations() noexcept:
 *     cysigs             # <<<<<<<<<<<<<<
 *     _sig_on_interrupt_received
 *     _sig_on_recover
*/
  (void)(cysigs);

  /* "cysignals/signals.pxd":101
 * cdef inline void __generate_declarations() noexcept:
 *     cysigs
 *     _sig_on_interrupt_received             # <<<<<<<<<<<<<<
 *     _sig_on_recover
 *     _do_raise_exception
*/
  (void)(_sig_on_interrupt_received);

  /* "cysignals/signals.pxd":102
 *     cysigs
 *     _sig_on_interrupt_received
 *     _sig_on_recover             # <<<<<<<<<<<<<<
 *     _do_raise_exception
 *     _sig_off_warning
*/
  (void)(_sig_on_recover);

  /* "cysignals/signals.pxd":103
 *     _sig_on_interrupt_received
 *     _sig_on_recover
 *     _do_raise_exception             # <<<<<<<<<<<<<<
 *     _sig_off_warning
 *     print_backtrace
*/
  (void)(_do_raise_exception);

  /* "cysignals/signals.pxd":104
 *     _sig_on_recover
 *     _do_raise_exception
 *     _sig_off_warning             # <<<<<<<<<<<<<<
 *     print_backtrace
*/
  (void)(_sig_off_warning);

  /* "cysignals/signals.pxd":105
 *     _do_raise_exception
 *     _sig_off_warning
 *     print_backtrace             # <<<<<<<<<<<<<<
*/
  (void)(print_backtrace);

  /* "cysignals/signals.pxd":99
 * 
 * 
 * cdef inline void __generate_declarations() noexcept:             # <<<<<<<<<<<<<<
 *     cysigs
 *     _sig_on_interrupt_received
*/

  /* function exit code */
}

/* "fpylll/fplll/integer_matrix.pyx":31
 *     A reference to a row in an integer matrix.
 *     """
 *     def __init__(self, IntegerMatrix M, int row):             # <<<<<<<<<<<<<<
 *         """Create a row reference.
 * 
*/

/* Python wrapper */
static int __pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
PyDoc_STRVAR(__pyx_doc_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow___init__, "Create a row reference.\n\n        :param IntegerMatrix M: Integer matrix\n        :param int row: row index\n\n        Row references are immutable::\n\n            >>> from fpylll import IntegerMatrix\n            >>> A = IntegerMatrix(2, 3)\n            >>> A[0,0] = 1; A[0,1] = 2; A[0,2] = 3\n            >>> r = A[0]\n            >>> r[0]\n            1\n            >>> r[0] = 1\n            Traceback (most recent call last):\n            ...\n            TypeError: 'fpylll.fplll.integer_matrix.IntegerMatrixRow' object does not support item assignment\n\n        ");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow___init__;
#endif
static int __pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_M = 0;
  int __pyx_v_row;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_M,&__pyx_mstate_global->__pyx_n_u_row,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 31, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 31, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 31, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 31, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 31, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 31, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 31, __pyx_L3_error)
    }
    __pyx_v_M = ((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)values[0]);
    __pyx_v_row = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_row == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 31, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 31, __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("fpylll.fplll.integer_matrix.IntegerMatrixRow.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_M), __pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, 1, "M", 0))) __PYX_ERR(0, 31, __pyx_L1_error)
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow___init__(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *)__pyx_v_self), __pyx_v_M, __pyx_v_row);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow___init__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *__pyx_v_self, struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_M, int __pyx_v_row) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "fpylll/fplll/integer_matrix.pyx":51
 * 
 *         """
 *         preprocess_indices(row, row, M.nrows, M.nrows)             # <<<<<<<<<<<<<<
 *         self.row = row
 *         self.m = M
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_M), __pyx_mstate_global->__pyx_n_u_nrows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_M), __pyx_mstate_global->__pyx_n_u_nrows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __pyx_f_6fpylll_4util_preprocess_indices(__pyx_v_row, __pyx_v_row, __pyx_t_2, __pyx_t_3); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 51, __pyx_L1_error)

  /* "fpylll/fplll/integer_matrix.pyx":52
 *         """
 *         preprocess_indices(row, row, M.nrows, M.nrows)
 *         self.row = row             # <<<<<<<<<<<<<<
 *         self.m = M
 * 
*/
  __pyx_v_self->row = __pyx_v_row;

  /* "fpylll/fplll/integer_matrix.pyx":53
 *         preprocess_indices(row, row, M.nrows, M.nrows)
 *         self.row = row
 *         self.m = M             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, int column):
*/
  __Pyx_INCREF((PyObject *)__pyx_v_M);
  __Pyx_GIVEREF((PyObject *)__pyx_v_M);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->m);
  __Pyx_DECREF((PyObject *)__pyx_v_self->m);
  __pyx_v_self->m = __pyx_v_M;

  /* "fpylll/fplll/integer_matrix.pyx":31
 *     A reference to a row in an integer matrix.
 *     """
 *     def __init__(self, IntegerMatrix M, int row):             # <<<<<<<<<<<<<<
 *         """Create a row reference.
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrixRow.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":55
 *         self.m = M
 * 
 *     def __getitem__(self, int column):             # <<<<<<<<<<<<<<
 *         """Return entry at ``column``
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_3__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_column); /*proto*/
PyDoc_STRVAR(__pyx_doc_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_2__getitem__, "IntegerMatrixRow.__getitem__(self, int column)\n\nReturn entry at ``column``\n\n:param int column: integer offset");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_2__getitem__;
#endif
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_3__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_column) {
  int __pyx_v_column;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  assert(__pyx_arg_column); {
    __pyx_v_column = __Pyx_PyLong_As_int(__pyx_arg_column); if (unlikely((__pyx_v_column == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 55, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrixRow.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_2__getitem__(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *)__pyx_v_self), ((int)__pyx_v_column));

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

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_2__getitem__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *__pyx_v_self, int __pyx_v_column) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  long __pyx_t_1;
  long __pyx_t_2;
  int __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "fpylll/fplll/integer_matrix.pyx":61
 * 
 *         """
 *         preprocess_indices(column, column, self.m._ncols(), self.m._ncols())             # <<<<<<<<<<<<<<
 * 
 *         if self.m._type == ZT_MPZ:
*/
  __pyx_t_1 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->m->__pyx_vtab)->_ncols(__pyx_v_self->m); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 61, __pyx_L1_error)
  __pyx_t_2 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->m->__pyx_vtab)->_ncols(__pyx_v_self->m); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 61, __pyx_L1_error)
  __pyx_t_3 = __pyx_f_6fpylll_4util_preprocess_indices(__pyx_v_column, __pyx_v_column, __pyx_t_1, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 61, __pyx_L1_error)

  /* "fpylll/fplll/integer_matrix.pyx":63
 *         preprocess_indices(column, column, self.m._ncols(), self.m._ncols())
 * 
 *         if self.m._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             return mpz_get_python(self.m._core.mpz[0][self.row][column].get_data())
 *         elif self.m._type == ZT_LONG:
*/
  switch (__pyx_v_self->m->_type) {
    case fplll::ZT_MPZ:

    /* "fpylll/fplll/integer_matrix.pyx":64
 * 
 *         if self.m._type == ZT_MPZ:
 *             return mpz_get_python(self.m._core.mpz[0][self.row][column].get_data())             # <<<<<<<<<<<<<<
 *         elif self.m._type == ZT_LONG:
 *             return self.m._core.long[0][self.row][column].get_data()
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __pyx_f_6fpylll_2io_mpz_get_python((((__pyx_v_self->m->_core.mpz[0])[__pyx_v_self->row])[__pyx_v_column]).get_data()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 64, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":63
 *         preprocess_indices(column, column, self.m._ncols(), self.m._ncols())
 * 
 *         if self.m._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             return mpz_get_python(self.m._core.mpz[0][self.row][column].get_data())
 *         elif self.m._type == ZT_LONG:
*/
    break;
    case fplll::ZT_LONG:

    /* "fpylll/fplll/integer_matrix.pyx":66
 *             return mpz_get_python(self.m._core.mpz[0][self.row][column].get_data())
 *         elif self.m._type == ZT_LONG:
 *             return self.m._core.long[0][self.row][column].get_data()             # <<<<<<<<<<<<<<
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._m._type)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyLong_From_long((((__pyx_v_self->m->_core.__pyx_long[0])[__pyx_v_self->row])[__pyx_v_column]).get_data()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 66, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":65
 *         if self.m._type == ZT_MPZ:
 *             return mpz_get_python(self.m._core.mpz[0][self.row][column].get_data())
 *         elif self.m._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *             return self.m._core.long[0][self.row][column].get_data()
 *         else:
*/
    break;
    default:

    /* "fpylll/fplll/integer_matrix.pyx":68
 *             return self.m._core.long[0][self.row][column].get_data()
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._m._type)             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
*/
    __pyx_t_5 = NULL;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_m); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 68, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 68, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 68, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 68, __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, 68, __pyx_L1_error)
    break;
  }

  /* "fpylll/fplll/integer_matrix.pyx":55
 *         self.m = M
 * 
 *     def __getitem__(self, int column):             # <<<<<<<<<<<<<<
 *         """Return entry at ``column``
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrixRow.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":70
 *             raise RuntimeError("Integer type '%s' not understood."%self._m._type)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         """
 *         String representation of this row.
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_5__str__(PyObject *__pyx_v_self); /*proto*/
PyDoc_STRVAR(__pyx_doc_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_4__str__, "IntegerMatrixRow.__str__(self)\n\nString representation of this row.\n\nExample::\n\n    >>> from fpylll import IntegerMatrix\n    >>> A = IntegerMatrix(2, 3)\n    >>> A[0,0] = 1; A[0,1] = 2; A[0,2] = 3\n    >>> print(str(A[0]))\n    (1, 2, 3)");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_4__str__;
#endif
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_5__str__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_4__str__(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *)__pyx_v_self));

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

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_4__str__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *__pyx_v_self) {
  int __pyx_v_i;
  PyObject *__pyx_v_r = NULL;
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  long __pyx_t_2;
  long __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "fpylll/fplll/integer_matrix.pyx":84
 *         """
 *         cdef int i
 *         r = []             # <<<<<<<<<<<<<<
 *         for i in range(self.m._ncols()):
 *             t = self.m._get(self.row, i)
*/
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":85
 *         cdef int i
 *         r = []
 *         for i in range(self.m._ncols()):             # <<<<<<<<<<<<<<
 *             t = self.m._get(self.row, i)
 *             r.append(str(t))
*/
  __pyx_t_2 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->m->__pyx_vtab)->_ncols(__pyx_v_self->m); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 85, __pyx_L1_error)
  __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;

    /* "fpylll/fplll/integer_matrix.pyx":86
 *         r = []
 *         for i in range(self.m._ncols()):
 *             t = self.m._get(self.row, i)             # <<<<<<<<<<<<<<
 *             r.append(str(t))
 *         return "(" + ", ".join(r) + ")"
*/
    __pyx_t_1 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->m->__pyx_vtab)->_get(__pyx_v_self->m, __pyx_v_self->row, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 86, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "fpylll/fplll/integer_matrix.pyx":87
 *         for i in range(self.m._ncols()):
 *             t = self.m._get(self.row, i)
 *             r.append(str(t))             # <<<<<<<<<<<<<<
 *         return "(" + ", ".join(r) + ")"
 * 
*/
    __pyx_t_1 = __Pyx_PyObject_Unicode(__pyx_v_t); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 87, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_r, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 87, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "fpylll/fplll/integer_matrix.pyx":88
 *             t = self.m._get(self.row, i)
 *             r.append(str(t))
 *         return "(" + ", ".join(r) + ")"             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyUnicode_Join(__pyx_mstate_global->__pyx_kp_u__2, __pyx_v_r); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_6, __pyx_mstate_global->__pyx_kp_u__3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "fpylll/fplll/integer_matrix.pyx":70
 *             raise RuntimeError("Integer type '%s' not understood."%self._m._type)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         """
 *         String representation of this row.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrixRow.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_r);
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":90
 *         return "(" + ", ".join(r) + ")"
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Example::
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_7__repr__(PyObject *__pyx_v_self); /*proto*/
PyDoc_STRVAR(__pyx_doc_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_6__repr__, "IntegerMatrixRow.__repr__(self)\n\nExample::\n\n    >>> from fpylll import IntegerMatrix\n    >>> A = IntegerMatrix(2, 3)\n    >>> A[0,0] = 1; A[0,1] = 2; A[0,2] = 3\n    >>> print(repr(A[0]))  # doctest: +ELLIPSIS\n    row 0 of <IntegerMatrix(2, 3) at 0x...>");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_6__repr__;
#endif
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_7__repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_6__repr__(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *)__pyx_v_self));

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

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_6__repr__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3[4];
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "fpylll/fplll/integer_matrix.pyx":101
 * 
 *         """
 *         return "row %d of %r"%(self.row, self.m)             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyUnicode_From_int(__pyx_v_self->row, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(((PyObject *)__pyx_v_self->m)), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3[0] = __pyx_mstate_global->__pyx_kp_u_row_2;
  __pyx_t_3[1] = __pyx_t_1;
  __pyx_t_3[2] = __pyx_mstate_global->__pyx_kp_u_of;
  __pyx_t_3[3] = __pyx_t_2;
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_3, 4, 4 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2));
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "fpylll/fplll/integer_matrix.pyx":90
 *         return "(" + ", ".join(r) + ")"
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Example::
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrixRow.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":103
 *         return "row %d of %r"%(self.row, self.m)
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Make sure attempts at pickling raise an error until proper pickling is implemented.
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_9__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_8__reduce__, "IntegerMatrixRow.__reduce__(self)\n\nMake sure attempts at pickling raise an error until proper pickling is implemented.");
static PyMethodDef __pyx_mdef_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_9__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_9__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_8__reduce__};
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_9__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_8__reduce__(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *)__pyx_v_self));

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

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_8__reduce__(CYTHON_UNUSED struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce__", 0);

  /* "fpylll/fplll/integer_matrix.pyx":107
 *         Make sure attempts at pickling raise an error until proper pickling is implemented.
 *         """
 *         raise NotImplementedError             # <<<<<<<<<<<<<<
 * 
 *     def __abs__(self):
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0);
  __PYX_ERR(0, 107, __pyx_L1_error)

  /* "fpylll/fplll/integer_matrix.pyx":103
 *         return "row %d of %r"%(self.row, self.m)
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Make sure attempts at pickling raise an error until proper pickling is implemented.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrixRow.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":109
 *         raise NotImplementedError
 * 
 *     def __abs__(self):             # <<<<<<<<<<<<<<
 *         """Return _2 norm of this vector.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_11__abs__(PyObject *__pyx_v_self); /*proto*/
PyDoc_STRVAR(__pyx_doc_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_10__abs__, "IntegerMatrixRow.__abs__(self)\n\nReturn \342\204\223_2 norm of this vector.\n\nExample::\n\n    >>> A = IntegerMatrix.from_iterable(1, 3, [1,2,3])\n    >>> A[0].norm()  # doctest: +ELLIPSIS\n    3.74165...\n    >>> 1*1 + 2*2 + 3*3\n    14\n    >>> from math import sqrt\n    >>> sqrt(14)  # doctest: +ELLIPSIS\n    3.74165...");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_10__abs__;
#endif
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_11__abs__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__abs__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_10__abs__(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *)__pyx_v_self));

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

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_10__abs__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *__pyx_v_self) {
  fplll::Z_NR<mpz_t>  __pyx_v_t_mpz;
  fplll::Z_NR<long>  __pyx_v_t_l;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__abs__", 0);

  /* "fpylll/fplll/integer_matrix.pyx":128
 * 
 *         # TODO: don't just use doubles
 *         if self.m._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             self.m._core.mpz[0][self.row].dot_product(t_mpz, self.m._core.mpz[0][self.row])
 *             return sqrt(t_mpz.get_d())
*/
  switch (__pyx_v_self->m->_type) {
    case fplll::ZT_MPZ:

    /* "fpylll/fplll/integer_matrix.pyx":129
 *         # TODO: don't just use doubles
 *         if self.m._type == ZT_MPZ:
 *             self.m._core.mpz[0][self.row].dot_product(t_mpz, self.m._core.mpz[0][self.row])             # <<<<<<<<<<<<<<
 *             return sqrt(t_mpz.get_d())
 *         elif self.m._type == ZT_LONG:
*/
    ((__pyx_v_self->m->_core.mpz[0])[__pyx_v_self->row]).dot_product(__pyx_v_t_mpz, ((__pyx_v_self->m->_core.mpz[0])[__pyx_v_self->row]));

    /* "fpylll/fplll/integer_matrix.pyx":130
 *         if self.m._type == ZT_MPZ:
 *             self.m._core.mpz[0][self.row].dot_product(t_mpz, self.m._core.mpz[0][self.row])
 *             return sqrt(t_mpz.get_d())             # <<<<<<<<<<<<<<
 *         elif self.m._type == ZT_LONG:
 *             self.m._core.long[0][self.row].dot_product(t_l, self.m._core.long[0][self.row])
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sqrt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyFloat_FromDouble(__pyx_v_t_mpz.get_d()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":128
 * 
 *         # TODO: don't just use doubles
 *         if self.m._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             self.m._core.mpz[0][self.row].dot_product(t_mpz, self.m._core.mpz[0][self.row])
 *             return sqrt(t_mpz.get_d())
*/
    break;
    case fplll::ZT_LONG:

    /* "fpylll/fplll/integer_matrix.pyx":132
 *             return sqrt(t_mpz.get_d())
 *         elif self.m._type == ZT_LONG:
 *             self.m._core.long[0][self.row].dot_product(t_l, self.m._core.long[0][self.row])             # <<<<<<<<<<<<<<
 *             return sqrt(t_l.get_d())
 *         else:
*/
    ((__pyx_v_self->m->_core.__pyx_long[0])[__pyx_v_self->row]).dot_product(__pyx_v_t_l, ((__pyx_v_self->m->_core.__pyx_long[0])[__pyx_v_self->row]));

    /* "fpylll/fplll/integer_matrix.pyx":133
 *         elif self.m._type == ZT_LONG:
 *             self.m._core.long[0][self.row].dot_product(t_l, self.m._core.long[0][self.row])
 *             return sqrt(t_l.get_d())             # <<<<<<<<<<<<<<
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._m._type)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_sqrt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = PyFloat_FromDouble(__pyx_v_t_l.get_d()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":131
 *             self.m._core.mpz[0][self.row].dot_product(t_mpz, self.m._core.mpz[0][self.row])
 *             return sqrt(t_mpz.get_d())
 *         elif self.m._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *             self.m._core.long[0][self.row].dot_product(t_l, self.m._core.long[0][self.row])
 *             return sqrt(t_l.get_d())
*/
    break;
    default:

    /* "fpylll/fplll/integer_matrix.pyx":135
 *             return sqrt(t_l.get_d())
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._m._type)             # <<<<<<<<<<<<<<
 * 
 *     norm = __abs__
*/
    __pyx_t_4 = NULL;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_m); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 135, __pyx_L1_error)
    break;
  }

  /* "fpylll/fplll/integer_matrix.pyx":109
 *         raise NotImplementedError
 * 
 *     def __abs__(self):             # <<<<<<<<<<<<<<
 *         """Return _2 norm of this vector.
 * 
*/

  /* function exit code */
  __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("fpylll.fplll.integer_matrix.IntegerMatrixRow.__abs__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":139
 *     norm = __abs__
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return vector length.
*/

/* Python wrapper */
static Py_ssize_t __pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_13__len__(PyObject *__pyx_v_self); /*proto*/
PyDoc_STRVAR(__pyx_doc_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_12__len__, "IntegerMatrixRow.__len__(self)\n\nReturn vector length.\n\nExample::\n\n    >>> A = IntegerMatrix.from_matrix([[1,2],[3,4]], 2, 2)\n    >>> len(A[0])\n    2");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_12__len__;
#endif
static Py_ssize_t __pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_13__len__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_12__len__(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *)__pyx_v_self));

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

static Py_ssize_t __pyx_pf_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_12__len__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *__pyx_v_self) {
  Py_ssize_t __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("__len__", 0);

  /* "fpylll/fplll/integer_matrix.pyx":150
 * 
 *         """
 *         if self.m._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             return self.m._core.mpz[0][self.row].size()
 *         elif self.m._type == ZT_LONG:
*/
  switch (__pyx_v_self->m->_type) {
    case fplll::ZT_MPZ:

    /* "fpylll/fplll/integer_matrix.pyx":151
 *         """
 *         if self.m._type == ZT_MPZ:
 *             return self.m._core.mpz[0][self.row].size()             # <<<<<<<<<<<<<<
 *         elif self.m._type == ZT_LONG:
 *             return self.m._core.long[0][self.row].size()
*/
    __pyx_r = ((__pyx_v_self->m->_core.mpz[0])[__pyx_v_self->row]).size();
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":150
 * 
 *         """
 *         if self.m._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             return self.m._core.mpz[0][self.row].size()
 *         elif self.m._type == ZT_LONG:
*/
    break;
    case fplll::ZT_LONG:

    /* "fpylll/fplll/integer_matrix.pyx":153
 *             return self.m._core.mpz[0][self.row].size()
 *         elif self.m._type == ZT_LONG:
 *             return self.m._core.long[0][self.row].size()             # <<<<<<<<<<<<<<
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self.m._type)
*/
    __pyx_r = ((__pyx_v_self->m->_core.__pyx_long[0])[__pyx_v_self->row]).size();
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":152
 *         if self.m._type == ZT_MPZ:
 *             return self.m._core.mpz[0][self.row].size()
 *         elif self.m._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *             return self.m._core.long[0][self.row].size()
 *         else:
*/
    break;
    default:

    /* "fpylll/fplll/integer_matrix.pyx":155
 *             return self.m._core.long[0][self.row].size()
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self.m._type)             # <<<<<<<<<<<<<<
 * 
 *     def is_zero(self, int frm=0):
*/
    __pyx_t_2 = NULL;
    __pyx_t_3 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->m->_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 155, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 155, __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_RuntimeError)), __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(0, 155, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 155, __pyx_L1_error)
    break;
  }

  /* "fpylll/fplll/integer_matrix.pyx":139
 *     norm = __abs__
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return vector length.
*/

  /* function exit code */
  __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("fpylll.fplll.integer_matrix.IntegerMatrixRow.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":157
 *             raise RuntimeError("Integer type '%s' not understood."%self.m._type)
 * 
 *     def is_zero(self, int frm=0):             # <<<<<<<<<<<<<<
 *         """
 *         Return ``True`` if this vector consists of only zeros starting at index ``frm``
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_15is_zero(PyObject *__pyx_v_self, 
#if 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_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_14is_zero, "IntegerMatrixRow.is_zero(self, int frm=0)\n\nReturn ``True`` if this vector consists of only zeros starting at index ``frm``\n\nExample::\n\n    >>> A = IntegerMatrix.from_matrix([[1,0,0]])\n    >>> A[0].is_zero()\n    False\n    >>> A[0].is_zero(1)\n    True");
static PyMethodDef __pyx_mdef_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_15is_zero = {"is_zero", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_15is_zero, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_14is_zero};
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_15is_zero(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_frm;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_zero (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_frm,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, 157, __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, 157, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_zero", 0) < (0)) __PYX_ERR(0, 157, __pyx_L3_error)
    } else {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 157, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_frm = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_frm == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 157, __pyx_L3_error)
    } else {
      __pyx_v_frm = ((int)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_zero", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 157, __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("fpylll.fplll.integer_matrix.IntegerMatrixRow.is_zero", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_14is_zero(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *)__pyx_v_self), __pyx_v_frm);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_14is_zero(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *__pyx_v_self, int __pyx_v_frm) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_zero", 0);

  /* "fpylll/fplll/integer_matrix.pyx":170
 * 
 *         """
 *         if self.m._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             return bool(self.m._core.mpz[0][self.row].is_zero(frm))
 *         elif self.m._type == ZT_LONG:
*/
  switch (__pyx_v_self->m->_type) {
    case fplll::ZT_MPZ:

    /* "fpylll/fplll/integer_matrix.pyx":171
 *         """
 *         if self.m._type == ZT_MPZ:
 *             return bool(self.m._core.mpz[0][self.row].is_zero(frm))             # <<<<<<<<<<<<<<
 *         elif self.m._type == ZT_LONG:
 *             return bool(self.m._core.long[0][self.row].is_zero(frm))
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(((__pyx_v_self->m->_core.mpz[0])[__pyx_v_self->row]).is_zero(__pyx_v_frm) != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":170
 * 
 *         """
 *         if self.m._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             return bool(self.m._core.mpz[0][self.row].is_zero(frm))
 *         elif self.m._type == ZT_LONG:
*/
    break;
    case fplll::ZT_LONG:

    /* "fpylll/fplll/integer_matrix.pyx":173
 *             return bool(self.m._core.mpz[0][self.row].is_zero(frm))
 *         elif self.m._type == ZT_LONG:
 *             return bool(self.m._core.long[0][self.row].is_zero(frm))             # <<<<<<<<<<<<<<
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self.m._type)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(((__pyx_v_self->m->_core.__pyx_long[0])[__pyx_v_self->row]).is_zero(__pyx_v_frm) != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":172
 *         if self.m._type == ZT_MPZ:
 *             return bool(self.m._core.mpz[0][self.row].is_zero(frm))
 *         elif self.m._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *             return bool(self.m._core.long[0][self.row].is_zero(frm))
 *         else:
*/
    break;
    default:

    /* "fpylll/fplll/integer_matrix.pyx":175
 *             return bool(self.m._core.long[0][self.row].is_zero(frm))
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self.m._type)             # <<<<<<<<<<<<<<
 * 
 *     def size_nz(self):
*/
    __pyx_t_2 = NULL;
    __pyx_t_3 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->m->_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 175, __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_RuntimeError)), __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(0, 175, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 175, __pyx_L1_error)
    break;
  }

  /* "fpylll/fplll/integer_matrix.pyx":157
 *             raise RuntimeError("Integer type '%s' not understood."%self.m._type)
 * 
 *     def is_zero(self, int frm=0):             # <<<<<<<<<<<<<<
 *         """
 *         Return ``True`` if this vector consists of only zeros starting at index ``frm``
*/

  /* function exit code */
  __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("fpylll.fplll.integer_matrix.IntegerMatrixRow.is_zero", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":177
 *             raise RuntimeError("Integer type '%s' not understood."%self.m._type)
 * 
 *     def size_nz(self):             # <<<<<<<<<<<<<<
 *         """
 *         Index at which an all zero vector starts.
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_17size_nz(PyObject *__pyx_v_self, 
#if 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_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_16size_nz, "IntegerMatrixRow.size_nz(self)\n\nIndex at which an all zero vector starts.\n\nExample::\n\n    >>> A = IntegerMatrix.from_matrix([[0,2,3],[0,2,0],[0,0,0]])\n    >>> A[0].size_nz()\n    3\n    >>> A[1].size_nz()\n    2\n    >>> A[2].size_nz()\n    0");
static PyMethodDef __pyx_mdef_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_17size_nz = {"size_nz", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_17size_nz, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_16size_nz};
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_17size_nz(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("size_nz (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("size_nz", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("size_nz", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_16size_nz(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *)__pyx_v_self));

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

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_16size_nz(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("size_nz", 0);

  /* "fpylll/fplll/integer_matrix.pyx":193
 *         """
 * 
 *         if self.m._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             return self.m._core.mpz[0][self.row].size_nz()
 *         elif self.m._type == ZT_LONG:
*/
  switch (__pyx_v_self->m->_type) {
    case fplll::ZT_MPZ:

    /* "fpylll/fplll/integer_matrix.pyx":194
 * 
 *         if self.m._type == ZT_MPZ:
 *             return self.m._core.mpz[0][self.row].size_nz()             # <<<<<<<<<<<<<<
 *         elif self.m._type == ZT_LONG:
 *             return self.m._core.long[0][self.row].size_nz()
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyLong_From_int(((__pyx_v_self->m->_core.mpz[0])[__pyx_v_self->row]).size_nz()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":193
 *         """
 * 
 *         if self.m._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             return self.m._core.mpz[0][self.row].size_nz()
 *         elif self.m._type == ZT_LONG:
*/
    break;
    case fplll::ZT_LONG:

    /* "fpylll/fplll/integer_matrix.pyx":196
 *             return self.m._core.mpz[0][self.row].size_nz()
 *         elif self.m._type == ZT_LONG:
 *             return self.m._core.long[0][self.row].size_nz()             # <<<<<<<<<<<<<<
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self.m._type)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyLong_From_int(((__pyx_v_self->m->_core.__pyx_long[0])[__pyx_v_self->row]).size_nz()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":195
 *         if self.m._type == ZT_MPZ:
 *             return self.m._core.mpz[0][self.row].size_nz()
 *         elif self.m._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *             return self.m._core.long[0][self.row].size_nz()
 *         else:
*/
    break;
    default:

    /* "fpylll/fplll/integer_matrix.pyx":198
 *             return self.m._core.long[0][self.row].size_nz()
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self.m._type)             # <<<<<<<<<<<<<<
 * 
 *     def __iadd__(self, IntegerMatrixRow v):
*/
    __pyx_t_2 = NULL;
    __pyx_t_3 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->m->_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 198, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 198, __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_RuntimeError)), __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(0, 198, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 198, __pyx_L1_error)
    break;
  }

  /* "fpylll/fplll/integer_matrix.pyx":177
 *             raise RuntimeError("Integer type '%s' not understood."%self.m._type)
 * 
 *     def size_nz(self):             # <<<<<<<<<<<<<<
 *         """
 *         Index at which an all zero vector starts.
*/

  /* function exit code */
  __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("fpylll.fplll.integer_matrix.IntegerMatrixRow.size_nz", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":200
 *             raise RuntimeError("Integer type '%s' not understood."%self.m._type)
 * 
 *     def __iadd__(self, IntegerMatrixRow v):             # <<<<<<<<<<<<<<
 *         """
 *         In-place add row vector ``v``
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_19__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_v); /*proto*/
PyDoc_STRVAR(__pyx_doc_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_18__iadd__, "IntegerMatrixRow.__iadd__(self, IntegerMatrixRow v)\n\nIn-place add row vector ``v``\n\n:param IntegerMatrixRow v: a row vector\n\nExample::\n\n    >>> A = IntegerMatrix.from_matrix([[0,2],[3,4]])\n    >>> A[0] += A[1]\n    >>> print(A[0])\n    (3, 6)\n    >>> v = A[0]\n    >>> v += A[1]\n    >>> print(A[0])\n    (6, 10)");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_18__iadd__;
#endif
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_19__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_v) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iadd__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow, 1, "v", 0))) __PYX_ERR(0, 200, __pyx_L1_error)
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_18__iadd__(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *)__pyx_v_self), ((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *)__pyx_v_v));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  goto __pyx_L5_cleaned_up;
  __pyx_L0:;
  __pyx_L5_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_18__iadd__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *__pyx_v_self, struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *__pyx_v_v) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__iadd__", 0);

  /* "fpylll/fplll/integer_matrix.pyx":218
 * 
 *         """
 *         if self.m._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             self.m._core.mpz[0][self.row].add(v.m._core.mpz[0][v.row])
 *         elif self.m._type == ZT_LONG:
*/
  switch (__pyx_v_self->m->_type) {
    case fplll::ZT_MPZ:

    /* "fpylll/fplll/integer_matrix.pyx":219
 *         """
 *         if self.m._type == ZT_MPZ:
 *             self.m._core.mpz[0][self.row].add(v.m._core.mpz[0][v.row])             # <<<<<<<<<<<<<<
 *         elif self.m._type == ZT_LONG:
 *             self.m._core.long[0][self.row].add(v.m._core.long[0][v.row])
*/
    ((__pyx_v_self->m->_core.mpz[0])[__pyx_v_self->row]).add(((__pyx_v_v->m->_core.mpz[0])[__pyx_v_v->row]));

    /* "fpylll/fplll/integer_matrix.pyx":218
 * 
 *         """
 *         if self.m._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             self.m._core.mpz[0][self.row].add(v.m._core.mpz[0][v.row])
 *         elif self.m._type == ZT_LONG:
*/
    break;
    case fplll::ZT_LONG:

    /* "fpylll/fplll/integer_matrix.pyx":221
 *             self.m._core.mpz[0][self.row].add(v.m._core.mpz[0][v.row])
 *         elif self.m._type == ZT_LONG:
 *             self.m._core.long[0][self.row].add(v.m._core.long[0][v.row])             # <<<<<<<<<<<<<<
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self.m._type)
*/
    ((__pyx_v_self->m->_core.__pyx_long[0])[__pyx_v_self->row]).add(((__pyx_v_v->m->_core.__pyx_long[0])[__pyx_v_v->row]));

    /* "fpylll/fplll/integer_matrix.pyx":220
 *         if self.m._type == ZT_MPZ:
 *             self.m._core.mpz[0][self.row].add(v.m._core.mpz[0][v.row])
 *         elif self.m._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *             self.m._core.long[0][self.row].add(v.m._core.long[0][v.row])
 *         else:
*/
    break;
    default:

    /* "fpylll/fplll/integer_matrix.pyx":223
 *             self.m._core.long[0][self.row].add(v.m._core.long[0][v.row])
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self.m._type)             # <<<<<<<<<<<<<<
 *         return self
 * 
*/
    __pyx_t_2 = NULL;
    __pyx_t_3 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->m->_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 223, __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_RuntimeError)), __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(0, 223, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 223, __pyx_L1_error)
    break;
  }

  /* "fpylll/fplll/integer_matrix.pyx":224
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self.m._type)
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __isub__(self, IntegerMatrixRow v):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "fpylll/fplll/integer_matrix.pyx":200
 *             raise RuntimeError("Integer type '%s' not understood."%self.m._type)
 * 
 *     def __iadd__(self, IntegerMatrixRow v):             # <<<<<<<<<<<<<<
 *         """
 *         In-place add row vector ``v``
*/

  /* function exit code */
  __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("fpylll.fplll.integer_matrix.IntegerMatrixRow.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":226
 *         return self
 * 
 *     def __isub__(self, IntegerMatrixRow v):             # <<<<<<<<<<<<<<
 *         """
 *         In-place subtract row vector ``v``
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_21__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_v); /*proto*/
PyDoc_STRVAR(__pyx_doc_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_20__isub__, "IntegerMatrixRow.__isub__(self, IntegerMatrixRow v)\n\nIn-place subtract row vector ``v``\n\n:param IntegerMatrixRow v: a row vector\n\nExample::\n\n    >>> A = IntegerMatrix.from_matrix([[0,2],[3,4]])\n    >>> A[0] -= A[1]\n    >>> print(A[0])\n    (-3, -2)\n    >>> v = A[0]\n    >>> v -= A[1]\n    >>> print(A[0])\n    (-6, -6)");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_20__isub__;
#endif
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_21__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_v) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__isub__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow, 1, "v", 0))) __PYX_ERR(0, 226, __pyx_L1_error)
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_20__isub__(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *)__pyx_v_self), ((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *)__pyx_v_v));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  goto __pyx_L5_cleaned_up;
  __pyx_L0:;
  __pyx_L5_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_20__isub__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *__pyx_v_self, struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *__pyx_v_v) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__isub__", 0);

  /* "fpylll/fplll/integer_matrix.pyx":244
 * 
 *         """
 *         if self.m._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             self.m._core.mpz[0][self.row].sub(v.m._core.mpz[0][v.row])
 *         elif self.m._type == ZT_LONG:
*/
  switch (__pyx_v_self->m->_type) {
    case fplll::ZT_MPZ:

    /* "fpylll/fplll/integer_matrix.pyx":245
 *         """
 *         if self.m._type == ZT_MPZ:
 *             self.m._core.mpz[0][self.row].sub(v.m._core.mpz[0][v.row])             # <<<<<<<<<<<<<<
 *         elif self.m._type == ZT_LONG:
 *             self.m._core.long[0][self.row].sub(v.m._core.long[0][v.row])
*/
    ((__pyx_v_self->m->_core.mpz[0])[__pyx_v_self->row]).sub(((__pyx_v_v->m->_core.mpz[0])[__pyx_v_v->row]));

    /* "fpylll/fplll/integer_matrix.pyx":244
 * 
 *         """
 *         if self.m._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             self.m._core.mpz[0][self.row].sub(v.m._core.mpz[0][v.row])
 *         elif self.m._type == ZT_LONG:
*/
    break;
    case fplll::ZT_LONG:

    /* "fpylll/fplll/integer_matrix.pyx":247
 *             self.m._core.mpz[0][self.row].sub(v.m._core.mpz[0][v.row])
 *         elif self.m._type == ZT_LONG:
 *             self.m._core.long[0][self.row].sub(v.m._core.long[0][v.row])             # <<<<<<<<<<<<<<
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self.m._type)
*/
    ((__pyx_v_self->m->_core.__pyx_long[0])[__pyx_v_self->row]).sub(((__pyx_v_v->m->_core.__pyx_long[0])[__pyx_v_v->row]));

    /* "fpylll/fplll/integer_matrix.pyx":246
 *         if self.m._type == ZT_MPZ:
 *             self.m._core.mpz[0][self.row].sub(v.m._core.mpz[0][v.row])
 *         elif self.m._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *             self.m._core.long[0][self.row].sub(v.m._core.long[0][v.row])
 *         else:
*/
    break;
    default:

    /* "fpylll/fplll/integer_matrix.pyx":249
 *             self.m._core.long[0][self.row].sub(v.m._core.long[0][v.row])
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self.m._type)             # <<<<<<<<<<<<<<
 *         return self
 * 
*/
    __pyx_t_2 = NULL;
    __pyx_t_3 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->m->_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 249, __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_RuntimeError)), __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(0, 249, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 249, __pyx_L1_error)
    break;
  }

  /* "fpylll/fplll/integer_matrix.pyx":250
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self.m._type)
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def addmul(self, IntegerMatrixRow v, x=1, int expo=0):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "fpylll/fplll/integer_matrix.pyx":226
 *         return self
 * 
 *     def __isub__(self, IntegerMatrixRow v):             # <<<<<<<<<<<<<<
 *         """
 *         In-place subtract row vector ``v``
*/

  /* function exit code */
  __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("fpylll.fplll.integer_matrix.IntegerMatrixRow.__isub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":252
 *         return self
 * 
 *     def addmul(self, IntegerMatrixRow v, x=1, int expo=0):             # <<<<<<<<<<<<<<
 *         """In-place add row vector ``2^expo  x  v``
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_23addmul(PyObject *__pyx_v_self, 
#if 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_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_22addmul, "IntegerMatrixRow.addmul(self, IntegerMatrixRow v, x=1, int expo=0)\n\nIn-place add row vector ``2^expo \342\213\205 x \342\213\205 v``\n\n:param IntegerMatrixRow v: a row vector\n:param x: multiplier\n:param int expo: scaling exponent.\n\nExample::\n\n    >>> A = IntegerMatrix.from_matrix([[0,2],[3,4]])\n    >>> A[0].addmul(A[1])\n    >>> print(A[0])\n    (3, 6)\n\n    >>> A = IntegerMatrix.from_matrix([[0,2],[3,4]])\n    >>> A[0].addmul(A[1],x=0)\n    >>> print(A[0])\n    (0, 2)\n\n    >>> A = IntegerMatrix.from_matrix([[0,2],[3,4]])\n    >>> A[0].addmul(A[1],x=1,expo=2)\n    >>> print(A[0])\n    (12, 18)");
static PyMethodDef __pyx_mdef_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_23addmul = {"addmul", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_23addmul, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_22addmul};
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_23addmul(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *__pyx_v_v = 0;
  PyObject *__pyx_v_x = 0;
  int __pyx_v_expo;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("addmul (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_v,&__pyx_mstate_global->__pyx_n_u_x,&__pyx_mstate_global->__pyx_n_u_expo,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, 252, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 252, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 252, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 252, __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, "addmul", 0) < (0)) __PYX_ERR(0, 252, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_1));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("addmul", 0, 1, 3, i); __PYX_ERR(0, 252, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 252, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 252, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 252, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_1));
    }
    __pyx_v_v = ((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *)values[0]);
    __pyx_v_x = values[1];
    if (values[2]) {
      __pyx_v_expo = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_expo == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 252, __pyx_L3_error)
    } else {
      __pyx_v_expo = ((int)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("addmul", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 252, __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("fpylll.fplll.integer_matrix.IntegerMatrixRow.addmul", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow, 1, "v", 0))) __PYX_ERR(0, 252, __pyx_L1_error)
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_22addmul(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *)__pyx_v_self), __pyx_v_v, __pyx_v_x, __pyx_v_expo);

  /* 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_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_22addmul(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *__pyx_v_self, struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *__pyx_v_v, PyObject *__pyx_v_x, int __pyx_v_expo) {
  fplll::Z_NR<mpz_t>  __pyx_v_x_mpz_;
  fplll::Z_NR<mpz_t>  __pyx_v_tmp_mpz;
  fplll::Z_NR<long>  __pyx_v_x_l_;
  fplll::Z_NR<long>  __pyx_v_tmp_l;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  long __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("addmul", 0);

  /* "fpylll/fplll/integer_matrix.pyx":282
 *         cdef Z_NR[long] tmp_l
 * 
 *         if self.m._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             assign_Z_NR_mpz(x_mpz_, x)
 *             self.m._core.mpz[0][self.row].addmul_2exp(v.m._core.mpz[0][v.row], x_mpz_, expo, tmp_mpz)
*/
  switch (__pyx_v_self->m->_type) {
    case fplll::ZT_MPZ:

    /* "fpylll/fplll/integer_matrix.pyx":283
 * 
 *         if self.m._type == ZT_MPZ:
 *             assign_Z_NR_mpz(x_mpz_, x)             # <<<<<<<<<<<<<<
 *             self.m._core.mpz[0][self.row].addmul_2exp(v.m._core.mpz[0][v.row], x_mpz_, expo, tmp_mpz)
 *         elif self.m._type == ZT_LONG:
*/
    __pyx_t_1 = __pyx_f_6fpylll_2io_assign_Z_NR_mpz(__pyx_v_x_mpz_, __pyx_v_x); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 283, __pyx_L1_error)

    /* "fpylll/fplll/integer_matrix.pyx":284
 *         if self.m._type == ZT_MPZ:
 *             assign_Z_NR_mpz(x_mpz_, x)
 *             self.m._core.mpz[0][self.row].addmul_2exp(v.m._core.mpz[0][v.row], x_mpz_, expo, tmp_mpz)             # <<<<<<<<<<<<<<
 *         elif self.m._type == ZT_LONG:
 *             x_l_ = <long>x
*/
    ((__pyx_v_self->m->_core.mpz[0])[__pyx_v_self->row]).addmul_2exp(((__pyx_v_v->m->_core.mpz[0])[__pyx_v_v->row]), __pyx_v_x_mpz_, __pyx_v_expo, __pyx_v_tmp_mpz);

    /* "fpylll/fplll/integer_matrix.pyx":282
 *         cdef Z_NR[long] tmp_l
 * 
 *         if self.m._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             assign_Z_NR_mpz(x_mpz_, x)
 *             self.m._core.mpz[0][self.row].addmul_2exp(v.m._core.mpz[0][v.row], x_mpz_, expo, tmp_mpz)
*/
    break;
    case fplll::ZT_LONG:

    /* "fpylll/fplll/integer_matrix.pyx":286
 *             self.m._core.mpz[0][self.row].addmul_2exp(v.m._core.mpz[0][v.row], x_mpz_, expo, tmp_mpz)
 *         elif self.m._type == ZT_LONG:
 *             x_l_ = <long>x             # <<<<<<<<<<<<<<
 *             self.m._core.long[0][self.row].addmul_2exp(v.m._core.long[0][v.row], x_l_, expo, tmp_l)
 *         else:
*/
    __pyx_t_2 = __Pyx_PyLong_As_long(__pyx_v_x); if (unlikely((__pyx_t_2 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 286, __pyx_L1_error)
    __pyx_v_x_l_ = ((long)__pyx_t_2);

    /* "fpylll/fplll/integer_matrix.pyx":287
 *         elif self.m._type == ZT_LONG:
 *             x_l_ = <long>x
 *             self.m._core.long[0][self.row].addmul_2exp(v.m._core.long[0][v.row], x_l_, expo, tmp_l)             # <<<<<<<<<<<<<<
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self.m._type)
*/
    ((__pyx_v_self->m->_core.__pyx_long[0])[__pyx_v_self->row]).addmul_2exp(((__pyx_v_v->m->_core.__pyx_long[0])[__pyx_v_v->row]), __pyx_v_x_l_, __pyx_v_expo, __pyx_v_tmp_l);

    /* "fpylll/fplll/integer_matrix.pyx":285
 *             assign_Z_NR_mpz(x_mpz_, x)
 *             self.m._core.mpz[0][self.row].addmul_2exp(v.m._core.mpz[0][v.row], x_mpz_, expo, tmp_mpz)
 *         elif self.m._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *             x_l_ = <long>x
 *             self.m._core.long[0][self.row].addmul_2exp(v.m._core.long[0][v.row], x_l_, expo, tmp_l)
*/
    break;
    default:

    /* "fpylll/fplll/integer_matrix.pyx":289
 *             self.m._core.long[0][self.row].addmul_2exp(v.m._core.long[0][v.row], x_l_, expo, tmp_l)
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self.m._type)             # <<<<<<<<<<<<<<
 *         return
 * 
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->m->_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 289, __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_RuntimeError)), __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(0, 289, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 289, __pyx_L1_error)
    break;
  }

  /* "fpylll/fplll/integer_matrix.pyx":290
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self.m._type)
 *         return             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "fpylll/fplll/integer_matrix.pyx":252
 *         return self
 * 
 *     def addmul(self, IntegerMatrixRow v, x=1, int expo=0):             # <<<<<<<<<<<<<<
 *         """In-place add row vector ``2^expo  x  v``
 * 
*/

  /* 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("fpylll.fplll.integer_matrix.IntegerMatrixRow.addmul", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":298
 *     """
 * 
 *     def __init__(self, arg0, arg1=None, int_type="mpz"):             # <<<<<<<<<<<<<<
 *         """Construct a new integer matrix
 * 
*/

/* Python wrapper */
static int __pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
PyDoc_STRVAR(__pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix___init__, "Construct a new integer matrix\n\n        :param arg0: number of rows \342\211\245 0 or matrix\n        :param arg1: number of columns \342\211\245 0 or ``None``\n\n        The default constructor takes the number of rows and columns::\n\n            >>> from fpylll import IntegerMatrix\n            >>> IntegerMatrix(10, 10) # doctest: +ELLIPSIS\n            <IntegerMatrix(10, 10) at 0x...>\n\n            >>> IntegerMatrix(10, 0) # doctest: +ELLIPSIS\n            <IntegerMatrix(10, 0) at 0x...>\n\n            >>> IntegerMatrix(-1,  0)\n            Traceback (most recent call last):\n            ...\n            ValueError: Number of rows must be >0\n\n        The default constructor is also a copy constructor::\n\n            >>> A = IntegerMatrix(2, 2)\n            >>> A[0,0] = 1\n            >>> B = IntegerMatrix(A)\n            >>> B[0,0]\n            1\n            >>> A[0,0] = 2\n            >>> B[0,0]\n            1\n\n        IntegerMatrix also supports numpy's integer types, if numpy is supported.\n        See tests/test_numpy.py for example usage.\n        ");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_13IntegerMatrix___init__;
#endif
static int __pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_arg0 = 0;
  PyObject *__pyx_v_arg1 = 0;
  PyObject *__pyx_v_int_type = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_arg0,&__pyx_mstate_global->__pyx_n_u_arg1,&__pyx_mstate_global->__pyx_n_u_int_type,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 298, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 298, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 298, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 298, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 298, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_mpz));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, i); __PYX_ERR(0, 298, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 298, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 298, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 298, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_mpz));
    }
    __pyx_v_arg0 = values[0];
    __pyx_v_arg1 = values[1];
    __pyx_v_int_type = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 298, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix___init__(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self), __pyx_v_arg0, __pyx_v_arg1, __pyx_v_int_type);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix___init__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, PyObject *__pyx_v_arg0, PyObject *__pyx_v_arg1, PyObject *__pyx_v_int_type) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  enum fplll::IntType __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "fpylll/fplll/integer_matrix.pyx":332
 *         See tests/test_numpy.py for example usage.
 *         """
 *         self._type = check_int_type(int_type)             # <<<<<<<<<<<<<<
 * 
 *         if PyIndex_Check(arg0) and PyIndex_Check(arg1):
*/
  __pyx_t_1 = __pyx_f_6fpylll_4util_check_int_type(__pyx_v_int_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((enum fplll::IntType)__Pyx_PyLong_As_enum__fplll_3a__3a_IntType(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 332, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->_type = __pyx_t_2;

  /* "fpylll/fplll/integer_matrix.pyx":334
 *         self._type = check_int_type(int_type)
 * 
 *         if PyIndex_Check(arg0) and PyIndex_Check(arg1):             # <<<<<<<<<<<<<<
 *             if arg0 < 0:
 *                 raise ValueError("Number of rows must be >0")
*/
  __pyx_t_4 = PyIndex_Check(__pyx_v_arg0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_3 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = PyIndex_Check(__pyx_v_arg1);
  __pyx_t_3 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "fpylll/fplll/integer_matrix.pyx":335
 * 
 *         if PyIndex_Check(arg0) and PyIndex_Check(arg1):
 *             if arg0 < 0:             # <<<<<<<<<<<<<<
 *                 raise ValueError("Number of rows must be >0")
 * 
*/
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_arg0, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 335, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 335, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(__pyx_t_3)) {

      /* "fpylll/fplll/integer_matrix.pyx":336
 *         if PyIndex_Check(arg0) and PyIndex_Check(arg1):
 *             if arg0 < 0:
 *                 raise ValueError("Number of rows must be >0")             # <<<<<<<<<<<<<<
 * 
 *             if arg1 < 0:
*/
      __pyx_t_5 = NULL;
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Number_of_rows_must_be_0};
        __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_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 336, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 336, __pyx_L1_error)

      /* "fpylll/fplll/integer_matrix.pyx":335
 * 
 *         if PyIndex_Check(arg0) and PyIndex_Check(arg1):
 *             if arg0 < 0:             # <<<<<<<<<<<<<<
 *                 raise ValueError("Number of rows must be >0")
 * 
*/
    }

    /* "fpylll/fplll/integer_matrix.pyx":338
 *                 raise ValueError("Number of rows must be >0")
 * 
 *             if arg1 < 0:             # <<<<<<<<<<<<<<
 *                 raise ValueError("Number of columns must be >0")
 * 
*/
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_arg1, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 338, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 338, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(__pyx_t_3)) {

      /* "fpylll/fplll/integer_matrix.pyx":339
 * 
 *             if arg1 < 0:
 *                 raise ValueError("Number of columns must be >0")             # <<<<<<<<<<<<<<
 * 
 *             if self._type == ZT_MPZ:
*/
      __pyx_t_5 = NULL;
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Number_of_columns_must_be_0};
        __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_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 339, __pyx_L1_error)

      /* "fpylll/fplll/integer_matrix.pyx":338
 *                 raise ValueError("Number of rows must be >0")
 * 
 *             if arg1 < 0:             # <<<<<<<<<<<<<<
 *                 raise ValueError("Number of columns must be >0")
 * 
*/
    }

    /* "fpylll/fplll/integer_matrix.pyx":341
 *                 raise ValueError("Number of columns must be >0")
 * 
 *             if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *                 self._core.mpz = new ZZ_mat[mpz_t](arg0, arg1)
 *             elif self._type == ZT_LONG:
*/
    switch (__pyx_v_self->_type) {
      case fplll::ZT_MPZ:

      /* "fpylll/fplll/integer_matrix.pyx":342
 * 
 *             if self._type == ZT_MPZ:
 *                 self._core.mpz = new ZZ_mat[mpz_t](arg0, arg1)             # <<<<<<<<<<<<<<
 *             elif self._type == ZT_LONG:
 *                 self._core.long = new ZZ_mat[long](arg0, arg1)
*/
      __pyx_t_7 = __Pyx_PyLong_As_int(__pyx_v_arg0); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 342, __pyx_L1_error)
      __pyx_t_8 = __Pyx_PyLong_As_int(__pyx_v_arg1); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 342, __pyx_L1_error)
      __pyx_v_self->_core.mpz = new fplll::ZZ_mat<mpz_t> (__pyx_t_7, __pyx_t_8);

      /* "fpylll/fplll/integer_matrix.pyx":341
 *                 raise ValueError("Number of columns must be >0")
 * 
 *             if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *                 self._core.mpz = new ZZ_mat[mpz_t](arg0, arg1)
 *             elif self._type == ZT_LONG:
*/
      break;
      case fplll::ZT_LONG:

      /* "fpylll/fplll/integer_matrix.pyx":344
 *                 self._core.mpz = new ZZ_mat[mpz_t](arg0, arg1)
 *             elif self._type == ZT_LONG:
 *                 self._core.long = new ZZ_mat[long](arg0, arg1)             # <<<<<<<<<<<<<<
 *             else:
 *                 raise ValueError("Integer type '%s' not understood."%int_type)
*/
      __pyx_t_8 = __Pyx_PyLong_As_int(__pyx_v_arg0); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 344, __pyx_L1_error)
      __pyx_t_7 = __Pyx_PyLong_As_int(__pyx_v_arg1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 344, __pyx_L1_error)
      __pyx_v_self->_core.__pyx_long = new fplll::ZZ_mat<long> (__pyx_t_8, __pyx_t_7);

      /* "fpylll/fplll/integer_matrix.pyx":343
 *             if self._type == ZT_MPZ:
 *                 self._core.mpz = new ZZ_mat[mpz_t](arg0, arg1)
 *             elif self._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *                 self._core.long = new ZZ_mat[long](arg0, arg1)
 *             else:
*/
      break;
      default:

      /* "fpylll/fplll/integer_matrix.pyx":346
 *                 self._core.long = new ZZ_mat[long](arg0, arg1)
 *             else:
 *                 raise ValueError("Integer type '%s' not understood."%int_type)             # <<<<<<<<<<<<<<
 *             return
 * 
*/
      __pyx_t_5 = NULL;
      __pyx_t_9 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_v_int_type); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 346, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_9};
        __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_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 346, __pyx_L1_error)
      break;
    }

    /* "fpylll/fplll/integer_matrix.pyx":347
 *             else:
 *                 raise ValueError("Integer type '%s' not understood."%int_type)
 *             return             # <<<<<<<<<<<<<<
 * 
 *         elif isinstance(arg0, IntegerMatrix) and arg1 is None:
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":334
 *         self._type = check_int_type(int_type)
 * 
 *         if PyIndex_Check(arg0) and PyIndex_Check(arg1):             # <<<<<<<<<<<<<<
 *             if arg0 < 0:
 *                 raise ValueError("Number of rows must be >0")
*/
  }

  /* "fpylll/fplll/integer_matrix.pyx":349
 *             return
 * 
 *         elif isinstance(arg0, IntegerMatrix) and arg1 is None:             # <<<<<<<<<<<<<<
 *             if self._type == ZT_MPZ:
 *                 self._core.mpz = new ZZ_mat[mpz_t](arg0.nrows, arg0.ncols)
*/
  __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_arg0, __pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix); 
  if (__pyx_t_4) {
  } else {
    __pyx_t_3 = __pyx_t_4;
    goto __pyx_L8_bool_binop_done;
  }
  __pyx_t_4 = (__pyx_v_arg1 == Py_None);
  __pyx_t_3 = __pyx_t_4;
  __pyx_L8_bool_binop_done:;
  if (likely(__pyx_t_3)) {

    /* "fpylll/fplll/integer_matrix.pyx":350
 * 
 *         elif isinstance(arg0, IntegerMatrix) and arg1 is None:
 *             if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *                 self._core.mpz = new ZZ_mat[mpz_t](arg0.nrows, arg0.ncols)
 *             elif self._type == ZT_LONG:
*/
    switch (__pyx_v_self->_type) {
      case fplll::ZT_MPZ:

      /* "fpylll/fplll/integer_matrix.pyx":351
 *         elif isinstance(arg0, IntegerMatrix) and arg1 is None:
 *             if self._type == ZT_MPZ:
 *                 self._core.mpz = new ZZ_mat[mpz_t](arg0.nrows, arg0.ncols)             # <<<<<<<<<<<<<<
 *             elif self._type == ZT_LONG:
 *                 self._core.long = new ZZ_mat[long](arg0.nrows, arg0.ncols)
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg0, __pyx_mstate_global->__pyx_n_u_nrows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 351, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 351, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg0, __pyx_mstate_global->__pyx_n_u_ncols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 351, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 351, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_self->_core.mpz = new fplll::ZZ_mat<mpz_t> (__pyx_t_7, __pyx_t_8);

      /* "fpylll/fplll/integer_matrix.pyx":350
 * 
 *         elif isinstance(arg0, IntegerMatrix) and arg1 is None:
 *             if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *                 self._core.mpz = new ZZ_mat[mpz_t](arg0.nrows, arg0.ncols)
 *             elif self._type == ZT_LONG:
*/
      break;
      case fplll::ZT_LONG:

      /* "fpylll/fplll/integer_matrix.pyx":353
 *                 self._core.mpz = new ZZ_mat[mpz_t](arg0.nrows, arg0.ncols)
 *             elif self._type == ZT_LONG:
 *                 self._core.long = new ZZ_mat[long](arg0.nrows, arg0.ncols)             # <<<<<<<<<<<<<<
 *             else:
 *                 raise ValueError("Integer type '%s' not understood."%int_type)
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg0, __pyx_mstate_global->__pyx_n_u_nrows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 353, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg0, __pyx_mstate_global->__pyx_n_u_ncols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 353, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_self->_core.__pyx_long = new fplll::ZZ_mat<long> (__pyx_t_8, __pyx_t_7);

      /* "fpylll/fplll/integer_matrix.pyx":352
 *             if self._type == ZT_MPZ:
 *                 self._core.mpz = new ZZ_mat[mpz_t](arg0.nrows, arg0.ncols)
 *             elif self._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *                 self._core.long = new ZZ_mat[long](arg0.nrows, arg0.ncols)
 *             else:
*/
      break;
      default:

      /* "fpylll/fplll/integer_matrix.pyx":355
 *                 self._core.long = new ZZ_mat[long](arg0.nrows, arg0.ncols)
 *             else:
 *                 raise ValueError("Integer type '%s' not understood."%int_type)             # <<<<<<<<<<<<<<
 * 
 *             self.set_matrix(arg0)
*/
      __pyx_t_9 = NULL;
      __pyx_t_5 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_v_int_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 355, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __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_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 355, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 355, __pyx_L1_error)
      break;
    }

    /* "fpylll/fplll/integer_matrix.pyx":357
 *                 raise ValueError("Integer type '%s' not understood."%int_type)
 * 
 *             self.set_matrix(arg0)             # <<<<<<<<<<<<<<
 *             return
 * 
*/
    __pyx_t_5 = ((PyObject *)__pyx_v_self);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_6 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_arg0};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_matrix, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 357, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "fpylll/fplll/integer_matrix.pyx":358
 * 
 *             self.set_matrix(arg0)
 *             return             # <<<<<<<<<<<<<<
 * 
 *         else:
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":349
 *             return
 * 
 *         elif isinstance(arg0, IntegerMatrix) and arg1 is None:             # <<<<<<<<<<<<<<
 *             if self._type == ZT_MPZ:
 *                 self._core.mpz = new ZZ_mat[mpz_t](arg0.nrows, arg0.ncols)
*/
  }

  /* "fpylll/fplll/integer_matrix.pyx":361
 * 
 *         else:
 *             raise TypeError("Parameters arg0 and arg1 not understood")             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
  /*else*/ {
    __pyx_t_5 = NULL;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Parameters_arg0_and_arg1_not_und};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __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, 361, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 361, __pyx_L1_error)
  }

  /* "fpylll/fplll/integer_matrix.pyx":298
 *     """
 * 
 *     def __init__(self, arg0, arg1=None, int_type="mpz"):             # <<<<<<<<<<<<<<
 *         """Construct a new integer matrix
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":363
 *             raise TypeError("Parameters arg0 and arg1 not understood")
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_matrix(cls, A, nrows=None, ncols=None, **kwds):
 *         """Construct a new integer matrix from matrix-like object A
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_3from_matrix(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_2from_matrix, "IntegerMatrix.from_matrix(cls, A, nrows=None, ncols=None, **kwds)\n\nConstruct a new integer matrix from matrix-like object A\n\n:param A: a matrix like object, with element access A[i,j] or A[i][j]\n:param nrows: number of rows (optional)\n:param ncols: number of columns (optional)\n\n\n>>> A = IntegerMatrix.from_matrix([[1,2,3],[4,5,6]])\n>>> print(A)\n[ 1 2 3 ]\n[ 4 5 6 ]");
static PyMethodDef __pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_3from_matrix = {"from_matrix", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_3from_matrix, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_2from_matrix};
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_3from_matrix(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_A = 0;
  PyObject *__pyx_v_nrows = 0;
  PyObject *__pyx_v_ncols = 0;
  PyObject *__pyx_v_kwds = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_matrix (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);
  __pyx_v_kwds = PyDict_New(); if (unlikely(!__pyx_v_kwds)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwds);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_A,&__pyx_mstate_global->__pyx_n_u_nrows,&__pyx_mstate_global->__pyx_n_u_ncols,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, 363, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 363, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 363, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 363, __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, __pyx_v_kwds, values, kwd_pos_args, __pyx_kwds_len, "from_matrix", 1) < (0)) __PYX_ERR(0, 363, __pyx_L3_error)

      /* "fpylll/fplll/integer_matrix.pyx":364
 * 
 *     @classmethod
 *     def from_matrix(cls, A, nrows=None, ncols=None, **kwds):             # <<<<<<<<<<<<<<
 *         """Construct a new integer matrix from matrix-like object A
 * 
*/
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_matrix", 0, 1, 3, i); __PYX_ERR(0, 363, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 363, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 363, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 363, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_A = values[0];
    __pyx_v_nrows = values[1];
    __pyx_v_ncols = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_matrix", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 363, __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_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.from_matrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_2from_matrix(((PyTypeObject*)__pyx_v_cls), __pyx_v_A, __pyx_v_nrows, __pyx_v_ncols, __pyx_v_kwds);

  /* "fpylll/fplll/integer_matrix.pyx":363
 *             raise TypeError("Parameters arg0 and arg1 not understood")
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_matrix(cls, A, nrows=None, ncols=None, **kwds):
 *         """Construct a new integer matrix from matrix-like object A
*/

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_kwds);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_2from_matrix(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_A, PyObject *__pyx_v_nrows, PyObject *__pyx_v_ncols, PyObject *__pyx_v_kwds) {
  int __pyx_v_m;
  int __pyx_v_n;
  PyObject *__pyx_v_B = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  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;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("from_matrix", 0);
  __Pyx_INCREF(__pyx_v_nrows);
  __Pyx_INCREF(__pyx_v_ncols);

  /* "fpylll/fplll/integer_matrix.pyx":380
 *         cdef int m, n
 * 
 *         if nrows is None:             # <<<<<<<<<<<<<<
 *             if hasattr(A, "nrows"):
 *                 nrows = A.nrows
*/
  __pyx_t_1 = (__pyx_v_nrows == Py_None);
  if (__pyx_t_1) {

    /* "fpylll/fplll/integer_matrix.pyx":381
 * 
 *         if nrows is None:
 *             if hasattr(A, "nrows"):             # <<<<<<<<<<<<<<
 *                 nrows = A.nrows
 *             elif hasattr(A, "__len__"):
*/
    __pyx_t_1 = __Pyx_HasAttr(__pyx_v_A, __pyx_mstate_global->__pyx_n_u_nrows); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 381, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "fpylll/fplll/integer_matrix.pyx":382
 *         if nrows is None:
 *             if hasattr(A, "nrows"):
 *                 nrows = A.nrows             # <<<<<<<<<<<<<<
 *             elif hasattr(A, "__len__"):
 *                 nrows = len(A)
*/
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_A, __pyx_mstate_global->__pyx_n_u_nrows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 382, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_nrows, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "fpylll/fplll/integer_matrix.pyx":381
 * 
 *         if nrows is None:
 *             if hasattr(A, "nrows"):             # <<<<<<<<<<<<<<
 *                 nrows = A.nrows
 *             elif hasattr(A, "__len__"):
*/
      goto __pyx_L4;
    }

    /* "fpylll/fplll/integer_matrix.pyx":383
 *             if hasattr(A, "nrows"):
 *                 nrows = A.nrows
 *             elif hasattr(A, "__len__"):             # <<<<<<<<<<<<<<
 *                 nrows = len(A)
 *             else:
*/
    __pyx_t_1 = __Pyx_HasAttr(__pyx_v_A, __pyx_mstate_global->__pyx_n_u_len); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 383, __pyx_L1_error)
    if (likely(__pyx_t_1)) {

      /* "fpylll/fplll/integer_matrix.pyx":384
 *                 nrows = A.nrows
 *             elif hasattr(A, "__len__"):
 *                 nrows = len(A)             # <<<<<<<<<<<<<<
 *             else:
 *                 raise ValueError("Cannot determine number of rows.")
*/
      __pyx_t_3 = PyObject_Length(__pyx_v_A); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 384, __pyx_L1_error)
      __pyx_t_2 = PyLong_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 384, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_nrows, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "fpylll/fplll/integer_matrix.pyx":383
 *             if hasattr(A, "nrows"):
 *                 nrows = A.nrows
 *             elif hasattr(A, "__len__"):             # <<<<<<<<<<<<<<
 *                 nrows = len(A)
 *             else:
*/
      goto __pyx_L4;
    }

    /* "fpylll/fplll/integer_matrix.pyx":386
 *                 nrows = len(A)
 *             else:
 *                 raise ValueError("Cannot determine number of rows.")             # <<<<<<<<<<<<<<
 *             if not PyIndex_Check(nrows):
 *                 if callable(nrows):
*/
    /*else*/ {
      __pyx_t_4 = NULL;
      __pyx_t_5 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Cannot_determine_number_of_rows};
        __pyx_t_2 = __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_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 386, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 386, __pyx_L1_error)
    }
    __pyx_L4:;

    /* "fpylll/fplll/integer_matrix.pyx":387
 *             else:
 *                 raise ValueError("Cannot determine number of rows.")
 *             if not PyIndex_Check(nrows):             # <<<<<<<<<<<<<<
 *                 if callable(nrows):
 *                     nrows = nrows()
*/
    __pyx_t_1 = (!PyIndex_Check(__pyx_v_nrows));
    if (__pyx_t_1) {

      /* "fpylll/fplll/integer_matrix.pyx":388
 *                 raise ValueError("Cannot determine number of rows.")
 *             if not PyIndex_Check(nrows):
 *                 if callable(nrows):             # <<<<<<<<<<<<<<
 *                     nrows = nrows()
 *                 else:
*/
      __pyx_t_1 = __Pyx_PyCallable_Check(__pyx_v_nrows); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 388, __pyx_L1_error)
      if (likely(__pyx_t_1)) {

        /* "fpylll/fplll/integer_matrix.pyx":389
 *             if not PyIndex_Check(nrows):
 *                 if callable(nrows):
 *                     nrows = nrows()             # <<<<<<<<<<<<<<
 *                 else:
 *                     raise ValueError("Cannot determine number of rows.")
*/
        __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_nrows);
        __pyx_t_6 = __pyx_v_nrows; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (likely(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_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__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_2)) __PYX_ERR(0, 389, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_DECREF_SET(__pyx_v_nrows, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "fpylll/fplll/integer_matrix.pyx":388
 *                 raise ValueError("Cannot determine number of rows.")
 *             if not PyIndex_Check(nrows):
 *                 if callable(nrows):             # <<<<<<<<<<<<<<
 *                     nrows = nrows()
 *                 else:
*/
        goto __pyx_L6;
      }

      /* "fpylll/fplll/integer_matrix.pyx":391
 *                     nrows = nrows()
 *                 else:
 *                     raise ValueError("Cannot determine number of rows.")             # <<<<<<<<<<<<<<
 * 
 *         if ncols is None:
*/
      /*else*/ {
        __pyx_t_6 = NULL;
        __pyx_t_5 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Cannot_determine_number_of_rows};
          __pyx_t_2 = __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_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 391, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(0, 391, __pyx_L1_error)
      }
      __pyx_L6:;

      /* "fpylll/fplll/integer_matrix.pyx":387
 *             else:
 *                 raise ValueError("Cannot determine number of rows.")
 *             if not PyIndex_Check(nrows):             # <<<<<<<<<<<<<<
 *                 if callable(nrows):
 *                     nrows = nrows()
*/
    }

    /* "fpylll/fplll/integer_matrix.pyx":380
 *         cdef int m, n
 * 
 *         if nrows is None:             # <<<<<<<<<<<<<<
 *             if hasattr(A, "nrows"):
 *                 nrows = A.nrows
*/
  }

  /* "fpylll/fplll/integer_matrix.pyx":393
 *                     raise ValueError("Cannot determine number of rows.")
 * 
 *         if ncols is None:             # <<<<<<<<<<<<<<
 *             if hasattr(A, "ncols"):
 *                 ncols = A.ncols
*/
  __pyx_t_1 = (__pyx_v_ncols == Py_None);
  if (__pyx_t_1) {

    /* "fpylll/fplll/integer_matrix.pyx":394
 * 
 *         if ncols is None:
 *             if hasattr(A, "ncols"):             # <<<<<<<<<<<<<<
 *                 ncols = A.ncols
 *             elif hasattr(A[0], "__len__"):
*/
    __pyx_t_1 = __Pyx_HasAttr(__pyx_v_A, __pyx_mstate_global->__pyx_n_u_ncols); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 394, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "fpylll/fplll/integer_matrix.pyx":395
 *         if ncols is None:
 *             if hasattr(A, "ncols"):
 *                 ncols = A.ncols             # <<<<<<<<<<<<<<
 *             elif hasattr(A[0], "__len__"):
 *                 ncols = len(A[0])
*/
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_A, __pyx_mstate_global->__pyx_n_u_ncols); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 395, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_ncols, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "fpylll/fplll/integer_matrix.pyx":394
 * 
 *         if ncols is None:
 *             if hasattr(A, "ncols"):             # <<<<<<<<<<<<<<
 *                 ncols = A.ncols
 *             elif hasattr(A[0], "__len__"):
*/
      goto __pyx_L8;
    }

    /* "fpylll/fplll/integer_matrix.pyx":396
 *             if hasattr(A, "ncols"):
 *                 ncols = A.ncols
 *             elif hasattr(A[0], "__len__"):             # <<<<<<<<<<<<<<
 *                 ncols = len(A[0])
 *             else:
*/
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_A, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_HasAttr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_len); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 396, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (likely(__pyx_t_1)) {

      /* "fpylll/fplll/integer_matrix.pyx":397
 *                 ncols = A.ncols
 *             elif hasattr(A[0], "__len__"):
 *                 ncols = len(A[0])             # <<<<<<<<<<<<<<
 *             else:
 *                 raise ValueError("Cannot determine number of rows.")
*/
      __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_A, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 397, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 397, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyLong_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 397, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_ncols, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "fpylll/fplll/integer_matrix.pyx":396
 *             if hasattr(A, "ncols"):
 *                 ncols = A.ncols
 *             elif hasattr(A[0], "__len__"):             # <<<<<<<<<<<<<<
 *                 ncols = len(A[0])
 *             else:
*/
      goto __pyx_L8;
    }

    /* "fpylll/fplll/integer_matrix.pyx":399
 *                 ncols = len(A[0])
 *             else:
 *                 raise ValueError("Cannot determine number of rows.")             # <<<<<<<<<<<<<<
 *             if not PyIndex_Check(ncols):
 *                 if callable(ncols):
*/
    /*else*/ {
      __pyx_t_6 = NULL;
      __pyx_t_5 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Cannot_determine_number_of_rows};
        __pyx_t_2 = __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_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 399, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 399, __pyx_L1_error)
    }
    __pyx_L8:;

    /* "fpylll/fplll/integer_matrix.pyx":400
 *             else:
 *                 raise ValueError("Cannot determine number of rows.")
 *             if not PyIndex_Check(ncols):             # <<<<<<<<<<<<<<
 *                 if callable(ncols):
 *                     ncols = ncols()
*/
    __pyx_t_1 = (!PyIndex_Check(__pyx_v_ncols));
    if (__pyx_t_1) {

      /* "fpylll/fplll/integer_matrix.pyx":401
 *                 raise ValueError("Cannot determine number of rows.")
 *             if not PyIndex_Check(ncols):
 *                 if callable(ncols):             # <<<<<<<<<<<<<<
 *                     ncols = ncols()
 *                 else:
*/
      __pyx_t_1 = __Pyx_PyCallable_Check(__pyx_v_ncols); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 401, __pyx_L1_error)
      if (likely(__pyx_t_1)) {

        /* "fpylll/fplll/integer_matrix.pyx":402
 *             if not PyIndex_Check(ncols):
 *                 if callable(ncols):
 *                     ncols = ncols()             # <<<<<<<<<<<<<<
 *                 else:
 *                     raise ValueError("Cannot determine number of rows.")
*/
        __pyx_t_6 = NULL;
        __Pyx_INCREF(__pyx_v_ncols);
        __pyx_t_4 = __pyx_v_ncols; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (likely(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_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 402, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_DECREF_SET(__pyx_v_ncols, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "fpylll/fplll/integer_matrix.pyx":401
 *                 raise ValueError("Cannot determine number of rows.")
 *             if not PyIndex_Check(ncols):
 *                 if callable(ncols):             # <<<<<<<<<<<<<<
 *                     ncols = ncols()
 *                 else:
*/
        goto __pyx_L10;
      }

      /* "fpylll/fplll/integer_matrix.pyx":404
 *                     ncols = ncols()
 *                 else:
 *                     raise ValueError("Cannot determine number of rows.")             # <<<<<<<<<<<<<<
 * 
 *         m = nrows
*/
      /*else*/ {
        __pyx_t_4 = NULL;
        __pyx_t_5 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Cannot_determine_number_of_rows};
          __pyx_t_2 = __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_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 404, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(0, 404, __pyx_L1_error)
      }
      __pyx_L10:;

      /* "fpylll/fplll/integer_matrix.pyx":400
 *             else:
 *                 raise ValueError("Cannot determine number of rows.")
 *             if not PyIndex_Check(ncols):             # <<<<<<<<<<<<<<
 *                 if callable(ncols):
 *                     ncols = ncols()
*/
    }

    /* "fpylll/fplll/integer_matrix.pyx":393
 *                     raise ValueError("Cannot determine number of rows.")
 * 
 *         if ncols is None:             # <<<<<<<<<<<<<<
 *             if hasattr(A, "ncols"):
 *                 ncols = A.ncols
*/
  }

  /* "fpylll/fplll/integer_matrix.pyx":406
 *                     raise ValueError("Cannot determine number of rows.")
 * 
 *         m = nrows             # <<<<<<<<<<<<<<
 *         n = ncols
 * 
*/
  __pyx_t_7 = __Pyx_PyLong_As_int(__pyx_v_nrows); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 406, __pyx_L1_error)
  __pyx_v_m = __pyx_t_7;

  /* "fpylll/fplll/integer_matrix.pyx":407
 * 
 *         m = nrows
 *         n = ncols             # <<<<<<<<<<<<<<
 * 
 *         B = cls(m, n, **kwds)
*/
  __pyx_t_7 = __Pyx_PyLong_As_int(__pyx_v_ncols); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 407, __pyx_L1_error)
  __pyx_v_n = __pyx_t_7;

  /* "fpylll/fplll/integer_matrix.pyx":409
 *         n = ncols
 * 
 *         B = cls(m, n, **kwds)             # <<<<<<<<<<<<<<
 *         B.set_matrix(A)
 *         return B
*/
  __pyx_t_4 = NULL;
  __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v_m); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = __Pyx_PyLong_From_int(__pyx_v_n); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = PyDict_Copy(__pyx_v_kwds); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_5 = 1;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_6, __pyx_t_8};
    __pyx_t_2 = __Pyx_PyObject_FastCallDict((PyObject*)__pyx_v_cls, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 409, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_v_B = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":410
 * 
 *         B = cls(m, n, **kwds)
 *         B.set_matrix(A)             # <<<<<<<<<<<<<<
 *         return B
 * 
*/
  __pyx_t_9 = __pyx_v_B;
  __Pyx_INCREF(__pyx_t_9);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_A};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_matrix, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 410, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":411
 *         B = cls(m, n, **kwds)
 *         B.set_matrix(A)
 *         return B             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_B);
  __pyx_r = __pyx_v_B;
  goto __pyx_L0;

  /* "fpylll/fplll/integer_matrix.pyx":363
 *             raise TypeError("Parameters arg0 and arg1 not understood")
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_matrix(cls, A, nrows=None, ncols=None, **kwds):
 *         """Construct a new integer matrix from matrix-like object A
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.from_matrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_B);
  __Pyx_XDECREF(__pyx_v_nrows);
  __Pyx_XDECREF(__pyx_v_ncols);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":413
 *         return B
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_iterable(cls, nrows, ncols, it, **kwds):
 *         """Construct a new integer matrix from matrix-like object A
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_5from_iterable(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_4from_iterable, "IntegerMatrix.from_iterable(cls, nrows, ncols, it, **kwds)\n\nConstruct a new integer matrix from matrix-like object A\n\n:param nrows: number of rows\n:param ncols: number of columns\n:param it: an iterable of length at least ``nrows * ncols``\n\n>>> A = IntegerMatrix.from_iterable(2,3, [1,2,3,4,5,6])\n>>> print(A)\n[ 1 2 3 ]\n[ 4 5 6 ]");
static PyMethodDef __pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_5from_iterable = {"from_iterable", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_5from_iterable, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_4from_iterable};
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_5from_iterable(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_nrows = 0;
  PyObject *__pyx_v_ncols = 0;
  PyObject *__pyx_v_it = 0;
  PyObject *__pyx_v_kwds = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_iterable (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);
  __pyx_v_kwds = PyDict_New(); if (unlikely(!__pyx_v_kwds)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwds);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_nrows,&__pyx_mstate_global->__pyx_n_u_ncols,&__pyx_mstate_global->__pyx_n_u_it,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, 413, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 413, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 413, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 413, __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, __pyx_v_kwds, values, kwd_pos_args, __pyx_kwds_len, "from_iterable", 1) < (0)) __PYX_ERR(0, 413, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_iterable", 1, 3, 3, i); __PYX_ERR(0, 413, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 413, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 413, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 413, __pyx_L3_error)
    }
    __pyx_v_nrows = values[0];
    __pyx_v_ncols = values[1];
    __pyx_v_it = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_iterable", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 413, __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_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.from_iterable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_4from_iterable(((PyTypeObject*)__pyx_v_cls), __pyx_v_nrows, __pyx_v_ncols, __pyx_v_it, __pyx_v_kwds);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_kwds);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_4from_iterable(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_nrows, PyObject *__pyx_v_ncols, PyObject *__pyx_v_it, PyObject *__pyx_v_kwds) {
  PyObject *__pyx_v_A = NULL;
  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("from_iterable", 0);

  /* "fpylll/fplll/integer_matrix.pyx":427
 * 
 *         """
 *         A = cls(nrows, ncols, **kwds)             # <<<<<<<<<<<<<<
 *         A.set_iterable(it)
 *         return A
*/
  __pyx_t_2 = NULL;
  __pyx_t_3 = PyDict_Copy(__pyx_v_kwds); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_nrows, __pyx_v_ncols};
    __pyx_t_1 = __Pyx_PyObject_FastCallDict((PyObject*)__pyx_v_cls, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 427, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_A = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":428
 *         """
 *         A = cls(nrows, ncols, **kwds)
 *         A.set_iterable(it)             # <<<<<<<<<<<<<<
 *         return A
 * 
*/
  __pyx_t_3 = __pyx_v_A;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_it};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_iterable, __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, 428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":429
 *         A = cls(nrows, ncols, **kwds)
 *         A.set_iterable(it)
 *         return A             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_A);
  __pyx_r = __pyx_v_A;
  goto __pyx_L0;

  /* "fpylll/fplll/integer_matrix.pyx":413
 *         return B
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_iterable(cls, nrows, ncols, it, **kwds):
 *         """Construct a new integer matrix from matrix-like object A
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.from_iterable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_A);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":431
 *         return A
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def identity(cls, nrows, int_type="mpz"):
 *         """Construct a new identity matrix of dimension ``nrows  nrows``
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_7identity(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_6identity, "IntegerMatrix.identity(cls, nrows, int_type='mpz')\n\nConstruct a new identity matrix of dimension ``nrows \303\227 nrows``\n\n:param nrows: number of rows.\n\n>>> A = IntegerMatrix.identity(4)\n>>> print(A)\n[ 1 0 0 0 ]\n[ 0 1 0 0 ]\n[ 0 0 1 0 ]\n[ 0 0 0 1 ]");
static PyMethodDef __pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_7identity = {"identity", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_7identity, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_6identity};
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_7identity(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_nrows = 0;
  PyObject *__pyx_v_int_type = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("identity (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_nrows,&__pyx_mstate_global->__pyx_n_u_int_type,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, 431, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 431, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 431, __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, "identity", 0) < (0)) __PYX_ERR(0, 431, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_mpz));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("identity", 0, 1, 2, i); __PYX_ERR(0, 431, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 431, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 431, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_mpz));
    }
    __pyx_v_nrows = values[0];
    __pyx_v_int_type = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("identity", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 431, __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("fpylll.fplll.integer_matrix.IntegerMatrix.identity", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_6identity(((PyTypeObject*)__pyx_v_cls), __pyx_v_nrows, __pyx_v_int_type);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_6identity(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_nrows, PyObject *__pyx_v_int_type) {
  struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_A = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("identity", 0);

  /* "fpylll/fplll/integer_matrix.pyx":445
 * 
 *         """
 *         A = IntegerMatrix(nrows, nrows, int_type=int_type)             # <<<<<<<<<<<<<<
 *         A.gen_identity(nrows)
 *         return A
*/
  __pyx_t_2 = NULL;
  __pyx_t_3 = 1;
  {
    PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_v_nrows, __pyx_v_nrows};
    __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 445, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_int_type, __pyx_v_int_type, __pyx_t_4, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 445, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 445, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_v_A = ((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":446
 *         """
 *         A = IntegerMatrix(nrows, nrows, int_type=int_type)
 *         A.gen_identity(nrows)             # <<<<<<<<<<<<<<
 *         return A
 * 
*/
  __pyx_t_4 = ((PyObject *)__pyx_v_A);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_nrows};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_gen_identity, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":447
 *         A = IntegerMatrix(nrows, nrows, int_type=int_type)
 *         A.gen_identity(nrows)
 *         return A             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_A);
  __pyx_r = ((PyObject *)__pyx_v_A);
  goto __pyx_L0;

  /* "fpylll/fplll/integer_matrix.pyx":431
 *         return A
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def identity(cls, nrows, int_type="mpz"):
 *         """Construct a new identity matrix of dimension ``nrows  nrows``
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.identity", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_A);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":449
 *         return A
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def random(cls, d, algorithm, int_type="mpz", **kwds):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_9random(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_8random, "IntegerMatrix.random(cls, d, algorithm, int_type='mpz', **kwds)\n\nConstruct new random matrix.\n\n:param d: dominant size parameter, see below for details\n:param algorithm: type of matrix create, see below for details\n:param int_type: underlying integer type\n\n:returns: a random lattice basis\n\nExamples::\n\n    >>> from fpylll import FPLLL\n    >>> FPLLL.set_random_seed(1337)\n\n    >>> print(IntegerMatrix.random(10, \"intrel\", bits=30))\n    [  285965362 1 0 0 0 0 0 0 0 0 0 ]\n    [  714553900 0 1 0 0 0 0 0 0 0 0 ]\n    [ 1017994245 0 0 1 0 0 0 0 0 0 0 ]\n    [  256743299 0 0 0 1 0 0 0 0 0 0 ]\n    [  602398079 0 0 0 0 1 0 0 0 0 0 ]\n    [  159503182 0 0 0 0 0 1 0 0 0 0 ]\n    [  450941699 0 0 0 0 0 0 1 0 0 0 ]\n    [  125249023 0 0 0 0 0 0 0 1 0 0 ]\n    [  158876382 0 0 0 0 0 0 0 0 1 0 ]\n    [  514616289 0 0 0 0 0 0 0 0 0 1 ]\n\n::\n\n    >>> FPLLL.set_random_seed(1337)\n    >>> print(IntegerMatrix.random(10, \"simdioph\", bits=10, bits2=30))\n    [ 1073741824   50  556    5  899  383  846  771  511  734 ]\n    [          0 1024    0    0    0    0    0    0    0    0 ]\n    [          0    0 1024    0    0    0    0    0    0    0 ]\n    [          0    0    0 1024    0    0    0    0    0    0 ]\n    [          0    0    0    0 1024    0    0    0    0    0 ]\n    [          0    0    0    0    0 1024    0    0    0    0 ]\n    [          0    0    0    0    0    0 1024    0    0    0 ]\n    [          0    0    0    0    0    0    0 1024    0    0 ]\n    [          0    0    0    0    0    0    0    0 1024    0 ]\n    [          0    0    0    0    0    0    0    0    0 1024 ]\n\n\n::\n\n    >>> FPLLL.set_random_seed(1337)\n    >>> print(IntegerMatrix.random(10, \"uniform\", bits=10))\n    [  50 556   5 899 383 846  771 511 734 993 ]\n    [ 325  12 242  43 374 815  437 260 541  50 ]\n    [ 492 174 215 999 186 189  292 497 832 966 ]\n    [ 508 290 160 247 859 817  669 821 258 930 ]\n    [ 510 933 588 895  18 546  393 868 858 790 ]\n    [ 620  72 832 133"" 263 121  724  35 454 385 ]\n    [ 431 347 749 311 911 937   50 160 322 180 ]\n    [ 517 941 184 922 217 563 1008 960  37  85 ]\n    [   5 855 643 824  43 525   37 988 886 118 ]\n    [  27 944 560 993 662 589   20 694 696 205 ]\n\n::\n\n    >>> FPLLL.set_random_seed(1337)\n    >>> print(IntegerMatrix.random(5, \"ntrulike\", q=127))\n    [ 1 0 0 0 0  25  50  44   5   3 ]\n    [ 0 1 0 0 0   3  25  50  44   5 ]\n    [ 0 0 1 0 0   5   3  25  50  44 ]\n    [ 0 0 0 1 0  44   5   3  25  50 ]\n    [ 0 0 0 0 1  50  44   5   3  25 ]\n    [ 0 0 0 0 0 127   0   0   0   0 ]\n    [ 0 0 0 0 0   0 127   0   0   0 ]\n    [ 0 0 0 0 0   0   0 127   0   0 ]\n    [ 0 0 0 0 0   0   0   0 127   0 ]\n    [ 0 0 0 0 0   0   0   0   0 127 ]\n\n::\n\n    >>> FPLLL.set_random_seed(1337)\n    >>> print(IntegerMatrix.random(5, \"ntrulike2\", q=127))\n    [ 127   0   0   0   0 0 0 0 0 0 ]\n    [   0 127   0   0   0 0 0 0 0 0 ]\n    [   0   0 127   0   0 0 0 0 0 0 ]\n    [   0   0   0 127   0 0 0 0 0 0 ]\n    [   0   0   0   0 127 0 0 0 0 0 ]\n    [  25   3   5  44  50 1 0 0 0 0 ]\n    [  50  25   3   5  44 0 1 0 0 0 ]\n    [  44  50  25   3   5 0 0 1 0 0 ]\n    [   5  44  50  25   3 0 0 0 1 0 ]\n    [   3   5  44  50  25 0 0 0 0 1 ]\n\n::\n\n    >>> FPLLL.set_random_seed(1337)\n    >>> print(IntegerMatrix.random(10, \"qary\", k=8, q=127))\n    [ 1 0  50  44   5   3  78   3  94  97 ]\n    [ 0 1  69  12 114  43 118  47  53   4 ]\n    [ 0 0 127   0   0   0   0   0   0   0 ]\n    [ 0 0   0 127   0   0   0   0   0   0 ]\n    [ 0 0   0   0 127   0   0   0   0   0 ]\n    [ 0 0   0   0   0 127   0   0   0   0 ]\n    [ 0 0   0   0   0   0 127   0   0   0 ]\n    [ 0 0   0   0   0   0   0 127   0   0 ]\n    [ 0 0   0   0   0   0   0   0 127   0 ]\n    [ 0 0   0   0   0   0   0   0   0 127 ]\n\n::\n\n    >>> FPLLL.set_random_seed(1337)\n    >>> print(IntegerMatrix.random(10, \"trg\", alpha=0.99))\n    [  228404      0     0      0     0     0    0    0    0   0 ]\n    [  -80428  34992     0      0     0     0""    0    0    0   0 ]\n    [ -104323  -3287 24449      0     0     0    0    0    0   0 ]\n    [  -54019  -5306  9234  42371     0     0    0    0    0   0 ]\n    [  -17118 -13604  6537 -10587  4082     0    0    0    0   0 ]\n    [  108869   8134  4954 -17719 -1984 15326    0    0    0   0 ]\n    [ -111858  -7328  5192   8105 -1109  1910 5818    0    0   0 ]\n    [  -97654 -16219 -2181  14658 -1879  7195 -100 2347    0   0 ]\n    [  -46340  13109  6265  12205 -1848  6113 1049 -170 1810   0 ]\n    [   10290  16293  4131  -4313  -525  2068 -262  248  715 592 ]\n\nAvailable Algorithms:\n\n    - ``\"intrel\"`` - (``bits`` = `b`) generate a knapsack like matrix of dimension `d \303\227\n      (d+1)` and `b` bits: the i-th vector starts with a random integer of bit-length `\342\211\244 b`\n      and the rest is the i-th canonical unit vector.\n\n    - ``\"simdioph\"`` - (``bits`` = `b_1`, ``bits2`` = `b_2`) generate a `d \303\227 d` matrix of a\n      form similar to that is involved when trying to find rational approximations to reals\n      with the same small denominator. The first vector starts with a random integer of\n      bit-length `\342\211\244 b_2` and continues with `d-1` independent integers of bit-lengths `\342\211\244\n      b_1`; the i-th vector for `i>1` is the i-th canonical unit vector scaled by a factor\n      `2^{b_1}`.\n\n    - ``\"uniform\"`` - (``bits`` = `b`) - generate a `d \303\227 d` matrix whose entries are independent\n      integers of bit-lengths `\342\211\244 b`.\n\n    - ``\"ntrulike\"`` - (``bits`` = `b` or ``q``) generate a `2d \303\227 2d` NTRU-like matrix. If\n      ``bits`` is given, then it first samples an integer `q` of bit-length `\342\211\244 b`, whereas\n      if ``q``, then it sets `q` to the provided value. Then it samples a uniform `h` in the\n      ring `Z_q[x]/(x^n-1)`. It finally returns the 2 x 2 block matrix `[[I, rot(h)], [0,\n      qI]]`, where each block is `d x d`, the first row of `rot(h)` is the coefficient\n    ""  vector of `h`, and the i-th row of `rot(h)` is the shift of the (i-1)-th (with last\n      entry put back in first position), for all i>1.\n\n    - ``ntrulike2\"`` - (``bits`` = `b` or ``q``) as the previous option, except that the\n      constructed matrix is `[[qI, 0], [rot(h), I]]`.\n\n    - ``\"qary\"`` - (``bits`` = `b` or ``q``, ``k``) generate a `d \303\227 d` q-ary matrix with\n      determinant `q^k`. If ``bits`` is given, then it first samples an integer `q` of\n      bit-length `\342\211\244 b`; if ``q`` is provided, then set `q` to the provided value. It returns\n      a `2 x 2` block matrix `[[qI, 0], [H, I]]`, where `H` is `k x (d-k)` and uniformly\n      random modulo q. These bases correspond to the SIS/LWE q-ary lattices. Goldstein-Mayer\n      lattices correspond to `k=1` and `q` prime.\n\n    - ``\"trg\"`` - (``alpha``) generate a `d \303\227 d` lower-triangular matrix `B` with\n      `B_{ii} = 2^{(d-i+1)^\\alpha}` for all `i`, and `B_{ij}` is uniform between\n      `-B_{jj}/2` and `B_{jj}/2` for all `j<i`.\n\n:warning: The NTRU options above do *not* produce genuine NTRU lattice with an unusually\n    short dense sublattice.\n\n:seealso: :func:`~IntegerMatrix.randomize`");
static PyMethodDef __pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_9random = {"random", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_9random, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_8random};
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_9random(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_d = 0;
  PyObject *__pyx_v_algorithm = 0;
  PyObject *__pyx_v_int_type = 0;
  PyObject *__pyx_v_kwds = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("random (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);
  __pyx_v_kwds = PyDict_New(); if (unlikely(!__pyx_v_kwds)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwds);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_d,&__pyx_mstate_global->__pyx_n_u_algorithm,&__pyx_mstate_global->__pyx_n_u_int_type,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, 449, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 449, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 449, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 449, __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, __pyx_v_kwds, values, kwd_pos_args, __pyx_kwds_len, "random", 1) < (0)) __PYX_ERR(0, 449, __pyx_L3_error)
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_mpz));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("random", 0, 2, 3, i); __PYX_ERR(0, 449, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 449, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 449, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 449, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_mpz));
    }
    __pyx_v_d = values[0];
    __pyx_v_algorithm = values[1];
    __pyx_v_int_type = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("random", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 449, __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_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.random", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_8random(((PyTypeObject*)__pyx_v_cls), __pyx_v_d, __pyx_v_algorithm, __pyx_v_int_type, __pyx_v_kwds);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_kwds);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_8random(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_d, PyObject *__pyx_v_algorithm, PyObject *__pyx_v_int_type, PyObject *__pyx_v_kwds) {
  struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_A = 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;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("random", 0);

  /* "fpylll/fplll/integer_matrix.pyx":611
 *         :seealso: :func:`~IntegerMatrix.randomize`
 *         """
 *         if algorithm == "intrel":             # <<<<<<<<<<<<<<
 *             A = IntegerMatrix(d, d+1, int_type=int_type)
 *         elif algorithm == "simdioph":
*/
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_algorithm, __pyx_mstate_global->__pyx_n_u_intrel, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 611, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "fpylll/fplll/integer_matrix.pyx":612
 *         """
 *         if algorithm == "intrel":
 *             A = IntegerMatrix(d, d+1, int_type=int_type)             # <<<<<<<<<<<<<<
 *         elif algorithm == "simdioph":
 *             A = IntegerMatrix(d, d, int_type=int_type)
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __Pyx_PyLong_AddObjC(__pyx_v_d, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_v_d, __pyx_t_4};
      __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 612, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_int_type, __pyx_v_int_type, __pyx_t_6, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 612, __pyx_L1_error)
      __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__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_2)) __PYX_ERR(0, 612, __pyx_L1_error)
      __Pyx_GOTREF((PyObject *)__pyx_t_2);
    }
    __pyx_v_A = ((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "fpylll/fplll/integer_matrix.pyx":611
 *         :seealso: :func:`~IntegerMatrix.randomize`
 *         """
 *         if algorithm == "intrel":             # <<<<<<<<<<<<<<
 *             A = IntegerMatrix(d, d+1, int_type=int_type)
 *         elif algorithm == "simdioph":
*/
    goto __pyx_L3;
  }

  /* "fpylll/fplll/integer_matrix.pyx":613
 *         if algorithm == "intrel":
 *             A = IntegerMatrix(d, d+1, int_type=int_type)
 *         elif algorithm == "simdioph":             # <<<<<<<<<<<<<<
 *             A = IntegerMatrix(d, d, int_type=int_type)
 *         elif algorithm == "uniform":
*/
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_algorithm, __pyx_mstate_global->__pyx_n_u_simdioph, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 613, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "fpylll/fplll/integer_matrix.pyx":614
 *             A = IntegerMatrix(d, d+1, int_type=int_type)
 *         elif algorithm == "simdioph":
 *             A = IntegerMatrix(d, d, int_type=int_type)             # <<<<<<<<<<<<<<
 *         elif algorithm == "uniform":
 *             A = IntegerMatrix(d, d, int_type=int_type)
*/
    __pyx_t_6 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_6, __pyx_v_d, __pyx_v_d};
      __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 614, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_int_type, __pyx_v_int_type, __pyx_t_4, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 614, __pyx_L1_error)
      __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 614, __pyx_L1_error)
      __Pyx_GOTREF((PyObject *)__pyx_t_2);
    }
    __pyx_v_A = ((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "fpylll/fplll/integer_matrix.pyx":613
 *         if algorithm == "intrel":
 *             A = IntegerMatrix(d, d+1, int_type=int_type)
 *         elif algorithm == "simdioph":             # <<<<<<<<<<<<<<
 *             A = IntegerMatrix(d, d, int_type=int_type)
 *         elif algorithm == "uniform":
*/
    goto __pyx_L3;
  }

  /* "fpylll/fplll/integer_matrix.pyx":615
 *         elif algorithm == "simdioph":
 *             A = IntegerMatrix(d, d, int_type=int_type)
 *         elif algorithm == "uniform":             # <<<<<<<<<<<<<<
 *             A = IntegerMatrix(d, d, int_type=int_type)
 *         elif algorithm == "ntrulike":
*/
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_algorithm, __pyx_mstate_global->__pyx_n_u_uniform, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 615, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "fpylll/fplll/integer_matrix.pyx":616
 *             A = IntegerMatrix(d, d, int_type=int_type)
 *         elif algorithm == "uniform":
 *             A = IntegerMatrix(d, d, int_type=int_type)             # <<<<<<<<<<<<<<
 *         elif algorithm == "ntrulike":
 *             A = IntegerMatrix(2*d, 2*d, int_type=int_type)
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_v_d, __pyx_v_d};
      __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 616, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_int_type, __pyx_v_int_type, __pyx_t_6, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 616, __pyx_L1_error)
      __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error)
      __Pyx_GOTREF((PyObject *)__pyx_t_2);
    }
    __pyx_v_A = ((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "fpylll/fplll/integer_matrix.pyx":615
 *         elif algorithm == "simdioph":
 *             A = IntegerMatrix(d, d, int_type=int_type)
 *         elif algorithm == "uniform":             # <<<<<<<<<<<<<<
 *             A = IntegerMatrix(d, d, int_type=int_type)
 *         elif algorithm == "ntrulike":
*/
    goto __pyx_L3;
  }

  /* "fpylll/fplll/integer_matrix.pyx":617
 *         elif algorithm == "uniform":
 *             A = IntegerMatrix(d, d, int_type=int_type)
 *         elif algorithm == "ntrulike":             # <<<<<<<<<<<<<<
 *             A = IntegerMatrix(2*d, 2*d, int_type=int_type)
 *         elif algorithm == "ntrulike2":
*/
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_algorithm, __pyx_mstate_global->__pyx_n_u_ntrulike, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 617, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "fpylll/fplll/integer_matrix.pyx":618
 *             A = IntegerMatrix(d, d, int_type=int_type)
 *         elif algorithm == "ntrulike":
 *             A = IntegerMatrix(2*d, 2*d, int_type=int_type)             # <<<<<<<<<<<<<<
 *         elif algorithm == "ntrulike2":
 *             A = IntegerMatrix(2*d, 2*d, int_type=int_type)
*/
    __pyx_t_6 = NULL;
    __pyx_t_4 = __Pyx_PyLong_MultiplyCObj(__pyx_mstate_global->__pyx_int_2, __pyx_v_d, 2, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyLong_MultiplyCObj(__pyx_mstate_global->__pyx_int_2, __pyx_v_d, 2, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_6, __pyx_t_4, __pyx_t_3};
      __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 618, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_int_type, __pyx_v_int_type, __pyx_t_7, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 618, __pyx_L1_error)
      __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
      __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;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 618, __pyx_L1_error)
      __Pyx_GOTREF((PyObject *)__pyx_t_2);
    }
    __pyx_v_A = ((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "fpylll/fplll/integer_matrix.pyx":617
 *         elif algorithm == "uniform":
 *             A = IntegerMatrix(d, d, int_type=int_type)
 *         elif algorithm == "ntrulike":             # <<<<<<<<<<<<<<
 *             A = IntegerMatrix(2*d, 2*d, int_type=int_type)
 *         elif algorithm == "ntrulike2":
*/
    goto __pyx_L3;
  }

  /* "fpylll/fplll/integer_matrix.pyx":619
 *         elif algorithm == "ntrulike":
 *             A = IntegerMatrix(2*d, 2*d, int_type=int_type)
 *         elif algorithm == "ntrulike2":             # <<<<<<<<<<<<<<
 *             A = IntegerMatrix(2*d, 2*d, int_type=int_type)
 *         elif algorithm == "qary":
*/
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_algorithm, __pyx_mstate_global->__pyx_n_u_ntrulike2, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 619, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "fpylll/fplll/integer_matrix.pyx":620
 *             A = IntegerMatrix(2*d, 2*d, int_type=int_type)
 *         elif algorithm == "ntrulike2":
 *             A = IntegerMatrix(2*d, 2*d, int_type=int_type)             # <<<<<<<<<<<<<<
 *         elif algorithm == "qary":
 *             A = IntegerMatrix(d, d, int_type=int_type)
*/
    __pyx_t_7 = NULL;
    __pyx_t_3 = __Pyx_PyLong_MultiplyCObj(__pyx_mstate_global->__pyx_int_2, __pyx_v_d, 2, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 620, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyLong_MultiplyCObj(__pyx_mstate_global->__pyx_int_2, __pyx_v_d, 2, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 620, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_7, __pyx_t_3, __pyx_t_4};
      __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 620, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_int_type, __pyx_v_int_type, __pyx_t_6, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 620, __pyx_L1_error)
      __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__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_2)) __PYX_ERR(0, 620, __pyx_L1_error)
      __Pyx_GOTREF((PyObject *)__pyx_t_2);
    }
    __pyx_v_A = ((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "fpylll/fplll/integer_matrix.pyx":619
 *         elif algorithm == "ntrulike":
 *             A = IntegerMatrix(2*d, 2*d, int_type=int_type)
 *         elif algorithm == "ntrulike2":             # <<<<<<<<<<<<<<
 *             A = IntegerMatrix(2*d, 2*d, int_type=int_type)
 *         elif algorithm == "qary":
*/
    goto __pyx_L3;
  }

  /* "fpylll/fplll/integer_matrix.pyx":621
 *         elif algorithm == "ntrulike2":
 *             A = IntegerMatrix(2*d, 2*d, int_type=int_type)
 *         elif algorithm == "qary":             # <<<<<<<<<<<<<<
 *             A = IntegerMatrix(d, d, int_type=int_type)
 *         elif algorithm == "trg":
*/
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_algorithm, __pyx_mstate_global->__pyx_n_u_qary, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 621, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "fpylll/fplll/integer_matrix.pyx":622
 *             A = IntegerMatrix(2*d, 2*d, int_type=int_type)
 *         elif algorithm == "qary":
 *             A = IntegerMatrix(d, d, int_type=int_type)             # <<<<<<<<<<<<<<
 *         elif algorithm == "trg":
 *             A = IntegerMatrix(d, d, int_type=int_type)
*/
    __pyx_t_6 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_6, __pyx_v_d, __pyx_v_d};
      __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 622, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_int_type, __pyx_v_int_type, __pyx_t_4, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 622, __pyx_L1_error)
      __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 622, __pyx_L1_error)
      __Pyx_GOTREF((PyObject *)__pyx_t_2);
    }
    __pyx_v_A = ((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "fpylll/fplll/integer_matrix.pyx":621
 *         elif algorithm == "ntrulike2":
 *             A = IntegerMatrix(2*d, 2*d, int_type=int_type)
 *         elif algorithm == "qary":             # <<<<<<<<<<<<<<
 *             A = IntegerMatrix(d, d, int_type=int_type)
 *         elif algorithm == "trg":
*/
    goto __pyx_L3;
  }

  /* "fpylll/fplll/integer_matrix.pyx":623
 *         elif algorithm == "qary":
 *             A = IntegerMatrix(d, d, int_type=int_type)
 *         elif algorithm == "trg":             # <<<<<<<<<<<<<<
 *             A = IntegerMatrix(d, d, int_type=int_type)
 *         else:
*/
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_algorithm, __pyx_mstate_global->__pyx_n_u_trg, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 623, __pyx_L1_error)
  if (likely(__pyx_t_1)) {

    /* "fpylll/fplll/integer_matrix.pyx":624
 *             A = IntegerMatrix(d, d, int_type=int_type)
 *         elif algorithm == "trg":
 *             A = IntegerMatrix(d, d, int_type=int_type)             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError("Algorithm '%s' unknown."%algorithm)
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_v_d, __pyx_v_d};
      __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 624, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_int_type, __pyx_v_int_type, __pyx_t_6, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 624, __pyx_L1_error)
      __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 624, __pyx_L1_error)
      __Pyx_GOTREF((PyObject *)__pyx_t_2);
    }
    __pyx_v_A = ((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "fpylll/fplll/integer_matrix.pyx":623
 *         elif algorithm == "qary":
 *             A = IntegerMatrix(d, d, int_type=int_type)
 *         elif algorithm == "trg":             # <<<<<<<<<<<<<<
 *             A = IntegerMatrix(d, d, int_type=int_type)
 *         else:
*/
    goto __pyx_L3;
  }

  /* "fpylll/fplll/integer_matrix.pyx":626
 *             A = IntegerMatrix(d, d, int_type=int_type)
 *         else:
 *             raise ValueError("Algorithm '%s' unknown."%algorithm)             # <<<<<<<<<<<<<<
 *         A.randomize(algorithm, **kwds)
 *         return A
*/
  /*else*/ {
    __pyx_t_6 = NULL;
    __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Algorithm_s_unknown, __pyx_v_algorithm); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 626, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
      __pyx_t_2 = __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_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 626, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 626, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "fpylll/fplll/integer_matrix.pyx":627
 *         else:
 *             raise ValueError("Algorithm '%s' unknown."%algorithm)
 *         A.randomize(algorithm, **kwds)             # <<<<<<<<<<<<<<
 *         return A
 * 
*/
  __pyx_t_4 = NULL;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_A), __pyx_mstate_global->__pyx_n_u_randomize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = PyDict_Copy(__pyx_v_kwds); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (likely(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_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_algorithm};
    __pyx_t_2 = __Pyx_PyObject_FastCallDict((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 627, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":628
 *             raise ValueError("Algorithm '%s' unknown."%algorithm)
 *         A.randomize(algorithm, **kwds)
 *         return A             # <<<<<<<<<<<<<<
 * 
 *     def set_matrix(self, A):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_A);
  __pyx_r = ((PyObject *)__pyx_v_A);
  goto __pyx_L0;

  /* "fpylll/fplll/integer_matrix.pyx":449
 *         return A
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def random(cls, d, algorithm, int_type="mpz", **kwds):
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.random", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_A);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":630
 *         return A
 * 
 *     def set_matrix(self, A):             # <<<<<<<<<<<<<<
 *         """Set this matrix from matrix-like object A.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_11set_matrix(PyObject *__pyx_v_self, 
#if 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_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_10set_matrix, "IntegerMatrix.set_matrix(self, A)\n\nSet this matrix from matrix-like object A.\n\n:param A: a matrix like object, with element access A[i,j] or A[i][j]\n\nExample::\n\n    >>> z = [[1,2,3,4], [5,6,7,8], [9,10,11,12], [13,14,15,16]]\n    >>> A = IntegerMatrix(4, 4)\n    >>> A.set_matrix(z)\n    >>> print(A)\n    [  1  2  3  4 ]\n    [  5  6  7  8 ]\n    [  9 10 11 12 ]\n    [ 13 14 15 16 ]\n\n\n    >>> A = IntegerMatrix(3, 3)\n    >>> A.set_matrix(z)\n    >>> print(A)\n    [ 1  2  3 ]\n    [ 5  6  7 ]\n    [ 9 10 11 ]\n\n.. warning:: entries starting from ``A[nrows, ncols]`` are ignored.");
static PyMethodDef __pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_11set_matrix = {"set_matrix", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_11set_matrix, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_10set_matrix};
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_11set_matrix(PyObject *__pyx_v_self, 
#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_A = 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("set_matrix (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_A,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, 630, __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, 630, __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, "set_matrix", 0) < (0)) __PYX_ERR(0, 630, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_matrix", 1, 1, 1, i); __PYX_ERR(0, 630, __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, 630, __pyx_L3_error)
    }
    __pyx_v_A = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_matrix", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 630, __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("fpylll.fplll.integer_matrix.IntegerMatrix.set_matrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_10set_matrix(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self), __pyx_v_A);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_10set_matrix(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, PyObject *__pyx_v_A) {
  int __pyx_v_i;
  int __pyx_v_j;
  int __pyx_v_m;
  int __pyx_v_n;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  long __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_matrix", 0);

  /* "fpylll/fplll/integer_matrix.pyx":658
 *         """
 *         cdef int i, j
 *         cdef int m = self._nrows()             # <<<<<<<<<<<<<<
 *         cdef int n = self._ncols()
 * 
*/
  __pyx_t_1 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_nrows(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 658, __pyx_L1_error)
  __pyx_v_m = __pyx_t_1;

  /* "fpylll/fplll/integer_matrix.pyx":659
 *         cdef int i, j
 *         cdef int m = self._nrows()
 *         cdef int n = self._ncols()             # <<<<<<<<<<<<<<
 * 
 *         try:
*/
  __pyx_t_1 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_ncols(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 659, __pyx_L1_error)
  __pyx_v_n = __pyx_t_1;

  /* "fpylll/fplll/integer_matrix.pyx":661
 *         cdef int n = self._ncols()
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             for i in range(m):
 *                 for j in range(n):
*/
  {
    __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:*/ {

      /* "fpylll/fplll/integer_matrix.pyx":662
 * 
 *         try:
 *             for i in range(m):             # <<<<<<<<<<<<<<
 *                 for j in range(n):
 *                     self._set(i, j, A[i, j])
*/
      __pyx_t_5 = __pyx_v_m;
      __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;

        /* "fpylll/fplll/integer_matrix.pyx":663
 *         try:
 *             for i in range(m):
 *                 for j in range(n):             # <<<<<<<<<<<<<<
 *                     self._set(i, j, A[i, j])
 *         except TypeError:
*/
        __pyx_t_8 = __pyx_v_n;
        __pyx_t_9 = __pyx_t_8;
        for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
          __pyx_v_j = __pyx_t_10;

          /* "fpylll/fplll/integer_matrix.pyx":664
 *             for i in range(m):
 *                 for j in range(n):
 *                     self._set(i, j, A[i, j])             # <<<<<<<<<<<<<<
 *         except TypeError:
 *             for i in range(m):
*/
          __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v_i); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 664, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_12 = __Pyx_PyLong_From_int(__pyx_v_j); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 664, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 664, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_GIVEREF(__pyx_t_11);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_11) != (0)) __PYX_ERR(0, 664, __pyx_L3_error);
          __Pyx_GIVEREF(__pyx_t_12);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_12) != (0)) __PYX_ERR(0, 664, __pyx_L3_error);
          __pyx_t_11 = 0;
          __pyx_t_12 = 0;
          __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_v_A, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 664, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __pyx_t_14 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_set(__pyx_v_self, __pyx_v_i, __pyx_v_j, __pyx_t_12); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 664, __pyx_L3_error)
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        }
      }

      /* "fpylll/fplll/integer_matrix.pyx":661
 *         cdef int n = self._ncols()
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             for i in range(m):
 *                 for j in range(n):
*/
    }
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __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;

    /* "fpylll/fplll/integer_matrix.pyx":665
 *                 for j in range(n):
 *                     self._set(i, j, A[i, j])
 *         except TypeError:             # <<<<<<<<<<<<<<
 *             for i in range(m):
 *                 for j in range(n):
*/
    __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError))));
    if (__pyx_t_5) {
      __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.set_matrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_11) < 0) __PYX_ERR(0, 665, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_11);

      /* "fpylll/fplll/integer_matrix.pyx":666
 *                     self._set(i, j, A[i, j])
 *         except TypeError:
 *             for i in range(m):             # <<<<<<<<<<<<<<
 *                 for j in range(n):
 *                     self._set(i, j, A[i][j])
*/
      __pyx_t_5 = __pyx_v_m;
      __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;

        /* "fpylll/fplll/integer_matrix.pyx":667
 *         except TypeError:
 *             for i in range(m):
 *                 for j in range(n):             # <<<<<<<<<<<<<<
 *                     self._set(i, j, A[i][j])
 * 
*/
        __pyx_t_8 = __pyx_v_n;
        __pyx_t_9 = __pyx_t_8;
        for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
          __pyx_v_j = __pyx_t_10;

          /* "fpylll/fplll/integer_matrix.pyx":668
 *             for i in range(m):
 *                 for j in range(n):
 *                     self._set(i, j, A[i][j])             # <<<<<<<<<<<<<<
 * 
 *     def set_iterable(self, A):
*/
          __pyx_t_15 = __Pyx_GetItemInt(__pyx_v_A, __pyx_v_i, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 668, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_15);
          __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_15, __pyx_v_j, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 668, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __pyx_t_14 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_set(__pyx_v_self, __pyx_v_i, __pyx_v_j, __pyx_t_16); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 668, __pyx_L5_except_error)
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        }
      }
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;

    /* "fpylll/fplll/integer_matrix.pyx":661
 *         cdef int n = self._ncols()
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             for i in range(m):
 *                 for j in range(n):
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    __pyx_L8_try_end:;
  }

  /* "fpylll/fplll/integer_matrix.pyx":630
 *         return A
 * 
 *     def set_matrix(self, A):             # <<<<<<<<<<<<<<
 *         """Set this matrix from matrix-like object A.
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.set_matrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":670
 *                     self._set(i, j, A[i][j])
 * 
 *     def set_iterable(self, A):             # <<<<<<<<<<<<<<
 *         """Set this matrix from iterable A
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_13set_iterable(PyObject *__pyx_v_self, 
#if 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_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_12set_iterable, "IntegerMatrix.set_iterable(self, A)\n\nSet this matrix from iterable A\n\n:param A: an iterable object such as a list or tuple\n\nEXAMPLE::\n\n    >>> z = range(16)\n    >>> A = IntegerMatrix(4, 4)\n    >>> A.set_iterable(z)\n    >>> print(A)\n    [  0  1  2  3 ]\n    [  4  5  6  7 ]\n    [  8  9 10 11 ]\n    [ 12 13 14 15 ]\n\n    >>> A = IntegerMatrix(3, 3)\n    >>> A.set_iterable(z)\n    >>> print(A)\n    [ 0 1 2 ]\n    [ 3 4 5 ]\n    [ 6 7 8 ]\n\n.. warning:: entries starting at ``A[nrows * ncols]`` are ignored.");
static PyMethodDef __pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_13set_iterable = {"set_iterable", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_13set_iterable, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_12set_iterable};
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_13set_iterable(PyObject *__pyx_v_self, 
#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_A = 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("set_iterable (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_A,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, 670, __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, 670, __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, "set_iterable", 0) < (0)) __PYX_ERR(0, 670, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_iterable", 1, 1, 1, i); __PYX_ERR(0, 670, __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, 670, __pyx_L3_error)
    }
    __pyx_v_A = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_iterable", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 670, __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("fpylll.fplll.integer_matrix.IntegerMatrix.set_iterable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_12set_iterable(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self), __pyx_v_A);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_12set_iterable(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, PyObject *__pyx_v_A) {
  int __pyx_v_i;
  int __pyx_v_j;
  int __pyx_v_m;
  int __pyx_v_n;
  PyObject *__pyx_v_it = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  long __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_iterable", 0);

  /* "fpylll/fplll/integer_matrix.pyx":697
 *         """
 *         cdef int i, j
 *         cdef int m = self._nrows()             # <<<<<<<<<<<<<<
 *         cdef int n = self._ncols()
 *         it = iter(A)
*/
  __pyx_t_1 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_nrows(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 697, __pyx_L1_error)
  __pyx_v_m = __pyx_t_1;

  /* "fpylll/fplll/integer_matrix.pyx":698
 *         cdef int i, j
 *         cdef int m = self._nrows()
 *         cdef int n = self._ncols()             # <<<<<<<<<<<<<<
 *         it = iter(A)
 * 
*/
  __pyx_t_1 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_ncols(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 698, __pyx_L1_error)
  __pyx_v_n = __pyx_t_1;

  /* "fpylll/fplll/integer_matrix.pyx":699
 *         cdef int m = self._nrows()
 *         cdef int n = self._ncols()
 *         it = iter(A)             # <<<<<<<<<<<<<<
 * 
 *         for i in range(m):
*/
  __pyx_t_2 = PyObject_GetIter(__pyx_v_A); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_it = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":701
 *         it = iter(A)
 * 
 *         for i in range(m):             # <<<<<<<<<<<<<<
 *             for j in range(n):
 *                 self._set(i, j, next(it))
*/
  __pyx_t_3 = __pyx_v_m;
  __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;

    /* "fpylll/fplll/integer_matrix.pyx":702
 * 
 *         for i in range(m):
 *             for j in range(n):             # <<<<<<<<<<<<<<
 *                 self._set(i, j, next(it))
 * 
*/
    __pyx_t_6 = __pyx_v_n;
    __pyx_t_7 = __pyx_t_6;
    for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
      __pyx_v_j = __pyx_t_8;

      /* "fpylll/fplll/integer_matrix.pyx":703
 *         for i in range(m):
 *             for j in range(n):
 *                 self._set(i, j, next(it))             # <<<<<<<<<<<<<<
 * 
 *     def to_matrix(self, A):
*/
      __pyx_t_2 = __Pyx_PyIter_Next(__pyx_v_it); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 703, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_set(__pyx_v_self, __pyx_v_i, __pyx_v_j, __pyx_t_2); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 703, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
  }

  /* "fpylll/fplll/integer_matrix.pyx":670
 *                     self._set(i, j, A[i][j])
 * 
 *     def set_iterable(self, A):             # <<<<<<<<<<<<<<
 *         """Set this matrix from iterable A
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.set_iterable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_it);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":705
 *                 self._set(i, j, next(it))
 * 
 *     def to_matrix(self, A):             # <<<<<<<<<<<<<<
 *         """Write this matrix to matrix-like object A
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_15to_matrix(PyObject *__pyx_v_self, 
#if 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_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_14to_matrix, "IntegerMatrix.to_matrix(self, A)\n\nWrite this matrix to matrix-like object A\n\n:param A: a matrix like object, with element access A[i,j] or A[i][j]\n:returns: A\n\nExample::\n\n    >>> from fpylll import FPLLL\n    >>> z = [[0 for _ in range(10)] for _ in range(10)]\n    >>> A = IntegerMatrix.random(10, \"qary\", q=127, k=5)\n    >>> _ = A.to_matrix(z)\n    >>> z[0] == list(A[0])\n    True");
static PyMethodDef __pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_15to_matrix = {"to_matrix", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_15to_matrix, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_14to_matrix};
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_15to_matrix(PyObject *__pyx_v_self, 
#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_A = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_matrix (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_A,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, 705, __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, 705, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_matrix", 0) < (0)) __PYX_ERR(0, 705, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_matrix", 1, 1, 1, i); __PYX_ERR(0, 705, __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, 705, __pyx_L3_error)
    }
    __pyx_v_A = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_matrix", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 705, __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("fpylll.fplll.integer_matrix.IntegerMatrix.to_matrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_14to_matrix(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self), __pyx_v_A);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_14to_matrix(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, PyObject *__pyx_v_A) {
  int __pyx_v_i;
  int __pyx_v_j;
  int __pyx_v_m;
  int __pyx_v_n;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  long __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  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("to_matrix", 0);

  /* "fpylll/fplll/integer_matrix.pyx":722
 *         """
 *         cdef int i, j
 *         cdef int m = self._nrows()             # <<<<<<<<<<<<<<
 *         cdef int n = self._ncols()
 * 
*/
  __pyx_t_1 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_nrows(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L1_error)
  __pyx_v_m = __pyx_t_1;

  /* "fpylll/fplll/integer_matrix.pyx":723
 *         cdef int i, j
 *         cdef int m = self._nrows()
 *         cdef int n = self._ncols()             # <<<<<<<<<<<<<<
 * 
 *         try:
*/
  __pyx_t_1 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_ncols(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 723, __pyx_L1_error)
  __pyx_v_n = __pyx_t_1;

  /* "fpylll/fplll/integer_matrix.pyx":725
 *         cdef int n = self._ncols()
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             for i in range(m):
 *                 for j in range(n):
*/
  {
    __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:*/ {

      /* "fpylll/fplll/integer_matrix.pyx":726
 * 
 *         try:
 *             for i in range(m):             # <<<<<<<<<<<<<<
 *                 for j in range(n):
 *                     A[i, j] = self._get(i, j)
*/
      __pyx_t_5 = __pyx_v_m;
      __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;

        /* "fpylll/fplll/integer_matrix.pyx":727
 *         try:
 *             for i in range(m):
 *                 for j in range(n):             # <<<<<<<<<<<<<<
 *                     A[i, j] = self._get(i, j)
 *         except TypeError:
*/
        __pyx_t_8 = __pyx_v_n;
        __pyx_t_9 = __pyx_t_8;
        for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
          __pyx_v_j = __pyx_t_10;

          /* "fpylll/fplll/integer_matrix.pyx":728
 *             for i in range(m):
 *                 for j in range(n):
 *                     A[i, j] = self._get(i, j)             # <<<<<<<<<<<<<<
 *         except TypeError:
 *             for i in range(m):
*/
          __pyx_t_11 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_get(__pyx_v_self, __pyx_v_i, __pyx_v_j); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 728, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_12 = __Pyx_PyLong_From_int(__pyx_v_i); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 728, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_13 = __Pyx_PyLong_From_int(__pyx_v_j); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 728, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 728, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_GIVEREF(__pyx_t_12);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_12) != (0)) __PYX_ERR(0, 728, __pyx_L3_error);
          __Pyx_GIVEREF(__pyx_t_13);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_13) != (0)) __PYX_ERR(0, 728, __pyx_L3_error);
          __pyx_t_12 = 0;
          __pyx_t_13 = 0;
          if (unlikely((PyObject_SetItem(__pyx_v_A, __pyx_t_14, __pyx_t_11) < 0))) __PYX_ERR(0, 728, __pyx_L3_error)
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        }
      }

      /* "fpylll/fplll/integer_matrix.pyx":725
 *         cdef int n = self._ncols()
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             for i in range(m):
 *                 for j in range(n):
*/
    }
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __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;

    /* "fpylll/fplll/integer_matrix.pyx":729
 *                 for j in range(n):
 *                     A[i, j] = self._get(i, j)
 *         except TypeError:             # <<<<<<<<<<<<<<
 *             for i in range(m):
 *                 for j in range(n):
*/
    __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError))));
    if (__pyx_t_5) {
      __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.to_matrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_11, &__pyx_t_14, &__pyx_t_13) < 0) __PYX_ERR(0, 729, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_13);

      /* "fpylll/fplll/integer_matrix.pyx":730
 *                     A[i, j] = self._get(i, j)
 *         except TypeError:
 *             for i in range(m):             # <<<<<<<<<<<<<<
 *                 for j in range(n):
 *                     A[i][j] = self._get(i, j)
*/
      __pyx_t_5 = __pyx_v_m;
      __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;

        /* "fpylll/fplll/integer_matrix.pyx":731
 *         except TypeError:
 *             for i in range(m):
 *                 for j in range(n):             # <<<<<<<<<<<<<<
 *                     A[i][j] = self._get(i, j)
 *         return A
*/
        __pyx_t_8 = __pyx_v_n;
        __pyx_t_9 = __pyx_t_8;
        for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
          __pyx_v_j = __pyx_t_10;

          /* "fpylll/fplll/integer_matrix.pyx":732
 *             for i in range(m):
 *                 for j in range(n):
 *                     A[i][j] = self._get(i, j)             # <<<<<<<<<<<<<<
 *         return A
 * 
*/
          __pyx_t_12 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_get(__pyx_v_self, __pyx_v_i, __pyx_v_j); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 732, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_15 = __Pyx_GetItemInt(__pyx_v_A, __pyx_v_i, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 732, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_15);
          if (unlikely((__Pyx_SetItemInt(__pyx_t_15, __pyx_v_j, __pyx_t_12, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(0, 732, __pyx_L5_except_error)
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        }
      }
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;

    /* "fpylll/fplll/integer_matrix.pyx":725
 *         cdef int n = self._ncols()
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             for i in range(m):
 *                 for j in range(n):
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    __pyx_L8_try_end:;
  }

  /* "fpylll/fplll/integer_matrix.pyx":733
 *                 for j in range(n):
 *                     A[i][j] = self._get(i, j)
 *         return A             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_A);
  __pyx_r = __pyx_v_A;
  goto __pyx_L0;

  /* "fpylll/fplll/integer_matrix.pyx":705
 *                 self._set(i, j, next(it))
 * 
 *     def to_matrix(self, A):             # <<<<<<<<<<<<<<
 *         """Write this matrix to matrix-like object A
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.to_matrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":735
 *         return A
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Delete integer matrix
*/

/* Python wrapper */
static void __pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_17__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_17__dealloc__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_16__dealloc__(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self));

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

static void __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_16__dealloc__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self) {

  /* "fpylll/fplll/integer_matrix.pyx":739
 *         Delete integer matrix
 *         """
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             del self._core.mpz
 *         elif self._type == ZT_LONG:
*/
  switch (__pyx_v_self->_type) {
    case fplll::ZT_MPZ:

    /* "fpylll/fplll/integer_matrix.pyx":740
 *         """
 *         if self._type == ZT_MPZ:
 *             del self._core.mpz             # <<<<<<<<<<<<<<
 *         elif self._type == ZT_LONG:
 *             del self._core.long
*/
    delete __pyx_v_self->_core.mpz;

    /* "fpylll/fplll/integer_matrix.pyx":739
 *         Delete integer matrix
 *         """
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             del self._core.mpz
 *         elif self._type == ZT_LONG:
*/
    break;
    case fplll::ZT_LONG:

    /* "fpylll/fplll/integer_matrix.pyx":742
 *             del self._core.mpz
 *         elif self._type == ZT_LONG:
 *             del self._core.long             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
*/
    delete __pyx_v_self->_core.__pyx_long;

    /* "fpylll/fplll/integer_matrix.pyx":741
 *         if self._type == ZT_MPZ:
 *             del self._core.mpz
 *         elif self._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *             del self._core.long
 * 
*/
    break;
    default: break;
  }

  /* "fpylll/fplll/integer_matrix.pyx":735
 *         return A
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Delete integer matrix
*/

  /* function exit code */
}

/* "fpylll/fplll/integer_matrix.pyx":744
 *             del self._core.long
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         """Short representation.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_19__repr__(PyObject *__pyx_v_self); /*proto*/
PyDoc_STRVAR(__pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_18__repr__, "IntegerMatrix.__repr__(self)\n\nShort representation.\n\n        ");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_18__repr__;
#endif
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_19__repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_18__repr__(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self));

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

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_18__repr__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  long __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[7];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "fpylll/fplll/integer_matrix.pyx":748
 * 
 *         """
 *         return "<IntegerMatrix(%d, %d) at %s>" % (             # <<<<<<<<<<<<<<
 *             self._nrows(), self._ncols(), hex(id(self)))
 * 
*/
  __Pyx_XDECREF(__pyx_r);

  /* "fpylll/fplll/integer_matrix.pyx":749
 *         """
 *         return "<IntegerMatrix(%d, %d) at %s>" % (
 *             self._nrows(), self._ncols(), hex(id(self)))             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
*/
  __pyx_t_1 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_nrows(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 749, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyUnicode_From_long(__pyx_t_1, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_ncols(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 749, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyUnicode_From_long(__pyx_t_1, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyNumber_Hex(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyUnicode_Unicode(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_IntegerMatrix;
  __pyx_t_6[1] = __pyx_t_2;
  __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u__2;
  __pyx_t_6[3] = __pyx_t_3;
  __pyx_t_6[4] = __pyx_mstate_global->__pyx_kp_u_at;
  __pyx_t_6[5] = __pyx_t_4;
  __pyx_t_6[6] = __pyx_mstate_global->__pyx_kp_u__4;

  /* "fpylll/fplll/integer_matrix.pyx":748
 * 
 *         """
 *         return "<IntegerMatrix(%d, %d) at %s>" % (             # <<<<<<<<<<<<<<
 *             self._nrows(), self._ncols(), hex(id(self)))
 * 
*/
  __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_6, 7, 15 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 5 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4));
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __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_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "fpylll/fplll/integer_matrix.pyx":744
 *             del self._core.long
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         """Short representation.
 * 
*/

  /* 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("fpylll.fplll.integer_matrix.IntegerMatrix.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":751
 *             self._nrows(), self._ncols(), hex(id(self)))
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         """Full string representation of this matrix.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_21__str__(PyObject *__pyx_v_self); /*proto*/
PyDoc_STRVAR(__pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_20__str__, "IntegerMatrix.__str__(self)\n\nFull string representation of this matrix.\n\n        ");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_20__str__;
#endif
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_21__str__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_20__str__(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self));

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

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_20__str__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self) {
  int __pyx_v_i;
  int __pyx_v_j;
  PyObject *__pyx_v_max_length = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_length = NULL;
  PyObject *__pyx_v_r = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  long __pyx_t_2;
  long __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  long __pyx_t_6;
  long __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "fpylll/fplll/integer_matrix.pyx":756
 *         """
 *         cdef int i, j
 *         max_length = []             # <<<<<<<<<<<<<<
 *         for j in range(self._ncols()):
 *             max_length.append(1)
*/
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_max_length = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":757
 *         cdef int i, j
 *         max_length = []
 *         for j in range(self._ncols()):             # <<<<<<<<<<<<<<
 *             max_length.append(1)
 *             for i in range(self._nrows()):
*/
  __pyx_t_2 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_ncols(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 757, __pyx_L1_error)
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_j = __pyx_t_4;

    /* "fpylll/fplll/integer_matrix.pyx":758
 *         max_length = []
 *         for j in range(self._ncols()):
 *             max_length.append(1)             # <<<<<<<<<<<<<<
 *             for i in range(self._nrows()):
 *                 value = self._get(i, j)
*/
    __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_max_length, __pyx_mstate_global->__pyx_int_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 758, __pyx_L1_error)

    /* "fpylll/fplll/integer_matrix.pyx":759
 *         for j in range(self._ncols()):
 *             max_length.append(1)
 *             for i in range(self._nrows()):             # <<<<<<<<<<<<<<
 *                 value = self._get(i, j)
 *                 if not value:
*/
    __pyx_t_6 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_nrows(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 759, __pyx_L1_error)
    __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;

      /* "fpylll/fplll/integer_matrix.pyx":760
 *             max_length.append(1)
 *             for i in range(self._nrows()):
 *                 value = self._get(i, j)             # <<<<<<<<<<<<<<
 *                 if not value:
 *                     continue
*/
      __pyx_t_1 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_get(__pyx_v_self, __pyx_v_i, __pyx_v_j); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 760, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "fpylll/fplll/integer_matrix.pyx":761
 *             for i in range(self._nrows()):
 *                 value = self._get(i, j)
 *                 if not value:             # <<<<<<<<<<<<<<
 *                     continue
 *                 length = ceil(log10(abs(value)))
*/
      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 761, __pyx_L1_error)
      __pyx_t_10 = (!__pyx_t_9);
      if (__pyx_t_10) {

        /* "fpylll/fplll/integer_matrix.pyx":762
 *                 value = self._get(i, j)
 *                 if not value:
 *                     continue             # <<<<<<<<<<<<<<
 *                 length = ceil(log10(abs(value)))
 *                 length += int(ceil(log10(abs(value))) == floor(log10(abs(value))))
*/
        goto __pyx_L5_continue;

        /* "fpylll/fplll/integer_matrix.pyx":761
 *             for i in range(self._nrows()):
 *                 value = self._get(i, j)
 *                 if not value:             # <<<<<<<<<<<<<<
 *                     continue
 *                 length = ceil(log10(abs(value)))
*/
      }

      /* "fpylll/fplll/integer_matrix.pyx":763
 *                 if not value:
 *                     continue
 *                 length = ceil(log10(abs(value)))             # <<<<<<<<<<<<<<
 *                 length += int(ceil(log10(abs(value))) == floor(log10(abs(value))))
 *                 # sign
*/
      __pyx_t_11 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_ceil); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 763, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_14 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_log10); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 763, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_16 = __Pyx_PyNumber_Absolute(__pyx_v_value); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 763, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_17 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_15))) {
        __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_15);
        assert(__pyx_t_14);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_15);
        __Pyx_INCREF(__pyx_t_14);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_15, __pyx__function);
        __pyx_t_17 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_16};
        __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_15, __pyx_callargs+__pyx_t_17, (2-__pyx_t_17) | (__pyx_t_17*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __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_13)) __PYX_ERR(0, 763, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
      }
      __pyx_t_17 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_12))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_12);
        assert(__pyx_t_11);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_12, __pyx__function);
        __pyx_t_17 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_13};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_17, (2-__pyx_t_17) | (__pyx_t_17*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 763, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "fpylll/fplll/integer_matrix.pyx":764
 *                     continue
 *                 length = ceil(log10(abs(value)))
 *                 length += int(ceil(log10(abs(value))) == floor(log10(abs(value))))             # <<<<<<<<<<<<<<
 *                 # sign
 *                 length += int(value < 0)
*/
      __pyx_t_12 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_ceil); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 764, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_15 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_log10); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 764, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_14 = __Pyx_PyNumber_Absolute(__pyx_v_value); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 764, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_17 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_16))) {
        __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_16);
        assert(__pyx_t_15);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_16);
        __Pyx_INCREF(__pyx_t_15);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_16, __pyx__function);
        __pyx_t_17 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_14};
        __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_16, __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_14); __pyx_t_14 = 0;
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 764, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
      }
      __pyx_t_17 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_13))) {
        __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_13);
        assert(__pyx_t_12);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_13);
        __Pyx_INCREF(__pyx_t_12);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_13, __pyx__function);
        __pyx_t_17 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_11};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_17, (2-__pyx_t_17) | (__pyx_t_17*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 764, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_11 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_floor); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 764, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_14 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_log10); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 764, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_18 = __Pyx_PyNumber_Absolute(__pyx_v_value); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 764, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      __pyx_t_17 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_15))) {
        __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_15);
        assert(__pyx_t_14);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_15);
        __Pyx_INCREF(__pyx_t_14);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_15, __pyx__function);
        __pyx_t_17 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_18};
        __pyx_t_16 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_15, __pyx_callargs+__pyx_t_17, (2-__pyx_t_17) | (__pyx_t_17*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 764, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
      }
      __pyx_t_17 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_12))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_12);
        assert(__pyx_t_11);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_12, __pyx__function);
        __pyx_t_17 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_16};
        __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_17, (2-__pyx_t_17) | (__pyx_t_17*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 764, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
      }
      __pyx_t_12 = PyObject_RichCompare(__pyx_t_1, __pyx_t_13, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 764, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_13 = __Pyx_PyNumber_Int(__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 764, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_12 = PyNumber_InPlaceAdd(__pyx_v_length, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 764, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF_SET(__pyx_v_length, __pyx_t_12);
      __pyx_t_12 = 0;

      /* "fpylll/fplll/integer_matrix.pyx":766
 *                 length += int(ceil(log10(abs(value))) == floor(log10(abs(value))))
 *                 # sign
 *                 length += int(value < 0)             # <<<<<<<<<<<<<<
 *                 if length > max_length[j]:
 *                     max_length[j] = int(length)
*/
      __pyx_t_12 = PyObject_RichCompare(__pyx_v_value, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 766, __pyx_L1_error)
      __pyx_t_13 = __Pyx_PyNumber_Int(__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 766, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_12 = PyNumber_InPlaceAdd(__pyx_v_length, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 766, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF_SET(__pyx_v_length, __pyx_t_12);
      __pyx_t_12 = 0;

      /* "fpylll/fplll/integer_matrix.pyx":767
 *                 # sign
 *                 length += int(value < 0)
 *                 if length > max_length[j]:             # <<<<<<<<<<<<<<
 *                     max_length[j] = int(length)
 * 
*/
      __pyx_t_12 = __Pyx_GetItemInt_List(__pyx_v_max_length, __pyx_v_j, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_13 = PyObject_RichCompare(__pyx_v_length, __pyx_t_12, Py_GT); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 767, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 767, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      if (__pyx_t_10) {

        /* "fpylll/fplll/integer_matrix.pyx":768
 *                 length += int(value < 0)
 *                 if length > max_length[j]:
 *                     max_length[j] = int(length)             # <<<<<<<<<<<<<<
 * 
 *         r = []
*/
        __pyx_t_13 = __Pyx_PyNumber_Int(__pyx_v_length); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 768, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        if (unlikely((__Pyx_SetItemInt(__pyx_v_max_length, __pyx_v_j, __pyx_t_13, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(0, 768, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

        /* "fpylll/fplll/integer_matrix.pyx":767
 *                 # sign
 *                 length += int(value < 0)
 *                 if length > max_length[j]:             # <<<<<<<<<<<<<<
 *                     max_length[j] = int(length)
 * 
*/
      }
      __pyx_L5_continue:;
    }
  }

  /* "fpylll/fplll/integer_matrix.pyx":770
 *                     max_length[j] = int(length)
 * 
 *         r = []             # <<<<<<<<<<<<<<
 *         for i in range(self._nrows()):
 *             r.append(["["])
*/
  __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_v_r = __pyx_t_13;
  __pyx_t_13 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":771
 * 
 *         r = []
 *         for i in range(self._nrows()):             # <<<<<<<<<<<<<<
 *             r.append(["["])
 *             for j in range(self._ncols()):
*/
  __pyx_t_2 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_nrows(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 771, __pyx_L1_error)
  __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;

    /* "fpylll/fplll/integer_matrix.pyx":772
 *         r = []
 *         for i in range(self._nrows()):
 *             r.append(["["])             # <<<<<<<<<<<<<<
 *             for j in range(self._ncols()):
 *                 r[-1].append(("%%%dd"%max_length[j])%self._get(i,j))
*/
    __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 772, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u__5);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_kp_u__5);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_mstate_global->__pyx_kp_u__5) != (0)) __PYX_ERR(0, 772, __pyx_L1_error);
    __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_r, __pyx_t_13); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 772, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

    /* "fpylll/fplll/integer_matrix.pyx":773
 *         for i in range(self._nrows()):
 *             r.append(["["])
 *             for j in range(self._ncols()):             # <<<<<<<<<<<<<<
 *                 r[-1].append(("%%%dd"%max_length[j])%self._get(i,j))
 *             r[-1].append("]")
*/
    __pyx_t_6 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_ncols(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 773, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_6;
    for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
      __pyx_v_j = __pyx_t_8;

      /* "fpylll/fplll/integer_matrix.pyx":774
 *             r.append(["["])
 *             for j in range(self._ncols()):
 *                 r[-1].append(("%%%dd"%max_length[j])%self._get(i,j))             # <<<<<<<<<<<<<<
 *             r[-1].append("]")
 *             r[-1] = " ".join(r[-1])
*/
      __pyx_t_13 = __Pyx_GetItemInt(__pyx_v_r, -1L, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 774, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_12 = __Pyx_GetItemInt_List(__pyx_v_max_length, __pyx_v_j, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 774, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_dd, __pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 774, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_12 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_get(__pyx_v_self, __pyx_v_i, __pyx_v_j); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 774, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_16 = __Pyx_PyUnicode_FormatSafe(__pyx_t_1, __pyx_t_12); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 774, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_5 = __Pyx_PyObject_Append(__pyx_t_13, __pyx_t_16); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 774, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    }

    /* "fpylll/fplll/integer_matrix.pyx":775
 *             for j in range(self._ncols()):
 *                 r[-1].append(("%%%dd"%max_length[j])%self._get(i,j))
 *             r[-1].append("]")             # <<<<<<<<<<<<<<
 *             r[-1] = " ".join(r[-1])
 *         r = "\n".join(r)
*/
    __pyx_t_16 = __Pyx_GetItemInt(__pyx_v_r, -1L, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 775, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_5 = __Pyx_PyObject_Append(__pyx_t_16, __pyx_mstate_global->__pyx_kp_u__6); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 775, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

    /* "fpylll/fplll/integer_matrix.pyx":776
 *                 r[-1].append(("%%%dd"%max_length[j])%self._get(i,j))
 *             r[-1].append("]")
 *             r[-1] = " ".join(r[-1])             # <<<<<<<<<<<<<<
 *         r = "\n".join(r)
 *         return r
*/
    __pyx_t_16 = __Pyx_GetItemInt(__pyx_v_r, -1L, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 776, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_13 = PyUnicode_Join(__pyx_mstate_global->__pyx_kp_u__7, __pyx_t_16); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 776, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    if (unlikely((__Pyx_SetItemInt(__pyx_v_r, -1L, __pyx_t_13, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(0, 776, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  }

  /* "fpylll/fplll/integer_matrix.pyx":777
 *             r[-1].append("]")
 *             r[-1] = " ".join(r[-1])
 *         r = "\n".join(r)             # <<<<<<<<<<<<<<
 *         return r
 * 
*/
  __pyx_t_13 = PyUnicode_Join(__pyx_mstate_global->__pyx_kp_u__8, __pyx_v_r); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF_SET(__pyx_v_r, __pyx_t_13);
  __pyx_t_13 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":778
 *             r[-1] = " ".join(r[-1])
 *         r = "\n".join(r)
 *         return r             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_r);
  __pyx_r = __pyx_v_r;
  goto __pyx_L0;

  /* "fpylll/fplll/integer_matrix.pyx":751
 *             self._nrows(), self._ncols(), hex(id(self)))
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         """Full string representation of this matrix.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __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("fpylll.fplll.integer_matrix.IntegerMatrix.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_max_length);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_length);
  __Pyx_XDECREF(__pyx_v_r);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":780
 *         return r
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def int_type(self):
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_8int_type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_8int_type_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_8int_type___get__(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self));

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

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_8int_type___get__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "fpylll/fplll/integer_matrix.pyx":784
 *         """
 *         """
 *         if self._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *             return "long"
 *         if self._type == ZT_MPZ:
*/
  __pyx_t_1 = (__pyx_v_self->_type == fplll::ZT_LONG);
  if (__pyx_t_1) {

    /* "fpylll/fplll/integer_matrix.pyx":785
 *         """
 *         if self._type == ZT_LONG:
 *             return "long"             # <<<<<<<<<<<<<<
 *         if self._type == ZT_MPZ:
 *             return "mpz"
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_long);
    __pyx_r = __pyx_mstate_global->__pyx_n_u_long;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":784
 *         """
 *         """
 *         if self._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *             return "long"
 *         if self._type == ZT_MPZ:
*/
  }

  /* "fpylll/fplll/integer_matrix.pyx":786
 *         if self._type == ZT_LONG:
 *             return "long"
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             return "mpz"
 * 
*/
  __pyx_t_1 = (__pyx_v_self->_type == fplll::ZT_MPZ);
  if (__pyx_t_1) {

    /* "fpylll/fplll/integer_matrix.pyx":787
 *             return "long"
 *         if self._type == ZT_MPZ:
 *             return "mpz"             # <<<<<<<<<<<<<<
 * 
 *         raise RuntimeError("Integer type '%s' not understood."%self._type)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_mpz);
    __pyx_r = __pyx_mstate_global->__pyx_n_u_mpz;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":786
 *         if self._type == ZT_LONG:
 *             return "long"
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             return "mpz"
 * 
*/
  }

  /* "fpylll/fplll/integer_matrix.pyx":789
 *             return "mpz"
 * 
 *         raise RuntimeError("Integer type '%s' not understood."%self._type)             # <<<<<<<<<<<<<<
 * 
 *     def __copy__(self):
*/
  __pyx_t_3 = NULL;
  __pyx_t_4 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 789, __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(0, 789, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __PYX_ERR(0, 789, __pyx_L1_error)

  /* "fpylll/fplll/integer_matrix.pyx":780
 *         return r
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def int_type(self):
 *         """
*/

  /* 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("fpylll.fplll.integer_matrix.IntegerMatrix.int_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":791
 *         raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def __copy__(self):             # <<<<<<<<<<<<<<
 *         """Copy this matrix.
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_23__copy__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_22__copy__, "IntegerMatrix.__copy__(self)\n\nCopy this matrix.\n        ");
static PyMethodDef __pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_23__copy__ = {"__copy__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_23__copy__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_22__copy__};
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_23__copy__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__copy__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__copy__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__copy__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_22__copy__(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self));

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

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_22__copy__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self) {
  struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_A = 0;
  int __pyx_v_i;
  int __pyx_v_j;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  long __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;
  long __pyx_t_9;
  int __pyx_t_10;
  long __pyx_t_11;
  long __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__copy__", 0);

  /* "fpylll/fplll/integer_matrix.pyx":794
 *         """Copy this matrix.
 *         """
 *         cdef IntegerMatrix A = IntegerMatrix(self._nrows(), self._ncols(), int_type=self.int_type)             # <<<<<<<<<<<<<<
 *         cdef int i, j
 *         for i in range(self._nrows()):
*/
  __pyx_t_2 = NULL;
  __pyx_t_3 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_nrows(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 794, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyLong_From_long(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_ncols(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 794, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyLong_From_long(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_int_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = 1;
  {
    PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_4, __pyx_t_5};
    __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 794, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_int_type, __pyx_t_6, __pyx_t_8, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 794, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 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_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 794, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_v_A = ((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":796
 *         cdef IntegerMatrix A = IntegerMatrix(self._nrows(), self._ncols(), int_type=self.int_type)
 *         cdef int i, j
 *         for i in range(self._nrows()):             # <<<<<<<<<<<<<<
 *             for j in range(self._ncols()):
 *                 A._set(i, j, self._get(i,j))
*/
  __pyx_t_3 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_nrows(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 796, __pyx_L1_error)
  __pyx_t_9 = __pyx_t_3;
  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
    __pyx_v_i = __pyx_t_10;

    /* "fpylll/fplll/integer_matrix.pyx":797
 *         cdef int i, j
 *         for i in range(self._nrows()):
 *             for j in range(self._ncols()):             # <<<<<<<<<<<<<<
 *                 A._set(i, j, self._get(i,j))
 *         return A
*/
    __pyx_t_11 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_ncols(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 797, __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_j = __pyx_t_13;

      /* "fpylll/fplll/integer_matrix.pyx":798
 *         for i in range(self._nrows()):
 *             for j in range(self._ncols()):
 *                 A._set(i, j, self._get(i,j))             # <<<<<<<<<<<<<<
 *         return A
 * 
*/
      __pyx_t_1 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_get(__pyx_v_self, __pyx_v_i, __pyx_v_j); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 798, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_14 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_A->__pyx_vtab)->_set(__pyx_v_A, __pyx_v_i, __pyx_v_j, __pyx_t_1); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 798, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
  }

  /* "fpylll/fplll/integer_matrix.pyx":799
 *             for j in range(self._ncols()):
 *                 A._set(i, j, self._get(i,j))
 *         return A             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_A);
  __pyx_r = ((PyObject *)__pyx_v_A);
  goto __pyx_L0;

  /* "fpylll/fplll/integer_matrix.pyx":791
 *         raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def __copy__(self):             # <<<<<<<<<<<<<<
 *         """Copy this matrix.
 *         """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.__copy__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_A);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":801
 *         return A
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         """Serialize this matrix
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_25__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_24__reduce__, "IntegerMatrix.__reduce__(self)\n\nSerialize this matrix\n\n>>> import pickle\n>>> A = IntegerMatrix.random(10, \"uniform\", bits=20)\n>>> pickle.loads(pickle.dumps(A)) == A\nTrue");
static PyMethodDef __pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_25__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_25__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_24__reduce__};
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_25__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_24__reduce__(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self));

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

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_24__reduce__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self) {
  int __pyx_v_i;
  int __pyx_v_j;
  PyObject *__pyx_v_l = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  long __pyx_t_2;
  long __pyx_t_3;
  int __pyx_t_4;
  long __pyx_t_5;
  long __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  size_t __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce__", 0);

  /* "fpylll/fplll/integer_matrix.pyx":811
 *         """
 *         cdef int i, j
 *         l = []             # <<<<<<<<<<<<<<
 *         if self._type == ZT_MPZ:
 *             for i in range(self._nrows()):
*/
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_l = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":812
 *         cdef int i, j
 *         l = []
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             for i in range(self._nrows()):
 *                 for j in range(self._ncols()):
*/
  switch (__pyx_v_self->_type) {
    case fplll::ZT_MPZ:

    /* "fpylll/fplll/integer_matrix.pyx":813
 *         l = []
 *         if self._type == ZT_MPZ:
 *             for i in range(self._nrows()):             # <<<<<<<<<<<<<<
 *                 for j in range(self._ncols()):
 *                     # mpz_get_pyintlong ensure pickles work between Sage & not-Sage
*/
    __pyx_t_2 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_nrows(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 813, __pyx_L1_error)
    __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;

      /* "fpylll/fplll/integer_matrix.pyx":814
 *         if self._type == ZT_MPZ:
 *             for i in range(self._nrows()):
 *                 for j in range(self._ncols()):             # <<<<<<<<<<<<<<
 *                     # mpz_get_pyintlong ensure pickles work between Sage & not-Sage
 *                     l.append(int(mpz_get_pyintlong(self._core.mpz[0][i][j].get_data())))
*/
      __pyx_t_5 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_ncols(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 814, __pyx_L1_error)
      __pyx_t_6 = __pyx_t_5;
      for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
        __pyx_v_j = __pyx_t_7;

        /* "fpylll/fplll/integer_matrix.pyx":816
 *                 for j in range(self._ncols()):
 *                     # mpz_get_pyintlong ensure pickles work between Sage & not-Sage
 *                     l.append(int(mpz_get_pyintlong(self._core.mpz[0][i][j].get_data())))             # <<<<<<<<<<<<<<
 *         elif self._type == ZT_LONG:
 *             for i in range(self._nrows()):
*/
        __pyx_t_1 = __pyx_f_6fpylll_3gmp_6pylong_mpz_get_pyintlong((((__pyx_v_self->_core.mpz[0])[__pyx_v_i])[__pyx_v_j]).get_data()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 816, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_8 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 816, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_l, __pyx_t_8); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 816, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
    }

    /* "fpylll/fplll/integer_matrix.pyx":812
 *         cdef int i, j
 *         l = []
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             for i in range(self._nrows()):
 *                 for j in range(self._ncols()):
*/
    break;
    case fplll::ZT_LONG:

    /* "fpylll/fplll/integer_matrix.pyx":818
 *                     l.append(int(mpz_get_pyintlong(self._core.mpz[0][i][j].get_data())))
 *         elif self._type == ZT_LONG:
 *             for i in range(self._nrows()):             # <<<<<<<<<<<<<<
 *                 for j in range(self._ncols()):
 *                     # mpz_get_pyintlong ensure pickles work between Sage & not-Sage
*/
    __pyx_t_2 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_nrows(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 818, __pyx_L1_error)
    __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;

      /* "fpylll/fplll/integer_matrix.pyx":819
 *         elif self._type == ZT_LONG:
 *             for i in range(self._nrows()):
 *                 for j in range(self._ncols()):             # <<<<<<<<<<<<<<
 *                     # mpz_get_pyintlong ensure pickles work between Sage & not-Sage
 *                     l.append(int(self._core.long[0][i][j].get_data()))
*/
      __pyx_t_5 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_ncols(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 819, __pyx_L1_error)
      __pyx_t_6 = __pyx_t_5;
      for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
        __pyx_v_j = __pyx_t_7;

        /* "fpylll/fplll/integer_matrix.pyx":821
 *                 for j in range(self._ncols()):
 *                     # mpz_get_pyintlong ensure pickles work between Sage & not-Sage
 *                     l.append(int(self._core.long[0][i][j].get_data()))             # <<<<<<<<<<<<<<
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
*/
        __pyx_t_1 = NULL;
        __pyx_t_10 = __Pyx_PyLong_From_long((((__pyx_v_self->_core.__pyx_long[0])[__pyx_v_i])[__pyx_v_j]).get_data()); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 821, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_11 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_10};
          __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)(&PyLong_Type), __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 821, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
        }
        __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_l, __pyx_t_8); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 821, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
    }

    /* "fpylll/fplll/integer_matrix.pyx":817
 *                     # mpz_get_pyintlong ensure pickles work between Sage & not-Sage
 *                     l.append(int(mpz_get_pyintlong(self._core.mpz[0][i][j].get_data())))
 *         elif self._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *             for i in range(self._nrows()):
 *                 for j in range(self._ncols()):
*/
    break;
    default:

    /* "fpylll/fplll/integer_matrix.pyx":823
 *                     l.append(int(self._core.long[0][i][j].get_data()))
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)             # <<<<<<<<<<<<<<
 * 
 *         return unpickle_IntegerMatrix, (self._nrows(), self._ncols(), l, self.int_type)
*/
    __pyx_t_10 = NULL;
    __pyx_t_1 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 823, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_12 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 823, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_11 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_12};
      __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 823, __pyx_L1_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(0, 823, __pyx_L1_error)
    break;
  }

  /* "fpylll/fplll/integer_matrix.pyx":825
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *         return unpickle_IntegerMatrix, (self._nrows(), self._ncols(), l, self.int_type)             # <<<<<<<<<<<<<<
 * 
 *     cdef long _nrows(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_unpickle_IntegerMatrix); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_2 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_nrows(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 825, __pyx_L1_error)
  __pyx_t_12 = __Pyx_PyLong_From_long(__pyx_t_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_2 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_ncols(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 825, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyLong_From_long(__pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_int_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_13 = PyTuple_New(4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_GIVEREF(__pyx_t_12);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12) != (0)) __PYX_ERR(0, 825, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_10);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_10) != (0)) __PYX_ERR(0, 825, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_l);
  __Pyx_GIVEREF(__pyx_v_l);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_v_l) != (0)) __PYX_ERR(0, 825, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 3, __pyx_t_1) != (0)) __PYX_ERR(0, 825, __pyx_L1_error);
  __pyx_t_12 = 0;
  __pyx_t_10 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_8);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8) != (0)) __PYX_ERR(0, 825, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_13);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_13) != (0)) __PYX_ERR(0, 825, __pyx_L1_error);
  __pyx_t_8 = 0;
  __pyx_t_13 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "fpylll/fplll/integer_matrix.pyx":801
 *         return A
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         """Serialize this matrix
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":827
 *         return unpickle_IntegerMatrix, (self._nrows(), self._ncols(), l, self.int_type)
 * 
 *     cdef long _nrows(self):             # <<<<<<<<<<<<<<
 *         if self._type == ZT_MPZ:
 *             return self._core.mpz[0].get_rows()
*/

static long __pyx_f_6fpylll_5fplll_14integer_matrix_13IntegerMatrix__nrows(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self) {
  long __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_nrows", 0);

  /* "fpylll/fplll/integer_matrix.pyx":828
 * 
 *     cdef long _nrows(self):
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             return self._core.mpz[0].get_rows()
 *         elif self._type == ZT_LONG:
*/
  switch (__pyx_v_self->_type) {
    case fplll::ZT_MPZ:

    /* "fpylll/fplll/integer_matrix.pyx":829
 *     cdef long _nrows(self):
 *         if self._type == ZT_MPZ:
 *             return self._core.mpz[0].get_rows()             # <<<<<<<<<<<<<<
 *         elif self._type == ZT_LONG:
 *             return self._core.long[0].get_rows()
*/
    __pyx_r = (__pyx_v_self->_core.mpz[0]).get_rows();
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":828
 * 
 *     cdef long _nrows(self):
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             return self._core.mpz[0].get_rows()
 *         elif self._type == ZT_LONG:
*/
    break;
    case fplll::ZT_LONG:

    /* "fpylll/fplll/integer_matrix.pyx":831
 *             return self._core.mpz[0].get_rows()
 *         elif self._type == ZT_LONG:
 *             return self._core.long[0].get_rows()             # <<<<<<<<<<<<<<
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
*/
    __pyx_r = (__pyx_v_self->_core.__pyx_long[0]).get_rows();
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":830
 *         if self._type == ZT_MPZ:
 *             return self._core.mpz[0].get_rows()
 *         elif self._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *             return self._core.long[0].get_rows()
 *         else:
*/
    break;
    default:

    /* "fpylll/fplll/integer_matrix.pyx":833
 *             return self._core.long[0].get_rows()
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)             # <<<<<<<<<<<<<<
 * 
 *     cdef long _ncols(self):
*/
    __pyx_t_2 = NULL;
    __pyx_t_3 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 833, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 833, __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_RuntimeError)), __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(0, 833, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 833, __pyx_L1_error)
    break;
  }

  /* "fpylll/fplll/integer_matrix.pyx":827
 *         return unpickle_IntegerMatrix, (self._nrows(), self._ncols(), l, self.int_type)
 * 
 *     cdef long _nrows(self):             # <<<<<<<<<<<<<<
 *         if self._type == ZT_MPZ:
 *             return self._core.mpz[0].get_rows()
*/

  /* function exit code */
  __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("fpylll.fplll.integer_matrix.IntegerMatrix._nrows", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":835
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     cdef long _ncols(self):             # <<<<<<<<<<<<<<
 *         if self._type == ZT_MPZ:
 *             return self._core.mpz[0].get_cols()
*/

static long __pyx_f_6fpylll_5fplll_14integer_matrix_13IntegerMatrix__ncols(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self) {
  long __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_ncols", 0);

  /* "fpylll/fplll/integer_matrix.pyx":836
 * 
 *     cdef long _ncols(self):
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             return self._core.mpz[0].get_cols()
 *         elif self._type == ZT_LONG:
*/
  switch (__pyx_v_self->_type) {
    case fplll::ZT_MPZ:

    /* "fpylll/fplll/integer_matrix.pyx":837
 *     cdef long _ncols(self):
 *         if self._type == ZT_MPZ:
 *             return self._core.mpz[0].get_cols()             # <<<<<<<<<<<<<<
 *         elif self._type == ZT_LONG:
 *             return self._core.long[0].get_cols()
*/
    __pyx_r = (__pyx_v_self->_core.mpz[0]).get_cols();
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":836
 * 
 *     cdef long _ncols(self):
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             return self._core.mpz[0].get_cols()
 *         elif self._type == ZT_LONG:
*/
    break;
    case fplll::ZT_LONG:

    /* "fpylll/fplll/integer_matrix.pyx":839
 *             return self._core.mpz[0].get_cols()
 *         elif self._type == ZT_LONG:
 *             return self._core.long[0].get_cols()             # <<<<<<<<<<<<<<
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
*/
    __pyx_r = (__pyx_v_self->_core.__pyx_long[0]).get_cols();
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":838
 *         if self._type == ZT_MPZ:
 *             return self._core.mpz[0].get_cols()
 *         elif self._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *             return self._core.long[0].get_cols()
 *         else:
*/
    break;
    default:

    /* "fpylll/fplll/integer_matrix.pyx":841
 *             return self._core.long[0].get_cols()
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
    __pyx_t_2 = NULL;
    __pyx_t_3 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 841, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 841, __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_RuntimeError)), __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(0, 841, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 841, __pyx_L1_error)
    break;
  }

  /* "fpylll/fplll/integer_matrix.pyx":835
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     cdef long _ncols(self):             # <<<<<<<<<<<<<<
 *         if self._type == ZT_MPZ:
 *             return self._core.mpz[0].get_cols()
*/

  /* function exit code */
  __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("fpylll.fplll.integer_matrix.IntegerMatrix._ncols", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":843
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def nrows(self):
 *         """Number of Rows
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_5nrows_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_5nrows_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_5nrows___get__(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self));

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

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

  /* "fpylll/fplll/integer_matrix.pyx":854
 * 
 *         """
 *         return self._nrows()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_nrows(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 854, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyLong_From_long(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "fpylll/fplll/integer_matrix.pyx":843
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def nrows(self):
 *         """Number of Rows
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.nrows.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":856
 *         return self._nrows()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def ncols(self):
 *         """Number of Columns
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_5ncols_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_5ncols_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_5ncols___get__(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self));

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

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

  /* "fpylll/fplll/integer_matrix.pyx":867
 * 
 *         """
 *         return self._ncols()             # <<<<<<<<<<<<<<
 * 
 *     cdef object _get(self, int i, int j):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_ncols(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 867, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyLong_From_long(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "fpylll/fplll/integer_matrix.pyx":856
 *         return self._nrows()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def ncols(self):
 *         """Number of Columns
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.ncols.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":869
 *         return self._ncols()
 * 
 *     cdef object _get(self, int i, int j):             # <<<<<<<<<<<<<<
 *         if self._type == ZT_MPZ:
 *             return mpz_get_python(self._core.mpz[0][i][j].get_data())
*/

static PyObject *__pyx_f_6fpylll_5fplll_14integer_matrix_13IntegerMatrix__get(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, int __pyx_v_i, int __pyx_v_j) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get", 0);

  /* "fpylll/fplll/integer_matrix.pyx":870
 * 
 *     cdef object _get(self, int i, int j):
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             return mpz_get_python(self._core.mpz[0][i][j].get_data())
 *         elif self._type == ZT_LONG:
*/
  switch (__pyx_v_self->_type) {
    case fplll::ZT_MPZ:

    /* "fpylll/fplll/integer_matrix.pyx":871
 *     cdef object _get(self, int i, int j):
 *         if self._type == ZT_MPZ:
 *             return mpz_get_python(self._core.mpz[0][i][j].get_data())             # <<<<<<<<<<<<<<
 *         elif self._type == ZT_LONG:
 *             return self._core.long[0][i][j].get_data()
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __pyx_f_6fpylll_2io_mpz_get_python((((__pyx_v_self->_core.mpz[0])[__pyx_v_i])[__pyx_v_j]).get_data()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 871, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":870
 * 
 *     cdef object _get(self, int i, int j):
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             return mpz_get_python(self._core.mpz[0][i][j].get_data())
 *         elif self._type == ZT_LONG:
*/
    break;
    case fplll::ZT_LONG:

    /* "fpylll/fplll/integer_matrix.pyx":873
 *             return mpz_get_python(self._core.mpz[0][i][j].get_data())
 *         elif self._type == ZT_LONG:
 *             return self._core.long[0][i][j].get_data()             # <<<<<<<<<<<<<<
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyLong_From_long((((__pyx_v_self->_core.__pyx_long[0])[__pyx_v_i])[__pyx_v_j]).get_data()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 873, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":872
 *         if self._type == ZT_MPZ:
 *             return mpz_get_python(self._core.mpz[0][i][j].get_data())
 *         elif self._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *             return self._core.long[0][i][j].get_data()
 *         else:
*/
    break;
    default:

    /* "fpylll/fplll/integer_matrix.pyx":875
 *             return self._core.long[0][i][j].get_data()
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, key):
*/
    __pyx_t_2 = NULL;
    __pyx_t_3 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 875, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 875, __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_RuntimeError)), __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(0, 875, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 875, __pyx_L1_error)
    break;
  }

  /* "fpylll/fplll/integer_matrix.pyx":869
 *         return self._ncols()
 * 
 *     cdef object _get(self, int i, int j):             # <<<<<<<<<<<<<<
 *         if self._type == ZT_MPZ:
 *             return mpz_get_python(self._core.mpz[0][i][j].get_data())
*/

  /* function exit code */
  __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("fpylll.fplll.integer_matrix.IntegerMatrix._get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":877
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
 *         """Select a row or entry.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_27__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
PyDoc_STRVAR(__pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_26__getitem__, "IntegerMatrix.__getitem__(self, key)\n\nSelect a row or entry.\n\n:param key: an integer for the row, a tuple for row and column or a slice.\n:returns: a reference to a row or an integer depending on format of ``key``\n\n>>> from fpylll import IntegerMatrix\n>>> A = IntegerMatrix(10, 10)\n>>> A.gen_identity(10)\n>>> A[1,0]\n0\n\n>>> print(A[1])\n(0, 1, 0, 0, 0, 0, 0, 0, 0, 0)\n\n>>> print(A[0:2])\n[ 1 0 0 0 0 0 0 0 0 0 ]\n[ 0 1 0 0 0 0 0 0 0 0 ]");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_26__getitem__;
#endif
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_27__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_26__getitem__(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self), ((PyObject *)__pyx_v_key));

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

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_26__getitem__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, PyObject *__pyx_v_key) {
  int __pyx_v_i;
  int __pyx_v_j;
  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)(PyObject *);
  int __pyx_t_6;
  int __pyx_t_7;
  long __pyx_t_8;
  long __pyx_t_9;
  size_t __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);
  __Pyx_INCREF(__pyx_v_key);

  /* "fpylll/fplll/integer_matrix.pyx":897
 * 
 *         """
 *         cdef int i = 0             # <<<<<<<<<<<<<<
 *         cdef int j = 0
 * 
*/
  __pyx_v_i = 0;

  /* "fpylll/fplll/integer_matrix.pyx":898
 *         """
 *         cdef int i = 0
 *         cdef int j = 0             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(key, tuple):
*/
  __pyx_v_j = 0;

  /* "fpylll/fplll/integer_matrix.pyx":900
 *         cdef int j = 0
 * 
 *         if isinstance(key, tuple):             # <<<<<<<<<<<<<<
 *             i, j = key
 *             preprocess_indices(i, j, self._nrows(), self._ncols())
*/
  __pyx_t_1 = PyTuple_Check(__pyx_v_key); 
  if (__pyx_t_1) {

    /* "fpylll/fplll/integer_matrix.pyx":901
 * 
 *         if isinstance(key, tuple):
 *             i, j = key             # <<<<<<<<<<<<<<
 *             preprocess_indices(i, j, self._nrows(), self._ncols())
 *             return self._get(i, j)
*/
    if ((likely(PyTuple_CheckExact(__pyx_v_key))) || (PyList_CheckExact(__pyx_v_key))) {
      PyObject* sequence = __pyx_v_key;
      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, 901, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
        __Pyx_INCREF(__pyx_t_2);
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
        __Pyx_INCREF(__pyx_t_3);
      } else {
        __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 901, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_2);
        __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 901, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_3);
      }
      #else
      __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 901, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 901, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      #endif
    } else {
      Py_ssize_t index = -1;
      __pyx_t_4 = PyObject_GetIter(__pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 901, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4);
      index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < (0)) __PYX_ERR(0, 901, __pyx_L1_error)
      __pyx_t_5 = NULL;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L5_unpacking_done;
      __pyx_L4_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 901, __pyx_L1_error)
      __pyx_L5_unpacking_done:;
    }
    __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 901, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_7 = __Pyx_PyLong_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 901, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_i = __pyx_t_6;
    __pyx_v_j = __pyx_t_7;

    /* "fpylll/fplll/integer_matrix.pyx":902
 *         if isinstance(key, tuple):
 *             i, j = key
 *             preprocess_indices(i, j, self._nrows(), self._ncols())             # <<<<<<<<<<<<<<
 *             return self._get(i, j)
 *         elif isinstance(key, slice):
*/
    __pyx_t_8 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_nrows(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 902, __pyx_L1_error)
    __pyx_t_9 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_ncols(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 902, __pyx_L1_error)
    __pyx_t_7 = __pyx_f_6fpylll_4util_preprocess_indices(__pyx_v_i, __pyx_v_j, __pyx_t_8, __pyx_t_9); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 902, __pyx_L1_error)

    /* "fpylll/fplll/integer_matrix.pyx":903
 *             i, j = key
 *             preprocess_indices(i, j, self._nrows(), self._ncols())
 *             return self._get(i, j)             # <<<<<<<<<<<<<<
 *         elif isinstance(key, slice):
 *             key = range(*key.indices(self._nrows()))
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_get(__pyx_v_self, __pyx_v_i, __pyx_v_j); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 903, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":900
 *         cdef int j = 0
 * 
 *         if isinstance(key, tuple):             # <<<<<<<<<<<<<<
 *             i, j = key
 *             preprocess_indices(i, j, self._nrows(), self._ncols())
*/
  }

  /* "fpylll/fplll/integer_matrix.pyx":904
 *             preprocess_indices(i, j, self._nrows(), self._ncols())
 *             return self._get(i, j)
 *         elif isinstance(key, slice):             # <<<<<<<<<<<<<<
 *             key = range(*key.indices(self._nrows()))
 *             return self.submatrix(key, range(self._ncols()))
*/
  __pyx_t_1 = PySlice_Check(__pyx_v_key); 
  if (__pyx_t_1) {

    /* "fpylll/fplll/integer_matrix.pyx":905
 *             return self._get(i, j)
 *         elif isinstance(key, slice):
 *             key = range(*key.indices(self._nrows()))             # <<<<<<<<<<<<<<
 *             return self.submatrix(key, range(self._ncols()))
 *         elif PyIndex_Check(key):
*/
    __pyx_t_2 = __pyx_v_key;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_9 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_nrows(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 905, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyLong_From_long(__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 905, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_indices, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__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_3)) __PYX_ERR(0, 905, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 905, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyRange_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 905, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "fpylll/fplll/integer_matrix.pyx":906
 *         elif isinstance(key, slice):
 *             key = range(*key.indices(self._nrows()))
 *             return self.submatrix(key, range(self._ncols()))             # <<<<<<<<<<<<<<
 *         elif PyIndex_Check(key):
 *             i = key
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = ((PyObject *)__pyx_v_self);
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_11 = NULL;
    __pyx_t_9 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_ncols(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 906, __pyx_L1_error)
    __pyx_t_12 = __Pyx_PyLong_From_long(__pyx_t_9); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 906, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_10 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_12};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 906, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_t_10 = 0;
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_key, __pyx_t_2};
      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_submatrix, __pyx_callargs+__pyx_t_10, (3-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 906, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":904
 *             preprocess_indices(i, j, self._nrows(), self._ncols())
 *             return self._get(i, j)
 *         elif isinstance(key, slice):             # <<<<<<<<<<<<<<
 *             key = range(*key.indices(self._nrows()))
 *             return self.submatrix(key, range(self._ncols()))
*/
  }

  /* "fpylll/fplll/integer_matrix.pyx":907
 *             key = range(*key.indices(self._nrows()))
 *             return self.submatrix(key, range(self._ncols()))
 *         elif PyIndex_Check(key):             # <<<<<<<<<<<<<<
 *             i = key
 *             preprocess_indices(i, i, self._nrows(), self._nrows())
*/
  __pyx_t_1 = PyIndex_Check(__pyx_v_key);
  if (likely(__pyx_t_1)) {

    /* "fpylll/fplll/integer_matrix.pyx":908
 *             return self.submatrix(key, range(self._ncols()))
 *         elif PyIndex_Check(key):
 *             i = key             # <<<<<<<<<<<<<<
 *             preprocess_indices(i, i, self._nrows(), self._nrows())
 *             return IntegerMatrixRow(self, i)
*/
    __pyx_t_7 = __Pyx_PyLong_As_int(__pyx_v_key); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 908, __pyx_L1_error)
    __pyx_v_i = __pyx_t_7;

    /* "fpylll/fplll/integer_matrix.pyx":909
 *         elif PyIndex_Check(key):
 *             i = key
 *             preprocess_indices(i, i, self._nrows(), self._nrows())             # <<<<<<<<<<<<<<
 *             return IntegerMatrixRow(self, i)
 *         else:
*/
    __pyx_t_9 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_nrows(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 909, __pyx_L1_error)
    __pyx_t_8 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_nrows(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 909, __pyx_L1_error)
    __pyx_t_7 = __pyx_f_6fpylll_4util_preprocess_indices(__pyx_v_i, __pyx_v_i, __pyx_t_9, __pyx_t_8); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 909, __pyx_L1_error)

    /* "fpylll/fplll/integer_matrix.pyx":910
 *             i = key
 *             preprocess_indices(i, i, self._nrows(), self._nrows())
 *             return IntegerMatrixRow(self, i)             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError("Parameter '%s' not understood."%key)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = NULL;
    __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 910, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = 1;
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_t_4};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow, __pyx_callargs+__pyx_t_10, (3-__pyx_t_10) | (__pyx_t_10*__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_3)) __PYX_ERR(0, 910, __pyx_L1_error)
      __Pyx_GOTREF((PyObject *)__pyx_t_3);
    }
    __pyx_r = ((PyObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":907
 *             key = range(*key.indices(self._nrows()))
 *             return self.submatrix(key, range(self._ncols()))
 *         elif PyIndex_Check(key):             # <<<<<<<<<<<<<<
 *             i = key
 *             preprocess_indices(i, i, self._nrows(), self._nrows())
*/
  }

  /* "fpylll/fplll/integer_matrix.pyx":912
 *             return IntegerMatrixRow(self, i)
 *         else:
 *             raise ValueError("Parameter '%s' not understood."%key)             # <<<<<<<<<<<<<<
 * 
 *     cdef int _set(self, int i, int j, value) except -1:
*/
  /*else*/ {
    __pyx_t_4 = NULL;
    __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Parameter_s_not_understood, __pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 912, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_10 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
      __pyx_t_3 = __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_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 912, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 912, __pyx_L1_error)
  }

  /* "fpylll/fplll/integer_matrix.pyx":877
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
 *         """Select a row or entry.
 * 
*/

  /* 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_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":914
 *             raise ValueError("Parameter '%s' not understood."%key)
 * 
 *     cdef int _set(self, int i, int j, value) except -1:             # <<<<<<<<<<<<<<
 *         cdef long tmp
 *         if self._type == ZT_MPZ:
*/

static int __pyx_f_6fpylll_5fplll_14integer_matrix_13IntegerMatrix__set(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, int __pyx_v_i, int __pyx_v_j, PyObject *__pyx_v_value) {
  long __pyx_v_tmp;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  long __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("_set", 0);

  /* "fpylll/fplll/integer_matrix.pyx":916
 *     cdef int _set(self, int i, int j, value) except -1:
 *         cdef long tmp
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             assign_Z_NR_mpz(self._core.mpz[0][i][j], value)
 *         elif self._type == ZT_LONG:
*/
  switch (__pyx_v_self->_type) {
    case fplll::ZT_MPZ:

    /* "fpylll/fplll/integer_matrix.pyx":917
 *         cdef long tmp
 *         if self._type == ZT_MPZ:
 *             assign_Z_NR_mpz(self._core.mpz[0][i][j], value)             # <<<<<<<<<<<<<<
 *         elif self._type == ZT_LONG:
 *             tmp = value
*/
    __pyx_t_1 = __pyx_f_6fpylll_2io_assign_Z_NR_mpz((((__pyx_v_self->_core.mpz[0])[__pyx_v_i])[__pyx_v_j]), __pyx_v_value); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 917, __pyx_L1_error)

    /* "fpylll/fplll/integer_matrix.pyx":916
 *     cdef int _set(self, int i, int j, value) except -1:
 *         cdef long tmp
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             assign_Z_NR_mpz(self._core.mpz[0][i][j], value)
 *         elif self._type == ZT_LONG:
*/
    break;
    case fplll::ZT_LONG:

    /* "fpylll/fplll/integer_matrix.pyx":919
 *             assign_Z_NR_mpz(self._core.mpz[0][i][j], value)
 *         elif self._type == ZT_LONG:
 *             tmp = value             # <<<<<<<<<<<<<<
 *             self._core.long[0][i][j] = tmp
 *         else:
*/
    __pyx_t_2 = __Pyx_PyLong_As_long(__pyx_v_value); if (unlikely((__pyx_t_2 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 919, __pyx_L1_error)
    __pyx_v_tmp = __pyx_t_2;

    /* "fpylll/fplll/integer_matrix.pyx":920
 *         elif self._type == ZT_LONG:
 *             tmp = value
 *             self._core.long[0][i][j] = tmp             # <<<<<<<<<<<<<<
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
*/
    (((__pyx_v_self->_core.__pyx_long[0])[__pyx_v_i])[__pyx_v_j]) = __pyx_v_tmp;

    /* "fpylll/fplll/integer_matrix.pyx":918
 *         if self._type == ZT_MPZ:
 *             assign_Z_NR_mpz(self._core.mpz[0][i][j], value)
 *         elif self._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *             tmp = value
 *             self._core.long[0][i][j] = tmp
*/
    break;
    default:

    /* "fpylll/fplll/integer_matrix.pyx":922
 *             self._core.long[0][i][j] = tmp
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self, key, value):
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 922, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 922, __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_RuntimeError)), __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(0, 922, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 922, __pyx_L1_error)
    break;
  }

  /* "fpylll/fplll/integer_matrix.pyx":914
 *             raise ValueError("Parameter '%s' not understood."%key)
 * 
 *     cdef int _set(self, int i, int j, value) except -1:             # <<<<<<<<<<<<<<
 *         cdef long tmp
 *         if self._type == ZT_MPZ:
*/

  /* function exit code */
  __pyx_r = 0;
  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_6);
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix._set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":924
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def __setitem__(self, key, value):             # <<<<<<<<<<<<<<
 *         """
 *         Assign value to index.
*/

/* Python wrapper */
static int __pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_29__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/
PyDoc_STRVAR(__pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_28__setitem__, "IntegerMatrix.__setitem__(self, key, value)\n\nAssign value to index.\n\n:param key: a tuple of row and column indices\n:param value: an integer\n\nExample::\n\n    >>> from fpylll import IntegerMatrix\n    >>> A = IntegerMatrix(10, 10)\n    >>> A.gen_identity(10)\n    >>> A[1,0] = 2\n    >>> A[1,0]\n    2\n\nArbitrary precision integers are supported::\n\n    >>> A[0, 0] = 2**2048\n\nThe notation ``A[i][j]`` is not supported.  This is because ``A[i]`` returns an object\nof type ``IntegerMatrixRow`` object which is immutable by design.  This is to avoid the\nuser confusing such an object with a proper vector.::\n\n    >>> A[1][0] = 2\n    Traceback (most recent call last):\n    ...\n    TypeError: 'fpylll.fplll.integer_matrix.IntegerMatrixRow' object does not support item assignment");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_28__setitem__;
#endif
static int __pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_29__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_28__setitem__(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self), ((PyObject *)__pyx_v_key), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_28__setitem__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  int __pyx_v_i;
  int __pyx_v_j;
  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)(PyObject *);
  int __pyx_t_6;
  int __pyx_t_7;
  long __pyx_t_8;
  long __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("__setitem__", 0);

  /* "fpylll/fplll/integer_matrix.pyx":954
 * 
 *         """
 *         cdef int i = 0             # <<<<<<<<<<<<<<
 *         cdef int j = 0
 * 
*/
  __pyx_v_i = 0;

  /* "fpylll/fplll/integer_matrix.pyx":955
 *         """
 *         cdef int i = 0
 *         cdef int j = 0             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(key, tuple):
*/
  __pyx_v_j = 0;

  /* "fpylll/fplll/integer_matrix.pyx":957
 *         cdef int j = 0
 * 
 *         if isinstance(key, tuple):             # <<<<<<<<<<<<<<
 *             i, j = key
 *             preprocess_indices(i, j, self._nrows(), self._ncols())
*/
  __pyx_t_1 = PyTuple_Check(__pyx_v_key); 
  if (__pyx_t_1) {

    /* "fpylll/fplll/integer_matrix.pyx":958
 * 
 *         if isinstance(key, tuple):
 *             i, j = key             # <<<<<<<<<<<<<<
 *             preprocess_indices(i, j, self._nrows(), self._ncols())
 *             self._set(i, j, value)
*/
    if ((likely(PyTuple_CheckExact(__pyx_v_key))) || (PyList_CheckExact(__pyx_v_key))) {
      PyObject* sequence = __pyx_v_key;
      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, 958, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
        __Pyx_INCREF(__pyx_t_2);
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
        __Pyx_INCREF(__pyx_t_3);
      } else {
        __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 958, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_2);
        __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 958, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_3);
      }
      #else
      __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 958, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 958, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      #endif
    } else {
      Py_ssize_t index = -1;
      __pyx_t_4 = PyObject_GetIter(__pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 958, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4);
      index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < (0)) __PYX_ERR(0, 958, __pyx_L1_error)
      __pyx_t_5 = NULL;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L5_unpacking_done;
      __pyx_L4_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 958, __pyx_L1_error)
      __pyx_L5_unpacking_done:;
    }
    __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 958, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_7 = __Pyx_PyLong_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 958, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_i = __pyx_t_6;
    __pyx_v_j = __pyx_t_7;

    /* "fpylll/fplll/integer_matrix.pyx":959
 *         if isinstance(key, tuple):
 *             i, j = key
 *             preprocess_indices(i, j, self._nrows(), self._ncols())             # <<<<<<<<<<<<<<
 *             self._set(i, j, value)
 * 
*/
    __pyx_t_8 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_nrows(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 959, __pyx_L1_error)
    __pyx_t_9 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_ncols(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 959, __pyx_L1_error)
    __pyx_t_7 = __pyx_f_6fpylll_4util_preprocess_indices(__pyx_v_i, __pyx_v_j, __pyx_t_8, __pyx_t_9); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 959, __pyx_L1_error)

    /* "fpylll/fplll/integer_matrix.pyx":960
 *             i, j = key
 *             preprocess_indices(i, j, self._nrows(), self._ncols())
 *             self._set(i, j, value)             # <<<<<<<<<<<<<<
 * 
 *         elif isinstance(key, int):
*/
    __pyx_t_7 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_set(__pyx_v_self, __pyx_v_i, __pyx_v_j, __pyx_v_value); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 960, __pyx_L1_error)

    /* "fpylll/fplll/integer_matrix.pyx":957
 *         cdef int j = 0
 * 
 *         if isinstance(key, tuple):             # <<<<<<<<<<<<<<
 *             i, j = key
 *             preprocess_indices(i, j, self._nrows(), self._ncols())
*/
    goto __pyx_L3;
  }

  /* "fpylll/fplll/integer_matrix.pyx":962
 *             self._set(i, j, value)
 * 
 *         elif isinstance(key, int):             # <<<<<<<<<<<<<<
 *             i = key
 *             preprocess_indices(i, i, self._nrows(), self._nrows())
*/
  __pyx_t_1 = PyLong_Check(__pyx_v_key); 
  if (likely(__pyx_t_1)) {

    /* "fpylll/fplll/integer_matrix.pyx":963
 * 
 *         elif isinstance(key, int):
 *             i = key             # <<<<<<<<<<<<<<
 *             preprocess_indices(i, i, self._nrows(), self._nrows())
 *             if isinstance(value, IntegerMatrixRow) \
*/
    __pyx_t_7 = __Pyx_PyLong_As_int(__pyx_v_key); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 963, __pyx_L1_error)
    __pyx_v_i = __pyx_t_7;

    /* "fpylll/fplll/integer_matrix.pyx":964
 *         elif isinstance(key, int):
 *             i = key
 *             preprocess_indices(i, i, self._nrows(), self._nrows())             # <<<<<<<<<<<<<<
 *             if isinstance(value, IntegerMatrixRow) \
 *                and (<IntegerMatrixRow>value).row == i \
*/
    __pyx_t_9 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_nrows(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 964, __pyx_L1_error)
    __pyx_t_8 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_nrows(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 964, __pyx_L1_error)
    __pyx_t_7 = __pyx_f_6fpylll_4util_preprocess_indices(__pyx_v_i, __pyx_v_i, __pyx_t_9, __pyx_t_8); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 964, __pyx_L1_error)

    /* "fpylll/fplll/integer_matrix.pyx":965
 *             i = key
 *             preprocess_indices(i, i, self._nrows(), self._nrows())
 *             if isinstance(value, IntegerMatrixRow) \             # <<<<<<<<<<<<<<
 *                and (<IntegerMatrixRow>value).row == i \
 *                and (<IntegerMatrixRow>value).m == self:
*/
    __pyx_t_10 = __Pyx_TypeCheck(__pyx_v_value, __pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow); 
    if (__pyx_t_10) {
    } else {
      __pyx_t_1 = __pyx_t_10;
      goto __pyx_L7_bool_binop_done;
    }

    /* "fpylll/fplll/integer_matrix.pyx":966
 *             preprocess_indices(i, i, self._nrows(), self._nrows())
 *             if isinstance(value, IntegerMatrixRow) \
 *                and (<IntegerMatrixRow>value).row == i \             # <<<<<<<<<<<<<<
 *                and (<IntegerMatrixRow>value).m == self:
 *                 pass
*/
    __pyx_t_10 = (((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *)__pyx_v_value)->row == __pyx_v_i);
    if (__pyx_t_10) {
    } else {
      __pyx_t_1 = __pyx_t_10;
      goto __pyx_L7_bool_binop_done;
    }

    /* "fpylll/fplll/integer_matrix.pyx":967
 *             if isinstance(value, IntegerMatrixRow) \
 *                and (<IntegerMatrixRow>value).row == i \
 *                and (<IntegerMatrixRow>value).m == self:             # <<<<<<<<<<<<<<
 *                 pass
 *             else:
*/
    __pyx_t_3 = PyObject_RichCompare(((PyObject *)((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *)__pyx_v_value)->m), ((PyObject *)__pyx_v_self), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 967, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 967, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = __pyx_t_10;
    __pyx_L7_bool_binop_done:;

    /* "fpylll/fplll/integer_matrix.pyx":965
 *             i = key
 *             preprocess_indices(i, i, self._nrows(), self._nrows())
 *             if isinstance(value, IntegerMatrixRow) \             # <<<<<<<<<<<<<<
 *                and (<IntegerMatrixRow>value).row == i \
 *                and (<IntegerMatrixRow>value).m == self:
*/
    if (likely(__pyx_t_1)) {
      goto __pyx_L6;
    }

    /* "fpylll/fplll/integer_matrix.pyx":970
 *                 pass
 *             else:
 *                 raise NotImplementedError             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError("Parameter '%s' not understood."%key)
*/
    /*else*/ {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0);
      __PYX_ERR(0, 970, __pyx_L1_error)
    }
    __pyx_L6:;

    /* "fpylll/fplll/integer_matrix.pyx":962
 *             self._set(i, j, value)
 * 
 *         elif isinstance(key, int):             # <<<<<<<<<<<<<<
 *             i = key
 *             preprocess_indices(i, i, self._nrows(), self._nrows())
*/
    goto __pyx_L3;
  }

  /* "fpylll/fplll/integer_matrix.pyx":972
 *                 raise NotImplementedError
 *         else:
 *             raise ValueError("Parameter '%s' not understood."%key)             # <<<<<<<<<<<<<<
 * 
 *     def randomize(self, algorithm, **kwds):
*/
  /*else*/ {
    __pyx_t_2 = NULL;
    __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Parameter_s_not_understood, __pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 972, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_11 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
      __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_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 972, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 972, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "fpylll/fplll/integer_matrix.pyx":924
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def __setitem__(self, key, value):             # <<<<<<<<<<<<<<
 *         """
 *         Assign value to index.
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":974
 *             raise ValueError("Parameter '%s' not understood."%key)
 * 
 *     def randomize(self, algorithm, **kwds):             # <<<<<<<<<<<<<<
 *         """Randomize this matrix using ``algorithm``.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_31randomize(PyObject *__pyx_v_self, 
#if 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_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_30randomize, "IntegerMatrix.randomize(self, algorithm, **kwds)\n\nRandomize this matrix using ``algorithm``.\n\n:param algorithm: see :func:`~IntegerMatrix.random`\n\n:seealso: :func:`~IntegerMatrix.random`");
static PyMethodDef __pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_31randomize = {"randomize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_31randomize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_30randomize};
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_31randomize(PyObject *__pyx_v_self, 
#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_algorithm = 0;
  PyObject *__pyx_v_kwds = 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("randomize (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);
  __pyx_v_kwds = PyDict_New(); if (unlikely(!__pyx_v_kwds)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwds);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_algorithm,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, 974, __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, 974, __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, __pyx_v_kwds, values, kwd_pos_args, __pyx_kwds_len, "randomize", 1) < (0)) __PYX_ERR(0, 974, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("randomize", 1, 1, 1, i); __PYX_ERR(0, 974, __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, 974, __pyx_L3_error)
    }
    __pyx_v_algorithm = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("randomize", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 974, __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_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.randomize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_30randomize(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self), __pyx_v_algorithm, __pyx_v_kwds);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_kwds);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_30randomize(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, PyObject *__pyx_v_algorithm, PyObject *__pyx_v_kwds) {
  fplll::Z_NR<mpz_t>  __pyx_v_t_mpz;
  fplll::Z_NR<long>  __pyx_v_t_long;
  PyObject *__pyx_v_bits = NULL;
  PyObject *__pyx_v_bits2 = NULL;
  PyObject *__pyx_v_q = NULL;
  PyObject *__pyx_v_k = NULL;
  double __pyx_v_alpha;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  int __pyx_t_8;
  long __pyx_t_9;
  double __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("randomize", 0);

  /* "fpylll/fplll/integer_matrix.pyx":985
 *         cdef Z_NR[long] t_long
 * 
 *         if algorithm == "intrel":             # <<<<<<<<<<<<<<
 *             bits = int(kwds["bits"])
 *             sig_on()
*/
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_algorithm, __pyx_mstate_global->__pyx_n_u_intrel, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 985, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "fpylll/fplll/integer_matrix.pyx":986
 * 
 *         if algorithm == "intrel":
 *             bits = int(kwds["bits"])             # <<<<<<<<<<<<<<
 *             sig_on()
 *             if self._type == ZT_MPZ:
*/
    __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_kwds, __pyx_mstate_global->__pyx_n_u_bits); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 986, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 986, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_bits = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "fpylll/fplll/integer_matrix.pyx":987
 *         if algorithm == "intrel":
 *             bits = int(kwds["bits"])
 *             sig_on()             # <<<<<<<<<<<<<<
 *             if self._type == ZT_MPZ:
 *                 self._core.mpz.gen_intrel(bits)
*/
    __pyx_t_4 = sig_on(); if (unlikely(__pyx_t_4 == ((int)0))) __PYX_ERR(0, 987, __pyx_L1_error)

    /* "fpylll/fplll/integer_matrix.pyx":988
 *             bits = int(kwds["bits"])
 *             sig_on()
 *             if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *                 self._core.mpz.gen_intrel(bits)
 *             elif self._type == ZT_LONG:
*/
    switch (__pyx_v_self->_type) {
      case fplll::ZT_MPZ:

      /* "fpylll/fplll/integer_matrix.pyx":989
 *             sig_on()
 *             if self._type == ZT_MPZ:
 *                 self._core.mpz.gen_intrel(bits)             # <<<<<<<<<<<<<<
 *             elif self._type == ZT_LONG:
 *                 self._core.long.gen_intrel(bits)
*/
      __pyx_t_4 = __Pyx_PyLong_As_int(__pyx_v_bits); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 989, __pyx_L1_error)
      __pyx_v_self->_core.mpz->gen_intrel(__pyx_t_4);

      /* "fpylll/fplll/integer_matrix.pyx":988
 *             bits = int(kwds["bits"])
 *             sig_on()
 *             if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *                 self._core.mpz.gen_intrel(bits)
 *             elif self._type == ZT_LONG:
*/
      break;
      case fplll::ZT_LONG:

      /* "fpylll/fplll/integer_matrix.pyx":991
 *                 self._core.mpz.gen_intrel(bits)
 *             elif self._type == ZT_LONG:
 *                 self._core.long.gen_intrel(bits)             # <<<<<<<<<<<<<<
 *             else:
 *                 raise RuntimeError("Integer type '%s' not understood."%self._type)
*/
      __pyx_t_4 = __Pyx_PyLong_As_int(__pyx_v_bits); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 991, __pyx_L1_error)
      __pyx_v_self->_core.__pyx_long->gen_intrel(__pyx_t_4);

      /* "fpylll/fplll/integer_matrix.pyx":990
 *             if self._type == ZT_MPZ:
 *                 self._core.mpz.gen_intrel(bits)
 *             elif self._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *                 self._core.long.gen_intrel(bits)
 *             else:
*/
      break;
      default:

      /* "fpylll/fplll/integer_matrix.pyx":993
 *                 self._core.long.gen_intrel(bits)
 *             else:
 *                 raise RuntimeError("Integer type '%s' not understood."%self._type)             # <<<<<<<<<<<<<<
 *             sig_off()
 * 
*/
      __pyx_t_2 = NULL;
      __pyx_t_5 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 993, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 993, __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_2, __pyx_t_6};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 993, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 993, __pyx_L1_error)
      break;
    }

    /* "fpylll/fplll/integer_matrix.pyx":994
 *             else:
 *                 raise RuntimeError("Integer type '%s' not understood."%self._type)
 *             sig_off()             # <<<<<<<<<<<<<<
 * 
 *         elif algorithm == "simdioph":
*/
    sig_off();

    /* "fpylll/fplll/integer_matrix.pyx":985
 *         cdef Z_NR[long] t_long
 * 
 *         if algorithm == "intrel":             # <<<<<<<<<<<<<<
 *             bits = int(kwds["bits"])
 *             sig_on()
*/
    goto __pyx_L3;
  }

  /* "fpylll/fplll/integer_matrix.pyx":996
 *             sig_off()
 * 
 *         elif algorithm == "simdioph":             # <<<<<<<<<<<<<<
 *             bits = int(kwds["bits"])
 *             bits2 = int(kwds["bits2"])
*/
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_algorithm, __pyx_mstate_global->__pyx_n_u_simdioph, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 996, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "fpylll/fplll/integer_matrix.pyx":997
 * 
 *         elif algorithm == "simdioph":
 *             bits = int(kwds["bits"])             # <<<<<<<<<<<<<<
 *             bits2 = int(kwds["bits2"])
 *             sig_on()
*/
    __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_kwds, __pyx_mstate_global->__pyx_n_u_bits); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 997, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 997, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_bits = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "fpylll/fplll/integer_matrix.pyx":998
 *         elif algorithm == "simdioph":
 *             bits = int(kwds["bits"])
 *             bits2 = int(kwds["bits2"])             # <<<<<<<<<<<<<<
 *             sig_on()
 *             if self._type == ZT_MPZ:
*/
    __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_kwds, __pyx_mstate_global->__pyx_n_u_bits2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 998, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 998, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_bits2 = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "fpylll/fplll/integer_matrix.pyx":999
 *             bits = int(kwds["bits"])
 *             bits2 = int(kwds["bits2"])
 *             sig_on()             # <<<<<<<<<<<<<<
 *             if self._type == ZT_MPZ:
 *                 self._core.mpz.gen_simdioph(bits, bits2)
*/
    __pyx_t_4 = sig_on(); if (unlikely(__pyx_t_4 == ((int)0))) __PYX_ERR(0, 999, __pyx_L1_error)

    /* "fpylll/fplll/integer_matrix.pyx":1000
 *             bits2 = int(kwds["bits2"])
 *             sig_on()
 *             if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *                 self._core.mpz.gen_simdioph(bits, bits2)
 *             elif self._type == ZT_LONG:
*/
    switch (__pyx_v_self->_type) {
      case fplll::ZT_MPZ:

      /* "fpylll/fplll/integer_matrix.pyx":1001
 *             sig_on()
 *             if self._type == ZT_MPZ:
 *                 self._core.mpz.gen_simdioph(bits, bits2)             # <<<<<<<<<<<<<<
 *             elif self._type == ZT_LONG:
 *                 self._core.long.gen_simdioph(bits, bits2)
*/
      __pyx_t_4 = __Pyx_PyLong_As_int(__pyx_v_bits); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1001, __pyx_L1_error)
      __pyx_t_8 = __Pyx_PyLong_As_int(__pyx_v_bits2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1001, __pyx_L1_error)
      __pyx_v_self->_core.mpz->gen_simdioph(__pyx_t_4, __pyx_t_8);

      /* "fpylll/fplll/integer_matrix.pyx":1000
 *             bits2 = int(kwds["bits2"])
 *             sig_on()
 *             if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *                 self._core.mpz.gen_simdioph(bits, bits2)
 *             elif self._type == ZT_LONG:
*/
      break;
      case fplll::ZT_LONG:

      /* "fpylll/fplll/integer_matrix.pyx":1003
 *                 self._core.mpz.gen_simdioph(bits, bits2)
 *             elif self._type == ZT_LONG:
 *                 self._core.long.gen_simdioph(bits, bits2)             # <<<<<<<<<<<<<<
 *             else:
 *                 raise RuntimeError("Integer type '%s' not understood."%self._type)
*/
      __pyx_t_8 = __Pyx_PyLong_As_int(__pyx_v_bits); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1003, __pyx_L1_error)
      __pyx_t_4 = __Pyx_PyLong_As_int(__pyx_v_bits2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1003, __pyx_L1_error)
      __pyx_v_self->_core.__pyx_long->gen_simdioph(__pyx_t_8, __pyx_t_4);

      /* "fpylll/fplll/integer_matrix.pyx":1002
 *             if self._type == ZT_MPZ:
 *                 self._core.mpz.gen_simdioph(bits, bits2)
 *             elif self._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *                 self._core.long.gen_simdioph(bits, bits2)
 *             else:
*/
      break;
      default:

      /* "fpylll/fplll/integer_matrix.pyx":1005
 *                 self._core.long.gen_simdioph(bits, bits2)
 *             else:
 *                 raise RuntimeError("Integer type '%s' not understood."%self._type)             # <<<<<<<<<<<<<<
 *             sig_off()
 * 
*/
      __pyx_t_6 = NULL;
      __pyx_t_2 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1005, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1005, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_7 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __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_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1005, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 1005, __pyx_L1_error)
      break;
    }

    /* "fpylll/fplll/integer_matrix.pyx":1006
 *             else:
 *                 raise RuntimeError("Integer type '%s' not understood."%self._type)
 *             sig_off()             # <<<<<<<<<<<<<<
 * 
 *         elif algorithm == "uniform":
*/
    sig_off();

    /* "fpylll/fplll/integer_matrix.pyx":996
 *             sig_off()
 * 
 *         elif algorithm == "simdioph":             # <<<<<<<<<<<<<<
 *             bits = int(kwds["bits"])
 *             bits2 = int(kwds["bits2"])
*/
    goto __pyx_L3;
  }

  /* "fpylll/fplll/integer_matrix.pyx":1008
 *             sig_off()
 * 
 *         elif algorithm == "uniform":             # <<<<<<<<<<<<<<
 *             bits = int(kwds["bits"])
 *             sig_on()
*/
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_algorithm, __pyx_mstate_global->__pyx_n_u_uniform, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1008, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "fpylll/fplll/integer_matrix.pyx":1009
 * 
 *         elif algorithm == "uniform":
 *             bits = int(kwds["bits"])             # <<<<<<<<<<<<<<
 *             sig_on()
 *             if self._type == ZT_MPZ:
*/
    __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_kwds, __pyx_mstate_global->__pyx_n_u_bits); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1009, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1009, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_bits = ((PyObject*)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "fpylll/fplll/integer_matrix.pyx":1010
 *         elif algorithm == "uniform":
 *             bits = int(kwds["bits"])
 *             sig_on()             # <<<<<<<<<<<<<<
 *             if self._type == ZT_MPZ:
 *                 self._core.mpz.gen_uniform(bits)
*/
    __pyx_t_4 = sig_on(); if (unlikely(__pyx_t_4 == ((int)0))) __PYX_ERR(0, 1010, __pyx_L1_error)

    /* "fpylll/fplll/integer_matrix.pyx":1011
 *             bits = int(kwds["bits"])
 *             sig_on()
 *             if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *                 self._core.mpz.gen_uniform(bits)
 *             elif self._type == ZT_LONG:
*/
    switch (__pyx_v_self->_type) {
      case fplll::ZT_MPZ:

      /* "fpylll/fplll/integer_matrix.pyx":1012
 *             sig_on()
 *             if self._type == ZT_MPZ:
 *                 self._core.mpz.gen_uniform(bits)             # <<<<<<<<<<<<<<
 *             elif self._type == ZT_LONG:
 *                 self._core.long.gen_uniform(bits)
*/
      __pyx_t_4 = __Pyx_PyLong_As_int(__pyx_v_bits); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1012, __pyx_L1_error)
      __pyx_v_self->_core.mpz->gen_uniform(__pyx_t_4);

      /* "fpylll/fplll/integer_matrix.pyx":1011
 *             bits = int(kwds["bits"])
 *             sig_on()
 *             if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *                 self._core.mpz.gen_uniform(bits)
 *             elif self._type == ZT_LONG:
*/
      break;
      case fplll::ZT_LONG:

      /* "fpylll/fplll/integer_matrix.pyx":1014
 *                 self._core.mpz.gen_uniform(bits)
 *             elif self._type == ZT_LONG:
 *                 self._core.long.gen_uniform(bits)             # <<<<<<<<<<<<<<
 *             else:
 *                 raise RuntimeError("Integer type '%s' not understood."%self._type)
*/
      __pyx_t_4 = __Pyx_PyLong_As_int(__pyx_v_bits); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1014, __pyx_L1_error)
      __pyx_v_self->_core.__pyx_long->gen_uniform(__pyx_t_4);

      /* "fpylll/fplll/integer_matrix.pyx":1013
 *             if self._type == ZT_MPZ:
 *                 self._core.mpz.gen_uniform(bits)
 *             elif self._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *                 self._core.long.gen_uniform(bits)
 *             else:
*/
      break;
      default:

      /* "fpylll/fplll/integer_matrix.pyx":1016
 *                 self._core.long.gen_uniform(bits)
 *             else:
 *                 raise RuntimeError("Integer type '%s' not understood."%self._type)             # <<<<<<<<<<<<<<
 *             sig_off()
 * 
*/
      __pyx_t_3 = NULL;
      __pyx_t_6 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1016, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_2 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1016, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2};
        __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__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_5)) __PYX_ERR(0, 1016, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __PYX_ERR(0, 1016, __pyx_L1_error)
      break;
    }

    /* "fpylll/fplll/integer_matrix.pyx":1017
 *             else:
 *                 raise RuntimeError("Integer type '%s' not understood."%self._type)
 *             sig_off()             # <<<<<<<<<<<<<<
 * 
 *         elif algorithm == "ntrulike":
*/
    sig_off();

    /* "fpylll/fplll/integer_matrix.pyx":1008
 *             sig_off()
 * 
 *         elif algorithm == "uniform":             # <<<<<<<<<<<<<<
 *             bits = int(kwds["bits"])
 *             sig_on()
*/
    goto __pyx_L3;
  }

  /* "fpylll/fplll/integer_matrix.pyx":1019
 *             sig_off()
 * 
 *         elif algorithm == "ntrulike":             # <<<<<<<<<<<<<<
 *             if "q" in kwds:
 *                 q = int(kwds["q"])
*/
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_algorithm, __pyx_mstate_global->__pyx_n_u_ntrulike, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1019, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "fpylll/fplll/integer_matrix.pyx":1020
 * 
 *         elif algorithm == "ntrulike":
 *             if "q" in kwds:             # <<<<<<<<<<<<<<
 *                 q = int(kwds["q"])
 *                 sig_on()
*/
    __pyx_t_1 = (__Pyx_PyDict_ContainsTF(__pyx_mstate_global->__pyx_n_u_q, __pyx_v_kwds, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1020, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "fpylll/fplll/integer_matrix.pyx":1021
 *         elif algorithm == "ntrulike":
 *             if "q" in kwds:
 *                 q = int(kwds["q"])             # <<<<<<<<<<<<<<
 *                 sig_on()
 *                 if self._type == ZT_MPZ:
*/
      __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwds, __pyx_mstate_global->__pyx_n_u_q); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1021, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1021, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_q = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "fpylll/fplll/integer_matrix.pyx":1022
 *             if "q" in kwds:
 *                 q = int(kwds["q"])
 *                 sig_on()             # <<<<<<<<<<<<<<
 *                 if self._type == ZT_MPZ:
 *                     assign_Z_NR_mpz(t_mpz, q)
*/
      __pyx_t_4 = sig_on(); if (unlikely(__pyx_t_4 == ((int)0))) __PYX_ERR(0, 1022, __pyx_L1_error)

      /* "fpylll/fplll/integer_matrix.pyx":1023
 *                 q = int(kwds["q"])
 *                 sig_on()
 *                 if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *                     assign_Z_NR_mpz(t_mpz, q)
 *                     self._core.mpz.gen_ntrulike(t_mpz)
*/
      switch (__pyx_v_self->_type) {
        case fplll::ZT_MPZ:

        /* "fpylll/fplll/integer_matrix.pyx":1024
 *                 sig_on()
 *                 if self._type == ZT_MPZ:
 *                     assign_Z_NR_mpz(t_mpz, q)             # <<<<<<<<<<<<<<
 *                     self._core.mpz.gen_ntrulike(t_mpz)
 *                 elif self._type == ZT_LONG:
*/
        __pyx_t_4 = __pyx_f_6fpylll_2io_assign_Z_NR_mpz(__pyx_v_t_mpz, __pyx_v_q); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1024, __pyx_L1_error)

        /* "fpylll/fplll/integer_matrix.pyx":1025
 *                 if self._type == ZT_MPZ:
 *                     assign_Z_NR_mpz(t_mpz, q)
 *                     self._core.mpz.gen_ntrulike(t_mpz)             # <<<<<<<<<<<<<<
 *                 elif self._type == ZT_LONG:
 *                     t_long = <long> q
*/
        __pyx_v_self->_core.mpz->gen_ntrulike(__pyx_v_t_mpz);

        /* "fpylll/fplll/integer_matrix.pyx":1023
 *                 q = int(kwds["q"])
 *                 sig_on()
 *                 if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *                     assign_Z_NR_mpz(t_mpz, q)
 *                     self._core.mpz.gen_ntrulike(t_mpz)
*/
        break;
        case fplll::ZT_LONG:

        /* "fpylll/fplll/integer_matrix.pyx":1027
 *                     self._core.mpz.gen_ntrulike(t_mpz)
 *                 elif self._type == ZT_LONG:
 *                     t_long = <long> q             # <<<<<<<<<<<<<<
 *                     self._core.long.gen_ntrulike(t_long)
 *                 else:
*/
        __pyx_t_9 = __Pyx_PyLong_As_long(__pyx_v_q); if (unlikely((__pyx_t_9 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1027, __pyx_L1_error)
        __pyx_v_t_long = ((long)__pyx_t_9);

        /* "fpylll/fplll/integer_matrix.pyx":1028
 *                 elif self._type == ZT_LONG:
 *                     t_long = <long> q
 *                     self._core.long.gen_ntrulike(t_long)             # <<<<<<<<<<<<<<
 *                 else:
 *                     raise RuntimeError("Integer type '%s' not understood."%self._type)
*/
        __pyx_v_self->_core.__pyx_long->gen_ntrulike(__pyx_v_t_long);

        /* "fpylll/fplll/integer_matrix.pyx":1026
 *                     assign_Z_NR_mpz(t_mpz, q)
 *                     self._core.mpz.gen_ntrulike(t_mpz)
 *                 elif self._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *                     t_long = <long> q
 *                     self._core.long.gen_ntrulike(t_long)
*/
        break;
        default:

        /* "fpylll/fplll/integer_matrix.pyx":1030
 *                     self._core.long.gen_ntrulike(t_long)
 *                 else:
 *                     raise RuntimeError("Integer type '%s' not understood."%self._type)             # <<<<<<<<<<<<<<
 *                 sig_off()
 *             elif "bits" in kwds:
*/
        __pyx_t_5 = NULL;
        __pyx_t_3 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1030, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_6 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1030, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_7 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __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;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1030, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(0, 1030, __pyx_L1_error)
        break;
      }

      /* "fpylll/fplll/integer_matrix.pyx":1031
 *                 else:
 *                     raise RuntimeError("Integer type '%s' not understood."%self._type)
 *                 sig_off()             # <<<<<<<<<<<<<<
 *             elif "bits" in kwds:
 *                 bits = int(kwds["bits"])
*/
      sig_off();

      /* "fpylll/fplll/integer_matrix.pyx":1020
 * 
 *         elif algorithm == "ntrulike":
 *             if "q" in kwds:             # <<<<<<<<<<<<<<
 *                 q = int(kwds["q"])
 *                 sig_on()
*/
      goto __pyx_L4;
    }

    /* "fpylll/fplll/integer_matrix.pyx":1032
 *                     raise RuntimeError("Integer type '%s' not understood."%self._type)
 *                 sig_off()
 *             elif "bits" in kwds:             # <<<<<<<<<<<<<<
 *                 bits = int(kwds["bits"])
 *                 sig_on()
*/
    __pyx_t_1 = (__Pyx_PyDict_ContainsTF(__pyx_mstate_global->__pyx_n_u_bits, __pyx_v_kwds, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1032, __pyx_L1_error)
    if (likely(__pyx_t_1)) {

      /* "fpylll/fplll/integer_matrix.pyx":1033
 *                 sig_off()
 *             elif "bits" in kwds:
 *                 bits = int(kwds["bits"])             # <<<<<<<<<<<<<<
 *                 sig_on()
 *                 if self._type == ZT_MPZ:
*/
      __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_kwds, __pyx_mstate_global->__pyx_n_u_bits); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1033, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1033, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_bits = ((PyObject*)__pyx_t_6);
      __pyx_t_6 = 0;

      /* "fpylll/fplll/integer_matrix.pyx":1034
 *             elif "bits" in kwds:
 *                 bits = int(kwds["bits"])
 *                 sig_on()             # <<<<<<<<<<<<<<
 *                 if self._type == ZT_MPZ:
 *                     self._core.mpz.gen_ntrulike_bits(bits)
*/
      __pyx_t_4 = sig_on(); if (unlikely(__pyx_t_4 == ((int)0))) __PYX_ERR(0, 1034, __pyx_L1_error)

      /* "fpylll/fplll/integer_matrix.pyx":1035
 *                 bits = int(kwds["bits"])
 *                 sig_on()
 *                 if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *                     self._core.mpz.gen_ntrulike_bits(bits)
 *                 elif self._type == ZT_LONG:
*/
      switch (__pyx_v_self->_type) {
        case fplll::ZT_MPZ:

        /* "fpylll/fplll/integer_matrix.pyx":1036
 *                 sig_on()
 *                 if self._type == ZT_MPZ:
 *                     self._core.mpz.gen_ntrulike_bits(bits)             # <<<<<<<<<<<<<<
 *                 elif self._type == ZT_LONG:
 *                     self._core.long.gen_ntrulike_bits(bits)
*/
        __pyx_t_4 = __Pyx_PyLong_As_int(__pyx_v_bits); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1036, __pyx_L1_error)
        __pyx_v_self->_core.mpz->gen_ntrulike_bits(__pyx_t_4);

        /* "fpylll/fplll/integer_matrix.pyx":1035
 *                 bits = int(kwds["bits"])
 *                 sig_on()
 *                 if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *                     self._core.mpz.gen_ntrulike_bits(bits)
 *                 elif self._type == ZT_LONG:
*/
        break;
        case fplll::ZT_LONG:

        /* "fpylll/fplll/integer_matrix.pyx":1038
 *                     self._core.mpz.gen_ntrulike_bits(bits)
 *                 elif self._type == ZT_LONG:
 *                     self._core.long.gen_ntrulike_bits(bits)             # <<<<<<<<<<<<<<
 *                 else:
 *                     raise RuntimeError("Integer type '%s' not understood."%self._type)
*/
        __pyx_t_4 = __Pyx_PyLong_As_int(__pyx_v_bits); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1038, __pyx_L1_error)
        __pyx_v_self->_core.__pyx_long->gen_ntrulike_bits(__pyx_t_4);

        /* "fpylll/fplll/integer_matrix.pyx":1037
 *                 if self._type == ZT_MPZ:
 *                     self._core.mpz.gen_ntrulike_bits(bits)
 *                 elif self._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *                     self._core.long.gen_ntrulike_bits(bits)
 *                 else:
*/
        break;
        default:

        /* "fpylll/fplll/integer_matrix.pyx":1040
 *                     self._core.long.gen_ntrulike_bits(bits)
 *                 else:
 *                     raise RuntimeError("Integer type '%s' not understood."%self._type)             # <<<<<<<<<<<<<<
 *                 sig_off()
 *             else:
*/
        __pyx_t_2 = NULL;
        __pyx_t_5 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1040, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_3 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1040, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_7 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
          __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__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_6)) __PYX_ERR(0, 1040, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
        }
        __Pyx_Raise(__pyx_t_6, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __PYX_ERR(0, 1040, __pyx_L1_error)
        break;
      }

      /* "fpylll/fplll/integer_matrix.pyx":1041
 *                 else:
 *                     raise RuntimeError("Integer type '%s' not understood."%self._type)
 *                 sig_off()             # <<<<<<<<<<<<<<
 *             else:
 *                 raise ValueError("Either 'q' or 'bits' is required.")
*/
      sig_off();

      /* "fpylll/fplll/integer_matrix.pyx":1032
 *                     raise RuntimeError("Integer type '%s' not understood."%self._type)
 *                 sig_off()
 *             elif "bits" in kwds:             # <<<<<<<<<<<<<<
 *                 bits = int(kwds["bits"])
 *                 sig_on()
*/
      goto __pyx_L4;
    }

    /* "fpylll/fplll/integer_matrix.pyx":1043
 *                 sig_off()
 *             else:
 *                 raise ValueError("Either 'q' or 'bits' is required.")             # <<<<<<<<<<<<<<
 * 
 *         elif algorithm == "ntrulike2":
*/
    /*else*/ {
      __pyx_t_3 = NULL;
      __pyx_t_7 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Either_q_or_bits_is_required};
        __pyx_t_6 = __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_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1043, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __PYX_ERR(0, 1043, __pyx_L1_error)
    }
    __pyx_L4:;

    /* "fpylll/fplll/integer_matrix.pyx":1019
 *             sig_off()
 * 
 *         elif algorithm == "ntrulike":             # <<<<<<<<<<<<<<
 *             if "q" in kwds:
 *                 q = int(kwds["q"])
*/
    goto __pyx_L3;
  }

  /* "fpylll/fplll/integer_matrix.pyx":1045
 *                 raise ValueError("Either 'q' or 'bits' is required.")
 * 
 *         elif algorithm == "ntrulike2":             # <<<<<<<<<<<<<<
 *             if "q" in kwds:
 *                 q = int(kwds["q"])
*/
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_algorithm, __pyx_mstate_global->__pyx_n_u_ntrulike2, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1045, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "fpylll/fplll/integer_matrix.pyx":1046
 * 
 *         elif algorithm == "ntrulike2":
 *             if "q" in kwds:             # <<<<<<<<<<<<<<
 *                 q = int(kwds["q"])
 *                 sig_on()
*/
    __pyx_t_1 = (__Pyx_PyDict_ContainsTF(__pyx_mstate_global->__pyx_n_u_q, __pyx_v_kwds, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1046, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "fpylll/fplll/integer_matrix.pyx":1047
 *         elif algorithm == "ntrulike2":
 *             if "q" in kwds:
 *                 q = int(kwds["q"])             # <<<<<<<<<<<<<<
 *                 sig_on()
 *                 if self._type == ZT_MPZ:
*/
      __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_kwds, __pyx_mstate_global->__pyx_n_u_q); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1047, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1047, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_v_q = ((PyObject*)__pyx_t_3);
      __pyx_t_3 = 0;

      /* "fpylll/fplll/integer_matrix.pyx":1048
 *             if "q" in kwds:
 *                 q = int(kwds["q"])
 *                 sig_on()             # <<<<<<<<<<<<<<
 *                 if self._type == ZT_MPZ:
 *                     assign_Z_NR_mpz(t_mpz, q)
*/
      __pyx_t_4 = sig_on(); if (unlikely(__pyx_t_4 == ((int)0))) __PYX_ERR(0, 1048, __pyx_L1_error)

      /* "fpylll/fplll/integer_matrix.pyx":1049
 *                 q = int(kwds["q"])
 *                 sig_on()
 *                 if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *                     assign_Z_NR_mpz(t_mpz, q)
 *                     self._core.mpz.gen_ntrulike2(t_mpz)
*/
      switch (__pyx_v_self->_type) {
        case fplll::ZT_MPZ:

        /* "fpylll/fplll/integer_matrix.pyx":1050
 *                 sig_on()
 *                 if self._type == ZT_MPZ:
 *                     assign_Z_NR_mpz(t_mpz, q)             # <<<<<<<<<<<<<<
 *                     self._core.mpz.gen_ntrulike2(t_mpz)
 *                 elif self._type == ZT_LONG:
*/
        __pyx_t_4 = __pyx_f_6fpylll_2io_assign_Z_NR_mpz(__pyx_v_t_mpz, __pyx_v_q); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1050, __pyx_L1_error)

        /* "fpylll/fplll/integer_matrix.pyx":1051
 *                 if self._type == ZT_MPZ:
 *                     assign_Z_NR_mpz(t_mpz, q)
 *                     self._core.mpz.gen_ntrulike2(t_mpz)             # <<<<<<<<<<<<<<
 *                 elif self._type == ZT_LONG:
 *                     t_long = <long> q
*/
        __pyx_v_self->_core.mpz->gen_ntrulike2(__pyx_v_t_mpz);

        /* "fpylll/fplll/integer_matrix.pyx":1049
 *                 q = int(kwds["q"])
 *                 sig_on()
 *                 if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *                     assign_Z_NR_mpz(t_mpz, q)
 *                     self._core.mpz.gen_ntrulike2(t_mpz)
*/
        break;
        case fplll::ZT_LONG:

        /* "fpylll/fplll/integer_matrix.pyx":1053
 *                     self._core.mpz.gen_ntrulike2(t_mpz)
 *                 elif self._type == ZT_LONG:
 *                     t_long = <long> q             # <<<<<<<<<<<<<<
 *                     self._core.long.gen_ntrulike2(t_long)
 *                 else:
*/
        __pyx_t_9 = __Pyx_PyLong_As_long(__pyx_v_q); if (unlikely((__pyx_t_9 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1053, __pyx_L1_error)
        __pyx_v_t_long = ((long)__pyx_t_9);

        /* "fpylll/fplll/integer_matrix.pyx":1054
 *                 elif self._type == ZT_LONG:
 *                     t_long = <long> q
 *                     self._core.long.gen_ntrulike2(t_long)             # <<<<<<<<<<<<<<
 *                 else:
 *                     raise RuntimeError("Integer type '%s' not understood."%self._type)
*/
        __pyx_v_self->_core.__pyx_long->gen_ntrulike2(__pyx_v_t_long);

        /* "fpylll/fplll/integer_matrix.pyx":1052
 *                     assign_Z_NR_mpz(t_mpz, q)
 *                     self._core.mpz.gen_ntrulike2(t_mpz)
 *                 elif self._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *                     t_long = <long> q
 *                     self._core.long.gen_ntrulike2(t_long)
*/
        break;
        default:

        /* "fpylll/fplll/integer_matrix.pyx":1056
 *                     self._core.long.gen_ntrulike2(t_long)
 *                 else:
 *                     raise RuntimeError("Integer type '%s' not understood."%self._type)             # <<<<<<<<<<<<<<
 *                 sig_off()
 *             elif "bits" in kwds:
*/
        __pyx_t_6 = NULL;
        __pyx_t_2 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1056, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1056, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_7 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __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_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1056, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(0, 1056, __pyx_L1_error)
        break;
      }

      /* "fpylll/fplll/integer_matrix.pyx":1057
 *                 else:
 *                     raise RuntimeError("Integer type '%s' not understood."%self._type)
 *                 sig_off()             # <<<<<<<<<<<<<<
 *             elif "bits" in kwds:
 *                 bits = int(kwds["bits"])
*/
      sig_off();

      /* "fpylll/fplll/integer_matrix.pyx":1046
 * 
 *         elif algorithm == "ntrulike2":
 *             if "q" in kwds:             # <<<<<<<<<<<<<<
 *                 q = int(kwds["q"])
 *                 sig_on()
*/
      goto __pyx_L5;
    }

    /* "fpylll/fplll/integer_matrix.pyx":1058
 *                     raise RuntimeError("Integer type '%s' not understood."%self._type)
 *                 sig_off()
 *             elif "bits" in kwds:             # <<<<<<<<<<<<<<
 *                 bits = int(kwds["bits"])
 *                 sig_on()
*/
    __pyx_t_1 = (__Pyx_PyDict_ContainsTF(__pyx_mstate_global->__pyx_n_u_bits, __pyx_v_kwds, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1058, __pyx_L1_error)
    if (likely(__pyx_t_1)) {

      /* "fpylll/fplll/integer_matrix.pyx":1059
 *                 sig_off()
 *             elif "bits" in kwds:
 *                 bits = int(kwds["bits"])             # <<<<<<<<<<<<<<
 *                 sig_on()
 *                 if self._type == ZT_MPZ:
*/
      __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_kwds, __pyx_mstate_global->__pyx_n_u_bits); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1059, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1059, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_bits = ((PyObject*)__pyx_t_5);
      __pyx_t_5 = 0;

      /* "fpylll/fplll/integer_matrix.pyx":1060
 *             elif "bits" in kwds:
 *                 bits = int(kwds["bits"])
 *                 sig_on()             # <<<<<<<<<<<<<<
 *                 if self._type == ZT_MPZ:
 *                     self._core.mpz.gen_ntrulike2_bits(bits)
*/
      __pyx_t_4 = sig_on(); if (unlikely(__pyx_t_4 == ((int)0))) __PYX_ERR(0, 1060, __pyx_L1_error)

      /* "fpylll/fplll/integer_matrix.pyx":1061
 *                 bits = int(kwds["bits"])
 *                 sig_on()
 *                 if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *                     self._core.mpz.gen_ntrulike2_bits(bits)
 *                 elif self._type == ZT_LONG:
*/
      switch (__pyx_v_self->_type) {
        case fplll::ZT_MPZ:

        /* "fpylll/fplll/integer_matrix.pyx":1062
 *                 sig_on()
 *                 if self._type == ZT_MPZ:
 *                     self._core.mpz.gen_ntrulike2_bits(bits)             # <<<<<<<<<<<<<<
 *                 elif self._type == ZT_LONG:
 *                     self._core.long.gen_ntrulike2_bits(bits)
*/
        __pyx_t_4 = __Pyx_PyLong_As_int(__pyx_v_bits); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1062, __pyx_L1_error)
        __pyx_v_self->_core.mpz->gen_ntrulike2_bits(__pyx_t_4);

        /* "fpylll/fplll/integer_matrix.pyx":1061
 *                 bits = int(kwds["bits"])
 *                 sig_on()
 *                 if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *                     self._core.mpz.gen_ntrulike2_bits(bits)
 *                 elif self._type == ZT_LONG:
*/
        break;
        case fplll::ZT_LONG:

        /* "fpylll/fplll/integer_matrix.pyx":1064
 *                     self._core.mpz.gen_ntrulike2_bits(bits)
 *                 elif self._type == ZT_LONG:
 *                     self._core.long.gen_ntrulike2_bits(bits)             # <<<<<<<<<<<<<<
 *                 else:
 *                     raise RuntimeError("Integer type '%s' not understood."%self._type)
*/
        __pyx_t_4 = __Pyx_PyLong_As_int(__pyx_v_bits); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1064, __pyx_L1_error)
        __pyx_v_self->_core.__pyx_long->gen_ntrulike2_bits(__pyx_t_4);

        /* "fpylll/fplll/integer_matrix.pyx":1063
 *                 if self._type == ZT_MPZ:
 *                     self._core.mpz.gen_ntrulike2_bits(bits)
 *                 elif self._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *                     self._core.long.gen_ntrulike2_bits(bits)
 *                 else:
*/
        break;
        default:

        /* "fpylll/fplll/integer_matrix.pyx":1066
 *                     self._core.long.gen_ntrulike2_bits(bits)
 *                 else:
 *                     raise RuntimeError("Integer type '%s' not understood."%self._type)             # <<<<<<<<<<<<<<
 *                 sig_off()
 *             else:
*/
        __pyx_t_3 = NULL;
        __pyx_t_6 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1066, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_2 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1066, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_7 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2};
          __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__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_5)) __PYX_ERR(0, 1066, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        __Pyx_Raise(__pyx_t_5, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __PYX_ERR(0, 1066, __pyx_L1_error)
        break;
      }

      /* "fpylll/fplll/integer_matrix.pyx":1067
 *                 else:
 *                     raise RuntimeError("Integer type '%s' not understood."%self._type)
 *                 sig_off()             # <<<<<<<<<<<<<<
 *             else:
 *                 raise ValueError("Either 'q' or 'bits' is required.")
*/
      sig_off();

      /* "fpylll/fplll/integer_matrix.pyx":1058
 *                     raise RuntimeError("Integer type '%s' not understood."%self._type)
 *                 sig_off()
 *             elif "bits" in kwds:             # <<<<<<<<<<<<<<
 *                 bits = int(kwds["bits"])
 *                 sig_on()
*/
      goto __pyx_L5;
    }

    /* "fpylll/fplll/integer_matrix.pyx":1069
 *                 sig_off()
 *             else:
 *                 raise ValueError("Either 'q' or 'bits' is required.")             # <<<<<<<<<<<<<<
 * 
 *         elif algorithm == "qary":
*/
    /*else*/ {
      __pyx_t_2 = NULL;
      __pyx_t_7 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Either_q_or_bits_is_required};
        __pyx_t_5 = __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_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1069, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __PYX_ERR(0, 1069, __pyx_L1_error)
    }
    __pyx_L5:;

    /* "fpylll/fplll/integer_matrix.pyx":1045
 *                 raise ValueError("Either 'q' or 'bits' is required.")
 * 
 *         elif algorithm == "ntrulike2":             # <<<<<<<<<<<<<<
 *             if "q" in kwds:
 *                 q = int(kwds["q"])
*/
    goto __pyx_L3;
  }

  /* "fpylll/fplll/integer_matrix.pyx":1071
 *                 raise ValueError("Either 'q' or 'bits' is required.")
 * 
 *         elif algorithm == "qary":             # <<<<<<<<<<<<<<
 *             k = int(kwds["k"])
 *             if "q" in kwds:
*/
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_algorithm, __pyx_mstate_global->__pyx_n_u_qary, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1071, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "fpylll/fplll/integer_matrix.pyx":1072
 * 
 *         elif algorithm == "qary":
 *             k = int(kwds["k"])             # <<<<<<<<<<<<<<
 *             if "q" in kwds:
 *                 q = int(kwds["q"])
*/
    __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwds, __pyx_mstate_global->__pyx_n_u_k); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1072, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1072, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_k = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "fpylll/fplll/integer_matrix.pyx":1073
 *         elif algorithm == "qary":
 *             k = int(kwds["k"])
 *             if "q" in kwds:             # <<<<<<<<<<<<<<
 *                 q = int(kwds["q"])
 *                 sig_on()
*/
    __pyx_t_1 = (__Pyx_PyDict_ContainsTF(__pyx_mstate_global->__pyx_n_u_q, __pyx_v_kwds, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1073, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "fpylll/fplll/integer_matrix.pyx":1074
 *             k = int(kwds["k"])
 *             if "q" in kwds:
 *                 q = int(kwds["q"])             # <<<<<<<<<<<<<<
 *                 sig_on()
 *                 if self._type == ZT_MPZ:
*/
      __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_kwds, __pyx_mstate_global->__pyx_n_u_q); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1074, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1074, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_q = ((PyObject*)__pyx_t_5);
      __pyx_t_5 = 0;

      /* "fpylll/fplll/integer_matrix.pyx":1075
 *             if "q" in kwds:
 *                 q = int(kwds["q"])
 *                 sig_on()             # <<<<<<<<<<<<<<
 *                 if self._type == ZT_MPZ:
 *                     assign_Z_NR_mpz(t_mpz, q)
*/
      __pyx_t_4 = sig_on(); if (unlikely(__pyx_t_4 == ((int)0))) __PYX_ERR(0, 1075, __pyx_L1_error)

      /* "fpylll/fplll/integer_matrix.pyx":1076
 *                 q = int(kwds["q"])
 *                 sig_on()
 *                 if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *                     assign_Z_NR_mpz(t_mpz, q)
 *                     self._core.mpz.gen_qary(k, t_mpz)
*/
      switch (__pyx_v_self->_type) {
        case fplll::ZT_MPZ:

        /* "fpylll/fplll/integer_matrix.pyx":1077
 *                 sig_on()
 *                 if self._type == ZT_MPZ:
 *                     assign_Z_NR_mpz(t_mpz, q)             # <<<<<<<<<<<<<<
 *                     self._core.mpz.gen_qary(k, t_mpz)
 *                 elif self._type == ZT_LONG:
*/
        __pyx_t_4 = __pyx_f_6fpylll_2io_assign_Z_NR_mpz(__pyx_v_t_mpz, __pyx_v_q); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1077, __pyx_L1_error)

        /* "fpylll/fplll/integer_matrix.pyx":1078
 *                 if self._type == ZT_MPZ:
 *                     assign_Z_NR_mpz(t_mpz, q)
 *                     self._core.mpz.gen_qary(k, t_mpz)             # <<<<<<<<<<<<<<
 *                 elif self._type == ZT_LONG:
 *                     t_long = <long> q
*/
        __pyx_t_4 = __Pyx_PyLong_As_int(__pyx_v_k); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1078, __pyx_L1_error)
        __pyx_v_self->_core.mpz->gen_qary(__pyx_t_4, __pyx_v_t_mpz);

        /* "fpylll/fplll/integer_matrix.pyx":1076
 *                 q = int(kwds["q"])
 *                 sig_on()
 *                 if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *                     assign_Z_NR_mpz(t_mpz, q)
 *                     self._core.mpz.gen_qary(k, t_mpz)
*/
        break;
        case fplll::ZT_LONG:

        /* "fpylll/fplll/integer_matrix.pyx":1080
 *                     self._core.mpz.gen_qary(k, t_mpz)
 *                 elif self._type == ZT_LONG:
 *                     t_long = <long> q             # <<<<<<<<<<<<<<
 *                     self._core.long.gen_qary(k, t_long)
 *                 else:
*/
        __pyx_t_9 = __Pyx_PyLong_As_long(__pyx_v_q); if (unlikely((__pyx_t_9 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1080, __pyx_L1_error)
        __pyx_v_t_long = ((long)__pyx_t_9);

        /* "fpylll/fplll/integer_matrix.pyx":1081
 *                 elif self._type == ZT_LONG:
 *                     t_long = <long> q
 *                     self._core.long.gen_qary(k, t_long)             # <<<<<<<<<<<<<<
 *                 else:
 *                     raise RuntimeError("Integer type '%s' not understood."%self._type)
*/
        __pyx_t_4 = __Pyx_PyLong_As_int(__pyx_v_k); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1081, __pyx_L1_error)
        __pyx_v_self->_core.__pyx_long->gen_qary(__pyx_t_4, __pyx_v_t_long);

        /* "fpylll/fplll/integer_matrix.pyx":1079
 *                     assign_Z_NR_mpz(t_mpz, q)
 *                     self._core.mpz.gen_qary(k, t_mpz)
 *                 elif self._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *                     t_long = <long> q
 *                     self._core.long.gen_qary(k, t_long)
*/
        break;
        default:

        /* "fpylll/fplll/integer_matrix.pyx":1083
 *                     self._core.long.gen_qary(k, t_long)
 *                 else:
 *                     raise RuntimeError("Integer type '%s' not understood."%self._type)             # <<<<<<<<<<<<<<
 *                 sig_off()
 *             elif "bits" in kwds:
*/
        __pyx_t_2 = NULL;
        __pyx_t_3 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1083, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_6 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1083, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_7 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_6};
          __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1083, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        __Pyx_Raise(__pyx_t_5, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __PYX_ERR(0, 1083, __pyx_L1_error)
        break;
      }

      /* "fpylll/fplll/integer_matrix.pyx":1084
 *                 else:
 *                     raise RuntimeError("Integer type '%s' not understood."%self._type)
 *                 sig_off()             # <<<<<<<<<<<<<<
 *             elif "bits" in kwds:
 *                 bits = int(kwds["bits"])
*/
      sig_off();

      /* "fpylll/fplll/integer_matrix.pyx":1073
 *         elif algorithm == "qary":
 *             k = int(kwds["k"])
 *             if "q" in kwds:             # <<<<<<<<<<<<<<
 *                 q = int(kwds["q"])
 *                 sig_on()
*/
      goto __pyx_L6;
    }

    /* "fpylll/fplll/integer_matrix.pyx":1085
 *                     raise RuntimeError("Integer type '%s' not understood."%self._type)
 *                 sig_off()
 *             elif "bits" in kwds:             # <<<<<<<<<<<<<<
 *                 bits = int(kwds["bits"])
 *                 sig_on()
*/
    __pyx_t_1 = (__Pyx_PyDict_ContainsTF(__pyx_mstate_global->__pyx_n_u_bits, __pyx_v_kwds, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1085, __pyx_L1_error)
    if (likely(__pyx_t_1)) {

      /* "fpylll/fplll/integer_matrix.pyx":1086
 *                 sig_off()
 *             elif "bits" in kwds:
 *                 bits = int(kwds["bits"])             # <<<<<<<<<<<<<<
 *                 sig_on()
 *                 if self._type == ZT_MPZ:
*/
      __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwds, __pyx_mstate_global->__pyx_n_u_bits); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1086, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1086, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_bits = ((PyObject*)__pyx_t_6);
      __pyx_t_6 = 0;

      /* "fpylll/fplll/integer_matrix.pyx":1087
 *             elif "bits" in kwds:
 *                 bits = int(kwds["bits"])
 *                 sig_on()             # <<<<<<<<<<<<<<
 *                 if self._type == ZT_MPZ:
 *                     self._core.mpz.gen_qary_prime(k, bits)
*/
      __pyx_t_4 = sig_on(); if (unlikely(__pyx_t_4 == ((int)0))) __PYX_ERR(0, 1087, __pyx_L1_error)

      /* "fpylll/fplll/integer_matrix.pyx":1088
 *                 bits = int(kwds["bits"])
 *                 sig_on()
 *                 if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *                     self._core.mpz.gen_qary_prime(k, bits)
 *                 elif self._type == ZT_LONG:
*/
      switch (__pyx_v_self->_type) {
        case fplll::ZT_MPZ:

        /* "fpylll/fplll/integer_matrix.pyx":1089
 *                 sig_on()
 *                 if self._type == ZT_MPZ:
 *                     self._core.mpz.gen_qary_prime(k, bits)             # <<<<<<<<<<<<<<
 *                 elif self._type == ZT_LONG:
 *                     self._core.long.gen_qary_prime(k, bits)
*/
        __pyx_t_4 = __Pyx_PyLong_As_int(__pyx_v_k); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1089, __pyx_L1_error)
        __pyx_t_8 = __Pyx_PyLong_As_int(__pyx_v_bits); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1089, __pyx_L1_error)
        __pyx_v_self->_core.mpz->gen_qary_prime(__pyx_t_4, __pyx_t_8);

        /* "fpylll/fplll/integer_matrix.pyx":1088
 *                 bits = int(kwds["bits"])
 *                 sig_on()
 *                 if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *                     self._core.mpz.gen_qary_prime(k, bits)
 *                 elif self._type == ZT_LONG:
*/
        break;
        case fplll::ZT_LONG:

        /* "fpylll/fplll/integer_matrix.pyx":1091
 *                     self._core.mpz.gen_qary_prime(k, bits)
 *                 elif self._type == ZT_LONG:
 *                     self._core.long.gen_qary_prime(k, bits)             # <<<<<<<<<<<<<<
 *                 else:
 *                     raise RuntimeError("Integer type '%s' not understood."%self._type)
*/
        __pyx_t_8 = __Pyx_PyLong_As_int(__pyx_v_k); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1091, __pyx_L1_error)
        __pyx_t_4 = __Pyx_PyLong_As_int(__pyx_v_bits); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1091, __pyx_L1_error)
        __pyx_v_self->_core.__pyx_long->gen_qary_prime(__pyx_t_8, __pyx_t_4);

        /* "fpylll/fplll/integer_matrix.pyx":1090
 *                 if self._type == ZT_MPZ:
 *                     self._core.mpz.gen_qary_prime(k, bits)
 *                 elif self._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *                     self._core.long.gen_qary_prime(k, bits)
 *                 else:
*/
        break;
        default:

        /* "fpylll/fplll/integer_matrix.pyx":1093
 *                     self._core.long.gen_qary_prime(k, bits)
 *                 else:
 *                     raise RuntimeError("Integer type '%s' not understood."%self._type)             # <<<<<<<<<<<<<<
 *                 sig_off()
 *             else:
*/
        __pyx_t_5 = NULL;
        __pyx_t_2 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1093, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1093, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_7 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
          __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __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;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1093, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
        }
        __Pyx_Raise(__pyx_t_6, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __PYX_ERR(0, 1093, __pyx_L1_error)
        break;
      }

      /* "fpylll/fplll/integer_matrix.pyx":1094
 *                 else:
 *                     raise RuntimeError("Integer type '%s' not understood."%self._type)
 *                 sig_off()             # <<<<<<<<<<<<<<
 *             else:
 *                 raise ValueError("Either 'q' or 'bits' is required.")
*/
      sig_off();

      /* "fpylll/fplll/integer_matrix.pyx":1085
 *                     raise RuntimeError("Integer type '%s' not understood."%self._type)
 *                 sig_off()
 *             elif "bits" in kwds:             # <<<<<<<<<<<<<<
 *                 bits = int(kwds["bits"])
 *                 sig_on()
*/
      goto __pyx_L6;
    }

    /* "fpylll/fplll/integer_matrix.pyx":1096
 *                 sig_off()
 *             else:
 *                 raise ValueError("Either 'q' or 'bits' is required.")             # <<<<<<<<<<<<<<
 * 
 *         elif algorithm == "trg":
*/
    /*else*/ {
      __pyx_t_3 = NULL;
      __pyx_t_7 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Either_q_or_bits_is_required};
        __pyx_t_6 = __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_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1096, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __PYX_ERR(0, 1096, __pyx_L1_error)
    }
    __pyx_L6:;

    /* "fpylll/fplll/integer_matrix.pyx":1071
 *                 raise ValueError("Either 'q' or 'bits' is required.")
 * 
 *         elif algorithm == "qary":             # <<<<<<<<<<<<<<
 *             k = int(kwds["k"])
 *             if "q" in kwds:
*/
    goto __pyx_L3;
  }

  /* "fpylll/fplll/integer_matrix.pyx":1098
 *                 raise ValueError("Either 'q' or 'bits' is required.")
 * 
 *         elif algorithm == "trg":             # <<<<<<<<<<<<<<
 *             alpha = float(kwds["alpha"])
 *             sig_on()
*/
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_algorithm, __pyx_mstate_global->__pyx_n_u_trg, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1098, __pyx_L1_error)
  if (likely(__pyx_t_1)) {

    /* "fpylll/fplll/integer_matrix.pyx":1099
 * 
 *         elif algorithm == "trg":
 *             alpha = float(kwds["alpha"])             # <<<<<<<<<<<<<<
 *             sig_on()
 *             if self._type == ZT_MPZ:
*/
    __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_kwds, __pyx_mstate_global->__pyx_n_u_alpha); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1099, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_10 = __Pyx_PyObject_AsDouble(__pyx_t_6); if (unlikely(__PYX_CHECK_FLOAT_EXCEPTION(__pyx_t_10, ((double)((double)-1))) && PyErr_Occurred())) __PYX_ERR(0, 1099, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_alpha = __pyx_t_10;

    /* "fpylll/fplll/integer_matrix.pyx":1100
 *         elif algorithm == "trg":
 *             alpha = float(kwds["alpha"])
 *             sig_on()             # <<<<<<<<<<<<<<
 *             if self._type == ZT_MPZ:
 *                 self._core.mpz.gen_trg(alpha)
*/
    __pyx_t_4 = sig_on(); if (unlikely(__pyx_t_4 == ((int)0))) __PYX_ERR(0, 1100, __pyx_L1_error)

    /* "fpylll/fplll/integer_matrix.pyx":1101
 *             alpha = float(kwds["alpha"])
 *             sig_on()
 *             if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *                 self._core.mpz.gen_trg(alpha)
 *             elif self._type == ZT_LONG:
*/
    switch (__pyx_v_self->_type) {
      case fplll::ZT_MPZ:

      /* "fpylll/fplll/integer_matrix.pyx":1102
 *             sig_on()
 *             if self._type == ZT_MPZ:
 *                 self._core.mpz.gen_trg(alpha)             # <<<<<<<<<<<<<<
 *             elif self._type == ZT_LONG:
 *                 self._core.long.gen_trg(alpha)
*/
      __pyx_v_self->_core.mpz->gen_trg(__pyx_v_alpha);

      /* "fpylll/fplll/integer_matrix.pyx":1101
 *             alpha = float(kwds["alpha"])
 *             sig_on()
 *             if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *                 self._core.mpz.gen_trg(alpha)
 *             elif self._type == ZT_LONG:
*/
      break;
      case fplll::ZT_LONG:

      /* "fpylll/fplll/integer_matrix.pyx":1104
 *                 self._core.mpz.gen_trg(alpha)
 *             elif self._type == ZT_LONG:
 *                 self._core.long.gen_trg(alpha)             # <<<<<<<<<<<<<<
 *             else:
 *                 raise RuntimeError("Integer type '%s' not understood."%self._type)
*/
      __pyx_v_self->_core.__pyx_long->gen_trg(__pyx_v_alpha);

      /* "fpylll/fplll/integer_matrix.pyx":1103
 *             if self._type == ZT_MPZ:
 *                 self._core.mpz.gen_trg(alpha)
 *             elif self._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *                 self._core.long.gen_trg(alpha)
 *             else:
*/
      break;
      default:

      /* "fpylll/fplll/integer_matrix.pyx":1106
 *                 self._core.long.gen_trg(alpha)
 *             else:
 *                 raise RuntimeError("Integer type '%s' not understood."%self._type)             # <<<<<<<<<<<<<<
 *             sig_off()
 * 
*/
      __pyx_t_3 = NULL;
      __pyx_t_5 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1106, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1106, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2};
        __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__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_6)) __PYX_ERR(0, 1106, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __PYX_ERR(0, 1106, __pyx_L1_error)
      break;
    }

    /* "fpylll/fplll/integer_matrix.pyx":1107
 *             else:
 *                 raise RuntimeError("Integer type '%s' not understood."%self._type)
 *             sig_off()             # <<<<<<<<<<<<<<
 * 
 *         else:
*/
    sig_off();

    /* "fpylll/fplll/integer_matrix.pyx":1098
 *                 raise ValueError("Either 'q' or 'bits' is required.")
 * 
 *         elif algorithm == "trg":             # <<<<<<<<<<<<<<
 *             alpha = float(kwds["alpha"])
 *             sig_on()
*/
    goto __pyx_L3;
  }

  /* "fpylll/fplll/integer_matrix.pyx":1110
 * 
 *         else:
 *             raise ValueError("Algorithm '%s' unknown."%algorithm)             # <<<<<<<<<<<<<<
 * 
 *     def gen_identity(self, int nrows=-1):
*/
  /*else*/ {
    __pyx_t_2 = NULL;
    __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Algorithm_s_unknown, __pyx_v_algorithm); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_6 = __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_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1110, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_Raise(__pyx_t_6, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __PYX_ERR(0, 1110, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "fpylll/fplll/integer_matrix.pyx":974
 *             raise ValueError("Parameter '%s' not understood."%key)
 * 
 *     def randomize(self, algorithm, **kwds):             # <<<<<<<<<<<<<<
 *         """Randomize this matrix using ``algorithm``.
 * 
*/

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.randomize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_bits);
  __Pyx_XDECREF(__pyx_v_bits2);
  __Pyx_XDECREF(__pyx_v_q);
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":1112
 *             raise ValueError("Algorithm '%s' unknown."%algorithm)
 * 
 *     def gen_identity(self, int nrows=-1):             # <<<<<<<<<<<<<<
 *         """Generate identity matrix.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_33gen_identity(PyObject *__pyx_v_self, 
#if 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_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_32gen_identity, "IntegerMatrix.gen_identity(self, int nrows=-1)\n\nGenerate identity matrix.\n\n:param nrows: number of rows");
static PyMethodDef __pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_33gen_identity = {"gen_identity", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_33gen_identity, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_32gen_identity};
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_33gen_identity(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_nrows;
  #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("gen_identity (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_nrows,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, 1112, __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, 1112, __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, "gen_identity", 0) < (0)) __PYX_ERR(0, 1112, __pyx_L3_error)
    } else {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1112, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_nrows = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_nrows == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1112, __pyx_L3_error)
    } else {
      __pyx_v_nrows = ((int)-1);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("gen_identity", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 1112, __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("fpylll.fplll.integer_matrix.IntegerMatrix.gen_identity", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_32gen_identity(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self), __pyx_v_nrows);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_32gen_identity(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, int __pyx_v_nrows) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  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("gen_identity", 0);

  /* "fpylll/fplll/integer_matrix.pyx":1119
 *         """
 * 
 *         if nrows == -1:             # <<<<<<<<<<<<<<
 *             nrows = self.nrows
 * 
*/
  __pyx_t_1 = (__pyx_v_nrows == -1L);
  if (__pyx_t_1) {

    /* "fpylll/fplll/integer_matrix.pyx":1120
 * 
 *         if nrows == -1:
 *             nrows = self.nrows             # <<<<<<<<<<<<<<
 * 
 *         if self._type == ZT_MPZ:
*/
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_nrows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1120, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_nrows = __pyx_t_3;

    /* "fpylll/fplll/integer_matrix.pyx":1119
 *         """
 * 
 *         if nrows == -1:             # <<<<<<<<<<<<<<
 *             nrows = self.nrows
 * 
*/
  }

  /* "fpylll/fplll/integer_matrix.pyx":1122
 *             nrows = self.nrows
 * 
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             self._core.mpz.gen_identity(nrows)
 *         elif self._type == ZT_LONG:
*/
  switch (__pyx_v_self->_type) {
    case fplll::ZT_MPZ:

    /* "fpylll/fplll/integer_matrix.pyx":1123
 * 
 *         if self._type == ZT_MPZ:
 *             self._core.mpz.gen_identity(nrows)             # <<<<<<<<<<<<<<
 *         elif self._type == ZT_LONG:
 *             self._core.long.gen_identity(nrows)
*/
    __pyx_v_self->_core.mpz->gen_identity(__pyx_v_nrows);

    /* "fpylll/fplll/integer_matrix.pyx":1122
 *             nrows = self.nrows
 * 
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             self._core.mpz.gen_identity(nrows)
 *         elif self._type == ZT_LONG:
*/
    break;
    case fplll::ZT_LONG:

    /* "fpylll/fplll/integer_matrix.pyx":1125
 *             self._core.mpz.gen_identity(nrows)
 *         elif self._type == ZT_LONG:
 *             self._core.long.gen_identity(nrows)             # <<<<<<<<<<<<<<
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
*/
    __pyx_v_self->_core.__pyx_long->gen_identity(__pyx_v_nrows);

    /* "fpylll/fplll/integer_matrix.pyx":1124
 *         if self._type == ZT_MPZ:
 *             self._core.mpz.gen_identity(nrows)
 *         elif self._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *             self._core.long.gen_identity(nrows)
 *         else:
*/
    break;
    default:

    /* "fpylll/fplll/integer_matrix.pyx":1127
 *             self._core.long.gen_identity(nrows)
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)             # <<<<<<<<<<<<<<
 * 
 *     def clear(self):
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1127, __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_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __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_2)) __PYX_ERR(0, 1127, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1127, __pyx_L1_error)
    break;
  }

  /* "fpylll/fplll/integer_matrix.pyx":1112
 *             raise ValueError("Algorithm '%s' unknown."%algorithm)
 * 
 *     def gen_identity(self, int nrows=-1):             # <<<<<<<<<<<<<<
 *         """Generate identity matrix.
 * 
*/

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.gen_identity", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":1129
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def clear(self):             # <<<<<<<<<<<<<<
 *         """
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_35clear(PyObject *__pyx_v_self, 
#if 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_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_34clear, "IntegerMatrix.clear(self)\n\n        ");
static PyMethodDef __pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_35clear = {"clear", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_35clear, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_34clear};
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_35clear(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("clear (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("clear", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("clear", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_34clear(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self));

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

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_34clear(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("clear", 0);

  /* "fpylll/fplll/integer_matrix.pyx":1134
 * 
 *         """
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).clear()
 *         elif self._type == ZT_LONG:
*/
  switch (__pyx_v_self->_type) {
    case fplll::ZT_MPZ:

    /* "fpylll/fplll/integer_matrix.pyx":1135
 *         """
 *         if self._type == ZT_MPZ:
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).clear()             # <<<<<<<<<<<<<<
 *         elif self._type == ZT_LONG:
 *             return (<Matrix[Z_NR[long]]*>self._core.long).clear()
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_void_to_None(((fplll::Matrix<fplll::Z_NR<mpz_t> >  *)__pyx_v_self->_core.mpz)->clear()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":1134
 * 
 *         """
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).clear()
 *         elif self._type == ZT_LONG:
*/
    break;
    case fplll::ZT_LONG:

    /* "fpylll/fplll/integer_matrix.pyx":1137
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).clear()
 *         elif self._type == ZT_LONG:
 *             return (<Matrix[Z_NR[long]]*>self._core.long).clear()             # <<<<<<<<<<<<<<
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_void_to_None(((fplll::Matrix<fplll::Z_NR<long> >  *)__pyx_v_self->_core.__pyx_long)->clear()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":1136
 *         if self._type == ZT_MPZ:
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).clear()
 *         elif self._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *             return (<Matrix[Z_NR[long]]*>self._core.long).clear()
 *         else:
*/
    break;
    default:

    /* "fpylll/fplll/integer_matrix.pyx":1139
 *             return (<Matrix[Z_NR[long]]*>self._core.long).clear()
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)             # <<<<<<<<<<<<<<
 * 
 *     def is_empty(self):
*/
    __pyx_t_2 = NULL;
    __pyx_t_3 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1139, __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_RuntimeError)), __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(0, 1139, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1139, __pyx_L1_error)
    break;
  }

  /* "fpylll/fplll/integer_matrix.pyx":1129
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def clear(self):             # <<<<<<<<<<<<<<
 *         """
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.clear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":1141
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def is_empty(self):             # <<<<<<<<<<<<<<
 *         """
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_37is_empty(PyObject *__pyx_v_self, 
#if 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_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_36is_empty, "IntegerMatrix.is_empty(self)\n\n        ");
static PyMethodDef __pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_37is_empty = {"is_empty", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_37is_empty, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_36is_empty};
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_37is_empty(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_empty (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_empty", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("is_empty", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_36is_empty(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self));

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

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_36is_empty(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_empty", 0);

  /* "fpylll/fplll/integer_matrix.pyx":1146
 * 
 *         """
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             return bool((<Matrix[Z_NR[mpz_t]]*>self._core.mpz).empty())
 *         elif self._type == ZT_LONG:
*/
  switch (__pyx_v_self->_type) {
    case fplll::ZT_MPZ:

    /* "fpylll/fplll/integer_matrix.pyx":1147
 *         """
 *         if self._type == ZT_MPZ:
 *             return bool((<Matrix[Z_NR[mpz_t]]*>self._core.mpz).empty())             # <<<<<<<<<<<<<<
 *         elif self._type == ZT_LONG:
 *             return bool((<Matrix[Z_NR[long]]*>self._core.long).empty())
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(((fplll::Matrix<fplll::Z_NR<mpz_t> >  *)__pyx_v_self->_core.mpz)->empty() != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":1146
 * 
 *         """
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             return bool((<Matrix[Z_NR[mpz_t]]*>self._core.mpz).empty())
 *         elif self._type == ZT_LONG:
*/
    break;
    case fplll::ZT_LONG:

    /* "fpylll/fplll/integer_matrix.pyx":1149
 *             return bool((<Matrix[Z_NR[mpz_t]]*>self._core.mpz).empty())
 *         elif self._type == ZT_LONG:
 *             return bool((<Matrix[Z_NR[long]]*>self._core.long).empty())             # <<<<<<<<<<<<<<
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(((fplll::Matrix<fplll::Z_NR<long> >  *)__pyx_v_self->_core.__pyx_long)->empty() != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":1148
 *         if self._type == ZT_MPZ:
 *             return bool((<Matrix[Z_NR[mpz_t]]*>self._core.mpz).empty())
 *         elif self._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *             return bool((<Matrix[Z_NR[long]]*>self._core.long).empty())
 *         else:
*/
    break;
    default:

    /* "fpylll/fplll/integer_matrix.pyx":1151
 *             return bool((<Matrix[Z_NR[long]]*>self._core.long).empty())
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)             # <<<<<<<<<<<<<<
 * 
 *     def resize(self, int rows, int cols):
*/
    __pyx_t_2 = NULL;
    __pyx_t_3 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1151, __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_RuntimeError)), __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(0, 1151, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1151, __pyx_L1_error)
    break;
  }

  /* "fpylll/fplll/integer_matrix.pyx":1141
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def is_empty(self):             # <<<<<<<<<<<<<<
 *         """
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.is_empty", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":1153
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def resize(self, int rows, int cols):             # <<<<<<<<<<<<<<
 *         """
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_39resize(PyObject *__pyx_v_self, 
#if 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_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_38resize, "IntegerMatrix.resize(self, int rows, int cols)\n\n:param int rows:\n:param int cols:");
static PyMethodDef __pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_39resize = {"resize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_39resize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_38resize};
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_39resize(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_rows;
  int __pyx_v_cols;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("resize (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_rows,&__pyx_mstate_global->__pyx_n_u_cols,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, 1153, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1153, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1153, __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, "resize", 0) < (0)) __PYX_ERR(0, 1153, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("resize", 1, 2, 2, i); __PYX_ERR(0, 1153, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1153, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1153, __pyx_L3_error)
    }
    __pyx_v_rows = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_rows == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1153, __pyx_L3_error)
    __pyx_v_cols = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_cols == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1153, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("resize", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1153, __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("fpylll.fplll.integer_matrix.IntegerMatrix.resize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_38resize(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self), __pyx_v_rows, __pyx_v_cols);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_38resize(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, int __pyx_v_rows, int __pyx_v_cols) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("resize", 0);

  /* "fpylll/fplll/integer_matrix.pyx":1160
 * 
 *         """
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).resize(rows, cols)
 *         elif self._type == ZT_LONG:
*/
  switch (__pyx_v_self->_type) {
    case fplll::ZT_MPZ:

    /* "fpylll/fplll/integer_matrix.pyx":1161
 *         """
 *         if self._type == ZT_MPZ:
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).resize(rows, cols)             # <<<<<<<<<<<<<<
 *         elif self._type == ZT_LONG:
 *             return (<Matrix[Z_NR[long]]*>self._core.long).resize(rows, cols)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_void_to_None(((fplll::Matrix<fplll::Z_NR<mpz_t> >  *)__pyx_v_self->_core.mpz)->resize(__pyx_v_rows, __pyx_v_cols)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":1160
 * 
 *         """
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).resize(rows, cols)
 *         elif self._type == ZT_LONG:
*/
    break;
    case fplll::ZT_LONG:

    /* "fpylll/fplll/integer_matrix.pyx":1163
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).resize(rows, cols)
 *         elif self._type == ZT_LONG:
 *             return (<Matrix[Z_NR[long]]*>self._core.long).resize(rows, cols)             # <<<<<<<<<<<<<<
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_void_to_None(((fplll::Matrix<fplll::Z_NR<long> >  *)__pyx_v_self->_core.__pyx_long)->resize(__pyx_v_rows, __pyx_v_cols)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":1162
 *         if self._type == ZT_MPZ:
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).resize(rows, cols)
 *         elif self._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *             return (<Matrix[Z_NR[long]]*>self._core.long).resize(rows, cols)
 *         else:
*/
    break;
    default:

    /* "fpylll/fplll/integer_matrix.pyx":1165
 *             return (<Matrix[Z_NR[long]]*>self._core.long).resize(rows, cols)
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)             # <<<<<<<<<<<<<<
 * 
 *     def set_rows(self, int rows):
*/
    __pyx_t_2 = NULL;
    __pyx_t_3 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1165, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1165, __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_RuntimeError)), __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(0, 1165, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1165, __pyx_L1_error)
    break;
  }

  /* "fpylll/fplll/integer_matrix.pyx":1153
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def resize(self, int rows, int cols):             # <<<<<<<<<<<<<<
 *         """
 * 
*/

  /* function exit code */
  __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("fpylll.fplll.integer_matrix.IntegerMatrix.resize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":1167
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def set_rows(self, int rows):             # <<<<<<<<<<<<<<
 *         """
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_41set_rows(PyObject *__pyx_v_self, 
#if 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_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_40set_rows, "IntegerMatrix.set_rows(self, int rows)\n\n:param int rows:");
static PyMethodDef __pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_41set_rows = {"set_rows", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_41set_rows, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_40set_rows};
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_41set_rows(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_rows;
  #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("set_rows (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_rows,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, 1167, __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, 1167, __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, "set_rows", 0) < (0)) __PYX_ERR(0, 1167, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_rows", 1, 1, 1, i); __PYX_ERR(0, 1167, __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, 1167, __pyx_L3_error)
    }
    __pyx_v_rows = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_rows == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1167, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_rows", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1167, __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("fpylll.fplll.integer_matrix.IntegerMatrix.set_rows", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_40set_rows(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self), __pyx_v_rows);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_40set_rows(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, int __pyx_v_rows) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_rows", 0);

  /* "fpylll/fplll/integer_matrix.pyx":1173
 * 
 *         """
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).set_rows(rows)
 *         elif self._type == ZT_LONG:
*/
  switch (__pyx_v_self->_type) {
    case fplll::ZT_MPZ:

    /* "fpylll/fplll/integer_matrix.pyx":1174
 *         """
 *         if self._type == ZT_MPZ:
 *             (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).set_rows(rows)             # <<<<<<<<<<<<<<
 *         elif self._type == ZT_LONG:
 *             (<Matrix[Z_NR[long]]*>self._core.long).set_rows(rows)
*/
    ((fplll::Matrix<fplll::Z_NR<mpz_t> >  *)__pyx_v_self->_core.mpz)->set_rows(__pyx_v_rows);

    /* "fpylll/fplll/integer_matrix.pyx":1173
 * 
 *         """
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).set_rows(rows)
 *         elif self._type == ZT_LONG:
*/
    break;
    case fplll::ZT_LONG:

    /* "fpylll/fplll/integer_matrix.pyx":1176
 *             (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).set_rows(rows)
 *         elif self._type == ZT_LONG:
 *             (<Matrix[Z_NR[long]]*>self._core.long).set_rows(rows)             # <<<<<<<<<<<<<<
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
*/
    ((fplll::Matrix<fplll::Z_NR<long> >  *)__pyx_v_self->_core.__pyx_long)->set_rows(__pyx_v_rows);

    /* "fpylll/fplll/integer_matrix.pyx":1175
 *         if self._type == ZT_MPZ:
 *             (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).set_rows(rows)
 *         elif self._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *             (<Matrix[Z_NR[long]]*>self._core.long).set_rows(rows)
 *         else:
*/
    break;
    default:

    /* "fpylll/fplll/integer_matrix.pyx":1178
 *             (<Matrix[Z_NR[long]]*>self._core.long).set_rows(rows)
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)             # <<<<<<<<<<<<<<
 * 
 *     def set_cols(self, int cols):
*/
    __pyx_t_2 = NULL;
    __pyx_t_3 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1178, __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_RuntimeError)), __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(0, 1178, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1178, __pyx_L1_error)
    break;
  }

  /* "fpylll/fplll/integer_matrix.pyx":1167
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def set_rows(self, int rows):             # <<<<<<<<<<<<<<
 *         """
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.set_rows", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":1180
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def set_cols(self, int cols):             # <<<<<<<<<<<<<<
 *         """
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_43set_cols(PyObject *__pyx_v_self, 
#if 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_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_42set_cols, "IntegerMatrix.set_cols(self, int cols)\n\n:param int cols:");
static PyMethodDef __pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_43set_cols = {"set_cols", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_43set_cols, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_42set_cols};
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_43set_cols(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_cols;
  #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("set_cols (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_cols,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, 1180, __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, 1180, __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, "set_cols", 0) < (0)) __PYX_ERR(0, 1180, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_cols", 1, 1, 1, i); __PYX_ERR(0, 1180, __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, 1180, __pyx_L3_error)
    }
    __pyx_v_cols = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_cols == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1180, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_cols", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1180, __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("fpylll.fplll.integer_matrix.IntegerMatrix.set_cols", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_42set_cols(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self), __pyx_v_cols);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_42set_cols(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, int __pyx_v_cols) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_cols", 0);

  /* "fpylll/fplll/integer_matrix.pyx":1186
 * 
 *         """
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).set_cols(cols)
 *         elif self._type == ZT_LONG:
*/
  switch (__pyx_v_self->_type) {
    case fplll::ZT_MPZ:

    /* "fpylll/fplll/integer_matrix.pyx":1187
 *         """
 *         if self._type == ZT_MPZ:
 *             (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).set_cols(cols)             # <<<<<<<<<<<<<<
 *         elif self._type == ZT_LONG:
 *             (<Matrix[Z_NR[long]]*>self._core.long).set_cols(cols)
*/
    ((fplll::Matrix<fplll::Z_NR<mpz_t> >  *)__pyx_v_self->_core.mpz)->set_cols(__pyx_v_cols);

    /* "fpylll/fplll/integer_matrix.pyx":1186
 * 
 *         """
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).set_cols(cols)
 *         elif self._type == ZT_LONG:
*/
    break;
    case fplll::ZT_LONG:

    /* "fpylll/fplll/integer_matrix.pyx":1189
 *             (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).set_cols(cols)
 *         elif self._type == ZT_LONG:
 *             (<Matrix[Z_NR[long]]*>self._core.long).set_cols(cols)             # <<<<<<<<<<<<<<
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
*/
    ((fplll::Matrix<fplll::Z_NR<long> >  *)__pyx_v_self->_core.__pyx_long)->set_cols(__pyx_v_cols);

    /* "fpylll/fplll/integer_matrix.pyx":1188
 *         if self._type == ZT_MPZ:
 *             (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).set_cols(cols)
 *         elif self._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *             (<Matrix[Z_NR[long]]*>self._core.long).set_cols(cols)
 *         else:
*/
    break;
    default:

    /* "fpylll/fplll/integer_matrix.pyx":1191
 *             (<Matrix[Z_NR[long]]*>self._core.long).set_cols(cols)
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)             # <<<<<<<<<<<<<<
 * 
 *     def swap_rows(self, int r1, int r2):
*/
    __pyx_t_2 = NULL;
    __pyx_t_3 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1191, __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_RuntimeError)), __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(0, 1191, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1191, __pyx_L1_error)
    break;
  }

  /* "fpylll/fplll/integer_matrix.pyx":1180
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def set_cols(self, int cols):             # <<<<<<<<<<<<<<
 *         """
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.set_cols", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":1193
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def swap_rows(self, int r1, int r2):             # <<<<<<<<<<<<<<
 *         """
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_45swap_rows(PyObject *__pyx_v_self, 
#if 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_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_44swap_rows, "IntegerMatrix.swap_rows(self, int r1, int r2)\n\n:param int r1:\n:param int r2:\n\n>>> A = IntegerMatrix.from_matrix([[0,2],[3,4]])\n>>> A.swap_rows(0, 1)\n>>> print(A)\n[ 3 4 ]\n[ 0 2 ]");
static PyMethodDef __pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_45swap_rows = {"swap_rows", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_45swap_rows, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_44swap_rows};
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_45swap_rows(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_r1;
  int __pyx_v_r2;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("swap_rows (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_r1,&__pyx_mstate_global->__pyx_n_u_r2,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, 1193, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1193, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1193, __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, "swap_rows", 0) < (0)) __PYX_ERR(0, 1193, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("swap_rows", 1, 2, 2, i); __PYX_ERR(0, 1193, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1193, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1193, __pyx_L3_error)
    }
    __pyx_v_r1 = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_r1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1193, __pyx_L3_error)
    __pyx_v_r2 = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_r2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1193, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("swap_rows", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1193, __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("fpylll.fplll.integer_matrix.IntegerMatrix.swap_rows", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_44swap_rows(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self), __pyx_v_r1, __pyx_v_r2);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_44swap_rows(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, int __pyx_v_r1, int __pyx_v_r2) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("swap_rows", 0);

  /* "fpylll/fplll/integer_matrix.pyx":1207
 * 
 *         """
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).swap_rows(r1, r2)
 *         elif self._type == ZT_LONG:
*/
  switch (__pyx_v_self->_type) {
    case fplll::ZT_MPZ:

    /* "fpylll/fplll/integer_matrix.pyx":1208
 *         """
 *         if self._type == ZT_MPZ:
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).swap_rows(r1, r2)             # <<<<<<<<<<<<<<
 *         elif self._type == ZT_LONG:
 *             return (<Matrix[Z_NR[long]]*>self._core.long).swap_rows(r1, r2)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_void_to_None(((fplll::Matrix<fplll::Z_NR<mpz_t> >  *)__pyx_v_self->_core.mpz)->swap_rows(__pyx_v_r1, __pyx_v_r2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":1207
 * 
 *         """
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).swap_rows(r1, r2)
 *         elif self._type == ZT_LONG:
*/
    break;
    case fplll::ZT_LONG:

    /* "fpylll/fplll/integer_matrix.pyx":1210
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).swap_rows(r1, r2)
 *         elif self._type == ZT_LONG:
 *             return (<Matrix[Z_NR[long]]*>self._core.long).swap_rows(r1, r2)             # <<<<<<<<<<<<<<
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_void_to_None(((fplll::Matrix<fplll::Z_NR<long> >  *)__pyx_v_self->_core.__pyx_long)->swap_rows(__pyx_v_r1, __pyx_v_r2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":1209
 *         if self._type == ZT_MPZ:
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).swap_rows(r1, r2)
 *         elif self._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *             return (<Matrix[Z_NR[long]]*>self._core.long).swap_rows(r1, r2)
 *         else:
*/
    break;
    default:

    /* "fpylll/fplll/integer_matrix.pyx":1212
 *             return (<Matrix[Z_NR[long]]*>self._core.long).swap_rows(r1, r2)
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)             # <<<<<<<<<<<<<<
 * 
 *     def rotate_left(self, int first, int last):
*/
    __pyx_t_2 = NULL;
    __pyx_t_3 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __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(0, 1212, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1212, __pyx_L1_error)
    break;
  }

  /* "fpylll/fplll/integer_matrix.pyx":1193
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def swap_rows(self, int r1, int r2):             # <<<<<<<<<<<<<<
 *         """
 * 
*/

  /* function exit code */
  __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("fpylll.fplll.integer_matrix.IntegerMatrix.swap_rows", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":1214
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def rotate_left(self, int first, int last):             # <<<<<<<<<<<<<<
 *         """Row permutation.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_47rotate_left(PyObject *__pyx_v_self, 
#if 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_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_46rotate_left, "IntegerMatrix.rotate_left(self, int first, int last)\n\nRow permutation.\n\n``(M[first],\342\200\246,M[last])`` becomes ``(M[first+1],\342\200\246,M[last],M[first])``\n\n:param int first:\n:param int last:\n\n>>> A = IntegerMatrix.from_matrix([[0,2],[3,4]])");
static PyMethodDef __pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_47rotate_left = {"rotate_left", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_47rotate_left, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_46rotate_left};
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_47rotate_left(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_first;
  int __pyx_v_last;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rotate_left (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_first,&__pyx_mstate_global->__pyx_n_u_last,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, 1214, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1214, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1214, __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, "rotate_left", 0) < (0)) __PYX_ERR(0, 1214, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("rotate_left", 1, 2, 2, i); __PYX_ERR(0, 1214, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1214, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1214, __pyx_L3_error)
    }
    __pyx_v_first = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_first == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1214, __pyx_L3_error)
    __pyx_v_last = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_last == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1214, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("rotate_left", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1214, __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("fpylll.fplll.integer_matrix.IntegerMatrix.rotate_left", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_46rotate_left(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self), __pyx_v_first, __pyx_v_last);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_46rotate_left(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, int __pyx_v_first, int __pyx_v_last) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rotate_left", 0);

  /* "fpylll/fplll/integer_matrix.pyx":1225
 * 
 *         """
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).rotate_left(first, last)
 *         elif self._type == ZT_LONG:
*/
  switch (__pyx_v_self->_type) {
    case fplll::ZT_MPZ:

    /* "fpylll/fplll/integer_matrix.pyx":1226
 *         """
 *         if self._type == ZT_MPZ:
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).rotate_left(first, last)             # <<<<<<<<<<<<<<
 *         elif self._type == ZT_LONG:
 *             return (<Matrix[Z_NR[long]]*>self._core.long).rotate_left(first, last)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_void_to_None(((fplll::Matrix<fplll::Z_NR<mpz_t> >  *)__pyx_v_self->_core.mpz)->rotate_left(__pyx_v_first, __pyx_v_last)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1226, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":1225
 * 
 *         """
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).rotate_left(first, last)
 *         elif self._type == ZT_LONG:
*/
    break;
    case fplll::ZT_LONG:

    /* "fpylll/fplll/integer_matrix.pyx":1228
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).rotate_left(first, last)
 *         elif self._type == ZT_LONG:
 *             return (<Matrix[Z_NR[long]]*>self._core.long).rotate_left(first, last)             # <<<<<<<<<<<<<<
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_void_to_None(((fplll::Matrix<fplll::Z_NR<long> >  *)__pyx_v_self->_core.__pyx_long)->rotate_left(__pyx_v_first, __pyx_v_last)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1228, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":1227
 *         if self._type == ZT_MPZ:
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).rotate_left(first, last)
 *         elif self._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *             return (<Matrix[Z_NR[long]]*>self._core.long).rotate_left(first, last)
 *         else:
*/
    break;
    default:

    /* "fpylll/fplll/integer_matrix.pyx":1230
 *             return (<Matrix[Z_NR[long]]*>self._core.long).rotate_left(first, last)
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)             # <<<<<<<<<<<<<<
 * 
 *     def rotate_right(self, int first, int last):
*/
    __pyx_t_2 = NULL;
    __pyx_t_3 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __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(0, 1230, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1230, __pyx_L1_error)
    break;
  }

  /* "fpylll/fplll/integer_matrix.pyx":1214
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def rotate_left(self, int first, int last):             # <<<<<<<<<<<<<<
 *         """Row permutation.
 * 
*/

  /* function exit code */
  __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("fpylll.fplll.integer_matrix.IntegerMatrix.rotate_left", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":1232
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def rotate_right(self, int first, int last):             # <<<<<<<<<<<<<<
 *         """Row permutation.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_49rotate_right(PyObject *__pyx_v_self, 
#if 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_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_48rotate_right, "IntegerMatrix.rotate_right(self, int first, int last)\n\nRow permutation.\n\n``(M[first],\342\200\246,M[last])`` becomes ``(M[last],M[first],\342\200\246,M[last-1])``\n\n:param int first:\n:param int last:\n\n>>> A = IntegerMatrix.from_matrix([[0,2],[3,4]])");
static PyMethodDef __pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_49rotate_right = {"rotate_right", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_49rotate_right, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_48rotate_right};
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_49rotate_right(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_first;
  int __pyx_v_last;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rotate_right (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_first,&__pyx_mstate_global->__pyx_n_u_last,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, 1232, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1232, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1232, __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, "rotate_right", 0) < (0)) __PYX_ERR(0, 1232, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("rotate_right", 1, 2, 2, i); __PYX_ERR(0, 1232, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1232, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1232, __pyx_L3_error)
    }
    __pyx_v_first = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_first == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1232, __pyx_L3_error)
    __pyx_v_last = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_last == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1232, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("rotate_right", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1232, __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("fpylll.fplll.integer_matrix.IntegerMatrix.rotate_right", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_48rotate_right(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self), __pyx_v_first, __pyx_v_last);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_48rotate_right(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, int __pyx_v_first, int __pyx_v_last) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rotate_right", 0);

  /* "fpylll/fplll/integer_matrix.pyx":1243
 * 
 *         """
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).rotate_right(first, last)
 *         elif self._type == ZT_LONG:
*/
  switch (__pyx_v_self->_type) {
    case fplll::ZT_MPZ:

    /* "fpylll/fplll/integer_matrix.pyx":1244
 *         """
 *         if self._type == ZT_MPZ:
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).rotate_right(first, last)             # <<<<<<<<<<<<<<
 *         elif self._type == ZT_LONG:
 *             return (<Matrix[Z_NR[long]]*>self._core.long).rotate_right(first, last)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_void_to_None(((fplll::Matrix<fplll::Z_NR<mpz_t> >  *)__pyx_v_self->_core.mpz)->rotate_right(__pyx_v_first, __pyx_v_last)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1244, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":1243
 * 
 *         """
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).rotate_right(first, last)
 *         elif self._type == ZT_LONG:
*/
    break;
    case fplll::ZT_LONG:

    /* "fpylll/fplll/integer_matrix.pyx":1246
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).rotate_right(first, last)
 *         elif self._type == ZT_LONG:
 *             return (<Matrix[Z_NR[long]]*>self._core.long).rotate_right(first, last)             # <<<<<<<<<<<<<<
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_void_to_None(((fplll::Matrix<fplll::Z_NR<long> >  *)__pyx_v_self->_core.__pyx_long)->rotate_right(__pyx_v_first, __pyx_v_last)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1246, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":1245
 *         if self._type == ZT_MPZ:
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).rotate_right(first, last)
 *         elif self._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *             return (<Matrix[Z_NR[long]]*>self._core.long).rotate_right(first, last)
 *         else:
*/
    break;
    default:

    /* "fpylll/fplll/integer_matrix.pyx":1248
 *             return (<Matrix[Z_NR[long]]*>self._core.long).rotate_right(first, last)
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)             # <<<<<<<<<<<<<<
 * 
 *     def rotate(self, int first, int middle, int last):
*/
    __pyx_t_2 = NULL;
    __pyx_t_3 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1248, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1248, __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_RuntimeError)), __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(0, 1248, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1248, __pyx_L1_error)
    break;
  }

  /* "fpylll/fplll/integer_matrix.pyx":1232
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def rotate_right(self, int first, int last):             # <<<<<<<<<<<<<<
 *         """Row permutation.
 * 
*/

  /* function exit code */
  __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("fpylll.fplll.integer_matrix.IntegerMatrix.rotate_right", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":1250
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def rotate(self, int first, int middle, int last):             # <<<<<<<<<<<<<<
 *         """
 *         Rotates the order of the elements in the range [first,last), in such a way that the element
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_51rotate(PyObject *__pyx_v_self, 
#if 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_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_50rotate, "IntegerMatrix.rotate(self, int first, int middle, int last)\n\nRotates the order of the elements in the range [first,last), in such a way that the element\npointed by middle becomes the new first element.\n\n``(M[first],\342\200\246,M[middle-1],M[middle],M[last])`` becomes\n``(M[middle],\342\200\246,M[last],M[first],\342\200\246,M[middle-1])``\n\n:param int first: first index\n:param int middle: new first index\n:param int last: last index (inclusive)\n\n>>> A = IntegerMatrix.from_matrix([[0,1,2],[3,4,5],[6,7,8]])\n>>> A.rotate(0,0,2)\n>>> print(A)\n[ 0 1 2 ]\n[ 3 4 5 ]\n[ 6 7 8 ]\n\n>>> A = IntegerMatrix.from_matrix([[0,1,2],[3,4,5],[6,7,8]])\n>>> A.rotate(0,2,2)\n>>> print(A)\n[ 6 7 8 ]\n[ 0 1 2 ]\n[ 3 4 5 ]");
static PyMethodDef __pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_51rotate = {"rotate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_51rotate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_50rotate};
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_51rotate(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_first;
  int __pyx_v_middle;
  int __pyx_v_last;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rotate (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_first,&__pyx_mstate_global->__pyx_n_u_middle,&__pyx_mstate_global->__pyx_n_u_last,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, 1250, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1250, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1250, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1250, __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, "rotate", 0) < (0)) __PYX_ERR(0, 1250, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("rotate", 1, 3, 3, i); __PYX_ERR(0, 1250, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1250, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1250, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1250, __pyx_L3_error)
    }
    __pyx_v_first = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_first == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1250, __pyx_L3_error)
    __pyx_v_middle = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_middle == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1250, __pyx_L3_error)
    __pyx_v_last = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_last == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1250, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("rotate", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1250, __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("fpylll.fplll.integer_matrix.IntegerMatrix.rotate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_50rotate(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self), __pyx_v_first, __pyx_v_middle, __pyx_v_last);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_50rotate(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, int __pyx_v_first, int __pyx_v_middle, int __pyx_v_last) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rotate", 0);

  /* "fpylll/fplll/integer_matrix.pyx":1277
 * 
 *         """
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).rotate(first, middle, last)
 *         elif self._type == ZT_LONG:
*/
  switch (__pyx_v_self->_type) {
    case fplll::ZT_MPZ:

    /* "fpylll/fplll/integer_matrix.pyx":1278
 *         """
 *         if self._type == ZT_MPZ:
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).rotate(first, middle, last)             # <<<<<<<<<<<<<<
 *         elif self._type == ZT_LONG:
 *             return (<Matrix[Z_NR[long]]*>self._core.long).rotate(first, middle, last)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_void_to_None(((fplll::Matrix<fplll::Z_NR<mpz_t> >  *)__pyx_v_self->_core.mpz)->rotate(__pyx_v_first, __pyx_v_middle, __pyx_v_last)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":1277
 * 
 *         """
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).rotate(first, middle, last)
 *         elif self._type == ZT_LONG:
*/
    break;
    case fplll::ZT_LONG:

    /* "fpylll/fplll/integer_matrix.pyx":1280
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).rotate(first, middle, last)
 *         elif self._type == ZT_LONG:
 *             return (<Matrix[Z_NR[long]]*>self._core.long).rotate(first, middle, last)             # <<<<<<<<<<<<<<
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_void_to_None(((fplll::Matrix<fplll::Z_NR<long> >  *)__pyx_v_self->_core.__pyx_long)->rotate(__pyx_v_first, __pyx_v_middle, __pyx_v_last)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":1279
 *         if self._type == ZT_MPZ:
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).rotate(first, middle, last)
 *         elif self._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *             return (<Matrix[Z_NR[long]]*>self._core.long).rotate(first, middle, last)
 *         else:
*/
    break;
    default:

    /* "fpylll/fplll/integer_matrix.pyx":1282
 *             return (<Matrix[Z_NR[long]]*>self._core.long).rotate(first, middle, last)
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)             # <<<<<<<<<<<<<<
 * 
 *     def rotate_gram_left(self, int first, int last, int n_valid_rows):
*/
    __pyx_t_2 = NULL;
    __pyx_t_3 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1282, __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_RuntimeError)), __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(0, 1282, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1282, __pyx_L1_error)
    break;
  }

  /* "fpylll/fplll/integer_matrix.pyx":1250
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def rotate(self, int first, int middle, int last):             # <<<<<<<<<<<<<<
 *         """
 *         Rotates the order of the elements in the range [first,last), in such a way that the element
*/

  /* function exit code */
  __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("fpylll.fplll.integer_matrix.IntegerMatrix.rotate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":1284
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def rotate_gram_left(self, int first, int last, int n_valid_rows):             # <<<<<<<<<<<<<<
 *         """
 *         Transformation needed to update the lower triangular Gram matrix when
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_53rotate_gram_left(PyObject *__pyx_v_self, 
#if 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_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_52rotate_gram_left, "IntegerMatrix.rotate_gram_left(self, int first, int last, int n_valid_rows)\n\nTransformation needed to update the lower triangular Gram matrix when\n``rotateLeft(first, last)`` is done on the basis of the lattice.\n\n:param int first:\n:param int last:\n:param int n_valid_rows:\n\n>>> A = IntegerMatrix.from_matrix([[0,2],[3,4]])");
static PyMethodDef __pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_53rotate_gram_left = {"rotate_gram_left", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_53rotate_gram_left, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_52rotate_gram_left};
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_53rotate_gram_left(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_first;
  int __pyx_v_last;
  int __pyx_v_n_valid_rows;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rotate_gram_left (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_first,&__pyx_mstate_global->__pyx_n_u_last,&__pyx_mstate_global->__pyx_n_u_n_valid_rows,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, 1284, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1284, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1284, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1284, __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, "rotate_gram_left", 0) < (0)) __PYX_ERR(0, 1284, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("rotate_gram_left", 1, 3, 3, i); __PYX_ERR(0, 1284, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1284, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1284, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1284, __pyx_L3_error)
    }
    __pyx_v_first = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_first == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1284, __pyx_L3_error)
    __pyx_v_last = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_last == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1284, __pyx_L3_error)
    __pyx_v_n_valid_rows = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_n_valid_rows == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1284, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("rotate_gram_left", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1284, __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("fpylll.fplll.integer_matrix.IntegerMatrix.rotate_gram_left", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_52rotate_gram_left(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self), __pyx_v_first, __pyx_v_last, __pyx_v_n_valid_rows);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_52rotate_gram_left(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, int __pyx_v_first, int __pyx_v_last, int __pyx_v_n_valid_rows) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rotate_gram_left", 0);

  /* "fpylll/fplll/integer_matrix.pyx":1296
 * 
 *         """
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).rotate_gram_left(first, last, n_valid_rows)
 *         elif self._type == ZT_LONG:
*/
  switch (__pyx_v_self->_type) {
    case fplll::ZT_MPZ:

    /* "fpylll/fplll/integer_matrix.pyx":1297
 *         """
 *         if self._type == ZT_MPZ:
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).rotate_gram_left(first, last, n_valid_rows)             # <<<<<<<<<<<<<<
 *         elif self._type == ZT_LONG:
 *             return (<Matrix[Z_NR[long]]*>self._core.long).rotate_gram_left(first, last, n_valid_rows)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_void_to_None(((fplll::Matrix<fplll::Z_NR<mpz_t> >  *)__pyx_v_self->_core.mpz)->rotate_gram_left(__pyx_v_first, __pyx_v_last, __pyx_v_n_valid_rows)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":1296
 * 
 *         """
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).rotate_gram_left(first, last, n_valid_rows)
 *         elif self._type == ZT_LONG:
*/
    break;
    case fplll::ZT_LONG:

    /* "fpylll/fplll/integer_matrix.pyx":1299
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).rotate_gram_left(first, last, n_valid_rows)
 *         elif self._type == ZT_LONG:
 *             return (<Matrix[Z_NR[long]]*>self._core.long).rotate_gram_left(first, last, n_valid_rows)             # <<<<<<<<<<<<<<
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_void_to_None(((fplll::Matrix<fplll::Z_NR<long> >  *)__pyx_v_self->_core.__pyx_long)->rotate_gram_left(__pyx_v_first, __pyx_v_last, __pyx_v_n_valid_rows)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1299, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":1298
 *         if self._type == ZT_MPZ:
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).rotate_gram_left(first, last, n_valid_rows)
 *         elif self._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *             return (<Matrix[Z_NR[long]]*>self._core.long).rotate_gram_left(first, last, n_valid_rows)
 *         else:
*/
    break;
    default:

    /* "fpylll/fplll/integer_matrix.pyx":1301
 *             return (<Matrix[Z_NR[long]]*>self._core.long).rotate_gram_left(first, last, n_valid_rows)
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)             # <<<<<<<<<<<<<<
 * 
 *     def rotate_gram_right(self, int first, int last, int n_valid_rows):
*/
    __pyx_t_2 = NULL;
    __pyx_t_3 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1301, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1301, __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_RuntimeError)), __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(0, 1301, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1301, __pyx_L1_error)
    break;
  }

  /* "fpylll/fplll/integer_matrix.pyx":1284
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def rotate_gram_left(self, int first, int last, int n_valid_rows):             # <<<<<<<<<<<<<<
 *         """
 *         Transformation needed to update the lower triangular Gram matrix when
*/

  /* function exit code */
  __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("fpylll.fplll.integer_matrix.IntegerMatrix.rotate_gram_left", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":1303
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def rotate_gram_right(self, int first, int last, int n_valid_rows):             # <<<<<<<<<<<<<<
 *         """
 *         Transformation needed to update the lower triangular Gram matrix when
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_55rotate_gram_right(PyObject *__pyx_v_self, 
#if 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_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_54rotate_gram_right, "IntegerMatrix.rotate_gram_right(self, int first, int last, int n_valid_rows)\n\nTransformation needed to update the lower triangular Gram matrix when\n``rotateRight(first, last)`` is done on the basis of the lattice.\n\n:param int first:\n:param int last:\n:param int n_valid_rows:\n\n>>> A = IntegerMatrix.from_matrix([[0,2],[3,4]])");
static PyMethodDef __pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_55rotate_gram_right = {"rotate_gram_right", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_55rotate_gram_right, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_54rotate_gram_right};
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_55rotate_gram_right(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_first;
  int __pyx_v_last;
  int __pyx_v_n_valid_rows;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rotate_gram_right (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_first,&__pyx_mstate_global->__pyx_n_u_last,&__pyx_mstate_global->__pyx_n_u_n_valid_rows,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, 1303, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1303, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1303, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1303, __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, "rotate_gram_right", 0) < (0)) __PYX_ERR(0, 1303, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("rotate_gram_right", 1, 3, 3, i); __PYX_ERR(0, 1303, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1303, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1303, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1303, __pyx_L3_error)
    }
    __pyx_v_first = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_first == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1303, __pyx_L3_error)
    __pyx_v_last = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_last == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1303, __pyx_L3_error)
    __pyx_v_n_valid_rows = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_n_valid_rows == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1303, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("rotate_gram_right", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1303, __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("fpylll.fplll.integer_matrix.IntegerMatrix.rotate_gram_right", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_54rotate_gram_right(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self), __pyx_v_first, __pyx_v_last, __pyx_v_n_valid_rows);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_54rotate_gram_right(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, int __pyx_v_first, int __pyx_v_last, int __pyx_v_n_valid_rows) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rotate_gram_right", 0);

  /* "fpylll/fplll/integer_matrix.pyx":1315
 * 
 *         """
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).rotate_gram_right(first, last, n_valid_rows)
 *         elif self._type == ZT_LONG:
*/
  switch (__pyx_v_self->_type) {
    case fplll::ZT_MPZ:

    /* "fpylll/fplll/integer_matrix.pyx":1316
 *         """
 *         if self._type == ZT_MPZ:
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).rotate_gram_right(first, last, n_valid_rows)             # <<<<<<<<<<<<<<
 *         elif self._type == ZT_LONG:
 *             return (<Matrix[Z_NR[long]]*>self._core.long).rotate_gram_right(first, last, n_valid_rows)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_void_to_None(((fplll::Matrix<fplll::Z_NR<mpz_t> >  *)__pyx_v_self->_core.mpz)->rotate_gram_right(__pyx_v_first, __pyx_v_last, __pyx_v_n_valid_rows)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1316, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":1315
 * 
 *         """
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).rotate_gram_right(first, last, n_valid_rows)
 *         elif self._type == ZT_LONG:
*/
    break;
    case fplll::ZT_LONG:

    /* "fpylll/fplll/integer_matrix.pyx":1318
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).rotate_gram_right(first, last, n_valid_rows)
 *         elif self._type == ZT_LONG:
 *             return (<Matrix[Z_NR[long]]*>self._core.long).rotate_gram_right(first, last, n_valid_rows)             # <<<<<<<<<<<<<<
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_void_to_None(((fplll::Matrix<fplll::Z_NR<long> >  *)__pyx_v_self->_core.__pyx_long)->rotate_gram_right(__pyx_v_first, __pyx_v_last, __pyx_v_n_valid_rows)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1318, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":1317
 *         if self._type == ZT_MPZ:
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).rotate_gram_right(first, last, n_valid_rows)
 *         elif self._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *             return (<Matrix[Z_NR[long]]*>self._core.long).rotate_gram_right(first, last, n_valid_rows)
 *         else:
*/
    break;
    default:

    /* "fpylll/fplll/integer_matrix.pyx":1320
 *             return (<Matrix[Z_NR[long]]*>self._core.long).rotate_gram_right(first, last, n_valid_rows)
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)             # <<<<<<<<<<<<<<
 * 
 *     def transpose(self):
*/
    __pyx_t_2 = NULL;
    __pyx_t_3 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1320, __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_RuntimeError)), __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(0, 1320, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1320, __pyx_L1_error)
    break;
  }

  /* "fpylll/fplll/integer_matrix.pyx":1303
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def rotate_gram_right(self, int first, int last, int n_valid_rows):             # <<<<<<<<<<<<<<
 *         """
 *         Transformation needed to update the lower triangular Gram matrix when
*/

  /* function exit code */
  __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("fpylll.fplll.integer_matrix.IntegerMatrix.rotate_gram_right", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":1322
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def transpose(self):             # <<<<<<<<<<<<<<
 *         """
 *         Inline transpose.
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_57transpose(PyObject *__pyx_v_self, 
#if 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_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_56transpose, "IntegerMatrix.transpose(self)\n\nInline transpose.\n\n>>> A = IntegerMatrix.from_matrix([[0,2],[3,4]])\n>>> _ = A.transpose()\n>>> print(A)\n[ 0 3 ]\n[ 2 4 ]");
static PyMethodDef __pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_57transpose = {"transpose", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_57transpose, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_56transpose};
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_57transpose(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("transpose (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("transpose", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("transpose", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_56transpose(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self));

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

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_56transpose(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("transpose", 0);

  /* "fpylll/fplll/integer_matrix.pyx":1333
 * 
 *         """
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).transpose()
 *         elif self._type == ZT_LONG:
*/
  switch (__pyx_v_self->_type) {
    case fplll::ZT_MPZ:

    /* "fpylll/fplll/integer_matrix.pyx":1334
 *         """
 *         if self._type == ZT_MPZ:
 *             (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).transpose()             # <<<<<<<<<<<<<<
 *         elif self._type == ZT_LONG:
 *             (<Matrix[Z_NR[long]]*>self._core.long).transpose()
*/
    ((fplll::Matrix<fplll::Z_NR<mpz_t> >  *)__pyx_v_self->_core.mpz)->transpose();

    /* "fpylll/fplll/integer_matrix.pyx":1333
 * 
 *         """
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).transpose()
 *         elif self._type == ZT_LONG:
*/
    break;
    case fplll::ZT_LONG:

    /* "fpylll/fplll/integer_matrix.pyx":1336
 *             (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).transpose()
 *         elif self._type == ZT_LONG:
 *             (<Matrix[Z_NR[long]]*>self._core.long).transpose()             # <<<<<<<<<<<<<<
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
*/
    ((fplll::Matrix<fplll::Z_NR<long> >  *)__pyx_v_self->_core.__pyx_long)->transpose();

    /* "fpylll/fplll/integer_matrix.pyx":1335
 *         if self._type == ZT_MPZ:
 *             (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).transpose()
 *         elif self._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *             (<Matrix[Z_NR[long]]*>self._core.long).transpose()
 *         else:
*/
    break;
    default:

    /* "fpylll/fplll/integer_matrix.pyx":1338
 *             (<Matrix[Z_NR[long]]*>self._core.long).transpose()
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)             # <<<<<<<<<<<<<<
 *         return self
 * 
*/
    __pyx_t_2 = NULL;
    __pyx_t_3 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1338, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1338, __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_RuntimeError)), __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(0, 1338, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1338, __pyx_L1_error)
    break;
  }

  /* "fpylll/fplll/integer_matrix.pyx":1339
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def get_max_exp(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "fpylll/fplll/integer_matrix.pyx":1322
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def transpose(self):             # <<<<<<<<<<<<<<
 *         """
 *         Inline transpose.
*/

  /* function exit code */
  __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("fpylll.fplll.integer_matrix.IntegerMatrix.transpose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":1341
 *         return self
 * 
 *     def get_max_exp(self):             # <<<<<<<<<<<<<<
 *         """
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_59get_max_exp(PyObject *__pyx_v_self, 
#if 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_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_58get_max_exp, "IntegerMatrix.get_max_exp(self)\n\n>>> A = IntegerMatrix.from_matrix([[0,2],[3,4]])\n>>> A.get_max_exp()\n3\n\n>>> A = IntegerMatrix.from_matrix([[0,2],[3,9]])\n>>> A.get_max_exp()\n4");
static PyMethodDef __pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_59get_max_exp = {"get_max_exp", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_59get_max_exp, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_58get_max_exp};
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_59get_max_exp(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_max_exp (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_max_exp", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_max_exp", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_58get_max_exp(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self));

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

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_58get_max_exp(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_max_exp", 0);

  /* "fpylll/fplll/integer_matrix.pyx":1353
 * 
 *         """
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).get_max_exp()
 *         elif self._type == ZT_LONG:
*/
  switch (__pyx_v_self->_type) {
    case fplll::ZT_MPZ:

    /* "fpylll/fplll/integer_matrix.pyx":1354
 *         """
 *         if self._type == ZT_MPZ:
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).get_max_exp()             # <<<<<<<<<<<<<<
 *         elif self._type == ZT_LONG:
 *             return (<Matrix[Z_NR[long]]*>self._core.long).get_max_exp()
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyLong_From_long(((fplll::Matrix<fplll::Z_NR<mpz_t> >  *)__pyx_v_self->_core.mpz)->get_max_exp()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1354, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":1353
 * 
 *         """
 *         if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).get_max_exp()
 *         elif self._type == ZT_LONG:
*/
    break;
    case fplll::ZT_LONG:

    /* "fpylll/fplll/integer_matrix.pyx":1356
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).get_max_exp()
 *         elif self._type == ZT_LONG:
 *             return (<Matrix[Z_NR[long]]*>self._core.long).get_max_exp()             # <<<<<<<<<<<<<<
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyLong_From_long(((fplll::Matrix<fplll::Z_NR<long> >  *)__pyx_v_self->_core.__pyx_long)->get_max_exp()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":1355
 *         if self._type == ZT_MPZ:
 *             return (<Matrix[Z_NR[mpz_t]]*>self._core.mpz).get_max_exp()
 *         elif self._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *             return (<Matrix[Z_NR[long]]*>self._core.long).get_max_exp()
 *         else:
*/
    break;
    default:

    /* "fpylll/fplll/integer_matrix.pyx":1358
 *             return (<Matrix[Z_NR[long]]*>self._core.long).get_max_exp()
 *         else:
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_2 = NULL;
    __pyx_t_3 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1358, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1358, __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_RuntimeError)), __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(0, 1358, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1358, __pyx_L1_error)
    break;
  }

  /* "fpylll/fplll/integer_matrix.pyx":1341
 *         return self
 * 
 *     def get_max_exp(self):             # <<<<<<<<<<<<<<
 *         """
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.get_max_exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":1364
 * # Extensions
 * 
 *     def __mul__(IntegerMatrix A, IntegerMatrix B):             # <<<<<<<<<<<<<<
 *         """Naive matrix  matrix products.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_61__mul__(PyObject *__pyx_v_A, PyObject *__pyx_v_B); /*proto*/
PyDoc_STRVAR(__pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_60__mul__, "IntegerMatrix.__mul__(A, IntegerMatrix B)\n\nNaive matrix \303\227 matrix products.\n\n:param IntegerMatrix A: m \303\227 n integer matrix A\n:param IntegerMatrix B: n \303\227 k integer matrix B\n:returns: m \303\227 k integer matrix C = A \303\227 B\n\n>>> from fpylll import FPLLL\n>>> FPLLL.set_random_seed(1337)\n>>> A = IntegerMatrix(2, 2)\n>>> A.randomize(\"uniform\", bits=2)\n>>> print(A)\n[ 2 0 ]\n[ 1 3 ]\n\n>>> B = IntegerMatrix(2, 2)\n>>> B.randomize(\"uniform\", bits=2)\n>>> print(B)\n[ 3 2 ]\n[ 3 3 ]\n\n>>> print(A*B)\n[  6  4 ]\n[ 12 11 ]\n\n>>> print(B*A)\n[ 8 6 ]\n[ 9 9 ]");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_60__mul__;
#endif
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_61__mul__(PyObject *__pyx_v_A, PyObject *__pyx_v_B) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_B), __pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, 1, "B", 0))) __PYX_ERR(0, 1364, __pyx_L1_error)
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_60__mul__(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_A), ((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_B));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  goto __pyx_L5_cleaned_up;
  __pyx_L0:;
  __pyx_L5_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_60__mul__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_A, struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_B) {
  struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_res = 0;
  int __pyx_v_i;
  int __pyx_v_j;
  PyObject *__pyx_v_tmp = NULL;
  PyObject *__pyx_v_k = 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;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7[5];
  size_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  int __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  PyObject *(*__pyx_t_15)(PyObject *);
  int __pyx_t_16;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__mul__", 0);

  /* "fpylll/fplll/integer_matrix.pyx":1394
 * 
 *         """
 *         if A.ncols != B.nrows:             # <<<<<<<<<<<<<<
 *             raise ValueError("Number of columns of A (%d) does not match number of rows of B (%d)"%(A.ncols, B.nrows))
 * 
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_A), __pyx_mstate_global->__pyx_n_u_ncols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_B), __pyx_mstate_global->__pyx_n_u_nrows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1394, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1394, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(__pyx_t_4)) {

    /* "fpylll/fplll/integer_matrix.pyx":1395
 *         """
 *         if A.ncols != B.nrows:
 *             raise ValueError("Number of columns of A (%d) does not match number of rows of B (%d)"%(A.ncols, B.nrows))             # <<<<<<<<<<<<<<
 * 
 *         cdef IntegerMatrix res = IntegerMatrix(A.nrows, B.ncols)
*/
    __pyx_t_2 = NULL;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_A), __pyx_mstate_global->__pyx_n_u_ncols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1395, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_Long(__pyx_t_1), __pyx_mstate_global->__pyx_n_u_d); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1395, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_B), __pyx_mstate_global->__pyx_n_u_nrows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1395, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_Long(__pyx_t_1), __pyx_mstate_global->__pyx_n_u_d); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1395, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_Number_of_columns_of_A;
    __pyx_t_7[1] = __pyx_t_5;
    __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_does_not_match_number_of_rows_o;
    __pyx_t_7[3] = __pyx_t_6;
    __pyx_t_7[4] = __pyx_mstate_global->__pyx_kp_u__3;
    __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_7, 5, 24 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 38 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6));
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1395, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_1};
      __pyx_t_3 = __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_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1395, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 1395, __pyx_L1_error)

    /* "fpylll/fplll/integer_matrix.pyx":1394
 * 
 *         """
 *         if A.ncols != B.nrows:             # <<<<<<<<<<<<<<
 *             raise ValueError("Number of columns of A (%d) does not match number of rows of B (%d)"%(A.ncols, B.nrows))
 * 
*/
  }

  /* "fpylll/fplll/integer_matrix.pyx":1397
 *             raise ValueError("Number of columns of A (%d) does not match number of rows of B (%d)"%(A.ncols, B.nrows))
 * 
 *         cdef IntegerMatrix res = IntegerMatrix(A.nrows, B.ncols)             # <<<<<<<<<<<<<<
 *         cdef int i, j
 *         for i in range(A.nrows):
*/
  __pyx_t_1 = NULL;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_A), __pyx_mstate_global->__pyx_n_u_nrows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_B), __pyx_mstate_global->__pyx_n_u_ncols); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = 1;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_t_2, __pyx_t_6};
    __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1397, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_3);
  }
  __pyx_v_res = ((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":1399
 *         cdef IntegerMatrix res = IntegerMatrix(A.nrows, B.ncols)
 *         cdef int i, j
 *         for i in range(A.nrows):             # <<<<<<<<<<<<<<
 *             for j in range(B.ncols):
 *                 tmp = res._get(i, j)
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_A), __pyx_mstate_global->__pyx_n_u_nrows); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1399, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __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;

    /* "fpylll/fplll/integer_matrix.pyx":1400
 *         cdef int i, j
 *         for i in range(A.nrows):
 *             for j in range(B.ncols):             # <<<<<<<<<<<<<<
 *                 tmp = res._get(i, j)
 *                 for k in range(A.ncols):
*/
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_B), __pyx_mstate_global->__pyx_n_u_ncols); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1400, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1400, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_13 = __pyx_t_12;
    for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) {
      __pyx_v_j = __pyx_t_14;

      /* "fpylll/fplll/integer_matrix.pyx":1401
 *         for i in range(A.nrows):
 *             for j in range(B.ncols):
 *                 tmp = res._get(i, j)             # <<<<<<<<<<<<<<
 *                 for k in range(A.ncols):
 *                     tmp += A._get(i,k) * B._get(k, j)
*/
      __pyx_t_3 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_res->__pyx_vtab)->_get(__pyx_v_res, __pyx_v_i, __pyx_v_j); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1401, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_v_tmp, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "fpylll/fplll/integer_matrix.pyx":1402
 *             for j in range(B.ncols):
 *                 tmp = res._get(i, j)
 *                 for k in range(A.ncols):             # <<<<<<<<<<<<<<
 *                     tmp += A._get(i,k) * B._get(k, j)
 *                 res._set(i, j, tmp)
*/
      __pyx_t_6 = NULL;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_A), __pyx_mstate_global->__pyx_n_u_ncols); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1402, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_8 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_2};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __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_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1402, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1402, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_15 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1402, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        {
          __pyx_t_3 = __pyx_t_15(__pyx_t_2);
          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, 1402, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "fpylll/fplll/integer_matrix.pyx":1403
 *                 tmp = res._get(i, j)
 *                 for k in range(A.ncols):
 *                     tmp += A._get(i,k) * B._get(k, j)             # <<<<<<<<<<<<<<
 *                 res._set(i, j, tmp)
 *         return res
*/
        __pyx_t_16 = __Pyx_PyLong_As_int(__pyx_v_k); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1403, __pyx_L1_error)
        __pyx_t_3 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_A->__pyx_vtab)->_get(__pyx_v_A, __pyx_v_i, __pyx_t_16); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1403, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_16 = __Pyx_PyLong_As_int(__pyx_v_k); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1403, __pyx_L1_error)
        __pyx_t_6 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_B->__pyx_vtab)->_get(__pyx_v_B, __pyx_t_16, __pyx_v_j); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1403, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_1 = PyNumber_Multiply(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1403, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_tmp, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1403, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "fpylll/fplll/integer_matrix.pyx":1402
 *             for j in range(B.ncols):
 *                 tmp = res._get(i, j)
 *                 for k in range(A.ncols):             # <<<<<<<<<<<<<<
 *                     tmp += A._get(i,k) * B._get(k, j)
 *                 res._set(i, j, tmp)
*/
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "fpylll/fplll/integer_matrix.pyx":1404
 *                 for k in range(A.ncols):
 *                     tmp += A._get(i,k) * B._get(k, j)
 *                 res._set(i, j, tmp)             # <<<<<<<<<<<<<<
 *         return res
 * 
*/
      __pyx_t_16 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_res->__pyx_vtab)->_set(__pyx_v_res, __pyx_v_i, __pyx_v_j, __pyx_v_tmp); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 1404, __pyx_L1_error)
    }
  }

  /* "fpylll/fplll/integer_matrix.pyx":1405
 *                     tmp += A._get(i,k) * B._get(k, j)
 *                 res._set(i, j, tmp)
 *         return res             # <<<<<<<<<<<<<<
 * 
 *     def __mod__(IntegerMatrix self, q):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_res);
  __pyx_r = ((PyObject *)__pyx_v_res);
  goto __pyx_L0;

  /* "fpylll/fplll/integer_matrix.pyx":1364
 * # Extensions
 * 
 *     def __mul__(IntegerMatrix A, IntegerMatrix B):             # <<<<<<<<<<<<<<
 *         """Naive matrix  matrix products.
 * 
*/

  /* function 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_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_tmp);
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":1407
 *         return res
 * 
 *     def __mod__(IntegerMatrix self, q):             # <<<<<<<<<<<<<<
 *         """Return A mod q.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_63__mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_q); /*proto*/
PyDoc_STRVAR(__pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_62__mod__, "IntegerMatrix.__mod__(self, q)\n\nReturn A mod q.\n\n:param q: a modulus > 0");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_62__mod__;
#endif
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_63__mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_q) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__mod__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_62__mod__(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self), ((PyObject *)__pyx_v_q));

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

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_62__mod__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, PyObject *__pyx_v_q) {
  PyObject *__pyx_v_A = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__mod__", 0);

  /* "fpylll/fplll/integer_matrix.pyx":1413
 * 
 *         """
 *         A = self.__copy__()             # <<<<<<<<<<<<<<
 *         A.mod(q)
 *         return A
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_copy, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_A = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":1414
 *         """
 *         A = self.__copy__()
 *         A.mod(q)             # <<<<<<<<<<<<<<
 *         return A
 * 
*/
  __pyx_t_2 = __pyx_v_A;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_q};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_mod, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1414, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":1415
 *         A = self.__copy__()
 *         A.mod(q)
 *         return A             # <<<<<<<<<<<<<<
 * 
 *     def mod(IntegerMatrix self, q, int start_row=0, int start_col=0, int stop_row=-1, int stop_col=-1):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_A);
  __pyx_r = __pyx_v_A;
  goto __pyx_L0;

  /* "fpylll/fplll/integer_matrix.pyx":1407
 *         return res
 * 
 *     def __mod__(IntegerMatrix self, q):             # <<<<<<<<<<<<<<
 *         """Return A mod q.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.__mod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_A);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":1417
 *         return A
 * 
 *     def mod(IntegerMatrix self, q, int start_row=0, int start_col=0, int stop_row=-1, int stop_col=-1):             # <<<<<<<<<<<<<<
 *         """Apply moduluar reduction modulo `q` to this matrix.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_65mod(PyObject *__pyx_v_self, 
#if 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_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_64mod, "IntegerMatrix.mod(self, q, int start_row=0, int start_col=0, int stop_row=-1, int stop_col=-1)\n\nApply moduluar reduction modulo `q` to this matrix.\n\n:param q: modulus\n:param int start_row: starting row\n:param int start_col: starting column\n:param int stop_row: last row (excluding)\n:param int stop_col: last column (excluding)\n\n>>> A = IntegerMatrix(2, 2)\n>>> A[0,0] = 1001\n>>> A[1,0] = 13\n>>> A[0,1] = 102\n>>> print(A)\n[ 1001 102 ]\n[   13   0 ]\n\n>>> A.mod(10, start_row=1, start_col=0)\n>>> print(A)\n[ 1001 102 ]\n[    3   0 ]\n\n>>> A.mod(10)\n>>> print(A)\n[ 1 2 ]\n[ 3 0 ]\n\n>>> A = IntegerMatrix(2, 2)\n>>> A[0,0] = 1001\n>>> A[1,0] = 13\n>>> A[0,1] = 102\n>>> A.mod(10, stop_row=1)\n>>> print(A)\n[  1 2 ]\n[ 13 0 ]");
static PyMethodDef __pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_65mod = {"mod", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_65mod, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_64mod};
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_65mod(PyObject *__pyx_v_self, 
#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_q = 0;
  int __pyx_v_start_row;
  int __pyx_v_start_col;
  int __pyx_v_stop_row;
  int __pyx_v_stop_col;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mod (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_q,&__pyx_mstate_global->__pyx_n_u_start_row,&__pyx_mstate_global->__pyx_n_u_start_col,&__pyx_mstate_global->__pyx_n_u_stop_row,&__pyx_mstate_global->__pyx_n_u_stop_col,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, 1417, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1417, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1417, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1417, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1417, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1417, __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, "mod", 0) < (0)) __PYX_ERR(0, 1417, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("mod", 0, 1, 5, i); __PYX_ERR(0, 1417, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1417, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1417, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1417, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1417, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1417, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_q = values[0];
    if (values[1]) {
      __pyx_v_start_row = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_start_row == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1417, __pyx_L3_error)
    } else {
      __pyx_v_start_row = ((int)0);
    }
    if (values[2]) {
      __pyx_v_start_col = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_start_col == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1417, __pyx_L3_error)
    } else {
      __pyx_v_start_col = ((int)0);
    }
    if (values[3]) {
      __pyx_v_stop_row = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_stop_row == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1417, __pyx_L3_error)
    } else {
      __pyx_v_stop_row = ((int)-1);
    }
    if (values[4]) {
      __pyx_v_stop_col = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_stop_col == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1417, __pyx_L3_error)
    } else {
      __pyx_v_stop_col = ((int)-1);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mod", 0, 1, 5, __pyx_nargs); __PYX_ERR(0, 1417, __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("fpylll.fplll.integer_matrix.IntegerMatrix.mod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_64mod(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self), __pyx_v_q, __pyx_v_start_row, __pyx_v_start_col, __pyx_v_stop_row, __pyx_v_stop_col);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_64mod(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, PyObject *__pyx_v_q, int __pyx_v_start_row, int __pyx_v_start_col, int __pyx_v_stop_row, int __pyx_v_stop_col) {
  mpz_t __pyx_v_q_;
  PyObject *__pyx_v_msg = NULL;
  mpz_t __pyx_v_t1;
  mpz_t __pyx_v_t2;
  mpz_t __pyx_v_q2_;
  int __pyx_v_i;
  int __pyx_v_j;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  long __pyx_t_1;
  long __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  size_t __pyx_t_12;
  long __pyx_t_13;
  long __pyx_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  int __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mod", 0);

  /* "fpylll/fplll/integer_matrix.pyx":1454
 * 
 *         """
 *         preprocess_indices(start_row, start_col, self._nrows(), self._ncols())             # <<<<<<<<<<<<<<
 *         preprocess_indices(stop_row, stop_col, self._nrows()+1, self._ncols()+1)
 * 
*/
  __pyx_t_1 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_nrows(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1454, __pyx_L1_error)
  __pyx_t_2 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_ncols(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1454, __pyx_L1_error)
  __pyx_t_3 = __pyx_f_6fpylll_4util_preprocess_indices(__pyx_v_start_row, __pyx_v_start_col, __pyx_t_1, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1454, __pyx_L1_error)

  /* "fpylll/fplll/integer_matrix.pyx":1455
 *         """
 *         preprocess_indices(start_row, start_col, self._nrows(), self._ncols())
 *         preprocess_indices(stop_row, stop_col, self._nrows()+1, self._ncols()+1)             # <<<<<<<<<<<<<<
 * 
 *         cdef mpz_t q_
*/
  __pyx_t_2 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_nrows(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1455, __pyx_L1_error)
  __pyx_t_1 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_ncols(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1455, __pyx_L1_error)
  __pyx_t_3 = __pyx_f_6fpylll_4util_preprocess_indices(__pyx_v_stop_row, __pyx_v_stop_col, (__pyx_t_2 + 1), (__pyx_t_1 + 1)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1455, __pyx_L1_error)

  /* "fpylll/fplll/integer_matrix.pyx":1458
 * 
 *         cdef mpz_t q_
 *         mpz_init(q_)             # <<<<<<<<<<<<<<
 *         try:
 *             assign_mpz(q_, q)
*/
  mpz_init(__pyx_v_q_);

  /* "fpylll/fplll/integer_matrix.pyx":1459
 *         cdef mpz_t q_
 *         mpz_init(q_)
 *         try:             # <<<<<<<<<<<<<<
 *             assign_mpz(q_, q)
 *         except NotImplementedError, msg:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_6);
    /*try:*/ {

      /* "fpylll/fplll/integer_matrix.pyx":1460
 *         mpz_init(q_)
 *         try:
 *             assign_mpz(q_, q)             # <<<<<<<<<<<<<<
 *         except NotImplementedError, msg:
 *             mpz_clear(q_)
*/
      __pyx_t_3 = __pyx_f_6fpylll_2io_assign_mpz(__pyx_v_q_, __pyx_v_q); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1460, __pyx_L3_error)

      /* "fpylll/fplll/integer_matrix.pyx":1459
 *         cdef mpz_t q_
 *         mpz_init(q_)
 *         try:             # <<<<<<<<<<<<<<
 *             assign_mpz(q_, q)
 *         except NotImplementedError, msg:
*/
    }
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;

    /* "fpylll/fplll/integer_matrix.pyx":1461
 *         try:
 *             assign_mpz(q_, q)
 *         except NotImplementedError, msg:             # <<<<<<<<<<<<<<
 *             mpz_clear(q_)
 *             raise NotImplementedError(msg)
*/
    __pyx_t_3 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))));
    if (__pyx_t_3) {
      __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.mod", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0, 1461, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_8);
      __pyx_v_msg = __pyx_t_8;

      /* "fpylll/fplll/integer_matrix.pyx":1462
 *             assign_mpz(q_, q)
 *         except NotImplementedError, msg:
 *             mpz_clear(q_)             # <<<<<<<<<<<<<<
 *             raise NotImplementedError(msg)
 * 
*/
      mpz_clear(__pyx_v_q_);

      /* "fpylll/fplll/integer_matrix.pyx":1463
 *         except NotImplementedError, msg:
 *             mpz_clear(q_)
 *             raise NotImplementedError(msg)             # <<<<<<<<<<<<<<
 * 
 *         cdef mpz_t t1
*/
      __pyx_t_11 = NULL;
      __pyx_t_12 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_msg};
        __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1463, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_10);
      }
      __Pyx_Raise(__pyx_t_10, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __PYX_ERR(0, 1463, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;

    /* "fpylll/fplll/integer_matrix.pyx":1459
 *         cdef mpz_t q_
 *         mpz_init(q_)
 *         try:             # <<<<<<<<<<<<<<
 *             assign_mpz(q_, q)
 *         except NotImplementedError, msg:
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
    goto __pyx_L1_error;
    __pyx_L8_try_end:;
  }

  /* "fpylll/fplll/integer_matrix.pyx":1466
 * 
 *         cdef mpz_t t1
 *         mpz_init(t1)             # <<<<<<<<<<<<<<
 *         cdef mpz_t t2
 *         mpz_init(t2)
*/
  mpz_init(__pyx_v_t1);

  /* "fpylll/fplll/integer_matrix.pyx":1468
 *         mpz_init(t1)
 *         cdef mpz_t t2
 *         mpz_init(t2)             # <<<<<<<<<<<<<<
 * 
 *         cdef mpz_t q2_
*/
  mpz_init(__pyx_v_t2);

  /* "fpylll/fplll/integer_matrix.pyx":1471
 * 
 *         cdef mpz_t q2_
 *         mpz_init(q2_)             # <<<<<<<<<<<<<<
 *         mpz_fdiv_q_ui(q2_, q_, 2)
 * 
*/
  mpz_init(__pyx_v_q2_);

  /* "fpylll/fplll/integer_matrix.pyx":1472
 *         cdef mpz_t q2_
 *         mpz_init(q2_)
 *         mpz_fdiv_q_ui(q2_, q_, 2)             # <<<<<<<<<<<<<<
 * 
 *         cdef int i, j
*/
  (void)(mpz_fdiv_q_ui(__pyx_v_q2_, __pyx_v_q_, 2));

  /* "fpylll/fplll/integer_matrix.pyx":1475
 * 
 *         cdef int i, j
 *         for i in range(self._nrows()):             # <<<<<<<<<<<<<<
 *             for j in range(self._ncols()):
 *                 if self._type == ZT_MPZ:
*/
  __pyx_t_1 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_nrows(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1475, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "fpylll/fplll/integer_matrix.pyx":1476
 *         cdef int i, j
 *         for i in range(self._nrows()):
 *             for j in range(self._ncols()):             # <<<<<<<<<<<<<<
 *                 if self._type == ZT_MPZ:
 *                     mpz_set(t1, self._core.mpz[0][i][j].get_data())
*/
    __pyx_t_13 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_ncols(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1476, __pyx_L1_error)
    __pyx_t_14 = __pyx_t_13;
    for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
      __pyx_v_j = __pyx_t_15;

      /* "fpylll/fplll/integer_matrix.pyx":1477
 *         for i in range(self._nrows()):
 *             for j in range(self._ncols()):
 *                 if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *                     mpz_set(t1, self._core.mpz[0][i][j].get_data())
 *                 elif self._type == ZT_LONG:
*/
      switch (__pyx_v_self->_type) {
        case fplll::ZT_MPZ:

        /* "fpylll/fplll/integer_matrix.pyx":1478
 *             for j in range(self._ncols()):
 *                 if self._type == ZT_MPZ:
 *                     mpz_set(t1, self._core.mpz[0][i][j].get_data())             # <<<<<<<<<<<<<<
 *                 elif self._type == ZT_LONG:
 *                     mpz_set_si(t1, self._core.long[0][i][j].get_data())
*/
        mpz_set(__pyx_v_t1, (((__pyx_v_self->_core.mpz[0])[__pyx_v_i])[__pyx_v_j]).get_data());

        /* "fpylll/fplll/integer_matrix.pyx":1477
 *         for i in range(self._nrows()):
 *             for j in range(self._ncols()):
 *                 if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *                     mpz_set(t1, self._core.mpz[0][i][j].get_data())
 *                 elif self._type == ZT_LONG:
*/
        break;
        case fplll::ZT_LONG:

        /* "fpylll/fplll/integer_matrix.pyx":1480
 *                     mpz_set(t1, self._core.mpz[0][i][j].get_data())
 *                 elif self._type == ZT_LONG:
 *                     mpz_set_si(t1, self._core.long[0][i][j].get_data())             # <<<<<<<<<<<<<<
 *                 else:
 *                     raise RuntimeError("Integer type '%s' not understood."%self._type)
*/
        mpz_set_si(__pyx_v_t1, (((__pyx_v_self->_core.__pyx_long[0])[__pyx_v_i])[__pyx_v_j]).get_data());

        /* "fpylll/fplll/integer_matrix.pyx":1479
 *                 if self._type == ZT_MPZ:
 *                     mpz_set(t1, self._core.mpz[0][i][j].get_data())
 *                 elif self._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *                     mpz_set_si(t1, self._core.long[0][i][j].get_data())
 *                 else:
*/
        break;
        default:

        /* "fpylll/fplll/integer_matrix.pyx":1482
 *                     mpz_set_si(t1, self._core.long[0][i][j].get_data())
 *                 else:
 *                     raise RuntimeError("Integer type '%s' not understood."%self._type)             # <<<<<<<<<<<<<<
 * 
 *                 if start_row <= i < stop_row and start_col <= i < stop_col:
*/
        __pyx_t_8 = NULL;
        __pyx_t_7 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1482, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_10 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1482, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_12 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_10};
          __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__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_9)) __PYX_ERR(0, 1482, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
        }
        __Pyx_Raise(__pyx_t_9, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __PYX_ERR(0, 1482, __pyx_L1_error)
        break;
      }

      /* "fpylll/fplll/integer_matrix.pyx":1484
 *                     raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *                 if start_row <= i < stop_row and start_col <= i < stop_col:             # <<<<<<<<<<<<<<
 *                     mpz_mod(t2, t1, q_)
 *                     if mpz_cmp(t2, q2_) > 0:
*/
      __pyx_t_17 = (__pyx_v_start_row <= __pyx_v_i);
      if (__pyx_t_17) {
        __pyx_t_17 = (__pyx_v_i < __pyx_v_stop_row);
      }
      if (__pyx_t_17) {
      } else {
        __pyx_t_16 = __pyx_t_17;
        goto __pyx_L16_bool_binop_done;
      }
      __pyx_t_17 = (__pyx_v_start_col <= __pyx_v_i);
      if (__pyx_t_17) {
        __pyx_t_17 = (__pyx_v_i < __pyx_v_stop_col);
      }
      __pyx_t_16 = __pyx_t_17;
      __pyx_L16_bool_binop_done:;
      if (__pyx_t_16) {

        /* "fpylll/fplll/integer_matrix.pyx":1485
 * 
 *                 if start_row <= i < stop_row and start_col <= i < stop_col:
 *                     mpz_mod(t2, t1, q_)             # <<<<<<<<<<<<<<
 *                     if mpz_cmp(t2, q2_) > 0:
 *                         mpz_sub(t2, t2, q_)
*/
        mpz_mod(__pyx_v_t2, __pyx_v_t1, __pyx_v_q_);

        /* "fpylll/fplll/integer_matrix.pyx":1486
 *                 if start_row <= i < stop_row and start_col <= i < stop_col:
 *                     mpz_mod(t2, t1, q_)
 *                     if mpz_cmp(t2, q2_) > 0:             # <<<<<<<<<<<<<<
 *                         mpz_sub(t2, t2, q_)
 *                     if self._type == ZT_MPZ:
*/
        __pyx_t_16 = (mpz_cmp(__pyx_v_t2, __pyx_v_q2_) > 0);
        if (__pyx_t_16) {

          /* "fpylll/fplll/integer_matrix.pyx":1487
 *                     mpz_mod(t2, t1, q_)
 *                     if mpz_cmp(t2, q2_) > 0:
 *                         mpz_sub(t2, t2, q_)             # <<<<<<<<<<<<<<
 *                     if self._type == ZT_MPZ:
 *                         self._core.mpz[0][i][j].set(t2)
*/
          mpz_sub(__pyx_v_t2, __pyx_v_t2, __pyx_v_q_);

          /* "fpylll/fplll/integer_matrix.pyx":1486
 *                 if start_row <= i < stop_row and start_col <= i < stop_col:
 *                     mpz_mod(t2, t1, q_)
 *                     if mpz_cmp(t2, q2_) > 0:             # <<<<<<<<<<<<<<
 *                         mpz_sub(t2, t2, q_)
 *                     if self._type == ZT_MPZ:
*/
        }

        /* "fpylll/fplll/integer_matrix.pyx":1488
 *                     if mpz_cmp(t2, q2_) > 0:
 *                         mpz_sub(t2, t2, q_)
 *                     if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *                         self._core.mpz[0][i][j].set(t2)
 *                     elif self._type == ZT_LONG:
*/
        switch (__pyx_v_self->_type) {
          case fplll::ZT_MPZ:

          /* "fpylll/fplll/integer_matrix.pyx":1489
 *                         mpz_sub(t2, t2, q_)
 *                     if self._type == ZT_MPZ:
 *                         self._core.mpz[0][i][j].set(t2)             # <<<<<<<<<<<<<<
 *                     elif self._type == ZT_LONG:
 *                         self._core.long[0][i][j] = mpz_get_si(t2)
*/
          (((__pyx_v_self->_core.mpz[0])[__pyx_v_i])[__pyx_v_j]).operator=(__pyx_v_t2);

          /* "fpylll/fplll/integer_matrix.pyx":1488
 *                     if mpz_cmp(t2, q2_) > 0:
 *                         mpz_sub(t2, t2, q_)
 *                     if self._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *                         self._core.mpz[0][i][j].set(t2)
 *                     elif self._type == ZT_LONG:
*/
          break;
          case fplll::ZT_LONG:

          /* "fpylll/fplll/integer_matrix.pyx":1491
 *                         self._core.mpz[0][i][j].set(t2)
 *                     elif self._type == ZT_LONG:
 *                         self._core.long[0][i][j] = mpz_get_si(t2)             # <<<<<<<<<<<<<<
 *                     else:
 *                         raise RuntimeError("Integer type '%s' not understood."%self._type)
*/
          (((__pyx_v_self->_core.__pyx_long[0])[__pyx_v_i])[__pyx_v_j]) = mpz_get_si(__pyx_v_t2);

          /* "fpylll/fplll/integer_matrix.pyx":1490
 *                     if self._type == ZT_MPZ:
 *                         self._core.mpz[0][i][j].set(t2)
 *                     elif self._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *                         self._core.long[0][i][j] = mpz_get_si(t2)
 *                     else:
*/
          break;
          default:

          /* "fpylll/fplll/integer_matrix.pyx":1493
 *                         self._core.long[0][i][j] = mpz_get_si(t2)
 *                     else:
 *                         raise RuntimeError("Integer type '%s' not understood."%self._type)             # <<<<<<<<<<<<<<
 * 
 *         mpz_clear(q_)
*/
          __pyx_t_10 = NULL;
          __pyx_t_8 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(__pyx_v_self->_type); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1493, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_7 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1493, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_12 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_7};
            __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __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_7); __pyx_t_7 = 0;
            if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1493, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_9);
          }
          __Pyx_Raise(__pyx_t_9, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __PYX_ERR(0, 1493, __pyx_L1_error)
          break;
        }

        /* "fpylll/fplll/integer_matrix.pyx":1484
 *                     raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *                 if start_row <= i < stop_row and start_col <= i < stop_col:             # <<<<<<<<<<<<<<
 *                     mpz_mod(t2, t1, q_)
 *                     if mpz_cmp(t2, q2_) > 0:
*/
      }
    }
  }

  /* "fpylll/fplll/integer_matrix.pyx":1495
 *                         raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *         mpz_clear(q_)             # <<<<<<<<<<<<<<
 *         mpz_clear(q2_)
 *         mpz_clear(t1)
*/
  mpz_clear(__pyx_v_q_);

  /* "fpylll/fplll/integer_matrix.pyx":1496
 * 
 *         mpz_clear(q_)
 *         mpz_clear(q2_)             # <<<<<<<<<<<<<<
 *         mpz_clear(t1)
 *         mpz_clear(t2)
*/
  mpz_clear(__pyx_v_q2_);

  /* "fpylll/fplll/integer_matrix.pyx":1497
 *         mpz_clear(q_)
 *         mpz_clear(q2_)
 *         mpz_clear(t1)             # <<<<<<<<<<<<<<
 *         mpz_clear(t2)
 * 
*/
  mpz_clear(__pyx_v_t1);

  /* "fpylll/fplll/integer_matrix.pyx":1498
 *         mpz_clear(q2_)
 *         mpz_clear(t1)
 *         mpz_clear(t2)             # <<<<<<<<<<<<<<
 * 
 *     def __richcmp__(IntegerMatrix self, IntegerMatrix other, int op):
*/
  mpz_clear(__pyx_v_t2);

  /* "fpylll/fplll/integer_matrix.pyx":1417
 *         return A
 * 
 *     def mod(IntegerMatrix self, q, int start_row=0, int start_col=0, int stop_row=-1, int stop_col=-1):             # <<<<<<<<<<<<<<
 *         """Apply moduluar reduction modulo `q` to this matrix.
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.mod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_msg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":1500
 *         mpz_clear(t2)
 * 
 *     def __richcmp__(IntegerMatrix self, IntegerMatrix other, int op):             # <<<<<<<<<<<<<<
 *         """Compare two matrices
 *         """
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_67__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_67__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, 1, "other", 0))) __PYX_ERR(0, 1500, __pyx_L1_error)
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_66__richcmp__(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self), ((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_other), ((int)__pyx_v_op));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  goto __pyx_L5_cleaned_up;
  __pyx_L0:;
  __pyx_L5_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_66__richcmp__(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_other, int __pyx_v_op) {
  int __pyx_v_i;
  int __pyx_v_j;
  PyObject *__pyx_v_a = 0;
  PyObject *__pyx_v_b = 0;
  int __pyx_v_eq;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  long __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  long __pyx_t_6;
  int __pyx_t_7;
  long __pyx_t_8;
  long __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("__richcmp__", 0);

  /* "fpylll/fplll/integer_matrix.pyx":1505
 *         cdef int i, j
 *         cdef a, b
 *         if op == 2 or op == 3:             # <<<<<<<<<<<<<<
 *             eq = True
 *             if self._nrows() != other.nrows:
*/
  switch (__pyx_v_op) {
    case 2:
    case 3:

    /* "fpylll/fplll/integer_matrix.pyx":1506
 *         cdef a, b
 *         if op == 2 or op == 3:
 *             eq = True             # <<<<<<<<<<<<<<
 *             if self._nrows() != other.nrows:
 *                 eq = False
*/
    __pyx_v_eq = 1;

    /* "fpylll/fplll/integer_matrix.pyx":1507
 *         if op == 2 or op == 3:
 *             eq = True
 *             if self._nrows() != other.nrows:             # <<<<<<<<<<<<<<
 *                 eq = False
 *             elif self._ncols() != other.ncols:
*/
    __pyx_t_1 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_nrows(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1507, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyLong_From_long(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1507, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_mstate_global->__pyx_n_u_nrows); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1507, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1507, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1507, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_5) {

      /* "fpylll/fplll/integer_matrix.pyx":1508
 *             eq = True
 *             if self._nrows() != other.nrows:
 *                 eq = False             # <<<<<<<<<<<<<<
 *             elif self._ncols() != other.ncols:
 *                 eq = False
*/
      __pyx_v_eq = 0;

      /* "fpylll/fplll/integer_matrix.pyx":1507
 *         if op == 2 or op == 3:
 *             eq = True
 *             if self._nrows() != other.nrows:             # <<<<<<<<<<<<<<
 *                 eq = False
 *             elif self._ncols() != other.ncols:
*/
      goto __pyx_L3;
    }

    /* "fpylll/fplll/integer_matrix.pyx":1509
 *             if self._nrows() != other.nrows:
 *                 eq = False
 *             elif self._ncols() != other.ncols:             # <<<<<<<<<<<<<<
 *                 eq = False
 *             for i in range(self._nrows()):
*/
    __pyx_t_1 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_ncols(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1509, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyLong_From_long(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1509, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_mstate_global->__pyx_n_u_ncols); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1509, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1509, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1509, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_5) {

      /* "fpylll/fplll/integer_matrix.pyx":1510
 *                 eq = False
 *             elif self._ncols() != other.ncols:
 *                 eq = False             # <<<<<<<<<<<<<<
 *             for i in range(self._nrows()):
 *                 if eq is False:
*/
      __pyx_v_eq = 0;

      /* "fpylll/fplll/integer_matrix.pyx":1509
 *             if self._nrows() != other.nrows:
 *                 eq = False
 *             elif self._ncols() != other.ncols:             # <<<<<<<<<<<<<<
 *                 eq = False
 *             for i in range(self._nrows()):
*/
    }
    __pyx_L3:;

    /* "fpylll/fplll/integer_matrix.pyx":1511
 *             elif self._ncols() != other.ncols:
 *                 eq = False
 *             for i in range(self._nrows()):             # <<<<<<<<<<<<<<
 *                 if eq is False:
 *                     break
*/
    __pyx_t_1 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_nrows(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1511, __pyx_L1_error)
    __pyx_t_6 = __pyx_t_1;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "fpylll/fplll/integer_matrix.pyx":1512
 *                 eq = False
 *             for i in range(self._nrows()):
 *                 if eq is False:             # <<<<<<<<<<<<<<
 *                     break
 *                 for j in range(self._ncols()):
*/
      __pyx_t_5 = (__pyx_v_eq == 0);
      if (__pyx_t_5) {

        /* "fpylll/fplll/integer_matrix.pyx":1513
 *             for i in range(self._nrows()):
 *                 if eq is False:
 *                     break             # <<<<<<<<<<<<<<
 *                 for j in range(self._ncols()):
 *                     a = self._get(i, j)
*/
        goto __pyx_L5_break;

        /* "fpylll/fplll/integer_matrix.pyx":1512
 *                 eq = False
 *             for i in range(self._nrows()):
 *                 if eq is False:             # <<<<<<<<<<<<<<
 *                     break
 *                 for j in range(self._ncols()):
*/
      }

      /* "fpylll/fplll/integer_matrix.pyx":1514
 *                 if eq is False:
 *                     break
 *                 for j in range(self._ncols()):             # <<<<<<<<<<<<<<
 *                     a = self._get(i, j)
 *                     b = other._get(i, j)
*/
      __pyx_t_8 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_ncols(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1514, __pyx_L1_error)
      __pyx_t_9 = __pyx_t_8;
      for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
        __pyx_v_j = __pyx_t_10;

        /* "fpylll/fplll/integer_matrix.pyx":1515
 *                     break
 *                 for j in range(self._ncols()):
 *                     a = self._get(i, j)             # <<<<<<<<<<<<<<
 *                     b = other._get(i, j)
 *                     if a != b:
*/
        __pyx_t_2 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_get(__pyx_v_self, __pyx_v_i, __pyx_v_j); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1515, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_XDECREF_SET(__pyx_v_a, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "fpylll/fplll/integer_matrix.pyx":1516
 *                 for j in range(self._ncols()):
 *                     a = self._get(i, j)
 *                     b = other._get(i, j)             # <<<<<<<<<<<<<<
 *                     if a != b:
 *                         eq = False
*/
        __pyx_t_2 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_other->__pyx_vtab)->_get(__pyx_v_other, __pyx_v_i, __pyx_v_j); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1516, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "fpylll/fplll/integer_matrix.pyx":1517
 *                     a = self._get(i, j)
 *                     b = other._get(i, j)
 *                     if a != b:             # <<<<<<<<<<<<<<
 *                         eq = False
 *                         break
*/
        __pyx_t_2 = PyObject_RichCompare(__pyx_v_a, __pyx_v_b, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1517, __pyx_L1_error)
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1517, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (__pyx_t_5) {

          /* "fpylll/fplll/integer_matrix.pyx":1518
 *                     b = other._get(i, j)
 *                     if a != b:
 *                         eq = False             # <<<<<<<<<<<<<<
 *                         break
 *         else:
*/
          __pyx_v_eq = 0;

          /* "fpylll/fplll/integer_matrix.pyx":1519
 *                     if a != b:
 *                         eq = False
 *                         break             # <<<<<<<<<<<<<<
 *         else:
 *             raise NotImplementedError("Only != and == are implemented for integer matrices.")
*/
          goto __pyx_L8_break;

          /* "fpylll/fplll/integer_matrix.pyx":1517
 *                     a = self._get(i, j)
 *                     b = other._get(i, j)
 *                     if a != b:             # <<<<<<<<<<<<<<
 *                         eq = False
 *                         break
*/
        }
      }
      __pyx_L8_break:;
    }
    __pyx_L5_break:;

    /* "fpylll/fplll/integer_matrix.pyx":1505
 *         cdef int i, j
 *         cdef a, b
 *         if op == 2 or op == 3:             # <<<<<<<<<<<<<<
 *             eq = True
 *             if self._nrows() != other.nrows:
*/
    break;
    default:

    /* "fpylll/fplll/integer_matrix.pyx":1521
 *                         break
 *         else:
 *             raise NotImplementedError("Only != and == are implemented for integer matrices.")             # <<<<<<<<<<<<<<
 *         if op == 2:
 *             return eq
*/
    __pyx_t_3 = NULL;
    __pyx_t_11 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Only_and_are_implemented_for_int};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1521, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1521, __pyx_L1_error)
    break;
  }

  /* "fpylll/fplll/integer_matrix.pyx":1522
 *         else:
 *             raise NotImplementedError("Only != and == are implemented for integer matrices.")
 *         if op == 2:             # <<<<<<<<<<<<<<
 *             return eq
 *         elif op == 3:
*/
  switch (__pyx_v_op) {
    case 2:

    /* "fpylll/fplll/integer_matrix.pyx":1523
 *             raise NotImplementedError("Only != and == are implemented for integer matrices.")
 *         if op == 2:
 *             return eq             # <<<<<<<<<<<<<<
 *         elif op == 3:
 *             return not eq
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_eq); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":1522
 *         else:
 *             raise NotImplementedError("Only != and == are implemented for integer matrices.")
 *         if op == 2:             # <<<<<<<<<<<<<<
 *             return eq
 *         elif op == 3:
*/
    break;
    case 3:

    /* "fpylll/fplll/integer_matrix.pyx":1525
 *             return eq
 *         elif op == 3:
 *             return not eq             # <<<<<<<<<<<<<<
 * 
 *     def apply_transform(self, IntegerMatrix U, int start_row=0):
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyBool_FromLong((!__pyx_v_eq)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1525, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":1524
 *         if op == 2:
 *             return eq
 *         elif op == 3:             # <<<<<<<<<<<<<<
 *             return not eq
 * 
*/
    break;
    default: break;
  }

  /* "fpylll/fplll/integer_matrix.pyx":1500
 *         mpz_clear(t2)
 * 
 *     def __richcmp__(IntegerMatrix self, IntegerMatrix other, int op):             # <<<<<<<<<<<<<<
 *         """Compare two matrices
 *         """
*/

  /* 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_4);
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_a);
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":1527
 *             return not eq
 * 
 *     def apply_transform(self, IntegerMatrix U, int start_row=0):             # <<<<<<<<<<<<<<
 *         """Apply transformation matrix ``U`` to this matrix starting at row ``start_row``.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_69apply_transform(PyObject *__pyx_v_self, 
#if 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_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_68apply_transform, "IntegerMatrix.apply_transform(self, IntegerMatrix U, int start_row=0)\n\nApply transformation matrix ``U`` to this matrix starting at row ``start_row``.\n\n:param IntegerMatrix U: transformation matrix\n:param int start_row: start transformation in this row");
static PyMethodDef __pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_69apply_transform = {"apply_transform", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_69apply_transform, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_68apply_transform};
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_69apply_transform(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_U = 0;
  int __pyx_v_start_row;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("apply_transform (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_U,&__pyx_mstate_global->__pyx_n_u_start_row,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, 1527, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1527, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 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, "apply_transform", 0) < (0)) __PYX_ERR(0, 1527, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("apply_transform", 0, 1, 2, i); __PYX_ERR(0, 1527, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1527, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1527, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_U = ((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)values[0]);
    if (values[1]) {
      __pyx_v_start_row = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_start_row == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1527, __pyx_L3_error)
    } else {
      __pyx_v_start_row = ((int)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("apply_transform", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 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("fpylll.fplll.integer_matrix.IntegerMatrix.apply_transform", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_U), __pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, 1, "U", 0))) __PYX_ERR(0, 1527, __pyx_L1_error)
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_68apply_transform(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self), __pyx_v_U, __pyx_v_start_row);

  /* 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_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_68apply_transform(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_U, int __pyx_v_start_row) {
  int __pyx_v_i;
  int __pyx_v_j;
  PyObject *__pyx_v_S = NULL;
  struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_B = 0;
  PyObject *__pyx_v_tmp = 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;
  long __pyx_t_7;
  size_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  int __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __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("apply_transform", 0);

  /* "fpylll/fplll/integer_matrix.pyx":1535
 *         """
 *         cdef int i, j
 *         S = self.submatrix(start_row, 0, start_row + U.nrows, self._ncols())             # <<<<<<<<<<<<<<
 *         cdef IntegerMatrix B = U*S
 *         for i in range(B.nrows):
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_start_row); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_start_row); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_U), __pyx_mstate_global->__pyx_n_u_nrows); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_7 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_ncols(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1535, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyLong_From_long(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = 0;
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_t_3, __pyx_mstate_global->__pyx_int_0, __pyx_t_6, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_submatrix, __pyx_callargs+__pyx_t_8, (5-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1535, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_S = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":1536
 *         cdef int i, j
 *         S = self.submatrix(start_row, 0, start_row + U.nrows, self._ncols())
 *         cdef IntegerMatrix B = U*S             # <<<<<<<<<<<<<<
 *         for i in range(B.nrows):
 *             for j in range(B.ncols):
*/
  __pyx_t_1 = PyNumber_Multiply(((PyObject *)__pyx_v_U), __pyx_v_S); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1536, __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_6fpylll_5fplll_14integer_matrix_IntegerMatrix))))) __PYX_ERR(0, 1536, __pyx_L1_error)
  __pyx_v_B = ((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":1537
 *         S = self.submatrix(start_row, 0, start_row + U.nrows, self._ncols())
 *         cdef IntegerMatrix B = U*S
 *         for i in range(B.nrows):             # <<<<<<<<<<<<<<
 *             for j in range(B.ncols):
 *                 tmp = B._get(i, j)
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_B), __pyx_mstate_global->__pyx_n_u_nrows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1537, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __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;

    /* "fpylll/fplll/integer_matrix.pyx":1538
 *         cdef IntegerMatrix B = U*S
 *         for i in range(B.nrows):
 *             for j in range(B.ncols):             # <<<<<<<<<<<<<<
 *                 tmp = B._get(i, j)
 *                 self._set(start_row+i, j, tmp)
*/
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_B), __pyx_mstate_global->__pyx_n_u_ncols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1538, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1538, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_13 = __pyx_t_12;
    for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) {
      __pyx_v_j = __pyx_t_14;

      /* "fpylll/fplll/integer_matrix.pyx":1539
 *         for i in range(B.nrows):
 *             for j in range(B.ncols):
 *                 tmp = B._get(i, j)             # <<<<<<<<<<<<<<
 *                 self._set(start_row+i, j, tmp)
 * 
*/
      __pyx_t_1 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_B->__pyx_vtab)->_get(__pyx_v_B, __pyx_v_i, __pyx_v_j); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1539, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_tmp, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "fpylll/fplll/integer_matrix.pyx":1540
 *             for j in range(B.ncols):
 *                 tmp = B._get(i, j)
 *                 self._set(start_row+i, j, tmp)             # <<<<<<<<<<<<<<
 * 
 *     def submatrix(self, a, b, c=None, d=None):
*/
      __pyx_t_15 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_set(__pyx_v_self, (__pyx_v_start_row + __pyx_v_i), __pyx_v_j, __pyx_v_tmp); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 1540, __pyx_L1_error)
    }
  }

  /* "fpylll/fplll/integer_matrix.pyx":1527
 *             return not eq
 * 
 *     def apply_transform(self, IntegerMatrix U, int start_row=0):             # <<<<<<<<<<<<<<
 *         """Apply transformation matrix ``U`` to this matrix starting at row ``start_row``.
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.apply_transform", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_S);
  __Pyx_XDECREF((PyObject *)__pyx_v_B);
  __Pyx_XDECREF(__pyx_v_tmp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":1542
 *                 self._set(start_row+i, j, tmp)
 * 
 *     def submatrix(self, a, b, c=None, d=None):             # <<<<<<<<<<<<<<
 *         """Construct a new submatrix.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_71submatrix(PyObject *__pyx_v_self, 
#if 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_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_70submatrix, "IntegerMatrix.submatrix(self, a, b, c=None, d=None)\n\nConstruct a new submatrix.\n\n:param a: either the index of the first row or an iterable of row indices\n:param b: either the index of the first column or an iterable of column indices\n:param c: the index of first excluded row (or ``None``)\n:param d: the index of first excluded column (or ``None``)\n:returns:\n:rtype:\n\nWe illustrate the calling conventions of this function using a 10 x 10 matrix::\n\n    >>> from fpylll import IntegerMatrix, FPLLL\n    >>> A = IntegerMatrix(10, 10)\n    >>> FPLLL.set_random_seed(1337)\n    >>> A.randomize(\"ntrulike\", bits=22, q=4194319)\n    >>> print(A)\n    [ 1 0 0 0 0 3021421  752690 1522220 2972677  119630 ]\n    [ 0 1 0 0 0  119630 3021421  752690 1522220 2972677 ]\n    [ 0 0 1 0 0 2972677  119630 3021421  752690 1522220 ]\n    [ 0 0 0 1 0 1522220 2972677  119630 3021421  752690 ]\n    [ 0 0 0 0 1  752690 1522220 2972677  119630 3021421 ]\n    [ 0 0 0 0 0 4194319       0       0       0       0 ]\n    [ 0 0 0 0 0       0 4194319       0       0       0 ]\n    [ 0 0 0 0 0       0       0 4194319       0       0 ]\n    [ 0 0 0 0 0       0       0       0 4194319       0 ]\n    [ 0 0 0 0 0       0       0       0       0 4194319 ]\n\nWe can either specify start/stop rows and columns::\n\n    >>> print(A.submatrix(0,0,2,8))\n    [ 1 0 0 0 0 3021421  752690 1522220 ]\n    [ 0 1 0 0 0  119630 3021421  752690 ]\n\nOr we can give lists of rows, columns explicitly::\n\n    >>> print(A.submatrix([0,1,2],range(3,9)))\n    [ 0 0 3021421  752690 1522220 2972677 ]\n    [ 0 0  119630 3021421  752690 1522220 ]\n    [ 0 0 2972677  119630 3021421  752690 ]");
static PyMethodDef __pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_71submatrix = {"submatrix", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_71submatrix, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_70submatrix};
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_71submatrix(PyObject *__pyx_v_self, 
#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_a = 0;
  PyObject *__pyx_v_b = 0;
  PyObject *__pyx_v_c = 0;
  PyObject *__pyx_v_d = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("submatrix (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_a,&__pyx_mstate_global->__pyx_n_u_b,&__pyx_mstate_global->__pyx_n_u_c,&__pyx_mstate_global->__pyx_n_u_d,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, 1542, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1542, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1542, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1542, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1542, __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, "submatrix", 0) < (0)) __PYX_ERR(0, 1542, __pyx_L3_error)
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("submatrix", 0, 2, 4, i); __PYX_ERR(0, 1542, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1542, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1542, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1542, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1542, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_a = values[0];
    __pyx_v_b = values[1];
    __pyx_v_c = values[2];
    __pyx_v_d = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("submatrix", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 1542, __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("fpylll.fplll.integer_matrix.IntegerMatrix.submatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_70submatrix(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self), __pyx_v_a, __pyx_v_b, __pyx_v_c, __pyx_v_d);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_70submatrix(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
  int __pyx_v_m;
  int __pyx_v_n;
  int __pyx_v_i;
  int __pyx_v_j;
  int __pyx_v_row;
  int __pyx_v_col;
  PyObject *__pyx_v_rows = NULL;
  PyObject *__pyx_v_cols = NULL;
  PyObject *__pyx_v_it = NULL;
  struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_A = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  size_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  PyObject *(*__pyx_t_14)(PyObject *);
  Py_ssize_t __pyx_t_15;
  PyObject *(*__pyx_t_16)(PyObject *);
  long __pyx_t_17;
  long __pyx_t_18;
  int __pyx_t_19;
  int __pyx_t_20;
  PyObject *__pyx_t_21[5];
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("submatrix", 0);
  __Pyx_INCREF(__pyx_v_c);
  __Pyx_INCREF(__pyx_v_d);

  /* "fpylll/fplll/integer_matrix.pyx":1584
 * 
 *         """
 *         cdef int m = 0             # <<<<<<<<<<<<<<
 *         cdef int n = 0
 *         cdef int i, j, row, col
*/
  __pyx_v_m = 0;

  /* "fpylll/fplll/integer_matrix.pyx":1585
 *         """
 *         cdef int m = 0
 *         cdef int n = 0             # <<<<<<<<<<<<<<
 *         cdef int i, j, row, col
 * 
*/
  __pyx_v_n = 0;

  /* "fpylll/fplll/integer_matrix.pyx":1588
 *         cdef int i, j, row, col
 * 
 *         if c is None and d is None:             # <<<<<<<<<<<<<<
 *             try:
 *                 iter(a)
*/
  __pyx_t_2 = (__pyx_v_c == Py_None);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_d == Py_None);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "fpylll/fplll/integer_matrix.pyx":1589
 * 
 *         if c is None and d is None:
 *             try:             # <<<<<<<<<<<<<<
 *                 iter(a)
 *                 rows = a
*/
    {
      __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:*/ {

        /* "fpylll/fplll/integer_matrix.pyx":1590
 *         if c is None and d is None:
 *             try:
 *                 iter(a)             # <<<<<<<<<<<<<<
 *                 rows = a
 *                 iter(b)
*/
        __pyx_t_6 = PyObject_GetIter(__pyx_v_a); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1590, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "fpylll/fplll/integer_matrix.pyx":1591
 *             try:
 *                 iter(a)
 *                 rows = a             # <<<<<<<<<<<<<<
 *                 iter(b)
 *                 cols = b
*/
        __Pyx_INCREF(__pyx_v_a);
        __pyx_v_rows = __pyx_v_a;

        /* "fpylll/fplll/integer_matrix.pyx":1592
 *                 iter(a)
 *                 rows = a
 *                 iter(b)             # <<<<<<<<<<<<<<
 *                 cols = b
 *             except TypeError:
*/
        __pyx_t_6 = PyObject_GetIter(__pyx_v_b); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1592, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "fpylll/fplll/integer_matrix.pyx":1593
 *                 rows = a
 *                 iter(b)
 *                 cols = b             # <<<<<<<<<<<<<<
 *             except TypeError:
 *                 raise ValueError("Inputs to submatrix not understood.")
*/
        __Pyx_INCREF(__pyx_v_b);
        __pyx_v_cols = __pyx_v_b;

        /* "fpylll/fplll/integer_matrix.pyx":1589
 * 
 *         if c is None and d is None:
 *             try:             # <<<<<<<<<<<<<<
 *                 iter(a)
 *                 rows = a
*/
      }
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L11_try_end;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "fpylll/fplll/integer_matrix.pyx":1594
 *                 iter(b)
 *                 cols = b
 *             except TypeError:             # <<<<<<<<<<<<<<
 *                 raise ValueError("Inputs to submatrix not understood.")
 *             it = iter(rows)
*/
      __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError))));
      if (__pyx_t_7) {
        __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.submatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0, 1594, __pyx_L8_except_error)
        __Pyx_XGOTREF(__pyx_t_6);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_9);

        /* "fpylll/fplll/integer_matrix.pyx":1595
 *                 cols = b
 *             except TypeError:
 *                 raise ValueError("Inputs to submatrix not understood.")             # <<<<<<<<<<<<<<
 *             it = iter(rows)
 *             try:
*/
        __pyx_t_11 = NULL;
        __pyx_t_12 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_mstate_global->__pyx_kp_u_Inputs_to_submatrix_not_understo};
          __pyx_t_10 = __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_11); __pyx_t_11 = 0;
          if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1595, __pyx_L8_except_error)
          __Pyx_GOTREF(__pyx_t_10);
        }
        __Pyx_Raise(__pyx_t_10, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __PYX_ERR(0, 1595, __pyx_L8_except_error)
      }
      goto __pyx_L8_except_error;

      /* "fpylll/fplll/integer_matrix.pyx":1589
 * 
 *         if c is None and d is None:
 *             try:             # <<<<<<<<<<<<<<
 *                 iter(a)
 *                 rows = a
*/
      __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_L11_try_end:;
    }

    /* "fpylll/fplll/integer_matrix.pyx":1596
 *             except TypeError:
 *                 raise ValueError("Inputs to submatrix not understood.")
 *             it = iter(rows)             # <<<<<<<<<<<<<<
 *             try:
 *                 while True:
*/
    __pyx_t_9 = PyObject_GetIter(__pyx_v_rows); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1596, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_v_it = __pyx_t_9;
    __pyx_t_9 = 0;

    /* "fpylll/fplll/integer_matrix.pyx":1597
 *                 raise ValueError("Inputs to submatrix not understood.")
 *             it = iter(rows)
 *             try:             # <<<<<<<<<<<<<<
 *                 while True:
 *                     next(it)
*/
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_3);
      /*try:*/ {

        /* "fpylll/fplll/integer_matrix.pyx":1598
 *             it = iter(rows)
 *             try:
 *                 while True:             # <<<<<<<<<<<<<<
 *                     next(it)
 *                     m += 1
*/
        while (1) {

          /* "fpylll/fplll/integer_matrix.pyx":1599
 *             try:
 *                 while True:
 *                     next(it)             # <<<<<<<<<<<<<<
 *                     m += 1
 *             except StopIteration:
*/
          __pyx_t_9 = __Pyx_PyIter_Next(__pyx_v_it); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1599, __pyx_L14_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

          /* "fpylll/fplll/integer_matrix.pyx":1600
 *                 while True:
 *                     next(it)
 *                     m += 1             # <<<<<<<<<<<<<<
 *             except StopIteration:
 *                 pass
*/
          __pyx_v_m = (__pyx_v_m + 1);
        }

        /* "fpylll/fplll/integer_matrix.pyx":1597
 *                 raise ValueError("Inputs to submatrix not understood.")
 *             it = iter(rows)
 *             try:             # <<<<<<<<<<<<<<
 *                 while True:
 *                     next(it)
*/
      }
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L19_try_end;
      __pyx_L14_error:;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "fpylll/fplll/integer_matrix.pyx":1601
 *                     next(it)
 *                     m += 1
 *             except StopIteration:             # <<<<<<<<<<<<<<
 *                 pass
 * 
*/
      __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_StopIteration))));
      if (__pyx_t_7) {
        __Pyx_ErrRestore(0,0,0);
        goto __pyx_L15_exception_handled;
      }
      goto __pyx_L16_except_error;

      /* "fpylll/fplll/integer_matrix.pyx":1597
 *                 raise ValueError("Inputs to submatrix not understood.")
 *             it = iter(rows)
 *             try:             # <<<<<<<<<<<<<<
 *                 while True:
 *                     next(it)
*/
      __pyx_L16_except_error:;
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
      goto __pyx_L1_error;
      __pyx_L15_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
      __pyx_L19_try_end:;
    }

    /* "fpylll/fplll/integer_matrix.pyx":1604
 *                 pass
 * 
 *             it = iter(cols)             # <<<<<<<<<<<<<<
 *             try:
 *                 while True:
*/
    __pyx_t_9 = PyObject_GetIter(__pyx_v_cols); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1604, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF_SET(__pyx_v_it, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "fpylll/fplll/integer_matrix.pyx":1605
 * 
 *             it = iter(cols)
 *             try:             # <<<<<<<<<<<<<<
 *                 while True:
 *                     next(it)
*/
    {
      __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:*/ {

        /* "fpylll/fplll/integer_matrix.pyx":1606
 *             it = iter(cols)
 *             try:
 *                 while True:             # <<<<<<<<<<<<<<
 *                     next(it)
 *                     n += 1
*/
        while (1) {

          /* "fpylll/fplll/integer_matrix.pyx":1607
 *             try:
 *                 while True:
 *                     next(it)             # <<<<<<<<<<<<<<
 *                     n += 1
 *             except StopIteration:
*/
          __pyx_t_9 = __Pyx_PyIter_Next(__pyx_v_it); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1607, __pyx_L24_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

          /* "fpylll/fplll/integer_matrix.pyx":1608
 *                 while True:
 *                     next(it)
 *                     n += 1             # <<<<<<<<<<<<<<
 *             except StopIteration:
 *                 pass
*/
          __pyx_v_n = (__pyx_v_n + 1);
        }

        /* "fpylll/fplll/integer_matrix.pyx":1605
 * 
 *             it = iter(cols)
 *             try:             # <<<<<<<<<<<<<<
 *                 while True:
 *                     next(it)
*/
      }
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L29_try_end;
      __pyx_L24_error:;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "fpylll/fplll/integer_matrix.pyx":1609
 *                     next(it)
 *                     n += 1
 *             except StopIteration:             # <<<<<<<<<<<<<<
 *                 pass
 * 
*/
      __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_StopIteration))));
      if (__pyx_t_7) {
        __Pyx_ErrRestore(0,0,0);
        goto __pyx_L25_exception_handled;
      }
      goto __pyx_L26_except_error;

      /* "fpylll/fplll/integer_matrix.pyx":1605
 * 
 *             it = iter(cols)
 *             try:             # <<<<<<<<<<<<<<
 *                 while True:
 *                     next(it)
*/
      __pyx_L26_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_L25_exception_handled:;
      __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);
      __pyx_L29_try_end:;
    }

    /* "fpylll/fplll/integer_matrix.pyx":1612
 *                 pass
 * 
 *             A = IntegerMatrix(m, n)             # <<<<<<<<<<<<<<
 * 
 *             i = 0
*/
    __pyx_t_8 = NULL;
    __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v_m); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_10 = __Pyx_PyLong_From_int(__pyx_v_n); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_12 = 1;
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_t_6, __pyx_t_10};
      __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_callargs+__pyx_t_12, (3-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1612, __pyx_L1_error)
      __Pyx_GOTREF((PyObject *)__pyx_t_9);
    }
    __pyx_v_A = ((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_t_9);
    __pyx_t_9 = 0;

    /* "fpylll/fplll/integer_matrix.pyx":1614
 *             A = IntegerMatrix(m, n)
 * 
 *             i = 0             # <<<<<<<<<<<<<<
 *             for row in iter(rows):
 *                 j = 0
*/
    __pyx_v_i = 0;

    /* "fpylll/fplll/integer_matrix.pyx":1615
 * 
 *             i = 0
 *             for row in iter(rows):             # <<<<<<<<<<<<<<
 *                 j = 0
 *                 for col in iter(cols):
*/
    __pyx_t_9 = PyObject_GetIter(__pyx_v_rows); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1615, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (likely(PyList_CheckExact(__pyx_t_9)) || PyTuple_CheckExact(__pyx_t_9)) {
      __pyx_t_10 = __pyx_t_9; __Pyx_INCREF(__pyx_t_10);
      __pyx_t_13 = 0;
      __pyx_t_14 = NULL;
    } else {
      __pyx_t_13 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1615, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_14 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_10); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1615, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    for (;;) {
      if (likely(!__pyx_t_14)) {
        if (likely(PyList_CheckExact(__pyx_t_10))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_10);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1615, __pyx_L1_error)
            #endif
            if (__pyx_t_13 >= __pyx_temp) break;
          }
          __pyx_t_9 = __Pyx_PyList_GetItemRefFast(__pyx_t_10, __pyx_t_13, __Pyx_ReferenceSharing_OwnStrongReference);
          ++__pyx_t_13;
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_10);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1615, __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_10, __pyx_t_13));
          #else
          __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_10, __pyx_t_13);
          #endif
          ++__pyx_t_13;
        }
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1615, __pyx_L1_error)
      } else {
        __pyx_t_9 = __pyx_t_14(__pyx_t_10);
        if (unlikely(!__pyx_t_9)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1615, __pyx_L1_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_7 = __Pyx_PyLong_As_int(__pyx_t_9); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1615, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_v_row = __pyx_t_7;

      /* "fpylll/fplll/integer_matrix.pyx":1616
 *             i = 0
 *             for row in iter(rows):
 *                 j = 0             # <<<<<<<<<<<<<<
 *                 for col in iter(cols):
 *                     preprocess_indices(row, col, self._nrows(), self._ncols())
*/
      __pyx_v_j = 0;

      /* "fpylll/fplll/integer_matrix.pyx":1617
 *             for row in iter(rows):
 *                 j = 0
 *                 for col in iter(cols):             # <<<<<<<<<<<<<<
 *                     preprocess_indices(row, col, self._nrows(), self._ncols())
 *                     A._set(i, j, self._get(row, col))
*/
      __pyx_t_9 = PyObject_GetIter(__pyx_v_cols); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1617, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (likely(PyList_CheckExact(__pyx_t_9)) || PyTuple_CheckExact(__pyx_t_9)) {
        __pyx_t_6 = __pyx_t_9; __Pyx_INCREF(__pyx_t_6);
        __pyx_t_15 = 0;
        __pyx_t_16 = NULL;
      } else {
        __pyx_t_15 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1617, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_16 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1617, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      for (;;) {
        if (likely(!__pyx_t_16)) {
          if (likely(PyList_CheckExact(__pyx_t_6))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1617, __pyx_L1_error)
              #endif
              if (__pyx_t_15 >= __pyx_temp) break;
            }
            __pyx_t_9 = __Pyx_PyList_GetItemRefFast(__pyx_t_6, __pyx_t_15, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_15;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1617, __pyx_L1_error)
              #endif
              if (__pyx_t_15 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_9 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_15));
            #else
            __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_15);
            #endif
            ++__pyx_t_15;
          }
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1617, __pyx_L1_error)
        } else {
          __pyx_t_9 = __pyx_t_16(__pyx_t_6);
          if (unlikely(!__pyx_t_9)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1617, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_7 = __Pyx_PyLong_As_int(__pyx_t_9); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1617, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_v_col = __pyx_t_7;

        /* "fpylll/fplll/integer_matrix.pyx":1618
 *                 j = 0
 *                 for col in iter(cols):
 *                     preprocess_indices(row, col, self._nrows(), self._ncols())             # <<<<<<<<<<<<<<
 *                     A._set(i, j, self._get(row, col))
 *                     j += 1
*/
        __pyx_t_17 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_nrows(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1618, __pyx_L1_error)
        __pyx_t_18 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_ncols(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1618, __pyx_L1_error)
        __pyx_t_7 = __pyx_f_6fpylll_4util_preprocess_indices(__pyx_v_row, __pyx_v_col, __pyx_t_17, __pyx_t_18); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1618, __pyx_L1_error)

        /* "fpylll/fplll/integer_matrix.pyx":1619
 *                 for col in iter(cols):
 *                     preprocess_indices(row, col, self._nrows(), self._ncols())
 *                     A._set(i, j, self._get(row, col))             # <<<<<<<<<<<<<<
 *                     j += 1
 *                 i += 1
*/
        __pyx_t_9 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_get(__pyx_v_self, __pyx_v_row, __pyx_v_col); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1619, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_7 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_A->__pyx_vtab)->_set(__pyx_v_A, __pyx_v_i, __pyx_v_j, __pyx_t_9); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1619, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "fpylll/fplll/integer_matrix.pyx":1620
 *                     preprocess_indices(row, col, self._nrows(), self._ncols())
 *                     A._set(i, j, self._get(row, col))
 *                     j += 1             # <<<<<<<<<<<<<<
 *                 i += 1
 *             return A
*/
        __pyx_v_j = (__pyx_v_j + 1);

        /* "fpylll/fplll/integer_matrix.pyx":1617
 *             for row in iter(rows):
 *                 j = 0
 *                 for col in iter(cols):             # <<<<<<<<<<<<<<
 *                     preprocess_indices(row, col, self._nrows(), self._ncols())
 *                     A._set(i, j, self._get(row, col))
*/
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "fpylll/fplll/integer_matrix.pyx":1621
 *                     A._set(i, j, self._get(row, col))
 *                     j += 1
 *                 i += 1             # <<<<<<<<<<<<<<
 *             return A
 *         else:
*/
      __pyx_v_i = (__pyx_v_i + 1);

      /* "fpylll/fplll/integer_matrix.pyx":1615
 * 
 *             i = 0
 *             for row in iter(rows):             # <<<<<<<<<<<<<<
 *                 j = 0
 *                 for col in iter(cols):
*/
    }
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "fpylll/fplll/integer_matrix.pyx":1622
 *                     j += 1
 *                 i += 1
 *             return A             # <<<<<<<<<<<<<<
 *         else:
 *             if c < 0:
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_A);
    __pyx_r = ((PyObject *)__pyx_v_A);
    goto __pyx_L0;

    /* "fpylll/fplll/integer_matrix.pyx":1588
 *         cdef int i, j, row, col
 * 
 *         if c is None and d is None:             # <<<<<<<<<<<<<<
 *             try:
 *                 iter(a)
*/
  }

  /* "fpylll/fplll/integer_matrix.pyx":1624
 *             return A
 *         else:
 *             if c < 0:             # <<<<<<<<<<<<<<
 *                 c %= self._nrows()
 *             if d < 0:
*/
  /*else*/ {
    __pyx_t_10 = PyObject_RichCompare(__pyx_v_c, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1624, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1624, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (__pyx_t_1) {

      /* "fpylll/fplll/integer_matrix.pyx":1625
 *         else:
 *             if c < 0:
 *                 c %= self._nrows()             # <<<<<<<<<<<<<<
 *             if d < 0:
 *                 d %= self._ncols()
*/
      __pyx_t_18 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_nrows(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1625, __pyx_L1_error)
      __pyx_t_10 = __Pyx_PyLong_From_long(__pyx_t_18); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1625, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_6 = PyNumber_InPlaceRemainder(__pyx_v_c, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1625, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF_SET(__pyx_v_c, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "fpylll/fplll/integer_matrix.pyx":1624
 *             return A
 *         else:
 *             if c < 0:             # <<<<<<<<<<<<<<
 *                 c %= self._nrows()
 *             if d < 0:
*/
    }

    /* "fpylll/fplll/integer_matrix.pyx":1626
 *             if c < 0:
 *                 c %= self._nrows()
 *             if d < 0:             # <<<<<<<<<<<<<<
 *                 d %= self._ncols()
 * 
*/
    __pyx_t_6 = PyObject_RichCompare(__pyx_v_d, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1626, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1626, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_1) {

      /* "fpylll/fplll/integer_matrix.pyx":1627
 *                 c %= self._nrows()
 *             if d < 0:
 *                 d %= self._ncols()             # <<<<<<<<<<<<<<
 * 
 *             preprocess_indices(a, b, self._nrows(), self._ncols())
*/
      __pyx_t_18 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_ncols(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1627, __pyx_L1_error)
      __pyx_t_6 = __Pyx_PyLong_From_long(__pyx_t_18); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1627, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_10 = PyNumber_InPlaceRemainder(__pyx_v_d, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1627, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF_SET(__pyx_v_d, __pyx_t_10);
      __pyx_t_10 = 0;

      /* "fpylll/fplll/integer_matrix.pyx":1626
 *             if c < 0:
 *                 c %= self._nrows()
 *             if d < 0:             # <<<<<<<<<<<<<<
 *                 d %= self._ncols()
 * 
*/
    }

    /* "fpylll/fplll/integer_matrix.pyx":1629
 *                 d %= self._ncols()
 * 
 *             preprocess_indices(a, b, self._nrows(), self._ncols())             # <<<<<<<<<<<<<<
 *             preprocess_indices(c, d, self._nrows()+1, self._ncols()+1)
 * 
*/
    __pyx_t_7 = __Pyx_PyLong_As_int(__pyx_v_a); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1629, __pyx_L1_error)
    __pyx_t_19 = __Pyx_PyLong_As_int(__pyx_v_b); if (unlikely((__pyx_t_19 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1629, __pyx_L1_error)
    __pyx_t_18 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_nrows(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1629, __pyx_L1_error)
    __pyx_t_17 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_ncols(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1629, __pyx_L1_error)
    __pyx_t_20 = __pyx_f_6fpylll_4util_preprocess_indices(__pyx_t_7, __pyx_t_19, __pyx_t_18, __pyx_t_17); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 1629, __pyx_L1_error)

    /* "fpylll/fplll/integer_matrix.pyx":1630
 * 
 *             preprocess_indices(a, b, self._nrows(), self._ncols())
 *             preprocess_indices(c, d, self._nrows()+1, self._ncols()+1)             # <<<<<<<<<<<<<<
 * 
 *             if c < a:
*/
    __pyx_t_20 = __Pyx_PyLong_As_int(__pyx_v_c); if (unlikely((__pyx_t_20 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1630, __pyx_L1_error)
    __pyx_t_19 = __Pyx_PyLong_As_int(__pyx_v_d); if (unlikely((__pyx_t_19 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1630, __pyx_L1_error)
    __pyx_t_17 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_nrows(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1630, __pyx_L1_error)
    __pyx_t_18 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_ncols(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1630, __pyx_L1_error)
    __pyx_t_7 = __pyx_f_6fpylll_4util_preprocess_indices(__pyx_t_20, __pyx_t_19, (__pyx_t_17 + 1), (__pyx_t_18 + 1)); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1630, __pyx_L1_error)

    /* "fpylll/fplll/integer_matrix.pyx":1632
 *             preprocess_indices(c, d, self._nrows()+1, self._ncols()+1)
 * 
 *             if c < a:             # <<<<<<<<<<<<<<
 *                 raise ValueError("Last row (%d) < first row (%d)"%(c, a))
 *             if d < b:
*/
    __pyx_t_10 = PyObject_RichCompare(__pyx_v_c, __pyx_v_a, Py_LT); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1632, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1632, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__pyx_t_1)) {

      /* "fpylll/fplll/integer_matrix.pyx":1633
 * 
 *             if c < a:
 *                 raise ValueError("Last row (%d) < first row (%d)"%(c, a))             # <<<<<<<<<<<<<<
 *             if d < b:
 *                 raise ValueError("Last column (%d) < first column (%d)"%(d, b))
*/
      __pyx_t_6 = NULL;
      __pyx_t_9 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_Long(__pyx_v_c), __pyx_mstate_global->__pyx_n_u_d); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1633, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_Long(__pyx_v_a), __pyx_mstate_global->__pyx_n_u_d); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1633, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_21[0] = __pyx_mstate_global->__pyx_kp_u_Last_row;
      __pyx_t_21[1] = __pyx_t_9;
      __pyx_t_21[2] = __pyx_mstate_global->__pyx_kp_u_first_row;
      __pyx_t_21[3] = __pyx_t_8;
      __pyx_t_21[4] = __pyx_mstate_global->__pyx_kp_u__3;
      __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_21, 5, 10 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 15 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8));
      if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1633, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_12 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_11};
        __pyx_t_10 = __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_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1633, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
      }
      __Pyx_Raise(__pyx_t_10, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __PYX_ERR(0, 1633, __pyx_L1_error)

      /* "fpylll/fplll/integer_matrix.pyx":1632
 *             preprocess_indices(c, d, self._nrows()+1, self._ncols()+1)
 * 
 *             if c < a:             # <<<<<<<<<<<<<<
 *                 raise ValueError("Last row (%d) < first row (%d)"%(c, a))
 *             if d < b:
*/
    }

    /* "fpylll/fplll/integer_matrix.pyx":1634
 *             if c < a:
 *                 raise ValueError("Last row (%d) < first row (%d)"%(c, a))
 *             if d < b:             # <<<<<<<<<<<<<<
 *                 raise ValueError("Last column (%d) < first column (%d)"%(d, b))
 *             i = 0
*/
    __pyx_t_10 = PyObject_RichCompare(__pyx_v_d, __pyx_v_b, Py_LT); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1634, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1634, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__pyx_t_1)) {

      /* "fpylll/fplll/integer_matrix.pyx":1635
 *                 raise ValueError("Last row (%d) < first row (%d)"%(c, a))
 *             if d < b:
 *                 raise ValueError("Last column (%d) < first column (%d)"%(d, b))             # <<<<<<<<<<<<<<
 *             i = 0
 *             m = c - a
*/
      __pyx_t_11 = NULL;
      __pyx_t_6 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_Long(__pyx_v_d), __pyx_mstate_global->__pyx_n_u_d); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1635, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_Long(__pyx_v_b), __pyx_mstate_global->__pyx_n_u_d); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1635, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_21[0] = __pyx_mstate_global->__pyx_kp_u_Last_column;
      __pyx_t_21[1] = __pyx_t_6;
      __pyx_t_21[2] = __pyx_mstate_global->__pyx_kp_u_first_column;
      __pyx_t_21[3] = __pyx_t_8;
      __pyx_t_21[4] = __pyx_mstate_global->__pyx_kp_u__3;
      __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_21, 5, 13 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8));
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1635, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_12 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_9};
        __pyx_t_10 = __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_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1635, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
      }
      __Pyx_Raise(__pyx_t_10, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __PYX_ERR(0, 1635, __pyx_L1_error)

      /* "fpylll/fplll/integer_matrix.pyx":1634
 *             if c < a:
 *                 raise ValueError("Last row (%d) < first row (%d)"%(c, a))
 *             if d < b:             # <<<<<<<<<<<<<<
 *                 raise ValueError("Last column (%d) < first column (%d)"%(d, b))
 *             i = 0
*/
    }

    /* "fpylll/fplll/integer_matrix.pyx":1636
 *             if d < b:
 *                 raise ValueError("Last column (%d) < first column (%d)"%(d, b))
 *             i = 0             # <<<<<<<<<<<<<<
 *             m = c - a
 *             n = d - b
*/
    __pyx_v_i = 0;

    /* "fpylll/fplll/integer_matrix.pyx":1637
 *                 raise ValueError("Last column (%d) < first column (%d)"%(d, b))
 *             i = 0
 *             m = c - a             # <<<<<<<<<<<<<<
 *             n = d - b
 *             A = IntegerMatrix(m, n)
*/
    __pyx_t_10 = PyNumber_Subtract(__pyx_v_c, __pyx_v_a); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1637, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_7 = __Pyx_PyLong_As_int(__pyx_t_10); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1637, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_v_m = __pyx_t_7;

    /* "fpylll/fplll/integer_matrix.pyx":1638
 *             i = 0
 *             m = c - a
 *             n = d - b             # <<<<<<<<<<<<<<
 *             A = IntegerMatrix(m, n)
 *             for row in range(a, c):
*/
    __pyx_t_10 = PyNumber_Subtract(__pyx_v_d, __pyx_v_b); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1638, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_7 = __Pyx_PyLong_As_int(__pyx_t_10); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1638, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_v_n = __pyx_t_7;

    /* "fpylll/fplll/integer_matrix.pyx":1639
 *             m = c - a
 *             n = d - b
 *             A = IntegerMatrix(m, n)             # <<<<<<<<<<<<<<
 *             for row in range(a, c):
 *                 j = 0
*/
    __pyx_t_9 = NULL;
    __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v_m); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1639, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_8 = __Pyx_PyLong_From_int(__pyx_v_n); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1639, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_12 = 1;
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_t_11, __pyx_t_8};
      __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_callargs+__pyx_t_12, (3-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1639, __pyx_L1_error)
      __Pyx_GOTREF((PyObject *)__pyx_t_10);
    }
    __pyx_v_A = ((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_t_10);
    __pyx_t_10 = 0;

    /* "fpylll/fplll/integer_matrix.pyx":1640
 *             n = d - b
 *             A = IntegerMatrix(m, n)
 *             for row in range(a, c):             # <<<<<<<<<<<<<<
 *                 j = 0
 *                 for col in range(b, d):
*/
    __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_c); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1640, __pyx_L1_error)
    __pyx_t_15 = __Pyx_PyIndex_AsSsize_t(__pyx_v_a); if (unlikely((__pyx_t_15 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1640, __pyx_L1_error)
    __pyx_t_22 = __pyx_t_13;
    for (__pyx_t_7 = __pyx_t_15; __pyx_t_7 < __pyx_t_22; __pyx_t_7+=1) {
      __pyx_v_row = __pyx_t_7;

      /* "fpylll/fplll/integer_matrix.pyx":1641
 *             A = IntegerMatrix(m, n)
 *             for row in range(a, c):
 *                 j = 0             # <<<<<<<<<<<<<<
 *                 for col in range(b, d):
 *                     A._set(i, j, self._get(row, col))
*/
      __pyx_v_j = 0;

      /* "fpylll/fplll/integer_matrix.pyx":1642
 *             for row in range(a, c):
 *                 j = 0
 *                 for col in range(b, d):             # <<<<<<<<<<<<<<
 *                     A._set(i, j, self._get(row, col))
 *                     j += 1
*/
      __pyx_t_23 = __Pyx_PyIndex_AsSsize_t(__pyx_v_d); if (unlikely((__pyx_t_23 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1642, __pyx_L1_error)
      __pyx_t_24 = __Pyx_PyIndex_AsSsize_t(__pyx_v_b); if (unlikely((__pyx_t_24 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1642, __pyx_L1_error)
      __pyx_t_25 = __pyx_t_23;
      for (__pyx_t_19 = __pyx_t_24; __pyx_t_19 < __pyx_t_25; __pyx_t_19+=1) {
        __pyx_v_col = __pyx_t_19;

        /* "fpylll/fplll/integer_matrix.pyx":1643
 *                 j = 0
 *                 for col in range(b, d):
 *                     A._set(i, j, self._get(row, col))             # <<<<<<<<<<<<<<
 *                     j += 1
 *                 i += 1
*/
        __pyx_t_10 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_get(__pyx_v_self, __pyx_v_row, __pyx_v_col); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1643, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_20 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_A->__pyx_vtab)->_set(__pyx_v_A, __pyx_v_i, __pyx_v_j, __pyx_t_10); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 1643, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

        /* "fpylll/fplll/integer_matrix.pyx":1644
 *                 for col in range(b, d):
 *                     A._set(i, j, self._get(row, col))
 *                     j += 1             # <<<<<<<<<<<<<<
 *                 i += 1
 *             return A
*/
        __pyx_v_j = (__pyx_v_j + 1);
      }

      /* "fpylll/fplll/integer_matrix.pyx":1645
 *                     A._set(i, j, self._get(row, col))
 *                     j += 1
 *                 i += 1             # <<<<<<<<<<<<<<
 *             return A
 * 
*/
      __pyx_v_i = (__pyx_v_i + 1);
    }

    /* "fpylll/fplll/integer_matrix.pyx":1646
 *                     j += 1
 *                 i += 1
 *             return A             # <<<<<<<<<<<<<<
 * 
 *     def multiply_left(self, v, start=0):
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_A);
    __pyx_r = ((PyObject *)__pyx_v_A);
    goto __pyx_L0;
  }

  /* "fpylll/fplll/integer_matrix.pyx":1542
 *                 self._set(start_row+i, j, tmp)
 * 
 *     def submatrix(self, a, b, c=None, d=None):             # <<<<<<<<<<<<<<
 *         """Construct a new submatrix.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.submatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_rows);
  __Pyx_XDECREF(__pyx_v_cols);
  __Pyx_XDECREF(__pyx_v_it);
  __Pyx_XDECREF((PyObject *)__pyx_v_A);
  __Pyx_XDECREF(__pyx_v_c);
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":1648
 *             return A
 * 
 *     def multiply_left(self, v, start=0):             # <<<<<<<<<<<<<<
 *         """Return ``v*A'`` where ``A'`` is ``A`` reduced to ``len(v)`` rows starting at ``start``.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_73multiply_left(PyObject *__pyx_v_self, 
#if 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_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_72multiply_left, "IntegerMatrix.multiply_left(self, v, start=0)\n\nReturn ``v*A'`` where ``A'`` is ``A`` reduced to ``len(v)`` rows starting at ``start``.\n\n:param v: a tuple-like object\n:param start: start in row ``start``");
static PyMethodDef __pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_73multiply_left = {"multiply_left", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_73multiply_left, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_72multiply_left};
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_73multiply_left(PyObject *__pyx_v_self, 
#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_v = 0;
  PyObject *__pyx_v_start = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("multiply_left (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_v,&__pyx_mstate_global->__pyx_n_u_start,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, 1648, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1648, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1648, __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, "multiply_left", 0) < (0)) __PYX_ERR(0, 1648, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("multiply_left", 0, 1, 2, i); __PYX_ERR(0, 1648, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1648, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1648, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
    }
    __pyx_v_v = values[0];
    __pyx_v_start = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("multiply_left", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1648, __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("fpylll.fplll.integer_matrix.IntegerMatrix.multiply_left", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_72multiply_left(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self), __pyx_v_v, __pyx_v_start);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_72multiply_left(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *__pyx_v_self, PyObject *__pyx_v_v, PyObject *__pyx_v_start) {
  PyObject *__pyx_v_r = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_j = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  long __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  int __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("multiply_left", 0);

  /* "fpylll/fplll/integer_matrix.pyx":1654
 *         :param start: start in row ``start``
 *         """
 *         r = [0]*self._ncols()             # <<<<<<<<<<<<<<
 *         for i in range(len(v)):
 *             for j in range(self._ncols()):
*/
  __pyx_t_1 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_ncols(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1654, __pyx_L1_error)
  __pyx_t_2 = PyList_New(1 * ((__pyx_t_1<0) ? 0:__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  { Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < __pyx_t_1; __pyx_temp++) {
      __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
      __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_0);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_2, __pyx_temp, __pyx_mstate_global->__pyx_int_0) != (0)) __PYX_ERR(0, 1654, __pyx_L1_error);
    }
  }
  __pyx_v_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":1655
 *         """
 *         r = [0]*self._ncols()
 *         for i in range(len(v)):             # <<<<<<<<<<<<<<
 *             for j in range(self._ncols()):
 *                 r[j] += v[i]*self._get(start+i, j)
*/
  __pyx_t_3 = NULL;
  __pyx_t_4 = PyObject_Length(__pyx_v_v); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1655, __pyx_L1_error)
  __pyx_t_5 = PyLong_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __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(0, 1655, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1655, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    {
      __pyx_t_2 = __pyx_t_7(__pyx_t_5);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1655, __pyx_L1_error)
          PyErr_Clear();
        }
        break;
      }
    }
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "fpylll/fplll/integer_matrix.pyx":1656
 *         r = [0]*self._ncols()
 *         for i in range(len(v)):
 *             for j in range(self._ncols()):             # <<<<<<<<<<<<<<
 *                 r[j] += v[i]*self._get(start+i, j)
 *         return tuple(r)
*/
    __pyx_t_3 = NULL;
    __pyx_t_1 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_ncols(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1656, __pyx_L1_error)
    __pyx_t_8 = __Pyx_PyLong_From_long(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1656, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_8};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __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_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1656, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1656, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1656, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      {
        __pyx_t_2 = __pyx_t_9(__pyx_t_8);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1656, __pyx_L1_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "fpylll/fplll/integer_matrix.pyx":1657
 *         for i in range(len(v)):
 *             for j in range(self._ncols()):
 *                 r[j] += v[i]*self._get(start+i, j)             # <<<<<<<<<<<<<<
 *         return tuple(r)
 * 
*/
      __Pyx_INCREF(__pyx_v_j);
      __pyx_t_2 = __pyx_v_j;
      __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_r, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1657, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_v_v, __pyx_v_i); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1657, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = PyNumber_Add(__pyx_v_start, __pyx_v_i); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1657, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_12 = __Pyx_PyLong_As_int(__pyx_t_11); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1657, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_13 = __Pyx_PyLong_As_int(__pyx_v_j); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1657, __pyx_L1_error)
      __pyx_t_11 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_self->__pyx_vtab)->_get(__pyx_v_self, __pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1657, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_14 = PyNumber_Multiply(__pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1657, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1657, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      if (unlikely((PyObject_SetItem(__pyx_v_r, __pyx_t_2, __pyx_t_11) < 0))) __PYX_ERR(0, 1657, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "fpylll/fplll/integer_matrix.pyx":1656
 *         r = [0]*self._ncols()
 *         for i in range(len(v)):
 *             for j in range(self._ncols()):             # <<<<<<<<<<<<<<
 *                 r[j] += v[i]*self._get(start+i, j)
 *         return tuple(r)
*/
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "fpylll/fplll/integer_matrix.pyx":1655
 *         """
 *         r = [0]*self._ncols()
 *         for i in range(len(v)):             # <<<<<<<<<<<<<<
 *             for j in range(self._ncols()):
 *                 r[j] += v[i]*self._get(start+i, j)
*/
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":1658
 *             for j in range(self._ncols()):
 *                 r[j] += v[i]*self._get(start+i, j)
 *         return tuple(r)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = PyList_AsTuple(__pyx_v_r); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "fpylll/fplll/integer_matrix.pyx":1648
 *             return A
 * 
 *     def multiply_left(self, v, start=0):             # <<<<<<<<<<<<<<
 *         """Return ``v*A'`` where ``A'`` is ``A`` reduced to ``len(v)`` rows starting at ``start``.
 * 
*/

  /* 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_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.multiply_left", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_r);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_j);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":1660
 *         return tuple(r)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_file(cls, filename, **kwds):
 *         """Construct new matrix from file.
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_75from_file(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_74from_file, "IntegerMatrix.from_file(cls, filename, **kwds)\n\nConstruct new matrix from file.\n\n>>> import tempfile\n>>> A = IntegerMatrix.random(10, \"qary\", k=5, bits=20)\n\n>>> fn = tempfile.mktemp()\n>>> fh = open(fn, \"w\")\n>>> _ = fh.write(str(A))\n>>> fh.close()\n\n>>> B = IntegerMatrix.from_file(fn)\n>>> A == B\nTrue\n\n:param filename: name of file to read from");
static PyMethodDef __pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_75from_file = {"from_file", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_75from_file, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_74from_file};
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_75from_file(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_filename = 0;
  PyObject *__pyx_v_kwds = 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("from_file (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);
  __pyx_v_kwds = PyDict_New(); if (unlikely(!__pyx_v_kwds)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwds);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_filename,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, 1660, __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, 1660, __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, __pyx_v_kwds, values, kwd_pos_args, __pyx_kwds_len, "from_file", 1) < (0)) __PYX_ERR(0, 1660, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_file", 1, 1, 1, i); __PYX_ERR(0, 1660, __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, 1660, __pyx_L3_error)
    }
    __pyx_v_filename = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_file", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1660, __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_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.from_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_74from_file(((PyTypeObject*)__pyx_v_cls), __pyx_v_filename, __pyx_v_kwds);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_kwds);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_74from_file(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_filename, PyObject *__pyx_v_kwds) {
  PyObject *__pyx_v_A = NULL;
  PyObject *__pyx_v_fh = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_line = NULL;
  Py_ssize_t __pyx_v_ncols;
  PyObject *__pyx_v_values = NULL;
  PyObject *__pyx_v_j = NULL;
  PyObject *__pyx_v_v = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  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;
  Py_ssize_t __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  PyObject *(*__pyx_t_16)(PyObject *);
  int __pyx_t_17;
  int __pyx_t_18;
  int __pyx_t_19;
  PyObject *__pyx_t_20 = NULL;
  int __pyx_t_21;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("from_file", 0);

  /* "fpylll/fplll/integer_matrix.pyx":1679
 * 
 *         """
 *         A = cls(0, 0, **kwds)             # <<<<<<<<<<<<<<
 *         with open(filename, 'r') as fh:
 *             for i, line in enumerate(fh.readlines()):
*/
  __pyx_t_1 = PyDict_Copy(__pyx_v_kwds); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_cls), __pyx_mstate_global->__pyx_tuple[0], __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_A = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":1680
 *         """
 *         A = cls(0, 0, **kwds)
 *         with open(filename, 'r') as fh:             # <<<<<<<<<<<<<<
 *             for i, line in enumerate(fh.readlines()):
 *                 line = re.match("\[+([^\]]+) *\]", line)
*/
  /*with:*/ {
    __pyx_t_1 = NULL;
    __pyx_t_3 = 1;
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_filename, __pyx_mstate_global->__pyx_n_u_r};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_open, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1680, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1680, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1680, __pyx_L3_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = 1;
    #if CYTHON_UNPACK_METHODS
    if (likely(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_3 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__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_1)) __PYX_ERR(0, 1680, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_6 = __pyx_t_1;
    __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    /*try:*/ {
      {
        __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:*/ {
          __pyx_v_fh = __pyx_t_6;
          __pyx_t_6 = 0;

          /* "fpylll/fplll/integer_matrix.pyx":1681
 *         A = cls(0, 0, **kwds)
 *         with open(filename, 'r') as fh:
 *             for i, line in enumerate(fh.readlines()):             # <<<<<<<<<<<<<<
 *                 line = re.match("\[+([^\]]+) *\]", line)
 *                 if line is None:
*/
          __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
          __pyx_t_6 = __pyx_mstate_global->__pyx_int_0;
          __pyx_t_1 = __pyx_v_fh;
          __Pyx_INCREF(__pyx_t_1);
          __pyx_t_3 = 0;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
            __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_readlines, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1681, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
          }
          if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
            __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1);
            __pyx_t_10 = 0;
            __pyx_t_11 = NULL;
          } else {
            __pyx_t_10 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1681, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1681, __pyx_L7_error)
          }
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          for (;;) {
            if (likely(!__pyx_t_11)) {
              if (likely(PyList_CheckExact(__pyx_t_1))) {
                {
                  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, 1681, __pyx_L7_error)
                  #endif
                  if (__pyx_t_10 >= __pyx_temp) break;
                }
                __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_10, __Pyx_ReferenceSharing_OwnStrongReference);
                ++__pyx_t_10;
              } else {
                {
                  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, 1681, __pyx_L7_error)
                  #endif
                  if (__pyx_t_10 >= __pyx_temp) break;
                }
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_10));
                #else
                __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_10);
                #endif
                ++__pyx_t_10;
              }
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1681, __pyx_L7_error)
            } else {
              __pyx_t_2 = __pyx_t_11(__pyx_t_1);
              if (unlikely(!__pyx_t_2)) {
                PyObject* exc_type = PyErr_Occurred();
                if (exc_type) {
                  if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1681, __pyx_L7_error)
                  PyErr_Clear();
                }
                break;
              }
            }
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_2);
            __pyx_t_2 = 0;
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_6);
            __pyx_t_2 = __Pyx_PyLong_AddObjC(__pyx_t_6, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1681, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_6);
            __pyx_t_6 = __pyx_t_2;
            __pyx_t_2 = 0;

            /* "fpylll/fplll/integer_matrix.pyx":1682
 *         with open(filename, 'r') as fh:
 *             for i, line in enumerate(fh.readlines()):
 *                 line = re.match("\[+([^\]]+) *\]", line)             # <<<<<<<<<<<<<<
 *                 if line is None:
 *                     continue
*/
            __pyx_t_5 = NULL;
            __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_re); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1682, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_12);
            __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_match); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1682, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_13);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __pyx_t_3 = 1;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_13))) {
              __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_13);
              assert(__pyx_t_5);
              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_13);
              __Pyx_INCREF(__pyx_t_5);
              __Pyx_INCREF(__pyx__function);
              __Pyx_DECREF_SET(__pyx_t_13, __pyx__function);
              __pyx_t_3 = 0;
            }
            #endif
            {
              PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u__9, __pyx_v_line};
              __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1682, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_2);
            }
            __Pyx_DECREF_SET(__pyx_v_line, __pyx_t_2);
            __pyx_t_2 = 0;

            /* "fpylll/fplll/integer_matrix.pyx":1683
 *             for i, line in enumerate(fh.readlines()):
 *                 line = re.match("\[+([^\]]+) *\]", line)
 *                 if line is None:             # <<<<<<<<<<<<<<
 *                     continue
 *                 line = line.groups()[0]
*/
            __pyx_t_14 = (__pyx_v_line == Py_None);
            if (__pyx_t_14) {

              /* "fpylll/fplll/integer_matrix.pyx":1684
 *                 line = re.match("\[+([^\]]+) *\]", line)
 *                 if line is None:
 *                     continue             # <<<<<<<<<<<<<<
 *                 line = line.groups()[0]
 *                 line = line.strip()
*/
              goto __pyx_L13_continue;

              /* "fpylll/fplll/integer_matrix.pyx":1683
 *             for i, line in enumerate(fh.readlines()):
 *                 line = re.match("\[+([^\]]+) *\]", line)
 *                 if line is None:             # <<<<<<<<<<<<<<
 *                     continue
 *                 line = line.groups()[0]
*/
            }

            /* "fpylll/fplll/integer_matrix.pyx":1685
 *                 if line is None:
 *                     continue
 *                 line = line.groups()[0]             # <<<<<<<<<<<<<<
 *                 line = line.strip()
 *                 line = [e for e in line.split(" ") if e != '']
*/
            __pyx_t_13 = __pyx_v_line;
            __Pyx_INCREF(__pyx_t_13);
            __pyx_t_3 = 0;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_13, NULL};
              __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_groups, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1685, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_2);
            }
            __pyx_t_13 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1685, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_13);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF_SET(__pyx_v_line, __pyx_t_13);
            __pyx_t_13 = 0;

            /* "fpylll/fplll/integer_matrix.pyx":1686
 *                     continue
 *                 line = line.groups()[0]
 *                 line = line.strip()             # <<<<<<<<<<<<<<
 *                 line = [e for e in line.split(" ") if e != '']
 *                 ncols = len(line)
*/
            __pyx_t_2 = __pyx_v_line;
            __Pyx_INCREF(__pyx_t_2);
            __pyx_t_3 = 0;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
              __pyx_t_13 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_strip, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1686, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_13);
            }
            __Pyx_DECREF_SET(__pyx_v_line, __pyx_t_13);
            __pyx_t_13 = 0;

            /* "fpylll/fplll/integer_matrix.pyx":1687
 *                 line = line.groups()[0]
 *                 line = line.strip()
 *                 line = [e for e in line.split(" ") if e != '']             # <<<<<<<<<<<<<<
 *                 ncols = len(line)
 *                 values = map(int, line)
*/
            __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1687, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_13);
            __pyx_t_5 = __pyx_v_line;
            __Pyx_INCREF(__pyx_t_5);
            __pyx_t_3 = 0;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u__7};
              __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_split, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1687, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_2);
            }
            if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
              __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5);
              __pyx_t_15 = 0;
              __pyx_t_16 = NULL;
            } else {
              __pyx_t_15 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1687, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_5);
              __pyx_t_16 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1687, __pyx_L7_error)
            }
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            for (;;) {
              if (likely(!__pyx_t_16)) {
                if (likely(PyList_CheckExact(__pyx_t_5))) {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5);
                    #if !CYTHON_ASSUME_SAFE_SIZE
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1687, __pyx_L7_error)
                    #endif
                    if (__pyx_t_15 >= __pyx_temp) break;
                  }
                  __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_5, __pyx_t_15, __Pyx_ReferenceSharing_OwnStrongReference);
                  ++__pyx_t_15;
                } else {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5);
                    #if !CYTHON_ASSUME_SAFE_SIZE
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1687, __pyx_L7_error)
                    #endif
                    if (__pyx_t_15 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_15));
                  #else
                  __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_15);
                  #endif
                  ++__pyx_t_15;
                }
                if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1687, __pyx_L7_error)
              } else {
                __pyx_t_2 = __pyx_t_16(__pyx_t_5);
                if (unlikely(!__pyx_t_2)) {
                  PyObject* exc_type = PyErr_Occurred();
                  if (exc_type) {
                    if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1687, __pyx_L7_error)
                    PyErr_Clear();
                  }
                  break;
                }
              }
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_2);
              __pyx_t_2 = 0;
              __pyx_t_14 = (__Pyx_PyUnicode_Equals(__pyx_v_e, __pyx_mstate_global->__pyx_kp_u__10, Py_NE)); if (unlikely((__pyx_t_14 < 0))) __PYX_ERR(0, 1687, __pyx_L7_error)
              if (__pyx_t_14) {
                if (unlikely(__Pyx_ListComp_Append(__pyx_t_13, (PyObject*)__pyx_v_e))) __PYX_ERR(0, 1687, __pyx_L7_error)
              }
            }
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF_SET(__pyx_v_line, __pyx_t_13);
            __pyx_t_13 = 0;

            /* "fpylll/fplll/integer_matrix.pyx":1688
 *                 line = line.strip()
 *                 line = [e for e in line.split(" ") if e != '']
 *                 ncols = len(line)             # <<<<<<<<<<<<<<
 *                 values = map(int, line)
 *                 if (<IntegerMatrix>A)._type == ZT_MPZ:
*/
            __pyx_t_15 = PyObject_Length(__pyx_v_line); if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1688, __pyx_L7_error)
            __pyx_v_ncols = __pyx_t_15;

            /* "fpylll/fplll/integer_matrix.pyx":1689
 *                 line = [e for e in line.split(" ") if e != '']
 *                 ncols = len(line)
 *                 values = map(int, line)             # <<<<<<<<<<<<<<
 *                 if (<IntegerMatrix>A)._type == ZT_MPZ:
 *                     (<IntegerMatrix>A)._core.mpz.set_rows(i+1)
*/
            __pyx_t_5 = NULL;
            __pyx_t_3 = 1;
            {
              PyObject *__pyx_callargs[3] = {__pyx_t_5, ((PyObject *)(&PyLong_Type)), __pyx_v_line};
              __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_map, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
              if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1689, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_13);
            }
            __Pyx_XDECREF_SET(__pyx_v_values, __pyx_t_13);
            __pyx_t_13 = 0;

            /* "fpylll/fplll/integer_matrix.pyx":1690
 *                 ncols = len(line)
 *                 values = map(int, line)
 *                 if (<IntegerMatrix>A)._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *                     (<IntegerMatrix>A)._core.mpz.set_rows(i+1)
 *                     (<IntegerMatrix>A)._core.mpz.set_cols(ncols)
*/
            __pyx_t_14 = (((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_A)->_type == fplll::ZT_MPZ);
            if (__pyx_t_14) {

              /* "fpylll/fplll/integer_matrix.pyx":1691
 *                 values = map(int, line)
 *                 if (<IntegerMatrix>A)._type == ZT_MPZ:
 *                     (<IntegerMatrix>A)._core.mpz.set_rows(i+1)             # <<<<<<<<<<<<<<
 *                     (<IntegerMatrix>A)._core.mpz.set_cols(ncols)
 *                 elif (<IntegerMatrix>A)._type == ZT_LONG:
*/
              __pyx_t_13 = __Pyx_PyLong_AddObjC(__pyx_v_i, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1691, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_13);
              __pyx_t_17 = __Pyx_PyLong_As_int(__pyx_t_13); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1691, __pyx_L7_error)
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
              ((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_A)->_core.mpz->set_rows(__pyx_t_17);

              /* "fpylll/fplll/integer_matrix.pyx":1692
 *                 if (<IntegerMatrix>A)._type == ZT_MPZ:
 *                     (<IntegerMatrix>A)._core.mpz.set_rows(i+1)
 *                     (<IntegerMatrix>A)._core.mpz.set_cols(ncols)             # <<<<<<<<<<<<<<
 *                 elif (<IntegerMatrix>A)._type == ZT_LONG:
 *                     (<IntegerMatrix>A)._core.long.set_rows(i+1)
*/
              ((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_A)->_core.mpz->set_cols(__pyx_v_ncols);

              /* "fpylll/fplll/integer_matrix.pyx":1690
 *                 ncols = len(line)
 *                 values = map(int, line)
 *                 if (<IntegerMatrix>A)._type == ZT_MPZ:             # <<<<<<<<<<<<<<
 *                     (<IntegerMatrix>A)._core.mpz.set_rows(i+1)
 *                     (<IntegerMatrix>A)._core.mpz.set_cols(ncols)
*/
              goto __pyx_L20;
            }

            /* "fpylll/fplll/integer_matrix.pyx":1693
 *                     (<IntegerMatrix>A)._core.mpz.set_rows(i+1)
 *                     (<IntegerMatrix>A)._core.mpz.set_cols(ncols)
 *                 elif (<IntegerMatrix>A)._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *                     (<IntegerMatrix>A)._core.long.set_rows(i+1)
 *                     (<IntegerMatrix>A)._core.long.set_cols(ncols)
*/
            __pyx_t_14 = (((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_A)->_type == fplll::ZT_LONG);
            if (likely(__pyx_t_14)) {

              /* "fpylll/fplll/integer_matrix.pyx":1694
 *                     (<IntegerMatrix>A)._core.mpz.set_cols(ncols)
 *                 elif (<IntegerMatrix>A)._type == ZT_LONG:
 *                     (<IntegerMatrix>A)._core.long.set_rows(i+1)             # <<<<<<<<<<<<<<
 *                     (<IntegerMatrix>A)._core.long.set_cols(ncols)
 *                 else:
*/
              __pyx_t_13 = __Pyx_PyLong_AddObjC(__pyx_v_i, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1694, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_13);
              __pyx_t_17 = __Pyx_PyLong_As_int(__pyx_t_13); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1694, __pyx_L7_error)
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
              ((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_A)->_core.__pyx_long->set_rows(__pyx_t_17);

              /* "fpylll/fplll/integer_matrix.pyx":1695
 *                 elif (<IntegerMatrix>A)._type == ZT_LONG:
 *                     (<IntegerMatrix>A)._core.long.set_rows(i+1)
 *                     (<IntegerMatrix>A)._core.long.set_cols(ncols)             # <<<<<<<<<<<<<<
 *                 else:
 *                     raise RuntimeError("Integer type '%s' not understood."%(<IntegerMatrix>A)._type)
*/
              ((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_A)->_core.__pyx_long->set_cols(__pyx_v_ncols);

              /* "fpylll/fplll/integer_matrix.pyx":1693
 *                     (<IntegerMatrix>A)._core.mpz.set_rows(i+1)
 *                     (<IntegerMatrix>A)._core.mpz.set_cols(ncols)
 *                 elif (<IntegerMatrix>A)._type == ZT_LONG:             # <<<<<<<<<<<<<<
 *                     (<IntegerMatrix>A)._core.long.set_rows(i+1)
 *                     (<IntegerMatrix>A)._core.long.set_cols(ncols)
*/
              goto __pyx_L20;
            }

            /* "fpylll/fplll/integer_matrix.pyx":1697
 *                     (<IntegerMatrix>A)._core.long.set_cols(ncols)
 *                 else:
 *                     raise RuntimeError("Integer type '%s' not understood."%(<IntegerMatrix>A)._type)             # <<<<<<<<<<<<<<
 * 
 *                 for j, v in enumerate(values):
*/
            /*else*/ {
              __pyx_t_5 = NULL;
              __pyx_t_2 = __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_A)->_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1697, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_12 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Integer_type_s_not_understood, __pyx_t_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1697, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __pyx_t_3 = 1;
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_12};
                __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__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, 1697, __pyx_L7_error)
                __Pyx_GOTREF(__pyx_t_13);
              }
              __Pyx_Raise(__pyx_t_13, 0, 0, 0);
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
              __PYX_ERR(0, 1697, __pyx_L7_error)
            }
            __pyx_L20:;

            /* "fpylll/fplll/integer_matrix.pyx":1699
 *                     raise RuntimeError("Integer type '%s' not understood."%(<IntegerMatrix>A)._type)
 * 
 *                 for j, v in enumerate(values):             # <<<<<<<<<<<<<<
 *                     (<IntegerMatrix>A)._set(i, j, v)
 *         return A
*/
            __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
            __pyx_t_13 = __pyx_mstate_global->__pyx_int_0;
            if (likely(PyList_CheckExact(__pyx_v_values)) || PyTuple_CheckExact(__pyx_v_values)) {
              __pyx_t_12 = __pyx_v_values; __Pyx_INCREF(__pyx_t_12);
              __pyx_t_15 = 0;
              __pyx_t_16 = NULL;
            } else {
              __pyx_t_15 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1699, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_16 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_12); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1699, __pyx_L7_error)
            }
            for (;;) {
              if (likely(!__pyx_t_16)) {
                if (likely(PyList_CheckExact(__pyx_t_12))) {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_12);
                    #if !CYTHON_ASSUME_SAFE_SIZE
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1699, __pyx_L7_error)
                    #endif
                    if (__pyx_t_15 >= __pyx_temp) break;
                  }
                  __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_12, __pyx_t_15, __Pyx_ReferenceSharing_OwnStrongReference);
                  ++__pyx_t_15;
                } else {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_12);
                    #if !CYTHON_ASSUME_SAFE_SIZE
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1699, __pyx_L7_error)
                    #endif
                    if (__pyx_t_15 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_15));
                  #else
                  __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_12, __pyx_t_15);
                  #endif
                  ++__pyx_t_15;
                }
                if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1699, __pyx_L7_error)
              } else {
                __pyx_t_5 = __pyx_t_16(__pyx_t_12);
                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, 1699, __pyx_L7_error)
                    PyErr_Clear();
                  }
                  break;
                }
              }
              __Pyx_GOTREF(__pyx_t_5);
              __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_5);
              __pyx_t_5 = 0;
              __Pyx_INCREF(__pyx_t_13);
              __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_13);
              __pyx_t_5 = __Pyx_PyLong_AddObjC(__pyx_t_13, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1699, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_5);
              __Pyx_DECREF(__pyx_t_13);
              __pyx_t_13 = __pyx_t_5;
              __pyx_t_5 = 0;

              /* "fpylll/fplll/integer_matrix.pyx":1700
 * 
 *                 for j, v in enumerate(values):
 *                     (<IntegerMatrix>A)._set(i, j, v)             # <<<<<<<<<<<<<<
 *         return A
 * 
*/
              __pyx_t_17 = __Pyx_PyLong_As_int(__pyx_v_i); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1700, __pyx_L7_error)
              __pyx_t_18 = __Pyx_PyLong_As_int(__pyx_v_j); if (unlikely((__pyx_t_18 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1700, __pyx_L7_error)
              __pyx_t_19 = ((struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_A)->__pyx_vtab)->_set(((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)__pyx_v_A), __pyx_t_17, __pyx_t_18, __pyx_v_v); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 1700, __pyx_L7_error)

              /* "fpylll/fplll/integer_matrix.pyx":1699
 *                     raise RuntimeError("Integer type '%s' not understood."%(<IntegerMatrix>A)._type)
 * 
 *                 for j, v in enumerate(values):             # <<<<<<<<<<<<<<
 *                     (<IntegerMatrix>A)._set(i, j, v)
 *         return A
*/
            }
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

            /* "fpylll/fplll/integer_matrix.pyx":1681
 *         A = cls(0, 0, **kwds)
 *         with open(filename, 'r') as fh:
 *             for i, line in enumerate(fh.readlines()):             # <<<<<<<<<<<<<<
 *                 line = re.match("\[+([^\]]+) *\]", line)
 *                 if line is None:
*/
            __pyx_L13_continue:;
          }
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

          /* "fpylll/fplll/integer_matrix.pyx":1680
 *         """
 *         A = cls(0, 0, **kwds)
 *         with open(filename, 'r') as fh:             # <<<<<<<<<<<<<<
 *             for i, line in enumerate(fh.readlines()):
 *                 line = re.match("\[+([^\]]+) *\]", line)
*/
        }
        __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;
        goto __pyx_L12_try_end;
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.from_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_13) < 0) __PYX_ERR(0, 1680, __pyx_L9_except_error)
          __Pyx_XGOTREF(__pyx_t_6);
          __Pyx_XGOTREF(__pyx_t_1);
          __Pyx_XGOTREF(__pyx_t_13);
          __pyx_t_12 = PyTuple_Pack(3, __pyx_t_6, __pyx_t_1, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1680, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_20 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_12, NULL);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1680, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_20);
          __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_20);
          __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
          if (__pyx_t_14 < (0)) __PYX_ERR(0, 1680, __pyx_L9_except_error)
          __pyx_t_21 = (!__pyx_t_14);
          if (unlikely(__pyx_t_21)) {
            __Pyx_GIVEREF(__pyx_t_6);
            __Pyx_GIVEREF(__pyx_t_1);
            __Pyx_XGIVEREF(__pyx_t_13);
            __Pyx_ErrRestoreWithState(__pyx_t_6, __pyx_t_1, __pyx_t_13);
            __pyx_t_6 = 0;  __pyx_t_1 = 0;  __pyx_t_13 = 0; 
            __PYX_ERR(0, 1680, __pyx_L9_except_error)
          }
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          goto __pyx_L8_exception_handled;
        }
        __pyx_L9_except_error:;
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        goto __pyx_L1_error;
        __pyx_L8_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);
        __pyx_L12_try_end:;
      }
    }
    /*finally:*/ {
      /*normal exit:*/{
        if (__pyx_t_4) {
          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[1], NULL);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1680, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    goto __pyx_L28;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L1_error;
    __pyx_L28:;
  }

  /* "fpylll/fplll/integer_matrix.pyx":1701
 *                 for j, v in enumerate(values):
 *                     (<IntegerMatrix>A)._set(i, j, v)
 *         return A             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_A);
  __pyx_r = __pyx_v_A;
  goto __pyx_L0;

  /* "fpylll/fplll/integer_matrix.pyx":1660
 *         return tuple(r)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_file(cls, filename, **kwds):
 *         """Construct new matrix from file.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.IntegerMatrix.from_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_A);
  __Pyx_XDECREF(__pyx_v_fh);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_line);
  __Pyx_XDECREF(__pyx_v_values);
  __Pyx_XDECREF(__pyx_v_j);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "fpylll/fplll/integer_matrix.pyx":1704
 * 
 * 
 * def unpickle_IntegerMatrix(nrows, ncols, l, int_type="mpz"):             # <<<<<<<<<<<<<<
 *     """Deserialize an integer matrix.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_1unpickle_IntegerMatrix(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_6fpylll_5fplll_14integer_matrix_unpickle_IntegerMatrix, "unpickle_IntegerMatrix(nrows, ncols, l, int_type='mpz')\n\nDeserialize an integer matrix.\n\n:param nrows: number of rows\n:param ncols: number of columns\n:param l: list of entries");
static PyMethodDef __pyx_mdef_6fpylll_5fplll_14integer_matrix_1unpickle_IntegerMatrix = {"unpickle_IntegerMatrix", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_1unpickle_IntegerMatrix, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_unpickle_IntegerMatrix};
static PyObject *__pyx_pw_6fpylll_5fplll_14integer_matrix_1unpickle_IntegerMatrix(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_nrows = 0;
  PyObject *__pyx_v_ncols = 0;
  PyObject *__pyx_v_l = 0;
  PyObject *__pyx_v_int_type = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("unpickle_IntegerMatrix (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_nrows,&__pyx_mstate_global->__pyx_n_u_ncols,&__pyx_mstate_global->__pyx_n_u_l,&__pyx_mstate_global->__pyx_n_u_int_type,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, 1704, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1704, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1704, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1704, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1704, __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, "unpickle_IntegerMatrix", 0) < (0)) __PYX_ERR(0, 1704, __pyx_L3_error)
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_mpz)));
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("unpickle_IntegerMatrix", 0, 3, 4, i); __PYX_ERR(0, 1704, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1704, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1704, __pyx_L3_error)
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1704, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1704, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_mpz)));
    }
    __pyx_v_nrows = values[0];
    __pyx_v_ncols = values[1];
    __pyx_v_l = values[2];
    __pyx_v_int_type = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("unpickle_IntegerMatrix", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 1704, __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("fpylll.fplll.integer_matrix.unpickle_IntegerMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6fpylll_5fplll_14integer_matrix_unpickle_IntegerMatrix(__pyx_self, __pyx_v_nrows, __pyx_v_ncols, __pyx_v_l, __pyx_v_int_type);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6fpylll_5fplll_14integer_matrix_unpickle_IntegerMatrix(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_nrows, PyObject *__pyx_v_ncols, PyObject *__pyx_v_l, PyObject *__pyx_v_int_type) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unpickle_IntegerMatrix", 0);

  /* "fpylll/fplll/integer_matrix.pyx":1712
 * 
 *     """
 *     return IntegerMatrix.from_iterable(nrows, ncols, l, int_type=int_type)             # <<<<<<<<<<<<<<
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[4 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_v_nrows, __pyx_v_ncols, __pyx_v_l};
    __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1712, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_int_type, __pyx_v_int_type, __pyx_t_4, __pyx_callargs+4, 0) < (0)) __PYX_ERR(0, 1712, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_from_iterable, __pyx_callargs+__pyx_t_3, (4-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1712, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "fpylll/fplll/integer_matrix.pyx":1704
 * 
 * 
 * def unpickle_IntegerMatrix(nrows, ncols, l, int_type="mpz"):             # <<<<<<<<<<<<<<
 *     """Deserialize an integer matrix.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("fpylll.fplll.integer_matrix.unpickle_IntegerMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* #### Code section: module_exttypes ### */
static struct __pyx_vtabstruct_6fpylll_5fplll_14integer_matrix_IntegerMatrix __pyx_vtable_6fpylll_5fplll_14integer_matrix_IntegerMatrix;

static PyObject *__pyx_tp_new_6fpylll_5fplll_14integer_matrix_IntegerMatrix(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *p;
  PyObject *o;
  o = __Pyx_AllocateExtensionType(t, 0);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)o);
  p->__pyx_vtab = __pyx_vtabptr_6fpylll_5fplll_14integer_matrix_IntegerMatrix;
  return o;
}

static void __pyx_tp_dealloc_6fpylll_5fplll_14integer_matrix_IntegerMatrix(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6fpylll_5fplll_14integer_matrix_IntegerMatrix) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_17__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  PyTypeObject *tp = Py_TYPE(o);
  #if CYTHON_USE_TYPE_SLOTS
  (*tp->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  Py_DECREF(tp);
  #endif
}

static PyObject *__pyx_sq_item_6fpylll_5fplll_14integer_matrix_IntegerMatrix(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyLong_FromSsize_t(i); if(!x) return 0;
  #if CYTHON_USE_TYPE_SLOTS || (!CYTHON_USE_TYPE_SPECS && __PYX_LIMITED_VERSION_HEX < 0x030A0000)
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  #else
  r = ((binaryfunc)PyType_GetSlot(Py_TYPE(o), Py_mp_subscript))(o, x);
  #endif
  Py_DECREF(x);
  return r;
}

static int __pyx_mp_ass_subscript_6fpylll_5fplll_14integer_matrix_IntegerMatrix(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_29__setitem__(o, i, v);
  }
  else {
    __Pyx_TypeName o_type_name;
    o_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(o));
    PyErr_Format(PyExc_NotImplementedError,
      "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name);
    __Pyx_DECREF_TypeName(o_type_name);
    return -1;
  }
}

static CYTHON_INLINE PyObject *__pyx_nb_multiply_6fpylll_5fplll_14integer_matrix_IntegerMatrix_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right ) {
    binaryfunc slot;
#if CYTHON_USE_TYPE_SLOTS
    slot = type->tp_as_number ? type->tp_as_number->nb_multiply : NULL;
#else
    slot = (binaryfunc) PyType_GetSlot(type, Py_nb_multiply);
#endif
    return slot ? slot(left, right ) : __Pyx_NewRef(Py_NotImplemented);
}
static PyObject *__pyx_nb_multiply_6fpylll_5fplll_14integer_matrix_IntegerMatrix(PyObject *left, PyObject *right ) {
    int maybe_self_is_left, maybe_self_is_right = 0;
    maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_multiply == &__pyx_nb_multiply_6fpylll_5fplll_14integer_matrix_IntegerMatrix)
#endif
            || __Pyx_TypeCheck(left, __pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix);
    if (maybe_self_is_left) {
        PyObject *res;
        res = __pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_61__mul__(left, right);
        if (res != Py_NotImplemented) return res;
        Py_DECREF(res);
    }
    maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_multiply == &__pyx_nb_multiply_6fpylll_5fplll_14integer_matrix_IntegerMatrix)
#endif
            || PyType_IsSubtype(Py_TYPE(right), __pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix);
    if (maybe_self_is_right) {
        return __pyx_nb_multiply_6fpylll_5fplll_14integer_matrix_IntegerMatrix_maybe_call_slot(__Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, tp_base, PyTypeObject*), left, right );
    }
    return __Pyx_NewRef(Py_NotImplemented);
}



static CYTHON_INLINE PyObject *__pyx_nb_remainder_6fpylll_5fplll_14integer_matrix_IntegerMatrix_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right ) {
    binaryfunc slot;
#if CYTHON_USE_TYPE_SLOTS
    slot = type->tp_as_number ? type->tp_as_number->nb_remainder : NULL;
#else
    slot = (binaryfunc) PyType_GetSlot(type, Py_nb_remainder);
#endif
    return slot ? slot(left, right ) : __Pyx_NewRef(Py_NotImplemented);
}
static PyObject *__pyx_nb_remainder_6fpylll_5fplll_14integer_matrix_IntegerMatrix(PyObject *left, PyObject *right ) {
    int maybe_self_is_left, maybe_self_is_right = 0;
    maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_remainder == &__pyx_nb_remainder_6fpylll_5fplll_14integer_matrix_IntegerMatrix)
#endif
            || __Pyx_TypeCheck(left, __pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix);
    if (maybe_self_is_left) {
        PyObject *res;
        res = __pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_63__mod__(left, right);
        if (res != Py_NotImplemented) return res;
        Py_DECREF(res);
    }
    maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_remainder == &__pyx_nb_remainder_6fpylll_5fplll_14integer_matrix_IntegerMatrix)
#endif
            || PyType_IsSubtype(Py_TYPE(right), __pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix);
    if (maybe_self_is_right) {
        return __pyx_nb_remainder_6fpylll_5fplll_14integer_matrix_IntegerMatrix_maybe_call_slot(__Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, tp_base, PyTypeObject*), left, right );
    }
    return __Pyx_NewRef(Py_NotImplemented);
}



static PyObject *__pyx_getprop_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_int_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_8int_type_1__get__(o);
}

static PyObject *__pyx_getprop_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_nrows(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_5nrows_1__get__(o);
}

static PyObject *__pyx_getprop_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_ncols(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_5ncols_1__get__(o);
}

static PyMethodDef __pyx_methods_6fpylll_5fplll_14integer_matrix_IntegerMatrix[] = {
  {"from_matrix", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_3from_matrix, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_2from_matrix},
  {"from_iterable", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_5from_iterable, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_4from_iterable},
  {"identity", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_7identity, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_6identity},
  {"random", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_9random, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_8random},
  {"set_matrix", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_11set_matrix, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_10set_matrix},
  {"set_iterable", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_13set_iterable, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_12set_iterable},
  {"to_matrix", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_15to_matrix, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_14to_matrix},
  {"__copy__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_23__copy__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_22__copy__},
  {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_25__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_24__reduce__},
  {"randomize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_31randomize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_30randomize},
  {"gen_identity", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_33gen_identity, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_32gen_identity},
  {"clear", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_35clear, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_34clear},
  {"is_empty", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_37is_empty, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_36is_empty},
  {"resize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_39resize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_38resize},
  {"set_rows", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_41set_rows, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_40set_rows},
  {"set_cols", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_43set_cols, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_42set_cols},
  {"swap_rows", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_45swap_rows, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_44swap_rows},
  {"rotate_left", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_47rotate_left, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_46rotate_left},
  {"rotate_right", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_49rotate_right, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_48rotate_right},
  {"rotate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_51rotate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_50rotate},
  {"rotate_gram_left", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_53rotate_gram_left, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_52rotate_gram_left},
  {"rotate_gram_right", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_55rotate_gram_right, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_54rotate_gram_right},
  {"transpose", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_57transpose, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_56transpose},
  {"get_max_exp", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_59get_max_exp, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_58get_max_exp},
  {"__mul__", (PyCFunction)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_61__mul__, METH_O|METH_COEXIST, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_60__mul__},
  {"__mod__", (PyCFunction)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_63__mod__, METH_O|METH_COEXIST, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_62__mod__},
  {"mod", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_65mod, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_64mod},
  {"apply_transform", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_69apply_transform, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_68apply_transform},
  {"submatrix", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_71submatrix, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_70submatrix},
  {"multiply_left", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_73multiply_left, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_72multiply_left},
  {"from_file", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_75from_file, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_74from_file},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6fpylll_5fplll_14integer_matrix_IntegerMatrix[] = {
  {"int_type", __pyx_getprop_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_int_type, 0, PyDoc_STR("\n        "), 0},
  {"nrows", __pyx_getprop_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_nrows, 0, PyDoc_STR("Number of Rows\n\n        :returns: number of rows\n\n        >>> from fpylll import IntegerMatrix\n        >>> IntegerMatrix(10, 10).nrows\n        10\n\n        "), 0},
  {"ncols", __pyx_getprop_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_ncols, 0, PyDoc_STR("Number of Columns\n\n        :returns: number of columns\n\n        >>> from fpylll import IntegerMatrix\n        >>> IntegerMatrix(10, 10).ncols\n        10\n\n        "), 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6fpylll_5fplll_14integer_matrix_IntegerMatrix_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6fpylll_5fplll_14integer_matrix_IntegerMatrix},
  {Py_tp_repr, (void *)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_19__repr__},
  {Py_nb_multiply, (void *)__pyx_nb_multiply_6fpylll_5fplll_14integer_matrix_IntegerMatrix},
  {Py_nb_remainder, (void *)__pyx_nb_remainder_6fpylll_5fplll_14integer_matrix_IntegerMatrix},
  {Py_sq_item, (void *)__pyx_sq_item_6fpylll_5fplll_14integer_matrix_IntegerMatrix},
  {Py_mp_subscript, (void *)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_27__getitem__},
  {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_6fpylll_5fplll_14integer_matrix_IntegerMatrix},
  {Py_tp_str, (void *)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_21__str__},
  {Py_tp_doc, (void *)PyDoc_STR("IntegerMatrix(arg0, arg1=None, int_type='mpz')\n\nDense matrices over the Integers.")},
  {Py_tp_richcompare, (void *)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_67__richcmp__},
  {Py_tp_methods, (void *)__pyx_methods_6fpylll_5fplll_14integer_matrix_IntegerMatrix},
  {Py_tp_getset, (void *)__pyx_getsets_6fpylll_5fplll_14integer_matrix_IntegerMatrix},
  {Py_tp_init, (void *)__pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6fpylll_5fplll_14integer_matrix_IntegerMatrix},
  {0, 0},
};
static PyType_Spec __pyx_type_6fpylll_5fplll_14integer_matrix_IntegerMatrix_spec = {
  "fpylll.fplll.integer_matrix.IntegerMatrix",
  sizeof(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_6fpylll_5fplll_14integer_matrix_IntegerMatrix_slots,
};
#else

static PyNumberMethods __pyx_tp_as_number_IntegerMatrix = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  __pyx_nb_multiply_6fpylll_5fplll_14integer_matrix_IntegerMatrix, /*nb_multiply*/
  __pyx_nb_remainder_6fpylll_5fplll_14integer_matrix_IntegerMatrix, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_bool*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  0, /*nb_int*/
  0, /*nb_long (reserved)*/
  0, /*nb_float*/
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  0, /*nb_matrix_multiply*/
  0, /*nb_inplace_matrix_multiply*/
};

static PySequenceMethods __pyx_tp_as_sequence_IntegerMatrix = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_6fpylll_5fplll_14integer_matrix_IntegerMatrix, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_IntegerMatrix = {
  0, /*mp_length*/
  __pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_27__getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_6fpylll_5fplll_14integer_matrix_IntegerMatrix, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_6fpylll_5fplll_14integer_matrix_IntegerMatrix = {
  PyVarObject_HEAD_INIT(0, 0)
  "fpylll.fplll.integer_matrix.""IntegerMatrix", /*tp_name*/
  sizeof(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6fpylll_5fplll_14integer_matrix_IntegerMatrix, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  __pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_19__repr__, /*tp_repr*/
  &__pyx_tp_as_number_IntegerMatrix, /*tp_as_number*/
  &__pyx_tp_as_sequence_IntegerMatrix, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_IntegerMatrix, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_21__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("IntegerMatrix(arg0, arg1=None, int_type='mpz')\n\nDense matrices over the Integers."), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  __pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_67__richcmp__, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6fpylll_5fplll_14integer_matrix_IntegerMatrix, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6fpylll_5fplll_14integer_matrix_IntegerMatrix, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6fpylll_5fplll_14integer_matrix_IntegerMatrix, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *p;
  PyObject *o;
  o = __Pyx_AllocateExtensionType(t, 0);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *)o);
  p->m = ((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow(PyObject *o) {
  struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *p = (struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->m);
  PyTypeObject *tp = Py_TYPE(o);
  #if CYTHON_USE_TYPE_SLOTS
  (*tp->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  Py_DECREF(tp);
  #endif
}

static int __pyx_tp_traverse_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *p = (struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *)o;
  {
    e = __Pyx_call_type_traverse(o, 1, v, a);
    if (e) return e;
  }
  if (p->m) {
    e = (*v)(((PyObject *)p->m), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *p = (struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow *)o;
  tmp = ((PyObject*)p->m);
  p->m = ((struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_sq_item_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyLong_FromSsize_t(i); if(!x) return 0;
  #if CYTHON_USE_TYPE_SLOTS || (!CYTHON_USE_TYPE_SPECS && __PYX_LIMITED_VERSION_HEX < 0x030A0000)
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  #else
  r = ((binaryfunc)PyType_GetSlot(Py_TYPE(o), Py_mp_subscript))(o, x);
  #endif
  Py_DECREF(x);
  return r;
}

static PyMethodDef __pyx_methods_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow[] = {
  {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_9__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_8__reduce__},
  {"is_zero", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_15is_zero, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_14is_zero},
  {"size_nz", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_17size_nz, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_16size_nz},
  {"addmul", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_23addmul, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_22addmul},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow},
  {Py_tp_repr, (void *)__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_7__repr__},
  {Py_nb_absolute, (void *)__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_11__abs__},
  {Py_nb_inplace_add, (void *)__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_19__iadd__},
  {Py_nb_inplace_subtract, (void *)__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_21__isub__},
  {Py_sq_length, (void *)__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_13__len__},
  {Py_sq_item, (void *)__pyx_sq_item_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow},
  {Py_mp_length, (void *)__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_13__len__},
  {Py_mp_subscript, (void *)__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_3__getitem__},
  {Py_tp_str, (void *)__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_5__str__},
  {Py_tp_doc, (void *)PyDoc_STR("IntegerMatrixRow(IntegerMatrix M, int row)\n\nA reference to a row in an integer matrix.")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow},
  {Py_tp_clear, (void *)__pyx_tp_clear_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow},
  {Py_tp_methods, (void *)__pyx_methods_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow},
  {Py_tp_init, (void *)__pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow},
  {0, 0},
};
static PyType_Spec __pyx_type_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow_spec = {
  "fpylll.fplll.integer_matrix.IntegerMatrixRow",
  sizeof(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow_slots,
};
#else

static PyNumberMethods __pyx_tp_as_number_IntegerMatrixRow = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  __pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_11__abs__, /*nb_absolute*/
  0, /*nb_bool*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  0, /*nb_int*/
  0, /*nb_long (reserved)*/
  0, /*nb_float*/
  __pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_19__iadd__, /*nb_inplace_add*/
  __pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_21__isub__, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  0, /*nb_matrix_multiply*/
  0, /*nb_inplace_matrix_multiply*/
};

static PySequenceMethods __pyx_tp_as_sequence_IntegerMatrixRow = {
  __pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_13__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_IntegerMatrixRow = {
  __pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_13__len__, /*mp_length*/
  __pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_3__getitem__, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow = {
  PyVarObject_HEAD_INIT(0, 0)
  "fpylll.fplll.integer_matrix.""IntegerMatrixRow", /*tp_name*/
  sizeof(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  __pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_7__repr__, /*tp_repr*/
  &__pyx_tp_as_number_IntegerMatrixRow, /*tp_as_number*/
  &__pyx_tp_as_sequence_IntegerMatrixRow, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_IntegerMatrixRow, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_5__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("IntegerMatrixRow(IntegerMatrix M, int row)\n\nA reference to a row in an integer matrix."), /*tp_doc*/
  __pyx_tp_traverse_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow, /*tp_traverse*/
  __pyx_tp_clear_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};
/* #### Code section: initfunc_declarations ### */
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/
/* #### Code section: init_module ### */

static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  __pyx_vtabptr_6fpylll_5fplll_14integer_matrix_IntegerMatrix = &__pyx_vtable_6fpylll_5fplll_14integer_matrix_IntegerMatrix;
  __pyx_vtable_6fpylll_5fplll_14integer_matrix_IntegerMatrix._nrows = (long (*)(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *))__pyx_f_6fpylll_5fplll_14integer_matrix_13IntegerMatrix__nrows;
  __pyx_vtable_6fpylll_5fplll_14integer_matrix_IntegerMatrix._ncols = (long (*)(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *))__pyx_f_6fpylll_5fplll_14integer_matrix_13IntegerMatrix__ncols;
  __pyx_vtable_6fpylll_5fplll_14integer_matrix_IntegerMatrix._get = (PyObject *(*)(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *, int, int))__pyx_f_6fpylll_5fplll_14integer_matrix_13IntegerMatrix__get;
  __pyx_vtable_6fpylll_5fplll_14integer_matrix_IntegerMatrix._set = (int (*)(struct __pyx_obj_6fpylll_5fplll_14integer_matrix_IntegerMatrix *, int, int, PyObject *))__pyx_f_6fpylll_5fplll_14integer_matrix_13IntegerMatrix__set;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6fpylll_5fplll_14integer_matrix_IntegerMatrix_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix)) __PYX_ERR(0, 293, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6fpylll_5fplll_14integer_matrix_IntegerMatrix_spec, __pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix) < (0)) __PYX_ERR(0, 293, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix = &__pyx_type_6fpylll_5fplll_14integer_matrix_IntegerMatrix;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix) < (0)) __PYX_ERR(0, 293, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix->tp_dictoffset && __pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 293, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_13IntegerMatrix___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_13IntegerMatrix___init__.doc = __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix___init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_13IntegerMatrix___init__;
    }
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 293, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_18__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_18__repr__.doc = __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_18__repr__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_18__repr__;
    }
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 293, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_20__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_20__str__.doc = __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_20__str__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_20__str__;
    }
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 293, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_26__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_26__getitem__.doc = __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_26__getitem__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_26__getitem__;
    }
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, "__setitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 293, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_28__setitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_28__setitem__.doc = __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_28__setitem__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_28__setitem__;
    }
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, "__mul__"); if (unlikely(!wrapper)) __PYX_ERR(0, 293, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_60__mul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_60__mul__.doc = __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_60__mul__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_60__mul__;
    }
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, "__mod__"); if (unlikely(!wrapper)) __PYX_ERR(0, 293, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_62__mod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_62__mod__.doc = __pyx_doc_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_62__mod__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_62__mod__;
    }
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_vtabptr_6fpylll_5fplll_14integer_matrix_IntegerMatrix) < (0)) __PYX_ERR(0, 293, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix) < (0)) __PYX_ERR(0, 293, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_IntegerMatrix_2, (PyObject *) __pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix) < (0)) __PYX_ERR(0, 293, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow)) __PYX_ERR(0, 27, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow_spec, __pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow) < (0)) __PYX_ERR(0, 27, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow = &__pyx_type_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow) < (0)) __PYX_ERR(0, 27, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow->tp_dictoffset && __pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 27, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow___init__.doc = __pyx_doc_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow___init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow___init__;
    }
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 27, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_2__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_2__getitem__.doc = __pyx_doc_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_2__getitem__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_2__getitem__;
    }
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 27, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_4__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_4__str__.doc = __pyx_doc_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_4__str__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_4__str__;
    }
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 27, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_6__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_6__repr__.doc = __pyx_doc_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_6__repr__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_6__repr__;
    }
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow, "__abs__"); if (unlikely(!wrapper)) __PYX_ERR(0, 27, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_10__abs__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_10__abs__.doc = __pyx_doc_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_10__abs__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_10__abs__;
    }
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow, "__len__"); if (unlikely(!wrapper)) __PYX_ERR(0, 27, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_12__len__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_12__len__.doc = __pyx_doc_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_12__len__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_12__len__;
    }
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow, "__iadd__"); if (unlikely(!wrapper)) __PYX_ERR(0, 27, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_18__iadd__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_18__iadd__.doc = __pyx_doc_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_18__iadd__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_18__iadd__;
    }
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow, "__isub__"); if (unlikely(!wrapper)) __PYX_ERR(0, 27, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_20__isub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_20__isub__.doc = __pyx_doc_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_20__isub__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_20__isub__;
    }
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_IntegerMatrixRow, (PyObject *) __pyx_mstate->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow) < (0)) __PYX_ERR(0, 27, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_2_4(__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_4(PyTypeObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  0, 0,
  #else
  sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyHeapTypeObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_4type_type) __PYX_ERR(2, 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(3, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType_3_2_4(__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_4(PyLongObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  0, 0,
  #else
  sizeof(PyLongObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyLongObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_4bool_bool) __PYX_ERR(3, 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(4, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType_3_2_4(__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_4(PyComplexObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  0, 0,
  #else
  sizeof(PyComplexObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_4(PyComplexObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_4); if (!__pyx_mstate->__pyx_ptype_7cpython_7complex_complex) __PYX_ERR(4, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_mstate_global->__pyx_ptype_7cpython_11longintrepr_py_long = &PyLong_Type;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  {
    __pyx_t_1 = PyImport_ImportModule("cysignals.signals"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    const char * __pyx_import_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_cysigs_t_cysigs);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (unlikely(!__pyx_import_signature)) __PYX_ERR(0, 1, __pyx_L1_error)
    #endif
    const char * __pyx_import_name = __pyx_import_signature + 9;
    void **const __pyx_import_pointers[] = {(void **)&__pyx_vp_9cysignals_7signals_cysigs, (void **) NULL};
    void **const *__pyx_import_pointer = __pyx_import_pointers;
    const char *__pyx_import_current_signature = __pyx_import_signature;
    while (*__pyx_import_pointer) {
      if (__Pyx_ImportVoidPtr_3_2_4(__pyx_t_1, __pyx_import_name, *__pyx_import_pointer, __pyx_import_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
      ++__pyx_import_pointer;
      __pyx_import_name = strchr(__pyx_import_name, '\0') + 1;
      __pyx_import_signature = strchr(__pyx_import_signature, '\0') + 1;
      if (*__pyx_import_signature != '\0') __pyx_import_current_signature = __pyx_import_signature;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  {
    __pyx_t_1 = PyImport_ImportModule("cysignals.signals"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    const char * __pyx_import_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_void_char_const_int_void_int_voi);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (unlikely(!__pyx_import_signature)) __PYX_ERR(0, 1, __pyx_L1_error)
    #endif
    const char * __pyx_import_name = __pyx_import_signature + 51;
    void (**const __pyx_import_pointers[])(void) = {(void (**)(void))&_sig_off_warning, (void (**)(void))&_do_raise_exception, (void (**)(void))&_sig_on_interrupt_received, (void (**)(void))&_sig_on_recover, (void (**)(void))&print_backtrace, (void (**)(void))&__pyx_f_9cysignals_7signals_verify_exc_value, (void (**)(void)) NULL};
    void (**const *__pyx_import_pointer)(void) = __pyx_import_pointers;
    const char *__pyx_import_current_signature = __pyx_import_signature;
    while (*__pyx_import_pointer) {
      if (__Pyx_ImportFunction_3_2_4(__pyx_t_1, __pyx_import_name, *__pyx_import_pointer, __pyx_import_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
      ++__pyx_import_pointer;
      __pyx_import_name = strchr(__pyx_import_name, '\0') + 1;
      __pyx_import_signature = strchr(__pyx_import_signature, '\0') + 1;
      if (*__pyx_import_signature != '\0') __pyx_import_current_signature = __pyx_import_signature;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  {
    __pyx_t_1 = PyImport_ImportModule("fpylll.util"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    const char * __pyx_import_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_PyObject_PyObject_int_int_int_in);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (unlikely(!__pyx_import_signature)) __PYX_ERR(0, 1, __pyx_L1_error)
    #endif
    const char * __pyx_import_name = __pyx_import_signature + 52;
    void (**const __pyx_import_pointers[])(void) = {(void (**)(void))&__pyx_f_6fpylll_4util_check_int_type, (void (**)(void))&__pyx_f_6fpylll_4util_preprocess_indices, (void (**)(void)) NULL};
    void (**const *__pyx_import_pointer)(void) = __pyx_import_pointers;
    const char *__pyx_import_current_signature = __pyx_import_signature;
    while (*__pyx_import_pointer) {
      if (__Pyx_ImportFunction_3_2_4(__pyx_t_1, __pyx_import_name, *__pyx_import_pointer, __pyx_import_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
      ++__pyx_import_pointer;
      __pyx_import_name = strchr(__pyx_import_name, '\0') + 1;
      __pyx_import_signature = strchr(__pyx_import_signature, '\0') + 1;
      if (*__pyx_import_signature != '\0') __pyx_import_current_signature = __pyx_import_signature;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  {
    __pyx_t_1 = PyImport_ImportModule("fpylll.io"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    const char * __pyx_import_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_PyObject_mpz_srcptr_int___mpz_st);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (unlikely(!__pyx_import_signature)) __PYX_ERR(0, 1, __pyx_L1_error)
    #endif
    const char * __pyx_import_name = __pyx_import_signature + 96;
    void (**const __pyx_import_pointers[])(void) = {(void (**)(void))&__pyx_f_6fpylll_2io_mpz_get_python, (void (**)(void))&__pyx_f_6fpylll_2io_assign_mpz, (void (**)(void))&__pyx_f_6fpylll_2io_assign_Z_NR_mpz, (void (**)(void)) NULL};
    void (**const *__pyx_import_pointer)(void) = __pyx_import_pointers;
    const char *__pyx_import_current_signature = __pyx_import_signature;
    while (*__pyx_import_pointer) {
      if (__Pyx_ImportFunction_3_2_4(__pyx_t_1, __pyx_import_name, *__pyx_import_pointer, __pyx_import_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
      ++__pyx_import_pointer;
      __pyx_import_name = strchr(__pyx_import_name, '\0') + 1;
      __pyx_import_signature = strchr(__pyx_import_signature, '\0') + 1;
      if (*__pyx_import_signature != '\0') __pyx_import_current_signature = __pyx_import_signature;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  {
    __pyx_t_1 = PyImport_ImportModule("fpylll.gmp.pylong"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    const char * __pyx_import_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_PyObject_mpz_srcptr_mpz_get_pyin);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (unlikely(!__pyx_import_signature)) __PYX_ERR(0, 1, __pyx_L1_error)
    #endif
    const char * __pyx_import_name = __pyx_import_signature + 23;
    void (**const __pyx_import_pointers[])(void) = {(void (**)(void))&__pyx_f_6fpylll_3gmp_6pylong_mpz_get_pyintlong, (void (**)(void)) NULL};
    void (**const *__pyx_import_pointer)(void) = __pyx_import_pointers;
    const char *__pyx_import_current_signature = __pyx_import_signature;
    while (*__pyx_import_pointer) {
      if (__Pyx_ImportFunction_3_2_4(__pyx_t_1, __pyx_import_name, *__pyx_import_pointer, __pyx_import_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
      ++__pyx_import_pointer;
      __pyx_import_name = strchr(__pyx_import_name, '\0') + 1;
      __pyx_import_signature = strchr(__pyx_import_signature, '\0') + 1;
      if (*__pyx_import_signature != '\0') __pyx_import_current_signature = __pyx_import_signature;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec_integer_matrix(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_integer_matrix},
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  {Py_mod_gil, __Pyx_FREETHREADING_COMPATIBLE},
  #endif
  #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE
  {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED},
  #endif
  {0, NULL}
};
#endif

#ifdef __cplusplus
namespace {
  struct PyModuleDef __pyx_moduledef =
  #else
  static struct PyModuleDef __pyx_moduledef =
  #endif
  {
      PyModuleDef_HEAD_INIT,
      "integer_matrix",
      __pyx_k_Dense_matrices_over_the_Integer, /* 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_integer_matrix(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_integer_matrix(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_integer_matrix(PyObject *__pyx_pyinit_module)
#endif
{
  int stringtab_initialized = 0;
  #if CYTHON_USE_MODULE_STATE
  int pystate_addmodule_run = 0;
  #endif
  __pyx_mstatetype *__pyx_mstate = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  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 'integer_matrix' 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 "integer_matrix" 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_integer_matrix", 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_fpylll__fplll__integer_matrix) {
    if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "fpylll.fplll.integer_matrix")) {
      if (unlikely((PyDict_SetItemString(modules, "fpylll.fplll.integer_matrix", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code(__pyx_mstate);
  (void)__Pyx_modinit_variable_export_code(__pyx_mstate);
  (void)__Pyx_modinit_function_export_code(__pyx_mstate);
  if (unlikely((__Pyx_modinit_type_init_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely((__Pyx_modinit_type_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely((__Pyx_modinit_variable_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely((__Pyx_modinit_function_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Execution code ---*/

  /* "fpylll/fplll/integer_matrix.pyx":20
 * from .fplll cimport IntType, ZT_MPZ, ZT_LONG, ZZ_mat
 * 
 * import re             # <<<<<<<<<<<<<<
 * from math import log10, ceil, sqrt, floor
 * 
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_re, 0, 0, __pyx_mstate_global->__pyx_kp_u_fpylll_fplll_re, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __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_re, __pyx_t_2) < (0)) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":21
 * 
 * import re
 * from math import log10, ceil, sqrt, floor             # <<<<<<<<<<<<<<
 * 
 * from .decl cimport z_long, z_mpz
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_log10,__pyx_mstate_global->__pyx_n_u_ceil,__pyx_mstate_global->__pyx_n_u_sqrt,__pyx_mstate_global->__pyx_n_u_floor};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_math, __pyx_imported_names, 4, __pyx_mstate_global->__pyx_kp_u_fpylll_fplll_math, -1); 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_log10,__pyx_mstate_global->__pyx_n_u_ceil,__pyx_mstate_global->__pyx_n_u_sqrt,__pyx_mstate_global->__pyx_n_u_floor};
    for (__pyx_t_3=0; __pyx_t_3 < 4; __pyx_t_3++) {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 21, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 21, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":103
 *         return "row %d of %r"%(self.row, self.m)
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Make sure attempts at pickling raise an error until proper pickling is implemented.
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_9__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntegerMatrixRow___reduce, NULL, __pyx_mstate_global->__pyx_n_u_fpylll_fplll_integer_matrix, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_2) < (0)) __PYX_ERR(0, 103, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":137
 *             raise RuntimeError("Integer type '%s' not understood."%self._m._type)
 * 
 *     norm = __abs__             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
*/
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject*)__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow, __pyx_mstate_global->__pyx_n_u_abs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow, __pyx_mstate_global->__pyx_n_u_norm, __pyx_t_2) < (0)) __PYX_ERR(0, 137, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":157
 *             raise RuntimeError("Integer type '%s' not understood."%self.m._type)
 * 
 *     def is_zero(self, int frm=0):             # <<<<<<<<<<<<<<
 *         """
 *         Return ``True`` if this vector consists of only zeros starting at index ``frm``
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_15is_zero, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntegerMatrixRow_is_zero, NULL, __pyx_mstate_global->__pyx_n_u_fpylll_fplll_integer_matrix, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[2]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow, __pyx_mstate_global->__pyx_n_u_is_zero, __pyx_t_2) < (0)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":177
 *             raise RuntimeError("Integer type '%s' not understood."%self.m._type)
 * 
 *     def size_nz(self):             # <<<<<<<<<<<<<<
 *         """
 *         Index at which an all zero vector starts.
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_17size_nz, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntegerMatrixRow_size_nz, NULL, __pyx_mstate_global->__pyx_n_u_fpylll_fplll_integer_matrix, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow, __pyx_mstate_global->__pyx_n_u_size_nz, __pyx_t_2) < (0)) __PYX_ERR(0, 177, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":252
 *         return self
 * 
 *     def addmul(self, IntegerMatrixRow v, x=1, int expo=0):             # <<<<<<<<<<<<<<
 *         """In-place add row vector ``2^expo  x  v``
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6fpylll_5fplll_14integer_matrix_16IntegerMatrixRow_23addmul, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntegerMatrixRow_addmul, NULL, __pyx_mstate_global->__pyx_n_u_fpylll_fplll_integer_matrix, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[3]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrixRow, __pyx_mstate_global->__pyx_n_u_addmul, __pyx_t_2) < (0)) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":363
 *             raise TypeError("Parameters arg0 and arg1 not understood")
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_matrix(cls, A, nrows=None, ncols=None, **kwds):
 *         """Construct a new integer matrix from matrix-like object A
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_3from_matrix, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntegerMatrix_from_matrix, NULL, __pyx_mstate_global->__pyx_n_u_fpylll_fplll_integer_matrix, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[4]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_from_matrix, __pyx_t_2) < (0)) __PYX_ERR(0, 363, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject*)__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_from_matrix); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_from_matrix, __pyx_t_4) < (0)) __PYX_ERR(0, 363, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":413
 *         return B
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_iterable(cls, nrows, ncols, it, **kwds):
 *         """Construct a new integer matrix from matrix-like object A
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_5from_iterable, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntegerMatrix_from_iterable, NULL, __pyx_mstate_global->__pyx_n_u_fpylll_fplll_integer_matrix, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_from_iterable, __pyx_t_4) < (0)) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GetNameInClass(__pyx_t_4, (PyObject*)__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_from_iterable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_from_iterable, __pyx_t_2) < (0)) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":431
 *         return A
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def identity(cls, nrows, int_type="mpz"):
 *         """Construct a new identity matrix of dimension ``nrows  nrows``
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_7identity, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntegerMatrix_identity, NULL, __pyx_mstate_global->__pyx_n_u_fpylll_fplll_integer_matrix, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[5]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_identity, __pyx_t_2) < (0)) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject*)__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_identity); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_identity, __pyx_t_4) < (0)) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":449
 *         return A
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def random(cls, d, algorithm, int_type="mpz", **kwds):
 *         """
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_9random, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntegerMatrix_random, NULL, __pyx_mstate_global->__pyx_n_u_fpylll_fplll_integer_matrix, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[5]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_random, __pyx_t_4) < (0)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GetNameInClass(__pyx_t_4, (PyObject*)__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_random); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_random, __pyx_t_2) < (0)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":630
 *         return A
 * 
 *     def set_matrix(self, A):             # <<<<<<<<<<<<<<
 *         """Set this matrix from matrix-like object A.
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_11set_matrix, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntegerMatrix_set_matrix, NULL, __pyx_mstate_global->__pyx_n_u_fpylll_fplll_integer_matrix, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_set_matrix, __pyx_t_2) < (0)) __PYX_ERR(0, 630, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":670
 *                     self._set(i, j, A[i][j])
 * 
 *     def set_iterable(self, A):             # <<<<<<<<<<<<<<
 *         """Set this matrix from iterable A
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_13set_iterable, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntegerMatrix_set_iterable, NULL, __pyx_mstate_global->__pyx_n_u_fpylll_fplll_integer_matrix, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_set_iterable, __pyx_t_2) < (0)) __PYX_ERR(0, 670, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":705
 *                 self._set(i, j, next(it))
 * 
 *     def to_matrix(self, A):             # <<<<<<<<<<<<<<
 *         """Write this matrix to matrix-like object A
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_15to_matrix, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntegerMatrix_to_matrix, NULL, __pyx_mstate_global->__pyx_n_u_fpylll_fplll_integer_matrix, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_to_matrix, __pyx_t_2) < (0)) __PYX_ERR(0, 705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":791
 *         raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def __copy__(self):             # <<<<<<<<<<<<<<
 *         """Copy this matrix.
 *         """
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_23__copy__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntegerMatrix___copy, NULL, __pyx_mstate_global->__pyx_n_u_fpylll_fplll_integer_matrix, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_copy, __pyx_t_2) < (0)) __PYX_ERR(0, 791, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":801
 *         return A
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         """Serialize this matrix
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_25__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntegerMatrix___reduce, NULL, __pyx_mstate_global->__pyx_n_u_fpylll_fplll_integer_matrix, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_2) < (0)) __PYX_ERR(0, 801, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":974
 *             raise ValueError("Parameter '%s' not understood."%key)
 * 
 *     def randomize(self, algorithm, **kwds):             # <<<<<<<<<<<<<<
 *         """Randomize this matrix using ``algorithm``.
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_31randomize, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntegerMatrix_randomize, NULL, __pyx_mstate_global->__pyx_n_u_fpylll_fplll_integer_matrix, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_randomize, __pyx_t_2) < (0)) __PYX_ERR(0, 974, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":1112
 *             raise ValueError("Algorithm '%s' unknown."%algorithm)
 * 
 *     def gen_identity(self, int nrows=-1):             # <<<<<<<<<<<<<<
 *         """Generate identity matrix.
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_33gen_identity, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntegerMatrix_gen_identity, NULL, __pyx_mstate_global->__pyx_n_u_fpylll_fplll_integer_matrix, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[6]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_gen_identity, __pyx_t_2) < (0)) __PYX_ERR(0, 1112, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":1129
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def clear(self):             # <<<<<<<<<<<<<<
 *         """
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_35clear, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntegerMatrix_clear, NULL, __pyx_mstate_global->__pyx_n_u_fpylll_fplll_integer_matrix, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_clear, __pyx_t_2) < (0)) __PYX_ERR(0, 1129, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":1141
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def is_empty(self):             # <<<<<<<<<<<<<<
 *         """
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_37is_empty, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntegerMatrix_is_empty, NULL, __pyx_mstate_global->__pyx_n_u_fpylll_fplll_integer_matrix, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_is_empty, __pyx_t_2) < (0)) __PYX_ERR(0, 1141, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":1153
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def resize(self, int rows, int cols):             # <<<<<<<<<<<<<<
 *         """
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_39resize, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntegerMatrix_resize, NULL, __pyx_mstate_global->__pyx_n_u_fpylll_fplll_integer_matrix, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[17])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_resize, __pyx_t_2) < (0)) __PYX_ERR(0, 1153, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":1167
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def set_rows(self, int rows):             # <<<<<<<<<<<<<<
 *         """
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_41set_rows, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntegerMatrix_set_rows, NULL, __pyx_mstate_global->__pyx_n_u_fpylll_fplll_integer_matrix, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[18])); 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
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_set_rows, __pyx_t_2) < (0)) __PYX_ERR(0, 1167, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":1180
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def set_cols(self, int cols):             # <<<<<<<<<<<<<<
 *         """
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_43set_cols, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntegerMatrix_set_cols, NULL, __pyx_mstate_global->__pyx_n_u_fpylll_fplll_integer_matrix, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_set_cols, __pyx_t_2) < (0)) __PYX_ERR(0, 1180, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":1193
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def swap_rows(self, int r1, int r2):             # <<<<<<<<<<<<<<
 *         """
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_45swap_rows, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntegerMatrix_swap_rows, NULL, __pyx_mstate_global->__pyx_n_u_fpylll_fplll_integer_matrix, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_swap_rows, __pyx_t_2) < (0)) __PYX_ERR(0, 1193, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":1214
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def rotate_left(self, int first, int last):             # <<<<<<<<<<<<<<
 *         """Row permutation.
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_47rotate_left, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntegerMatrix_rotate_left, NULL, __pyx_mstate_global->__pyx_n_u_fpylll_fplll_integer_matrix, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[21])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_rotate_left, __pyx_t_2) < (0)) __PYX_ERR(0, 1214, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":1232
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def rotate_right(self, int first, int last):             # <<<<<<<<<<<<<<
 *         """Row permutation.
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_49rotate_right, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntegerMatrix_rotate_right, NULL, __pyx_mstate_global->__pyx_n_u_fpylll_fplll_integer_matrix, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[22])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_rotate_right, __pyx_t_2) < (0)) __PYX_ERR(0, 1232, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":1250
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def rotate(self, int first, int middle, int last):             # <<<<<<<<<<<<<<
 *         """
 *         Rotates the order of the elements in the range [first,last), in such a way that the element
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_51rotate, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntegerMatrix_rotate, NULL, __pyx_mstate_global->__pyx_n_u_fpylll_fplll_integer_matrix, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_rotate, __pyx_t_2) < (0)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":1284
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def rotate_gram_left(self, int first, int last, int n_valid_rows):             # <<<<<<<<<<<<<<
 *         """
 *         Transformation needed to update the lower triangular Gram matrix when
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_53rotate_gram_left, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntegerMatrix_rotate_gram_left, NULL, __pyx_mstate_global->__pyx_n_u_fpylll_fplll_integer_matrix, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[24])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_rotate_gram_left, __pyx_t_2) < (0)) __PYX_ERR(0, 1284, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":1303
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def rotate_gram_right(self, int first, int last, int n_valid_rows):             # <<<<<<<<<<<<<<
 *         """
 *         Transformation needed to update the lower triangular Gram matrix when
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_55rotate_gram_right, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntegerMatrix_rotate_gram_right, NULL, __pyx_mstate_global->__pyx_n_u_fpylll_fplll_integer_matrix, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[25])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_rotate_gram_right, __pyx_t_2) < (0)) __PYX_ERR(0, 1303, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":1322
 *             raise RuntimeError("Integer type '%s' not understood."%self._type)
 * 
 *     def transpose(self):             # <<<<<<<<<<<<<<
 *         """
 *         Inline transpose.
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_57transpose, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntegerMatrix_transpose, NULL, __pyx_mstate_global->__pyx_n_u_fpylll_fplll_integer_matrix, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[26])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_transpose, __pyx_t_2) < (0)) __PYX_ERR(0, 1322, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":1341
 *         return self
 * 
 *     def get_max_exp(self):             # <<<<<<<<<<<<<<
 *         """
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_59get_max_exp, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntegerMatrix_get_max_exp, NULL, __pyx_mstate_global->__pyx_n_u_fpylll_fplll_integer_matrix, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[27])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1341, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_get_max_exp, __pyx_t_2) < (0)) __PYX_ERR(0, 1341, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":1417
 *         return A
 * 
 *     def mod(IntegerMatrix self, q, int start_row=0, int start_col=0, int stop_row=-1, int stop_col=-1):             # <<<<<<<<<<<<<<
 *         """Apply moduluar reduction modulo `q` to this matrix.
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_65mod, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntegerMatrix_mod, NULL, __pyx_mstate_global->__pyx_n_u_fpylll_fplll_integer_matrix, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[28])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_mod, __pyx_t_2) < (0)) __PYX_ERR(0, 1417, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":1527
 *             return not eq
 * 
 *     def apply_transform(self, IntegerMatrix U, int start_row=0):             # <<<<<<<<<<<<<<
 *         """Apply transformation matrix ``U`` to this matrix starting at row ``start_row``.
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_69apply_transform, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntegerMatrix_apply_transform, NULL, __pyx_mstate_global->__pyx_n_u_fpylll_fplll_integer_matrix, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[29])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 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
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[2]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_apply_transform, __pyx_t_2) < (0)) __PYX_ERR(0, 1527, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":1542
 *                 self._set(start_row+i, j, tmp)
 * 
 *     def submatrix(self, a, b, c=None, d=None):             # <<<<<<<<<<<<<<
 *         """Construct a new submatrix.
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_71submatrix, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntegerMatrix_submatrix, NULL, __pyx_mstate_global->__pyx_n_u_fpylll_fplll_integer_matrix, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[30])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[4]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_submatrix, __pyx_t_2) < (0)) __PYX_ERR(0, 1542, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":1648
 *             return A
 * 
 *     def multiply_left(self, v, start=0):             # <<<<<<<<<<<<<<
 *         """Return ``v*A'`` where ``A'`` is ``A`` reduced to ``len(v)`` rows starting at ``start``.
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_73multiply_left, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntegerMatrix_multiply_left, NULL, __pyx_mstate_global->__pyx_n_u_fpylll_fplll_integer_matrix, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[31])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[2]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_multiply_left, __pyx_t_2) < (0)) __PYX_ERR(0, 1648, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":1660
 *         return tuple(r)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_file(cls, filename, **kwds):
 *         """Construct new matrix from file.
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6fpylll_5fplll_14integer_matrix_13IntegerMatrix_75from_file, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IntegerMatrix_from_file, NULL, __pyx_mstate_global->__pyx_n_u_fpylll_fplll_integer_matrix, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[32])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_from_file, __pyx_t_2) < (0)) __PYX_ERR(0, 1660, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject*)__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_from_file); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6fpylll_5fplll_14integer_matrix_IntegerMatrix, __pyx_mstate_global->__pyx_n_u_from_file, __pyx_t_4) < (0)) __PYX_ERR(0, 1660, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":1704
 * 
 * 
 * def unpickle_IntegerMatrix(nrows, ncols, l, int_type="mpz"):             # <<<<<<<<<<<<<<
 *     """Deserialize an integer matrix.
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6fpylll_5fplll_14integer_matrix_1unpickle_IntegerMatrix, 0, __pyx_mstate_global->__pyx_n_u_unpickle_IntegerMatrix, NULL, __pyx_mstate_global->__pyx_n_u_fpylll_fplll_integer_matrix, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[33])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1704, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[5]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_unpickle_IntegerMatrix, __pyx_t_4) < (0)) __PYX_ERR(0, 1704, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "fpylll/fplll/integer_matrix.pyx":1
 * # -*- coding: utf-8 -*-             # <<<<<<<<<<<<<<
 * """
 * Dense matrices over the Integers.
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(34); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_IntegerMatrixRow___init___line_3, __pyx_mstate_global->__pyx_kp_u_Create_a_row_reference_param_Int) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_IntegerMatrixRow___str___line_70, __pyx_mstate_global->__pyx_kp_u_String_representation_of_this_r) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_IntegerMatrixRow___repr___line_9, __pyx_mstate_global->__pyx_kp_u_Example_from_fpylll_import_Inte) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_IntegerMatrixRow___abs___line_10, __pyx_mstate_global->__pyx_kp_u_Return__2_norm_of_this_vector_Ex) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_IntegerMatrixRow_is_zero_line_15, __pyx_mstate_global->__pyx_kp_u_Return_True_if_this_vector_cons) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_IntegerMatrixRow_size_nz_line_17, __pyx_mstate_global->__pyx_kp_u_Index_at_which_an_all_zero_vect) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_IntegerMatrixRow___iadd___line_2, __pyx_mstate_global->__pyx_kp_u_In_place_add_row_vector_v_param) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_IntegerMatrixRow___isub___line_2, __pyx_mstate_global->__pyx_kp_u_In_place_subtract_row_vector_v) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_IntegerMatrixRow_addmul_line_252, __pyx_mstate_global->__pyx_kp_u_In_place_add_row_vector_2_expo_x) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_IntegerMatrix___init___line_298, __pyx_mstate_global->__pyx_kp_u_Construct_a_new_integer_matrix_p) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_IntegerMatrix_from_matrix_line_3, __pyx_mstate_global->__pyx_kp_u_Construct_a_new_integer_matrix_f) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_IntegerMatrix_from_iterable_line, __pyx_mstate_global->__pyx_kp_u_Construct_a_new_integer_matrix_f_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_IntegerMatrix_identity_line_431, __pyx_mstate_global->__pyx_kp_u_Construct_a_new_identity_matrix) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_IntegerMatrix_random_line_449, __pyx_mstate_global->__pyx_kp_u_Construct_new_random_matrix_par) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_IntegerMatrix_set_matrix_line_63, __pyx_mstate_global->__pyx_kp_u_Set_this_matrix_from_matrix_like) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_IntegerMatrix_set_iterable_line, __pyx_mstate_global->__pyx_kp_u_Set_this_matrix_from_iterable_A) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_IntegerMatrix_to_matrix_line_705, __pyx_mstate_global->__pyx_kp_u_Write_this_matrix_to_matrix_like) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_IntegerMatrix___reduce___line_80, __pyx_mstate_global->__pyx_kp_u_Serialize_this_matrix_import_pic) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_IntegerMatrix_nrows___get___line, __pyx_mstate_global->__pyx_kp_u_Number_of_Rows_returns_number_of) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_IntegerMatrix_ncols___get___line, __pyx_mstate_global->__pyx_kp_u_Number_of_Columns_returns_number) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_IntegerMatrix___getitem___line_8, __pyx_mstate_global->__pyx_kp_u_Select_a_row_or_entry_param_key) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_IntegerMatrix___setitem___line_9, __pyx_mstate_global->__pyx_kp_u_Assign_value_to_index_param_key) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_IntegerMatrix_swap_rows_line_119, __pyx_mstate_global->__pyx_kp_u_param_int_r1_param_int_r2_A_Int) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_IntegerMatrix_rotate_left_line_1, __pyx_mstate_global->__pyx_kp_u_Row_permutation_M_first_M_last_b) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_IntegerMatrix_rotate_right_line, __pyx_mstate_global->__pyx_kp_u_Row_permutation_M_first_M_last_b_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_IntegerMatrix_rotate_line_1250, __pyx_mstate_global->__pyx_kp_u_Rotates_the_order_of_the_elemen) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_IntegerMatrix_rotate_gram_left_l, __pyx_mstate_global->__pyx_kp_u_Transformation_needed_to_update) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_IntegerMatrix_rotate_gram_right_2, __pyx_mstate_global->__pyx_kp_u_Transformation_needed_to_update_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_IntegerMatrix_transpose_line_132, __pyx_mstate_global->__pyx_kp_u_Inline_transpose_A_IntegerMatri) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_IntegerMatrix_get_max_exp_line_1, __pyx_mstate_global->__pyx_kp_u_A_IntegerMatrix_from_matrix_0_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_IntegerMatrix___mul___line_1364, __pyx_mstate_global->__pyx_kp_u_Naive_matrix_matrix_products_par) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_IntegerMatrix_mod_line_1417, __pyx_mstate_global->__pyx_kp_u_Apply_moduluar_reduction_modulo) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_IntegerMatrix_submatrix_line_154, __pyx_mstate_global->__pyx_kp_u_Construct_a_new_submatrix_param) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_IntegerMatrix_from_file_line_166, __pyx_mstate_global->__pyx_kp_u_Construct_new_matrix_from_file_i) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_4) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  if (__pyx_m) {
    if (__pyx_mstate->__pyx_d && stringtab_initialized) {
      __Pyx_AddTraceback("init fpylll.fplll.integer_matrix", __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 fpylll.fplll.integer_matrix");
  }
  __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_id = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_id); if (!__pyx_builtin_id) __PYX_ERR(0, 749, __pyx_L1_error)
  __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_open); if (!__pyx_builtin_open) __PYX_ERR(0, 1680, __pyx_L1_error)
  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 1681, __pyx_L1_error)
  __pyx_builtin_map = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_map); if (!__pyx_builtin_map) __PYX_ERR(0, 1689, __pyx_L1_error)

  /* Cached unbound methods */
  __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items;
  __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop;
  __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values;
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: cached_constants ### */

static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "fpylll/fplll/integer_matrix.pyx":1679
 * 
 *         """
 *         A = cls(0, 0, **kwds)             # <<<<<<<<<<<<<<
 *         with open(filename, 'r') as fh:
 *             for i, line in enumerate(fh.readlines()):
*/
  __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 1679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]);

  /* "fpylll/fplll/integer_matrix.pyx":1680
 *         """
 *         A = cls(0, 0, **kwds)
 *         with open(filename, 'r') as fh:             # <<<<<<<<<<<<<<
 *             for i, line in enumerate(fh.readlines()):
 *                 line = re.match("\[+([^\]]+) *\]", line)
*/
  __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 1680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]);

  /* "fpylll/fplll/integer_matrix.pyx":157
 *             raise RuntimeError("Integer type '%s' not understood."%self.m._type)
 * 
 *     def is_zero(self, int frm=0):             # <<<<<<<<<<<<<<
 *         """
 *         Return ``True`` if this vector consists of only zeros starting at index ``frm``
*/
  __pyx_mstate_global->__pyx_tuple[2] = PyTuple_Pack(1, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[2]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]);

  /* "fpylll/fplll/integer_matrix.pyx":252
 *         return self
 * 
 *     def addmul(self, IntegerMatrixRow v, x=1, int expo=0):             # <<<<<<<<<<<<<<
 *         """In-place add row vector ``2^expo  x  v``
 * 
*/
  __pyx_mstate_global->__pyx_tuple[3] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[3])) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[3]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[3]);

  /* "fpylll/fplll/integer_matrix.pyx":363
 *             raise TypeError("Parameters arg0 and arg1 not understood")
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def from_matrix(cls, A, nrows=None, ncols=None, **kwds):
 *         """Construct a new integer matrix from matrix-like object A
*/
  __pyx_mstate_global->__pyx_tuple[4] = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[4])) __PYX_ERR(0, 363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[4]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[4]);

  /* "fpylll/fplll/integer_matrix.pyx":431
 *         return A
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def identity(cls, nrows, int_type="mpz"):
 *         """Construct a new identity matrix of dimension ``nrows  nrows``
*/
  __pyx_mstate_global->__pyx_tuple[5] = PyTuple_Pack(1, __pyx_mstate_global->__pyx_n_u_mpz); if (unlikely(!__pyx_mstate_global->__pyx_tuple[5])) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[5]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[5]);

  /* "fpylll/fplll/integer_matrix.pyx":1112
 *             raise ValueError("Algorithm '%s' unknown."%algorithm)
 * 
 *     def gen_identity(self, int nrows=-1):             # <<<<<<<<<<<<<<
 *         """Generate identity matrix.
 * 
*/
  __pyx_mstate_global->__pyx_tuple[6] = PyTuple_Pack(1, __pyx_mstate_global->__pyx_int_neg_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[6])) __PYX_ERR(0, 1112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[6]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[6]);

  /* "fpylll/fplll/integer_matrix.pyx":1417
 *         return A
 * 
 *     def mod(IntegerMatrix self, q, int start_row=0, int start_col=0, int stop_row=-1, int stop_col=-1):             # <<<<<<<<<<<<<<
 *         """Apply moduluar reduction modulo `q` to this matrix.
 * 
*/
  __pyx_mstate_global->__pyx_tuple[7] = PyTuple_Pack(4, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_neg_1, __pyx_mstate_global->__pyx_int_neg_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[7])) __PYX_ERR(0, 1417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[7]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[7]);
  #if CYTHON_IMMORTAL_CONSTANTS
  {
    PyObject **table = __pyx_mstate->__pyx_tuple;
    for (Py_ssize_t i=0; i<8; ++i) {
      #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
      #if PY_VERSION_HEX < 0x030E0000
      if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
      #else
      if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
      #endif
      {
        Py_SET_REFCNT(table[i], _Py_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: 13; } index[] = {{1},{202},{23},{844},{884},{32},{256},{364},{334},{1032},{1827},{385},{7918},{554},{33},{277},{642},{353},{361},{288},{177},{35},{15},{35},{36},{35},{36},{35},{34},{34},{35},{35},{36},{33},{33},{35},{36},{35},{38},{36},{37},{33},{29},{38},{38},{31},{42},{43},{37},{32},{38},{37},{35},{35},{35},{34},{35},{33},{13},{10},{665},{4},{179},{161},{155},{28},{24},{25},{52},{30},{39},{273},{354},{770},{218},{217},{499},{179},{606},{680},{268},{304},{305},{427},{0},{1},{1},{2},{1},{1},{1},{1},{1},{1},{15},{8},{5},{5},{7},{38},{6},{18},{15},{17},{15},{2},{9},{4},{199},{4},{35},{1},{1},{16},{27},{23},{24},{24},{13},{22},{24},{29},{19},{23},{27},{25},{26},{25},{22},{22},{17},{27},{20},{23},{20},{20},{30},{31},{25},{26},{22},{26},{24},{22},{23},{23},{23},{23},{1},{20},{1},{1},{1},{7},{6},{9},{5},{6},{15},{4},{4},{18},{1},{4},{5},{1},{4},{17},{5},{18},{3},{3},{4},{8},{1},{8},{1},{9},{9},{8},{4},{2},{8},{5},{5},{27},{3},{9},{13},{11},{8},{12},{11},{6},{1},{2},{8},{7},{8},{6},{13},{8},{7},{2},{5},{1},{1},{4},{1},{4},{7},{4},{5},{4},{2},{1},{8},{3},{5},{4},{6},{3},{10},{3},{3},{13},{1},{12},{8},{5},{4},{4},{5},{8},{9},{4},{3},{14},{1},{3},{2},{4},{12},{1},{2},{2},{6},{9},{2},{9},{10},{6},{6},{16},{17},{11},{12},{3},{4},{4},{8},{12},{10},{12},{8},{10},{8},{7},{5},{4},{5},{9},{9},{8},{8},{5},{9},{9},{2},{2},{6},{5},{8},{3},{5},{7},{9},{9},{3},{5},{7},{22},{1},{6},{1},{4},{6},{85},{137},{40},{15},{449},{86},{70},{112},{96},{80},{70},{71},{90},{90},{80},{72},{80},{80},{72},{80},{87},{201},{214},{285},{31},{36},{1086},{117},{9},{234},{26},{90},{99},{475},{111},{85},{169},{163}};
    #if (CYTHON_COMPRESS_STRINGS) == 3 && __PYX_LIMITED_VERSION_HEX >= 0x030e0000 /* compression: zstd (8769 bytes) */
const char* const cstring = "(\265/\375`\346|\275\021\001\372\375\0304R\300\314\210u(\212&SAuQ]T/\253\213\352\242\272h\026\377~\035\027VoeE\250\310$^\007\221\"\340\026\323 @/$&\260\306\027\221\234ffx|\376^q\035\037\366\311\266-\"\355\204\0004\234C\241\253\354\364\367\202\252\031\277\215Wz\004\361\002\361\002&\003\335\265\236\345@\255\343\256\307nZ\007v\366\323<\340v5\017\004\357\306}^w\377;\356r \370Y\315j\340\326u\234\375B\327\333:\017\354<\367\265\255\314\233k\216G\335;.\361_H\225;\223f\372a\356\343\207\227\032\367L\216\312,\372\234\371g\217M\022\347]\376'\233\260\231\323}\362&\233\023M\346g9v4\033\246c\362\341\010\2149\322\230\031=K\033\215\213\251c\216\264\316\304%\265\361i\004\315\245\036\275\266\321dR\252\354z\324%\232\361\316u\371\371E\223`~?\260\361h:(R#=f\224\233x\014i\257i\233\007Z\373\377}\336\375\300\373\332\355\354k\240w\273\357\337^\316^m{\r\264\033\007Z\316\344tM\370g#\346\210&\337\320\337\266\345\3143\357\300\200\001cF\213\317P\257\331\307f:z1s\307iY\326\370\220d\376\214\242\255G\371?X\324\311$\314\323\317\243N\210\202\177\316+#\375\031\347$)\224_{\222B\361\237\274\324\232\212\317\242\324$\003\202\317,\347\202\n\224\226b\345\305\312\214\0270`\240\234\340\271\217'\371#\236\363\354\202\373\370\275L\361(\223\242\230\315S\206(\332\363\265\027\241\203\0224\322\306\331g\232\222N2s\331\275\357\236\333B!/\3532n\313nf7%FO\315\377>?d#{>\342\317e\316@\240\354\242K\216\246q\037Q|\020Hx\223k\362a\262\3718\335\235\233\347\212\016\337YdJ\315\317\2466\355\3343i\342\025&\374\246\334\365\347\223$\t\321Q\207\344?\373\334\033\245\323\351|6e\211\307\377\316O\223\346]F,\312#\336,-!\333\331\347\013zv\235r\236\216\314\235K\375I}\276\340L~J\364\271\024\341\236\232L_\032u\t\346aN\0254\325\373\230m\210Nn\356\264\347\235y\212\307,\342\272\303\365\213b\310FKH\267\200D\261\343~\232\237K,\036N\273%%Of4\345\2377~~j\256\307\234\332xw-\332\367\246\272\356f&uh\366}\242&\375eY\246\320\321\177>&\214B\341y\324\244\211G\347\347\022M\373\343\377\244\262K&M\235\323\022\277\274I\322\234[\364\334\3767\232IfM2\315j\264""\017}\013H\263\321k7k5\315\206\264\373\331\325l\310\264\034QY\363\235\343\022=MSZ\236\343\223L\375\2019w\3307\356\374\273\251\371\347\364&\2741\3721=\327\245\376g\177\361$\376i\236\272\217)\231\367o\234\226)y\232>U\242(\250c\302\234\246\213\231>\t/A\362\246R\327\373$\225 \016\3344(*\207\250\236I\235M(\304e[K\026\272\231\326\322\2421\205\246s\217:(\275;\216\2613)w\363\305\233<\350U\250P\361\027.h\002\336\346\001\257\247g\322\367u!\327\267\373:\007\275k\267\256MM\273z\003jV\363a\310E8\014;\035\362<;\017]M\323\t;\231\233\245v\257\33547\314P\323\316\235o\230\030{\336\345p8\275{//or\342=\326^\223\314\336\3174\315\004\225m\274\3176\215\355\204:\346gg]\242\272\227\251\351?(\374\237\027\324s\340A\t\177\242\250,\222$\376\022\345\244\320~\263\321l4\357\016\231\267NOy\223\234HPlho\367*\260}vU>\237\030o\216\362\316[\314@\374|\376sf\236y\337g\211\2278\345\251i\3524\217%\3754K\376$?\277\234\242\217\2711\314G\247\260qQ``\303\006\307\314\031\246g\021\3276\264(b@A\005\032\003\255-\010\305\223\224\263s6Y\223\234\30218\246\316\235\223\345\351\342;\034\245\006\014\024\244y\242\233g~J\225.\034R\343\"2 ~\306\200(\272T\320M\3149\211.\237i'\256\311\334\321\234=OO\375\2229\276\331F\363\023\375\236r\\j\264\246\217t\211\227\364\250G\243L\222bi\304\371C\241\027\247\317B\233\222\246\237\373\263\027--\242\313x\226\"\324\337\224\3111+@iP\204P-\247p\002q\227\304\1772\223\372\3453\037\351\354yf\276\370\016\207\206\n\213\214{\305\223\350\263\231?\363S\304\300\202\n\256\210G)\021\177\321\252\320\342+\300y73*ZNNM\335M\22673i2a\316Kn\322\250s\243(~\274\365h\3677s\t\346\311\374R\236/x?\026\311\277\3673\321\206\375K<j\3634\361\310\365w\236\267(\372\020:(A\344\360R\347\374\213\033{\202\324\220\034\305\246\313\343lf\322oD\221\370&\242\250\021EQ|\016/5~\001]\260\373\316~\327\273\236v\355\306\375o\340\365\300\327\300\337\254\365p\236\353]o\263\334\346q\337k\332\347\351<\316z\354\275\236\367\201\036\353\351^\263\240\346\371<\235w\267\316>\347\001A\373q\035h=\232\275\036\215\373\356\363\266\317\332o\273\333""\005\377=m\003\255\306u \307q\367?\317\3356\315r.\010r\333\277\347r\232\207\303i\234\347\336\007\301\216f\202Kh\211I\273\377\307Y\373\201\240\347\363t\3679\356\273\326\344\364Y\327y\034\350}\367W\343.\330y\337\275\246u\367\277{7\220\373\266\357\270\216\373n\373\266\253]\017\374<p\353\336\363\233\266\201\357\351\356\333\353y\377\037\330q\327\243u\236\007\376\335<\377]\360z\036\013^\373\027\344,\347\335\377:\353\371\337\270\377\313\335\357\356\266\201\240I\233\251\306m\326~\037\267y\266\367\374\277\327i\317q\337\366i\366\226\320S\223&\315=\327\263\036g\273\315\373<\036\220\273\001\010\204\304\354\n\300\352A\005\301!\346\341J\261TX \326\010+\303\332+\274\"\261j\261~\254,T\253\032\020\022\313\254\243\n\243\342T\0332\304\360\n\243r4T\024T\031@b\"\353\307A\205\202\003\303I\345\324\234\241B\314\232\262\226\320\000\323\000\022\303\252\024\025\007\220\030h%Q\000\254\000\265\253\260\252\003H\314B\205XF\345\241\312X\350\010 \007~\245\274\356J\013\324\032i}\254\276\232`\375\204\250\020\263/\027\256\017\027\213V\rV\010\313eU@\025Q\r\260\320\341\321@\216L\302\310\025\330\312\t\354\304\302\354\007\254\243\207<5v\240\257\242\247P\221\021N\360\371|\026\356\216\206'\332\021\272\214\2714vl>3\241\351\330hJ\036H\315@\205e\210B\361\0273%\355^\206\250)\014{\330o\267\035\325\033w^\242|Tf\016\303I\274\357\266{\2278\rO\341=\235D\270\277\240a\210\236\350yM\323$q\323\r4\243\246\016M\246\220d\236\245fIgYr\022\306\305\305\006\327!\2515GIa\030\206\373<\313Qit\242]\243L\351\316!\311\313\321\324a9\206a\251\257\210gS\367\364\334\347\3309\365h\2468\266(\3064VFY\245\243\262\214\260\217\232\005*5#\014c\360\234Ju\324\2247\316\345\330C\3349\001\241R(\212q\363\313\375\366\271\037\273I\256GR\336\232\024f\326\374Ii\334pM\222d\211\022%r?\315\020\005%\2779\021\nQPA\213\346D\013\005\027>\324\242b\363\331\002\035\223\033gh\243\205\032\250\353]C\205|\t\315\317\346Ij\372(\3030\263\213'\321\224\245s3\363\234y\326z>\024\362l\326\331\214\263\331f\257\315\254\315\300\254k\351\234&I\024C\237\357t6\373\233\265\257\331""\007\377=\337\337\277\241\341>\3436\236\275\201\002cF\014P\004\370\271\331A\0345\245\244\206\223\370,;.\243FK\254w\350~\264\215\366\231F\023E\321<\317\376%\177\234\3412\257X\216=\221\232vF\257\347\277\367\272\347<\331\227y]f7<-GSk>\237\317&\023\305M(d9-1\262\0214(!\013\305\320\210\242\351\034\263\350sI\222\332t\242)\014\363Y\326\362\3173\271\317W\341\254\246\357\023/qv+\331n\311\375\023oKl\347Y\356\353l\232\317\354i\376\r?\330\240\004kE\321\264G\035\363S\024\337\362\031y\233\230\210\230\017h\036\264\242\304-\266&\237$41\311s\214\346l~z\246L\335K\235f\316q9\362\2749\017\307\231\2012\343\315\221\177\252\024\3512\223\317\365\233g\251\247V\344~\312\000\037\364\336Sr\302\375{_\262\235\234lo\265\277\367\302\n\323\211\213\371\237\023\220\t\342\035\313\200q\267N\373\316\016\332\020\3050\334\346i\237w\267\253uv\323\266\022Io\316s\373(\227!)\314 \267q^\367Yn\263\234\267\331,\247y\336\005\271\325\362\346\0029-\361K\230\032\351\216\260c\347\227\223\314/:\354h\272w\016M\363\324a\346\032\357\360$\303\216p4:\303\260c\203K\243\246F\n\214\344\225yy\274D\024\\&Z\023Z\231\310\253\001C\275\004\300\256\223\276Y\"T&\244\310qb\245X\235\370\200\231\250\231\243\222\252\000b\274S\013s@\211\200E\301\2564\254F\352\311\007\254\033QM\210\201^\033^/b\330\265\271V\210\300@\032\\$-r\202\000-\026\254\017\226\207\025\013\007\211\261;\203\310\212\306\032\262\241\230\010q!@LFCF\005\021\022\242\312\304B6`P7U\203\312\262\202\343z\260\344\360XUX\377\203\333u\223\276HJ!V\343\005\025\213\224\226\311\007,MGLp\027\252\017\025\034\037\260\214\313Bk\205E\302+\001\252\t\016\020\n\035\031r\200VY\007,E\005R\031\000\222\211)YQT\021!\036\223\214\010\014H\265A\345\341Ug\004\343(\300BG\005\221]\001@\216#\0330x\240N%\022\333\002\353\010\024\253\007k\005<m2\252\207\312BeETt26p7\002\226\302\215\300<\326L,c\262f\020\353\264\342\254\244\032\200\213\021\240\013J\2732\245|\304X\354j1\002&\262\226\252\016\031b\254\005j\211\223\272\"\223Y\271\264\3508\n\330<\254$1B\344 1\021;\300cM\251\004\020!\302\342v\225_\250\251jEL\005!X""\250\005\366\300k$\245\005b\\\301\224\350\020\023ieZ\026X,NV\022\034V\254j\254w}\200\306\006\025D\206\030H\375\320\002`\313*\tu\202zZ\275\021\016!\235em\017;y\310p\003T=\240\225\201\214\332\251\000P\235p\2540\261\306PYU\010\034'\357\000\030H-\311\260,\254VR6\210xX\351u[E\326\014\006\017uE\365\241p\222#;\021{\205\274F\027\t\327\327\352.41\".\020\255\315\302\254\023\r,\017\010\326\220u\363\232\360:\271T\\ \327\210+\343bi\275\260\270+\002\363\000\2515T\034BbDV\337\332\007\250\020\003\205pXYx\206\005\006\276\272K\200\217\226\007\320\n\003\365]\035\0108\265:\\\300/\030\027v\035\360\"\271\\\"Z\036/\026.\353\n!b\002\t`\022\254\300\\\274\354\313\001\t\"\200E\240\002\373@\330\007\034%\035Z\254F#\030Z\266\265\031\201\001$\200\226\t\026\271\352\200\\\243\026\207\276B\001\002v\341\2653\255\017,\224\325\207J\232\362\2514x\264*\260\272U?Ym\007u\357\317\254<V\242\014\005\3042\253q\335\220\242RP?\204\304N\034b<)+h\204\232QQT!\031N \025bXp`\360`Qu8\2718\227\210\353$\001\030V3\225\006\220\030\217\005\301*d\265\261*\000\252\007U\006C,e\006\254\302\313\203\313\303\345\241\205\302\032\225\204\300B@b\031uT\301\340\340p\200X\350\360r\2004\210\211\2502\252L\205\030\226\025X\177\341\227\214\0230\221U\251\"\360!\006\267RZ\037V^\245\254\356\352\264\2268\255+\326\032\352\001 b \226UY\201V#\253\314j\257x%\261\266PE|\210\245\254#<V,Nj\002\037b\"\253\t\253\316C\210\210\213lm\255\020,\226\325\213\025\365\023szq/\221W\003$0\274fj\210\220\030\220\013lihy\264D\254\024\326e\211\260h\254^Vn\355*V\003\211j\250d\020L\225\222\036\244\214\221\300H\002\000\020\000#\221\030$\032\224\322\245\263\301.\350\016\304\207K\203E\021\242\210$\n\013D\343\360\031\226\242(\010D\030\001\306\000\003\264\231\001\242\3220\217\311)%D\201=\014\010Y\262\t\245\214\2371\024\212\036Dq\207JG\220*\372s\363\302\234|\206+\316sQ\006\344\202\246\344EE5\232$r\312\327\276M\307\243_\002\036v\245\357\r\\\251Qc0\275X\000\031V`\304\222\277c:\254\022\264\346t9Q\271T\307\254\353\351\001\3601Si\033A\315\340c\353\225\\L\333\264l\002\311\223&""\177\317\330\204|_\317\303\036\034P3t\3579\352\224\247\302s\004>\330OF\376r\242D\302\266\261\367b\362\206\266c\342\326\"^\337\302\255;\351\0170\316\2668\373cu\276\332\212\177\305\\\336\376\263\000d\322\362,\214\003\027\355T\346!\342\331\355\260l\230\001\360\341=\320[\010\013\2101\t\001\251q\316\305V&\314b\005\301#\377\334^Q\252\317\231(\336z\243\226\002/DC\324\360\2057\033@\331\306\215\244\237\031?\0262\2234\342Q\367\265\0025\241\232A\305\234\0227tZ\034\023~ng\204P\363\003\301\010l#etb\006k\317\270\037\002\211b\262\263\234\233\325\201\003\036\007e\177_\236[\322U\357Q\373\262\340Bp\017o\262\021\337\273\n\371\021\352_\351\264\334\321<e\036\003\246\236\")\2661\203 \243\365\013i5\010\021HK\037\003\221bl-<r\236k\261\262\\\351C\251\345U\267\273\227\200\375\303\332(u\017\333\026\242~V\265\016\200\001\223.\376[\307dzA?\334\335\362\t\002X\324\242N\333\304*\263\233\022\007\255\372ck\276i\333\033\3258%mQ3\332\303\326>\200\037y)~\223?H\311\255>E\036@\020q\031[U\270\024\223|]\247\304\226\341t\014\366\370L\230np\036\347g\301\231\010\233'\331H\250\024\036\333\211\215\335\n\021\314I%[\032\003\316\006\005\007\322\320\n\031L\352\"x{C\305\302\331x\337W>\342u\007\014IR\353\005\n\355L\350[iS\3327:\260\304\317\360d-\232\031\n\246\334\204\003\177\226@\317\036\252\336wr!1D~%\332\342'\337\260H\314\232\302i#;\313\223\263\371\2659\312\304~8X\341'@\332\215\201\245hd\r\2708?]\327\367Cf~\363\272\327\2443\036\252H\213t\317uv\033p\227\213\0002=\374\274\206\233\316\371\201\242\361\233\376\324 \004!\3041\356\263\342\367\267\226a\321\266\276\235\013J\240\230 \237\000P\300\350\221_\234K\273\206I\315\002\270\321\217\024z<\307\220F\376\206n\200%\211SK\234\014\275\334+T\033\225\312\217\003\257\377[H[\205\032\025\376\334\017\267(\0147\264\336e%,\037\006 \0256\233\256\335\237\231\317$\323\200r\213\333c9`\321\303U0\314\272c\014\366\327\264\031\240\naa\336m\005\220\227\367\312&\266\301\r\260MW\014\205@\335\373\345.\247Q%\342\3430\002\007\364^\263\005\356\007\2373D$G\241\202q\321\234\t\236\306\177\232\031""\321^\034\002\240\362\352\237\312Po%\364\2455{c\377\2401\324\364\250[. \rzh_\202\376NN\260\240\211<\373\230\200\344\277\034Y\305\032\023\377)9\247\331t\234\032\200u<\244\005\315Zv\260\252\223t\231hi\202**l\001\001\332\243\240\346P\215\272:;\242\335J3\207\023\357\216\004$\023\204\242x-+\262S\324\016\334-`\262$\273\216\311\024\353\034$\251\231\233\274K\0139\007\240H\2621\021\245]_\372[\304\361\207\276\010\223L55?+\\Tp\2023\244\346\253l\005\036\342\260\017b\315\216\023}\260 PdsI\t\205;)\026yg\211%\344\207\375\242\331)/C\225\340\327P\306\311KHNCv[\217\257s\334\37474R\377\352'\"\275X\344\177? \263\004\372\r\261\2704\347\027\2552\311\257fkS'C\361\376 +\217Q\234\256\021\r\242^d\025\211 \377\252\340>\327b\013ec\312\3237\267VG\0372:\0033g\340eg\033z \260H\353/ M\247rZ\r\002\007u\\m\267$w\016\246{%V\257\001\r\005\267O\017\260\313\006[\220\242\355\3435?Ma\220Z\3249l\306>\211\266\000#z\020\261\006Dh\006Z\374\372\256\354\306[\322P#\300\222\357\001\315\327Z\242W\\\010\315\305\323\351\221\221n\345D\034\247-?\036\025\213v\304\214w\350\274x\014\014\261g\356\026b\321\261\206\244\233U\234\305\255\247\325\337\322\367\007\030\374_k6Q\320E\314jUR\2762\2725\331\371\320\364E\203{\337\311\317\353\224\n\316P\333\341\017\366\337\221\361w\026\270\017\306{\257\330\027o\324:'\241\306\035\252\222\370\371\217d\315\031G\312+1\340bY\245\266\217\251h#G\235h_\334\032\263\300>\236DL$\346\006=\024\260\034\321g\351\"\341\017\241+\0305X\236\256!\005I(\233Q\223\323\320h\353\352\000|\204\267\354\0359\306\312\350\362;Kb6\3653\232M\277l\311\312 2\233\252S<\314\331\3507&k\307\006\217TI\224D\334\250\\\326+iHi\350H8/\323I\231s3\273\215\276\"\020:\267-8\264j\310\000z\276_\013\311\352c\025\212\022\t$<T\201\304\360-&8\024\301h\251\357\367S\216X\275\374T\252ym\330\3710\243Z-\355\327\234\311vN\373\n]@\220\261\004\261+(\036(\251\237\250\260\336@bQ\037%\252\214\310\330*\303\007\322{\027\200BL\222\177\314\365\303\3132eKr\256\256\3532\32733\253;\301=\250I\371\"\022\366n\200Uk\2624k\341m\205\222-\331\014\324\001\020}<{""\307\2077!\215\257S%?\225\037\027\360\260s\325z\221 \021gDe\016\234\342G\300\341\322$\026a\211\247\373\032\322\315|}\020P\320 \321GY\267\336\235\363e\316H\220\000MV y\344\300i\270T\242\252\003]\240ga\235\026W\367\303\305K\234\354\223\n\021E[\226\220E8\352\020\t\267\001;\261Fg\2433\215_Y\2240\237p\256u=\244\335\301\026\207sH\315PB\335\223m\250\002m\225\335^\250Dr\335\245\036=\244\312`\263\003\257\372N\266~I|\362%\rK\360c\304\231Y\357\327\263\327R\255\223\351\2450\277\246\234\263\246\005Sw\341\366\0316v\255t\001\0142\020:\270`\263lS\026z\242Co\034\243\376-\220m\347\014\332\267\260\220\\\222p\222XB\230\361d\260X_x\200\267\t-+\234\264\3354\360\264\262\323 \212\227\307\345t\033\347%2\0141\022\216\345\014\255\375\260\niV\020\233FVU\260f\356\340\262E\027\310n}\351L\315{\231\334\036\204o\023\375\336@m\222\335\242TF\264\317k\250\330\360T\224\306\010\275k\206\201\374\334%\342\302\254M\300>N\355f\343\336dO\027\373\276\3715L\341\223=\261A\252\033I\023}>\242A\356\310\344\202x\332\030dz\343\360\027wA%Z\300I\252\313\301\327=<\271a6\212\335\330\352\245\347\026\301\320k!\014\327\216\366\330\263\221\335\256\2238\236:L\203~m\0003\3413\340\036\330f\336\370\201\271+\317\006\306\003\002\332\267~m\320\333K\372\351>\243\013\017\242v\340\016\313\266\265\270xw\217\310\r4\376o\024\004N_dX\355\351\nWp\276\255\344\374<HB\235iJ?\333{\030\230\326wa\253\2438\206\227\017\314D5\212\376q\220bL7\272.<zI\345\351XL\341 \254F\034TD\341\206\201\364\236Dl\334l\177\250\312Z\022B\241\010\363\235\244\236\323`\016\257\r\221xt\3416\"\036MNe#\340\275\3421*[\276\023\2254h\334\264!\200\020u\177e.v7\340\244\365\331\005\272_DV\242\020\263\226\334\221-\3144{\305\254\014\017d/\375D\372L\345\204\241\214fb\334\024\026C\021\251\024\342Usqr\207U\373c\336\212\271%~n\336\326\037?\332u\\\205\037\326\341\3060tEDv}\2566\205\350\322|\332\021\350\2524\006\037|\"\262F3\375\266\002xa@h'G8Q\352\340\361\tEh\315\226w\3066\205\014\277l[.\311}C\177\215\235\252\336\204\370\006\322\353\n\034\310\201G9\202\201\232Z\r\010\027{'\\3\305O""\037\230\201\243\247\227j\245\234\231Y\347\374\036\030t\264)\222L\225 s3\222\3102\334\316\22004em\276\301\207\323\002\340x\254\316\322\022\364\235%\364XFe\321\006\272\2738&\013\220J*N5\356SEn\243k7~4j.\336\362\0236\212\204[\262i\240lV\276\271x\201\311m\264#\221\2146\304\020\003{o\1778EC\355\251\366F\244\355\254>\234\2350\r\002(\016\274.\212R\251\246\345\324V\241b?\022\220\337bO\210\200\026\257\222\2000j\004\250\206\246\335\335\032>\210u=\200\206=\205\214$\277G\321\n[\022\222\037\317\021I\010i(\265\301\005d\230\344\275\005R\014\244\210\237\221g\242&S\306\27616\234\222B\210 H\024\025\252\351m\215PI\020\020Ql\246Y\2676\r\220\341\350_|u\226\003\265G\267\232\354\374\027\374\203\216\rT\323 C\337>FHQ\267=\031\035f\330\024\261\025\024X\311\025\377>\377(=h\034\t\023\263\233\313wgtv\305E\002\016%\2078\334+L\334\032;\003\206\035}\216\310C\022v\024g\206\267\255{\326\214q\206u\335\211\026\331\213\246:?\016\270\320\213\r\274\3279\230\357\353y\010\026\006R\017d\004\241\326~\022\336\265\002ZD\213\034\313\t>Jc\242A:\343\265-\250\034l\000\322\346\031$\351\000\355\253\210\317\207\001Bw\321\273.\342\334E\006t\306\355\331;\0225W{\007\301E[\352:\032\030\216\367\276\354\364\223\375A\3167f\213\322\030Ip27\3763!P/\340\257\353\366\2504\266\234\323\245F\307QC\246\235\271^\177\005?\345o\035Yh\277 pN\243\302%\324\002\007\362\035\362\366\3405\353p(\335%c\350\371Z\323\001,f\245\2632\226\220\214\256\036\317 \020\0250\312J\177\322\004\306\316\323`\307E\357\331\024\345[\320\220\300\030R\003\374l\360\372\231t\025\200\201\230\030\246KW\2663\034I!\230\370\245\334)?\362o\004\324\014\3009\\\217\025e\272\306u\037\316<5\255\215\317\027\t\037\021>\203\334\236\0334\311E\t\344Up:\207\265[\360\260\354\321\252\204\247f%\177\340\024\235\355C\330\274\224\236F~\220\303}5\250\303NB|\003@N\020/\n\017\366M\204\331\302(m6\266\372\242c/\023\220^\206sy\215\3076\013\255>\361\211k\232j\032s\376\000S\032\210\355T\320[\202\314\014*\353\371/\377\275\233\243\037\t\014\005?T\341\250Q\275\364!\261\034\304g\314Q\255\205N\211R""\026\021\240\267\213\345&\002,\321\375+\027\345$\203J/W\210\372\020hHJ\242\331\354\311\274g\241\323\033!<NU\307\203\337\264\261b^\372\324Y\213+\300\272\2532S\251\220g\356R\306\352\007\373\202\016\346\370\237\014=\332\210a\006\022\000\223\026 -\232g\254\307\210\207\240\360\317\347\006}i\307\323~1M\021\374\301\237#\177KZh\264\206\237\333\374\t\256G\034\025\243\3477v\367)\256\\1\312?\026m\022\377\233\274\264\225\023y\230_N\253*\205w\033\013\360Vb+z\377S\222BH1}\306]\360\2427\264\241\017B\211\023G\367\244\035\005\351\237\013\345\345\002\321]\010>1!FW\317\361\305\016\216\220x\307Q4-XN\306\372k\217`p\025 *z#8.\376\200\220\345\240c2r\2342&\2301\010\2731|\316mX9\234\\\316g\327K\220\220\277<a[T\306!\202\273\234\350D\027\217\236\262\373\022\2061\322\314\353\340~\037\222\2057\017dA\324\017\305V(\344p\376\260h\002q\365XY\250t\302F\241\257\326\377\254\356\244\374\306+\360\320\374\024\023\317\035\367\014\3503'\336\310\245\007X>=\260,\001\331wyx\216\377@W\332X\234\303#\276\026\374@\244\002Kz\003U\274\336a\277\016\033C\2721\236\245\334A\373\237\373\214\320\300\325w\037E\274j\347`\204\022\030N\244O\022\210_npT\317\021lw\254\237Z\225\014;\032T#s@\367R\216\323\356&\2070U\276'Z\306\347i\010$\221X\254\220\022\252\325\036l\222Iq'\031{\tGH\212\267#i\010w\275JH\305\223\217\354\314\276\027S\016ie\024\232R\017\0173BR\310>\337\034\332\251I^$gwp\021\305NbdpJ\311G\274\203P\003+\246\313\207l\206P>\277-[{\261+\322\316/\355=\275\000F-\217\306\212)\250\203NEt$-\206\3061\270j`w\2721Pe\t\271\224D@V\354\256\241\375_\336\377#_\004\253\237\375\244\022\253\332\357N\023l\030I\260yi\027\236\034\216m\240\257\033\360\273\302g\336\025u\030'\265\004^:\325l\0024Nq\022\021'y*\252\357\370\325q\374\nZ\036@;\310\211F\375\005H\215\223\243oh\272\25082\002pj\007\017\325\034fjl\260\325\245\352\021)I\343\251P\366\023Hs\354Qk\312h\221\006\315\312\t\375-\343'\211\371\336\330V9\231\205AFi\243\r\362\013e\223c\362\363,\277\366\337\002\201\302\001\370Z\324\032g\242m\230o\330$,G\266\204\215F\2331\211\252\327\305/a\316\331\216""\371\250n\313\314\344S\023\331\350\363\307\023DX\214\206\226H\026\202~\005\352\004\373\177\032;s\336\277\222\244b\205\270\234\2451\021I8\3316\327V\220i\3517-\2311\016\014\326\274\030K=\361d\250\250\310(\335A\222\204\300\231\370\3544\031`@S5~ 0\346\312\035\200\202\016-QnU\300\t\330\237\307U5EX\002\3276\361f\357+K\303\262\302N\"\033uam\317-(u9i^\311|\201\354\202\231\017d\242\355\237\003\032`\031\372\342\374\263\304h)\351\311)\007Oq\220\013\32302\301O\356\366B\352\021\333l\000\n\276v\203a\006\361b\371\376\013 U\2127N\030\327\350^\231j\306\t7A\271da\241\204\315\206\304\274\335\312\356<\272\234\243\263\033\024\235\031\263P\002^\033\276\344\324\335[m\342\0006d\246\271\324\341\336\343!\231I\210\336\024\330\267\316\273\005\02158g\335\244\241\263nY\355\213\347\336\224B\300S\016\240\337fl\014$-\267\022\2216\301\222\25259u\276fF\254[H\224\3747\373-(Q\371\316\302\003F\305\205)LM*! \003U\251J\326\260 \372\316C\306\277s\014(\340\325Yy)2\365kZ\214\253\371a\017}m\025\336%\345\177J\2509\010\017?\340\211.nM\253H\343w\365\016\016\230\325\213\313\245#\344\037\316\326\217\270\317\271\031|\014\177a\225\rwcQ\345\362\271L#h\336\013\324\256Q-F\0170 \231p%\367\360{\001\346J\nPJ\353\266TFM\227\217\0205j~\215J\233\302\316\254G\221\035\347jw\355\327\265\344\340\347~\223s\360\203>L^\342\353\221\350m\227L\t,C\211B\333P\213m\244\243\252\010L\017\035\222\301-\247\246\013\003\021f\247\324b\204BT\2020H.\202x%*\205\363\202A\027\237\313\016\tz\217J\374LY\313\247Z\314R\301zR\330gw\342<\301\235\267\351\333S\377}\030\372\345AB^3[\270H\\\036=\212\232\013\020\315Q8\305\213\026U\254\250\250]T\312\267\2024\353!\017\327Ps\247>\240\220\005(\353_\336x\257A\206&\366\237k\235P\033\272\346\362\005\304H\002$\204\003B\252@\342\317\243'\277D5\333V2\032\314{kLh\235\342\207\211\240)\034\226\256,\327\236\263\"\270\177>\002\030\376\216\021\271vV\303\375\2069J\305=\233\331\006\310\202\2365\332\220\027\360\r7V\n\337d\213E\272\310Np\334\256B\212c^\001\022!\206/\265\366\262\2205a\227\263z+\344k\312\377\013\360\351:\217T\275j""\274\303H\354\017\266\261\235\010N>N\004\360\030\242\204\224\0201\006p\240\036\010\206\316\365\215\242y\020l\227\005\0104\203\230\312\370\363\312\236\226\305S\203|\tw\016\014d\206\032Y\335F\0256H\364\320\236\275\356\322\301\323\357\t\224h\037\267Q\313\255\211\341@P\t\003\374\033\016\253\256\022\260\036\237N\325$(\236\272\350\227g\206J\226w8\010\256\324\224\rxtRFB\244\365\344Hzo\037\270@Q\275\205\\XI\250\211&G\030\311\261\233\\\256-\214k\357W\240\304,l\265M+\372\201&\262z\302HK\017\241@D*/b\373\330\353.*\256\243\0029\036\271u\300h~d@n\310\302\240\334\251\340\025\333\014\202\244\362\020\221>\023\256\324+\207\001\337\320\322,\033U|cE--h\316\356\324\014>\234\006#DM\014\273^Hj\004\027\t\017\227\202@\003\360\246\036\303EY\315\331\226c\374(\242\2179|{e\261r \201\033T\3746\3676\367G\273\350\217\205C\371l\325\305,\302\276pYC\303j-\\;\274\312>\223\207\036}\204V7*(!\365\0017\360X\2470H\230*>c$y7qQ\265A\356\361^\026\2259\202\345\247\334\254+\261\014+\200W2\320O\234\243A\000<\233\001\243\243\020\rJ=\006\362\356`E\336\267e\305\024\270Q2\177\211\3426J\2368\r\214w\223y\213\0014\"2\322\377\315\350\237ir_\3005X;\313H\261\347.\032\271\254\220 \325`GY\316\214M;\313C\003\326\254V\207[\312\001\005n)\220\"X\344\237\030Z\234^\035>!\246\350v\343\260?\376Z\232\247u\255]\217\342)\312\263\363_\215\274[J\305\237\305\221~\316d\177\023\322\002`-\364[1J\017{#\234m\000\316\337\301\036\257\305\357Hs9\036\215\315;\246\0369\006\217\231\2267\377]\351\231\265c\n\032\360\213(\364l\213Q\236\312\305\033\022\314\317\"\305$*\021Sd\325\306\tZ\037(,\336\373\320\350\3656\342\022\350[\342\214H\2625\030%\363\003/Z\\\021B]\264\336H\037'(\r\262\262\214\n`\374\024N\255\335I\326\207/\"\220\231\257\311\232\203\022\017\306\225{dL\265\274\261\251\001\0162\233\202L\261\203\010\374\310\"T}\030\rR(\300\331\264\031\240\305%\210\000\321\340\237f\336\224\215T\346\363\000\223<\220\305\246\274\256\246*\356Nn/{\010\217WX\260my\026\325\320Z5U\370zi\313\215T\337\013\340&\272!\235\321\332\304\212\252\020\005\364\241\260&\333\371""\326s\350\331;\326_\271\010\033O\222#\237\350\360\002\224?\222\346\224e$\342\033\273\372llW\322\272/a\325\360\215R\372\025\255\242\0206\212\207\334\310\031\264?\334\365R\0370Z\340#\234\235&\032d\213\255{\304\304 %\355\017}\2177\252\001Kw5C4\322\357\365\200\275\025/\213\241\375pz\230\246\024^.\372\321T\236\277\220\376\206Q0\027\020\n\361\0162\035V\251\213\226i6W2\301\341T\304\006\310S~\273\242a\221n_f\275\306-3q\323\226C1d\365N\004h\320\no\003\301\314Y\0268J4\266(\273\330\213\352\306?\251De\235m\335_\022g\257aq~;=1\020\0048\235\344\256z2d\255\3140F\037}ND\221ECV\017\007\031\252\307\262\013\263\023\331'\314\222\352\342\021\017\243\212\313hu\036\355y\027j\033\242=\202\252\365\3259\246D8PC\365nX'\330_\204\t\027\r\2757\245\370\253\326\370F\261\330\227\307*$\215\177\241\227[\240\3310\236\016";
    PyObject *data = __Pyx_DecompressString(cstring, 8769, 3);
    if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
    const char* const bytes = __Pyx_PyBytes_AsString(data);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
    #endif
    #elif (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (8673 bytes) */
const char* const cstring = "BZh91AY&SYZ/\357w\000\021Q\177\377\377\377\377\377\377\377\377\377\277\377\377\377\377\377\377\377FhH\300G@@@H@@@P\000@\000`'Ow\336\373\336\317K\333\335\\\r\306\362\357\274\007\274kw\335{\032(\017G\271m\256v\345\355\273\206{u\271\333\334\351\255E:\250\270\357\023\226sq\307\317\276\271\353\342\264g\333\247M\027\267q\227\335\316\316\356Rvf\255\267\266\351mUk}3\254^\331\332\316\203>\373\357\027e\334\250\032\250$>\007\276\022HH\001\014\00453\032\024j\236\233M16LF)\262%=\t\346\251\266\250\001\231O)\241\240d46\246\215\244zM\036M@mA$@\004 L\221\202\250\377I\244\315OJz\237\224&OPh=@\320h=A\352\000\000\320\000\000\000\017P=@\006\232\002\021\021\244\311\032=@hh\320\000\310\000\006\200\321\241\246\215\000\000\000\000\000\000\000\000I\245\021\0014\005\036\212\237\352hQ\352~\217QO\311\252i\236\251\246\232m&\200\365\000\001\352\r4z\236\240\320\3204\032\007\244\006\200\320\000\022$\232)O(4\364\207\2504\003mI\346\215#e5<OM5O(\375S\324~\251\345\031\033D\032\031\007\2504\320z\232\006@\315\252\001\352zG\250\004\211\001\010\233Bi3A4\302jb4\321\350B\232~\246\246\324\310i\246\321\000\323 \000\000\000\r\000\000\000\r\246Z\222\265\355c\322)_\263ca\230\252\351R(\276\0266\245P\241B\253\225\032\027\270_\000\377\232hB3\220\300i\233]\327K\335\373#\275\351\264{\377;\203\325\345b$`\017\321\007\352\013u\177+{\260\007\365\t$A\002\230\224\232\230@\262\024\322\211\205\2106\002\300K\007\265H\"\241P\025\220X\255\004n\006\330\233\022\001\264\002Ej\224\3052\264\262\374\016U\005U9\177\362\013\240\221 Ut\322\314\377\361\037\3720\321UY\004b\311\266\020\222so\324\341\010\036\2449L\23417\237\273\301k\253\013\316\276AA\214\325\206Q\315L\333Oq\323\"\007\213\004\345\024~$\025vSk\304\003\2711\337f\260\2226\355q\242ft\257\177\274]\331\003Yhn\301\313S4\347\305^\031\314;\336nM\306\3358y4\353\331\254\352\305#\234Xd`p\022\0250B\263<L\030\220\344\303\017\032\\\274\230l\r\004\255\376\355u\357\246\243\213\2711y\316yp\301\2131\254$\263  \333\002\334=\244\310\374\353\020\022I\240\253,Y\3560\340\336\312C\010`\022y\032\314!X""\234\335x\234\346\321\202\244Q\024X\261\033:z\216\323\035:\201d\352\227d\352i\372\241\247^\313\302e+\0008\0240\332\305\2136\274i*9\335\314\013\304\001\344t9a\323\016\342\252\205tr%f9i\272\302\230\220\343\0031`\260\001A\"\252\023\217\324\377\236\216\337\207\341\354\360\377\326\017CN\257\350\331v\374\336;(\237\210\2223+*\306Z\260\333Bl@1\003\020\207\254\010\324\232V( e\024\t\246\024JvA\363\225\316\372\236\222\326\002\250M\214\2511,&\223bI\215\2460hD\250I+\344\220Y\263\204\257\324\027`/\020%\245-\"\365\335z\327\254\37046J\325\253\211\332CLb(2\220\034h8X\202q\202\004\336UtF;\357\201\"\tV\263\256'\252\253\244\260\0032\261c\tg}Cx\311!\2040-D\025\013033\010,\252\032\240\324\274\304\037x\254\t\375\363}\306\031\206p\373\260\300\266\003&8Opc\210g\t\005\225\027\022\010\\A1c(\t\244\263\274\322\301cE\241\305\266\311\221\3352q*\307\211\000\227\321JE\354\177\307\032\010\322s%\306G\032\216}\002\264\014\225$\276\376%H|\332\321\001\227\271\332\002\001\030\356\273@!\010\267i\215\203bl\006\320^b\206\006\223!Y=\364\222\262\1776\226y\337:\027\340\246\255E\005\"\317\216\004\000\331\001\220\200\027j((\263\tX\210V\025\005XT\n\301E%d>@\300\302E\2304~\t\2040\312p\250J\000\330\201[\333\347/\261\245tw\223\345\215D\000\314\201\036\247\321\230\256D\222\223\244<E\330+\303\2444fd\014!*\225 \010(I\306\212x\323F\317\222\320\271\305\320Y@U\303\331\000eP\025S(\224\2070\320\026v\244$\2328\254\351\2059\316\262\005#\023\245\310=\343i\312\376\361\353\325\"\346\341\275M\231\266ub.\017D\324\273WA-]MZ\252\245\341\316T\375\272R&\307\202\211\323\202~l\314\014\212\025(\275\360s\013\314\247\023\350N\317Z#L\n\332vc\275\363\353#\231)1\307q\316\271n\365\267E\234\364\267Ba\234x\372\344\300\240\261Ab\220X\240\013\024\200\212\034\342\033\301UR\265!c\001\240m\247>j>:\0252\303Pp\232!\250\223\034\3240kC\212h$\021\206sB\355\262\244\312\013\024\013\245\013iX.-YR*\220\254A'3R1\r\321Bg\030\02452\\\263r\030\305\244@\251a\036\337\3739e\t\331>\201\203~\300PM\326\024E \230lY\257\262\362\236/w\000n6\034\232r7@\304B\362N3&7\257""\000\t$\324;\020i \204F\260w\026v*D\206\206\362\2004\010\034\"<&\317\210F\372\346y\023,\310i\271\226Z\343\002\257\322{F\357\256\221\206!\311\340\221\026\304s\003\243M)\3444\373\227R\005\262W\265pIj\226\315\021\030\334\366\265\t1f\236\317\353j\022Xh+\215V\272\030'\007\010\275N\035\214\205w\010\212\311(\360k\271\333\321n\2757M\273\265\r\251\312\340\211\026\304\236\215\006\255\337\202b##-\226B\303^\t\344\3055/\244\314\271\315\257\020\314\"\r\311\264c\020\325\234>\003\344\315\025\215\276<s\373a\000\375\n~\233\307^\311\327\026\333\000\303\000\272\305\304\244t\337\265>F\324\352\352\350\315\251\035\272WRA\024\200\010<\301I\010\375qM@\223\006\274\313r\307\272\325\306\301&8\304\363\261\024\037'\325rC\255f\006\252\205\323&B\203 PR/\223\245y\\\323I\331t\224K\022\221\321\342\356\361u\366.\316\3079\263\270\245\255\016w\361\306\016\"\244\202\364\2566\240\232l\320\r\0310\310k\2452\206\354\330\025\003M\324\321\304a\007\233\251T\204\342\365r\r>k\241\350;\316\233\276\007;\275bb\236I\366\366\274Ty\366Y\336\221\264&\231\216\263,\214O@\3664\255}E<3\023\017\030\314z\246g\335\271\022\365<\374\025QT\344\341(+\357zSG\242\241\n-\253>\025\264\t\270\314\317\003}zW\027\240\251.zG\013'f\264\360\274|p0\341%\253m>\2428xA\254t)*s\r\242\300_\276\021\326\215K(*\r\244\024\246\303\272\263(\034\224N\220\237^\206\354\236\300>H\362\2760\303\344\375j}$uH\362\334\227d\007\342\244\344\013\234bQ\270p\356<\233r'\344\374\255;f6\273\245\"\2032/\355\367\357\3548`\351\331y\347p(\361\362\350\t\266\267x\027\205\230\3412\021\313\247\311\253:*\262\240\262\336\375^\341{\336\361\217\020H7\303B\234P\206L\350\345\027\300\344N8\225\337\2153h\316\001\265\034\357\346\344\032m0\304Fp\3605P;\357\332\272\224\212\242\177\317\310\322=\373\370,\370Qn\320\2568\234\030W1\325\030\215\333\225}s\306x%)C\243)C\272Z\363\2347\024Wy\215#\227\354\037\025\214OP\250\336l\007\243\247a]\026\267J\035\216?Ki\000\250\334\240\353\2349\365P\211\275\272\033=$\253\001Dv\030\203\020\001\330\233D\202\266\335\2644\362\317\263o\025\266\253\0333\020\333""\007dHx7l\253\020\021\331\303\313#j~\355q\313\271\030\310\305\326\230\330\343\322\345WJ\324\227M\327\246\273\265\234U:c\255\343\344\321\331\023\037\031y\207\274\311F\n\367\310j\017\033\205\311\251\267\032\265\332\344\350\031\023H\341\342\005\266,\271\352\262Iy\273n\036\r\030\333{\331\267Zq)\tH\313@\247\216\253\004\212\223\013\227\254\370\312\340\325\256\006\264\023\325\245\253\363\213\304\274:\223\021\201\226\3421m^/\220\225\253\364\347e50\375A\324\2768T\351\021_\226\203^\020\333\324l\374K\365)\220\344\325\203\033\244\274\335\336%\270o\255L*\353sf\224o\260j\313\242\332\217a\365\261vX\347\347B9\373\210\365\303\352\256t\007}\004\350\016\226V\0309\215\003d\347[J\262\202\177s\331\335\257\265\256\236NB9\343\352\354/zV\267\276\336\277\257\020\301\266\333\201\303\326m\374\003v\323n\355\334X#h\260A\354\251\204\305.\002\373\037]\020S\204M\231\357\235e(?,~9kc\245-SZ\222t\351\364\255-\223\316\366]\000dwo\257/'\350\370#\346&\372\013\330\361\307\237\3406\344\365\213R\017\267\264\316X\t\240\231F\203\336\244\3206L\212\310\251:\002\223G\277\214\002\201\367&\202\023\257\t\216\027\244\034\357A\355z\034\022J\033o\036\014\201\022\206\t\317\211\236~\311b\331\346\331]X\r\301\253\345\365\375?\227\347vi\367\352MW\277\351\312\207\035\362\212n\302\305\332d5\363\257\333G\002_\203B\003\301\035G\010\210(\212QR\304\013&\265\263\306\242pR\200\021s\336r\340p\232\246\3410\323\224\316\234\r\000\020A)\242VG)\261\265\020\315\257!Y\025\276\322)\261\316\017)\317\353\272\272\367Tu\341\306\3468Q\251\270\201.P\226Y\347V\031\367Rw\264\025\274\032h|\220Fb\340<\375\350>\017I\356\355*\305\245\230GN\316\177\005OR\236OA8\201\321\245\177\317{NB\\\033\265\2516\270\311l|4\354A\004\206\362\014=\222\256\314\2104C\003\266G\236\267\222;\027\352\310\031\027L]W\023\334\024Yv)MsL\2559\327\244\223+\355Im\335\356\371x\265\031\352\0373Z\025(\233\033Li\274\032<\256[\270\370fMSH\250#\010\322h\001\240i<3=SC\266\177\342\221\204%l\251\317WP\027@\361rA.\275\304\257\244\322\352\356=\nmr\273\324\031yX\034\310\344\267\306T\270\276""\373\306\024]\232\021\321\267\336\371q\364v\354\310c\3668\315\315\343\032\274\230j%bt~\307&d\032\226\275\035\247V\341T\275'\211\326\254\242\274\017b\332EWM*K8\275\031\300\325\030\212zQ\247\306\3676}\2443!=\021\021\013\035v\016\231s\244O\254u\267\265\204\311\347\246\304\300\310\"#\363\340;\266\306\344E\024^\036O\177\322\331\363\217\237\303\352\276\247^\335\275\335\276\241\370\237@\366\205\005\"\201\373p\264\001d\005$\241\373\340\235\347\321\024\024\210@6h\004$\273\375>5'\351\210C~\230\022\004w4\tI\200h\270\030)\010.\005=2\266\020Y\ry\023a(\320\021l2r\240b1\\\006\200\n\000\201N\342\305\335\267\321\330\365\230\244#%P\247\212P\260RlI\031\343K\362\341\215M\350\033Q%\370\246$Yh\300\367\206a\205p\324\003\024\226Y\026\r_\203\006DOX\010\206\262\214\345V\030\325\351\007\215-X\2049\370\372\007)V\n\300z\031\004\266D\316\271\235\273\206\25777\034\007\034\256\213*\240\035R\240D\270ydH6\250\001\201.\270\324\373\036>1\201\323\007\222d\266b\305\206jZ\367\232\356\267p\300b6\325\231\t\0042\371L\020\335\242\014\264\306xC\2262W\261\272F\327\203\022\311\200\264\003\263X:3^q\rQ\006\257\206\352\243\222\345x8\214\355\0134\"\362a)\261m_\0034\253KF\202A\331\234\203\222(\351\245\250U.\005gL\036\365`\222\240\013t[\024\235v\240(!\211\t\212\254R}_l\2272\323\361\230\020\255%\215\034\207t;\241\314I\263*KA\223\006\222\213B(\rZt\224+\245@\254\253-\340xy\217\0043\237\244\360\311s\370\250J|\353\246\330\222\242\225<5\234\362!\025f\347\354\370HGOCp\3724\345\237ULy\220\354\023\260\354-\321\270\334&\345,\203\203>\341\0214\265\000\323{b\263\003\200\013\224\302\226\2363A\226\307\024\241F]\203\273\201]\266K\010\320\364d\225\204X\002lW\274^r\2662!\201.\210^\\\327\330\302\000:\367U\361\373\025\340\347K\"\205y\261\376;;?\025\242;\224M\233S\327\324\205\207\206\273\334\215\226\262\320h5\207l:\ts\271\260qh\264M&\300\245i\321Jt\365\007\206W\217\010\330)\275F W\304z\210\256\315\222\016\317\226\026\206\321\224^~;FXd\024i\027xU=\342+\022\264f\202\261{\302\253\236k\254]\253}8\327o\217\223<@\333\232 \316q\026\210K~\304(q""\341\032\"S\214\253i\247i\264z9n4yH~=\030\266gg\314`d\205^\010\347\212HDg\253\255.\3479\nW\212D\032\333;\261k\330{6d\323\274\336u\215\3364T\321\013\271\001\321\013\242G@\371\235gD\007jY,\201\266p\360\306\331\204\003\\\263\330O]+\255\301\271\221X\207\272\321\017\212\234c\317\257\231\251D\225\264}\030P\240\014\375}b\035\343CV\255e9\266\261r\204\034\264\241V\204ui4Y\337\007E\323\247xu\376w\300gSm\001\215t7\305l\313v\365ck\276\326\306\310\275\204\325\357\271:!\235\344\2211\024\000\212\332v\212\022\321,\356\2514\265\324\215\342!\311\345\233\261s\347\374G.\321\033]%\277z5\216t\2219<b\023R\264\301\021BU\320\007G\021\251\265\221\265\350U\007`\245,\211\262\243b'\337\032\262H\322\260Jp\210\354\364xpK\200y\r\376\035\307\223\225w\362\345\006\211\230GmY\335\365\202\303\244\023\263\253m\237i\3300\025[.\344\250\"\033,\303\243\030!Hl\231\226\316\254\365\re\017.\231&\312b\000\276\2057l.\231\221\020\346\350`\345g\024\037\023}\326vD%1}\025\206\302\265e\010\261&\\\013\034;\204l\326\326\244\242\004^-d\265k\3165\254\255\016v\231\226\367Cn\2359\363\366\274\343k\362\037\322\220\240*/\314\266\210#\265\017\222\033\231\024\017ug\234\320\227\243\321\341\322!\306\332&\312\301\243\232y\022\246\312\363J\2475\317\322\355}\251r\2528Q[\340\024\250!\2505G\370\253\224*P\2670I-\323\255or\252\262\261\020;\022\316\021\251\375\0377\014\004\216\313\013x\314=\342\005\306\3473*\232\367\255\016\351\027\003\360\340\354a\272sX\007'!\305\347\345\342^\327\310\200H\272\371H@$o\253\034`1d`\254X\260X\202\210\2020\025\020Tb\220E\"1\221\2220Qdc\010{{v\273\000'\312\t\363\030\024\001\020:\377\312\200a\202A\000A\240\351\014b\360\263\3143\005\220\216qu\035\347\311B\305\217K\270\346\242\225%1\251\241\222\267\374+\330\231L%AC\000\355\322\226\314\310=\377\202\r\207k26\026\337\324\200\327\333\257&\352t\237\212\344\213\205\316+\331\367g2d\311\2559\255\017\213\357\275\010\3706=i\201h\215\020hhh\032 \334\205\364\3150&Nk\337\t))\251\352]\007\317\343\300\356%\261\037PYM\206b}\215\"\031\372\314\033\020\332\027\307\220\373\365\3717?""ki\333i\002\353\217I\317\277\214?&\317_Eb\236]\377\361\277U\\\252\217\304q\302\341\255o\350\356\2363~\223\3433\241\3737\317\362\373\264\334wz\220\366w<iv\306ce\013i\204\031P\344.\355*U\247\357?\224a\231\220\314\r\013)\002\r\355\276\2552Z\222\353\265T\271\3179$\311\334\272(E3\253JW/\231\n\371\367\221<\323/v\3377;e\341\322.\224(\017x\364\243\326w\253YY\215?\014\247eD\250^\345\335Jt\255%?\362\376e\201\375\316\207c\007\270\010\337\337\277\013v\375\375\005\275\025\324\375vY\0268\031\026L\231\341\350\366\370\254i\221\231\203\347'\031\231\274\\\327T\032\232\232\255>\250\373D\323B\234\324\325]\304z42\250*\004\367\237\027\232\212\031\354h\032\037`\276\343\303\216>\251\317\324H\244\024\001BE\026D\024b\214\210\242\262*\214\210\253\376\337+\267\315\346\364\213&O\035\206qc\010\371\230?;\277\020\014\260\333U\262\032\200TL; \013\312}\337f<\272$\332\006\030BD\030E\032\177\006\365\347BH\327iY\202\001\020\030v\357\004\225\010B0\340R\032\006\257\250\235J\240\233\027-\323JP-\2279+P5,*x~\005\tM\365\232\364\210\207\210\025\304\241\225\022\021\335w\353\335\201\243$\035~aC\024\022K8\026\272\324X\212Sd{%B\246\246\265\027\023\027Q\n\272:\027\376a\352\277\3725e\335\213\305K\271\301\305\2075\222\216\013\036\321\306\363\263\341\345\225;VX\276\n\353q,\210\332pm\315\332r^\021\315\321\334\034\032up\352\212m\260i\261?A\242n\333wA\346\0047\016\272\022\363\005\306\017{=8\331\305\021Wv\334om\267CN4\316?\032\220)z\244!\007xA\321\360\313\037[\211D\263\016\334_\002\252r=}\275\3203!\031\200\253\250\257\r\0258\026\333WM 3\262v\025\354i\273\250\3339\360\035\275?}\350o\207\254=I\032\371\340Kf\357\027\236\"h\244\2771\313\363k\3722\025\244\353u=\346\t\312P\262\201)\265\213\213\307\223+\313\306W\327X\226^-=\327\274[)\204\346\020\206\037\214\252\266\033\3728\177%)\354h\324YQ\222%\303\365\243$\275\211\273\024<\233 \240\217#bzY\r\202t\2400\031\026F\014\214\021\017\231@\312@8\377=\236U\317\327\000ul\224\207(-\3305\025L5\362\205\331/\024\352tn\363\"\362\366\357\337\251\335\237\243\r\336\310\303k\276\252\033D\263A3""\177\r\032\035%\353\333\360I\017t|m\250\022X\346\321\013\312\nI\361\337\200h\026\367Q \315\177\037\330\2514\030\235a\257\257\177\227*\370\016\007\340|>\200B\374&\342\300d\317\231\2449@>\271\237r/c\2542\320\273\311\221O\277\201\260G\2730\326\306\365A\020i\320+\275\244\2115$\"\231\212!o[\017\216\003\005U\213\010*\004I\005 \200E\222\002\240\204\030;\344\366'\203~\220\353\327\217\345\376JK\322B\330K\227\350\213g\232\227\247J\002\220*\"\210\234\346I6&R\345L\212Jd\355\247\333\361\376\314\245\325\020&\270\323~\210\017-\010\021\302 \362F\014l\337\355=\352\350\034\017\037\251\370\304\300\261\350\022&\235'L\341\317\207\036gMg\340zx\031\223\003w\305\300*pE\344\330H$\036\032\206\005\025Z&\263\264\231h\352\370;\242X\341\361\304\254\0306J$\017\227\300y\343d|Y\206[*\266\310!\235\314\2051\007\020g\211&&\352gyl\235h0bsRr0\363\302\357\310Q\242M\r\246\336{7\244\267\2107\235;\357\226\201\275\002\222hz\031\003\366\211\311I\261\265\320s0\262\222\nr\304\340\204Mk\"/\303\021ez\243\017\222`?z\224J\002\344`\202\251\334\312\304\0200\374\335\016\272\331\322>\335\221\265fK\003\255K@\032\030\242\314\n\210M\244\311\371y\266jC\0276\375\342\344\352\356$}n>\315\244h\201\236^\246M\233\3455\265%6\220v\251\021#\257\232\267\272X\222u/\264q\367[\241z\261\202\354+xD\3135\002\253;\241\302\323\001fM\332\3321\022^\373\001,b\372j\024l\313~0\320\321F\212\345I\356L\314\354.T\222,\004.m6\021\tt\322\364\354@B\031F\005\324\326J\311\204\333\224\260s\202\263\025Z\260\232qvsjZ\261!\263\020\333\001\245\353\220G\321P\325\002\365\000W\034\336\232[\275\014\330\027Y\244\301a\316z/&\003\034\376\332\252k\277\226C\3450\243\220HG\006\341\216*2\r`-s>\005\205p\031s\033\221\301\222\323\211>\260\366s\003e0\220\240\226\220n\010o\027\\\0247B\315\266d\203z\362\373\017=)5\250`kK?g\307\204MY#\220\314\001x\311\216B\213d\345$\201\0040i-\202\325{\032_z\347\343\317N&\222\211Cz\033&\032\326\205\304\243c\327\2759\024\360a>}\027o\007\264\327\262zi `\360\002\3667\233\016\t\220\3142E\006\320q\241\006c\264\250\216Z\276\250*\221^\2733\032\303""\204\356v\350{\262I\250\257\021\243o\2468\235\354X\001\232\300\311!\230PR\372\336\2575&[.:\371\362\266\227\323@?\007\260l\022m\361c\"\013#\261\243y&A\345G\343\326\200\275G,\264S\336\364\330\021u\342a\300\301\017\265\232\032_Ce\271\350r\034\242\345A\347(\222\3304\303{ ,\243)\013\321\300\263\224\244\t\010r\001\351p\252R]\034\r\301\021v@\272F\277,\354^$\017j*\244U\r\207pd\360\230\231\321\n\223\363\230#\005$R\030\366\312a\225\006]q\203\225\310\310h\2063M}\251<?dq\306\247\323\025\007\241\274\024\365\202\255B\202\035y8\203\210\312\221j\007\246)\033\010\211[K\337]\032\370\010m\337\237}\361V\356f\264\031\326\234\251\236\353\010\025F\276a\200\007W\233\177P\212@\365\373VW\336<\300]w\257\033\341v\275\022Q\363\352 5\243\227a\270\353\244\024F\246\262\204\243\345\221EsL\373\311\220\213\200\206 \317\027\267\225\3009\017+\203\222\272~\221\273:\362A\222`\031\256h\\\022\335\304$\253p9X4\231\306\035\222cM\262\301\255\272\365:\027j\3349\237(N\347\227q\003xLt0\036\310/\310\334\246\030\353\323)#L \371\033=-\022\302\001(O\270\035&>\237o\263\265w\247\245 \313\254\277\302a\357\201\2548\206\031y\034\224\275R\212\200p\320\235\350\022\337\256^\237soV\343&\200c\330IH\220.A\271\034\024\346\217\"\230^\023\220x\030x\030$\337C\301\353\336&\375\335\016\241\352\271b\342\322\241\001\3423\304DZ\016@\216a\222\272\355\032\266\300E\027k\302G@\253\023\nS\341\260\317\345\224SR\210e\224\275\261\001\323]5\341z\253\272 \t\201\220\262\216\264\004\320\331\234\226\203\263Z\317\347\365pwgCR\3048\264\021\000R\010i\255\004\332\273(\024J\211\004\245\234\2376\334\345\224\264\314:\274A\320a\334\364\210t\241\270k0\241\022A\025\021\0300\252\235\005&\010R\"\213D \252hCM\004\365qZ$_'\272\2236M\033\254\240\002\022\ta\n\025\226)PRu\22038\013\004\3519I\035\002J\326\356\031\214Z3\031\205\227\304K \203\010\212/+\007\221C\210\306\200X0i+\316d+\007\230\261\036vh\323\361_\231\024zx;\263\222\342 \360p1\272!\335\327\235R\235v\3500\333\203``,G&\206D\300\322\355y\251\264\022\243\230\266\375\034[zf\010\016\305\215\307\033\001\221\335""\265\371\002\2567g\214\222\361KitZ\272\322(\326#\272\22144p1\022\232\000\200A\240\2536J\\\222\230\201\351\347\020\202i\007I,\246\310\035@\222\032\277>[\216\332\226b\0064\226\370\001\360\263\355\277K\351n\377@\317`\353\016\r\271\336Z\333\"m\350\004\315\202\022\303\252\030\244\244Y\n\200J \253&\364\005d\010\014\225\315!A\236`\341{\031\226\340\231\215\265\254\240,\366q:]\304\354\235\222\217\213\024\214\010D';\241E\324\221\206`\323&4vMU$/\247\243\034=\010\214.\037\356\304\217\242\320S;\322DT\030D\22200\017\205\223\243\326g3P\243\016#\014\212\036\300\213\351X\027\262\231\241&-aWf\212\375\276\233\251w\016\352\241C\353\313r2\230\254e\245j\326\260m\rcx\035\236\250jI\211\2617p\310\026\266\203\007\032a\033\225\220P\033H=pk~\266z\023\332\341d7\214\233EX\221\021\204`\226l\306\020\201\352\324\314\234(\031\322\017\330\010[\016s\201\007;\246\276\205\005I\254\014fp\003K\243mOueY\001n:sKX\014n\220xL|T\024\306L\021Fm\350fBz\311\371\342\004\"\"\005k\322\272+\017XS\210e\364O\266j\016\235d\007.B{\233'\272\223\274\370\272\373\013!\336\024\364#\317\367\236\342\305\212\243\322p\303\216\005\224\031\342\323\246\222\2279RI\312\351*h\240/\t\341H 2cCS]f\315\216\357DDE\351\263\270B`d[l\024E\n\302\244\013J\203\033J\207\237\312zi\203!\257{\356\3406\321 A2\266\220\">D\315\265\004\217H\300\364\t\256\214\003|$U\003GG\275@\366bd1h\023d\373\271\2643:\022\025!\276\376\336\t\255\221\335q\234\"\033\233*\313\334\224j\321y\307\231 \367R\225\354h&\263\000\325\024\271N\020!\375\017\264\270H@%hH\3620pBg\230\304\030\210E\343\241\002^i\216\376]\347@\"e8\"\215\356\342n\233!\363R\036d\016\245\233o\225\303F\013Z\215\030\304\351\241\261\332}\304\341\016\322H\207\227$\007\262K\030(^\336!<Pd\354\322T\025\362I\354O1\355\373G\266\246m\332\336}\360\365\234\361I\314\2153\234\232\353V\250\316\017\200\274\355H\"\301F\270u\005\034\201]\002\200%\314#C\274\210q\0022T}\243\031<\224y\276\327\032Y\212n\313}\331|?\"\352\350\264\253\317\200\247\330m&G\023:`\200'2p|#\224\261Z\016\230D\351`%\226\256\200\302\220T\316\224\215\rM\336""\247/B\r3\276\033&X\361v0\223\n\336\0049<k\2406GU\025n\303\346\233\376Y\302\273\024\301\273r}e9\354\217+\356\217F\345\324\311\376|\314\"\006\255\304\212\324v\323m\362\342\033^S\272\211\035\2358\351\231)1IA\332\224\023H;\263\t\220\316ae\2140\017\254\321\357\306\254O\322m\244e\rR437\252\332\330\336\350\021\013\341\256})\007\250\355\355\351\340\340=\327\303\321\006-\035<\355\325*Q@:\202r\256\232\n\026\331\250L8\213o\2515Og\021\010\222\306\034X\222\006\245J\r\234\311\200R\305\004\265\230\025\202\003\331\033s|\311\016\005X\275\026\270%F#\0357\t\"b\207\014\252e\305\"\322\3654)\263V\006\r\356\230,*h\"$c\211A\264zX\215\216\215#U\010\035V\303\3313\222\300\032\320\212\324\215\205X\020\326\2068\204\005\r8\250\004\204^uG\315\304\214.\355$\224\025\224D\321\263\236\330\\\373W\2300pB\273\206\312\010\024\004\241\004(}\245\017\022\\\232\314\321\253n\032\232x\312@\324\342\3135(\240\233<\345\273\247=\204\035\353\315\304F\004\0320\345\306\352\277\264\305K5\364\246\253\3317P\347\254\346\276\325\340 \022\337\332\315\000RAJ\277(\234:\240i\007\214\020\212\214\362jR\324\264(%M\206\243\000\220\341\303\033h#\021\032#\215m\333\314E\277\027\0277\203\000\253\241\256\002\010i\310 \030\2364x1NZ\\5UI'\200\314i\362\315\221\030#\r\322\006,\361N\331=X=\314\334\317\034\347\026zd\013)SO\2522\246\t\350\346\220\\\216^U\313\312b\227\254~\216\205\r\2576=! >&\224jf\252|\326\274\037\305#w}tys\016\314@\304cc\006\223i\264\034\314\005\314\026\365f\275\307\317U\t\006\235\262\367\032\020o\000\336\006\364t\036\271\332t\250\300\341hX\300\252\326\022\203%d\204\251\2350\204\207\267\031\330r\005\217I\3575Q^\244&c\004\311H\324p'0\305l\374\335\013\301\346\353l\356\223\224\340~7\233\220V\252#\"\177J\211\212e-@\255\254J\225\223\020e\272I{\006\217AO\215\350|\335q\331\202k\221\016R`p\244\270\344\300\316|\033c9 +\0229Jm\212\007\255\r\337q\217\225\220\231\217\023?\324\007\322n\007\\7F\t\264}\303M0g\037V:\200w\346\273\204{)\202bX\2049\347\324\003\234_\272\262K\371\0242\202\0364\376 \357\013>\003\351\333\361%D\310\220Rd\037\244)""\376\030\303\000\372_\347\234\002\007\267\030L\211\205 \202N\013\373\337\201A\344\220\226;\020k2\032\353\007\200u\240\224\210\362\317\332'\020\244F\014\237\010\236\360\375\031\245\037f$\304\271$~\232\344'\223\375\361\303\206II\004\004BI\213y\303\031\021D\250J\217\363\376\005\273\371V\204^\372\3622H\234\246\261\020\rQ \251\216B]|\203\306>'\031>P\226\002C\031\227\0211:2\324\300\232[z\315&\254B,l\327\230\224\360$\341\361\276` \250G;74.GPx\213\2439\320\200ha\235\010\241\372\r\0214U%E\233H\350\231\347\217\237\322)D0\244\244 \354\003\235Zf\216\204&0\215\304\230\017\220\340\344\006y\277l7\325\2709\310\013\224\315\251\244\322\2212\340\252b\352\220\252\177\236\220d\035\2433\363\004N\006a\354\014\344|\013\241\261wV\021\227\026l\303\317\301\231\017$\204&4\243RC\214;zWY\r]\200!] \206&i\233z\036\260\\2\261\220\343\337\033\210X\314?\307m=/\333\213\024\210\206N\0148\211\270\014\036\\'\3636\344\312\342QP\210\216}\r\220\246\021\243\364eB\3402\033j\r\200\345\\\333\3554t\036\276\375\320.\243)\006=2Q(\314\377\207\362QYrea\231d\007\271\275@y\322\311\233\037\0237\221\273L\275\334\331\214\177\007FV\313\002\372\014\243\342\343\370\373\371L\220\315\014\303\214\330PI\365O\342\366\277w!\332\357\246<\254g\363\350\321\241\336c\223\003hcA';\207\260\357\2136\200\320\206zvt\030\377\206f\312=\003\370\275\354f&\305\362|\3230\340\354\261\201\327\3140c\347\3013\336_.\036\0261a\3042m\357O\r\254X8W<\227\263npso\357\370[\205\257\264\230\22044pn\235\215\324\036\345\242\231\336\335<\273\307\203\354\341c;a\230\315\234\230\264\033\214\356\013W\357\331\214\336M\233\\ck\213\213\230\355D7\021\r\266\336\326[w\370\271\231>cz\321c+2\276S\276\307x\261\373\363+\334w\271\234C\"2=\257\207\240Wu\203\237X\255\304vN\247\267\324\r\304\005\273\327\257>\315\253gn\342\002\346\033\255\336r\270\2738\202=L\201\343#\271\365\230\276\221~7\021\2632p\\c\302\013\202\331|\351\234\026\330\217\275\333\372D]\277\3529n\203\021\240w\202\321s6~C\315\3376,%\257cVm\n#\375y^\371\267\244 \326:d\344\004\253\013\256w\t\341\020\rC>vn\257)o|\321""\261\262a\336\360g\316\276\203\361z\025M\232\365\307\032\241\334\263\253(\343\027\221\210twtv\335#\025\200\204R9\n\312\325\355u\244\332A\240eX-(\rL/r(\n\240\254I\245\222\356\200:\000\366kU\217\305\327\255@\303\021:\336\024\207\310\322\256\002\202hz\300\2423\006\211\274\244\251\001E\001\000@\321a!\251%9W\020\324\204\242\2627\002\302\036\301Y\214\206\000\202\035\305\225\303\207EFEG\014 \270p\025\036\205\351\234\263K\305\027W\002Q\302\266q:/-QwV\013{hz\214-i\266\034\020]\347\014\213\002lX\207\025\253\255c\352\245\360\377\010\230ej`\357\231\204\005\\\3340#\246\0244R\376}?\374]\311\024\341BAh\277\275\334";
    PyObject *data = __Pyx_DecompressString(cstring, 8673, 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 (9067 bytes) */
const char* const cstring = "x\332\335}Ms\033G\262\240h\313\266\244\225\237E\211\222l\217\347\275\242d[\000\005B\350\017|qL\275\000%\331\243\267\222-\212\362hf84\320\004\032d\213@7\320\335\340\207f\275\361\016\273\021z\261\027D\354ap\304aw\003G\034qd\304\\x\304\221G\206\177\201\177\302fVu7\372\023\000%\331\033\263\262\t6\252\263\262\262\262\362\253\252\262\212\261\013\027\210\365\357\356\335\273\244@\226\311C\325\224\267d\375\261d\352\312~\262\252k\365b\235>\307\326\327S\t~#\261.$\304\215\215\270\267brK6\001n\277(\3577b\243w\302\353\341\317O\213_\034\341/\324\2664]1\267\353\344\326\027\306-\322RwTmOM\026\032\215\332\001\251k\225V\255%\351D\227+\255\262\251h*+\322H\251Y\"\246F\314m\305 \214\216\344\010\347RC\322\245:i.Y\010\014\377\033E5\211aJ\272Y\324\265\275%\366\250\250[\004\276E\203\226\265\232\013\024\276\265\352j8\264\326`xk\222a\"N\022\223\367\313\265V\005\352\305#kP\364\264\006C\355\2514~8b|\202\360>\316\303\240\2446\000\220K\2458\337\033\316z#\004jp\254\006\357y\321\320\201\306Xa\204\177\235\"E8\262\341*$\200\021>RP\350\023\002\030\205\030\227J\214X\276\314%FL]N\305_\263=2\266\275\311X\211\027\241\020\202\353\327e\265\233UL\210\226\271\211\335\010\364\203\363ud\244k\206\241l\251dW\252\265d\324\036E\255\310!z\263#\037,\021\211\230\255FM&Z\225J\260\244Vl\271\204ZJY\016\350\024\305\n\365\020\2002l\204\367\301\276T\007\\KK\243\"\273?hHH\265qP\253\325\210Roh\272\351\345w\240BpD\220]\356\321v\033\037\265\250Td\325T\314\203X(\210=@|\304+O1\357\262Z\372\246b\352\222~\000\003\"\227\025\003-\223\325m\203H\272L\214V\003;#W\302:\215\343OX\273\013\013|J\314\215@\236m\313D\325L\211\332\272R\251\260\256l\254\277\330(\225\010\3309(\037\341M\",\024\302\377\233rYj\031\262\005\016\260\272l\266t\325\300\261\3206_\310e\323A\017\243i\0364\020\324\303\303\247\332\036Tc\260do[)o#^\245^o\231\322&\010\301\346\001\251\310(;\256VA~\244]M\251\200\r\226\035\374@\206\016r\242V[\006\032I\243\005\230\034*\310\036\330y\020\254\206\2565\000l\027\2124=\031\316 nc=d`\236\351RY\336\224\312;$V\327\320\266\312e\030]R\226@z""\320t\306\227<\340\311d\322[\035\272\376@\3275}\211\334b2\227\2546\360\323\032:\313\243%\375\274\271ew\240\242\311\236a \212)\327\211D\325\252\016\224\214zrOR\021\256\"\233\262^WT\030\324V}\023:\315\324\311H\336\323T\303\324\301\247\001?Ty\217\330bj93\204\253(\200\322`r\240b%\362\367\277\021\372P*\005t\226\226/\371[\231\344\306\035\345\020\2470\226)\372\237\333\320\244\254Ro\031+\365\227a\251\313&\005\372\317\350\262\273O\315\002{^\254);\262=\000\205@\307\013h\252\254Z.\310\004\0236\271&\343\270\020\251\014\026\313\000\271R\022/6\210\246\023K\261\246b#\211i\r\324G\251\026\360\336*\330D\017<\263\221\236*\247\213\245\270\004\237\020 \232\022\023\351D\306\037OE81\301\303m\221\244I\346\027\341u(w\246eI \3601\231\263\000\005\2416\006 k\262\272\205\026\302\204'\014\204l\271_`H\335b?\206\2256Fp\325B\2020\206&\030;\177yn\006x&\351[\251\200@\375\364\037\377\033\024Bs*\005\353paB\345T+\225\276\325T\331\315\017\364\033\025\271*\265j\030?Z\024\002\244)\355\200\3112\267\375\006\310\345\320\215\267\342\227C}2\271\t&\263l\312\006\214\365\355\007\217\036=|\262\366p\315S\365\253\360z \002\251}0\337w/L\321\320k\266s\232f\026!`%\276\000\342\r\235\321\0370^\262\274\321\267\336\261\251\267\000\335\246L\356\246&\0170xb\251f\200/\206\322\306\201\373U\250c\235\020\317\006c\332\300\253\225\000\212B\260\376\n\255\357)\346\242\033\341\247\253\357|\3654\317\272o9d\003\305\274qp\313p\324\022\303\035#A\224*{\203\374\032\305P\016\3065\031\002b\020\037\343\016~\026)h\022\240\253\300a\231E\257\020\333H[r2\322\016\030\255\315\250\211\250\264Dd\360FH\r\214\"\215\272i$\006_\252\212n\315\021\241%\2379\304\322\210`{s\022F+V\017\"\035\037\304\227\227\274\010\03126\021\225+l.\353\262?\001\177X\031_\337\236\331\206\243\260\302\326%W\t\216\236K\214\237\003\352\032\314\347!\3646e\332\022j\033\233\216\253\273\030\313\300\2400F\3008W[*[3`\301\250\004\226\205\354\343\007\033\247\3271{\t\362\365\223G\217\036\275\301\254\204\326O\0322\314\203\301\004\203\2732d\031\246|\202\220\r\233\3010\030\345\245\034\273\241""\202\260\241{\276\221 0\3670\226y\320\334\346\262\310\345E\201\313\007\353\006\234\2337\214K\021!\305s\"\317\021\222M\363\231<\204gi\036\376\245\010\237\317\362\231l\026\024\216\313g\004w \347\r\372R\016\304$LA\0146\016\177[Q\230\30200\034QT\3731\205c@\034\223\372oc\212\302\220\"\326\030XoR\221\277\2431\330\020\2230M\3060\t\323\364\030\2420\235\036\203\037\323\206G\241\313`\240,[f4`.]=`KCwp\td\252X\305\022\365\244c\201c\340< \352\313\305O/\375\247\227vWo\276\323\311\036\353\320\226\262+\303t\004\034\212\355\324\023N\024'\3577jJY1k\007\323u\006\027\213p\201\025l\301\226\034\023\022\371x\240_\323\350s\330\270\275\216\336M\326\264\020\027\211\016\322=\335\250*5\3317;\265\314-L\250\033\370vB\244\317\014#\265\2627\232\222~\000Vqg9m\233\306\224o\305\264\252\002\002\033s\262\276\203\2171\357d\240\272\r ZCVcU\025p\356\335\360\276.\302\333\352vrO\007_\032\203N\201e\365\327O\226k\232!\307|M\257\204OR\220\020h)\356\357\3462Y\031\205|zK\016\304\022XQ\225\3522\314\017\340\223\371\330\032]\315\323e\251B\271\033\262\362\347\035\t\306\274\310usp\342\350tT\t\227\246\301\367\020Z\214+\031\t\002\336\n\"\323\032\304\001\030\032UdSRj\201(B\262\327\364\227\330j\023\020i\r~\031\2104\345)\321\200\"\024i\000@Z\020O\350\265\003\364\342\356\270\356B0v\000/o\365\256&\231&\2048dS2\024#\260\0269\355\244'\334\335\217s\342\021\032\035-\276\360V\227k\266[\027R\001\355&|.\235\317\244\205\014\3572`\243\377\374JJ\262\234\230N\013\371T\312e\275\242\301\271\024\227\315\347E^L\223\260\n\001\354|:\223\025\005>\237wy\3411\340\231\024/\344s\251l\336\345r\307\200s\351|:%p9\336\005\304E\203\213\351T^\3442\371\274\207\010.\022;\237\346\305<P\344\353$\027EL.\227\315\010\036bR!+\\\026x\232\0233\\\206\317\345C\006\311\263\370\025&{\247\211\013'I\224\241\324+\212\326\330\266e\n\013\361\201\017\223..\225\025\262\"p\\\204\257i\360\t\351t\006\337\244\t\311\001_\211\220\023\340I\204\262l\226\303N\242\251\027\304`\367\211\343\350\271\024E\306\\\377\244\2171xN\205l\022\236i\221M\205g\nd\323\343\031\217\354\224x\"\221""\275\016\2360d\257\215\307\207\354\315\360\214\220m\\\370\365\024\253\245*\340\257\352#\275\n\332j\320 \246@i\252>\250=\216\362\240\356\240\352\344\363B\240\373\002\237F\373Dx\221\007\263&\020\320I\222\343\322\370\234%|\006\260\212\034\305\356\257(\346\301-\0000\017\300yh\221\313e\340\007\024\227\207\027b>Kr\002O\362\231L\240b:\225\003\030\340\" \347E\200K\347\241E\010\3542\031x\200\210\216O\347H>d\006\230\206)t^\020\010XG\350#\222\235\003\352\240\217\002\364+\227\201B\250\230\r\231te \244$Y\236R\004\003\000\335\022\240\313hOP(\2044\230s\0218\226\016\366Q\340\210\000$fE\340(01\217?\300\027\312\020\244_\340\001c.\214\324,\001\007\001\357\200\353\000\303\303\3674\266\232\202\316\347\241\"A,!-\322\361K\247I\006\206\202\232F\370\235\306!\302\ny\3548\262\031:\036\364\217\330\242\010\255\244\3508g\300k\247q8\010t>\223\027\341'\003\217\351_\311\037@H\354^9h.s|v\314\264\210`\027\321\t\210\"s\001D\0307%\302\rx_\215\350\311\276\215\317]#zb\357\246\300\2561f\022\237\016\326\210\236\250\002\017,#2\372\0317\255\r\326\030\017\355\2571\031\332]c:h\273\306\257/F|\264\034\205\360uL\254\027\302\327\361\320\376\032\223\241\3355\246\203\266k\214\215\200\255\324\2234\223\271\364\330\0205\235\n\324\030\023\241Z\370\3345\306\004\250.\n\354\032c\342S\037\315X\343\377Ix\352\314\327s\343\014R@\245\2639\366\033l(\311gC\315\022\030W\352D9\216Yl4\320\004\374\006Ic\327\303\315M\230\320NRu2\241^T\235q\365\306\325!\2470ZdB\275i\352Lc\300\310\204z\247\251\363\353\0323*\204\246\276\0052(\325\032\333\322r*\231\317\207\314\272\371\234\230\022\335\213\230\251\340\227\220\3004D\363\026s)\221\007Q\024\304<\004eo\202j\221K\301\344\033\244yQ\340s\020\030\212\242\230\177m\252\322b\n\027v\027\323B\n\242\267</\240\326\360\002N\363N\213\212\313\242\256-rB\006Y\226IC\224\004\244\246\201D\"\246r\374)Pq)\010\255\260O9\216\322\223\207\230\020\320g\201\322E.\017q\034\227\026\370\314t\274\002\232 \024%\213Y\001\271\237\346(\363s@\027\276K\241\255\310C,\233\316\241\231\230\320\301|6C\t\311\360H\010\317\345\200I0\337O""c\247s\331<\256\272\344\021m\n\202i\014U\307\240\0223\202\210k\257\002%!\303gh\344\317S\252r\"\220\222\3418\014QE\354q\0264\003(\216\2302\301\014(\217\2502<\204\232D\004\224\210_\300D\314E\032\256\362)\210\307\027y\010BAVrHe\232\244\363\274[\323\n\273\222R\243\333\203N.\256\341S\276ER*\331\353T\245\022|\215\225J8\003\202\347eR\332,\305\311\226\254\312tSN\";\252\3240p[\234&\223\204\3463U\310\337\377\346i\200\220X\3456\027/\321\245~@H\347W\326^\342\242\271m\345\212\261\215\001\303\316#\263\026\372\354\025Ah\002j-ZI$\245\237\376\343\177\221\315\222\257\025D\217Hu\3310i\022\233\335@YR5U)K5\002s<\323\316M\013\341\202\263\266\022\302\207\"WJ\020V\302\333E\274\2279\264\353\244Rr\361E\362\321\2103L\002\315\300\240\350,\307Y\242\264*\352\256V\333\225+do[V\211\251\323\345Px_U\240S\272\304\322\215\210\324h\350\332\276R\227\330^([\027v\255\255\262\177\224\203\330y\003\027\221\215:\346,Td\225\256\372b\307i\272\001\333\274\235\216\365>\374\201\201\000>X\3338\252\251\250-\331\302T\252,r%\272]\334\220ULF\033eQz\206\323\240h\374\215\000\277\177\027\220\021\\P.)w\271\322\344\361%\006\024\000C7\017\240KU\t\213|M\224\370\037\376\n\315\374X\n\023\005{5 \\#\026\307\r\373\336\266f\310\004\372\253+2K\030u\361\300G\3038\216\200\204\207Q\346\314\370\302Hc\tD\315\222O0yJ\"\0174~\373\354\351\367\213.\345M\222\207\376\361u0\002\217q\257KM \2531\323\300\222\032\203\255\262\273\322\201i\312~\250\216&P\242AJ\375B\252T\031\235#\334\340\372\215Q\352\277\214\231\244\273\n&\026\320\344c*\265\014\316n\235XcDJ\333(f\236\\U\366OG-*\375\271\330\\\337\337\270\023\333\377A]\0043\004=\306\216\200>\325\016\234lZl\220'\373\360\263Y\323\300\274YCYZ_\177\230 \272f\306\266\343\033\t\262\236J\370Zh>\334\330\260\373Hd\251\274m\325\007\326\201X\354\203T$\374\251 \320q\206\320\021\342\262&W\253JY\t\212\207%\312Xg\0330\331\026\216J}\0042c[\251\232v\276HL\201\036#p\214j$f.\371Z@1= \215\226Ih\266\023\260\221\221\332\320\014\005\255L<A\225\016m\010\350]\210<\216f\216\023\344Q2\254a\225w\025\255\005\022O\223(\023\230@""\"7Lf\t\203C\350\344<\201 X\203\202\274]_o>\3044k\030\023\326\377\004\301\221\010\323\027:#\031K\033\332\365\235R\204-o.b&\270\255\332\300E\037\201v\0260n\250\225\232?\354\240|U\337@\207&\031[\260\212\266\356 r[K,\374\240D\343t\350\241iK\274\337w\202\215@\361/\005\344\337\341\363\357\031\213ma/\375\236\266_\332\201j\261\312\342\216\345\337-\235\254\035\370U\321\332\226d'|\232T\235\r\272\201\007L(k:8\355\206\206\342\315\010_{\270v\347\321\363\007\026\367\255\355>#I\276\321j\025\303\224\025u\361\261t \373-\272\r\347CX\332Y\346\254\350\003X\003\223\207\272\034&(8k\260\345\204\316\035\242D\242\246\355\311\372\"0HR\267Z\350\310mn\255\224\302$\244\264R\374\253\242\374\210\271p?\374\025X\245@0\364\303_h\013?\226\034\355*)\226\202S\360\027?R\356\332\026nS6\367dY\365#^\004\320\027/~\274c\371\337\322\350\253\203\365\305W\212[+\226\366$]\005\253\270D\203\000t\006\226\036\202$nj\2732\251hdA\325\314\005\024\235J\253,#\003Z\230\343Na\355}W\026)\250@_\313h\241!\365Pfl\343\356*x;\003\317JlZ\225\334T\300\334\0163\373\226\310\022\346q-\225\376k\330\\Ny)\217B\274{ts\031\243\0230{\272\\\005\021T\2758\331\276\2627}\360\361\222]\020\221\215\213'\264\350q.+\037Ov%\371>u\267d9r\373\324\304/t\334\205O\020a\\\302\346\357F\307\213x\366\314\343\263\020\250\242C)\274\336\010\276X\237\230\272\251\257\207d\207\376\343\234\316x\300\362\215n5o\241\201\277\205v\370\026\352\222.7[\212\356N\014\375e\217.\275\265\261d\253\035\272\334\320c8\244\3618\231\234\022\215\342\234\302(\340\253\020\242\302R\243\037\252\213\215\032\0141\221*,\025\324\n=J\020%\313\373\r\215\374\364?\376;Xz\374\334\r9\242\342\0377\262\273d\351*\303\343\207\337_\"\365V\315T\0325E\326\303\224\022\333\\\2421<\306p\370M\205QNNu\356\354\265\216\314\272\006h#\tL\000\362bxT)2\373\022\207\302\363.&$H&\376\013\223\223\330_N\235\202\244\024\315\000\377\305I\342\0228B\313\374)(\343@\024\271\\<$\237)Z\024_K\362~\025\211!\267\227\351\301\266\323\n\213\037|7\312n\357\236\276\205\014KR\036\303`p\316&\330u\363\037\206\313\213\247\345\301\"\260y""\221?\025\237O\337\0060z1\023\316hL\225\227\354c\227\0200\241\273|)\353\232w\345\345\255\2315z\272\014\177\247\350ot5Q\n\214\311\177E\365e\314\373Z\010=\256\031\001\034v\260\226\217\002N\205\362\247\206\241%\310\240\n\301\272!'\337\322\325\007\230\320YH:hc\023\217\206\245|\007\303x\272\237\344\242\023&\310t\275\315\311\334\245\261\010M]4LM\253$}~\326\257/\311bQ\3324\212E\022\243=\346R\371x\010\210\002\026\317\201\341S\251P\030U1\035\030\201\013\005\001*Gh\370L\030\014\206\023\016L>\264%\230w;\020\331\020\010\346\002\354f\322|\020B1\212T\330\255N\247\263A\020KXl\220\254\017\004\310\330\222M\214\365\034Rr!0\036\246\360\371\\\000\000\010\0351_\310\210\001\000z\t\205<j$\305\005@\014\037!y\336\217\306\311\376\265[\312dR\3611\247\030-0\221\023\342\221rn\217t\306\017\343\272}\303\351\230\350\247\3329zl\265\344\027\030\274\223\300\256-r~\306\322\223\231l\010F\234Ig\374P\3648\262\017J\364\223k-\000Xt\210y\377k<\027/\027\267\300\331\024kr\325\264\211\342s\342\030H]\331\332v@\205\224\020\016\352\301\307\205\343s\336\247S\341H<M\361\202O\332\351\306\245oX3~\245\241@\236Q\315\010\001\020\307\300\330J#\006\232\332\223\350\365\021\206\r\302\345\375\03575o;\331T\332\017a\033G\207{\274\323\016K\354\246W\266\370\254\334#\367\025&\217\234\033P\276\225\360H\204\325\342\337\377f?\261%\004\217{\013\235\245\027`2@\317\277\373O/\027\306\327[Y\202*Po\307_o%$w\274\036\ny\017=\005\276Y\361\035*\230\224->\355\226\365\324\027\215\270\217\203\371R\021\371\211\376\213\367\035\312\347\250?\033\177V!\204\210\225\323\022\261\022\367\\\261\342\277r%@\204E\372\202\247\036\311x\3237\326Y\226Gx\335\225\005O\307s$\343\251\231'\236#Hx\014\361[\215\036'\204(\354\336\201\271\215wy\030\244\"\327\224M\272\256W\303\023I\272\002\223i<n\t\021\332\223\007O\026\305\234H\027\324t\031\327\036\360P\351f\271&\031\270T\211\233\034-\005f\256*;}JW{\017\264\026Qa\3541Bh\000\234\273\202\263,\213\313\232\267\350\315\021t\373\016O?\300\324\366\026\251(:4\202\n\004\265\277\226j\020\006\215\216\014\337\263\316\327\207\010t""\360\020\376\205\327Z\301\210<\340\315\314\277\003\307\271\"\270\021\201O\361\226\200\261\324\351\036\210\267E\232\347v\202p\322\3543Y\243\023\327\301w\360X\000\373\025uD\373;\025\344c~\231\n\303\362\262\265\004\330`\367N\300p\343*\253\307\240\340\032\365\023\373@M\250\005u\336\032\364\366\000\212\031\257\004\360\301\215\026!)CaV\206\007\206p\311\337:\377j\315\037p{\304>\211\246!\261\030o\031\243\233\254pw\231NBJ\245\252^wO\354\336`\242\301\215\235XXA\237/\374\247\202=\276\002\347?\202\357>!e\361\341\247\377\366?\213<\360J\257;'\201\003\333\371\247\357\231s\253\004\227 \316\265\022Q\375\303\306c\323\254\301\t\311\254\310e\322\376\245PD\304-p\3446\341\027x\370\024\026\274\223.N\014_\215\004\366o\333\352b4u3\000\205\2051\010oNGZpV\366\224\006<l\267N\323+L1\360\213u\341\212am\266\022zh\221\254\323\r\255\004]\004N\340+v1\020\331\223\016\234M=\273\252\323FCS\250\006m\036\220\272R\251\3405DrY\253\333\327Y\310{\366\351rV\317Ef\251\024{\314\232\334H\374\364\357\377'\361x\235!X\3446\234g|Bz6\342\2401\026b/\002\033\216a\240\260\211(\264\361\220\365\020\\\242\244\320K\026\241l\357 \004\212\241Yr\365)\022\024\311\260\256\211cJ\033S\324r\255e\200o\210\237vf\314\331s\343D\032~g\022\331D.x\201\037\013m\331\211\332)\346\310\301;\325DOR\370:8\343,\311M\274g\355\r\211\345\247 \326&d\032\362=\033>\rY\307-\036\364\320c\205\316/^.\220\333\\\270\\\215\227\243H\201x\2035\221\267\330\263P\025\301\302\211\n\362\213vl\r\014\004\275\245\303\272e\203\2463D\335z7\232_\240\343\246\026L\333K8\267\341a\241\357:<\334E%F\215\356^\206\036G\265\267\007\351\215i\356\253>\254\206X\336\017zb\010<1\234\226hnF\251\004\024\371\257<:UX4\371R\212\t\327\344\205\334\203\227\n\r\326={ \270\241\000N2\025\372\177<\274~j\211\337\010\273m,<k\177=\342`\253k\310uE\252\341\321e\327\005\241\241\307\315\033Jy\347T\207\315\375S\036\3775\223\024_\262\246I\025#f}\251\264\352\r\003\017\214c|X\2108\336\275F\303\177\207X6\322\316jA\370\275g\356\233]\330\026(\363\253\230\370\204\227\017\240\240Q\271u\005>\177,<~\362\350AX\340""\363\022\372\315\356\030\340Bv\035\202\302$&\210\030vg\211{\231#\366r\352\233I\350u\004\004\354o\310\221#\"\322S\000x\214.\370.G`B\307\245\330t\320\177 \005/\303\3440g\330-\036\321}\022\3027d_\267O~\207\022\356\023#\374b2I\354L\214%'U\320\035\265\343}\217\236\013\322\360\356G:\377\330\202\000\024w\261\307KW\330\235o\311\267}\301\3364!7J\336\272}Q\033\346\021\245\023\314\301\303c>\001j\307q\t\216\307o\234\220\340\304\004\227Np\231\215\2157\224Q\313m\234BBm\361\0149I\342\210'\t9\022h\213'\027\224\005G<\271\214\347$\353\353\211\350\251\273\024\245pQ\3126R\264)\305\224\n\232#\250\211Ir:\022X\223&f\342\026\204l\000Vv!\252=\237\003\\\311\013\377\2309\032\364\356\020\232\242\341\333\353N\020\326R\220\027\317p\035\226\005\006\310\004\\Eb\353H\255F\305\276\007\213\346\233\021W\276\3317\250\273N\266\261+/\254TbQ\362#\271j\306\330\274\214e\347\260d\301\212\246\312\030\210 Rzu\206=\263\013I\321\232>\214\013y\241\026w\301EW\350*\365[\211\363~a~=\305\305\375\377\257\030\366\034/\263\361\270\005\340\321\257z\351\252\023&\027^W\233\303\357ga\016%E\303\365\"\2567XqM*\276\021V6\305\032P\310\371Ezt\221^;\0244\017\326\356\2626\306\"\277\244)t\3134P\013I\031\360F\207\311\177M\220\370\335\365\rr\341/\353\267c\353?\374ec\343v\234,\374e\003w\203U\315\224i\302\326\027_|Q\251T\024\003\243\224\370(\035\016h\200\250\320w\377'\374^!1Ye\260_y\257\r\214\215J\350\346\215'\035\017\027\231<\005\272\274UV\014\206\252\202\210C%^\347B\245Z\347\227\336\332\0373pv\275\350\024d\342\002\200\340\333RH\321XmD\rv\335\320\313wXg\357\320\316\336\361%#6\016\366\013+\376\035\353\320\275t\266w\034\261C\036\265-\036\265\027\356)\367oB\343E\240\276\226\242(HJ\370w\026\212\246m1\275/\3135Y\322#\266\257\307,\221F\216\236\177sz4\355\214\334\266\016\337\252\366\225\032E\271\336\360\227\326\265\212\257\200%\023\036\320\275\3360\355\216H0\366\025\313F\260\214:\210\361\233\325\0236\250#7\245\2437\232\203\373\306\030[Eo9G\3553\007\313Q\205\"\266\234#\266\231#\266\226#\366\223\037\027\213O\016\366\341\347\276R6\213\337\312""\373\346S\271\272\366\275d%\3000\225p.\021\243Y\360 \247\262Z\361I+\356\216\340\306\210d\034\250eEK\2265]kA\330)\033\23389\247\347\360\300\007)5\320\t\334j\033\345\211P\311.\343\256vQQ\021!K\\.\327\014\340!\262\321\326\242\n\374\217D\026AspCG\307_\255:\335\027\204\307}\314)\301\274\306\352\266}1\0335\233\325\232\246\351c\222\230\253z\335\321$\217\356\270\264\245X\304\304w\314\231\030\351\211K3\266\240\257\rCQ*\366;\353JW\373\3264v\\\263\010\312\341\260\305V\024\313\270(\224\031\306\213\235\235\275\212Q\303\270\243\010\"\247\302\007\300\326\264-.U\323\324\255b\035\370U\227\200M\360\331\240\276\004=\000[\263\006%\203b<\260\001\334\2507^\326\215-\217\232\251\356\240\245XD\376\300'2X\205Q\307m\022:/\260\017\0109\007\205\360\"\276\206\326(\026\301\276\026wi:}\261\330l\362\305f\021\275/<\267\244\032\303\246\353\234\3163euTV\307\343d\025\354\20612|Ls\231\006\371\2653\240\217.\rt\353\034\020\213\364\032r\255j+\234[\305FJES\201\254\376\332*\005\277\255\033\234\355C\244\22657\0325\020\325\246n\262T?\373\017\2438\177.\305\376\3730\366\037\005\301\335\350\206\243\222\216\022\232\234\311\233E\0343\023\307\242X\244w\031\027M\030\362z\243X\303\017(v\224\323QGS\337\242\022c-m\265T\266n\345\365\024\273\364x\220\261\277_\254\025\367)\372'\007\337\261\370p!6z\214\237A\247\036\303\217/\023d\364\213~\304\317\224\267\345\362N\321\026\3213\r\234\337i\030%\026-\351u!\3056\300\3756L\335BJ%\254h\335c\270\220 \201V\251\246--\375\271\370\355\323\257\020\324\274K\260y7\034\026\243\0225\350>\377\031v8\000\361\332\217X\031\277G\0202\252\017-\"\253\313\007P\315(\232g\330\303\360,7\344V\206+k\303\265\312\260\"\377\374o3g\316\377\2463\337\371]w\247?\327\177>\270\177x\366\360\233#\356\370\334\247P\270\324\375s\317\354g\0077\006\205\301\032}\301\037\255\036I?\277\177\346\374l{\246={|\356\374\361\305km\251mv\240\306G\303\217>\357\026\216/^m\257\266\245\343\213\227\207\227\277\350\256vG\320'\347.\341/Wm\204\224;b\247\211e\037\276z\320\276Jqe\273\363\307\027/\265\337k\177\0174\210\235\275\256t|\351J[l""\357u\312\335\331\343\271\337t\270\316\375\356\331\356\327\275\317{RO\357\317\366o\364\013\375\247\375\203\303\231\343\253\237t\256w\337\355r\307s\377\334\221:fW\354\356\366\276\357\317\367\371\376j\177s03\270<\310\037\026N\346>\355$\272\322\360\326\277\035\315\037\211G\315\023\300\276\324Y\003\224\017{\317\372\237\016\204A\345p~\324N\341x\356:\264\215\350\322\275wz\363\307\037\377K\247\t\345\367{3\370\006\351\275\331]=\376\370\263\316\327\335\317\273RW\357\315\366n\364\n\275\247\300;\256_8\376\344\267\235\347\335{\335&\203\370\242\333D$=\276\267\332\223\373K\203\325\201t\362\361?wj\275\371\341\355o\217\244#s\270\366\354\344\334l{\266=\177\034\366\353\337\013?g\316\234\277\370J|\265\327.wf\217/\316\r\347\026\200\023\325\376\203\301\365\303\231\303\353G\347\206OV\217?\234m_\357\274\013\303\202\357\343\275\271\336\037\372\031\327\373\223\213\227\333\211\2164\374\227\225\303\371C\361\260\311\260^k?\003\366\315\340\300X\017\037\276z\206\215\236\234\273h\215Ns42\334\361\245\271\366\203\316l\347&\345]\241\273\nXrA,'(%\276JW\201\235\315\343\271\217;\357uVaT\257`\355n\2717{\374\321\245\351`7{3\275Yh\2170^\350voQN\364\3165\030+\256\273\002\203a\366\322\375s\203\031\344\307\345v\026H]\035\301\264\000\323S\030\216\263\275\007\375\217\007\263>\236\350G\210\377\202\207\327\264\346\360\223;0\262\231\301\325A\365\260\340b\264\3652\331\253\364\277\034\274\217/C\270|\321\215\357\303\233\226\200\306\007\334\300\205\352\303\033 H\325\336\327\254<\004\313\265P,\013\2418\026\202\030@W_!\232\217#\004i\230G\315\310\016\237\376q\370\307?\205\212\222\007\"\204\300h\314\377\371\210;\372f\270\366\247\341\237\376\034\201\331\005\021\202\371\263(\341\377\364\220;\274\1774\023.\371\326\313SP:\370\3540B\213\340\305\244!\361\3419\334:\212\306\205/O\203\357\267\207\322\341\336\221\024\216\317z\031\202\357B\024\276k\203f8.x\021\202\347\237\306\031\237k\207\315h\313\003/C\360\201\345'\235\037\301\\>\353_\037\234\005\377\363\301\241y\224\037>\243\202\345\230\235p\2470K\337\031\240\325\317\272W\231""\345\265E{\016\035J\341\370\334\177\032\321\352\253l\233\026\263\233\355\315\237\314]m?\357\024\300\220\315\014\347yp\030b\177w\360\354p\366\360\306a\341\360\351a\363\350\235\2438\030fW\347\246\304\326\235\353\376\001L\320L\3772\370\202\225\276\324\327\007\237\034\316\373\371p\202\3163\006\206\350\033h\330\034d\017\077\077,\037\315\035\201A=\276\235\370y\345=\344\371R{\2553\203\355~H\315\340lw\276+t\225\0360\374:\260`~\364\346\n\270\261\325\251J\301\256\242\263\0043\270\326;\337\237=\325\333\261\355`\377\026:\205\341o3\320c07\347_}\332\346\332\217\273\316\360|\211\303s\357U\263\375n;\335\241:;\013\025~\217\341\303%(\313u\362\3246\277\204f/]\247\306\2729$B\237\303@ M\007`\356*\276A\271\270\201\016\201}\311t)|\263\363N\347\363\216L\315\"zY\001|\377\273\003\250\3741V\355\024\216/}\322\271\002\343\363=\310\024\214\334w]\276\373\274w\017Xy\365sp\032\325\336\375\376\371\301\354`\236\032eo\321\361\265/\200\254\275^\031\010\263\336<\350\177\302@\007\253\276\"W\234q\343\350\273\341\372\306p\343\207\023h\357^\273\325y\210\241\021\203\227{\0344n\364\347m\346|f3\347\203\366\001\372\321\363\257~K=/{}\374\345\255\237?E\210\307\340zou\257\323\261\361\3010\353aI\314\225\266\300B4\3508\214\013\214\325G\257L\313\027\0025_\003\253v d\231?\236E\251\275\007\276\226\226~\321\371+\204)\334\311\245k\355Zw~x\363k0-\346\021\365s\334\211=\352\036\334\330\263f\347,0v5\252\241:\364\365\353~\260)4\000\177\350\237\246\261p\3745$9\200\375\277@\253\205\361\270\021\023`?\276\344\356\004\324\360\206\2367A\035\276\201\006 \030y\277S\351.\366\232}w\314\211\201^\201\275\224\273\313\240\364\263\376P\223J\347\361,\225C|6\250\005i\302(\007\332\242M\014o\210\020\333\256\272\332\240\310\2077\323\020\320J\241\330\261\237/\300\360\314\276Y\337\222H~T\337\356B\320=\377\346}\243\235\010\366\215\032\215)\373\206\326\202k\337\357\314\240\205\177\255\216\306\251\3725\243\272\232\007\311\\\353\317\274ig\273w\200e7\203#\331\375Wp6\302\324C\311\002\356\317iD\034\241\002\333\340\010\233\001\025\330\2078w&T\005\300\003""\177x\305e\255\301z\3348U\020\217\263\2702|\251\320\271\315\273\300\331\350 \036a7a\260\334\320\226\311:w\346\374G\257$\260o7\222=\211\305\365\231\366\225v\001\273\270G\335\374<\032p\034\350Y\374u\005\355\270e\320\035F1~,\323G\030\203\034\265\025s\237u\036t\251*.\240\2538\201\240`,\346Y6\226\016v\364\205\247l\341\"\306\036\360\201O#7\007V\3727\355B{\225vyx&\321+\374|\351\314{\027_-w\376\t\006m\257\267\325_\033\234?\234\035\236\205\2113\316\024 \202y\365\024j\237m\177\203\023l;\0302([\203\301\320l\373KJ\375\r \231\005D-&\274\330^\013\033\036\236]\036\254B\233\200\371~\373\002\235\366\227{\237\322\331\3616Lzo\035\201'\301\311-vn4\345ca\2075\234\310u\234\362\267X|c\317\001\343\240T\367\272\006\314b\317\222\356\271\336\314\317\317fP\210V\351$\037\203\274\213\257\370Wk\200\344Y\347rG\350H\307\027?\304\252\310\014\252I\356\347+s\307#n\317\266\347\330z\002\300Se\302a\232\373\004>\256\314\241\350^\236\360~\326\216\227N\240\017\264#\037X.\004\233\304\217o,\305\235\373\222r\354\201g\035\004$\026\273-\000\206\271\356\367\340] \226c\350/A\307\230\017\001\211\320av\311a\021\323\232@\311\311E\\\2170\2727\273\317z\327\373g\373\367\007\037@\330\355)|\207\032\202\312\340\326\341e\230\254\024\\X)/\206\363\367\016\205C\3518P\374\360\350\312\021\r\233h\347\336i\337h\027<\017V\367Y\317]\243f\365=\rl\276\202\346nrG\207g\201^\214=\0023n\264\265+\235*.\211\364.\203=\275\337\177\257\377G\\\332\010\314\273m\310\007\326\"\311\263\376U\020=)0\325\200\331\367\360,\014\010\233odp\220\321\372\201\241?\361\306\364\357\267+\235E4n\236\330\374\375\266\334Y\306%\002\177\244=<{\273\367U\277\371\363W\276^\340b\217\025~\276\003j\204\256\343)]\345y\320\373\014\275\024\304\355\327\006&\014\314\n\230\316\346\321\007G\373\303\347\030\317\371:\230aD!\n\\\255\330\244\023\200\357{\t4\254\203w\006_\036\276\007\023\276\315\243\231\243\331\243[\303\325\347\014G\260\353`)\350\237\256\215\225\267%v@\202.(\322%J\366\302\365\210\237\3613\360\257h([E\255Z-Z\371.g\212\025\255\250K\212!\027\331\005U\212\246Z@*\256q\312""\272\336j\230E\274\006E\331\225+\316+(\320ve\375\014\335\222,\342\276\003\335\2008\003eJ\365\000q\025\351b\353\377\005\250\246?\030";
    PyObject *data = __Pyx_DecompressString(cstring, 9067, 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 (32230 bytes) */
const char* const bytes = "(\n\n        >>> A = IntegerMatrix.from_matrix([[0,2],[3,4]])\n        >>> A.get_max_exp()\n        3\n\n        >>> A = IntegerMatrix.from_matrix([[0,2],[3,9]])\n        >>> A.get_max_exp()\n        4\n\n        Algorithm '%s' unknown.Apply moduluar reduction modulo `q` to this matrix.\n\n        :param q: modulus\n        :param int start_row: starting row\n        :param int start_col: starting column\n        :param int stop_row: last row (excluding)\n        :param int stop_col: last column (excluding)\n\n        >>> A = IntegerMatrix(2, 2)\n        >>> A[0,0] = 1001\n        >>> A[1,0] = 13\n        >>> A[0,1] = 102\n        >>> print(A)\n        [ 1001 102 ]\n        [   13   0 ]\n\n        >>> A.mod(10, start_row=1, start_col=0)\n        >>> print(A)\n        [ 1001 102 ]\n        [    3   0 ]\n\n        >>> A.mod(10)\n        >>> print(A)\n        [ 1 2 ]\n        [ 3 0 ]\n\n        >>> A = IntegerMatrix(2, 2)\n        >>> A[0,0] = 1001\n        >>> A[1,0] = 13\n        >>> A[0,1] = 102\n        >>> A.mod(10, stop_row=1)\n        >>> print(A)\n        [  1 2 ]\n        [ 13 0 ]\n\n        \n        Assign value to index.\n\n        :param key: a tuple of row and column indices\n        :param value: an integer\n\n        Example::\n\n            >>> from fpylll import IntegerMatrix\n            >>> A = IntegerMatrix(10, 10)\n            >>> A.gen_identity(10)\n            >>> A[1,0] = 2\n            >>> A[1,0]\n            2\n\n        Arbitrary precision integers are supported::\n\n            >>> A[0, 0] = 2**2048\n\n        The notation ``A[i][j]`` is not supported.  This is because ``A[i]`` returns an object\n        of type ``IntegerMatrixRow`` object which is immutable by design.  This is to avoid the\n        user confusing such an object with a proper vector.::\n\n            >>> A[1][0] = 2\n            Traceback (most recent call last):\n            ...\n            TypeError: 'fpylll.fplll.integer_matrix.IntegerMatrixRow' object does not support ""item assignment\n\n        Cannot determine number of rows.Construct a new identity matrix of dimension ``nrows \303\227 nrows``\n\n        :param nrows: number of rows.\n\n        >>> A = IntegerMatrix.identity(4)\n        >>> print(A)\n        [ 1 0 0 0 ]\n        [ 0 1 0 0 ]\n        [ 0 0 1 0 ]\n        [ 0 0 0 1 ]\n\n        Construct a new integer matrix from matrix-like object A\n\n        :param A: a matrix like object, with element access A[i,j] or A[i][j]\n        :param nrows: number of rows (optional)\n        :param ncols: number of columns (optional)\n\n\n        >>> A = IntegerMatrix.from_matrix([[1,2,3],[4,5,6]])\n        >>> print(A)\n        [ 1 2 3 ]\n        [ 4 5 6 ]\n\n        Construct a new integer matrix from matrix-like object A\n\n        :param nrows: number of rows\n        :param ncols: number of columns\n        :param it: an iterable of length at least ``nrows * ncols``\n\n        >>> A = IntegerMatrix.from_iterable(2,3, [1,2,3,4,5,6])\n        >>> print(A)\n        [ 1 2 3 ]\n        [ 4 5 6 ]\n\n        Construct a new integer matrix\n\n        :param arg0: number of rows \342\211\245 0 or matrix\n        :param arg1: number of columns \342\211\245 0 or ``None``\n\n        The default constructor takes the number of rows and columns::\n\n            >>> from fpylll import IntegerMatrix\n            >>> IntegerMatrix(10, 10) # doctest: +ELLIPSIS\n            <IntegerMatrix(10, 10) at 0x...>\n\n            >>> IntegerMatrix(10, 0) # doctest: +ELLIPSIS\n            <IntegerMatrix(10, 0) at 0x...>\n\n            >>> IntegerMatrix(-1,  0)\n            Traceback (most recent call last):\n            ...\n            ValueError: Number of rows must be >0\n\n        The default constructor is also a copy constructor::\n\n            >>> A = IntegerMatrix(2, 2)\n            >>> A[0,0] = 1\n            >>> B = IntegerMatrix(A)\n            >>> B[0,0]\n            1\n            >>> A[0,0] = 2\n            >>> B[0,0]\n            1\n\n        ""IntegerMatrix also supports numpy's integer types, if numpy is supported.\n        See tests/test_numpy.py for example usage.\n        Construct a new submatrix.\n\n        :param a: either the index of the first row or an iterable of row indices\n        :param b: either the index of the first column or an iterable of column indices\n        :param c: the index of first excluded row (or ``None``)\n        :param d: the index of first excluded column (or ``None``)\n        :returns:\n        :rtype:\n\n        We illustrate the calling conventions of this function using a 10 x 10 matrix::\n\n            >>> from fpylll import IntegerMatrix, FPLLL\n            >>> A = IntegerMatrix(10, 10)\n            >>> FPLLL.set_random_seed(1337)\n            >>> A.randomize(\"ntrulike\", bits=22, q=4194319)\n            >>> print(A)\n            [ 1 0 0 0 0 3021421  752690 1522220 2972677  119630 ]\n            [ 0 1 0 0 0  119630 3021421  752690 1522220 2972677 ]\n            [ 0 0 1 0 0 2972677  119630 3021421  752690 1522220 ]\n            [ 0 0 0 1 0 1522220 2972677  119630 3021421  752690 ]\n            [ 0 0 0 0 1  752690 1522220 2972677  119630 3021421 ]\n            [ 0 0 0 0 0 4194319       0       0       0       0 ]\n            [ 0 0 0 0 0       0 4194319       0       0       0 ]\n            [ 0 0 0 0 0       0       0 4194319       0       0 ]\n            [ 0 0 0 0 0       0       0       0 4194319       0 ]\n            [ 0 0 0 0 0       0       0       0       0 4194319 ]\n\n        We can either specify start/stop rows and columns::\n\n            >>> print(A.submatrix(0,0,2,8))\n            [ 1 0 0 0 0 3021421  752690 1522220 ]\n            [ 0 1 0 0 0  119630 3021421  752690 ]\n\n        Or we can give lists of rows, columns explicitly::\n\n            >>> print(A.submatrix([0,1,2],range(3,9)))\n            [ 0 0 3021421  752690 1522220 2972677 ]\n            [ 0 0  119630 3021421  752690 1522220 ]\n            [ 0 0 2972677  119630 3021421  752690 ]\n\n    ""    Construct new matrix from file.\n\n        >>> import tempfile\n        >>> A = IntegerMatrix.random(10, \"qary\", k=5, bits=20)\n\n        >>> fn = tempfile.mktemp()\n        >>> fh = open(fn, \"w\")\n        >>> _ = fh.write(str(A))\n        >>> fh.close()\n\n        >>> B = IntegerMatrix.from_file(fn)\n        >>> A == B\n        True\n\n        :param filename: name of file to read from\n\n        \n        Construct new random matrix.\n\n        :param d: dominant size parameter, see below for details\n        :param algorithm: type of matrix create, see below for details\n        :param int_type: underlying integer type\n\n        :returns: a random lattice basis\n\n        Examples::\n\n            >>> from fpylll import FPLLL\n            >>> FPLLL.set_random_seed(1337)\n\n            >>> print(IntegerMatrix.random(10, \"intrel\", bits=30))\n            [  285965362 1 0 0 0 0 0 0 0 0 0 ]\n            [  714553900 0 1 0 0 0 0 0 0 0 0 ]\n            [ 1017994245 0 0 1 0 0 0 0 0 0 0 ]\n            [  256743299 0 0 0 1 0 0 0 0 0 0 ]\n            [  602398079 0 0 0 0 1 0 0 0 0 0 ]\n            [  159503182 0 0 0 0 0 1 0 0 0 0 ]\n            [  450941699 0 0 0 0 0 0 1 0 0 0 ]\n            [  125249023 0 0 0 0 0 0 0 1 0 0 ]\n            [  158876382 0 0 0 0 0 0 0 0 1 0 ]\n            [  514616289 0 0 0 0 0 0 0 0 0 1 ]\n\n        ::\n\n            >>> FPLLL.set_random_seed(1337)\n            >>> print(IntegerMatrix.random(10, \"simdioph\", bits=10, bits2=30))\n            [ 1073741824   50  556    5  899  383  846  771  511  734 ]\n            [          0 1024    0    0    0    0    0    0    0    0 ]\n            [          0    0 1024    0    0    0    0    0    0    0 ]\n            [          0    0    0 1024    0    0    0    0    0    0 ]\n            [          0    0    0    0 1024    0    0    0    0    0 ]\n            [          0    0    0    0    0 1024    0    0    0    0 ]\n            [          0    0    0    0    0    0 1024    0    0    0 ]""\n            [          0    0    0    0    0    0    0 1024    0    0 ]\n            [          0    0    0    0    0    0    0    0 1024    0 ]\n            [          0    0    0    0    0    0    0    0    0 1024 ]\n\n\n        ::\n\n            >>> FPLLL.set_random_seed(1337)\n            >>> print(IntegerMatrix.random(10, \"uniform\", bits=10))\n            [  50 556   5 899 383 846  771 511 734 993 ]\n            [ 325  12 242  43 374 815  437 260 541  50 ]\n            [ 492 174 215 999 186 189  292 497 832 966 ]\n            [ 508 290 160 247 859 817  669 821 258 930 ]\n            [ 510 933 588 895  18 546  393 868 858 790 ]\n            [ 620  72 832 133 263 121  724  35 454 385 ]\n            [ 431 347 749 311 911 937   50 160 322 180 ]\n            [ 517 941 184 922 217 563 1008 960  37  85 ]\n            [   5 855 643 824  43 525   37 988 886 118 ]\n            [  27 944 560 993 662 589   20 694 696 205 ]\n\n        ::\n\n            >>> FPLLL.set_random_seed(1337)\n            >>> print(IntegerMatrix.random(5, \"ntrulike\", q=127))\n            [ 1 0 0 0 0  25  50  44   5   3 ]\n            [ 0 1 0 0 0   3  25  50  44   5 ]\n            [ 0 0 1 0 0   5   3  25  50  44 ]\n            [ 0 0 0 1 0  44   5   3  25  50 ]\n            [ 0 0 0 0 1  50  44   5   3  25 ]\n            [ 0 0 0 0 0 127   0   0   0   0 ]\n            [ 0 0 0 0 0   0 127   0   0   0 ]\n            [ 0 0 0 0 0   0   0 127   0   0 ]\n            [ 0 0 0 0 0   0   0   0 127   0 ]\n            [ 0 0 0 0 0   0   0   0   0 127 ]\n\n        ::\n\n            >>> FPLLL.set_random_seed(1337)\n            >>> print(IntegerMatrix.random(5, \"ntrulike2\", q=127))\n            [ 127   0   0   0   0 0 0 0 0 0 ]\n            [   0 127   0   0   0 0 0 0 0 0 ]\n            [   0   0 127   0   0 0 0 0 0 0 ]\n            [   0   0   0 127   0 0 0 0 0 0 ]\n            [   0   0   0   0 127 0 0 0 0 0 ]\n            [  25   3   5  44  50 1 0 0 0 0 ]\n            [  50  25   3   5  44 0 1 0 0 0 ]\n     ""       [  44  50  25   3   5 0 0 1 0 0 ]\n            [   5  44  50  25   3 0 0 0 1 0 ]\n            [   3   5  44  50  25 0 0 0 0 1 ]\n\n        ::\n\n            >>> FPLLL.set_random_seed(1337)\n            >>> print(IntegerMatrix.random(10, \"qary\", k=8, q=127))\n            [ 1 0  50  44   5   3  78   3  94  97 ]\n            [ 0 1  69  12 114  43 118  47  53   4 ]\n            [ 0 0 127   0   0   0   0   0   0   0 ]\n            [ 0 0   0 127   0   0   0   0   0   0 ]\n            [ 0 0   0   0 127   0   0   0   0   0 ]\n            [ 0 0   0   0   0 127   0   0   0   0 ]\n            [ 0 0   0   0   0   0 127   0   0   0 ]\n            [ 0 0   0   0   0   0   0 127   0   0 ]\n            [ 0 0   0   0   0   0   0   0 127   0 ]\n            [ 0 0   0   0   0   0   0   0   0 127 ]\n\n        ::\n\n            >>> FPLLL.set_random_seed(1337)\n            >>> print(IntegerMatrix.random(10, \"trg\", alpha=0.99))\n            [  228404      0     0      0     0     0    0    0    0   0 ]\n            [  -80428  34992     0      0     0     0    0    0    0   0 ]\n            [ -104323  -3287 24449      0     0     0    0    0    0   0 ]\n            [  -54019  -5306  9234  42371     0     0    0    0    0   0 ]\n            [  -17118 -13604  6537 -10587  4082     0    0    0    0   0 ]\n            [  108869   8134  4954 -17719 -1984 15326    0    0    0   0 ]\n            [ -111858  -7328  5192   8105 -1109  1910 5818    0    0   0 ]\n            [  -97654 -16219 -2181  14658 -1879  7195 -100 2347    0   0 ]\n            [  -46340  13109  6265  12205 -1848  6113 1049 -170 1810   0 ]\n            [   10290  16293  4131  -4313  -525  2068 -262  248  715 592 ]\n\n        Available Algorithms:\n\n            - ``\"intrel\"`` - (``bits`` = `b`) generate a knapsack like matrix of dimension `d \303\227\n              (d+1)` and `b` bits: the i-th vector starts with a random integer of bit-length `\342\211\244 b`\n              and the rest is the i-th canonical unit vect""or.\n\n            - ``\"simdioph\"`` - (``bits`` = `b_1`, ``bits2`` = `b_2`) generate a `d \303\227 d` matrix of a\n              form similar to that is involved when trying to find rational approximations to reals\n              with the same small denominator. The first vector starts with a random integer of\n              bit-length `\342\211\244 b_2` and continues with `d-1` independent integers of bit-lengths `\342\211\244\n              b_1`; the i-th vector for `i>1` is the i-th canonical unit vector scaled by a factor\n              `2^{b_1}`.\n\n            - ``\"uniform\"`` - (``bits`` = `b`) - generate a `d \303\227 d` matrix whose entries are independent\n              integers of bit-lengths `\342\211\244 b`.\n\n            - ``\"ntrulike\"`` - (``bits`` = `b` or ``q``) generate a `2d \303\227 2d` NTRU-like matrix. If\n              ``bits`` is given, then it first samples an integer `q` of bit-length `\342\211\244 b`, whereas\n              if ``q``, then it sets `q` to the provided value. Then it samples a uniform `h` in the\n              ring `Z_q[x]/(x^n-1)`. It finally returns the 2 x 2 block matrix `[[I, rot(h)], [0,\n              qI]]`, where each block is `d x d`, the first row of `rot(h)` is the coefficient\n              vector of `h`, and the i-th row of `rot(h)` is the shift of the (i-1)-th (with last\n              entry put back in first position), for all i>1.\n\n            - ``ntrulike2\"`` - (``bits`` = `b` or ``q``) as the previous option, except that the\n              constructed matrix is `[[qI, 0], [rot(h), I]]`.\n\n            - ``\"qary\"`` - (``bits`` = `b` or ``q``, ``k``) generate a `d \303\227 d` q-ary matrix with\n              determinant `q^k`. If ``bits`` is given, then it first samples an integer `q` of\n              bit-length `\342\211\244 b`; if ``q`` is provided, then set `q` to the provided value. It returns\n              a `2 x 2` block matrix `[[qI, 0], [H, I]]`, where `H` is `k x (d-k)` and uniformly\n    ""          random modulo q. These bases correspond to the SIS/LWE q-ary lattices. Goldstein-Mayer\n              lattices correspond to `k=1` and `q` prime.\n\n            - ``\"trg\"`` - (``alpha``) generate a `d \303\227 d` lower-triangular matrix `B` with\n              `B_{ii} = 2^{(d-i+1)^\\alpha}` for all `i`, and `B_{ij}` is uniform between\n              `-B_{jj}/2` and `B_{jj}/2` for all `j<i`.\n\n        :warning: The NTRU options above do *not* produce genuine NTRU lattice with an unusually\n            short dense sublattice.\n\n        :seealso: :func:`~IntegerMatrix.randomize`\n        Create a row reference.\n\n        :param IntegerMatrix M: Integer matrix\n        :param int row: row index\n\n        Row references are immutable::\n\n            >>> from fpylll import IntegerMatrix\n            >>> A = IntegerMatrix(2, 3)\n            >>> A[0,0] = 1; A[0,1] = 2; A[0,2] = 3\n            >>> r = A[0]\n            >>> r[0]\n            1\n            >>> r[0] = 1\n            Traceback (most recent call last):\n            ...\n            TypeError: 'fpylll.fplll.integer_matrix.IntegerMatrixRow' object does not support item assignment\n\n        Either 'q' or 'bits' is required.\n        Example::\n\n            >>> from fpylll import IntegerMatrix\n            >>> A = IntegerMatrix(2, 3)\n            >>> A[0,0] = 1; A[0,1] = 2; A[0,2] = 3\n            >>> print(repr(A[0]))  # doctest: +ELLIPSIS\n            row 0 of <IntegerMatrix(2, 3) at 0x...>\n\n        In-place add row vector ``2^expo \342\213\205 x \342\213\205 v``\n\n        :param IntegerMatrixRow v: a row vector\n        :param x: multiplier\n        :param int expo: scaling exponent.\n\n        Example::\n\n            >>> A = IntegerMatrix.from_matrix([[0,2],[3,4]])\n            >>> A[0].addmul(A[1])\n            >>> print(A[0])\n            (3, 6)\n\n            >>> A = IntegerMatrix.from_matrix([[0,2],[3,4]])\n            >>> A[0].addmul(A[1],x=0)\n            >>> print(A[0])\n           "" (0, 2)\n\n            >>> A = IntegerMatrix.from_matrix([[0,2],[3,4]])\n            >>> A[0].addmul(A[1],x=1,expo=2)\n            >>> print(A[0])\n            (12, 18)\n\n        \n        In-place add row vector ``v``\n\n        :param IntegerMatrixRow v: a row vector\n\n        Example::\n\n            >>> A = IntegerMatrix.from_matrix([[0,2],[3,4]])\n            >>> A[0] += A[1]\n            >>> print(A[0])\n            (3, 6)\n            >>> v = A[0]\n            >>> v += A[1]\n            >>> print(A[0])\n            (6, 10)\n\n        \n        In-place subtract row vector ``v``\n\n        :param IntegerMatrixRow v: a row vector\n\n        Example::\n\n            >>> A = IntegerMatrix.from_matrix([[0,2],[3,4]])\n            >>> A[0] -= A[1]\n            >>> print(A[0])\n            (-3, -2)\n            >>> v = A[0]\n            >>> v -= A[1]\n            >>> print(A[0])\n            (-6, -6)\n\n        \n        Index at which an all zero vector starts.\n\n        Example::\n\n            >>> A = IntegerMatrix.from_matrix([[0,2,3],[0,2,0],[0,0,0]])\n            >>> A[0].size_nz()\n            3\n            >>> A[1].size_nz()\n            2\n            >>> A[2].size_nz()\n            0\n\n        \n        Inline transpose.\n\n        >>> A = IntegerMatrix.from_matrix([[0,2],[3,4]])\n        >>> _ = A.transpose()\n        >>> print(A)\n        [ 0 3 ]\n        [ 2 4 ]\n\n        Inputs to submatrix not understood.<IntegerMatrix(IntegerMatrixRow.__abs__ (line 109)IntegerMatrixRow.__iadd__ (line 200)IntegerMatrixRow.__init__ (line 31)IntegerMatrixRow.__isub__ (line 226)IntegerMatrixRow.__repr__ (line 90)IntegerMatrixRow.__str__ (line 70)IntegerMatrixRow.addmul (line 252)IntegerMatrixRow.is_zero (line 157)IntegerMatrixRow.size_nz (line 177)IntegerMatrix.__getitem__ (line 877)IntegerMatrix.__init__ (line 298)IntegerMatrix.__mul__ (line 1364)IntegerMatrix.__reduce__ (line 801)IntegerMatrix.__setitem__ (line 924)IntegerMatrix.from_file (line 1660)IntegerMatrix.""from_iterable (line 413)IntegerMatrix.from_matrix (line 363)IntegerMatrix.get_max_exp (line 1341)IntegerMatrix.identity (line 431)IntegerMatrix.mod (line 1417)IntegerMatrix.ncols.__get__ (line 856)IntegerMatrix.nrows.__get__ (line 843)IntegerMatrix.random (line 449)IntegerMatrix.rotate_gram_left (line 1284)IntegerMatrix.rotate_gram_right (line 1303)IntegerMatrix.rotate_left (line 1214)IntegerMatrix.rotate (line 1250)IntegerMatrix.rotate_right (line 1232)IntegerMatrix.set_iterable (line 670)IntegerMatrix.set_matrix (line 630)IntegerMatrix.submatrix (line 1542)IntegerMatrix.swap_rows (line 1193)IntegerMatrix.to_matrix (line 705)IntegerMatrix.transpose (line 1322)Integer type '%s' not understood.Last column (Last row (Naive matrix \303\227 matrix products.\n\n        :param IntegerMatrix A: m \303\227 n integer matrix A\n        :param IntegerMatrix B: n \303\227 k integer matrix B\n        :returns: m \303\227 k integer matrix C = A \303\227 B\n\n        >>> from fpylll import FPLLL\n        >>> FPLLL.set_random_seed(1337)\n        >>> A = IntegerMatrix(2, 2)\n        >>> A.randomize(\"uniform\", bits=2)\n        >>> print(A)\n        [ 2 0 ]\n        [ 1 3 ]\n\n        >>> B = IntegerMatrix(2, 2)\n        >>> B.randomize(\"uniform\", bits=2)\n        >>> print(B)\n        [ 3 2 ]\n        [ 3 3 ]\n\n        >>> print(A*B)\n        [  6  4 ]\n        [ 12 11 ]\n\n        >>> print(B*A)\n        [ 8 6 ]\n        [ 9 9 ]\n\n        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.Number of Columns\n\n        :returns: number of columns\n\n        >>> from fpylll import IntegerMatrix\n        >>> IntegerMatrix(10, 10).ncols\n        10\n\n        Number of Rows\n\n        :returns: number of rows\n\n        >>> from fpylll import IntegerMatrix\n        >>> IntegerMatrix(10, 10).nrows\n        10\n\n        Number of columns must be >0Numbe""r of columns of A (Number of rows must be >0Only != and == are implemented for integer matrices.Parameter '%s' not understood.Parameters arg0 and arg1 not understood\n        Return ``True`` if this vector consists of only zeros starting at index ``frm``\n\n        Example::\n\n            >>> A = IntegerMatrix.from_matrix([[1,0,0]])\n            >>> A[0].is_zero()\n            False\n            >>> A[0].is_zero(1)\n            True\n\n        Return \342\204\223_2 norm of this vector.\n\n        Example::\n\n            >>> A = IntegerMatrix.from_iterable(1, 3, [1,2,3])\n            >>> A[0].norm()  # doctest: +ELLIPSIS\n            3.74165...\n            >>> 1*1 + 2*2 + 3*3\n            14\n            >>> from math import sqrt\n            >>> sqrt(14)  # doctest: +ELLIPSIS\n            3.74165...\n\n        \n        Rotates the order of the elements in the range [first,last), in such a way that the element\n        pointed by middle becomes the new first element.\n\n        ``(M[first],\342\200\246,M[middle-1],M[middle],M[last])`` becomes\n        ``(M[middle],\342\200\246,M[last],M[first],\342\200\246,M[middle-1])``\n\n        :param int first: first index\n        :param int middle: new first index\n        :param int last: last index (inclusive)\n\n        >>> A = IntegerMatrix.from_matrix([[0,1,2],[3,4,5],[6,7,8]])\n        >>> A.rotate(0,0,2)\n        >>> print(A)\n        [ 0 1 2 ]\n        [ 3 4 5 ]\n        [ 6 7 8 ]\n\n        >>> A = IntegerMatrix.from_matrix([[0,1,2],[3,4,5],[6,7,8]])\n        >>> A.rotate(0,2,2)\n        >>> print(A)\n        [ 6 7 8 ]\n        [ 0 1 2 ]\n        [ 3 4 5 ]\n\n        Row permutation.\n\n        ``(M[first],\342\200\246,M[last])`` becomes ``(M[first+1],\342\200\246,M[last],M[first])``\n\n        :param int first:\n        :param int last:\n\n        >>> A = IntegerMatrix.from_matrix([[0,2],[3,4]])\n\n        Row permutation.\n\n        ``(M[first],\342\200\246,M[last])`` becomes ``(M[last],M[first],\342\200\246,M[l""ast-1])``\n\n        :param int first:\n        :param int last:\n\n        >>> A = IntegerMatrix.from_matrix([[0,2],[3,4]])\n\n        Select a row or entry.\n\n        :param key: an integer for the row, a tuple for row and column or a slice.\n        :returns: a reference to a row or an integer depending on format of ``key``\n\n        >>> from fpylll import IntegerMatrix\n        >>> A = IntegerMatrix(10, 10)\n        >>> A.gen_identity(10)\n        >>> A[1,0]\n        0\n\n        >>> print(A[1])\n        (0, 1, 0, 0, 0, 0, 0, 0, 0, 0)\n\n        >>> print(A[0:2])\n        [ 1 0 0 0 0 0 0 0 0 0 ]\n        [ 0 1 0 0 0 0 0 0 0 0 ]\n\n        Serialize this matrix\n\n        >>> import pickle\n        >>> A = IntegerMatrix.random(10, \"uniform\", bits=20)\n        >>> pickle.loads(pickle.dumps(A)) == A\n        True\n\n        Set this matrix from iterable A\n\n        :param A: an iterable object such as a list or tuple\n\n        EXAMPLE::\n\n            >>> z = range(16)\n            >>> A = IntegerMatrix(4, 4)\n            >>> A.set_iterable(z)\n            >>> print(A)\n            [  0  1  2  3 ]\n            [  4  5  6  7 ]\n            [  8  9 10 11 ]\n            [ 12 13 14 15 ]\n\n            >>> A = IntegerMatrix(3, 3)\n            >>> A.set_iterable(z)\n            >>> print(A)\n            [ 0 1 2 ]\n            [ 3 4 5 ]\n            [ 6 7 8 ]\n\n        .. warning:: entries starting at ``A[nrows * ncols]`` are ignored.\n\n        Set this matrix from matrix-like object A.\n\n        :param A: a matrix like object, with element access A[i,j] or A[i][j]\n\n        Example::\n\n            >>> z = [[1,2,3,4], [5,6,7,8], [9,10,11,12], [13,14,15,16]]\n            >>> A = IntegerMatrix(4, 4)\n            >>> A.set_matrix(z)\n            >>> print(A)\n            [  1  2  3  4 ]\n            [  5  6  7  8 ]\n            [  9 10 11 12 ]\n            [ 13 14 15 16 ]\n\n\n            >>> A = IntegerMatrix(3, 3)\n            >>> A.set_matrix(z)\n            >>""> print(A)\n            [ 1  2  3 ]\n            [ 5  6  7 ]\n            [ 9 10 11 ]\n\n        .. warning:: entries starting from ``A[nrows, ncols]`` are ignored.\n\n        \n        String representation of this row.\n\n        Example::\n\n            >>> from fpylll import IntegerMatrix\n            >>> A = IntegerMatrix(2, 3)\n            >>> A[0,0] = 1; A[0,1] = 2; A[0,2] = 3\n            >>> print(str(A[0]))\n            (1, 2, 3)\n\n        \n        Transformation needed to update the lower triangular Gram matrix when\n        ``rotateLeft(first, last)`` is done on the basis of the lattice.\n\n        :param int first:\n        :param int last:\n        :param int n_valid_rows:\n\n        >>> A = IntegerMatrix.from_matrix([[0,2],[3,4]])\n\n        \n        Transformation needed to update the lower triangular Gram matrix when\n        ``rotateRight(first, last)`` is done on the basis of the lattice.\n\n        :param int first:\n        :param int last:\n        :param int n_valid_rows:\n\n        >>> A = IntegerMatrix.from_matrix([[0,2],[3,4]])\n\n        Write this matrix to matrix-like object A\n\n        :param A: a matrix like object, with element access A[i,j] or A[i][j]\n        :returns: A\n\n        Example::\n\n            >>> from fpylll import FPLLL\n            >>> z = [[0 for _ in range(10)] for _ in range(10)]\n            >>> A = IntegerMatrix.random(10, \"qary\", q=127, k=5)\n            >>> _ = A.to_matrix(z)\n            >>> z[0] == list(A[0])\n            True\n\n        .?, )>[] \n\\[+([^\\]]+) *\\]add_note) at %%%dddisable) does not match number of rows of B (enable) < first column () < first row (fpylll.fplll.mathfpylll.fplll.regcisenabled of \n\n        :param int r1:\n        :param int r2:\n\n        >>> A = IntegerMatrix.from_matrix([[0,2],[3,4]])\n        >>> A.swap_rows(0, 1)\n        >>> print(A)\n        [ 3 4 ]\n        [ 0 2 ]\n\n\n        row src/fpylll/fplll/integer_matrix.pyxABIntegerMatrixRowIntegerMatrixRow.__reduce__""IntegerMatrixRow.addmulIntegerMatrixRow.is_zeroIntegerMatrixRow.size_nzIntegerMatrixIntegerMatrix.__copy__IntegerMatrix.__reduce__IntegerMatrix.apply_transformIntegerMatrix.clearIntegerMatrix.from_fileIntegerMatrix.from_iterableIntegerMatrix.from_matrixIntegerMatrix.gen_identityIntegerMatrix.get_max_expIntegerMatrix.identityIntegerMatrix.is_emptyIntegerMatrix.modIntegerMatrix.multiply_leftIntegerMatrix.randomIntegerMatrix.randomizeIntegerMatrix.resizeIntegerMatrix.rotateIntegerMatrix.rotate_gram_leftIntegerMatrix.rotate_gram_rightIntegerMatrix.rotate_leftIntegerMatrix.rotate_rightIntegerMatrix.set_colsIntegerMatrix.set_iterableIntegerMatrix.set_matrixIntegerMatrix.set_rowsIntegerMatrix.submatrixIntegerMatrix.swap_rowsIntegerMatrix.to_matrixIntegerMatrix.transposeM__Pyx_PyDict_NextRefSUa__abs__addmulalgorithmalphaappendapply_transformarg0arg1asyncio.coroutinesbbitsbits2cceil__class_getitem__clearcline_in_tracebackclscolcols__copy__d__dict__e__enter__enumerate__exit__expofhfilenamefirstfloorfpylll.fplll.integer_matrixfrmfrom_filefrom_iterablefrom_matrix__func__gen_identityget_max_expgroupsiididentityindicesint_typeintrel_is_coroutineis_emptyis_zeroititemsjkkwdsllast__len__linelog10long_mm__main__mapmatchmathmiddlemod__module__mpzmsgmultiply_leftnn_valid_rows__name__ncolsnextnormnrowsntrulikentrulike2openpop__pyx_vtable__qq2_q_qary__qualname__rr1r2randomrandomizerereadlines__reduce__resizerotaterotate_gram_leftrotate_gram_rightrotate_leftrotate_rightrowrowsselfset_colsset_iterableset_matrix__set_name__set_rowssetdefaultsimdiophsize_nzsplitsqrtstartstart_colstart_rowstop_colstop_rowstripsubmatrixswap_rowst1t2t_longt_mpz__test__tmptmp_ltmp_mpzto_matrixtransposetrg_typeuniformunpickle_IntegerMatrixvvaluesxx_l_x_mpz_PyObject *(PyObject *)\000int (int &, int &, int, int)\000check_int_type\000preprocess_indicesPyObject *(mpz_srcptr)\000int (__mpz_struct *, PyObject *)\000int (fplll::Z_NR<mpz_t>  &, PyObject *)\000mpz_get_python\000assign_mpz\000assign_Z_NR_mpzPyObject *(mpz_""srcptr)\000mpz_get_pyintlongcysigs_t\000cysigs\320\0041\3201B\320BS\320Sd\320de\360J\001\000\t\033\230!\230;\240k\260\024\260W\270D\300\004\300G\3101\330\010\032\230!\230:\240Z\250t\2607\270\"\270A\270S\300\004\300G\3102\310Q\310a\360\006\000\t\021\220\001\220\021\330\010\t\330\014\026\220a\220t\2301\330\010\017\320\017$\240A\330\014\025\220Q\220a\330\014\022\320\022%\240Q\240a\360\006\000\t\021\220\001\220\021\340\010\020\220\001\220\021\360\006\000\t\021\220\001\220\021\330\010\025\220Q\220e\2304\230q\360\006\000\t\r\210E\220\025\220a\220t\2307\240!\330\014\020\220\005\220U\230!\2304\230w\240a\330\020\023\2204\220w\230c\240\021\330\024\033\2301\230D\240\004\240F\250$\250a\250r\260\021\260\"\260A\260R\260y\300\001\330\025\031\230\027\240\003\2401\330\024\036\230a\230t\2404\240v\250U\260!\2602\260Q\260b\270\001\270\022\2709\300A\340\024\032\230,\240a\320'J\310!\3104\310q\340\020\023\220:\230S\240\004\240I\250T\260\032\2703\270d\300!\330\024\033\2301\230D\240\004\240A\330\024\027\220w\230a\230t\2405\250\002\250!\330\030\037\230q\240\004\240D\250\001\330\024\027\220t\2307\240#\240Q\330\030\034\230F\240$\240a\240r\250\021\250\"\250A\250R\250t\2601\260A\330\031\035\230W\240C\240q\330\030\034\230F\240%\240q\250\002\250!\2502\250Q\250e\260:\270Q\270a\340\030\036\230l\250!\320+N\310a\310t\320ST\340\010\021\220\021\220!\330\010\021\220\021\220!\330\010\021\220\021\220!\330\010\021\220\021\220!\200A\3606\000\t\014\2104\210w\220c\230\021\330\014\024\320\024*\250$\250f\260E\270\027\300\001\300\027\310\010\320PQ\330\r\021\220\027\230\003\2301\330\014\024\320\024)\250\024\250V\2606\270\027\300\001\300\027\310\010\320PQ\340\014\022\220,\230a\320\037B\300!\3004\300q\200A\3606\000\t\026\220T\230\027\240\001\330\010\025\220T\230\027\240\001\330\010\r\210T\220\021\220!\340\010\014\210E\220\025\220a\220q\330\014\020\220\005\220U\230!\2301\330\020\024\220E\230\021\230#\230S\240\004\240A\240Q\200A\3608\000\t\026\220T\230\027\240\001\330\010\025\220T\230\027\240\001\340\010\t\330\014""\020\220\005\220U\230!\2301\330\020\024\220E\230\025\230a\230q\330\024\030\230\005\230Q\230c\240\023\240A\240Q\240c\250\021\330\017\020\330\014\020\220\005\220U\230!\2301\330\020\024\220E\230\025\230a\230q\330\024\030\230\005\230Q\230c\240\023\240A\240Q\240b\250\001\250\021\200A\360 \000\t\014\2104\210r\220\027\230\003\2301\330\014\023\2204\220r\230\026\230t\2401\240B\240a\240t\2505\260\010\270\001\330\r\021\220\022\2207\230#\230Q\330\014\023\2204\220r\230\026\230u\240A\240R\240q\250\004\250E\260\030\270\021\340\014\022\220,\230a\320\037B\300!\3004\300r\310\021\200A\360\n\000\t\014\2104\210w\220c\230\021\330\014\023\2204\220r\320\031/\250t\2606\270\025\270f\300A\330\r\021\220\027\230\003\2301\330\014\023\2204\220r\320\031.\250d\260&\270\006\270f\300A\340\014\022\220,\230a\320\037B\300!\3004\300q\200A\360\014\000\t\014\2104\210w\220c\230\021\330\r#\2404\240v\250U\260)\2701\270A\330\r\021\220\027\230\003\2301\330\r\"\240$\240f\250F\260)\2701\270A\340\014\022\220,\230a\320\037B\300!\3004\300q\200A\360\026\000\t\014\2104\210w\220c\230\021\330\r#\2404\240v\250U\260*\270A\330\r\021\220\027\230\003\2301\330\r\"\240$\240f\250F\260*\270A\340\014\022\220,\230a\320\037B\300!\3004\300q\330\010\017\210q\200A\360\030\000\t\014\2104\210w\220c\230\021\330\014\024\320\024*\250$\250f\260E\3209J\310!\3107\320RX\320XY\330\r\021\220\027\230\003\2301\330\014\024\320\024)\250\024\250V\2606\3209J\310!\3107\320RX\320XY\340\014\022\220,\230a\320\037B\300!\3004\300q\200A\360\030\000\t\014\2104\210w\220c\230\021\330\014\024\320\024*\250$\250f\260E\3209K\3101\310G\320SY\320YZ\330\r\021\220\027\230\003\2301\330\014\024\320\024)\250\024\250V\2606\3209K\3101\310G\320SY\320YZ\340\014\022\220,\230a\320\037B\300!\3004\300q\200A\360\034\000\t\014\2104\210w\220c\230\021\330\014\024\320\024*\250$\250f\260E\270\032\3001\300D\310\001\330\r\021\220\027\230\003\2301\330\014\024\320\024)\250\024\250V\2606\270\032\3001\300D\310\001\340\014\022\220,\230a\320\037B\300!\3004\300q\200A\360\030\000\t\014\2104\210w""\220c\230\021\330\014\024\320\024*\250$\250f\260E\270\034\300Q\330\r\021\220\027\230\003\2301\330\014\024\320\024)\250\024\250V\2606\270\034\300Q\340\014\022\220,\230a\320\037B\300!\3004\300q\200A\360\026\000\t\014\2104\210w\220c\230\021\330\014\024\320\024*\250$\250f\260E\270\034\300Q\300g\310Q\330\r\021\220\027\230\003\2301\330\014\024\320\024)\250\024\250V\2606\270\034\300Q\300g\310Q\340\014\022\220,\230a\320\037B\300!\3004\300q\200A\360\026\000\t\014\2104\210w\220c\230\021\330\014\024\320\024*\250$\250f\260E\270\035\300a\300w\310a\330\r\021\220\027\230\003\2301\330\014\024\320\024)\250\024\250V\2606\270\035\300a\300w\310a\340\014\022\220,\230a\320\037B\300!\3004\300q\200A\360\n\000\t\014\2104\210w\220c\230\021\330\014\024\320\024*\250$\250f\260E\270\026\270q\330\r\021\220\027\230\003\2301\330\014\024\320\024)\250\024\250V\2606\270\026\270q\340\014\022\220,\230a\320\037B\300!\3004\300q\200A\360\016\000\t\014\2104\210w\220c\230\021\330\014\024\320\024*\250$\250f\260E\270\027\300\001\300\026\300q\330\r\021\220\027\230\003\2301\330\014\024\320\024)\250\024\250V\2606\270\027\300\001\300\026\300q\340\014\022\220,\230a\320\037B\300!\3004\300q\200A\360\006\000\t \230}\250A\250T\260\027\270\004\270D\300\007\300t\3109\320TX\320XY\340\010\014\210E\220\025\220a\220t\2307\240!\330\014\020\220\005\220U\230!\2304\230w\240a\330\020\021\220\025\220a\220s\230#\230T\240\025\240a\240r\250\021\330\010\017\210q\200A\360\024\000\t\r\210A\330\010\013\2104\210w\220c\230\021\330\014\020\220\005\220U\230!\2304\230w\240a\330\020\024\220E\230\025\230a\230t\2407\250!\340\024\025\220W\230A\230S\240\001\320!2\260!\2604\260v\270T\300\021\300\"\300A\300R\300q\310\002\310)\320ST\330\r\021\220\027\230\003\2301\330\014\020\220\005\220U\230!\2304\230w\240a\330\020\024\220E\230\025\230a\230t\2407\250!\340\024\025\220W\230A\230S\240\001\240\024\240V\2505\260\001\260\022\2601\260B\260a\260r\270\031\300!\340\014\022\220,\230a\320\037B\300!\3004\300q\340\010\017\320\017(\250\004\250G\2604\260t\2707\300$""\300c\310\024\310Q\200A\330+,\360B\005\000\t\014\210:\220S\230\001\330\014\020\220\r\230Q\230c\240\021\240!\2403\240i\250q\330\r\027\220s\230!\330\014\020\220\r\230Q\230c\240\023\240I\250Q\330\r\027\220s\230!\330\014\020\220\r\230Q\230c\240\023\240I\250Q\330\r\027\220s\230!\330\014\020\220\r\230Q\230a\230q\240\003\2401\240A\240S\250\t\260\021\330\r\027\220s\230!\330\014\020\220\r\230Q\230a\230q\240\003\2401\240A\240S\250\t\260\021\330\r\027\220s\230!\330\014\020\220\r\230Q\230c\240\023\240I\250Q\330\r\027\220s\230!\330\014\020\220\r\230Q\230c\240\023\240I\250Q\340\014\022\220*\230A\320\0356\260a\260q\330\010\t\210\032\2201\220M\240\021\330\010\017\210q\200A\360&\000\t\r\210C\210q\220\003\2205\230\001\330\r\021\220\021\220*\230H\240A\330\014\020\220\003\2208\2309\240A\240R\240z\260\021\330\020\027\220r\230\026\230q\320 3\2601\330\020\023\2205\230\003\2301\330\024\025\330\020\027\220t\2307\240\"\240A\240Q\330\020\027\220t\2306\240\021\330\020\027\220q\230\002\230$\230e\2404\240v\250Q\250e\2603\260b\270\003\2701\330\020\030\230\003\2301\230A\330\020\031\230\023\230A\230U\240!\330\020\024\220O\2402\240W\250C\250q\330\025$\240B\240f\250D\260\t\270\021\270!\2701\270A\330\025$\240B\240f\250D\260\t\270\021\270!\330\026%\240R\240w\250c\260\021\330\025$\240B\240f\250E\260\031\270!\2701\270A\270Q\330\025$\240B\240f\250E\260\031\270!\2701\340\024\032\230,\240a\320'J\310\"\310O\320[]\320]^\340\020\024\220C\220u\230I\240Q\240a\330\025$\240B\240e\2501\250C\250s\260!\330\010\017\210q\200A\360\034\000\t\r\210C\210q\220\007\220y\240\001\330\010\t\210\035\220a\220q\330\010\017\210q\200A\330&'\360\032\000\t\r\210M\230\021\230'\240\027\250\t\260\021\330\010\t\210\035\220a\220q\330\010\017\210q\200A\360\026\000\t\014\210:\220S\230\001\330\014\023\2203\220a\220t\2301\230A\330\014\022\220!\330\014\017\210t\2207\230#\230Q\330\020\024\220F\230$\230k\250\021\250!\330\021\025\220W\230C\230q\330\020\024\220F\230%\230{\250!\2501\340\020\026\220l\240!\320#F\300a\300t\3101\330\014\023\2201\340""\r\027\220s\230!\330\014\023\2203\220a\220t\2301\230A\330\014\024\220C\220q\230\004\230A\230Q\330\014\022\220!\330\014\017\210t\2207\230#\230Q\330\020\024\220F\230$\230m\2501\250F\260!\330\021\025\220W\230C\230q\330\020\024\220F\230%\230}\250A\250V\2601\340\020\026\220l\240!\320#F\300a\300t\3101\330\014\023\2201\340\r\027\220s\230!\330\014\023\2203\220a\220t\2301\230A\330\014\022\220!\330\014\017\210t\2207\230#\230Q\330\020\024\220F\230$\230l\250!\2501\330\021\025\220W\230C\230q\330\020\024\220F\230%\230|\2501\250A\340\020\026\220l\240!\320#F\300a\300t\3101\330\014\023\2201\340\r\027\220s\230!\330\014\017\210t\2203\220a\330\020\024\220C\220q\230\004\230A\230Q\330\020\026\220a\330\020\023\2204\220w\230c\240\021\330\024#\2401\240G\2501\330\024\030\230\006\230d\240-\250q\260\001\330\025\031\230\027\240\003\2401\330\024\035\230W\240A\330\024\030\230\006\230e\240=\260\001\260\021\340\024\032\230,\240a\320'J\310!\3104\310q\330\020\027\220q\330\021\030\230\003\2301\330\020\027\220s\230!\2304\230q\240\001\330\020\026\220a\330\020\023\2204\220w\230c\240\021\330\024\030\230\006\230d\320\"4\260A\260Q\330\025\031\230\027\240\003\2401\330\024\030\230\006\230e\320#5\260Q\260a\340\024\032\230,\240a\320'J\310!\3104\310q\330\020\027\220q\340\020\026\220j\240\001\240\021\340\r\027\220s\230!\330\014\017\210t\2203\220a\330\020\024\220C\220q\230\004\230A\230Q\330\020\026\220a\330\020\023\2204\220w\230c\240\021\330\024#\2401\240G\2501\330\024\030\230\006\230d\240.\260\001\260\021\330\025\031\230\027\240\003\2401\330\024\035\230W\240A\330\024\030\230\006\230e\240>\260\021\260!\340\024\032\230,\240a\320'J\310!\3104\310q\330\020\027\220q\330\021\030\230\003\2301\330\020\027\220s\230!\2304\230q\240\001\330\020\026\220a\330\020\023\2204\220w\230c\240\021\330\024\030\230\006\230d\320\"5\260Q\260a\330\025\031\230\027\240\003\2401\330\024\030\230\006\230e\320#6\260a\260q\340\024\032\230,\240a\320'J\310!\3104\310q\330\020\027\220q\340\020\026\220j\240\001\240\021\340\r\027\220s\230!\330\014\020""\220\003\2201\220D\230\001\230\021\330\014\017\210t\2203\220a\330\020\024\220C\220q\230\004\230A\230Q\330\020\026\220a\330\020\023\2204\220w\230c\240\021\330\024#\2401\240G\2501\330\024\030\230\006\230d\240)\2501\250C\250q\330\025\031\230\027\240\003\2401\330\024\035\230W\240A\330\024\030\230\006\230e\2409\250A\250S\260\001\340\024\032\230,\240a\320'J\310!\3104\310q\330\020\027\220q\330\021\030\230\003\2301\330\020\027\220s\230!\2304\230q\240\001\330\020\026\220a\330\020\023\2204\220w\230c\240\021\330\024\030\230\006\230d\240/\260\021\260#\260Q\330\025\031\230\027\240\003\2401\330\024\030\230\006\230e\240?\260!\2603\260a\340\024\032\230,\240a\320'J\310!\3104\310q\330\020\027\220q\340\020\026\220j\240\001\240\021\340\r\027\220s\230!\330\014\024\220E\230\021\230$\230a\230q\330\014\022\220!\330\014\017\210t\2207\230#\230Q\330\020\024\220F\230$\230h\240a\240q\330\021\025\220W\230C\230q\330\020\024\220F\230%\230x\240q\250\001\340\020\026\220l\240!\320#F\300a\300t\3101\330\014\023\2201\360\006\000\r\023\220*\230A\320\0356\260a\260q\200A\360\"\000\t\026\220T\230\027\240\001\330\010\025\220T\230\027\240\001\340\010\t\330\014\020\220\005\220U\230!\2301\330\020\024\220E\230\025\230a\230q\330\024\025\220Q\220c\230\025\230d\240%\240q\250\003\2501\330\017\020\330\014\020\220\005\220U\230!\2301\330\020\024\220E\230\025\230a\230q\330\024\025\220Q\220b\230\001\230\025\230d\240%\240q\250\003\2501\330\010\017\210q\200A\360\010\000\t\017\210a\200A\330\".\250a\360 \000\t\014\2106\220\023\220A\330\014\017\210w\220a\220s\230!\330\020\030\230\001\230\021\330\021\030\230\001\230\023\230A\330\020\030\230\003\2301\230A\340\020\026\220j\240\001\240\021\330\014\017\210t\220=\240\001\240\021\330\020\023\2208\2301\230A\330\024\034\230E\240\021\340\024\032\230*\240A\240Q\340\010\013\2106\220\023\220A\330\014\017\210w\220a\220s\230!\330\020\030\230\001\230\021\330\021\030\230\001\230\021\230!\2304\230q\330\020\030\230\003\2301\230A\230Q\230a\340\020\026\220j\240\001\240\021\330\014\017\210t\220=""\240\001\240\021\330\020\023\2208\2301\230A\330\024\034\230E\240\021\340\024\032\230*\240A\240Q\340\010\014\210A\330\010\014\210A\340\010\014\210C\210q\220\003\2205\230\001\330\010\t\210\033\220A\220Q\330\010\017\210q\320\000,\250A\360\020\000\005\014\210=\230\016\240a\240w\250g\260S\270\t\300\021\320\004%\240Q\360\014\000\t\r\210A\210R\210q\220\004\220G\2301\330\010\014\210E\220\025\220a\220s\230!\2301\330\014\020\220\005\220U\230!\2304\230w\240a\330\020\021\220\021\220&\230\001\230\021\230\"\230A\230T\240\025\240a\240u\250A\250S\260\001\330\010\017\210u\220A\220Q\320\004=\270Q\360\020\000\t\r\210D\220\n\230!\230;\240c\250\032\2602\260Q\260h\270d\300'\310\021\330\010\037\230q\240\001\240\021\330\010\014\210E\220\025\220a\220q\230\001\330\014\020\220\005\220U\230!\2301\230A\330\020\026\220a\220u\230A\230S\240\001\330\020\024\220E\230\021\230)\2401\240C\240s\250!\320\004 \240\010\250\001\360T\001\000\t\026\220Q\330\010\025\220Q\360\006\000\t\014\2102\210S\220\005\220T\230\022\2303\230a\330\014\r\330\020\024\220A\220Q\330\020\027\220q\330\020\024\220A\220Q\330\020\027\220q\330\023\024\330\020\026\220j\240\001\240\021\330\014\021\220\024\220Q\220a\330\014\r\330\020\021\330\024\030\230\001\230\021\330\024\031\230\021\330\023\024\360\006\000\r\022\220\024\220Q\220a\330\014\r\330\020\021\330\024\030\230\001\230\021\330\024\031\230\021\330\023\024\360\006\000\r\021\220\r\230Q\230c\240\021\340\014\020\220\001\330\014\020\220\007\220t\2301\230A\330\020\024\220A\330\020\024\220G\2304\230q\240\001\330\024&\240a\240u\250E\260\024\260W\270D\300\004\300G\3101\330\024\025\220U\230!\2303\230c\240\024\240U\250!\2505\260\001\330\024\031\230\021\330\020\025\220Q\330\014\023\2201\340\014\017\210r\220\022\2201\330\020\025\220T\230\027\240\001\330\014\017\210r\220\022\2201\330\020\025\220T\230\027\240\001\340\014\036\230a\230s\240#\240T\250\027\260\004\260D\270\007\270q\330\014\036\230a\230s\240#\240T\250\027\260\002\260!\2603\260d\270'\300\022\3001\300A\340\014\017\210r\220\022\2201""\330\020\026\220j\240\001\320!C\3003\300a\330\014\017\210r\220\022\2201\330\020\026\220j\240\001\320!I\310\023\310A\330\014\020\220\001\330\014\020\220\002\220\"\220A\330\014\020\220\002\220\"\220A\330\014\020\220\r\230Q\230c\240\021\330\014\020\220\007\220u\230A\230S\240\001\330\020\024\220A\330\020\024\220G\2305\240\001\240\023\240A\330\024\025\220U\230!\2303\230c\240\024\240U\250!\2505\260\001\330\024\031\230\021\330\020\025\220Q\330\014\023\2201\320\004\036\230a\360\032\000\t\014\2104\210r\220\027\230\003\2301\330\014\023\2204\220q\230\004\230B\230f\240D\250\001\250\022\2501\250D\260\005\260X\270Q\270a\330\r\021\220\022\2207\230#\230Q\330\014\023\2204\220q\230\004\230B\230f\240E\250\021\250\"\250A\250T\260\025\260h\270a\270q\340\014\022\220,\230a\320\037B\300!\3004\300r\310\021\320\004&\240a\360\016\000\t\014\2106\220\024\220Q\330\014\024\220D\230\001\340\010\013\2104\210w\220c\230\021\330\014\020\220\006\220d\230-\240q\250\001\330\r\021\220\027\230\003\2301\330\014\020\220\006\220e\230=\250\001\250\021\340\014\022\220,\230a\320\037B\300!\3004\300q\320\004+\250<\260q\360<\000\t\014\2104\210r\220\027\230\003\2301\330\014\033\2301\230H\240A\330\014\020\220\002\220&\230\004\230A\230R\230q\240\004\240E\250\034\260Q\260a\260r\270\026\270t\3001\300B\300a\300q\310\007\310x\320W]\320]^\330\r\021\220\022\2207\230#\230Q\330\014\023\2206\230\021\330\014\020\220\002\220&\230\005\230Q\230b\240\001\240\024\240U\250,\260a\260q\270\002\270&\300\005\300Q\300b\310\001\310\021\310'\320QW\320W]\320]^\340\014\022\220,\230a\320\037B\300!\3004\300r\310\021\330\010\tvoid (char const *, int)\000void (int)\000void (void)\000\000\000\000_sig_off_warning\000_do_raise_exception\000_sig_on_interrupt_received\000_sig_on_recover\000print_backtrace\000verify_exc_value";
    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 < 297; i++) {
      Py_ssize_t bytes_length = index[i].length;
      PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL);
      if (likely(string) && i >= 111) 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 = 297; i < 335; 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 < 335; i++) {
      if (unlikely(PyObject_Hash(stringtab[i]) == -1)) {
        __PYX_ERR(0, 1, __pyx_L1_error)
      }
    }
    #if CYTHON_IMMORTAL_CONSTANTS
    {
      PyObject **table = stringtab + 297;
      for (Py_ssize_t i=0; i<38; ++i) {
        #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
        #if PY_VERSION_HEX < 0x030E0000
        if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
        #else
        if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
        #endif
        {
          Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
        }
        #else
        Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
        #endif
      }
    }
    #endif
  }
  {
    PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 0;
    int8_t const cint_constants_1[] = {0,-1,1,2};
    for (int i = 0; i < 4; i++) {
      numbertab[i] = PyLong_FromLong(cint_constants_1[i - 0]);
      if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #if CYTHON_IMMORTAL_CONSTANTS
  {
    PyObject **table = __pyx_mstate->__pyx_number_tab;
    for (Py_ssize_t i=0; i<4; ++i) {
      #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
      #if PY_VERSION_HEX < 0x030E0000
      if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
      #else
      if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
      #endif
      {
        Py_SET_REFCNT(table[i], _Py_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 : 3;
    unsigned int num_posonly_args : 1;
    unsigned int num_kwonly_args : 1;
    unsigned int nlocals : 4;
    unsigned int flags : 10;
    unsigned int first_line : 11;
} __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), 103};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_fpylll_fplll_integer_matrix, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 157};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_frm};
    __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_fpylll_fplll_integer_matrix, __pyx_mstate->__pyx_n_u_is_zero, __pyx_mstate->__pyx_kp_b_iso88591_a_4r_1_4q_BfD_1D_XQa_7_Q_4q_BfE, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 177};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_fpylll_fplll_integer_matrix, __pyx_mstate->__pyx_n_u_size_nz, __pyx_mstate->__pyx_kp_b_iso88591_A_4r_1_4r_t1Bat5_7_Q_4r_uARq_E_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 252};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_v, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_expo, __pyx_mstate->__pyx_n_u_x_mpz, __pyx_mstate->__pyx_n_u_tmp_mpz, __pyx_mstate->__pyx_n_u_x_l, __pyx_mstate->__pyx_n_u_tmp_l};
    __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_fpylll_fplll_integer_matrix, __pyx_mstate->__pyx_n_u_addmul, __pyx_mstate->__pyx_kp_b_iso88591_q_4r_1_1HA_ARq_E_Qar_t1Baq_xW_7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS), 363};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_A, __pyx_mstate->__pyx_n_u_nrows, __pyx_mstate->__pyx_n_u_ncols, __pyx_mstate->__pyx_n_u_kwds, __pyx_mstate->__pyx_n_u_m_2, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_B};
    __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_fpylll_fplll_integer_matrix, __pyx_mstate->__pyx_n_u_from_matrix, __pyx_mstate->__pyx_kp_b_iso88591_A_a_6_A_was_A_1A_j_t_81A_E_AQ_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS), 413};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_nrows, __pyx_mstate->__pyx_n_u_ncols, __pyx_mstate->__pyx_n_u_it, __pyx_mstate->__pyx_n_u_kwds, __pyx_mstate->__pyx_n_u_A};
    __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_fpylll_fplll_integer_matrix, __pyx_mstate->__pyx_n_u_from_iterable, __pyx_mstate->__pyx_kp_b_iso88591_A_Cq_y_aq_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 431};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_nrows, __pyx_mstate->__pyx_n_u_int_type, __pyx_mstate->__pyx_n_u_A};
    __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_fpylll_fplll_integer_matrix, __pyx_mstate->__pyx_n_u_identity, __pyx_mstate->__pyx_kp_b_iso88591_A_M_aq_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS), 449};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_d, __pyx_mstate->__pyx_n_u_algorithm, __pyx_mstate->__pyx_n_u_int_type, __pyx_mstate->__pyx_n_u_kwds, __pyx_mstate->__pyx_n_u_A};
    __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_fpylll_fplll_integer_matrix, __pyx_mstate->__pyx_n_u_random, __pyx_mstate->__pyx_kp_b_iso88591_A_B_S_Qc_3iq_s_Qc_IQ_s_Qc_IQ_s_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 630};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_A, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j, __pyx_mstate->__pyx_n_u_m_2, __pyx_mstate->__pyx_n_u_n};
    __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_fpylll_fplll_integer_matrix, __pyx_mstate->__pyx_n_u_set_matrix, __pyx_mstate->__pyx_kp_b_iso88591_A8_T_T_U_1_E_aq_Qc_AQc_U_1_E_aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 670};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_A, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j, __pyx_mstate->__pyx_n_u_m_2, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_it};
    __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_fpylll_fplll_integer_matrix, __pyx_mstate->__pyx_n_u_set_iterable, __pyx_mstate->__pyx_kp_b_iso88591_A6_T_T_T_E_aq_U_1_E_S_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 705};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_A, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j, __pyx_mstate->__pyx_n_u_m_2, __pyx_mstate->__pyx_n_u_n};
    __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_fpylll_fplll_integer_matrix, __pyx_mstate->__pyx_n_u_to_matrix, __pyx_mstate->__pyx_kp_b_iso88591_A_T_T_U_1_E_aq_Qc_d_q_1_U_1_E_aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 791};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_A, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j};
    __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_fpylll_fplll_integer_matrix, __pyx_mstate->__pyx_n_u_copy, __pyx_mstate->__pyx_kp_b_iso88591_A_AT_D_t9TXXY_E_at7_U_4wa_as_T_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 801};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j, __pyx_mstate->__pyx_n_u_l};
    __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_fpylll_fplll_integer_matrix, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_A_4wc_U_4wa_E_at7_WAS_2_4vT_AR, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS), 974};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_algorithm, __pyx_mstate->__pyx_n_u_kwds, __pyx_mstate->__pyx_n_u_t_mpz, __pyx_mstate->__pyx_n_u_t_long, __pyx_mstate->__pyx_n_u_bits, __pyx_mstate->__pyx_n_u_bits2, __pyx_mstate->__pyx_n_u_q, __pyx_mstate->__pyx_n_u_k, __pyx_mstate->__pyx_n_u_alpha};
    __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_fpylll_fplll_integer_matrix, __pyx_mstate->__pyx_n_u_randomize, __pyx_mstate->__pyx_kp_b_iso88591_A_S_3at1A_t7_Q_F_k_WCq_F_1_l_Fat, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1112};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_nrows};
    __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_fpylll_fplll_integer_matrix, __pyx_mstate->__pyx_n_u_gen_identity, __pyx_mstate->__pyx_kp_b_iso88591_a_6_Q_D_4wc_d_q_1_e_a_B_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1129};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_fpylll_fplll_integer_matrix, __pyx_mstate->__pyx_n_u_clear, __pyx_mstate->__pyx_kp_b_iso88591_A_4wc_fE_q_1_V6_q_a_B_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1141};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[16] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_fpylll_fplll_integer_matrix, __pyx_mstate->__pyx_n_u_is_empty, __pyx_mstate->__pyx_kp_b_iso88591_A_4wc_4r_t6_fA_1_4r_d_fA_a_B_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[16])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1153};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_rows, __pyx_mstate->__pyx_n_u_cols};
    __pyx_mstate_global->__pyx_codeobj_tab[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_fpylll_fplll_integer_matrix, __pyx_mstate->__pyx_n_u_resize, __pyx_mstate->__pyx_kp_b_iso88591_A_4wc_fE_q_1_V6_q_a_B_4q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1167};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_rows};
    __pyx_mstate_global->__pyx_codeobj_tab[18] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_fpylll_fplll_integer_matrix, __pyx_mstate->__pyx_n_u_set_rows, __pyx_mstate->__pyx_kp_b_iso88591_A_4wc_4vU_1A_1_fF_1A_a_B_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[18])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1180};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_cols};
    __pyx_mstate_global->__pyx_codeobj_tab[19] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_fpylll_fplll_integer_matrix, __pyx_mstate->__pyx_n_u_set_cols, __pyx_mstate->__pyx_kp_b_iso88591_A_4wc_4vU_1A_1_fF_1A_a_B_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[19])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1193};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_r1, __pyx_mstate->__pyx_n_u_r2};
    __pyx_mstate_global->__pyx_codeobj_tab[20] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_fpylll_fplll_integer_matrix, __pyx_mstate->__pyx_n_u_swap_rows, __pyx_mstate->__pyx_kp_b_iso88591_A_4wc_fE_1D_1_V6_1D_a_B_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[20])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1214};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_first, __pyx_mstate->__pyx_n_u_last};
    __pyx_mstate_global->__pyx_codeobj_tab[21] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_fpylll_fplll_integer_matrix, __pyx_mstate->__pyx_n_u_rotate_left, __pyx_mstate->__pyx_kp_b_iso88591_A_4wc_fE_QgQ_1_V6_QgQ_a_B_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[21])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1232};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_first, __pyx_mstate->__pyx_n_u_last};
    __pyx_mstate_global->__pyx_codeobj_tab[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_fpylll_fplll_integer_matrix, __pyx_mstate->__pyx_n_u_rotate_right, __pyx_mstate->__pyx_kp_b_iso88591_A_4wc_fE_awa_1_V6_awa_a_B_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[22])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1250};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_first, __pyx_mstate->__pyx_n_u_middle, __pyx_mstate->__pyx_n_u_last};
    __pyx_mstate_global->__pyx_codeobj_tab[23] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_fpylll_fplll_integer_matrix, __pyx_mstate->__pyx_n_u_rotate, __pyx_mstate->__pyx_kp_b_iso88591_A6_4wc_fE_PQ_1_V6_PQ_a_B_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[23])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1284};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_first, __pyx_mstate->__pyx_n_u_last, __pyx_mstate->__pyx_n_u_n_valid_rows};
    __pyx_mstate_global->__pyx_codeobj_tab[24] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_fpylll_fplll_integer_matrix, __pyx_mstate->__pyx_n_u_rotate_gram_left, __pyx_mstate->__pyx_kp_b_iso88591_A_4wc_fE9J_7RXXY_1_V69J_7RXXY_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[24])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1303};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_first, __pyx_mstate->__pyx_n_u_last, __pyx_mstate->__pyx_n_u_n_valid_rows};
    __pyx_mstate_global->__pyx_codeobj_tab[25] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_fpylll_fplll_integer_matrix, __pyx_mstate->__pyx_n_u_rotate_gram_right, __pyx_mstate->__pyx_kp_b_iso88591_A_4wc_fE9K1GSYYZ_1_V69K1GSYYZ_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1322};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[26] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_fpylll_fplll_integer_matrix, __pyx_mstate->__pyx_n_u_transpose, __pyx_mstate->__pyx_kp_b_iso88591_A_4wc_4vU_A_1_fF_A_a_B_4q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[26])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1341};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[27] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_fpylll_fplll_integer_matrix, __pyx_mstate->__pyx_n_u_get_max_exp, __pyx_mstate->__pyx_kp_b_iso88591_A_4wc_fE_Q_1_V6_Q_a_B_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[27])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1417};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_q, __pyx_mstate->__pyx_n_u_start_row, __pyx_mstate->__pyx_n_u_start_col, __pyx_mstate->__pyx_n_u_stop_row, __pyx_mstate->__pyx_n_u_stop_col, __pyx_mstate->__pyx_n_u_q_2, __pyx_mstate->__pyx_n_u_msg, __pyx_mstate->__pyx_n_u_t1, __pyx_mstate->__pyx_n_u_t2, __pyx_mstate->__pyx_n_u_q2, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j};
    __pyx_mstate_global->__pyx_codeobj_tab[28] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_fpylll_fplll_integer_matrix, __pyx_mstate->__pyx_n_u_mod, __pyx_mstate->__pyx_kp_b_iso88591_11BBSSddeJ_k_WD_G1_Zt7_AS_G2Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[28])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1527};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_U, __pyx_mstate->__pyx_n_u_start_row, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j, __pyx_mstate->__pyx_n_u_S, __pyx_mstate->__pyx_n_u_B, __pyx_mstate->__pyx_n_u_tmp};
    __pyx_mstate_global->__pyx_codeobj_tab[29] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_fpylll_fplll_integer_matrix, __pyx_mstate->__pyx_n_u_apply_transform, __pyx_mstate->__pyx_kp_b_iso88591_Q_D_c_2Qhd_q_E_aq_U_1A_auAS_E_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[29])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 15, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1542};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_c, __pyx_mstate->__pyx_n_u_d, __pyx_mstate->__pyx_n_u_m_2, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j, __pyx_mstate->__pyx_n_u_row, __pyx_mstate->__pyx_n_u_col, __pyx_mstate->__pyx_n_u_rows, __pyx_mstate->__pyx_n_u_cols, __pyx_mstate->__pyx_n_u_it, __pyx_mstate->__pyx_n_u_A};
    __pyx_mstate_global->__pyx_codeobj_tab[30] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_fpylll_fplll_integer_matrix, __pyx_mstate->__pyx_n_u_submatrix, __pyx_mstate->__pyx_kp_b_iso88591_T_Q_Q_2S_T_3a_AQ_q_AQ_q_j_Qa_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[30])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1648};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_v, __pyx_mstate->__pyx_n_u_start, __pyx_mstate->__pyx_n_u_r, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j};
    __pyx_mstate_global->__pyx_codeobj_tab[31] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_fpylll_fplll_integer_matrix, __pyx_mstate->__pyx_n_u_multiply_left, __pyx_mstate->__pyx_kp_b_iso88591_Q_ARq_G1_E_as_1_U_4wa_AT_auAS_u, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[31])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 12, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS), 1660};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_filename, __pyx_mstate->__pyx_n_u_kwds, __pyx_mstate->__pyx_n_u_A, __pyx_mstate->__pyx_n_u_fh, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_line, __pyx_mstate->__pyx_n_u_ncols, __pyx_mstate->__pyx_n_u_values, __pyx_mstate->__pyx_n_u_j, __pyx_mstate->__pyx_n_u_v, __pyx_mstate->__pyx_n_u_e};
    __pyx_mstate_global->__pyx_codeobj_tab[32] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_fpylll_fplll_integer_matrix, __pyx_mstate->__pyx_n_u_from_file, __pyx_mstate->__pyx_kp_b_iso88591_A_Cq_5_HA_89ARz_r_q_31_5_1_t7_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[32])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1704};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_nrows, __pyx_mstate->__pyx_n_u_ncols, __pyx_mstate->__pyx_n_u_l, __pyx_mstate->__pyx_n_u_int_type};
    __pyx_mstate_global->__pyx_codeobj_tab[33] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_fpylll_fplll_integer_matrix, __pyx_mstate->__pyx_n_u_unpickle_IntegerMatrix, __pyx_mstate->__pyx_kp_b_iso88591_A_awgS, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[33])) goto bad;
  }
  Py_DECREF(tuple_dedup_map);
  return 0;
  bad:
  Py_DECREF(tuple_dedup_map);
  return -1;
}
/* #### Code section: init_globals ### */

static int __Pyx_InitGlobals(void) {
  /* PythonCompatibility.init */
  if (likely(__Pyx_init_co_variables() == 0)); else
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* CommonTypesMetaclass.init */
  if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* CachedMethodType.init */
  #if CYTHON_COMPILING_IN_LIMITED_API
  {
      PyObject *typesModule=NULL;
      typesModule = PyImport_ImportModule("types");
      if (typesModule) {
          __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType");
          Py_DECREF(typesModule);
      }
  } // error handling follows
  #endif
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* CythonFunctionShared.init */
  if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: cleanup_globals ### */
/* #### Code section: cleanup_module ### */
/* #### Code section: main_method ### */
/* #### Code section: utility_code_pragmas ### */
#ifdef _MSC_VER
#pragma warning( push )
/* Warning 4127: conditional expression is constant
 * Cython uses constant conditional expressions to allow in inline functions to be optimized at
 * compile-time, so this warning is not useful
 */
#pragma warning( disable : 4127 )
#endif



/* #### Code section: utility_code_def ### */

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule(modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, "RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyErrExceptionMatches (used by PyObjectGetAttrStrNoError) */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    int result;
    PyObject *exc_type;
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject *current_exception = tstate->current_exception;
    if (unlikely(!current_exception)) return 0;
    exc_type = (PyObject*) Py_TYPE(current_exception);
    if (exc_type == err) return 1;
#else
    exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
#endif
    #if CYTHON_AVOID_BORROWED_REFS
    Py_INCREF(exc_type);
    #endif
    if (unlikely(PyTuple_Check(err))) {
        result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    } else {
        result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
    }
    #if CYTHON_AVOID_BORROWED_REFS
    Py_DECREF(exc_type);
    #endif
    return result;
}
#endif

/* PyErrFetchRestore (used by PyObjectGetAttrStrNoError) */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject *tmp_value;
    assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value)));
    if (value) {
        #if CYTHON_COMPILING_IN_CPYTHON
        if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb))
        #endif
            PyException_SetTraceback(value, tb);
    }
    tmp_value = tstate->current_exception;
    tstate->current_exception = value;
    Py_XDECREF(tmp_value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
#else
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#endif
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject* exc_value;
    exc_value = tstate->current_exception;
    tstate->current_exception = 0;
    *value = exc_value;
    *type = NULL;
    *tb = NULL;
    if (exc_value) {
        *type = (PyObject*) Py_TYPE(exc_value);
        Py_INCREF(*type);
        #if CYTHON_COMPILING_IN_CPYTHON
        *tb = ((PyBaseExceptionObject*) exc_value)->traceback;
        Py_XINCREF(*tb);
        #else
        *tb = PyException_GetTraceback(exc_value);
        #endif
    }
#else
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#endif
}
#endif

/* PyObjectGetAttrStr (used by PyObjectGetAttrStrNoError) */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* PyObjectGetAttrStrNoError (used by GetBuiltinName) */
#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        __Pyx_PyErr_Clear();
}
#endif
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
    PyObject *result;
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
    (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
    return result;
#else
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
        return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
    }
#endif
    result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
    if (unlikely(!result)) {
        __Pyx_PyObject_GetAttrStr_ClearAttributeError();
    }
    return result;
#endif
}

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name);
    if (unlikely(!result) && !PyErr_Occurred()) {
        PyErr_Format(PyExc_NameError,
            "name '%U' is not defined", name);
    }
    return result;
}

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

/* 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 (used by PyObjectCallOneArg) */
#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
}

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

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

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

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

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

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

/* RejectKeywords */
static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds) {
    PyObject *key = NULL;
    if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) {
        key = __Pyx_PySequence_ITEM(kwds, 0);
    } else {
#if CYTHON_AVOID_BORROWED_REFS
        PyObject *pos = NULL;
#else
        Py_ssize_t pos = 0;
#endif
#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
        if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return;
#endif
        __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL);
#if CYTHON_AVOID_BORROWED_REFS
        Py_XDECREF(pos);
#endif
    }
    if (likely(key)) {
        PyErr_Format(PyExc_TypeError,
            "%s() got an unexpected keyword argument '%U'",
            function_name, key);
        Py_DECREF(key);
    }
}

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

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

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

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

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

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

/* PyLongBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_Fallback___Pyx_PyLong_MultiplyCObj(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_MultiplyCObj(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    const long a = intval;
    long b;
    const PY_LONG_LONG lla = intval;
    PY_LONG_LONG llb;
    if (unlikely(__Pyx_PyLong_IsZero(op2))) {
        return __Pyx_NewRef(op2);
    }
    const int is_positive = __Pyx_PyLong_IsPos(op2);
    const digit* digits = __Pyx_PyLong_Digits(op2);
    const Py_ssize_t size = __Pyx_PyLong_DigitCount(op2);
    if (likely(size == 1)) {
        b = (long) digits[0];
        if (!is_positive) b *= -1;
    } else {
        switch (size) {
            case 2:
                if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT+30) {
                    b = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if (!is_positive) b *= -1;
                    goto calculate_long;
                } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT+30) {
                    llb = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                    if (!is_positive) llb *= -1;
                    goto calculate_long_long;
                }
                break;
            case 3:
                if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT+30) {
                    b = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if (!is_positive) b *= -1;
                    goto calculate_long;
                } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT+30) {
                    llb = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                    if (!is_positive) llb *= -1;
                    goto calculate_long_long;
                }
                break;
            case 4:
                if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT+30) {
                    b = (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) b *= -1;
                    goto calculate_long;
                } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT+30) {
                    llb = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                    if (!is_positive) llb *= -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);
        llb = b;
        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_MultiplyCObj(PyObject *float_val, long intval, int zerodivision_check) {
    CYTHON_UNUSED_VAR(zerodivision_check);
    const long a = intval;
    double b = __Pyx_PyFloat_AS_DOUBLE(float_val);
        double result;
        
        result = ((double)a) * (double)b;
        return PyFloat_FromDouble(result);
}
static CYTHON_INLINE PyObject* __Pyx_PyLong_MultiplyCObj(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(op2))) {
        return __Pyx_Unpacked___Pyx_PyLong_MultiplyCObj(op1, op2, intval, inplace, zerodivision_check);
    }
    #endif
    if (PyFloat_CheckExact(op2)) {
        return __Pyx_Float___Pyx_PyLong_MultiplyCObj(op2, intval, zerodivision_check);
    }
    return __Pyx_Fallback___Pyx_PyLong_MultiplyCObj(op1, op2, inplace);
}
#endif

/* ObjectGetItem */
#if CYTHON_USE_TYPE_SLOTS
static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) {
    PyObject *runerr = NULL;
    Py_ssize_t key_value;
    key_value = __Pyx_PyIndex_AsSsize_t(index);
    if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
        return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1, 1);
    }
    if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
        __Pyx_TypeName index_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(index));
        PyErr_Clear();
        PyErr_Format(PyExc_IndexError,
            "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name);
        __Pyx_DECREF_TypeName(index_type_name);
    }
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) {
    __Pyx_TypeName obj_type_name;
    if (likely(PyType_Check(obj))) {
        PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_mstate_global->__pyx_n_u_class_getitem);
        if (!meth) {
            PyErr_Clear();
        } else {
            PyObject *result = __Pyx_PyObject_CallOneArg(meth, key);
            Py_DECREF(meth);
            return result;
        }
    }
    obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) {
    PyTypeObject *tp = Py_TYPE(obj);
    PyMappingMethods *mm = tp->tp_as_mapping;
    PySequenceMethods *sm = tp->tp_as_sequence;
    if (likely(mm && mm->mp_subscript)) {
        return mm->mp_subscript(obj, key);
    }
    if (likely(sm && sm->sq_item)) {
        return __Pyx_PyObject_GetIndex(obj, key);
    }
    return __Pyx_PyObject_GetItem_Slow(obj, key);
}
#endif

/* GetTopmostException (used by SaveResetException) */
#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) &&
           exc_info->previous_item != NULL)
    {
        exc_info = exc_info->previous_item;
    }
    return exc_info;
}
#endif

/* SaveResetException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    PyObject *exc_value = exc_info->exc_value;
    if (exc_value == NULL || exc_value == Py_None) {
        *value = NULL;
        *type = NULL;
        *tb = NULL;
    } else {
        *value = exc_value;
        Py_INCREF(*value);
        *type = (PyObject*) Py_TYPE(exc_value);
        Py_INCREF(*type);
        *tb = PyException_GetTraceback(exc_value);
    }
  #elif CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
  #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
  #endif
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = tstate->exc_info;
    PyObject *tmp_value = exc_info->exc_value;
    exc_info->exc_value = value;
    Py_XDECREF(tmp_value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
  #else
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = type;
    exc_info->exc_value = value;
    exc_info->exc_traceback = tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
  #endif
}
#endif

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

/* IterNextPlain (used by IterNext) */
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
static PyObject *__Pyx_GetBuiltinNext_LimitedAPI(void) {
    if (unlikely(!__pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache))
        __pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache = __Pyx_GetBuiltinName(__pyx_mstate_global->__pyx_n_u_next);
    return __pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache;
}
#endif
static CYTHON_INLINE PyObject *__Pyx_PyIter_Next_Plain(PyObject *iterator) {
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
    PyObject *result;
    PyObject *next = __Pyx_GetBuiltinNext_LimitedAPI();
    if (unlikely(!next)) return NULL;
    result = PyObject_CallFunctionObjArgs(next, iterator, NULL);
    return result;
#else
    (void)__Pyx_GetBuiltinName; // only for early limited API
    iternextfunc iternext = __Pyx_PyObject_GetIterNextFunc(iterator);
    assert(iternext);
    return iternext(iterator);
#endif
}

/* IterNext */
static PyObject *__Pyx_PyIter_Next2Default(PyObject* defval) {
    PyObject* exc_type;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    exc_type = __Pyx_PyErr_CurrentExceptionType();
    if (unlikely(exc_type)) {
        if (!defval || unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))
            return NULL;
        __Pyx_PyErr_Clear();
        Py_INCREF(defval);
        return defval;
    }
    if (defval) {
        Py_INCREF(defval);
        return defval;
    }
    __Pyx_PyErr_SetNone(PyExc_StopIteration);
    return NULL;
}
static void __Pyx_PyIter_Next_ErrorNoIterator(PyObject *iterator) {
    __Pyx_TypeName iterator_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(iterator));
    PyErr_Format(PyExc_TypeError,
        __Pyx_FMT_TYPENAME " object is not an iterator", iterator_type_name);
    __Pyx_DECREF_TypeName(iterator_type_name);
}
static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject* iterator, PyObject* defval) {
    PyObject* next;
#if !CYTHON_COMPILING_IN_LIMITED_API
    iternextfunc iternext = __Pyx_PyObject_TryGetSlot(iterator, tp_iternext, iternextfunc);
    if (likely(iternext)) {
        next = iternext(iterator);
        if (likely(next))
            return next;
    #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000
        if (unlikely(iternext == &_PyObject_NextNotImplemented))
            return NULL;
    #endif
    } else if (CYTHON_USE_TYPE_SLOTS) {
        __Pyx_PyIter_Next_ErrorNoIterator(iterator);
        return NULL;
    } else
#endif
    if (unlikely(!PyIter_Check(iterator))) {
        __Pyx_PyIter_Next_ErrorNoIterator(iterator);
        return NULL;
    } else {
        next = defval ? PyIter_Next(iterator) : __Pyx_PyIter_Next_Plain(iterator);
        if (likely(next))
            return next;
    }
    return __Pyx_PyIter_Next2Default(defval);
}

/* SetItemInt */
static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
    int r;
    if (unlikely(!j)) return -1;
    r = PyObject_SetItem(o, j, v);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
                                               int wraparound, int boundscheck, int unsafe_shared) {
    CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE && !CYTHON_AVOID_BORROWED_REFS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
        if ((CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared))) {
            Py_INCREF(v);
            return PyList_SetItem(o, n, v);
        } else if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
            PyObject* old;
            Py_INCREF(v);
            old = PyList_GET_ITEM(o, n);
            PyList_SET_ITEM(o, n, v);
            Py_DECREF(old);
            return 0;
        }
    } else
#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_ass_subscript) {
            int r;
            PyObject *key = PyLong_FromSsize_t(i);
            if (unlikely(!key)) return -1;
            r = mm->mp_ass_subscript(o, key, v);
            Py_DECREF(key);
            return r;
        }
        if (is_list || likely(sm && sm->sq_ass_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 -1;
                    PyErr_Clear();
                }
            }
            return sm->sq_ass_item(o, i, v);
        }
    }
#else
    if (is_list || !PyMapping_Check(o)) {
        return PySequence_SetItem(o, i, v);
    }
#endif
    (void)wraparound;
    (void)boundscheck;
    return __Pyx_SetItemInt_Generic(o, PyLong_FromSsize_t(i), v);
}

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

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

/* py_abs */
#if CYTHON_USE_PYLONG_INTERNALS
static PyObject *__Pyx_PyLong_AbsNeg(PyObject *n) {
#if PY_VERSION_HEX >= 0x030C00A7
    if (likely(__Pyx_PyLong_IsCompact(n))) {
        return PyLong_FromSize_t(__Pyx_PyLong_CompactValueUnsigned(n));
    }
#else
    if (likely(Py_SIZE(n) == -1)) {
        return PyLong_FromUnsignedLong(__Pyx_PyLong_Digits(n)[0]);
    }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
    {
        PyObject *copy = _PyLong_Copy((PyLongObject*)n);
        if (likely(copy)) {
            #if PY_VERSION_HEX >= 0x030C00A7
            ((PyLongObject*)copy)->long_value.lv_tag ^= ((PyLongObject*)copy)->long_value.lv_tag & _PyLong_SIGN_MASK;
            #else
            __Pyx_SET_SIZE(copy, -Py_SIZE(copy));
            #endif
        }
        return copy;
    }
#else
    return PyNumber_Negative(n);
#endif
}
#endif

/* PyObjectCall2Args (used by PyObjectCallMethod1) */
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);
}

/* PyObjectGetMethod (used by PyObjectCallMethod1) */
#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)))
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
    PyObject *attr;
#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
    __Pyx_TypeName type_name;
    PyTypeObject *tp = Py_TYPE(obj);
    PyObject *descr;
    descrgetfunc f = NULL;
    PyObject **dictptr, *dict;
    int meth_found = 0;
    assert (*method == NULL);
    if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
        attr = __Pyx_PyObject_GetAttrStr(obj, name);
        goto try_unpack;
    }
    if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
        return 0;
    }
    descr = _PyType_Lookup(tp, name);
    if (likely(descr != NULL)) {
        Py_INCREF(descr);
#if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR
        if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR))
#else
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type)))
        #endif
#endif
        {
            meth_found = 1;
        } else {
            f = Py_TYPE(descr)->tp_descr_get;
            if (f != NULL && PyDescr_IsData(descr)) {
                attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
                Py_DECREF(descr);
                goto try_unpack;
            }
        }
    }
    dictptr = _PyObject_GetDictPtr(obj);
    if (dictptr != NULL && (dict = *dictptr) != NULL) {
        Py_INCREF(dict);
        attr = __Pyx_PyDict_GetItemStr(dict, name);
        if (attr != NULL) {
            Py_INCREF(attr);
            Py_DECREF(dict);
            Py_XDECREF(descr);
            goto try_unpack;
        }
        Py_DECREF(dict);
    }
    if (meth_found) {
        *method = descr;
        return 1;
    }
    if (f != NULL) {
        attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
        Py_DECREF(descr);
        goto try_unpack;
    }
    if (likely(descr != NULL)) {
        *method = descr;
        return 0;
    }
    type_name = __Pyx_PyType_GetFullyQualifiedName(tp);
    PyErr_Format(PyExc_AttributeError,
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
                 type_name, name);
    __Pyx_DECREF_TypeName(type_name);
    return 0;
#else
    attr = __Pyx_PyObject_GetAttrStr(obj, name);
    goto try_unpack;
#endif
try_unpack:
#if CYTHON_UNPACK_METHODS
    if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
        PyObject *function = PyMethod_GET_FUNCTION(attr);
        Py_INCREF(function);
        Py_DECREF(attr);
        *method = function;
        return 1;
    }
#endif
    *method = attr;
    return 0;
}
#endif

/* PyObjectCallMethod1 (used by append) */
#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)))
static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
    PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
    Py_DECREF(method);
    return result;
}
#endif
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))
    PyObject *args[2] = {obj, arg};
    (void) __Pyx_PyObject_CallOneArg;
    (void) __Pyx_PyObject_Call2Args;
    return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
#else
    PyObject *method = NULL, *result;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_Call2Args(method, obj, arg);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) return NULL;
    return __Pyx__PyObject_CallMethod1(method, arg);
#endif
}

/* append */
static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
    if (likely(PyList_CheckExact(L))) {
        if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
    } else {
        PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_mstate_global->__pyx_n_u_append, x);
        if (unlikely(!retval))
            return -1;
        Py_DECREF(retval);
    }
    return 0;
}

/* RaiseTooManyValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

/* RaiseNeedMoreValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

/* IterFinish */
static CYTHON_INLINE int __Pyx_IterFinish(void) {
    PyObject* exc_type;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    exc_type = __Pyx_PyErr_CurrentExceptionType();
    if (unlikely(exc_type)) {
        if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))
            return -1;
        __Pyx_PyErr_Clear();
        return 0;
    }
    return 0;
}

/* UnpackItemEndCheck */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    }
    return __Pyx_IterFinish();
}

/* DictGetItem */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    if (unlikely(__Pyx_PyDict_GetItemRef(d, key, &value) == 0)) { // no value, no error
        if (unlikely(PyTuple_Check(key))) {
            PyObject* args = PyTuple_Pack(1, key);
            if (likely(args)) {
                PyErr_SetObject(PyExc_KeyError, args);
                Py_DECREF(args);
            }
        } else {
            PyErr_SetObject(PyExc_KeyError, key);
        }
    }
    return value;
}
#endif

/* pybytes_as_double (used by pyobject_as_double) */
static double __Pyx_SlowPyString_AsDouble(PyObject *obj) {
    PyObject *float_value = PyFloat_FromString(obj);
    if (likely(float_value)) {
        double value = __Pyx_PyFloat_AS_DOUBLE(float_value);
        Py_DECREF(float_value);
        return value;
    }
    return (double)-1;
}
static const char* __Pyx__PyBytes_AsDouble_Copy(const char* start, char* buffer, Py_ssize_t length) {
    int last_was_punctuation = 1;
    int parse_error_found = 0;
    Py_ssize_t i;
    for (i=0; i < length; i++) {
        char chr = start[i];
        int is_punctuation = (chr == '_') | (chr == '.') | (chr == 'e') | (chr == 'E');
        *buffer = chr;
        buffer += (chr != '_');
        parse_error_found |= last_was_punctuation & is_punctuation;
        last_was_punctuation = is_punctuation;
    }
    parse_error_found |= last_was_punctuation;
    *buffer = '\0';
    return unlikely(parse_error_found) ? NULL : buffer;
}
static double __Pyx__PyBytes_AsDouble_inf_nan(const char* start, Py_ssize_t length) {
    int matches = 1;
    char sign = start[0];
    int is_signed = (sign == '+') | (sign == '-');
    start += is_signed;
    length -= is_signed;
    switch (start[0]) {
        #ifdef Py_NAN
        case 'n':
        case 'N':
            if (unlikely(length != 3)) goto parse_failure;
            matches &= (start[1] == 'a' || start[1] == 'A');
            matches &= (start[2] == 'n' || start[2] == 'N');
            if (unlikely(!matches)) goto parse_failure;
            return (sign == '-') ? -Py_NAN : Py_NAN;
        #endif
        case 'i':
        case 'I':
            if (unlikely(length < 3)) goto parse_failure;
            matches &= (start[1] == 'n' || start[1] == 'N');
            matches &= (start[2] == 'f' || start[2] == 'F');
            if (likely(length == 3 && matches))
                return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
            if (unlikely(length != 8)) goto parse_failure;
            matches &= (start[3] == 'i' || start[3] == 'I');
            matches &= (start[4] == 'n' || start[4] == 'N');
            matches &= (start[5] == 'i' || start[5] == 'I');
            matches &= (start[6] == 't' || start[6] == 'T');
            matches &= (start[7] == 'y' || start[7] == 'Y');
            if (unlikely(!matches)) goto parse_failure;
            return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
        case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':
            break;
        default:
            goto parse_failure;
    }
    return 0.0;
parse_failure:
    return -1.0;
}
static CYTHON_INLINE int __Pyx__PyBytes_AsDouble_IsSpace(char ch) {
    return (ch == 0x20) | !((ch < 0x9) | (ch > 0xd));
}
CYTHON_UNUSED static double __Pyx__PyBytes_AsDouble(PyObject *obj, const char* start, Py_ssize_t length) {
    double value;
    Py_ssize_t i, digits;
    const char *last = start + length;
    char *end;
    while (__Pyx__PyBytes_AsDouble_IsSpace(*start))
        start++;
    while (start < last - 1 && __Pyx__PyBytes_AsDouble_IsSpace(last[-1]))
        last--;
    length = last - start;
    if (unlikely(length <= 0)) goto fallback;
    value = __Pyx__PyBytes_AsDouble_inf_nan(start, length);
    if (unlikely(value == -1.0)) goto fallback;
    if (value != 0.0) return value;
    digits = 0;
    for (i=0; i < length; digits += start[i++] != '_');
    if (likely(digits == length)) {
        value = PyOS_string_to_double(start, &end, NULL);
    } else if (digits < 40) {
        char number[40];
        last = __Pyx__PyBytes_AsDouble_Copy(start, number, length);
        if (unlikely(!last)) goto fallback;
        value = PyOS_string_to_double(number, &end, NULL);
    } else {
        char *number = (char*) PyMem_Malloc((digits + 1) * sizeof(char));
        if (unlikely(!number)) goto fallback;
        last = __Pyx__PyBytes_AsDouble_Copy(start, number, length);
        if (unlikely(!last)) {
            PyMem_Free(number);
            goto fallback;
        }
        value = PyOS_string_to_double(number, &end, NULL);
        PyMem_Free(number);
    }
    if (likely(end == last) || (value == (double)-1 && PyErr_Occurred())) {
        return value;
    }
fallback:
    return __Pyx_SlowPyString_AsDouble(obj);
}

/* pyobject_as_double */
static double __Pyx__PyObject_AsDouble(PyObject* obj) {
    if (PyUnicode_CheckExact(obj)) {
        return __Pyx_PyUnicode_AsDouble(obj);
    } else if (PyBytes_CheckExact(obj)) {
        return __Pyx_PyBytes_AsDouble(obj);
    } else if (PyByteArray_CheckExact(obj)) {
        return __Pyx_PyByteArray_AsDouble(obj);
    } else {
        PyObject* float_value;
#if !CYTHON_USE_TYPE_SLOTS
        float_value = PyNumber_Float(obj);  if ((0)) goto bad;
        (void)__Pyx_PyObject_CallOneArg;
#else
        PyNumberMethods *nb = Py_TYPE(obj)->tp_as_number;
        if (likely(nb) && likely(nb->nb_float)) {
            float_value = nb->nb_float(obj);
            if (likely(float_value) && unlikely(!PyFloat_Check(float_value))) {
                __Pyx_TypeName float_value_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(float_value));
                PyErr_Format(PyExc_TypeError,
                    "__float__ returned non-float (type " __Pyx_FMT_TYPENAME ")",
                    float_value_type_name);
                __Pyx_DECREF_TypeName(float_value_type_name);
                Py_DECREF(float_value);
                goto bad;
            }
        } else {
            float_value = __Pyx_PyObject_CallOneArg((PyObject*)&PyFloat_Type, obj);
        }
#endif
        if (likely(float_value)) {
            double value = __Pyx_PyFloat_AS_DOUBLE(float_value);
            Py_DECREF(float_value);
            return value;
        }
    }
bad:
    return (double)-1;
}

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

/* PyObjectLookupSpecial */
#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) {
    PyObject *res;
    PyTypeObject *tp = Py_TYPE(obj);
    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

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

/* AllocateExtensionType */
static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final) {
    if (is_final || likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
        allocfunc alloc_func = __Pyx_PyType_GetSlot(t, tp_alloc, allocfunc);
        return alloc_func(t, 0);
    } else {
        newfunc tp_new = __Pyx_PyType_TryGetSlot(&PyBaseObject_Type, tp_new, newfunc);
    #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
        if (!tp_new) {
            PyObject *new_str = PyUnicode_FromString("__new__");
            if (likely(new_str)) {
                PyObject *o = PyObject_CallMethodObjArgs((PyObject *)&PyBaseObject_Type, new_str, t, NULL);
                Py_DECREF(new_str);
                return o;
            } else
                return NULL;
        } else
    #endif
        return tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0);
    }
}

/* CallTypeTraverse */
#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000)
#else
static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) {
    #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000
    if (__Pyx_get_runtime_version() < 0x03090000) return 0;
    #endif
    if (!always_call) {
        PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*);
        unsigned long flags = PyType_GetFlags(base);
        if (flags & Py_TPFLAGS_HEAPTYPE) {
            return 0;
        }
    }
    Py_VISIT((PyObject*)Py_TYPE(o));
    return 0;
}
#endif

/* LimitedApiGetTypeDict (used by SetItemOnTypeDict) */
#if CYTHON_COMPILING_IN_LIMITED_API
static Py_ssize_t __Pyx_GetTypeDictOffset(void) {
    PyObject *tp_dictoffset_o;
    Py_ssize_t tp_dictoffset;
    tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__");
    if (unlikely(!tp_dictoffset_o)) return -1;
    tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o);
    Py_DECREF(tp_dictoffset_o);
    if (unlikely(tp_dictoffset == 0)) {
        PyErr_SetString(
            PyExc_TypeError,
            "'type' doesn't have a dictoffset");
        return -1;
    } else if (unlikely(tp_dictoffset < 0)) {
        PyErr_SetString(
            PyExc_TypeError,
            "'type' has an unexpected negative dictoffset. "
            "Please report this as Cython bug");
        return -1;
    }
    return tp_dictoffset;
}
static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) {
    static Py_ssize_t tp_dictoffset = 0;
    if (unlikely(tp_dictoffset == 0)) {
        tp_dictoffset = __Pyx_GetTypeDictOffset();
        if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) {
            tp_dictoffset = 0; // try again next time?
            return NULL;
        }
    }
    return *(PyObject**)((char*)tp + tp_dictoffset);
}
#endif

/* SetItemOnTypeDict (used by FixUpExtensionType) */
static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) {
    int result;
    PyObject *tp_dict;
#if CYTHON_COMPILING_IN_LIMITED_API
    tp_dict = __Pyx_GetTypeDict(tp);
    if (unlikely(!tp_dict)) return -1;
#else
    tp_dict = tp->tp_dict;
#endif
    result = PyDict_SetItem(tp_dict, k, v);
    if (likely(!result)) {
        PyType_Modified(tp);
        if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) {
            PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name,  (PyObject *) tp, k, NULL);
            if (!setNameResult) return -1;
            Py_DECREF(setNameResult);
        }
    }
    return result;
}

/* FixUpExtensionType */
static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) {
#if __PYX_LIMITED_VERSION_HEX > 0x030900B1
    CYTHON_UNUSED_VAR(spec);
    CYTHON_UNUSED_VAR(type);
    CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
#else
    const PyType_Slot *slot = spec->slots;
    int changed = 0;
#if !CYTHON_COMPILING_IN_LIMITED_API
    while (slot && slot->slot && slot->slot != Py_tp_members)
        slot++;
    if (slot && slot->slot == Py_tp_members) {
#if !CYTHON_COMPILING_IN_CPYTHON
        const
#endif  // !CYTHON_COMPILING_IN_CPYTHON)
            PyMemberDef *memb = (PyMemberDef*) slot->pfunc;
        while (memb && memb->name) {
            if (memb->name[0] == '_' && memb->name[1] == '_') {
                if (strcmp(memb->name, "__weaklistoffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_weaklistoffset = memb->offset;
                    changed = 1;
                }
                else if (strcmp(memb->name, "__dictoffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_dictoffset = memb->offset;
                    changed = 1;
                }
#if CYTHON_METH_FASTCALL
                else if (strcmp(memb->name, "__vectorcalloffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_vectorcall_offset = memb->offset;
                    changed = 1;
                }
#endif  // CYTHON_METH_FASTCALL
#if !CYTHON_COMPILING_IN_PYPY
                else if (strcmp(memb->name, "__module__") == 0) {
                    PyObject *descr;
                    assert(memb->type == T_OBJECT);
                    assert(memb->flags == 0 || memb->flags == READONLY);
                    descr = PyDescr_NewMember(type, memb);
                    if (unlikely(!descr))
                        return -1;
                    int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr);
                    Py_DECREF(descr);
                    if (unlikely(set_item_result < 0)) {
                        return -1;
                    }
                    changed = 1;
                }
#endif  // !CYTHON_COMPILING_IN_PYPY
            }
            memb++;
        }
    }
#endif  // !CYTHON_COMPILING_IN_LIMITED_API
#if !CYTHON_COMPILING_IN_PYPY
    slot = spec->slots;
    while (slot && slot->slot && slot->slot != Py_tp_getset)
        slot++;
    if (slot && slot->slot == Py_tp_getset) {
        PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc;
        while (getset && getset->name) {
            if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) {
                PyObject *descr = PyDescr_NewGetSet(type, getset);
                if (unlikely(!descr))
                    return -1;
                #if CYTHON_COMPILING_IN_LIMITED_API
                PyObject *pyname = PyUnicode_FromString(getset->name);
                if (unlikely(!pyname)) {
                    Py_DECREF(descr);
                    return -1;
                }
                int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr);
                Py_DECREF(pyname);
                #else
                CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
                int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr);
                #endif
                Py_DECREF(descr);
                if (unlikely(set_item_result < 0)) {
                    return -1;
                }
                changed = 1;
            }
            ++getset;
        }
    }
#else
    CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
#endif  // !CYTHON_COMPILING_IN_PYPY
    if (changed)
        PyType_Modified(type);
#endif  // PY_VERSION_HEX > 0x030900B1
    return 0;
}

/* PyObjectCallNoArg (used by PyObjectCallMethod0) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
    PyObject *arg[2] = {NULL, NULL};
    return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* PyObjectCallMethod0 (used by PyType_Ready) */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))
    PyObject *args[1] = {obj};
    (void) __Pyx_PyObject_CallOneArg;
    (void) __Pyx_PyObject_CallNoArg;
    return PyObject_VectorcallMethod(method_name, args, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
#else
    PyObject *method = NULL, *result = NULL;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_CallOneArg(method, obj);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) goto bad;
    result = __Pyx_PyObject_CallNoArg(method);
    Py_DECREF(method);
bad:
    return result;
#endif
}

/* ValidateBasesTuple (used by PyType_Ready) */
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) {
    Py_ssize_t i, n;
#if CYTHON_ASSUME_SAFE_SIZE
    n = PyTuple_GET_SIZE(bases);
#else
    n = PyTuple_Size(bases);
    if (unlikely(n < 0)) return -1;
#endif
    for (i = 1; i < n; i++)
    {
        PyTypeObject *b;
#if CYTHON_AVOID_BORROWED_REFS
        PyObject *b0 = PySequence_GetItem(bases, i);
        if (!b0) return -1;
#elif CYTHON_ASSUME_SAFE_MACROS
        PyObject *b0 = PyTuple_GET_ITEM(bases, i);
#else
        PyObject *b0 = PyTuple_GetItem(bases, i);
        if (!b0) return -1;
#endif
        b = (PyTypeObject*) b0;
        if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE))
        {
            __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b);
            PyErr_Format(PyExc_TypeError,
                "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name);
            __Pyx_DECREF_TypeName(b_name);
#if CYTHON_AVOID_BORROWED_REFS
            Py_DECREF(b0);
#endif
            return -1;
        }
        if (dictoffset == 0)
        {
            Py_ssize_t b_dictoffset = 0;
#if CYTHON_USE_TYPE_SLOTS
            b_dictoffset = b->tp_dictoffset;
#else
            PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__");
            if (!py_b_dictoffset) goto dictoffset_return;
            b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset);
            Py_DECREF(py_b_dictoffset);
            if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return;
#endif
            if (b_dictoffset) {
                {
                    __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b);
                    PyErr_Format(PyExc_TypeError,
                        "extension type '%.200s' has no __dict__ slot, "
                        "but base type '" __Pyx_FMT_TYPENAME "' has: "
                        "either add 'cdef dict __dict__' to the extension type "
                        "or add '__slots__ = [...]' to the base type",
                        type_name, b_name);
                    __Pyx_DECREF_TypeName(b_name);
                }
#if !CYTHON_USE_TYPE_SLOTS
              dictoffset_return:
#endif
#if CYTHON_AVOID_BORROWED_REFS
                Py_DECREF(b0);
#endif
                return -1;
            }
        }
#if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(b0);
#endif
    }
    return 0;
}
#endif

/* PyType_Ready */
CYTHON_UNUSED static int __Pyx_PyType_HasMultipleInheritance(PyTypeObject *t) {
    while (t) {
        PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
        if (bases) {
            return 1;
        }
        t = __Pyx_PyType_GetSlot(t, tp_base, PyTypeObject*);
    }
    return 0;
}
static int __Pyx_PyType_Ready(PyTypeObject *t) {
#if CYTHON_USE_TYPE_SPECS || !CYTHON_COMPILING_IN_CPYTHON || defined(PYSTON_MAJOR_VERSION)
    (void)__Pyx_PyObject_CallMethod0;
#if CYTHON_USE_TYPE_SPECS
    (void)__Pyx_validate_bases_tuple;
#endif
    return PyType_Ready(t);
#else
    int r;
    if (!__Pyx_PyType_HasMultipleInheritance(t)) {
        return PyType_Ready(t);
    }
    PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
    if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1))
        return -1;
#if !defined(PYSTON_MAJOR_VERSION)
    {
        int gc_was_enabled;
    #if PY_VERSION_HEX >= 0x030A00b1
        gc_was_enabled = PyGC_Disable();
        (void)__Pyx_PyObject_CallMethod0;
    #else
        PyObject *ret, *py_status;
        PyObject *gc = NULL;
        #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) &&\
                !CYTHON_COMPILING_IN_GRAAL
        gc = PyImport_GetModule(__pyx_mstate_global->__pyx_kp_u_gc);
        #endif
        if (unlikely(!gc)) gc = PyImport_Import(__pyx_mstate_global->__pyx_kp_u_gc);
        if (unlikely(!gc)) return -1;
        py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_isenabled);
        if (unlikely(!py_status)) {
            Py_DECREF(gc);
            return -1;
        }
        gc_was_enabled = __Pyx_PyObject_IsTrue(py_status);
        Py_DECREF(py_status);
        if (gc_was_enabled > 0) {
            ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_disable);
            if (unlikely(!ret)) {
                Py_DECREF(gc);
                return -1;
            }
            Py_DECREF(ret);
        } else if (unlikely(gc_was_enabled == -1)) {
            Py_DECREF(gc);
            return -1;
        }
    #endif
        t->tp_flags |= Py_TPFLAGS_HEAPTYPE;
#if PY_VERSION_HEX >= 0x030A0000
        t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE;
#endif
#else
        (void)__Pyx_PyObject_CallMethod0;
#endif
    r = PyType_Ready(t);
#if !defined(PYSTON_MAJOR_VERSION)
        t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE;
    #if PY_VERSION_HEX >= 0x030A00b1
        if (gc_was_enabled)
            PyGC_Enable();
    #else
        if (gc_was_enabled) {
            PyObject *tp, *v, *tb;
            PyErr_Fetch(&tp, &v, &tb);
            ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_enable);
            if (likely(ret || r == -1)) {
                Py_XDECREF(ret);
                PyErr_Restore(tp, v, tb);
            } else {
                Py_XDECREF(tp);
                Py_XDECREF(v);
                Py_XDECREF(tb);
                r = -1;
            }
        }
        Py_DECREF(gc);
    #endif
    }
#endif
    return r;
#endif
}

/* SetVTable */
static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) {
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
    if (unlikely(!ob))
        goto bad;
#if CYTHON_COMPILING_IN_LIMITED_API
    if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0))
#else
    if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0))
#endif
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

/* GetVTable (used by MergeVTables) */
static void* __Pyx_GetVtable(PyTypeObject *type) {
    void* ptr;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_mstate_global->__pyx_n_u_pyx_vtable);
#else
    PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable);
#endif
    if (!ob)
        goto bad;
    ptr = PyCapsule_GetPointer(ob, 0);
    if (!ptr && !PyErr_Occurred())
        PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
    Py_DECREF(ob);
    return ptr;
bad:
    Py_XDECREF(ob);
    return NULL;
}

/* MergeVTables */
static int __Pyx_MergeVtables(PyTypeObject *type) {
    int i=0;
    Py_ssize_t size;
    void** base_vtables;
    __Pyx_TypeName tp_base_name = NULL;
    __Pyx_TypeName base_name = NULL;
    void* unknown = (void*)-1;
    PyObject* bases = __Pyx_PyType_GetSlot(type, tp_bases, PyObject*);
    int base_depth = 0;
    {
        PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
        while (base) {
            base_depth += 1;
            base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*);
        }
    }
    base_vtables = (void**) PyMem_Malloc(sizeof(void*) * (size_t)(base_depth + 1));
    base_vtables[0] = unknown;
#if CYTHON_COMPILING_IN_LIMITED_API
    size = PyTuple_Size(bases);
    if (size < 0) goto other_failure;
#else
    size = PyTuple_GET_SIZE(bases);
#endif
    for (i = 1; i < size; i++) {
        PyObject *basei;
        void* base_vtable;
#if CYTHON_AVOID_BORROWED_REFS
        basei = PySequence_GetItem(bases, i);
        if (unlikely(!basei)) goto other_failure;
#elif !CYTHON_ASSUME_SAFE_MACROS
        basei = PyTuple_GetItem(bases, i);
        if (unlikely(!basei)) goto other_failure;
#else
        basei = PyTuple_GET_ITEM(bases, i);
#endif
        base_vtable = __Pyx_GetVtable((PyTypeObject*)basei);
#if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(basei);
#endif
        if (base_vtable != NULL) {
            int j;
            PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
            for (j = 0; j < base_depth; j++) {
                if (base_vtables[j] == unknown) {
                    base_vtables[j] = __Pyx_GetVtable(base);
                    base_vtables[j + 1] = unknown;
                }
                if (base_vtables[j] == base_vtable) {
                    break;
                } else if (base_vtables[j] == NULL) {
                    goto bad;
                }
                base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*);
            }
        }
    }
    PyErr_Clear();
    PyMem_Free(base_vtables);
    return 0;
bad:
    {
        PyTypeObject* basei = NULL;
        PyTypeObject* tp_base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
        tp_base_name = __Pyx_PyType_GetFullyQualifiedName(tp_base);
#if CYTHON_AVOID_BORROWED_REFS
        basei = (PyTypeObject*)PySequence_GetItem(bases, i);
        if (unlikely(!basei)) goto really_bad;
#elif !CYTHON_ASSUME_SAFE_MACROS
        basei = (PyTypeObject*)PyTuple_GetItem(bases, i);
        if (unlikely(!basei)) goto really_bad;
#else
        basei = (PyTypeObject*)PyTuple_GET_ITEM(bases, i);
#endif
        base_name = __Pyx_PyType_GetFullyQualifiedName(basei);
#if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(basei);
#endif
    }
    PyErr_Format(PyExc_TypeError,
        "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name);
#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS
really_bad: // bad has failed!
#endif
    __Pyx_DECREF_TypeName(tp_base_name);
    __Pyx_DECREF_TypeName(base_name);
#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS
other_failure:
#endif
    PyMem_Free(base_vtables);
    return -1;
}

/* TypeImport */
#ifndef __PYX_HAVE_RT_ImportType_3_2_4
#define __PYX_HAVE_RT_ImportType_3_2_4
static PyTypeObject *__Pyx_ImportType_3_2_4(PyObject *module, const char *module_name, const char *class_name,
    size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_4 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_4 &&
            ((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_4 && (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

/* PxdImportShared (used by VoidPtrImport) */
#ifndef __PYX_HAVE_RT_ImportFromPxd_3_2_4
#define __PYX_HAVE_RT_ImportFromPxd_3_2_4
static int __Pyx_ImportFromPxd_3_2_4(PyObject *module, const char *name, void **p, const char *sig, const char *what) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    d = PyObject_GetAttrString(module, "__pyx_capi__");
    if (!d)
        goto bad;
#if (defined(Py_LIMITED_API) && Py_LIMITED_API >= 0x030d0000) || (!defined(Py_LIMITED_API) && PY_VERSION_HEX >= 0x030d0000)
    PyDict_GetItemStringRef(d, name, &cobj);
#else
    cobj = PyDict_GetItemString(d, name);
    Py_XINCREF(cobj);
#endif
    if (!cobj) {
        PyErr_Format(PyExc_ImportError,
            "%.200s does not export expected C %.8s %.200s",
                PyModule_GetName(module), what, name);
        goto bad;
    }
    if (!PyCapsule_IsValid(cobj, sig)) {
        PyErr_Format(PyExc_TypeError,
            "C %.8s %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             what, PyModule_GetName(module), name, sig, PyCapsule_GetName(cobj));
        goto bad;
    }
    *p = PyCapsule_GetPointer(cobj, sig);
    if (!(*p))
        goto bad;
    Py_DECREF(d);
    Py_DECREF(cobj);
    return 0;
bad:
    Py_XDECREF(d);
    Py_XDECREF(cobj);
    return -1;
}
#endif

/* VoidPtrImport */
#ifndef __PYX_HAVE_RT_ImportVoidPtr_3_2_4
#define __PYX_HAVE_RT_ImportVoidPtr_3_2_4
static int __Pyx_ImportVoidPtr_3_2_4(PyObject *module, const char *name, void **p, const char *sig) {
    return __Pyx_ImportFromPxd_3_2_4(module, name, p, sig, "variable");
}
#endif

/* FunctionImport */
#ifndef __PYX_HAVE_RT_ImportFunction_3_2_4
#define __PYX_HAVE_RT_ImportFunction_3_2_4
static int __Pyx_ImportFunction_3_2_4(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
    union {
        void (*fp)(void);
        void *p;
    } tmp;
    int result = __Pyx_ImportFromPxd_3_2_4(module, funcname, &tmp.p, sig, "function");
    if (result == 0) {
        *f = tmp.fp;
    }
    return result;
}
#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__11);
        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;
}

/* dict_setdefault (used by FetchCommonType) */
static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value) {
    PyObject* value;
#if __PYX_LIMITED_VERSION_HEX >= 0x030F0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4)
    PyDict_SetDefaultRef(d, key, default_value, &value);
#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000
    PyObject *args[] = {d, key, default_value};
    value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
#elif CYTHON_COMPILING_IN_LIMITED_API
    value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL);
#else
    value = PyDict_SetDefault(d, key, default_value);
    if (unlikely(!value)) return NULL;
    Py_INCREF(value);
#endif
    return value;
}

/* AddModuleRef (used by FetchSharedCythonModule) */
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) {
      PyObject *module_dict = PyImport_GetModuleDict();
      PyObject *m;
      if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) {
          return NULL;
      }
      if (m != NULL && PyModule_Check(m)) {
          return m;
      }
      Py_XDECREF(m);
      m = PyModule_NewObject(name);
      if (m == NULL)
          return NULL;
      if (PyDict_CheckExact(module_dict)) {
          PyObject *new_m;
          (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m);
          Py_DECREF(m);
          return new_m;
      } else {
           if (PyObject_SetItem(module_dict, name, m) != 0) {
                Py_DECREF(m);
                return NULL;
            }
            return m;
      }
  }
  static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
      PyObject *py_name = PyUnicode_FromString(name);
      if (!py_name) return NULL;
      PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name);
      Py_DECREF(py_name);
      return module;
  }
#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000
  #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
#else
  static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
      PyObject *module = PyImport_AddModule(name);
      Py_XINCREF(module);
      return module;
  }
#endif

/* FetchSharedCythonModule (used by FetchCommonType) */
static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
    return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME);
}

/* FetchCommonType (used by CommonTypesMetaclass) */
#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
    PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases);
    if (result && metaclass) {
        PyObject *old_tp = (PyObject*)Py_TYPE(result);
    Py_INCREF((PyObject*)metaclass);
#if __PYX_LIMITED_VERSION_HEX >= 0x03090000
        Py_SET_TYPE(result, metaclass);
#else
        result->ob_type = metaclass;
#endif
        Py_DECREF(old_tp);
    }
    return result;
}
#else
#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b)
#endif
static int __Pyx_VerifyCachedType(PyObject *cached_type,
                               const char *name,
                               Py_ssize_t expected_basicsize) {
    Py_ssize_t basicsize;
    if (!PyType_Check(cached_type)) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s is not a type object", name);
        return -1;
    }
    if (expected_basicsize == 0) {
        return 0; // size is inherited, nothing useful to check
    }
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *py_basicsize;
    py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
    if (unlikely(!py_basicsize)) return -1;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = NULL;
    if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1;
#else
    basicsize = ((PyTypeObject*) cached_type)->tp_basicsize;
#endif
    if (basicsize != expected_basicsize) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s has the wrong size, try recompiling",
            name);
        return -1;
    }
    return 0;
}
static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
    PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name;
    int get_item_ref_result;
    const char* object_name = strrchr(spec->name, '.');
    object_name = object_name ? object_name+1 : spec->name;
    py_object_name = PyUnicode_FromString(object_name);
    if (!py_object_name) return NULL;
    abi_module = __Pyx_FetchSharedCythonABIModule();
    if (!abi_module) goto done;
    abi_module_dict = PyModule_GetDict(abi_module);
    if (!abi_module_dict) goto done;
    get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type);
    if (get_item_ref_result == 1) {
        if (__Pyx_VerifyCachedType(
              cached_type,
              object_name,
              spec->basicsize) < 0) {
            goto bad;
        }
        goto done;
    } else if (unlikely(get_item_ref_result == -1)) {
        goto bad;
    }
    cached_type = __Pyx_PyType_FromMetaclass(
        metaclass,
        CYTHON_USE_MODULE_STATE ? module : abi_module,
        spec, bases);
    if (unlikely(!cached_type)) goto bad;
    if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad;
    new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type);
    if (unlikely(new_cached_type != cached_type)) {
        if (unlikely(!new_cached_type)) goto bad;
        Py_DECREF(cached_type);
        cached_type = new_cached_type;
        if (__Pyx_VerifyCachedType(
                cached_type,
                object_name,
                spec->basicsize) < 0) {
            goto bad;
        }
        goto done;
    } else {
        Py_DECREF(new_cached_type);
    }
done:
    Py_XDECREF(abi_module);
    Py_DECREF(py_object_name);
    assert(cached_type == NULL || PyType_Check(cached_type));
    return (PyTypeObject *) cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

/* CommonTypesMetaclass (used by CythonFunctionShared) */
static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) {
    return PyUnicode_FromString(__PYX_ABI_MODULE_NAME);
}
#if __PYX_LIMITED_VERSION_HEX < 0x030A0000
static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) {
    PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types");
    return NULL;
}
static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) {
    PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable");
    return -1;
}
#endif
static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = {
    {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL},
    {0, 0, 0, 0, 0}
};
static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = {
    {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset},
    #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
    {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call},
    {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call},
    {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr},
    #endif
    {0, 0}
};
static PyType_Spec __pyx_CommonTypesMetaclass_spec = {
    __PYX_TYPE_MODULE_PREFIX "_common_types_metatype",
    0,
    0,
    Py_TPFLAGS_IMMUTABLETYPE |
    Py_TPFLAGS_DISALLOW_INSTANTIATION |
    Py_TPFLAGS_DEFAULT,
    __pyx_CommonTypesMetaclass_slots
};
static int __pyx_CommonTypesMetaclass_init(PyObject *module) {
    __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
    PyObject *bases = PyTuple_Pack(1, &PyType_Type);
    if (unlikely(!bases)) {
        return -1;
    }
    mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases);
    Py_DECREF(bases);
    if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) {
        return -1;
    }
    return 0;
}

/* PyMethodNew (used by CythonFunctionShared) */
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    PyObject *result;
    CYTHON_UNUSED_VAR(typ);
    if (!self)
        return __Pyx_NewRef(func);
    #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
    {
        PyObject *args[] = {func, self};
        result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL);
    }
    #else
    result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL);
    #endif
    return result;
}
#else
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    CYTHON_UNUSED_VAR(typ);
    if (!self)
        return __Pyx_NewRef(func);
    return PyMethod_New(func, self);
}
#endif

/* PyVectorcallFastCallDict (used by CythonFunctionShared) */
#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
{
    PyObject *res = NULL;
    PyObject *kwnames;
    PyObject **newargs;
    PyObject **kwvalues;
    Py_ssize_t i;
    #if CYTHON_AVOID_BORROWED_REFS
    PyObject *pos;
    #else
    Py_ssize_t pos;
    #endif
    size_t j;
    PyObject *key, *value;
    unsigned long keys_are_strings;
    #if !CYTHON_ASSUME_SAFE_SIZE
    Py_ssize_t nkw = PyDict_Size(kw);
    if (unlikely(nkw == -1)) return NULL;
    #else
    Py_ssize_t nkw = PyDict_GET_SIZE(kw);
    #endif
    newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0]));
    if (unlikely(newargs == NULL)) {
        PyErr_NoMemory();
        return NULL;
    }
    for (j = 0; j < nargs; j++) newargs[j] = args[j];
    kwnames = PyTuple_New(nkw);
    if (unlikely(kwnames == NULL)) {
        PyMem_Free(newargs);
        return NULL;
    }
    kwvalues = newargs + nargs;
    pos = 0;
    i = 0;
    keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
    while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) {
        keys_are_strings &=
        #if CYTHON_COMPILING_IN_LIMITED_API
            PyType_GetFlags(Py_TYPE(key));
        #else
            Py_TYPE(key)->tp_flags;
        #endif
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup;
        #else
        PyTuple_SET_ITEM(kwnames, i, key);
        #endif
        kwvalues[i] = value;
        i++;
    }
    if (unlikely(!keys_are_strings)) {
        PyErr_SetString(PyExc_TypeError, "keywords must be strings");
        goto cleanup;
    }
    res = vc(func, newargs, nargs, kwnames);
cleanup:
    #if CYTHON_AVOID_BORROWED_REFS
    Py_DECREF(pos);
    #endif
    Py_DECREF(kwnames);
    for (i = 0; i < nkw; i++)
        Py_DECREF(kwvalues[i]);
    PyMem_Free(newargs);
    return res;
}
static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
{
    Py_ssize_t kw_size =
        likely(kw == NULL) ?
        0 :
#if !CYTHON_ASSUME_SAFE_SIZE
        PyDict_Size(kw);
#else
        PyDict_GET_SIZE(kw);
#endif
    if (kw_size == 0) {
        return vc(func, args, nargs, NULL);
    }
#if !CYTHON_ASSUME_SAFE_SIZE
    else if (unlikely(kw_size == -1)) {
        return NULL;
    }
#endif
    return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
}
#endif

/* CythonFunctionShared (used by CythonFunction) */
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) {
    if (__Pyx_CyFunction_Check(func)) {
        return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc;
    } else if (PyCFunction_Check(func)) {
        return PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) {
    if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) {
        int result;
        PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func);
        if (unlikely(!newFunc)) {
            PyErr_Clear(); // It's only an optimization, so don't throw an error
            return 0;
        }
        result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc);
        Py_DECREF(newFunc);
        return result;
    }
    return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc);
}
#else
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) {
    if (PyMethod_Check(func)) {
        func = PyMethod_GET_FUNCTION(func);
    }
    return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
}
#endif
static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) {
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    __Pyx_Py_XDECREF_SET(
        __Pyx_CyFunction_GetClassObj(f),
            ((classobj) ? __Pyx_NewRef(classobj) : NULL));
#else
    __Pyx_Py_XDECREF_SET(
        ((PyCMethodObject *) (f))->mm_class,
        (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
#endif
}
static PyObject *
__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_doc == NULL)) {
#if CYTHON_COMPILING_IN_LIMITED_API
        op->func_doc = PyObject_GetAttrString(op->func, "__doc__");
        if (unlikely(!op->func_doc)) return NULL;
#else
        if (((PyCFunctionObject*)op)->m_ml->ml_doc) {
            op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
#endif
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) {
    PyObject *result;
    CYTHON_UNUSED_VAR(closure);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_doc_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_doc, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_name == NULL)) {
#if CYTHON_COMPILING_IN_LIMITED_API
        op->func_name = PyObject_GetAttrString(op->func, "__name__");
#else
        op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context)
{
    PyObject *result = NULL;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_name_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_name, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    PyObject *result;
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    Py_INCREF(op->func_qualname);
    result = op->func_qualname;
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_qualname, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
#endif
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(op);
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    #else
    op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value) {
        value = Py_None;
    } else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not "
                 "currently affect the values used in function calls", 1);
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result = NULL;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_defaults_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value) {
        value = Py_None;
    } else if (unlikely(value != Py_None && !PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not "
                 "currently affect the values used in function calls", 1);
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_kwdefaults_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_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;
}

/* GetNameInClass */
static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) {
    PyObject *result;
    PyObject *dict;
    assert(PyType_Check(nmspace));
#if CYTHON_USE_TYPE_SLOTS
    dict = ((PyTypeObject*)nmspace)->tp_dict;
    Py_XINCREF(dict);
#else
    dict = PyObject_GetAttr(nmspace, __pyx_mstate_global->__pyx_n_u_dict);
#endif
    if (likely(dict)) {
        result = PyObject_GetItem(dict, name);
        Py_DECREF(dict);
        if (result) {
            return result;
        }
    }
    PyErr_Clear();
    __Pyx_GetModuleGlobalNameUncached(result, name);
    return result;
}

/* ClassMethod */
static PyObject* __Pyx_Method_ClassMethod(PyObject *method) {
#if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM <= 0x05080000
    if (PyObject_TypeCheck(method, &PyWrapperDescr_Type)) {
        return PyClassMethod_New(method);
    }
#else
#if CYTHON_COMPILING_IN_PYPY
    if (PyMethodDescr_Check(method))
#else
    if (__Pyx_TypeCheck(method, &PyMethodDescr_Type))
#endif
    {
#if CYTHON_COMPILING_IN_LIMITED_API
        return PyErr_Format(
            PyExc_SystemError,
            "Cython cannot yet handle classmethod on a MethodDescriptorType (%S) in limited API mode. "
            "This is most likely a classmethod in a cdef class method with binding=False. "
            "Try setting 'binding' to True.",
            method);
#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
        PyTypeObject *d_type = GraalPyDescrObject_GetType(method);
        return PyDescr_NewClassMethod(d_type, GraalPyMethodDescrObject_GetMethod(method));
#elif CYTHON_COMPILING_IN_GRAAL
        PyTypeObject *d_type = PyDescrObject_GetType(method);
        return PyDescr_NewClassMethod(d_type, PyMethodDescrObject_GetMethod(method));
#else
        PyMethodDescrObject *descr = (PyMethodDescrObject *)method;
        PyTypeObject *d_type = descr->d_common.d_type;
        return PyDescr_NewClassMethod(d_type, descr->d_method);
#endif
    }
#endif
#if !CYTHON_COMPILING_IN_LIMITED_API
    else if (PyMethod_Check(method)) {
        return PyClassMethod_New(PyMethod_GET_FUNCTION(method));
    }
    else {
        return PyClassMethod_New(method);
    }
#else
    {
        PyObject *func=NULL;
        PyObject *builtins, *classmethod, *classmethod_str, *result=NULL;
        if (__Pyx_TypeCheck(method, __pyx_mstate_global->__Pyx_CachedMethodType)) {
            func = PyObject_GetAttrString(method, "__func__");
            if (!func) goto bad;
        } else {
            func = method;
            Py_INCREF(func);
        }
        builtins = PyEval_GetBuiltins(); // borrowed
        if (unlikely(!builtins)) goto bad;
        classmethod_str = PyUnicode_FromString("classmethod");
        if (unlikely(!classmethod_str)) goto bad;
        classmethod = PyObject_GetItem(builtins, classmethod_str);
        Py_DECREF(classmethod_str);
        if (unlikely(!classmethod)) goto bad;
        result = PyObject_CallFunctionObjArgs(classmethod, func, NULL);
        Py_DECREF(classmethod);
        bad:
        Py_XDECREF(func);
        return result;
    }
#endif
}

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

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

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_enum__fplll_3a__3a_IntType(enum fplll::IntType value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum fplll::IntType neg_one = (enum fplll::IntType) -1, const_zero = (enum fplll::IntType) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum fplll::IntType) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(enum fplll::IntType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(enum fplll::IntType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(enum fplll::IntType) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(enum fplll::IntType) <= 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(enum fplll::IntType),
                                     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(enum fplll::IntType));
        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
    }
}

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

/* CIntFromPy */
static CYTHON_INLINE enum fplll::IntType __Pyx_PyLong_As_enum__fplll_3a__3a_IntType(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const enum fplll::IntType neg_one = (enum fplll::IntType) -1, const_zero = (enum fplll::IntType) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        enum fplll::IntType val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (enum fplll::IntType) -1;
        val = __Pyx_PyLong_As_enum__fplll_3a__3a_IntType(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(enum fplll::IntType, __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(enum fplll::IntType) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum fplll::IntType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum fplll::IntType) >= 2 * PyLong_SHIFT)) {
                            return (enum fplll::IntType) (((((enum fplll::IntType)digits[1]) << PyLong_SHIFT) | (enum fplll::IntType)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(enum fplll::IntType) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum fplll::IntType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum fplll::IntType) >= 3 * PyLong_SHIFT)) {
                            return (enum fplll::IntType) (((((((enum fplll::IntType)digits[2]) << PyLong_SHIFT) | (enum fplll::IntType)digits[1]) << PyLong_SHIFT) | (enum fplll::IntType)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(enum fplll::IntType) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum fplll::IntType, 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(enum fplll::IntType) >= 4 * PyLong_SHIFT)) {
                            return (enum fplll::IntType) (((((((((enum fplll::IntType)digits[3]) << PyLong_SHIFT) | (enum fplll::IntType)digits[2]) << PyLong_SHIFT) | (enum fplll::IntType)digits[1]) << PyLong_SHIFT) | (enum fplll::IntType)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 (enum fplll::IntType) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(enum fplll::IntType) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(enum fplll::IntType, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(enum fplll::IntType) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(enum fplll::IntType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(enum fplll::IntType, __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(enum fplll::IntType) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum fplll::IntType, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum fplll::IntType) - 1 > 2 * PyLong_SHIFT)) {
                            return (enum fplll::IntType) (((enum fplll::IntType)-1)*(((((enum fplll::IntType)digits[1]) << PyLong_SHIFT) | (enum fplll::IntType)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(enum fplll::IntType) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum fplll::IntType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum fplll::IntType) - 1 > 2 * PyLong_SHIFT)) {
                            return (enum fplll::IntType) ((((((enum fplll::IntType)digits[1]) << PyLong_SHIFT) | (enum fplll::IntType)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(enum fplll::IntType) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum fplll::IntType, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum fplll::IntType) - 1 > 3 * PyLong_SHIFT)) {
                            return (enum fplll::IntType) (((enum fplll::IntType)-1)*(((((((enum fplll::IntType)digits[2]) << PyLong_SHIFT) | (enum fplll::IntType)digits[1]) << PyLong_SHIFT) | (enum fplll::IntType)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(enum fplll::IntType) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum fplll::IntType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(enum fplll::IntType) - 1 > 3 * PyLong_SHIFT)) {
                            return (enum fplll::IntType) ((((((((enum fplll::IntType)digits[2]) << PyLong_SHIFT) | (enum fplll::IntType)digits[1]) << PyLong_SHIFT) | (enum fplll::IntType)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(enum fplll::IntType) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum fplll::IntType, 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(enum fplll::IntType) - 1 > 4 * PyLong_SHIFT)) {
                            return (enum fplll::IntType) (((enum fplll::IntType)-1)*(((((((((enum fplll::IntType)digits[3]) << PyLong_SHIFT) | (enum fplll::IntType)digits[2]) << PyLong_SHIFT) | (enum fplll::IntType)digits[1]) << PyLong_SHIFT) | (enum fplll::IntType)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(enum fplll::IntType) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(enum fplll::IntType, 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(enum fplll::IntType) - 1 > 4 * PyLong_SHIFT)) {
                            return (enum fplll::IntType) ((((((((((enum fplll::IntType)digits[3]) << PyLong_SHIFT) | (enum fplll::IntType)digits[2]) << PyLong_SHIFT) | (enum fplll::IntType)digits[1]) << PyLong_SHIFT) | (enum fplll::IntType)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(enum fplll::IntType) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(enum fplll::IntType, long, PyLong_AsLong(x))
        } else if ((sizeof(enum fplll::IntType) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(enum fplll::IntType, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        enum fplll::IntType 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
        PyErr_SetString(PyExc_RuntimeError,
                        "_PyLong_AsByteArray() or PyLong_AsNativeBytes() not available, cannot convert large enums");
        val = (enum fplll::IntType) -1;
#endif
        if (unlikely(ret))
            return (enum fplll::IntType) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to enum fplll::IntType");
    return (enum fplll::IntType) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to enum fplll::IntType");
    return (enum fplll::IntType) -1;
}

/* 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__12);
    }
    goto done;
}
#endif

/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (cls == a || cls == b) return 1;
    mro = cls->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            PyObject *base = PyTuple_GET_ITEM(mro, i);
            if (base == (PyObject *)a || base == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
}
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    if (exc_type1) {
        return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
    } else {
        return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
}
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* GetRuntimeVersion */
#if __PYX_LIMITED_VERSION_HEX < 0x030b0000
void __Pyx_init_runtime_version(void) {
    if (__Pyx_cached_runtime_version == 0) {
        const char* rt_version = Py_GetVersion();
        unsigned long version = 0;
        unsigned long factor = 0x01000000UL;
        unsigned int digit = 0;
        int i = 0;
        while (factor) {
            while ('0' <= rt_version[i] && rt_version[i] <= '9') {
                digit = digit * 10 + (unsigned int) (rt_version[i] - '0');
                ++i;
            }
            version += factor * digit;
            if (rt_version[i] != '.')
                break;
            digit = 0;
            factor >>= 8;
            ++i;
        }
        __Pyx_cached_runtime_version = version;
    }
}
#endif
static unsigned long __Pyx_get_runtime_version(void) {
#if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
    return Py_Version & ~0xFFUL;
#else
    return __Pyx_cached_runtime_version;
#endif
}

/* CheckBinaryVersion */
static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) {
    const unsigned long MAJOR_MINOR = 0xFFFF0000UL;
    if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR))
        return 0;
    if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
        return 1;
    {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compile time Python version %d.%d "
                      "of module '%.100s' "
                      "%s "
                      "runtime version %d.%d",
                       (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF),
                       __Pyx_MODULE_NAME,
                       (allow_newer) ? "was newer than" : "does not match",
                       (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF)
       );
        return PyErr_WarnEx(NULL, message, 1);
    }
}

/* NewCodeObj */
#if CYTHON_COMPILING_IN_LIMITED_API
    static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f,
                                       PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                       PyObject *fv, PyObject *cell, PyObject* fn,
                                       PyObject *name, int fline, PyObject *lnos) {
        PyObject *exception_table = NULL;
        PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
        #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
        PyObject *version_info;
        PyObject *py_minor_version = NULL;
        #endif
        long minor_version = 0;
        PyObject *type, *value, *traceback;
        PyErr_Fetch(&type, &value, &traceback);
        #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
        minor_version = 11;
        #else
        if (!(version_info = PySys_GetObject("version_info"))) goto end;
        if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end;
        minor_version = PyLong_AsLong(py_minor_version);
        Py_DECREF(py_minor_version);
        if (minor_version == -1 && PyErr_Occurred()) goto end;
        #endif
        if (!(types_module = PyImport_ImportModule("types"))) goto end;
        if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end;
        if (minor_version <= 7) {
            (void)p;
            result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code,
                          c, n, v, fn, name, fline, lnos, fv, cell);
        } else if (minor_version <= 10) {
            result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code,
                          c, n, v, fn, name, fline, lnos, fv, cell);
        } else {
            if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end;
            result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code,
                          c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell);
        }
    end:
        Py_XDECREF(code_type);
        Py_XDECREF(exception_table);
        Py_XDECREF(types_module);
        if (type) {
            PyErr_Restore(type, value, traceback);
        }
        return result;
    }
#elif PY_VERSION_HEX >= 0x030B0000
  static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f,
                                         PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                         PyObject *fv, PyObject *cell, PyObject* fn,
                                         PyObject *name, int fline, PyObject *lnos) {
    PyCodeObject *result;
    result =
      #if PY_VERSION_HEX >= 0x030C0000
        PyUnstable_Code_NewWithPosOnlyArgs
      #else
        PyCode_NewWithPosOnlyArgs
      #endif
        (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes);
    #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1
    if (likely(result))
        result->_co_firsttraceable = 0;
    #endif
    return result;
  }
#elif !CYTHON_COMPILING_IN_PYPY
  #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif
static PyObject* __Pyx_PyCode_New(
        const __Pyx_PyCode_New_function_description descr,
        PyObject * const *varnames,
        PyObject *filename,
        PyObject *funcname,
        PyObject *line_table,
        PyObject *tuple_dedup_map
) {
    PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL;
    Py_ssize_t var_count = (Py_ssize_t) descr.nlocals;
    PyObject *varnames_tuple = PyTuple_New(var_count);
    if (unlikely(!varnames_tuple)) return NULL;
    for (Py_ssize_t i=0; i < var_count; i++) {
        Py_INCREF(varnames[i]);
        if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done;
    }
    #if CYTHON_COMPILING_IN_LIMITED_API
    varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple);
    if (!varnames_tuple_dedup) {
        if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done;
        varnames_tuple_dedup = varnames_tuple;
    }
    #else
    varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple);
    if (unlikely(!varnames_tuple_dedup)) goto done;
    #endif
    #if CYTHON_AVOID_BORROWED_REFS
    Py_INCREF(varnames_tuple_dedup);
    #endif
    if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) {
        Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(line_table_length == -1)) goto done;
        #endif
        Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL;
        code_bytes = PyBytes_FromStringAndSize(NULL, code_len);
        if (unlikely(!code_bytes)) goto done;
        char* c_code_bytes = PyBytes_AsString(code_bytes);
        if (unlikely(!c_code_bytes)) goto done;
        memset(c_code_bytes, 0, (size_t) code_len);
    }
    code_obj = (PyObject*) __Pyx__PyCode_New(
        (int) descr.argcount,
        (int) descr.num_posonly_args,
        (int) descr.num_kwonly_args,
        (int) descr.nlocals,
        0,
        (int) descr.flags,
        code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes,
        __pyx_mstate_global->__pyx_empty_tuple,
        __pyx_mstate_global->__pyx_empty_tuple,
        varnames_tuple_dedup,
        __pyx_mstate_global->__pyx_empty_tuple,
        __pyx_mstate_global->__pyx_empty_tuple,
        filename,
        funcname,
        (int) descr.first_line,
        (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes
    );
done:
    Py_XDECREF(code_bytes);
    #if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(varnames_tuple_dedup);
    #endif
    Py_DECREF(varnames_tuple);
    return code_obj;
}

/* DecompressString */
static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) {
    PyObject *module = NULL, *decompress, *compressed_bytes, *decompressed;
    const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib";
    PyObject *methodname = PyUnicode_FromString("decompress");
    if (unlikely(!methodname)) return NULL;
    #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000
    if (algo == 3) {
        PyObject *fromlist = Py_BuildValue("[O]", methodname);
        if (unlikely(!fromlist)) goto bad;
        module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0);
        Py_DECREF(fromlist);
    } else
    #endif
        module = PyImport_ImportModule(module_name);
    if (unlikely(!module)) goto import_failed;
    decompress = PyObject_GetAttr(module, methodname);
    if (unlikely(!decompress)) goto import_failed;
    {
        #ifdef __cplusplus
            char *memview_bytes = const_cast<char*>(s);
        #else
            #if defined(__clang__)
              #pragma clang diagnostic push
              #pragma clang diagnostic ignored "-Wcast-qual"
            #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
              #pragma GCC diagnostic push
              #pragma GCC diagnostic ignored "-Wcast-qual"
            #endif
            char *memview_bytes = (char*) s;
            #if defined(__clang__)
              #pragma clang diagnostic pop
            #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
              #pragma GCC diagnostic pop
            #endif
        #endif
        #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ)
        int memview_flags = 0x100;
        #else
        int memview_flags = PyBUF_READ;
        #endif
        compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags);
    }
    if (unlikely(!compressed_bytes)) {
        Py_DECREF(decompress);
        goto bad;
    }
    decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL);
    Py_DECREF(compressed_bytes);
    Py_DECREF(decompress);
    Py_DECREF(module);
    Py_DECREF(methodname);
    return decompressed;
import_failed:
    PyErr_Format(PyExc_ImportError,
        "Failed to import '%.20s.decompress' - cannot initialise module strings. "
        "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.",
        module_name, algo);
bad:
    Py_XDECREF(module);
    Py_DECREF(methodname);
    return NULL;
}

#include <string.h>
static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) {
    size_t len = strlen(s);
    if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) {
        PyErr_SetString(PyExc_OverflowError, "byte string is too long");
        return -1;
    }
    return (Py_ssize_t) len;
}
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    Py_ssize_t len = __Pyx_ssize_strlen(c_str);
    if (unlikely(len < 0)) return NULL;
    return __Pyx_PyUnicode_FromStringAndSize(c_str, len);
}
static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) {
    Py_ssize_t len = __Pyx_ssize_strlen(c_str);
    if (unlikely(len < 0)) return NULL;
    return PyByteArray_FromStringAndSize(c_str, len);
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if CYTHON_COMPILING_IN_LIMITED_API
    {
        const char* result;
        Py_ssize_t unicode_length;
        CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
        if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL;
        #else
        result = PyUnicode_AsUTF8AndSize(o, length);
        #endif
        #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        unicode_length = PyUnicode_GetLength(o);
        if (unlikely(unicode_length < 0)) return NULL;
        if (unlikely(unicode_length != *length)) {
            PyUnicode_AsASCIIString(o);
            return NULL;
        }
        #endif
        return result;
    }
#else
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
#endif
}
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
    if (PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
    if (PyByteArray_Check(o)) {
#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)))
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
#else
        *length = PyByteArray_Size(o);
        if (*length == -1) return NULL;
        return PyByteArray_AsString(o);
#endif
    } else
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) {
    __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result));
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ").  "
                "The ability to return an instance of a strict subclass of int is deprecated, "
                "and may be removed in a future version of Python.",
                result_type_name)) {
            __Pyx_DECREF_TypeName(result_type_name);
            Py_DECREF(result);
            return NULL;
        }
        __Pyx_DECREF_TypeName(result_type_name);
        return result;
    }
    PyErr_Format(PyExc_TypeError,
                 "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")",
                 result_type_name);
    __Pyx_DECREF_TypeName(result_type_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  PyObject *res = NULL;
  if (likely(PyLong_Check(x)))
      return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  if (likely(m && m->nb_int)) {
      res = m->nb_int(x);
  }
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
      res = PyNumber_Long(x);
  }
#endif
  if (likely(res)) {
      if (unlikely(!PyLong_CheckExact(res))) {
          return __Pyx_PyNumber_LongWrongResultType(res);
      }
  }
  else if (!PyErr_Occurred()) {
      PyErr_SetString(PyExc_TypeError,
                      "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(__Pyx_PyLong_IsCompact(b))) {
        return __Pyx_PyLong_CompactValue(b);
    } else {
      const digit* digits = __Pyx_PyLong_Digits(b);
      const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b);
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyLong_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
  if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
    return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
  } else {
    Py_ssize_t ival;
    PyObject *x;
    x = PyNumber_Index(o);
    if (!x) return -1;
    ival = PyLong_AsLong(x);
    Py_DECREF(x);
    return ival;
  }
}
static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) {
    CYTHON_UNUSED_VAR(b);
    return __Pyx_NewRef(Py_None);
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return __Pyx_NewRef(b ? Py_True: Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) {
    return PyLong_FromSize_t(ival);
}


/* MultiPhaseInitModuleState */
#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000)
  #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1
#else
  #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0
#endif
#endif
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS
#error "Module state with PEP489 requires atomics. Currently that's one of\
 C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics"
#endif
#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
#define __Pyx_ModuleStateLookup_Lock()
#define __Pyx_ModuleStateLookup_Unlock()
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
static PyMutex __Pyx_ModuleStateLookup_mutex = {0};
#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex)
#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex)
#elif defined(__cplusplus) && __cplusplus >= 201103L
#include <mutex>
static std::mutex __Pyx_ModuleStateLookup_mutex;
#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock()
#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock()
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__)
#include <threads.h>
static mtx_t __Pyx_ModuleStateLookup_mutex;
static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT;
static void __Pyx_ModuleStateLookup_initialize_mutex(void) {
    mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain);
}
#define __Pyx_ModuleStateLookup_Lock()\
  call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\
  mtx_lock(&__Pyx_ModuleStateLookup_mutex)
#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex)
#elif defined(HAVE_PTHREAD_H)
#include <pthread.h>
static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER;
#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex)
#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex)
#elif defined(_WIN32)
#include <Windows.h>  // synchapi.h on its own doesn't work
static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT;
#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
#else
#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\
 Requires C standard >= C11, or C++ standard >= C++11,\
 or pthreads, or the Windows 32 API, or Python >= 3.13."
#endif
typedef struct {
    int64_t id;
    PyObject *module;
} __Pyx_InterpreterIdAndModule;
typedef struct {
    char interpreter_id_as_index;
    Py_ssize_t count;
    Py_ssize_t allocated;
    __Pyx_InterpreterIdAndModule table[1];
} __Pyx_ModuleStateLookupData;
#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0;
#endif
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0;
#else
static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL;
#endif
static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound(
        __Pyx_InterpreterIdAndModule* table,
        Py_ssize_t count,
        int64_t interpreterId) {
    __Pyx_InterpreterIdAndModule* begin = table;
    __Pyx_InterpreterIdAndModule* end = begin + count;
    if (begin->id == interpreterId) {
        return begin;
    }
    while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
        __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2;
        if (halfway->id == interpreterId) {
            return halfway;
        }
        if (halfway->id < interpreterId) {
            begin = halfway;
        } else {
            end = halfway;
        }
    }
    for (; begin < end; ++begin) {
        if (begin->id >= interpreterId) return begin;
    }
    return begin;
}
static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) {
    int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
    if (interpreter_id == -1) return NULL;
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
    {
        __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
        if (likely(data)) {
            __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data);
            if (likely(data == new_data)) {
                goto read_finished;
            }
        }
        __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
        __Pyx_ModuleStateLookup_Lock();
        __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter);
        data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
        __Pyx_ModuleStateLookup_Unlock();
    }
  read_finished:;
#else
    __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data;
#endif
    __Pyx_InterpreterIdAndModule* found = NULL;
    if (unlikely(!data)) goto end;
    if (data->interpreter_id_as_index) {
        if (interpreter_id < data->count) {
            found = data->table+interpreter_id;
        }
    } else {
        found = __Pyx_State_FindModuleStateLookupTableLowerBound(
            data->table, data->count, interpreter_id);
    }
  end:
    {
        PyObject *result=NULL;
        if (found && found->id == interpreter_id) {
            result = found->module;
        }
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
        __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
#endif
        return result;
    }
}
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) {
    while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0);
}
#else
#define __Pyx_ModuleStateLookup_wait_until_no_readers()
#endif
static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) {
    Py_ssize_t to_allocate = (*old_data)->allocated;
    while (to_allocate <= interpreter_id) {
        if (to_allocate == 0) to_allocate = 1;
        else to_allocate *= 2;
    }
    __Pyx_ModuleStateLookupData *new_data = *old_data;
    if (to_allocate != (*old_data)->allocated) {
         new_data = (__Pyx_ModuleStateLookupData *)realloc(
            *old_data,
            sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule));
        if (!new_data) {
            PyErr_NoMemory();
            return -1;
        }
        for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) {
            new_data->table[i].id = i;
            new_data->table[i].module = NULL;
        }
        new_data->allocated = to_allocate;
    }
    new_data->table[interpreter_id].module = module;
    if (new_data->count < interpreter_id+1) {
        new_data->count = interpreter_id+1;
    }
    *old_data = new_data;
    return 0;
}
static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) {
    __Pyx_InterpreterIdAndModule *read = data->table;
    __Pyx_InterpreterIdAndModule *write = data->table;
    __Pyx_InterpreterIdAndModule *end = read + data->count;
    for (; read<end; ++read) {
        if (read->module) {
            write->id = read->id;
            write->module = read->module;
            ++write;
        }
    }
    data->count = write - data->table;
    for (; write<end; ++write) {
        write->id = 0;
        write->module = NULL;
    }
    data->interpreter_id_as_index = 0;
}
static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) {
    int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
    if (interpreter_id == -1) return -1;
    int result = 0;
    __Pyx_ModuleStateLookup_Lock();
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *)
            __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
#else
    __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data;
#endif
    __Pyx_ModuleStateLookupData *new_data = old_data;
    if (!new_data) {
        new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData));
        if (!new_data) {
            result = -1;
            PyErr_NoMemory();
            goto end;
        }
        new_data->allocated = 1;
        new_data->interpreter_id_as_index = 1;
    }
    __Pyx_ModuleStateLookup_wait_until_no_readers();
    if (new_data->interpreter_id_as_index) {
        if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
            result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id);
            goto end;
        }
        __Pyx_State_ConvertFromInterpIdAsIndex(new_data);
    }
    {
        Py_ssize_t insert_at = 0;
        {
            __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
                new_data->table, new_data->count, interpreter_id);
            assert(lower_bound);
            insert_at = lower_bound - new_data->table;
            if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) {
                lower_bound->module = module;
                goto end;  // already in table, nothing more to do
            }
        }
        if (new_data->count+1 >= new_data->allocated) {
            Py_ssize_t to_allocate = (new_data->count+1)*2;
            new_data =
                (__Pyx_ModuleStateLookupData*)realloc(
                    new_data,
                    sizeof(__Pyx_ModuleStateLookupData) +
                    (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule));
            if (!new_data) {
                result = -1;
                new_data = old_data;
                PyErr_NoMemory();
                goto end;
            }
            new_data->allocated = to_allocate;
        }
        ++new_data->count;
        int64_t last_id = interpreter_id;
        PyObject *last_module = module;
        for (Py_ssize_t i=insert_at; i<new_data->count; ++i) {
            int64_t current_id = new_data->table[i].id;
            new_data->table[i].id = last_id;
            last_id = current_id;
            PyObject *current_module = new_data->table[i].module;
            new_data->table[i].module = last_module;
            last_module = current_module;
        }
    }
  end:
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data);
#else
    __Pyx_ModuleStateLookup_data = new_data;
#endif
    __Pyx_ModuleStateLookup_Unlock();
    return result;
}
static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) {
    int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
    if (interpreter_id == -1) return -1;
    __Pyx_ModuleStateLookup_Lock();
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *)
            __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
#else
    __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data;
#endif
    if (data->interpreter_id_as_index) {
        if (interpreter_id < data->count) {
            data->table[interpreter_id].module = NULL;
        }
        goto done;
    }
    {
        __Pyx_ModuleStateLookup_wait_until_no_readers();
        __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
            data->table, data->count, interpreter_id);
        if (!lower_bound) goto done;
        if (lower_bound->id != interpreter_id) goto done;
        __Pyx_InterpreterIdAndModule *end = data->table+data->count;
        for (;lower_bound<end-1; ++lower_bound) {
            lower_bound->id = (lower_bound+1)->id;
            lower_bound->module = (lower_bound+1)->module;
        }
    }
    --data->count;
    if (data->count == 0) {
        free(data);
        data = NULL;
    }
  done:
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data);
#else
    __Pyx_ModuleStateLookup_data = data;
#endif
    __Pyx_ModuleStateLookup_Unlock();
    return 0;
}
#endif

/* #### Code section: utility_code_pragmas_end ### */
#ifdef _MSC_VER
#pragma warning( pop )
#endif



/* #### Code section: end ### */
#endif /* Py_PYTHON_H */
