/* Generated by Cython 0.29.14 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "name": "parabam.chaser",
        "sources": [
            "parabam/chaser.pyx"
        ]
    },
    "module_name": "parabam.chaser"
}
END: Cython Metadata */

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

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

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

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


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

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

#define __PYX_HAVE__parabam__chaser
#define __PYX_HAVE_API__parabam__chaser
/* Early includes */
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

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

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

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


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

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


static const char *__pyx_f[] = {
  "parabam/chaser.pyx",
};

/*--- Type declarations ---*/
struct __pyx_obj_7parabam_6chaser___pyx_scope_struct____init__;
struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_1___read_generator__;
struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__;
struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_3___read_generator__;

/* "parabam/chaser.pyx":47
 * class Handler(parabam.core.Handler):
 * 
 *     def __init__(self,object parent_bam, object output_paths,             # <<<<<<<<<<<<<<
 *                       object inqu,object constants,object pause_qus,
 *                       dict out_qu_dict,object Task):
 */
struct __pyx_obj_7parabam_6chaser___pyx_scope_struct____init__ {
  PyObject_HEAD
  PyObject *__pyx_v_RuleTask;
};


/* "parabam/chaser.pyx":797
 *                                       level,fragment_leftovers=False)
 * 
 *     def __read_generator__(self,unsorted_paths):             # <<<<<<<<<<<<<<
 *         for path in unsorted_paths:
 *             loner_object = pysam.AlignmentFile(path,"rb")
 */
struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_1___read_generator__ {
  PyObject_HEAD
  PyObject *__pyx_v_loner_object;
  PyObject *__pyx_v_path;
  PyObject *__pyx_v_read;
  PyObject *__pyx_v_self;
  PyObject *__pyx_v_unsorted_paths;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
  PyObject *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
};


/* "parabam/chaser.pyx":806
 *         gc.collect()
 * 
 *     def __get_reference_id_name__(self,read,bins):             # <<<<<<<<<<<<<<
 *         if read.reference_id == read.next_reference_id:
 *             return "XX%dv%d" % (read.reference_id,read.next_reference_id)
 */
struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__ {
  PyObject_HEAD
  PyObject *__pyx_v_bins;
};


/* "parabam/chaser.pyx":954
 *         return dict(filter( lambda tup : tup[1], iter(pairs.items()) ))
 * 
 *     def __read_generator__(self,loner_info,             # <<<<<<<<<<<<<<
 *                             second_pass=False,leftover_paths=None,
 *                             fragment_leftovers=False):
 */
struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_3___read_generator__ {
  PyObject_HEAD
  PyObject *__pyx_v_bam_iterator;
  PyObject *__pyx_v_count;
  int __pyx_v_count_limit;
  PyObject *__pyx_v_fragment_leftovers;
  PyObject *__pyx_v_i;
  PyObject *__pyx_v_leftover_paths;
  PyObject *__pyx_v_loner_info;
  PyObject *__pyx_v_loner_object;
  PyObject *__pyx_v_path;
  PyObject *__pyx_v_read;
  PyObject *__pyx_v_second_pass;
  PyObject *__pyx_v_self;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
  PyObject *__pyx_t_3;
  PyObject *__pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
};


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* 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(PyInt_CheckExact(obj)) ?\
 PyFloat_AsDouble(obj) : __Pyx__PyObject_AsDouble(obj))
#else
#define __Pyx_PyObject_AsDouble(obj)\
((likely(PyFloat_CheckExact(obj))) ?\
 PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj))
#endif

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

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

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

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

/* StrEquals.proto */
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
#else
#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
#endif

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

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

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

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

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

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

/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
#else
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
#endif
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)

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

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

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

/* ListExtend.proto */
static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject* none = _PyList_Extend((PyListObject*)L, v);
    if (unlikely(!none))
        return -1;
    Py_DECREF(none);
    return 0;
#else
    return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
#endif
}

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

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

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

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

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

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

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

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

/* Print.proto */
static int __Pyx_Print(PyObject*, PyObject *, int);
#if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3
static PyObject* __pyx_print = 0;
static PyObject* __pyx_print_kwargs = 0;
#endif

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

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

/* PrintOne.proto */
static int __Pyx_PrintOne(PyObject* stream, PyObject *o);

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

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

/* SwapException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSwap(type, value, tb)  __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
#endif

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

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

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

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

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

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


/* Module declarations from 'parabam.chaser' */
static PyTypeObject *__pyx_ptype_7parabam_6chaser___pyx_scope_struct____init__ = 0;
static PyTypeObject *__pyx_ptype_7parabam_6chaser___pyx_scope_struct_1___read_generator__ = 0;
static PyTypeObject *__pyx_ptype_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__ = 0;
static PyTypeObject *__pyx_ptype_7parabam_6chaser___pyx_scope_struct_3___read_generator__ = 0;
#define __Pyx_MODULE_NAME "parabam.chaser"
extern int __pyx_module_is_main_parabam__chaser;
int __pyx_module_is_main_parabam__chaser = 0;

/* Implementation of 'parabam.chaser' */
static PyObject *__pyx_builtin_ImportError;
static PyObject *__pyx_builtin_object;
static PyObject *__pyx_builtin_super;
static PyObject *__pyx_builtin_UnicodeDecodeError;
static PyObject *__pyx_builtin_AttributeError;
static PyObject *__pyx_builtin_xrange;
static PyObject *__pyx_builtin_sorted;
static PyObject *__pyx_builtin_KeyError;
static PyObject *__pyx_builtin_any;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_reversed;
static PyObject *__pyx_builtin_max;
static PyObject *__pyx_builtin_map;
static PyObject *__pyx_builtin_filter;
static const char __pyx_k_d[] = "-%d";
static const char __pyx_k_i[] = "i";
static const char __pyx_k_r[] = "r";
static const char __pyx_k_NP[] = "NP";
static const char __pyx_k_UM[] = "UM";
static const char __pyx_k_UU[] = "UU";
static const char __pyx_k_XX[] = "XX";
static const char __pyx_k__9[] = "";
static const char __pyx_k_gc[] = "gc";
static const char __pyx_k_np[] = "np";
static const char __pyx_k_os[] = "os";
static const char __pyx_k_pr[] = "pr";
static const char __pyx_k_qu[] = "qu";
static const char __pyx_k_rb[] = "rb";
static const char __pyx_k_wb[] = "wb";
static const char __pyx_k__13[] = "\n";
static const char __pyx_k__17[] = "*";
static const char __pyx_k_ack[] = "ack";
static const char __pyx_k_any[] = "any";
static const char __pyx_k_b_d[] = "b%d";
static const char __pyx_k_d_d[] = "%d%d";
static const char __pyx_k_doc[] = "__doc__";
static const char __pyx_k_end[] = "end";
static const char __pyx_k_get[] = "get";
static const char __pyx_k_job[] = "job";
static const char __pyx_k_key[] = "key";
static const char __pyx_k_map[] = "map";
static const char __pyx_k_max[] = "max";
static const char __pyx_k_pid[] = "pid";
static const char __pyx_k_put[] = "put";
static const char __pyx_k_run[] = "run";
static const char __pyx_k_sys[] = "sys";
static const char __pyx_k_uid[] = "uid";
static const char __pyx_k_zip[] = "zip";
static const char __pyx_k_Task[] = "Task";
static const char __pyx_k_args[] = "args";
static const char __pyx_k_bins[] = "bins";
static const char __pyx_k_core[] = "core";
static const char __pyx_k_exit[] = "exit";
static const char __pyx_k_file[] = "file";
static const char __pyx_k_init[] = "__init__";
static const char __pyx_k_inqu[] = "inqu";
static const char __pyx_k_join[] = "join";
static const char __pyx_k_main[] = "main";
static const char __pyx_k_name[] = "__name__";
static const char __pyx_k_pack[] = "pack";
static const char __pyx_k_pair[] = "pair";
static const char __pyx_k_path[] = "path";
static const char __pyx_k_read[] = "read";
static const char __pyx_k_rule[] = "rule";
static const char __pyx_k_self[] = "self";
static const char __pyx_k_send[] = "send";
static const char __pyx_k_size[] = "size";
static const char __pyx_k_task[] = "task";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_time[] = "time";
static const char __pyx_k_Empty[] = "Empty";
static const char __pyx_k_Error[] = "Error!";
static const char __pyx_k_Queue[] = "Queue";
static const char __pyx_k_Total[] = "Total";
static const char __pyx_k_close[] = "close";
static const char __pyx_k_count[] = "count";
static const char __pyx_k_dealt[] = "_dealt";
static const char __pyx_k_fetch[] = "fetch";
static const char __pyx_k_flush[] = "flush";
static const char __pyx_k_found[] = "found";
static const char __pyx_k_group[] = "group";
static const char __pyx_k_items[] = "items";
static const char __pyx_k_level[] = "level";
static const char __pyx_k_numpy[] = "numpy";
static const char __pyx_k_outqu[] = "outqu";
static const char __pyx_k_pairs[] = "pairs";
static const char __pyx_k_paths[] = "paths";
static const char __pyx_k_print[] = "print";
static const char __pyx_k_pysam[] = "pysam";
static const char __pyx_k_qname[] = "qname";
static const char __pyx_k_queue[] = "queue";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_saved[] = "saved";
static const char __pyx_k_sleep[] = "sleep";
static const char __pyx_k_split[] = "split";
static const char __pyx_k_start[] = "start";
static const char __pyx_k_super[] = "super";
static const char __pyx_k_tasks[] = "tasks";
static const char __pyx_k_throw[] = "throw";
static const char __pyx_k_total[] = "total";
static const char __pyx_k_write[] = "write";
static const char __pyx_k_Queue2[] = "Queue2";
static const char __pyx_k_append[] = "append";
static const char __pyx_k_decode[] = "decode";
static const char __pyx_k_extend[] = "extend";
static const char __pyx_k_filter[] = "filter";
static const char __pyx_k_header[] = "header";
static const char __pyx_k_holder[] = "holder";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_inqu_2[] = "_inqu";
static const char __pyx_k_kwargs[] = "kwargs";
static const char __pyx_k_length[] = "length";
static const char __pyx_k_main_2[] = "__main__";
static const char __pyx_k_module[] = "__module__";
static const char __pyx_k_name_2[] = "name";
static const char __pyx_k_object[] = "object";
static const char __pyx_k_origin[] = "origin";
static const char __pyx_k_path_n[] = "path_n";
static const char __pyx_k_random[] = "random";
static const char __pyx_k_record[] = "_record";
static const char __pyx_k_remove[] = "remove";
static const char __pyx_k_report[] = "report";
static const char __pyx_k_sample[] = "sample";
static const char __pyx_k_sorted[] = "sorted";
static const char __pyx_k_status[] = "status";
static const char __pyx_k_stderr[] = "stderr";
static const char __pyx_k_stdout[] = "stdout";
static const char __pyx_k_unique[] = "unique";
static const char __pyx_k_xrange[] = "xrange";
static const char __pyx_k_Counter[] = "Counter";
static const char __pyx_k_Handler[] = "Handler";
static const char __pyx_k_MM_sv_s[] = "MM%sv%s";
static const char __pyx_k_Package[] = "Package";
static const char __pyx_k_Primary[] = "Primary";
static const char __pyx_k_Process[] = "Process";
static const char __pyx_k_XX_dv_d[] = "XX%dv%d";
static const char __pyx_k_collect[] = "collect";
static const char __pyx_k_destroy[] = "_destroy";
static const char __pyx_k_getsize[] = "getsize";
static const char __pyx_k_lengths[] = "lengths";
static const char __pyx_k_message[] = "message";
static const char __pyx_k_outqu_2[] = "_outqu";
static const char __pyx_k_package[] = "package";
static const char __pyx_k_parabam[] = "parabam";
static const char __pyx_k_prepare[] = "__prepare__";
static const char __pyx_k_primary[] = "primary";
static const char __pyx_k_pyramid[] = "pyramid";
static const char __pyx_k_randint[] = "randint";
static const char __pyx_k_rescued[] = "rescued";
static const char __pyx_k_results[] = "results";
static const char __pyx_k_running[] = "running";
static const char __pyx_k_success[] = "success";
static const char __pyx_k_verbose[] = "verbose";
static const char __pyx_k_written[] = "written";
static const char __pyx_k_FINISHED[] = "\nFINISHED\n";
static const char __pyx_k_KeyError[] = "KeyError";
static const char __pyx_k_RuleTask[] = "RuleTask";
static const char __pyx_k_bam_file[] = "bam_file";
static const char __pyx_k_filename[] = "filename";
static const char __pyx_k_finished[] = "_finished";
static const char __pyx_k_header_2[] = "_header";
static const char __pyx_k_identity[] = "identity";
static const char __pyx_k_is_alive[] = "is_alive";
static const char __pyx_k_iterator[] = "iterator";
static const char __pyx_k_leftover[] = "leftover";
static const char __pyx_k_lftovr_d[] = "lftovr%d";
static const char __pyx_k_max_jobs[] = "_max_jobs";
static const char __pyx_k_qualname[] = "__qualname__";
static const char __pyx_k_reversed[] = "reversed";
static const char __pyx_k_statusqu[] = "statusqu";
static const char __pyx_k_temp_dir[] = "_temp_dir";
static const char __pyx_k_unpaired[] = "unpaired";
static const char __pyx_k_LonerInfo[] = "LonerInfo";
static const char __pyx_k_all_paths[] = "all_paths";
static const char __pyx_k_chaser_qu[] = "_chaser_qu";
static const char __pyx_k_constants[] = "constants";
static const char __pyx_k_destroy_2[] = "destroy";
static const char __pyx_k_enumerate[] = "enumerate";
static const char __pyx_k_file_name[] = "file_name";
static const char __pyx_k_get_paths[] = "__get_paths__";
static const char __pyx_k_idle_path[] = "idle_path";
static const char __pyx_k_is_paired[] = "is_paired";
static const char __pyx_k_max_reads[] = "max_reads";
static const char __pyx_k_metaclass[] = "__metaclass__";
static const char __pyx_k_pause_qus[] = "pause_qus";
static const char __pyx_k_read_name[] = "read_name";
static const char __pyx_k_rescued_2[] = "_rescued";
static const char __pyx_k_start_job[] = "__start_job__";
static const char __pyx_k_task_sent[] = "task_sent";
static const char __pyx_k_task_size[] = "task_size";
static const char __pyx_k_terminate[] = "terminate";
static const char __pyx_k_until_eof[] = "until_eof";
static const char __pyx_k_user_rule[] = "user_rule";
static const char __pyx_k_ChaserTask[] = "ChaserTask";
static const char __pyx_k_JobPackage[] = "JobPackage";
static const char __pyx_k_child_pack[] = "_child_pack";
static const char __pyx_k_chrom_bins[] = "chrom_bins";
static const char __pyx_k_chrom_info[] = "chrom_info";
static const char __pyx_k_class_bins[] = "class_bins";
static const char __pyx_k_finished_2[] = "finished";
static const char __pyx_k_first_pass[] = "__first_pass__";
static const char __pyx_k_idle_level[] = "idle_level";
static const char __pyx_k_idle_paths[] = "idle_paths";
static const char __pyx_k_iterations[] = "iterations";
static const char __pyx_k_jobs_found[] = "jobs_found";
static const char __pyx_k_loner_info[] = "loner_info";
static const char __pyx_k_loner_pack[] = "loner_pack";
static const char __pyx_k_loner_path[] = "loner_path";
static const char __pyx_k_loner_type[] = "loner_type";
static const char __pyx_k_max_jobs_2[] = "max_jobs";
static const char __pyx_k_namedtuple[] = "namedtuple";
static const char __pyx_k_parent_bam[] = "parent_bam";
static const char __pyx_k_prev_found[] = "prev_found";
static const char __pyx_k_processing[] = "_processing";
static const char __pyx_k_read_count[] = "read_count";
static const char __pyx_k_read_pairs[] = "read_pairs";
static const char __pyx_k_references[] = "references";
static const char __pyx_k_s__d__d__s[] = "%s_%d_%d_%s";
static const char __pyx_k_saved_keys[] = "saved_keys";
static const char __pyx_k_send_pairs[] = "send_pairs";
static const char __pyx_k_temp_dir_2[] = "temp_dir";
static const char __pyx_k_ImportError[] = "ImportError";
static const char __pyx_k_PAUSE_DEBUG[] = "PAUSE DEBUG:: ";
static const char __pyx_k_chaser_task[] = "chaser_task";
static const char __pyx_k_chaser_type[] = "chaser_type";
static const char __pyx_k_collections[] = "collections";
static const char __pyx_k_constants_2[] = "_constants";
static const char __pyx_k_count_limit[] = "count_limit";
static const char __pyx_k_fatal_check[] = "__fatal_check__";
static const char __pyx_k_finish_test[] = "__finish_test__";
static const char __pyx_k_idle_levels[] = "idle_levels";
static const char __pyx_k_idle_tuples[] = "idle_tuples";
static const char __pyx_k_is_unmapped[] = "is_unmapped";
static const char __pyx_k_loner_count[] = "loner_count";
static const char __pyx_k_loner_level[] = "loner_level";
static const char __pyx_k_loner_paths[] = "loner_paths";
static const char __pyx_k_loner_total[] = "loner_total";
static const char __pyx_k_match_maker[] = "match_maker";
static const char __pyx_k_max_reads_2[] = "_max_reads";
static const char __pyx_k_new_package[] = "new_package";
static const char __pyx_k_out_qu_dict[] = "out_qu_dict";
static const char __pyx_k_pause_debug[] = "_pause_debug";
static const char __pyx_k_pause_qus_2[] = "_pause_qus";
static const char __pyx_k_print_debug[] = "__print_debug__";
static const char __pyx_k_reads_found[] = "reads_found";
static const char __pyx_k_rule_output[] = "rule_output";
static const char __pyx_k_second_pass[] = "second_pass";
static const char __pyx_k_stale_count[] = "_stale_count";
static const char __pyx_k_sub_pyramid[] = "sub_pyramid";
static const char __pyx_k_total_procs[] = "total_procs";
static const char __pyx_k_total_tasks[] = "total_tasks";
static const char __pyx_k_write_loner[] = "__write_loner__";
static const char __pyx_k_active_tasks[] = "active_tasks";
static const char __pyx_k_bam_iterator[] = "bam_iterator";
static const char __pyx_k_chaser_tasks[] = "_chaser_tasks";
static const char __pyx_k_child_pack_2[] = "child_pack";
static const char __pyx_k_handler_exit[] = "__handler_exit__";
static const char __pyx_k_idle_routine[] = "__idle_routine__";
static const char __pyx_k_idle_success[] = "idle_success";
static const char __pyx_k_loner_holder[] = "loner_holder";
static const char __pyx_k_loner_object[] = "loner_object";
static const char __pyx_k_output_paths[] = "output_paths";
static const char __pyx_k_parabam_core[] = "parabam.core";
static const char __pyx_k_parent_bam_2[] = "_parent_bam";
static const char __pyx_k_pending_jobs[] = "_pending_jobs";
static const char __pyx_k_prev_rescued[] = "_prev_rescued";
static const char __pyx_k_reference_id[] = "reference_id";
static const char __pyx_k_return_paths[] = "return_paths";
static const char __pyx_k_stale_thresh[] = "_stale_thresh";
static const char __pyx_k_tidy_pyramid[] = "__tidy_pyramid__";
static const char __pyx_k_total_loners[] = "_total_loners";
static const char __pyx_k_update_tasks[] = "__update_tasks__";
static const char __pyx_k_wait_for_ack[] = "__wait_for_ack__";
static const char __pyx_k_AlignmentFile[] = "AlignmentFile";
static const char __pyx_k_ChaserHandler[] = "ChaserHandler";
static const char __pyx_k_ChaserResults[] = "ChaserResults";
static const char __pyx_k_destroy_found[] = "destroy_found";
static const char __pyx_k_get_task_size[] = "__get_task_size__";
static const char __pyx_k_get_temp_path[] = "__get_temp_path__";
static const char __pyx_k_handle_output[] = "handle_output";
static const char __pyx_k_jobs_at_start[] = "jobs_at_start";
static const char __pyx_k_leftover_file[] = "leftover_file";
static const char __pyx_k_leftover_path[] = "leftover_path";
static const char __pyx_k_loner_objects[] = "loner_objects";
static const char __pyx_k_loner_pyramid[] = "_loner_pyramid";
static const char __pyx_k_match_handler[] = "match_handler";
static const char __pyx_k_match_package[] = "match_package";
static const char __pyx_k_pause_debug_2[] = "__pause_debug__";
static const char __pyx_k_pause_monitor[] = "__pause_monitor__";
static const char __pyx_k_primary_store[] = "_primary_store";
static const char __pyx_k_write_loner_2[] = "write_loner";
static const char __pyx_k_AttributeError[] = "AttributeError";
static const char __pyx_k_ChaserTask_run[] = "ChaserTask.run";
static const char __pyx_k_DestroyPackage[] = "DestroyPackage";
static const char __pyx_k_Handler___init[] = "Handler.__init__";
static const char __pyx_k_PrimaryHandler[] = "PrimaryHandler";
static const char __pyx_k_PrimaryResults[] = "PrimaryResults";
static const char __pyx_k_add_to_pyramid[] = "__add_to_pyramid__";
static const char __pyx_k_get_chrom_bins[] = "__get_chrom_bins__";
static const char __pyx_k_get_loner_type[] = "__get_loner_type__";
static const char __pyx_k_has_large_file[] = "has_large_file";
static const char __pyx_k_idle_threshold[] = "idle_threshold";
static const char __pyx_k_is_queue_empty[] = "__is_queue_empty__";
static const char __pyx_k_itertools_izip[] = "itertools.izip";
static const char __pyx_k_leftover_count[] = "leftover_count";
static const char __pyx_k_leftover_paths[] = "leftover_paths";
static const char __pyx_k_new_bam_object[] = "new_bam_object";
static const char __pyx_k_parabam_chaser[] = "parabam.chaser";
static const char __pyx_k_read_generator[] = "__read_generator__";
static const char __pyx_k_required_paths[] = "required_paths";
static const char __pyx_k_unsorted_paths[] = "unsorted_paths";
static const char __pyx_k_user_constants[] = "user_constants";
static const char __pyx_k_waiting_update[] = "waiting_update";
static const char __pyx_k_boomerang_count[] = "boomerang_count";
static const char __pyx_k_collected_packs[] = "collected_packs";
static const char __pyx_k_loner_purgatory[] = "_loner_purgatory";
static const char __pyx_k_multiprocessing[] = "multiprocessing";
static const char __pyx_k_periodic_action[] = "__periodic_action__";
static const char __pyx_k_primary_handler[] = "primary_handler";
static const char __pyx_k_remaining_reads[] = "remaining_reads";
static const char __pyx_k_standard_output[] = "__standard_output__";
static const char __pyx_k_write_leftovers[] = "__write_leftovers__";
static const char __pyx_k_Unpaired_reads_d[] = "\n\t- Unpaired reads: %d";
static const char __pyx_k_clear_subpyramid[] = "__clear_subpyramid__";
static const char __pyx_k_files_in_pyramid[] = "_files_in_pyramid";
static const char __pyx_k_generate_results[] = "__generate_results__";
static const char __pyx_k_get_loner_holder[] = "__get_loner_holder__";
static const char __pyx_k_get_loner_object[] = "__get_loner_object__";
static const char __pyx_k_handle_pair_dict[] = "handle_pair_dict";
static const char __pyx_k_mate_is_unmapped[] = "mate_is_unmapped";
static const char __pyx_k_process_task_set[] = "__process_task_set__";
static const char __pyx_k_pyramid_is_empty[] = "__pyramid_is_empty__";
static const char __pyx_k_terminated_procs[] = "terminated_procs";
static const char __pyx_k_ChaserTask___init[] = "ChaserTask.__init__";
static const char __pyx_k_Chaser_PAUSE_SENT[] = "Chaser || PAUSE SENT";
static const char __pyx_k_JobPackage___init[] = "JobPackage.__init__";
static const char __pyx_k_MatchMakerHandler[] = "MatchMakerHandler";
static const char __pyx_k_MatchMakerResults[] = "MatchMakerResults";
static const char __pyx_k_launch_child_task[] = "__launch_child_task__";
static const char __pyx_k_loner_file_counts[] = "loner_file_counts";
static const char __pyx_k_matchmaker_result[] = "matchmaker_result";
static const char __pyx_k_next_reference_id[] = "next_reference_id";
static const char __pyx_k_periodic_interval[] = "_periodic_interval";
static const char __pyx_k_PrimaryHandler_run[] = "PrimaryHandler.run";
static const char __pyx_k_UnicodeDecodeError[] = "UnicodeDecodeError";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_fragment_leftovers[] = "fragment_leftovers";
static const char __pyx_k_handle_match_maker[] = "__handle_match_maker__";
static const char __pyx_k_handle_origin_task[] = "__handle_origin_task__";
static const char __pyx_k_handle_rule_output[] = "__handle_rule_output__";
static const char __pyx_k_new_package_action[] = "__new_package_action__";
static const char __pyx_k_parabam_chaser_pyx[] = "parabam/chaser.pyx";
static const char __pyx_k_post_destroy_count[] = "_post_destroy_count";
static const char __pyx_k_post_destroy_tasks[] = "post_destroy_tasks";
static const char __pyx_k_print_chaser_debug[] = "_print_chaser_debug";
static const char __pyx_k_start_primary_task[] = "__start_primary_task__";
static const char __pyx_k_test_primary_tasks[] = "__test_primary_tasks__";
static const char __pyx_k_Chaser_RECEIVED_ACK[] = "Chaser || RECEIVED ACK";
static const char __pyx_k_Chaser_UNPAUSE_SENT[] = "Chaser || UNPAUSE SENT";
static const char __pyx_k_Handler___get_paths[] = "Handler.__get_paths__";
static const char __pyx_k_Handler___start_job[] = "Handler.__start_job__";
static const char __pyx_k_create_chaser_tasks[] = "__create_chaser_tasks__";
static const char __pyx_k_empty_leftover_path[] = "empty_leftover_path";
static const char __pyx_k_file_readers_paused[] = "_file_readers_paused";
static const char __pyx_k_get_leftover_object[] = "__get_leftover_object__";
static const char __pyx_k_get_loner_temp_path[] = "__get_loner_temp_path__";
static const char __pyx_k_get_paths_and_close[] = "__get_paths_and_close__";
static const char __pyx_k_handle_primary_task[] = "__handle_primary_task__";
static const char __pyx_k_match_maker_results[] = "match_maker_results";
static const char __pyx_k_post_destroy_report[] = "__post_destroy_report__";
static const char __pyx_k_post_destroy_thresh[] = "_post_destroy_thresh";
static const char __pyx_k_pyramid_idle_counts[] = "_pyramid_idle_counts";
static const char __pyx_k_remove_from_pyramid[] = "__remove_from_pyramid__";
static const char __pyx_k_s_s__d__d__s__s_bam[] = "%s/%s_%d_%d_%s_%s.bam";
static const char __pyx_k_ChaserHandler___init[] = "ChaserHandler.__init__";
static const char __pyx_k_ChaserResults___init[] = "ChaserResults.__init__";
static const char __pyx_k_parent_bam_file_name[] = "parent_bam_file_name";
static const char __pyx_k_set_new_stale_thresh[] = "__set_new_stale_thresh__";
static const char __pyx_k_Chaser_WAITNG_FOR_ACK[] = "Chaser || WAITNG FOR ACK";
static const char __pyx_k_Handler___fatal_check[] = "Handler.__fatal_check__";
static const char __pyx_k_Handler___finish_test[] = "Handler.__finish_test__";
static const char __pyx_k_Handler___pause_debug[] = "Handler.__pause_debug__";
static const char __pyx_k_Handler___print_debug[] = "Handler.__print_debug__";
static const char __pyx_k_MatchMakerHandler_run[] = "MatchMakerHandler.run";
static const char __pyx_k_PrimaryHandler___init[] = "PrimaryHandler.__init__";
static const char __pyx_k_PrimaryResults___init[] = "PrimaryResults.__init__";
static const char __pyx_k_add_to_leftover_paths[] = "__add_to_leftover_paths__";
static const char __pyx_k_get_reference_id_name[] = "__get_reference_id_name__";
static const char __pyx_k_handle_unpaired_reads[] = "__handle_unpaired_reads__";
static const char __pyx_k_pyramid_idle_counts_2[] = "pyramid_idle_counts";
static const char __pyx_k_save_purgatory_loners[] = "__save_purgatory_loners__";
static const char __pyx_k_start_matchmaker_task[] = "__start_matchmaker_task__";
static const char __pyx_k_Handler___handler_exit[] = "Handler.__handler_exit__";
static const char __pyx_k_Handler___idle_routine[] = "Handler.__idle_routine__";
static const char __pyx_k_Handler___tidy_pyramid[] = "Handler.__tidy_pyramid__";
static const char __pyx_k_Handler___update_tasks[] = "Handler.__update_tasks__";
static const char __pyx_k_Handler___wait_for_ack[] = "Handler.__wait_for_ack__";
static const char __pyx_k_paths_level_loner_type[] = "paths level loner_type";
static const char __pyx_k_Handler___get_task_size[] = "Handler.__get_task_size__";
static const char __pyx_k_Handler___pause_monitor[] = "Handler.__pause_monitor__";
static const char __pyx_k_instalise_loner_pyramid[] = "__instalise_loner_pyramid__";
static const char __pyx_k_instalise_primary_store[] = "__instalise_primary_store__";
static const char __pyx_k_prepare_for_second_pass[] = "__prepare_for_second_pass__";
static const char __pyx_k_request_fragment_output[] = "__request_fragment_output__";
static const char __pyx_k_test_pyramid_idle_count[] = "__test_pyramid_idle_count__";
static const char __pyx_k_wait_for_remaining_jobs[] = "__wait_for_remaining_jobs__";
static const char __pyx_k_Handler___add_to_pyramid[] = "Handler.__add_to_pyramid__";
static const char __pyx_k_Handler___get_chrom_bins[] = "Handler.__get_chrom_bins__";
static const char __pyx_k_Handler___is_queue_empty[] = "Handler.__is_queue_empty__";
static const char __pyx_k_MatchMakerHandler___init[] = "MatchMakerHandler.__init__";
static const char __pyx_k_MatchMakerResults___init[] = "MatchMakerResults.__init__";
static const char __pyx_k_post_destroy_tasks_added[] = "_post_destroy_tasks_added";
static const char __pyx_k_Chaser_UN_PAUSE_BOOMERANG[] = "Chaser || (UN)PAUSE BOOMERANG";
static const char __pyx_k_Handler___periodic_action[] = "Handler.__periodic_action__";
static const char __pyx_k_Handler___clear_subpyramid[] = "Handler.__clear_subpyramid__";
static const char __pyx_k_Handler___pyramid_is_empty[] = "Handler.__pyramid_is_empty__";
static const char __pyx_k_Handler___handle_match_maker[] = "Handler.__handle_match_maker__";
static const char __pyx_k_Handler___handle_origin_task[] = "Handler.__handle_origin_task__";
static const char __pyx_k_Handler___new_package_action[] = "Handler.__new_package_action__";
static const char __pyx_k_Handler___start_primary_task[] = "Handler.__start_primary_task__";
static const char __pyx_k_Handler___test_primary_tasks[] = "Handler.__test_primary_tasks__";
static const char __pyx_k_PrimaryHandler___write_loner[] = "PrimaryHandler.__write_loner__";
static const char __pyx_k_Handler___create_chaser_tasks[] = "Handler.__create_chaser_tasks__";
static const char __pyx_k_Handler___handle_primary_task[] = "Handler.__handle_primary_task__";
static const char __pyx_k_Handler___post_destroy_report[] = "Handler.__post_destroy_report__";
static const char __pyx_k_Handler___remove_from_pyramid[] = "Handler.__remove_from_pyramid__";
static const char __pyx_k_add_post_destory_chaser_tasks[] = "__add_post_destory_chaser_tasks__";
static const char __pyx_k_Handler___init___locals_lambda[] = "Handler.__init__.<locals>.<lambda>";
static const char __pyx_k_Handler___set_new_stale_thresh[] = "Handler.__set_new_stale_thresh__";
static const char __pyx_k_MatchMakerHandler___first_pass[] = "MatchMakerHandler.__first_pass__";
static const char __pyx_k_Fatal_Error_Process_communicati[] = "[Fatal Error] Process communication failure.\n";
static const char __pyx_k_Handler___save_purgatory_loners[] = "Handler.__save_purgatory_loners__";
static const char __pyx_k_Handler___start_matchmaker_task[] = "Handler.__start_matchmaker_task__";
static const char __pyx_k_MatchMakerHandler___prepare_for[] = "MatchMakerHandler.__prepare_for_second_pass__.<locals>.<lambda>";
static const char __pyx_k_Parabam_coming_to_abrupt_halt_s[] = "              Parabam coming to abrupt halt, sorry!\n";
static const char __pyx_k_PrimaryHandler___get_loner_type[] = "PrimaryHandler.__get_loner_type__";
static const char __pyx_k_PrimaryHandler___read_generator[] = "PrimaryHandler.__read_generator__";
static const char __pyx_k_Read_pairing_in_progress_100_00[] = "\r\t- Read pairing in progress: 100.00% complete\n";
static const char __pyx_k_Read_pairing_in_progress_2f_com[] = "\r\t- Read pairing in progress: %.2f%% complete  ";
static const char __pyx_k_Reads_flagged_as_unpaired_exclu[] = "\t- Reads flagged as unpaired excluded from analysis: %d";
static const char __pyx_k_Waiting_for_tasks_to_finish_d_d[] = "\r\t- Waiting for tasks to finish: %d/%d ";
static const char __pyx_k_d_d_4f_2fGB_Proc_d_Des_d_Purg_d[] = "\r %d/%d=%.4f %.2fGB | Proc:%d Des:%d Purg:%d Stale(Thresh):%d(%d) Jobs:%d Files:%d  ";
static const char __pyx_k_ChaserHandler___get_loner_temp_p[] = "ChaserHandler.__get_loner_temp_path__";
static const char __pyx_k_Handler___add_post_destory_chase[] = "Handler.__add_post_destory_chaser_tasks__";
static const char __pyx_k_Handler___get_chrom_bins___local[] = "Handler.__get_chrom_bins__.<locals>.<lambda>";
static const char __pyx_k_Handler___init___locals_RuleTask[] = "Handler.__init__.<locals>.RuleTask";
static const char __pyx_k_Handler___instalise_loner_pyrami[] = "Handler.__instalise_loner_pyramid__";
static const char __pyx_k_Handler___instalise_primary_stor[] = "Handler.__instalise_primary_store__";
static const char __pyx_k_Handler___request_fragment_outpu[] = "Handler.__request_fragment_output__";
static const char __pyx_k_Handler___test_pyramid_idle_coun[] = "Handler.__test_pyramid_idle_count__";
static const char __pyx_k_Handler___wait_for_remaining_job[] = "Handler.__wait_for_remaining_jobs__.<locals>.waiting_update";
static const char __pyx_k_MatchMakerHandler___add_to_lefto[] = "MatchMakerHandler.__add_to_leftover_paths__";
static const char __pyx_k_MatchMakerHandler___get_leftover[] = "MatchMakerHandler.__get_leftover_object__";
static const char __pyx_k_MatchMakerHandler___get_loner_ob[] = "MatchMakerHandler.__get_loner_object__";
static const char __pyx_k_MatchMakerHandler___launch_child[] = "MatchMakerHandler.__launch_child_task__";
static const char __pyx_k_MatchMakerHandler___read_generat[] = "MatchMakerHandler.__read_generator__";
static const char __pyx_k_MatchMakerHandler___write_leftov[] = "MatchMakerHandler.__write_leftovers__";
static const char __pyx_k_PrimaryHandler___get_loner_holde[] = "PrimaryHandler.__get_loner_holder__";
static const char __pyx_k_PrimaryHandler___get_loner_objec[] = "PrimaryHandler.__get_loner_object__";
static const char __pyx_k_PrimaryHandler___get_paths_and_c[] = "PrimaryHandler.__get_paths_and_close__";
static const char __pyx_k_PrimaryHandler___get_reference_i[] = "PrimaryHandler.__get_reference_id_name__.<locals>.<lambda>";
static const char __pyx_k_PrimaryHandler___handle_unpaired[] = "PrimaryHandler.__handle_unpaired_reads__";
static const char __pyx_k_PrimaryHandler___start_matchmake[] = "PrimaryHandler.__start_matchmaker_task__";
static const char __pyx_k_MatchMakerHandler___prepare_for_2[] = "MatchMakerHandler.__prepare_for_second_pass__";
static const char __pyx_k_Read_pairing_in_progress_2f_com_2[] = "\n\t- Read pairing in progress: %.2f%% complete";
static const char __pyx_k_Handler___init___locals_RuleTask_2[] = "Handler.__init__.<locals>.RuleTask.__init__";
static const char __pyx_k_Handler___init___locals_RuleTask_3[] = "Handler.__init__.<locals>.RuleTask.handle_pair_dict";
static const char __pyx_k_Handler___init___locals_RuleTask_4[] = "Handler.__init__.<locals>.RuleTask.__process_task_set__";
static const char __pyx_k_Handler___init___locals_RuleTask_5[] = "Handler.__init__.<locals>.RuleTask.__get_temp_path__";
static const char __pyx_k_Handler___wait_for_remaining_job_2[] = "Handler.__wait_for_remaining_jobs__";
static const char __pyx_k_PrimaryHandler___get_reference_i_2[] = "PrimaryHandler.__get_reference_id_name__";
static PyObject *__pyx_n_s_AlignmentFile;
static PyObject *__pyx_n_s_AttributeError;
static PyObject *__pyx_n_s_ChaserHandler;
static PyObject *__pyx_n_s_ChaserHandler___get_loner_temp_p;
static PyObject *__pyx_n_s_ChaserHandler___init;
static PyObject *__pyx_n_s_ChaserResults;
static PyObject *__pyx_n_s_ChaserResults___init;
static PyObject *__pyx_n_s_ChaserTask;
static PyObject *__pyx_n_s_ChaserTask___init;
static PyObject *__pyx_n_s_ChaserTask_run;
static PyObject *__pyx_kp_s_Chaser_PAUSE_SENT;
static PyObject *__pyx_kp_s_Chaser_RECEIVED_ACK;
static PyObject *__pyx_kp_s_Chaser_UNPAUSE_SENT;
static PyObject *__pyx_kp_s_Chaser_UN_PAUSE_BOOMERANG;
static PyObject *__pyx_kp_s_Chaser_WAITNG_FOR_ACK;
static PyObject *__pyx_n_s_Counter;
static PyObject *__pyx_n_s_DestroyPackage;
static PyObject *__pyx_n_s_Empty;
static PyObject *__pyx_kp_s_Error;
static PyObject *__pyx_kp_s_FINISHED;
static PyObject *__pyx_kp_s_Fatal_Error_Process_communicati;
static PyObject *__pyx_n_s_Handler;
static PyObject *__pyx_n_s_Handler___add_post_destory_chase;
static PyObject *__pyx_n_s_Handler___add_to_pyramid;
static PyObject *__pyx_n_s_Handler___clear_subpyramid;
static PyObject *__pyx_n_s_Handler___create_chaser_tasks;
static PyObject *__pyx_n_s_Handler___fatal_check;
static PyObject *__pyx_n_s_Handler___finish_test;
static PyObject *__pyx_n_s_Handler___get_chrom_bins;
static PyObject *__pyx_n_s_Handler___get_chrom_bins___local;
static PyObject *__pyx_n_s_Handler___get_paths;
static PyObject *__pyx_n_s_Handler___get_task_size;
static PyObject *__pyx_n_s_Handler___handle_match_maker;
static PyObject *__pyx_n_s_Handler___handle_origin_task;
static PyObject *__pyx_n_s_Handler___handle_primary_task;
static PyObject *__pyx_n_s_Handler___handler_exit;
static PyObject *__pyx_n_s_Handler___idle_routine;
static PyObject *__pyx_n_s_Handler___init;
static PyObject *__pyx_n_s_Handler___init___locals_RuleTask;
static PyObject *__pyx_n_s_Handler___init___locals_RuleTask_2;
static PyObject *__pyx_n_s_Handler___init___locals_RuleTask_3;
static PyObject *__pyx_n_s_Handler___init___locals_RuleTask_4;
static PyObject *__pyx_n_s_Handler___init___locals_RuleTask_5;
static PyObject *__pyx_n_s_Handler___init___locals_lambda;
static PyObject *__pyx_n_s_Handler___instalise_loner_pyrami;
static PyObject *__pyx_n_s_Handler___instalise_primary_stor;
static PyObject *__pyx_n_s_Handler___is_queue_empty;
static PyObject *__pyx_n_s_Handler___new_package_action;
static PyObject *__pyx_n_s_Handler___pause_debug;
static PyObject *__pyx_n_s_Handler___pause_monitor;
static PyObject *__pyx_n_s_Handler___periodic_action;
static PyObject *__pyx_n_s_Handler___post_destroy_report;
static PyObject *__pyx_n_s_Handler___print_debug;
static PyObject *__pyx_n_s_Handler___pyramid_is_empty;
static PyObject *__pyx_n_s_Handler___remove_from_pyramid;
static PyObject *__pyx_n_s_Handler___request_fragment_outpu;
static PyObject *__pyx_n_s_Handler___save_purgatory_loners;
static PyObject *__pyx_n_s_Handler___set_new_stale_thresh;
static PyObject *__pyx_n_s_Handler___start_job;
static PyObject *__pyx_n_s_Handler___start_matchmaker_task;
static PyObject *__pyx_n_s_Handler___start_primary_task;
static PyObject *__pyx_n_s_Handler___test_primary_tasks;
static PyObject *__pyx_n_s_Handler___test_pyramid_idle_coun;
static PyObject *__pyx_n_s_Handler___tidy_pyramid;
static PyObject *__pyx_n_s_Handler___update_tasks;
static PyObject *__pyx_n_s_Handler___wait_for_ack;
static PyObject *__pyx_n_s_Handler___wait_for_remaining_job;
static PyObject *__pyx_n_s_Handler___wait_for_remaining_job_2;
static PyObject *__pyx_n_s_ImportError;
static PyObject *__pyx_n_s_JobPackage;
static PyObject *__pyx_n_s_JobPackage___init;
static PyObject *__pyx_n_s_KeyError;
static PyObject *__pyx_n_s_LonerInfo;
static PyObject *__pyx_kp_s_MM_sv_s;
static PyObject *__pyx_n_s_MatchMakerHandler;
static PyObject *__pyx_n_s_MatchMakerHandler___add_to_lefto;
static PyObject *__pyx_n_s_MatchMakerHandler___first_pass;
static PyObject *__pyx_n_s_MatchMakerHandler___get_leftover;
static PyObject *__pyx_n_s_MatchMakerHandler___get_loner_ob;
static PyObject *__pyx_n_s_MatchMakerHandler___init;
static PyObject *__pyx_n_s_MatchMakerHandler___launch_child;
static PyObject *__pyx_n_s_MatchMakerHandler___prepare_for;
static PyObject *__pyx_n_s_MatchMakerHandler___prepare_for_2;
static PyObject *__pyx_n_s_MatchMakerHandler___read_generat;
static PyObject *__pyx_n_s_MatchMakerHandler___write_leftov;
static PyObject *__pyx_n_s_MatchMakerHandler_run;
static PyObject *__pyx_n_s_MatchMakerResults;
static PyObject *__pyx_n_s_MatchMakerResults___init;
static PyObject *__pyx_n_s_NP;
static PyObject *__pyx_kp_s_PAUSE_DEBUG;
static PyObject *__pyx_n_s_Package;
static PyObject *__pyx_kp_s_Parabam_coming_to_abrupt_halt_s;
static PyObject *__pyx_n_s_Primary;
static PyObject *__pyx_n_s_PrimaryHandler;
static PyObject *__pyx_n_s_PrimaryHandler___get_loner_holde;
static PyObject *__pyx_n_s_PrimaryHandler___get_loner_objec;
static PyObject *__pyx_n_s_PrimaryHandler___get_loner_type;
static PyObject *__pyx_n_s_PrimaryHandler___get_paths_and_c;
static PyObject *__pyx_n_s_PrimaryHandler___get_reference_i;
static PyObject *__pyx_n_s_PrimaryHandler___get_reference_i_2;
static PyObject *__pyx_n_s_PrimaryHandler___handle_unpaired;
static PyObject *__pyx_n_s_PrimaryHandler___init;
static PyObject *__pyx_n_s_PrimaryHandler___read_generator;
static PyObject *__pyx_n_s_PrimaryHandler___start_matchmake;
static PyObject *__pyx_n_s_PrimaryHandler___write_loner;
static PyObject *__pyx_n_s_PrimaryHandler_run;
static PyObject *__pyx_n_s_PrimaryResults;
static PyObject *__pyx_n_s_PrimaryResults___init;
static PyObject *__pyx_n_s_Process;
static PyObject *__pyx_n_s_Queue;
static PyObject *__pyx_n_s_Queue2;
static PyObject *__pyx_kp_s_Read_pairing_in_progress_100_00;
static PyObject *__pyx_kp_s_Read_pairing_in_progress_2f_com;
static PyObject *__pyx_kp_s_Read_pairing_in_progress_2f_com_2;
static PyObject *__pyx_kp_s_Reads_flagged_as_unpaired_exclu;
static PyObject *__pyx_n_s_RuleTask;
static PyObject *__pyx_n_s_Task;
static PyObject *__pyx_n_s_Total;
static PyObject *__pyx_n_s_UM;
static PyObject *__pyx_n_s_UU;
static PyObject *__pyx_n_s_UnicodeDecodeError;
static PyObject *__pyx_kp_s_Unpaired_reads_d;
static PyObject *__pyx_kp_s_Waiting_for_tasks_to_finish_d_d;
static PyObject *__pyx_n_s_XX;
static PyObject *__pyx_kp_s_XX_dv_d;
static PyObject *__pyx_kp_s__13;
static PyObject *__pyx_n_s__17;
static PyObject *__pyx_kp_s__9;
static PyObject *__pyx_n_s_ack;
static PyObject *__pyx_n_s_active_tasks;
static PyObject *__pyx_n_s_add_post_destory_chaser_tasks;
static PyObject *__pyx_n_s_add_to_leftover_paths;
static PyObject *__pyx_n_s_add_to_pyramid;
static PyObject *__pyx_n_s_all_paths;
static PyObject *__pyx_n_s_any;
static PyObject *__pyx_n_s_append;
static PyObject *__pyx_n_s_args;
static PyObject *__pyx_kp_s_b_d;
static PyObject *__pyx_n_s_bam_file;
static PyObject *__pyx_n_s_bam_iterator;
static PyObject *__pyx_n_s_bins;
static PyObject *__pyx_n_s_boomerang_count;
static PyObject *__pyx_n_s_chaser_qu;
static PyObject *__pyx_n_s_chaser_task;
static PyObject *__pyx_n_s_chaser_tasks;
static PyObject *__pyx_n_s_chaser_type;
static PyObject *__pyx_n_s_child_pack;
static PyObject *__pyx_n_s_child_pack_2;
static PyObject *__pyx_n_s_chrom_bins;
static PyObject *__pyx_n_s_chrom_info;
static PyObject *__pyx_n_s_class_bins;
static PyObject *__pyx_n_s_clear_subpyramid;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_close;
static PyObject *__pyx_n_s_collect;
static PyObject *__pyx_n_s_collected_packs;
static PyObject *__pyx_n_s_collections;
static PyObject *__pyx_n_s_constants;
static PyObject *__pyx_n_s_constants_2;
static PyObject *__pyx_n_s_core;
static PyObject *__pyx_n_s_count;
static PyObject *__pyx_n_s_count_limit;
static PyObject *__pyx_n_s_create_chaser_tasks;
static PyObject *__pyx_kp_s_d;
static PyObject *__pyx_kp_s_d_d;
static PyObject *__pyx_kp_s_d_d_4f_2fGB_Proc_d_Des_d_Purg_d;
static PyObject *__pyx_n_s_dealt;
static PyObject *__pyx_n_s_decode;
static PyObject *__pyx_n_s_destroy;
static PyObject *__pyx_n_s_destroy_2;
static PyObject *__pyx_n_s_destroy_found;
static PyObject *__pyx_n_s_doc;
static PyObject *__pyx_n_s_empty_leftover_path;
static PyObject *__pyx_n_s_end;
static PyObject *__pyx_n_s_enumerate;
static PyObject *__pyx_n_s_exit;
static PyObject *__pyx_n_s_extend;
static PyObject *__pyx_n_s_fatal_check;
static PyObject *__pyx_n_s_fetch;
static PyObject *__pyx_n_s_file;
static PyObject *__pyx_n_s_file_name;
static PyObject *__pyx_n_s_file_readers_paused;
static PyObject *__pyx_n_s_filename;
static PyObject *__pyx_n_s_files_in_pyramid;
static PyObject *__pyx_n_s_filter;
static PyObject *__pyx_n_s_finish_test;
static PyObject *__pyx_n_s_finished;
static PyObject *__pyx_n_s_finished_2;
static PyObject *__pyx_n_s_first_pass;
static PyObject *__pyx_n_s_flush;
static PyObject *__pyx_n_s_found;
static PyObject *__pyx_n_s_fragment_leftovers;
static PyObject *__pyx_n_s_gc;
static PyObject *__pyx_n_s_generate_results;
static PyObject *__pyx_n_s_get;
static PyObject *__pyx_n_s_get_chrom_bins;
static PyObject *__pyx_n_s_get_leftover_object;
static PyObject *__pyx_n_s_get_loner_holder;
static PyObject *__pyx_n_s_get_loner_object;
static PyObject *__pyx_n_s_get_loner_temp_path;
static PyObject *__pyx_n_s_get_loner_type;
static PyObject *__pyx_n_s_get_paths;
static PyObject *__pyx_n_s_get_paths_and_close;
static PyObject *__pyx_n_s_get_reference_id_name;
static PyObject *__pyx_n_s_get_task_size;
static PyObject *__pyx_n_s_get_temp_path;
static PyObject *__pyx_n_s_getsize;
static PyObject *__pyx_n_s_group;
static PyObject *__pyx_n_s_handle_match_maker;
static PyObject *__pyx_n_s_handle_origin_task;
static PyObject *__pyx_n_s_handle_output;
static PyObject *__pyx_n_s_handle_pair_dict;
static PyObject *__pyx_n_s_handle_primary_task;
static PyObject *__pyx_n_s_handle_rule_output;
static PyObject *__pyx_n_s_handle_unpaired_reads;
static PyObject *__pyx_n_s_handler_exit;
static PyObject *__pyx_n_s_has_large_file;
static PyObject *__pyx_n_s_header;
static PyObject *__pyx_n_s_header_2;
static PyObject *__pyx_n_s_holder;
static PyObject *__pyx_n_s_i;
static PyObject *__pyx_n_s_identity;
static PyObject *__pyx_n_s_idle_level;
static PyObject *__pyx_n_s_idle_levels;
static PyObject *__pyx_n_s_idle_path;
static PyObject *__pyx_n_s_idle_paths;
static PyObject *__pyx_n_s_idle_routine;
static PyObject *__pyx_n_s_idle_success;
static PyObject *__pyx_n_s_idle_threshold;
static PyObject *__pyx_n_s_idle_tuples;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_init;
static PyObject *__pyx_n_s_inqu;
static PyObject *__pyx_n_s_inqu_2;
static PyObject *__pyx_n_s_instalise_loner_pyramid;
static PyObject *__pyx_n_s_instalise_primary_store;
static PyObject *__pyx_n_s_is_alive;
static PyObject *__pyx_n_s_is_paired;
static PyObject *__pyx_n_s_is_queue_empty;
static PyObject *__pyx_n_s_is_unmapped;
static PyObject *__pyx_n_s_items;
static PyObject *__pyx_n_s_iterations;
static PyObject *__pyx_n_s_iterator;
static PyObject *__pyx_n_s_itertools_izip;
static PyObject *__pyx_n_s_job;
static PyObject *__pyx_n_s_jobs_at_start;
static PyObject *__pyx_n_s_jobs_found;
static PyObject *__pyx_n_s_join;
static PyObject *__pyx_n_s_key;
static PyObject *__pyx_n_s_kwargs;
static PyObject *__pyx_n_s_launch_child_task;
static PyObject *__pyx_n_s_leftover;
static PyObject *__pyx_n_s_leftover_count;
static PyObject *__pyx_n_s_leftover_file;
static PyObject *__pyx_n_s_leftover_path;
static PyObject *__pyx_n_s_leftover_paths;
static PyObject *__pyx_n_s_length;
static PyObject *__pyx_n_s_lengths;
static PyObject *__pyx_n_s_level;
static PyObject *__pyx_kp_s_lftovr_d;
static PyObject *__pyx_n_s_loner_count;
static PyObject *__pyx_n_s_loner_file_counts;
static PyObject *__pyx_n_s_loner_holder;
static PyObject *__pyx_n_s_loner_info;
static PyObject *__pyx_n_s_loner_level;
static PyObject *__pyx_n_s_loner_object;
static PyObject *__pyx_n_s_loner_objects;
static PyObject *__pyx_n_s_loner_pack;
static PyObject *__pyx_n_s_loner_path;
static PyObject *__pyx_n_s_loner_paths;
static PyObject *__pyx_n_s_loner_purgatory;
static PyObject *__pyx_n_s_loner_pyramid;
static PyObject *__pyx_n_s_loner_total;
static PyObject *__pyx_n_s_loner_type;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_main_2;
static PyObject *__pyx_n_s_map;
static PyObject *__pyx_n_s_match_handler;
static PyObject *__pyx_n_s_match_maker;
static PyObject *__pyx_n_s_match_maker_results;
static PyObject *__pyx_n_s_match_package;
static PyObject *__pyx_n_s_matchmaker_result;
static PyObject *__pyx_n_s_mate_is_unmapped;
static PyObject *__pyx_n_s_max;
static PyObject *__pyx_n_s_max_jobs;
static PyObject *__pyx_n_s_max_jobs_2;
static PyObject *__pyx_n_s_max_reads;
static PyObject *__pyx_n_s_max_reads_2;
static PyObject *__pyx_n_s_message;
static PyObject *__pyx_n_s_metaclass;
static PyObject *__pyx_n_s_module;
static PyObject *__pyx_n_s_multiprocessing;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_name_2;
static PyObject *__pyx_n_s_namedtuple;
static PyObject *__pyx_n_s_new_bam_object;
static PyObject *__pyx_n_s_new_package;
static PyObject *__pyx_n_s_new_package_action;
static PyObject *__pyx_n_s_next_reference_id;
static PyObject *__pyx_n_s_np;
static PyObject *__pyx_n_s_numpy;
static PyObject *__pyx_n_s_object;
static PyObject *__pyx_n_s_origin;
static PyObject *__pyx_n_s_os;
static PyObject *__pyx_n_s_out_qu_dict;
static PyObject *__pyx_n_s_output_paths;
static PyObject *__pyx_n_s_outqu;
static PyObject *__pyx_n_s_outqu_2;
static PyObject *__pyx_n_s_pack;
static PyObject *__pyx_n_s_package;
static PyObject *__pyx_n_s_pair;
static PyObject *__pyx_n_s_pairs;
static PyObject *__pyx_n_s_parabam;
static PyObject *__pyx_n_s_parabam_chaser;
static PyObject *__pyx_kp_s_parabam_chaser_pyx;
static PyObject *__pyx_n_s_parabam_core;
static PyObject *__pyx_n_s_parent_bam;
static PyObject *__pyx_n_s_parent_bam_2;
static PyObject *__pyx_n_s_parent_bam_file_name;
static PyObject *__pyx_n_s_path;
static PyObject *__pyx_n_s_path_n;
static PyObject *__pyx_n_s_paths;
static PyObject *__pyx_kp_s_paths_level_loner_type;
static PyObject *__pyx_n_s_pause_debug;
static PyObject *__pyx_n_s_pause_debug_2;
static PyObject *__pyx_n_s_pause_monitor;
static PyObject *__pyx_n_s_pause_qus;
static PyObject *__pyx_n_s_pause_qus_2;
static PyObject *__pyx_n_s_pending_jobs;
static PyObject *__pyx_n_s_periodic_action;
static PyObject *__pyx_n_s_periodic_interval;
static PyObject *__pyx_n_s_pid;
static PyObject *__pyx_n_s_post_destroy_count;
static PyObject *__pyx_n_s_post_destroy_report;
static PyObject *__pyx_n_s_post_destroy_tasks;
static PyObject *__pyx_n_s_post_destroy_tasks_added;
static PyObject *__pyx_n_s_post_destroy_thresh;
static PyObject *__pyx_n_s_pr;
static PyObject *__pyx_n_s_prepare;
static PyObject *__pyx_n_s_prepare_for_second_pass;
static PyObject *__pyx_n_s_prev_found;
static PyObject *__pyx_n_s_prev_rescued;
static PyObject *__pyx_n_s_primary;
static PyObject *__pyx_n_s_primary_handler;
static PyObject *__pyx_n_s_primary_store;
static PyObject *__pyx_n_s_print;
static PyObject *__pyx_n_s_print_chaser_debug;
static PyObject *__pyx_n_s_print_debug;
static PyObject *__pyx_n_s_process_task_set;
static PyObject *__pyx_n_s_processing;
static PyObject *__pyx_n_s_put;
static PyObject *__pyx_n_s_pyramid;
static PyObject *__pyx_n_s_pyramid_idle_counts;
static PyObject *__pyx_n_s_pyramid_idle_counts_2;
static PyObject *__pyx_n_s_pyramid_is_empty;
static PyObject *__pyx_n_s_pysam;
static PyObject *__pyx_n_s_qname;
static PyObject *__pyx_n_s_qu;
static PyObject *__pyx_n_s_qualname;
static PyObject *__pyx_n_s_queue;
static PyObject *__pyx_n_s_r;
static PyObject *__pyx_n_s_randint;
static PyObject *__pyx_n_s_random;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_rb;
static PyObject *__pyx_n_s_read;
static PyObject *__pyx_n_s_read_count;
static PyObject *__pyx_n_s_read_generator;
static PyObject *__pyx_n_s_read_name;
static PyObject *__pyx_n_s_read_pairs;
static PyObject *__pyx_n_s_reads_found;
static PyObject *__pyx_n_s_record;
static PyObject *__pyx_n_s_reference_id;
static PyObject *__pyx_n_s_references;
static PyObject *__pyx_n_s_remaining_reads;
static PyObject *__pyx_n_s_remove;
static PyObject *__pyx_n_s_remove_from_pyramid;
static PyObject *__pyx_n_s_report;
static PyObject *__pyx_n_s_request_fragment_output;
static PyObject *__pyx_n_s_required_paths;
static PyObject *__pyx_n_s_rescued;
static PyObject *__pyx_n_s_rescued_2;
static PyObject *__pyx_n_s_results;
static PyObject *__pyx_n_s_return_paths;
static PyObject *__pyx_n_s_reversed;
static PyObject *__pyx_n_s_rule;
static PyObject *__pyx_n_s_rule_output;
static PyObject *__pyx_n_s_run;
static PyObject *__pyx_n_s_running;
static PyObject *__pyx_kp_s_s__d__d__s;
static PyObject *__pyx_kp_s_s_s__d__d__s__s_bam;
static PyObject *__pyx_n_s_sample;
static PyObject *__pyx_n_s_save_purgatory_loners;
static PyObject *__pyx_n_s_saved;
static PyObject *__pyx_n_s_saved_keys;
static PyObject *__pyx_n_s_second_pass;
static PyObject *__pyx_n_s_self;
static PyObject *__pyx_n_s_send;
static PyObject *__pyx_n_s_send_pairs;
static PyObject *__pyx_n_s_set_new_stale_thresh;
static PyObject *__pyx_n_s_size;
static PyObject *__pyx_n_s_sleep;
static PyObject *__pyx_n_s_sorted;
static PyObject *__pyx_n_s_split;
static PyObject *__pyx_n_s_stale_count;
static PyObject *__pyx_n_s_stale_thresh;
static PyObject *__pyx_n_s_standard_output;
static PyObject *__pyx_n_s_start;
static PyObject *__pyx_n_s_start_job;
static PyObject *__pyx_n_s_start_matchmaker_task;
static PyObject *__pyx_n_s_start_primary_task;
static PyObject *__pyx_n_s_status;
static PyObject *__pyx_n_s_statusqu;
static PyObject *__pyx_n_s_stderr;
static PyObject *__pyx_n_s_stdout;
static PyObject *__pyx_n_s_sub_pyramid;
static PyObject *__pyx_n_s_success;
static PyObject *__pyx_n_s_super;
static PyObject *__pyx_n_s_sys;
static PyObject *__pyx_n_s_task;
static PyObject *__pyx_n_s_task_sent;
static PyObject *__pyx_n_s_task_size;
static PyObject *__pyx_n_s_tasks;
static PyObject *__pyx_n_s_temp_dir;
static PyObject *__pyx_n_s_temp_dir_2;
static PyObject *__pyx_n_s_terminate;
static PyObject *__pyx_n_s_terminated_procs;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_test_primary_tasks;
static PyObject *__pyx_n_s_test_pyramid_idle_count;
static PyObject *__pyx_n_s_throw;
static PyObject *__pyx_n_s_tidy_pyramid;
static PyObject *__pyx_n_s_time;
static PyObject *__pyx_n_s_total;
static PyObject *__pyx_n_s_total_loners;
static PyObject *__pyx_n_s_total_procs;
static PyObject *__pyx_n_s_total_tasks;
static PyObject *__pyx_n_s_uid;
static PyObject *__pyx_n_s_unique;
static PyObject *__pyx_n_s_unpaired;
static PyObject *__pyx_n_s_unsorted_paths;
static PyObject *__pyx_n_s_until_eof;
static PyObject *__pyx_n_s_update_tasks;
static PyObject *__pyx_n_s_user_constants;
static PyObject *__pyx_n_s_user_rule;
static PyObject *__pyx_n_s_verbose;
static PyObject *__pyx_n_s_wait_for_ack;
static PyObject *__pyx_n_s_wait_for_remaining_jobs;
static PyObject *__pyx_n_s_waiting_update;
static PyObject *__pyx_n_s_wb;
static PyObject *__pyx_n_s_write;
static PyObject *__pyx_n_s_write_leftovers;
static PyObject *__pyx_n_s_write_loner;
static PyObject *__pyx_n_s_write_loner_2;
static PyObject *__pyx_n_s_written;
static PyObject *__pyx_n_s_xrange;
static PyObject *__pyx_n_s_zip;
static PyObject *__pyx_pf_7parabam_6chaser_13ChaserResults___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_results, PyObject *__pyx_v_chaser_type); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_14PrimaryResults___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_results, PyObject *__pyx_v_chaser_type); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_17MatchMakerResults___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_loner_type, PyObject *__pyx_v_results, PyObject *__pyx_v_chaser_type, PyObject *__pyx_v_rescued, PyObject *__pyx_v_level); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_10JobPackage___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_paths, PyObject *__pyx_v_loner_type, PyObject *__pyx_v_level, PyObject *__pyx_v_fragment_leftovers); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_8__init___8RuleTask___init__(PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_parent_bam, PyObject *__pyx_v_constants); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_8__init___8RuleTask_2handle_pair_dict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_pairs, PyObject *__pyx_v_unique); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_8__init___8RuleTask_4__process_task_set__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_iterator); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_8__init___8RuleTask_6__get_temp_path__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_identity); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_iterations); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda1(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_message); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_parent_bam, PyObject *__pyx_v_output_paths, PyObject *__pyx_v_inqu, PyObject *__pyx_v_constants, PyObject *__pyx_v_pause_qus, PyObject *__pyx_v_out_qu_dict, PyObject *__pyx_v_Task); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_2__pause_debug__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_message); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_4__print_debug__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_iterations); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_6__create_chaser_tasks__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_total_tasks); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tup); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_8__get_chrom_bins__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_parent_bam); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_10__instalise_primary_store__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_12__instalise_loner_pyramid__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_14__update_tasks__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_active_tasks); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_16__new_package_action__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_new_package, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_18__handle_origin_task__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_new_package); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_20__handle_match_maker__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_new_package); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_22__handle_primary_task__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_new_package); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_24__test_primary_tasks__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_required_paths); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_26__start_primary_task__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_28__start_matchmaker_task__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_paths, PyObject *__pyx_v_loner_type, PyObject *__pyx_v_level); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_30__start_job__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_paths, PyObject *__pyx_v_loner_type, PyObject *__pyx_v_level); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_32__request_fragment_output__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_paths); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_34__pause_monitor__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_36__wait_for_ack__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_qu); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_38__fatal_check__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_40__periodic_action__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_iterations); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_42__test_pyramid_idle_count__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_pyramid, PyObject *__pyx_v_loner_type, PyObject *__pyx_v_pyramid_idle_counts); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_44__finish_test__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_46__add_post_destory_chaser_tasks__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_48__pyramid_is_empty__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_saved); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_50__set_new_stale_thresh__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_52__is_queue_empty__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_54__save_purgatory_loners__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_56__add_to_pyramid__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_loner_type, PyObject *__pyx_v_level, PyObject *__pyx_v_path); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_58__remove_from_pyramid__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_loner_type, PyObject *__pyx_v_level, PyObject *__pyx_v_path); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_60__get_paths__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_loner_type, PyObject *__pyx_v_sub_pyramid, PyObject *__pyx_v_level); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_62__tidy_pyramid__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_27__wait_for_remaining_jobs___waiting_update(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_found, PyObject *__pyx_v_total); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_64__wait_for_remaining_jobs__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_66__clear_subpyramid__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_success, PyObject *__pyx_v_destroy, PyObject *__pyx_v_running); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_68__idle_routine__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_pyramid, PyObject *__pyx_v_loner_type); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_70__get_task_size__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_level, CYTHON_UNUSED PyObject *__pyx_v_loner_type); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_72__handler_exit__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_7Handler_74__post_destroy_report__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_10ChaserTask___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_constants, PyObject *__pyx_v_inqu, PyObject *__pyx_v_outqu, int __pyx_v_max_reads, PyObject *__pyx_v_child_pack); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_10ChaserTask_2run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_13ChaserHandler___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_constants, int __pyx_v_max_reads, PyObject *__pyx_v_child_pack, int __pyx_v_pid); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_13ChaserHandler_2__get_loner_temp_path__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_loner_type, PyObject *__pyx_v_level, PyObject *__pyx_v_unique); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_14PrimaryHandler___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_constants, int __pyx_v_max_reads, PyObject *__pyx_v_child_pack, int __pyx_v_pid); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_14PrimaryHandler_2run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_unsorted_paths); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_14PrimaryHandler_4__handle_unpaired_reads__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_loner_type, PyObject *__pyx_v_path); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_14PrimaryHandler_6__start_matchmaker_task__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_paths, PyObject *__pyx_v_loner_type, PyObject *__pyx_v_level); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_14PrimaryHandler_8__read_generator__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_unsorted_paths); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda3(PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_14PrimaryHandler_11__get_reference_id_name__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_read, PyObject *__pyx_v_bins); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_14PrimaryHandler_13__get_loner_type__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_read, PyObject *__pyx_v_bins); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_14PrimaryHandler_15__get_loner_holder__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_14PrimaryHandler_17__get_loner_object__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_loner_type, PyObject *__pyx_v_unique); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_14PrimaryHandler_19__write_loner__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_loner_objects, PyObject *__pyx_v_loner_file_counts, PyObject *__pyx_v_loner_type, PyObject *__pyx_v_read); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_14PrimaryHandler_21__get_paths_and_close__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_loner_holder); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_17MatchMakerHandler___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_constants, int __pyx_v_max_reads, PyObject *__pyx_v_child_pack, int __pyx_v_pid); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_17MatchMakerHandler_2run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_loner_paths, PyObject *__pyx_v_loner_type, PyObject *__pyx_v_level, PyObject *__pyx_v_fragment_leftovers); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_17MatchMakerHandler_4__first_pass__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_loner_info, PyObject *__pyx_v_fragment_leftovers); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda4(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tup); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_17MatchMakerHandler_6__prepare_for_second_pass__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_pairs); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_17MatchMakerHandler_8__read_generator__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_loner_info, PyObject *__pyx_v_second_pass, PyObject *__pyx_v_leftover_paths, PyObject *__pyx_v_fragment_leftovers); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_17MatchMakerHandler_11__write_leftovers__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_bam_iterator, PyObject *__pyx_v_fragment_leftovers, PyObject *__pyx_v_loner_info, PyObject *__pyx_v_leftover_paths); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_17MatchMakerHandler_13__add_to_leftover_paths__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_leftover_file, PyObject *__pyx_v_leftover_paths); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_17MatchMakerHandler_15__launch_child_task__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_pairs); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_17MatchMakerHandler_17__get_leftover_object__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_loner_info, PyObject *__pyx_v_unique); /* proto */
static PyObject *__pyx_pf_7parabam_6chaser_17MatchMakerHandler_19__get_loner_object__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_path); /* proto */
static PyObject *__pyx_tp_new_7parabam_6chaser___pyx_scope_struct____init__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7parabam_6chaser___pyx_scope_struct_1___read_generator__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7parabam_6chaser___pyx_scope_struct_3___read_generator__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_float__01;
static PyObject *__pyx_float_0_005;
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_3;
static PyObject *__pyx_int_4;
static PyObject *__pyx_int_5;
static PyObject *__pyx_int_8;
static PyObject *__pyx_int_10;
static PyObject *__pyx_int_20;
static PyObject *__pyx_int_50;
static PyObject *__pyx_int_100;
static PyObject *__pyx_int_130;
static PyObject *__pyx_int_250;
static PyObject *__pyx_int_2500;
static PyObject *__pyx_int_25000;
static PyObject *__pyx_int_50000;
static PyObject *__pyx_int_1000000;
static PyObject *__pyx_int_4000000;
static PyObject *__pyx_int_150000000;
static PyObject *__pyx_int_neg_1;
static PyObject *__pyx_tuple_;
static PyObject *__pyx_tuple__3;
static PyObject *__pyx_tuple__5;
static PyObject *__pyx_tuple__7;
static PyObject *__pyx_tuple__10;
static PyObject *__pyx_tuple__11;
static PyObject *__pyx_tuple__15;
static PyObject *__pyx_tuple__18;
static PyObject *__pyx_tuple__20;
static PyObject *__pyx_tuple__22;
static PyObject *__pyx_tuple__24;
static PyObject *__pyx_tuple__25;
static PyObject *__pyx_tuple__27;
static PyObject *__pyx_tuple__28;
static PyObject *__pyx_tuple__30;
static PyObject *__pyx_tuple__32;
static PyObject *__pyx_tuple__34;
static PyObject *__pyx_tuple__36;
static PyObject *__pyx_tuple__38;
static PyObject *__pyx_tuple__40;
static PyObject *__pyx_tuple__42;
static PyObject *__pyx_tuple__44;
static PyObject *__pyx_tuple__46;
static PyObject *__pyx_tuple__48;
static PyObject *__pyx_tuple__50;
static PyObject *__pyx_tuple__52;
static PyObject *__pyx_tuple__54;
static PyObject *__pyx_tuple__55;
static PyObject *__pyx_tuple__57;
static PyObject *__pyx_tuple__59;
static PyObject *__pyx_tuple__61;
static PyObject *__pyx_tuple__63;
static PyObject *__pyx_tuple__65;
static PyObject *__pyx_tuple__67;
static PyObject *__pyx_tuple__69;
static PyObject *__pyx_tuple__71;
static PyObject *__pyx_tuple__73;
static PyObject *__pyx_tuple__75;
static PyObject *__pyx_tuple__77;
static PyObject *__pyx_tuple__79;
static PyObject *__pyx_tuple__81;
static PyObject *__pyx_tuple__83;
static PyObject *__pyx_tuple__85;
static PyObject *__pyx_tuple__87;
static PyObject *__pyx_tuple__89;
static PyObject *__pyx_tuple__91;
static PyObject *__pyx_tuple__93;
static PyObject *__pyx_tuple__95;
static PyObject *__pyx_tuple__97;
static PyObject *__pyx_tuple__99;
static PyObject *__pyx_codeobj__2;
static PyObject *__pyx_codeobj__4;
static PyObject *__pyx_codeobj__6;
static PyObject *__pyx_codeobj__8;
static PyObject *__pyx_tuple__101;
static PyObject *__pyx_tuple__103;
static PyObject *__pyx_tuple__105;
static PyObject *__pyx_tuple__107;
static PyObject *__pyx_tuple__109;
static PyObject *__pyx_tuple__110;
static PyObject *__pyx_tuple__112;
static PyObject *__pyx_tuple__114;
static PyObject *__pyx_tuple__115;
static PyObject *__pyx_tuple__117;
static PyObject *__pyx_tuple__119;
static PyObject *__pyx_tuple__121;
static PyObject *__pyx_tuple__123;
static PyObject *__pyx_tuple__124;
static PyObject *__pyx_tuple__126;
static PyObject *__pyx_tuple__128;
static PyObject *__pyx_tuple__130;
static PyObject *__pyx_tuple__132;
static PyObject *__pyx_tuple__134;
static PyObject *__pyx_tuple__136;
static PyObject *__pyx_tuple__138;
static PyObject *__pyx_tuple__140;
static PyObject *__pyx_tuple__142;
static PyObject *__pyx_tuple__144;
static PyObject *__pyx_tuple__145;
static PyObject *__pyx_tuple__146;
static PyObject *__pyx_tuple__148;
static PyObject *__pyx_tuple__150;
static PyObject *__pyx_tuple__152;
static PyObject *__pyx_tuple__154;
static PyObject *__pyx_codeobj__12;
static PyObject *__pyx_codeobj__14;
static PyObject *__pyx_codeobj__16;
static PyObject *__pyx_codeobj__19;
static PyObject *__pyx_codeobj__21;
static PyObject *__pyx_codeobj__23;
static PyObject *__pyx_codeobj__26;
static PyObject *__pyx_codeobj__29;
static PyObject *__pyx_codeobj__31;
static PyObject *__pyx_codeobj__33;
static PyObject *__pyx_codeobj__35;
static PyObject *__pyx_codeobj__37;
static PyObject *__pyx_codeobj__39;
static PyObject *__pyx_codeobj__41;
static PyObject *__pyx_codeobj__43;
static PyObject *__pyx_codeobj__45;
static PyObject *__pyx_codeobj__47;
static PyObject *__pyx_codeobj__49;
static PyObject *__pyx_codeobj__51;
static PyObject *__pyx_codeobj__53;
static PyObject *__pyx_codeobj__56;
static PyObject *__pyx_codeobj__58;
static PyObject *__pyx_codeobj__60;
static PyObject *__pyx_codeobj__62;
static PyObject *__pyx_codeobj__64;
static PyObject *__pyx_codeobj__66;
static PyObject *__pyx_codeobj__68;
static PyObject *__pyx_codeobj__70;
static PyObject *__pyx_codeobj__72;
static PyObject *__pyx_codeobj__74;
static PyObject *__pyx_codeobj__76;
static PyObject *__pyx_codeobj__78;
static PyObject *__pyx_codeobj__80;
static PyObject *__pyx_codeobj__82;
static PyObject *__pyx_codeobj__84;
static PyObject *__pyx_codeobj__86;
static PyObject *__pyx_codeobj__88;
static PyObject *__pyx_codeobj__90;
static PyObject *__pyx_codeobj__92;
static PyObject *__pyx_codeobj__94;
static PyObject *__pyx_codeobj__96;
static PyObject *__pyx_codeobj__98;
static PyObject *__pyx_codeobj__100;
static PyObject *__pyx_codeobj__102;
static PyObject *__pyx_codeobj__104;
static PyObject *__pyx_codeobj__106;
static PyObject *__pyx_codeobj__108;
static PyObject *__pyx_codeobj__111;
static PyObject *__pyx_codeobj__113;
static PyObject *__pyx_codeobj__116;
static PyObject *__pyx_codeobj__118;
static PyObject *__pyx_codeobj__120;
static PyObject *__pyx_codeobj__122;
static PyObject *__pyx_codeobj__125;
static PyObject *__pyx_codeobj__127;
static PyObject *__pyx_codeobj__129;
static PyObject *__pyx_codeobj__131;
static PyObject *__pyx_codeobj__133;
static PyObject *__pyx_codeobj__135;
static PyObject *__pyx_codeobj__137;
static PyObject *__pyx_codeobj__139;
static PyObject *__pyx_codeobj__141;
static PyObject *__pyx_codeobj__143;
static PyObject *__pyx_codeobj__147;
static PyObject *__pyx_codeobj__149;
static PyObject *__pyx_codeobj__151;
static PyObject *__pyx_codeobj__153;
static PyObject *__pyx_codeobj__155;
/* Late includes */

/* "parabam/chaser.pyx":23
 * 
 * class ChaserResults(parabam.core.Package):
 *     def __init__(self,results,chaser_type):             # <<<<<<<<<<<<<<
 *         super(ChaserResults,self).__init__(results)
 *         self.chaser_type=chaser_type
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_13ChaserResults_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_13ChaserResults_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_13ChaserResults_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_13ChaserResults_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_results = 0;
  PyObject *__pyx_v_chaser_type = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_results,&__pyx_n_s_chaser_type,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_results)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 23, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_chaser_type)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 23, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 23, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_results = values[1];
    __pyx_v_chaser_type = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 23, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.ChaserResults.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_13ChaserResults___init__(__pyx_self, __pyx_v_self, __pyx_v_results, __pyx_v_chaser_type);

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

static PyObject *__pyx_pf_7parabam_6chaser_13ChaserResults___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_results, PyObject *__pyx_v_chaser_type) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "parabam/chaser.pyx":24
 * class ChaserResults(parabam.core.Package):
 *     def __init__(self,results,chaser_type):
 *         super(ChaserResults,self).__init__(results)             # <<<<<<<<<<<<<<
 *         self.chaser_type=chaser_type
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ChaserResults); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_results) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_results);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":25
 *     def __init__(self,results,chaser_type):
 *         super(ChaserResults,self).__init__(results)
 *         self.chaser_type=chaser_type             # <<<<<<<<<<<<<<
 * 
 * class PrimaryResults(ChaserResults):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_chaser_type, __pyx_v_chaser_type) < 0) __PYX_ERR(0, 25, __pyx_L1_error)

  /* "parabam/chaser.pyx":23
 * 
 * class ChaserResults(parabam.core.Package):
 *     def __init__(self,results,chaser_type):             # <<<<<<<<<<<<<<
 *         super(ChaserResults,self).__init__(results)
 *         self.chaser_type=chaser_type
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("parabam.chaser.ChaserResults.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":28
 * 
 * class PrimaryResults(ChaserResults):
 *     def __init__(self,results,chaser_type):             # <<<<<<<<<<<<<<
 *         super(PrimaryResults,self).__init__(results,chaser_type)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_14PrimaryResults_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_14PrimaryResults_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_14PrimaryResults_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_14PrimaryResults_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_results = 0;
  PyObject *__pyx_v_chaser_type = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_results,&__pyx_n_s_chaser_type,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_results)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 28, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_chaser_type)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 28, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 28, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_results = values[1];
    __pyx_v_chaser_type = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 28, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.PrimaryResults.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_14PrimaryResults___init__(__pyx_self, __pyx_v_self, __pyx_v_results, __pyx_v_chaser_type);

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

static PyObject *__pyx_pf_7parabam_6chaser_14PrimaryResults___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_results, PyObject *__pyx_v_chaser_type) {
  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;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "parabam/chaser.pyx":29
 * class PrimaryResults(ChaserResults):
 *     def __init__(self,results,chaser_type):
 *         super(PrimaryResults,self).__init__(results,chaser_type)             # <<<<<<<<<<<<<<
 * 
 * class MatchMakerResults(ChaserResults):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PrimaryResults); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_results, __pyx_v_chaser_type};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_results, __pyx_v_chaser_type};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_results);
    __Pyx_GIVEREF(__pyx_v_results);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_results);
    __Pyx_INCREF(__pyx_v_chaser_type);
    __Pyx_GIVEREF(__pyx_v_chaser_type);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_chaser_type);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":28
 * 
 * class PrimaryResults(ChaserResults):
 *     def __init__(self,results,chaser_type):             # <<<<<<<<<<<<<<
 *         super(PrimaryResults,self).__init__(results,chaser_type)
 * 
 */

  /* 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_5);
  __Pyx_AddTraceback("parabam.chaser.PrimaryResults.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":32
 * 
 * class MatchMakerResults(ChaserResults):
 *     def __init__(self,loner_type,results,chaser_type,rescued,level):             # <<<<<<<<<<<<<<
 *         super(MatchMakerResults,self).__init__(results,chaser_type)
 *         self.rescued = rescued
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_17MatchMakerResults_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_17MatchMakerResults_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_17MatchMakerResults_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_17MatchMakerResults_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_loner_type = 0;
  PyObject *__pyx_v_results = 0;
  PyObject *__pyx_v_chaser_type = 0;
  PyObject *__pyx_v_rescued = 0;
  PyObject *__pyx_v_level = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_loner_type,&__pyx_n_s_results,&__pyx_n_s_chaser_type,&__pyx_n_s_rescued,&__pyx_n_s_level,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loner_type)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 6, 6, 1); __PYX_ERR(0, 32, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_results)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 6, 6, 2); __PYX_ERR(0, 32, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_chaser_type)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 6, 6, 3); __PYX_ERR(0, 32, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rescued)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 6, 6, 4); __PYX_ERR(0, 32, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_level)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 6, 6, 5); __PYX_ERR(0, 32, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 32, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
    }
    __pyx_v_self = values[0];
    __pyx_v_loner_type = values[1];
    __pyx_v_results = values[2];
    __pyx_v_chaser_type = values[3];
    __pyx_v_rescued = values[4];
    __pyx_v_level = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 32, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.MatchMakerResults.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_17MatchMakerResults___init__(__pyx_self, __pyx_v_self, __pyx_v_loner_type, __pyx_v_results, __pyx_v_chaser_type, __pyx_v_rescued, __pyx_v_level);

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

static PyObject *__pyx_pf_7parabam_6chaser_17MatchMakerResults___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_loner_type, PyObject *__pyx_v_results, PyObject *__pyx_v_chaser_type, PyObject *__pyx_v_rescued, PyObject *__pyx_v_level) {
  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;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "parabam/chaser.pyx":33
 * class MatchMakerResults(ChaserResults):
 *     def __init__(self,loner_type,results,chaser_type,rescued,level):
 *         super(MatchMakerResults,self).__init__(results,chaser_type)             # <<<<<<<<<<<<<<
 *         self.rescued = rescued
 *         self.loner_type = loner_type
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MatchMakerResults); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_results, __pyx_v_chaser_type};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_results, __pyx_v_chaser_type};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 33, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_results);
    __Pyx_GIVEREF(__pyx_v_results);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_results);
    __Pyx_INCREF(__pyx_v_chaser_type);
    __Pyx_GIVEREF(__pyx_v_chaser_type);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_chaser_type);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":34
 *     def __init__(self,loner_type,results,chaser_type,rescued,level):
 *         super(MatchMakerResults,self).__init__(results,chaser_type)
 *         self.rescued = rescued             # <<<<<<<<<<<<<<
 *         self.loner_type = loner_type
 *         self.level = level
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_rescued, __pyx_v_rescued) < 0) __PYX_ERR(0, 34, __pyx_L1_error)

  /* "parabam/chaser.pyx":35
 *         super(MatchMakerResults,self).__init__(results,chaser_type)
 *         self.rescued = rescued
 *         self.loner_type = loner_type             # <<<<<<<<<<<<<<
 *         self.level = level
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_loner_type, __pyx_v_loner_type) < 0) __PYX_ERR(0, 35, __pyx_L1_error)

  /* "parabam/chaser.pyx":36
 *         self.rescued = rescued
 *         self.loner_type = loner_type
 *         self.level = level             # <<<<<<<<<<<<<<
 * 
 * class JobPackage(object):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_level, __pyx_v_level) < 0) __PYX_ERR(0, 36, __pyx_L1_error)

  /* "parabam/chaser.pyx":32
 * 
 * class MatchMakerResults(ChaserResults):
 *     def __init__(self,loner_type,results,chaser_type,rescued,level):             # <<<<<<<<<<<<<<
 *         super(MatchMakerResults,self).__init__(results,chaser_type)
 *         self.rescued = rescued
 */

  /* 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_5);
  __Pyx_AddTraceback("parabam.chaser.MatchMakerResults.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":39
 * 
 * class JobPackage(object):
 *     def __init__(self,paths,loner_type,level,fragment_leftovers=False):             # <<<<<<<<<<<<<<
 *         self.paths = paths
 *         self.loner_type = loner_type
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_10JobPackage_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_10JobPackage_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_10JobPackage_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_10JobPackage_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_paths = 0;
  PyObject *__pyx_v_loner_type = 0;
  PyObject *__pyx_v_level = 0;
  PyObject *__pyx_v_fragment_leftovers = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_paths,&__pyx_n_s_loner_type,&__pyx_n_s_level,&__pyx_n_s_fragment_leftovers,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[4] = ((PyObject *)((PyObject *)Py_False));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_paths)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 5, 1); __PYX_ERR(0, 39, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loner_type)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 5, 2); __PYX_ERR(0, 39, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_level)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 5, 3); __PYX_ERR(0, 39, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fragment_leftovers);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 39, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_paths = values[1];
    __pyx_v_loner_type = values[2];
    __pyx_v_level = values[3];
    __pyx_v_fragment_leftovers = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 39, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.JobPackage.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_10JobPackage___init__(__pyx_self, __pyx_v_self, __pyx_v_paths, __pyx_v_loner_type, __pyx_v_level, __pyx_v_fragment_leftovers);

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

static PyObject *__pyx_pf_7parabam_6chaser_10JobPackage___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_paths, PyObject *__pyx_v_loner_type, PyObject *__pyx_v_level, PyObject *__pyx_v_fragment_leftovers) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "parabam/chaser.pyx":40
 * class JobPackage(object):
 *     def __init__(self,paths,loner_type,level,fragment_leftovers=False):
 *         self.paths = paths             # <<<<<<<<<<<<<<
 *         self.loner_type = loner_type
 *         self.level = level
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_paths, __pyx_v_paths) < 0) __PYX_ERR(0, 40, __pyx_L1_error)

  /* "parabam/chaser.pyx":41
 *     def __init__(self,paths,loner_type,level,fragment_leftovers=False):
 *         self.paths = paths
 *         self.loner_type = loner_type             # <<<<<<<<<<<<<<
 *         self.level = level
 *         self.fragment_leftovers = fragment_leftovers
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_loner_type, __pyx_v_loner_type) < 0) __PYX_ERR(0, 41, __pyx_L1_error)

  /* "parabam/chaser.pyx":42
 *         self.paths = paths
 *         self.loner_type = loner_type
 *         self.level = level             # <<<<<<<<<<<<<<
 *         self.fragment_leftovers = fragment_leftovers
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_level, __pyx_v_level) < 0) __PYX_ERR(0, 42, __pyx_L1_error)

  /* "parabam/chaser.pyx":43
 *         self.loner_type = loner_type
 *         self.level = level
 *         self.fragment_leftovers = fragment_leftovers             # <<<<<<<<<<<<<<
 * 
 * class Handler(parabam.core.Handler):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fragment_leftovers, __pyx_v_fragment_leftovers) < 0) __PYX_ERR(0, 43, __pyx_L1_error)

  /* "parabam/chaser.pyx":39
 * 
 * class JobPackage(object):
 *     def __init__(self,paths,loner_type,level,fragment_leftovers=False):             # <<<<<<<<<<<<<<
 *         self.paths = paths
 *         self.loner_type = loner_type
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("parabam.chaser.JobPackage.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":47
 * class Handler(parabam.core.Handler):
 * 
 *     def __init__(self,object parent_bam, object output_paths,             # <<<<<<<<<<<<<<
 *                       object inqu,object constants,object pause_qus,
 *                       dict out_qu_dict,object Task):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_7Handler_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_parent_bam = 0;
  PyObject *__pyx_v_output_paths = 0;
  PyObject *__pyx_v_inqu = 0;
  PyObject *__pyx_v_constants = 0;
  PyObject *__pyx_v_pause_qus = 0;
  PyObject *__pyx_v_out_qu_dict = 0;
  PyObject *__pyx_v_Task = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_parent_bam,&__pyx_n_s_output_paths,&__pyx_n_s_inqu,&__pyx_n_s_constants,&__pyx_n_s_pause_qus,&__pyx_n_s_out_qu_dict,&__pyx_n_s_Task,0};
    PyObject* values[8] = {0,0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_parent_bam)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 1); __PYX_ERR(0, 47, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_output_paths)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 2); __PYX_ERR(0, 47, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inqu)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 3); __PYX_ERR(0, 47, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_constants)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 4); __PYX_ERR(0, 47, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pause_qus)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 5); __PYX_ERR(0, 47, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out_qu_dict)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 6); __PYX_ERR(0, 47, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Task)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 7); __PYX_ERR(0, 47, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 47, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 8) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
      values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
      values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
    }
    __pyx_v_self = values[0];
    __pyx_v_parent_bam = values[1];
    __pyx_v_output_paths = values[2];
    __pyx_v_inqu = values[3];
    __pyx_v_constants = values[4];
    __pyx_v_pause_qus = values[5];
    __pyx_v_out_qu_dict = ((PyObject*)values[6]);
    __pyx_v_Task = values[7];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 47, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.Handler.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out_qu_dict), (&PyDict_Type), 1, "out_qu_dict", 1))) __PYX_ERR(0, 49, __pyx_L1_error)
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler___init__(__pyx_self, __pyx_v_self, __pyx_v_parent_bam, __pyx_v_output_paths, __pyx_v_inqu, __pyx_v_constants, __pyx_v_pause_qus, __pyx_v_out_qu_dict, __pyx_v_Task);

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

/* "parabam/chaser.pyx":59
 * 
 *         class RuleTask(Task):
 *             def __init__(self,parent_bam,constants):             # <<<<<<<<<<<<<<
 *                 super(RuleTask,self).__init__(parent_bam=parent_bam,
 *                                                     inqu=None,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_8__init___8RuleTask_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_8__init___8RuleTask_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_7Handler_8__init___8RuleTask_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_8__init___8RuleTask_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_parent_bam = 0;
  PyObject *__pyx_v_constants = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_parent_bam,&__pyx_n_s_constants,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_parent_bam)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 59, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_constants)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 59, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 59, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_parent_bam = values[1];
    __pyx_v_constants = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 59, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.Handler.__init__.RuleTask.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_8__init___8RuleTask___init__(__pyx_self, __pyx_v_self, __pyx_v_parent_bam, __pyx_v_constants);

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_8__init___8RuleTask___init__(PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_parent_bam, PyObject *__pyx_v_constants) {
  struct __pyx_obj_7parabam_6chaser___pyx_scope_struct____init__ *__pyx_cur_scope;
  struct __pyx_obj_7parabam_6chaser___pyx_scope_struct____init__ *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);
  __pyx_outer_scope = (struct __pyx_obj_7parabam_6chaser___pyx_scope_struct____init__ *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "parabam/chaser.pyx":60
 *         class RuleTask(Task):
 *             def __init__(self,parent_bam,constants):
 *                 super(RuleTask,self).__init__(parent_bam=parent_bam,             # <<<<<<<<<<<<<<
 *                                                     inqu=None,
 *                                                     outqu=None,
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_RuleTask)) { __Pyx_RaiseClosureNameError("RuleTask"); __PYX_ERR(0, 60, __pyx_L1_error) }
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_RuleTask);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_RuleTask);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_v_RuleTask);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_parent_bam, __pyx_v_parent_bam) < 0) __PYX_ERR(0, 60, __pyx_L1_error)

  /* "parabam/chaser.pyx":61
 *             def __init__(self,parent_bam,constants):
 *                 super(RuleTask,self).__init__(parent_bam=parent_bam,
 *                                                     inqu=None,             # <<<<<<<<<<<<<<
 *                                                     outqu=None,
 *                                                     statusqu=None,
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_inqu, Py_None) < 0) __PYX_ERR(0, 60, __pyx_L1_error)

  /* "parabam/chaser.pyx":62
 *                 super(RuleTask,self).__init__(parent_bam=parent_bam,
 *                                                     inqu=None,
 *                                                     outqu=None,             # <<<<<<<<<<<<<<
 *                                                     statusqu=None,
 *                                                     task_size=0,
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_outqu, Py_None) < 0) __PYX_ERR(0, 60, __pyx_L1_error)

  /* "parabam/chaser.pyx":63
 *                                                     inqu=None,
 *                                                     outqu=None,
 *                                                     statusqu=None,             # <<<<<<<<<<<<<<
 *                                                     task_size=0,
 *                                                     constants=constants)
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_statusqu, Py_None) < 0) __PYX_ERR(0, 60, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_task_size, __pyx_int_0) < 0) __PYX_ERR(0, 60, __pyx_L1_error)

  /* "parabam/chaser.pyx":65
 *                                                     statusqu=None,
 *                                                     task_size=0,
 *                                                     constants=constants)             # <<<<<<<<<<<<<<
 * 
 *             def handle_pair_dict(self,pairs,unique):
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_constants, __pyx_v_constants) < 0) __PYX_ERR(0, 60, __pyx_L1_error)

  /* "parabam/chaser.pyx":60
 *         class RuleTask(Task):
 *             def __init__(self,parent_bam,constants):
 *                 super(RuleTask,self).__init__(parent_bam=parent_bam,             # <<<<<<<<<<<<<<
 *                                                     inqu=None,
 *                                                     outqu=None,
 */
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "parabam/chaser.pyx":59
 * 
 *         class RuleTask(Task):
 *             def __init__(self,parent_bam,constants):             # <<<<<<<<<<<<<<
 *                 super(RuleTask,self).__init__(parent_bam=parent_bam,
 *                                                     inqu=None,
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("parabam.chaser.Handler.__init__.RuleTask.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":67
 *                                                     constants=constants)
 * 
 *             def handle_pair_dict(self,pairs,unique):             # <<<<<<<<<<<<<<
 *                 self.unique = unique
 *                 results = self.__generate_results__(pairs)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_8__init___8RuleTask_3handle_pair_dict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_8__init___8RuleTask_3handle_pair_dict = {"handle_pair_dict", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_7Handler_8__init___8RuleTask_3handle_pair_dict, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_8__init___8RuleTask_3handle_pair_dict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_pairs = 0;
  PyObject *__pyx_v_unique = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("handle_pair_dict (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_pairs,&__pyx_n_s_unique,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pairs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("handle_pair_dict", 1, 3, 3, 1); __PYX_ERR(0, 67, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_unique)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("handle_pair_dict", 1, 3, 3, 2); __PYX_ERR(0, 67, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "handle_pair_dict") < 0)) __PYX_ERR(0, 67, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_pairs = values[1];
    __pyx_v_unique = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("handle_pair_dict", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 67, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.Handler.__init__.RuleTask.handle_pair_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_8__init___8RuleTask_2handle_pair_dict(__pyx_self, __pyx_v_self, __pyx_v_pairs, __pyx_v_unique);

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_8__init___8RuleTask_2handle_pair_dict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_pairs, PyObject *__pyx_v_unique) {
  PyObject *__pyx_v_results = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("handle_pair_dict", 0);

  /* "parabam/chaser.pyx":68
 * 
 *             def handle_pair_dict(self,pairs,unique):
 *                 self.unique = unique             # <<<<<<<<<<<<<<
 *                 results = self.__generate_results__(pairs)
 *                 results["Total"] = 0
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_unique, __pyx_v_unique) < 0) __PYX_ERR(0, 68, __pyx_L1_error)

  /* "parabam/chaser.pyx":69
 *             def handle_pair_dict(self,pairs,unique):
 *                 self.unique = unique
 *                 results = self.__generate_results__(pairs)             # <<<<<<<<<<<<<<
 *                 results["Total"] = 0
 *                 self._dealt += 1
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_generate_results); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_pairs) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_pairs);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_results = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":70
 *                 self.unique = unique
 *                 results = self.__generate_results__(pairs)
 *                 results["Total"] = 0             # <<<<<<<<<<<<<<
 *                 self._dealt += 1
 *                 time.sleep(.01)
 */
  if (unlikely(PyObject_SetItem(__pyx_v_results, __pyx_n_s_Total, __pyx_int_0) < 0)) __PYX_ERR(0, 70, __pyx_L1_error)

  /* "parabam/chaser.pyx":71
 *                 results = self.__generate_results__(pairs)
 *                 results["Total"] = 0
 *                 self._dealt += 1             # <<<<<<<<<<<<<<
 *                 time.sleep(.01)
 *                 return results
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dealt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dealt, __pyx_t_2) < 0) __PYX_ERR(0, 71, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "parabam/chaser.pyx":72
 *                 results["Total"] = 0
 *                 self._dealt += 1
 *                 time.sleep(.01)             # <<<<<<<<<<<<<<
 *                 return results
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_sleep); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 72, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_float__01) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_float__01);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "parabam/chaser.pyx":73
 *                 self._dealt += 1
 *                 time.sleep(.01)
 *                 return results             # <<<<<<<<<<<<<<
 * 
 *             def __process_task_set__(self,iterator):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_results);
  __pyx_r = __pyx_v_results;
  goto __pyx_L0;

  /* "parabam/chaser.pyx":67
 *                                                     constants=constants)
 * 
 *             def handle_pair_dict(self,pairs,unique):             # <<<<<<<<<<<<<<
 *                 self.unique = unique
 *                 results = self.__generate_results__(pairs)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("parabam.chaser.Handler.__init__.RuleTask.handle_pair_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_results);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":75
 *                 return results
 * 
 *             def __process_task_set__(self,iterator):             # <<<<<<<<<<<<<<
 *                 user_rule = self._constants.rule
 *                 parent_bam = self._parent_bam
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_8__init___8RuleTask_5__process_task_set__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_8__init___8RuleTask_5__process_task_set__ = {"__process_task_set__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_7Handler_8__init___8RuleTask_5__process_task_set__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_8__init___8RuleTask_5__process_task_set__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_iterator = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__process_task_set__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_iterator,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iterator)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__process_task_set__", 1, 2, 2, 1); __PYX_ERR(0, 75, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__process_task_set__") < 0)) __PYX_ERR(0, 75, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_iterator = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__process_task_set__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 75, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.Handler.__init__.RuleTask.__process_task_set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_8__init___8RuleTask_4__process_task_set__(__pyx_self, __pyx_v_self, __pyx_v_iterator);

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_8__init___8RuleTask_4__process_task_set__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_iterator) {
  PyObject *__pyx_v_user_rule = NULL;
  PyObject *__pyx_v_parent_bam = NULL;
  PyObject *__pyx_v_handle_output = NULL;
  PyObject *__pyx_v_user_constants = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_read_name = NULL;
  PyObject *__pyx_v_pair = NULL;
  PyObject *__pyx_v_rule_output = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_t_9;
  __Pyx_RefNannySetupContext("__process_task_set__", 0);

  /* "parabam/chaser.pyx":76
 * 
 *             def __process_task_set__(self,iterator):
 *                 user_rule = self._constants.rule             # <<<<<<<<<<<<<<
 *                 parent_bam = self._parent_bam
 *                 handle_output = self.__handle_rule_output__
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_constants_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_rule); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_user_rule = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "parabam/chaser.pyx":77
 *             def __process_task_set__(self,iterator):
 *                 user_rule = self._constants.rule
 *                 parent_bam = self._parent_bam             # <<<<<<<<<<<<<<
 *                 handle_output = self.__handle_rule_output__
 *                 user_constants = self._constants.constants
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parent_bam_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_parent_bam = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "parabam/chaser.pyx":78
 *                 user_rule = self._constants.rule
 *                 parent_bam = self._parent_bam
 *                 handle_output = self.__handle_rule_output__             # <<<<<<<<<<<<<<
 *                 user_constants = self._constants.constants
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_handle_rule_output); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_handle_output = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "parabam/chaser.pyx":79
 *                 parent_bam = self._parent_bam
 *                 handle_output = self.__handle_rule_output__
 *                 user_constants = self._constants.constants             # <<<<<<<<<<<<<<
 * 
 *                 for read_name,pair in iterator.items():
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_constants_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 79, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_constants); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 79, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_user_constants = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":81
 *                 user_constants = self._constants.constants
 * 
 *                 for read_name,pair in iterator.items():             # <<<<<<<<<<<<<<
 *                     rule_output = user_rule(pair,user_constants,parent_bam)
 *                     handle_output(rule_output,pair)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_iterator, __pyx_n_s_items); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 81, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 81, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 81, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 81, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_5(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 81, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 81, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 81, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 81, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 81, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
      index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 81, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 81, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_read_name, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_pair, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "parabam/chaser.pyx":82
 * 
 *                 for read_name,pair in iterator.items():
 *                     rule_output = user_rule(pair,user_constants,parent_bam)             # <<<<<<<<<<<<<<
 *                     handle_output(rule_output,pair)
 * 
 */
    __Pyx_INCREF(__pyx_v_user_rule);
    __pyx_t_6 = __pyx_v_user_rule; __pyx_t_3 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_9 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_pair, __pyx_v_user_constants, __pyx_v_parent_bam};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_pair, __pyx_v_user_constants, __pyx_v_parent_bam};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 82, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_3) {
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL;
      }
      __Pyx_INCREF(__pyx_v_pair);
      __Pyx_GIVEREF(__pyx_v_pair);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_9, __pyx_v_pair);
      __Pyx_INCREF(__pyx_v_user_constants);
      __Pyx_GIVEREF(__pyx_v_user_constants);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_9, __pyx_v_user_constants);
      __Pyx_INCREF(__pyx_v_parent_bam);
      __Pyx_GIVEREF(__pyx_v_parent_bam);
      PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_9, __pyx_v_parent_bam);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF_SET(__pyx_v_rule_output, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":83
 *                 for read_name,pair in iterator.items():
 *                     rule_output = user_rule(pair,user_constants,parent_bam)
 *                     handle_output(rule_output,pair)             # <<<<<<<<<<<<<<
 * 
 *             def __get_temp_path__(self,identity):
 */
    __Pyx_INCREF(__pyx_v_handle_output);
    __pyx_t_6 = __pyx_v_handle_output; __pyx_t_7 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_9 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_rule_output, __pyx_v_pair};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_rule_output, __pyx_v_pair};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_3 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 83, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__pyx_t_7) {
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7); __pyx_t_7 = NULL;
      }
      __Pyx_INCREF(__pyx_v_rule_output);
      __Pyx_GIVEREF(__pyx_v_rule_output);
      PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_9, __pyx_v_rule_output);
      __Pyx_INCREF(__pyx_v_pair);
      __Pyx_GIVEREF(__pyx_v_pair);
      PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_9, __pyx_v_pair);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __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_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":81
 *                 user_constants = self._constants.constants
 * 
 *                 for read_name,pair in iterator.items():             # <<<<<<<<<<<<<<
 *                     rule_output = user_rule(pair,user_constants,parent_bam)
 *                     handle_output(rule_output,pair)
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "parabam/chaser.pyx":75
 *                 return results
 * 
 *             def __process_task_set__(self,iterator):             # <<<<<<<<<<<<<<
 *                 user_rule = self._constants.rule
 *                 parent_bam = self._parent_bam
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("parabam.chaser.Handler.__init__.RuleTask.__process_task_set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_user_rule);
  __Pyx_XDECREF(__pyx_v_parent_bam);
  __Pyx_XDECREF(__pyx_v_handle_output);
  __Pyx_XDECREF(__pyx_v_user_constants);
  __Pyx_XDECREF(__pyx_v_read_name);
  __Pyx_XDECREF(__pyx_v_pair);
  __Pyx_XDECREF(__pyx_v_rule_output);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":85
 *                     handle_output(rule_output,pair)
 * 
 *             def __get_temp_path__(self,identity):             # <<<<<<<<<<<<<<
 *                 parent_bam_file_name = self._parent_bam.filename
 *                 try:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_8__init___8RuleTask_7__get_temp_path__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_8__init___8RuleTask_7__get_temp_path__ = {"__get_temp_path__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_7Handler_8__init___8RuleTask_7__get_temp_path__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_8__init___8RuleTask_7__get_temp_path__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_identity = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get_temp_path__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_identity,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_identity)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__get_temp_path__", 1, 2, 2, 1); __PYX_ERR(0, 85, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__get_temp_path__") < 0)) __PYX_ERR(0, 85, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_identity = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__get_temp_path__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 85, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.Handler.__init__.RuleTask.__get_temp_path__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_8__init___8RuleTask_6__get_temp_path__(__pyx_self, __pyx_v_self, __pyx_v_identity);

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_8__init___8RuleTask_6__get_temp_path__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_identity) {
  PyObject *__pyx_v_parent_bam_file_name = NULL;
  PyObject *__pyx_v_file_name = 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;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__get_temp_path__", 0);

  /* "parabam/chaser.pyx":86
 * 
 *             def __get_temp_path__(self,identity):
 *                 parent_bam_file_name = self._parent_bam.filename             # <<<<<<<<<<<<<<
 *                 try:
 *                     parent_bam_file_name = parent_bam_file_name.decode()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parent_bam_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_filename); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_parent_bam_file_name = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "parabam/chaser.pyx":87
 *             def __get_temp_path__(self,identity):
 *                 parent_bam_file_name = self._parent_bam.filename
 *                 try:             # <<<<<<<<<<<<<<
 *                     parent_bam_file_name = parent_bam_file_name.decode()
 *                 except (UnicodeDecodeError, AttributeError):
 */
  {
    __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:*/ {

      /* "parabam/chaser.pyx":88
 *                 parent_bam_file_name = self._parent_bam.filename
 *                 try:
 *                     parent_bam_file_name = parent_bam_file_name.decode()             # <<<<<<<<<<<<<<
 *                 except (UnicodeDecodeError, AttributeError):
 *                     # print "parabam: parent_bam_file_name is not in bytes again."
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parent_bam_file_name, __pyx_n_s_decode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 88, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_parent_bam_file_name, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "parabam/chaser.pyx":87
 *             def __get_temp_path__(self,identity):
 *                 parent_bam_file_name = self._parent_bam.filename
 *                 try:             # <<<<<<<<<<<<<<
 *                     parent_bam_file_name = parent_bam_file_name.decode()
 *                 except (UnicodeDecodeError, AttributeError):
 */
    }
    __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_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "parabam/chaser.pyx":89
 *                 try:
 *                     parent_bam_file_name = parent_bam_file_name.decode()
 *                 except (UnicodeDecodeError, AttributeError):             # <<<<<<<<<<<<<<
 *                     # print "parabam: parent_bam_file_name is not in bytes again."
 *                     # refer to https://github.com/cancerit/parabam/issues/6
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
    if (__pyx_t_7) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "parabam/chaser.pyx":87
 *             def __get_temp_path__(self,identity):
 *                 parent_bam_file_name = self._parent_bam.filename
 *                 try:             # <<<<<<<<<<<<<<
 *                     parent_bam_file_name = parent_bam_file_name.decode()
 *                 except (UnicodeDecodeError, AttributeError):
 */
    __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_L4_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_L8_try_end:;
  }

  /* "parabam/chaser.pyx":94
 *                     pass
 *                 file_name = "%s_%d_%d_%s" %\
 *                     (identity,self.unique,self._dealt, os.path.split(parent_bam_file_name)[1])             # <<<<<<<<<<<<<<
 *                 return os.path.join(self._temp_dir,file_name)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_unique); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dealt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_os); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_path); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_split); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  __pyx_t_6 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_v_parent_bam_file_name) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_parent_bam_file_name);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_6, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_v_identity);
  __Pyx_GIVEREF(__pyx_v_identity);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_identity);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_8);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":93
 *                     # refer to https://github.com/cancerit/parabam/issues/6
 *                     pass
 *                 file_name = "%s_%d_%d_%s" %\             # <<<<<<<<<<<<<<
 *                     (identity,self.unique,self._dealt, os.path.split(parent_bam_file_name)[1])
 *                 return os.path.join(self._temp_dir,file_name)
 */
  __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_s__d__d__s, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_file_name = ((PyObject*)__pyx_t_8);
  __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":95
 *                 file_name = "%s_%d_%d_%s" %\
 *                     (identity,self.unique,self._dealt, os.path.split(parent_bam_file_name)[1])
 *                 return os.path.join(self._temp_dir,file_name)             # <<<<<<<<<<<<<<
 * 
 *         self._loner_pyramid = self.__instalise_loner_pyramid__()
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_os); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_join); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_temp_dir); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_1, __pyx_v_file_name};
    __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 95, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_1, __pyx_v_file_name};
    __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 95, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 95, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_7, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_file_name);
    __Pyx_GIVEREF(__pyx_v_file_name);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_7, __pyx_v_file_name);
    __pyx_t_1 = 0;
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 95, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "parabam/chaser.pyx":85
 *                     handle_output(rule_output,pair)
 * 
 *             def __get_temp_path__(self,identity):             # <<<<<<<<<<<<<<
 *                 parent_bam_file_name = self._parent_bam.filename
 *                 try:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("parabam.chaser.Handler.__init__.RuleTask.__get_temp_path__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_parent_bam_file_name);
  __Pyx_XDECREF(__pyx_v_file_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":129
 *         self._primary_store = self.__instalise_primary_store__()
 * 
 *         self._print_chaser_debug = (lambda iterations: False)             # <<<<<<<<<<<<<<
 *         self._pause_debug = (lambda message: False)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_8__init___lambda(PyObject *__pyx_self, PyObject *__pyx_v_iterations); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_8__init___lambda = {"lambda", (PyCFunction)__pyx_pw_7parabam_6chaser_7Handler_8__init___lambda, METH_O, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_8__init___lambda(PyObject *__pyx_self, PyObject *__pyx_v_iterations) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda(__pyx_self, ((PyObject *)__pyx_v_iterations));

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

static PyObject *__pyx_lambda_funcdef_lambda(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_iterations) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

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

/* "parabam/chaser.pyx":130
 * 
 *         self._print_chaser_debug = (lambda iterations: False)
 *         self._pause_debug = (lambda message: False)             # <<<<<<<<<<<<<<
 * 
 *         #self._print_chaser_debug = self.__print_debug__
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_8__init___1lambda1(PyObject *__pyx_self, PyObject *__pyx_v_message); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_8__init___1lambda1 = {"lambda1", (PyCFunction)__pyx_pw_7parabam_6chaser_7Handler_8__init___1lambda1, METH_O, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_8__init___1lambda1(PyObject *__pyx_self, PyObject *__pyx_v_message) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda1(__pyx_self, ((PyObject *)__pyx_v_message));

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

static PyObject *__pyx_lambda_funcdef_lambda1(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_message) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda1", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

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

/* "parabam/chaser.pyx":47
 * class Handler(parabam.core.Handler):
 * 
 *     def __init__(self,object parent_bam, object output_paths,             # <<<<<<<<<<<<<<
 *                       object inqu,object constants,object pause_qus,
 *                       dict out_qu_dict,object Task):
 */

static PyObject *__pyx_pf_7parabam_6chaser_7Handler___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_parent_bam, PyObject *__pyx_v_output_paths, PyObject *__pyx_v_inqu, PyObject *__pyx_v_constants, PyObject *__pyx_v_pause_qus, PyObject *__pyx_v_out_qu_dict, PyObject *__pyx_v_Task) {
  struct __pyx_obj_7parabam_6chaser___pyx_scope_struct____init__ *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);
  __pyx_cur_scope = (struct __pyx_obj_7parabam_6chaser___pyx_scope_struct____init__ *)__pyx_tp_new_7parabam_6chaser___pyx_scope_struct____init__(__pyx_ptype_7parabam_6chaser___pyx_scope_struct____init__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7parabam_6chaser___pyx_scope_struct____init__ *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 47, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }

  /* "parabam/chaser.pyx":51
 *                       dict out_qu_dict,object Task):
 * 
 *         super(Handler,self).__init__(parent_bam = parent_bam,             # <<<<<<<<<<<<<<
 *                                      output_paths = output_paths,
 *                                      inqu=inqu,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Handler); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_parent_bam, __pyx_v_parent_bam) < 0) __PYX_ERR(0, 51, __pyx_L1_error)

  /* "parabam/chaser.pyx":52
 * 
 *         super(Handler,self).__init__(parent_bam = parent_bam,
 *                                      output_paths = output_paths,             # <<<<<<<<<<<<<<
 *                                      inqu=inqu,
 *                                      constants=constants,
 */
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_output_paths, __pyx_v_output_paths) < 0) __PYX_ERR(0, 51, __pyx_L1_error)

  /* "parabam/chaser.pyx":53
 *         super(Handler,self).__init__(parent_bam = parent_bam,
 *                                      output_paths = output_paths,
 *                                      inqu=inqu,             # <<<<<<<<<<<<<<
 *                                      constants=constants,
 *                                      pause_qus=pause_qus,
 */
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_inqu, __pyx_v_inqu) < 0) __PYX_ERR(0, 51, __pyx_L1_error)

  /* "parabam/chaser.pyx":54
 *                                      output_paths = output_paths,
 *                                      inqu=inqu,
 *                                      constants=constants,             # <<<<<<<<<<<<<<
 *                                      pause_qus=pause_qus,
 *                                      out_qu_dict=out_qu_dict,report = False)
 */
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_constants, __pyx_v_constants) < 0) __PYX_ERR(0, 51, __pyx_L1_error)

  /* "parabam/chaser.pyx":55
 *                                      inqu=inqu,
 *                                      constants=constants,
 *                                      pause_qus=pause_qus,             # <<<<<<<<<<<<<<
 *                                      out_qu_dict=out_qu_dict,report = False)
 * 
 */
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_pause_qus, __pyx_v_pause_qus) < 0) __PYX_ERR(0, 51, __pyx_L1_error)

  /* "parabam/chaser.pyx":56
 *                                      constants=constants,
 *                                      pause_qus=pause_qus,
 *                                      out_qu_dict=out_qu_dict,report = False)             # <<<<<<<<<<<<<<
 * 
 *         class RuleTask(Task):
 */
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_out_qu_dict, __pyx_v_out_qu_dict) < 0) __PYX_ERR(0, 51, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_report, Py_False) < 0) __PYX_ERR(0, 51, __pyx_L1_error)

  /* "parabam/chaser.pyx":51
 *                       dict out_qu_dict,object Task):
 * 
 *         super(Handler,self).__init__(parent_bam = parent_bam,             # <<<<<<<<<<<<<<
 *                                      output_paths = output_paths,
 *                                      inqu=inqu,
 */
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "parabam/chaser.pyx":58
 *                                      out_qu_dict=out_qu_dict,report = False)
 * 
 *         class RuleTask(Task):             # <<<<<<<<<<<<<<
 *             def __init__(self,parent_bam,constants):
 *                 super(RuleTask,self).__init__(parent_bam=parent_bam,
 */
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_Task);
  __Pyx_GIVEREF(__pyx_v_Task);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_Task);
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_3, __pyx_n_s_RuleTask, __pyx_n_s_Handler___init___locals_RuleTask, (PyObject *) NULL, __pyx_n_s_parabam_chaser, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "parabam/chaser.pyx":59
 * 
 *         class RuleTask(Task):
 *             def __init__(self,parent_bam,constants):             # <<<<<<<<<<<<<<
 *                 super(RuleTask,self).__init__(parent_bam=parent_bam,
 *                                                     inqu=None,
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_8__init___8RuleTask_1__init__, 0, __pyx_n_s_Handler___init___locals_RuleTask_2, ((PyObject*)__pyx_cur_scope), __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__2)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "parabam/chaser.pyx":67
 *                                                     constants=constants)
 * 
 *             def handle_pair_dict(self,pairs,unique):             # <<<<<<<<<<<<<<
 *                 self.unique = unique
 *                 results = self.__generate_results__(pairs)
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_8__init___8RuleTask_3handle_pair_dict, 0, __pyx_n_s_Handler___init___locals_RuleTask_3, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__4)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_handle_pair_dict, __pyx_t_4) < 0) __PYX_ERR(0, 67, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "parabam/chaser.pyx":75
 *                 return results
 * 
 *             def __process_task_set__(self,iterator):             # <<<<<<<<<<<<<<
 *                 user_rule = self._constants.rule
 *                 parent_bam = self._parent_bam
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_8__init___8RuleTask_5__process_task_set__, 0, __pyx_n_s_Handler___init___locals_RuleTask_4, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__6)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 75, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_process_task_set, __pyx_t_4) < 0) __PYX_ERR(0, 75, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "parabam/chaser.pyx":85
 *                     handle_output(rule_output,pair)
 * 
 *             def __get_temp_path__(self,identity):             # <<<<<<<<<<<<<<
 *                 parent_bam_file_name = self._parent_bam.filename
 *                 try:
 */
  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_8__init___8RuleTask_7__get_temp_path__, 0, __pyx_n_s_Handler___init___locals_RuleTask_5, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__8)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_get_temp_path, __pyx_t_4) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "parabam/chaser.pyx":58
 *                                      out_qu_dict=out_qu_dict,report = False)
 * 
 *         class RuleTask(Task):             # <<<<<<<<<<<<<<
 *             def __init__(self,parent_bam,constants):
 *                 super(RuleTask,self).__init__(parent_bam=parent_bam,
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_RuleTask, __pyx_t_3, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_cur_scope->__pyx_v_RuleTask = __pyx_t_4;
  __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "parabam/chaser.pyx":97
 *                 return os.path.join(self._temp_dir,file_name)
 * 
 *         self._loner_pyramid = self.__instalise_loner_pyramid__()             # <<<<<<<<<<<<<<
 *         self._pyramid_idle_counts = Counter()
 *         self._loner_purgatory = {}
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_instalise_loner_pyramid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_loner_pyramid, __pyx_t_3) < 0) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "parabam/chaser.pyx":98
 * 
 *         self._loner_pyramid = self.__instalise_loner_pyramid__()
 *         self._pyramid_idle_counts = Counter()             # <<<<<<<<<<<<<<
 *         self._loner_purgatory = {}
 *         self._files_in_pyramid = 0
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_pyramid_idle_counts, __pyx_t_3) < 0) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "parabam/chaser.pyx":99
 *         self._loner_pyramid = self.__instalise_loner_pyramid__()
 *         self._pyramid_idle_counts = Counter()
 *         self._loner_purgatory = {}             # <<<<<<<<<<<<<<
 *         self._files_in_pyramid = 0
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_loner_purgatory, __pyx_t_3) < 0) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "parabam/chaser.pyx":100
 *         self._pyramid_idle_counts = Counter()
 *         self._loner_purgatory = {}
 *         self._files_in_pyramid = 0             # <<<<<<<<<<<<<<
 * 
 *         self._periodic_interval = 5
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_files_in_pyramid, __pyx_int_0) < 0) __PYX_ERR(0, 100, __pyx_L1_error)

  /* "parabam/chaser.pyx":102
 *         self._files_in_pyramid = 0
 * 
 *         self._periodic_interval = 5             # <<<<<<<<<<<<<<
 *         self._total_loners = 0
 *         self._rescued = Counter()
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_periodic_interval, __pyx_int_5) < 0) __PYX_ERR(0, 102, __pyx_L1_error)

  /* "parabam/chaser.pyx":103
 * 
 *         self._periodic_interval = 5
 *         self._total_loners = 0             # <<<<<<<<<<<<<<
 *         self._rescued = Counter()
 *         self._prev_rescued = 0
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_total_loners, __pyx_int_0) < 0) __PYX_ERR(0, 103, __pyx_L1_error)

  /* "parabam/chaser.pyx":104
 *         self._periodic_interval = 5
 *         self._total_loners = 0
 *         self._rescued = Counter()             # <<<<<<<<<<<<<<
 *         self._prev_rescued = 0
 *         self._stale_count = 0
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_rescued_2, __pyx_t_3) < 0) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "parabam/chaser.pyx":105
 *         self._total_loners = 0
 *         self._rescued = Counter()
 *         self._prev_rescued = 0             # <<<<<<<<<<<<<<
 *         self._stale_count = 0
 *         self._stale_thresh = 250
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_prev_rescued, __pyx_int_0) < 0) __PYX_ERR(0, 105, __pyx_L1_error)

  /* "parabam/chaser.pyx":106
 *         self._rescued = Counter()
 *         self._prev_rescued = 0
 *         self._stale_count = 0             # <<<<<<<<<<<<<<
 *         self._stale_thresh = 250
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stale_count, __pyx_int_0) < 0) __PYX_ERR(0, 106, __pyx_L1_error)

  /* "parabam/chaser.pyx":107
 *         self._prev_rescued = 0
 *         self._stale_count = 0
 *         self._stale_thresh = 250             # <<<<<<<<<<<<<<
 * 
 *         self._child_pack = {"parent_bam":parent_bam,
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stale_thresh, __pyx_int_250) < 0) __PYX_ERR(0, 107, __pyx_L1_error)

  /* "parabam/chaser.pyx":109
 *         self._stale_thresh = 250
 * 
 *         self._child_pack = {"parent_bam":parent_bam,             # <<<<<<<<<<<<<<
 *                             "queue":out_qu_dict["main"],
 *                             "chrom_bins":self.__get_chrom_bins__(parent_bam),
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_parent_bam, __pyx_v_parent_bam) < 0) __PYX_ERR(0, 109, __pyx_L1_error)

  /* "parabam/chaser.pyx":110
 * 
 *         self._child_pack = {"parent_bam":parent_bam,
 *                             "queue":out_qu_dict["main"],             # <<<<<<<<<<<<<<
 *                             "chrom_bins":self.__get_chrom_bins__(parent_bam),
 *                             "chaser_task":RuleTask(parent_bam,
 */
  if (unlikely(__pyx_v_out_qu_dict == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 110, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_out_qu_dict, __pyx_n_s_main); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_queue, __pyx_t_1) < 0) __PYX_ERR(0, 109, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":111
 *         self._child_pack = {"parent_bam":parent_bam,
 *                             "queue":out_qu_dict["main"],
 *                             "chrom_bins":self.__get_chrom_bins__(parent_bam),             # <<<<<<<<<<<<<<
 *                             "chaser_task":RuleTask(parent_bam,
 *                                                      self._constants)}
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_chrom_bins); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v_parent_bam) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_parent_bam);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_chrom_bins, __pyx_t_1) < 0) __PYX_ERR(0, 109, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":113
 *                             "chrom_bins":self.__get_chrom_bins__(parent_bam),
 *                             "chaser_task":RuleTask(parent_bam,
 *                                                      self._constants)}             # <<<<<<<<<<<<<<
 * 
 *         self._chaser_qu = Queue()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_constants_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "parabam/chaser.pyx":112
 *                             "queue":out_qu_dict["main"],
 *                             "chrom_bins":self.__get_chrom_bins__(parent_bam),
 *                             "chaser_task":RuleTask(parent_bam,             # <<<<<<<<<<<<<<
 *                                                      self._constants)}
 * 
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_parent_bam);
  __Pyx_GIVEREF(__pyx_v_parent_bam);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_parent_bam);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_RuleTask, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_chaser_task, __pyx_t_1) < 0) __PYX_ERR(0, 109, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":109
 *         self._stale_thresh = 250
 * 
 *         self._child_pack = {"parent_bam":parent_bam,             # <<<<<<<<<<<<<<
 *                             "queue":out_qu_dict["main"],
 *                             "chrom_bins":self.__get_chrom_bins__(parent_bam),
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_child_pack, __pyx_t_3) < 0) __PYX_ERR(0, 109, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "parabam/chaser.pyx":115
 *                                                      self._constants)}
 * 
 *         self._chaser_qu = Queue()             # <<<<<<<<<<<<<<
 *         self._chaser_tasks = self.__create_chaser_tasks__(\
 *                                                 self._constants.total_procs)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Queue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_chaser_qu, __pyx_t_3) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "parabam/chaser.pyx":116
 * 
 *         self._chaser_qu = Queue()
 *         self._chaser_tasks = self.__create_chaser_tasks__(\             # <<<<<<<<<<<<<<
 *                                                 self._constants.total_procs)
 *         self._pending_jobs = 0
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_create_chaser_tasks); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "parabam/chaser.pyx":117
 *         self._chaser_qu = Queue()
 *         self._chaser_tasks = self.__create_chaser_tasks__(\
 *                                                 self._constants.total_procs)             # <<<<<<<<<<<<<<
 *         self._pending_jobs = 0
 *         self._max_jobs = (self._constants.total_procs * 4)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_constants_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_total_procs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __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_3)) __PYX_ERR(0, 116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":116
 * 
 *         self._chaser_qu = Queue()
 *         self._chaser_tasks = self.__create_chaser_tasks__(\             # <<<<<<<<<<<<<<
 *                                                 self._constants.total_procs)
 *         self._pending_jobs = 0
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_chaser_tasks, __pyx_t_3) < 0) __PYX_ERR(0, 116, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "parabam/chaser.pyx":118
 *         self._chaser_tasks = self.__create_chaser_tasks__(\
 *                                                 self._constants.total_procs)
 *         self._pending_jobs = 0             # <<<<<<<<<<<<<<
 *         self._max_jobs = (self._constants.total_procs * 4)
 *         self._file_readers_paused = False
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_pending_jobs, __pyx_int_0) < 0) __PYX_ERR(0, 118, __pyx_L1_error)

  /* "parabam/chaser.pyx":119
 *                                                 self._constants.total_procs)
 *         self._pending_jobs = 0
 *         self._max_jobs = (self._constants.total_procs * 4)             # <<<<<<<<<<<<<<
 *         self._file_readers_paused = False
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_constants_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_total_procs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_int_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_max_jobs, __pyx_t_3) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "parabam/chaser.pyx":120
 *         self._pending_jobs = 0
 *         self._max_jobs = (self._constants.total_procs * 4)
 *         self._file_readers_paused = False             # <<<<<<<<<<<<<<
 * 
 *         self._post_destroy_count = 0
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_file_readers_paused, Py_False) < 0) __PYX_ERR(0, 120, __pyx_L1_error)

  /* "parabam/chaser.pyx":122
 *         self._file_readers_paused = False
 * 
 *         self._post_destroy_count = 0             # <<<<<<<<<<<<<<
 *         self._post_destroy_thresh = 50
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_post_destroy_count, __pyx_int_0) < 0) __PYX_ERR(0, 122, __pyx_L1_error)

  /* "parabam/chaser.pyx":123
 * 
 *         self._post_destroy_count = 0
 *         self._post_destroy_thresh = 50             # <<<<<<<<<<<<<<
 * 
 *         self._post_destroy_tasks_added = False
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_post_destroy_thresh, __pyx_int_50) < 0) __PYX_ERR(0, 123, __pyx_L1_error)

  /* "parabam/chaser.pyx":125
 *         self._post_destroy_thresh = 50
 * 
 *         self._post_destroy_tasks_added = False             # <<<<<<<<<<<<<<
 * 
 *         self._primary_store = self.__instalise_primary_store__()
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_post_destroy_tasks_added, Py_False) < 0) __PYX_ERR(0, 125, __pyx_L1_error)

  /* "parabam/chaser.pyx":127
 *         self._post_destroy_tasks_added = False
 * 
 *         self._primary_store = self.__instalise_primary_store__()             # <<<<<<<<<<<<<<
 * 
 *         self._print_chaser_debug = (lambda iterations: False)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_instalise_primary_store); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_primary_store, __pyx_t_3) < 0) __PYX_ERR(0, 127, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "parabam/chaser.pyx":129
 *         self._primary_store = self.__instalise_primary_store__()
 * 
 *         self._print_chaser_debug = (lambda iterations: False)             # <<<<<<<<<<<<<<
 *         self._pause_debug = (lambda message: False)
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_8__init___lambda, 0, __pyx_n_s_Handler___init___locals_lambda, NULL, __pyx_n_s_parabam_chaser, __pyx_d, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_print_chaser_debug, __pyx_t_3) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "parabam/chaser.pyx":130
 * 
 *         self._print_chaser_debug = (lambda iterations: False)
 *         self._pause_debug = (lambda message: False)             # <<<<<<<<<<<<<<
 * 
 *         #self._print_chaser_debug = self.__print_debug__
 */
  __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_8__init___1lambda1, 0, __pyx_n_s_Handler___init___locals_lambda, NULL, __pyx_n_s_parabam_chaser, __pyx_d, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_pause_debug, __pyx_t_3) < 0) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "parabam/chaser.pyx":47
 * class Handler(parabam.core.Handler):
 * 
 *     def __init__(self,object parent_bam, object output_paths,             # <<<<<<<<<<<<<<
 *                       object inqu,object constants,object pause_qus,
 *                       dict out_qu_dict,object Task):
 */

  /* 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("parabam.chaser.Handler.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":135
 *         #self._pause_debug = self.__pause_debug__
 * 
 *     def __pause_debug__(self, message):             # <<<<<<<<<<<<<<
 *         print "PAUSE DEBUG:: ", message
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_3__pause_debug__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_3__pause_debug__ = {"__pause_debug__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_7Handler_3__pause_debug__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_3__pause_debug__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_message = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pause_debug__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_message,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_message)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pause_debug__", 1, 2, 2, 1); __PYX_ERR(0, 135, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pause_debug__") < 0)) __PYX_ERR(0, 135, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_message = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pause_debug__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 135, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.Handler.__pause_debug__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_2__pause_debug__(__pyx_self, __pyx_v_self, __pyx_v_message);

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_2__pause_debug__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_message) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__pause_debug__", 0);

  /* "parabam/chaser.pyx":136
 * 
 *     def __pause_debug__(self, message):
 *         print "PAUSE DEBUG:: ", message             # <<<<<<<<<<<<<<
 * 
 *     def __print_debug__(self,iterations):
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_kp_s_PAUSE_DEBUG);
  __Pyx_GIVEREF(__pyx_kp_s_PAUSE_DEBUG);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_s_PAUSE_DEBUG);
  __Pyx_INCREF(__pyx_v_message);
  __Pyx_GIVEREF(__pyx_v_message);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_message);
  if (__Pyx_Print(0, __pyx_t_1, 1) < 0) __PYX_ERR(0, 136, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":135
 *         #self._pause_debug = self.__pause_debug__
 * 
 *     def __pause_debug__(self, message):             # <<<<<<<<<<<<<<
 *         print "PAUSE DEBUG:: ", message
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("parabam.chaser.Handler.__pause_debug__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":138
 *         print "PAUSE DEBUG:: ", message
 * 
 *     def __print_debug__(self,iterations):             # <<<<<<<<<<<<<<
 *         if iterations % 50 == 0 or iterations == -1:
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_5__print_debug__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_5__print_debug__ = {"__print_debug__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_7Handler_5__print_debug__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_5__print_debug__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_iterations = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__print_debug__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_iterations,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iterations)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__print_debug__", 1, 2, 2, 1); __PYX_ERR(0, 138, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__print_debug__") < 0)) __PYX_ERR(0, 138, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_iterations = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__print_debug__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 138, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.Handler.__print_debug__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_4__print_debug__(__pyx_self, __pyx_v_self, __pyx_v_iterations);

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_4__print_debug__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_iterations) {
  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;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  double __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  Py_ssize_t __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  __Pyx_RefNannySetupContext("__print_debug__", 0);

  /* "parabam/chaser.pyx":139
 * 
 *     def __print_debug__(self,iterations):
 *         if iterations % 50 == 0 or iterations == -1:             # <<<<<<<<<<<<<<
 * 
 *             if iterations == -1:
 */
  __pyx_t_2 = __Pyx_PyInt_RemainderObjC(__pyx_v_iterations, __pyx_int_50, 50, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_v_iterations, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "parabam/chaser.pyx":141
 *         if iterations % 50 == 0 or iterations == -1:
 * 
 *             if iterations == -1:             # <<<<<<<<<<<<<<
 *                 sys.stdout.write("\nFINISHED\n")
 * 
 */
    __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_v_iterations, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 141, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 141, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "parabam/chaser.pyx":142
 * 
 *             if iterations == -1:
 *                 sys.stdout.write("\nFINISHED\n")             # <<<<<<<<<<<<<<
 * 
 *             sys.stdout.write(("\r %d/%d=%.4f %.2fGB | Proc:%d Des:%d "
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_stdout); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 142, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_kp_s_FINISHED) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_FINISHED);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 142, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "parabam/chaser.pyx":141
 *         if iterations % 50 == 0 or iterations == -1:
 * 
 *             if iterations == -1:             # <<<<<<<<<<<<<<
 *                 sys.stdout.write("\nFINISHED\n")
 * 
 */
    }

    /* "parabam/chaser.pyx":144
 *                 sys.stdout.write("\nFINISHED\n")
 * 
 *             sys.stdout.write(("\r %d/%d=%.4f %.2fGB | Proc:%d Des:%d "             # <<<<<<<<<<<<<<
 *                          "Purg:%d Stale(Thresh):%d(%d) Jobs:%d Files:%d  ") %\
 *                 (self._rescued["total"],
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_stdout); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "parabam/chaser.pyx":146
 *             sys.stdout.write(("\r %d/%d=%.4f %.2fGB | Proc:%d Des:%d "
 *                          "Purg:%d Stale(Thresh):%d(%d) Jobs:%d Files:%d  ") %\
 *                 (self._rescued["total"],             # <<<<<<<<<<<<<<
 *                 self._total_loners,
 *                 float(self._rescued["total"]+1)/(self._total_loners+1),
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rescued_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_5, __pyx_n_s_total); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "parabam/chaser.pyx":147
 *                          "Purg:%d Stale(Thresh):%d(%d) Jobs:%d Files:%d  ") %\
 *                 (self._rescued["total"],
 *                 self._total_loners,             # <<<<<<<<<<<<<<
 *                 float(self._rescued["total"]+1)/(self._total_loners+1),
 *                 float((self._total_loners\
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_total_loners); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);

    /* "parabam/chaser.pyx":148
 *                 (self._rescued["total"],
 *                 self._total_loners,
 *                 float(self._rescued["total"]+1)/(self._total_loners+1),             # <<<<<<<<<<<<<<
 *                 float((self._total_loners\
 *                             - self._rescued["total"]) * 130) / (10**9),
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rescued_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_t_7, __pyx_n_s_total); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_8, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyNumber_Float(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_total_loners); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = __Pyx_PyInt_AddObjC(__pyx_t_7, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyNumber_Divide(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "parabam/chaser.pyx":149
 *                 self._total_loners,
 *                 float(self._rescued["total"]+1)/(self._total_loners+1),
 *                 float((self._total_loners\             # <<<<<<<<<<<<<<
 *                             - self._rescued["total"]) * 130) / (10**9),
 *                 self._processing,
 */
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_total_loners); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);

    /* "parabam/chaser.pyx":150
 *                 float(self._rescued["total"]+1)/(self._total_loners+1),
 *                 float((self._total_loners\
 *                             - self._rescued["total"]) * 130) / (10**9),             # <<<<<<<<<<<<<<
 *                 self._processing,
 *                 self._destroy,
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rescued_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = __Pyx_PyObject_Dict_GetItem(__pyx_t_8, __pyx_n_s_total); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyNumber_Subtract(__pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = PyNumber_Multiply(__pyx_t_8, __pyx_int_130); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "parabam/chaser.pyx":149
 *                 self._total_loners,
 *                 float(self._rescued["total"]+1)/(self._total_loners+1),
 *                 float((self._total_loners\             # <<<<<<<<<<<<<<
 *                             - self._rescued["total"]) * 130) / (10**9),
 *                 self._processing,
 */
    __pyx_t_11 = __Pyx_PyObject_AsDouble(__pyx_t_10); if (unlikely(__pyx_t_11 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 149, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "parabam/chaser.pyx":150
 *                 float(self._rescued["total"]+1)/(self._total_loners+1),
 *                 float((self._total_loners\
 *                             - self._rescued["total"]) * 130) / (10**9),             # <<<<<<<<<<<<<<
 *                 self._processing,
 *                 self._destroy,
 */
    __pyx_t_10 = PyFloat_FromDouble((__pyx_t_11 / 1000000000.0)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);

    /* "parabam/chaser.pyx":151
 *                 float((self._total_loners\
 *                             - self._rescued["total"]) * 130) / (10**9),
 *                 self._processing,             # <<<<<<<<<<<<<<
 *                 self._destroy,
 *                 len(self._loner_purgatory),
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_processing); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);

    /* "parabam/chaser.pyx":152
 *                             - self._rescued["total"]) * 130) / (10**9),
 *                 self._processing,
 *                 self._destroy,             # <<<<<<<<<<<<<<
 *                 len(self._loner_purgatory),
 *                 self._stale_count,
 */
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_destroy); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 152, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);

    /* "parabam/chaser.pyx":153
 *                 self._processing,
 *                 self._destroy,
 *                 len(self._loner_purgatory),             # <<<<<<<<<<<<<<
 *                 self._stale_count,
 *                 self._stale_thresh,
 */
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_loner_purgatory); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_13 = PyObject_Length(__pyx_t_12); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 153, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __pyx_t_12 = PyInt_FromSsize_t(__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);

    /* "parabam/chaser.pyx":154
 *                 self._destroy,
 *                 len(self._loner_purgatory),
 *                 self._stale_count,             # <<<<<<<<<<<<<<
 *                 self._stale_thresh,
 *                 self._pending_jobs,
 */
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stale_count); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);

    /* "parabam/chaser.pyx":155
 *                 len(self._loner_purgatory),
 *                 self._stale_count,
 *                 self._stale_thresh,             # <<<<<<<<<<<<<<
 *                 self._pending_jobs,
 *                 self._files_in_pyramid))
 */
    __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stale_thresh); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 155, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);

    /* "parabam/chaser.pyx":156
 *                 self._stale_count,
 *                 self._stale_thresh,
 *                 self._pending_jobs,             # <<<<<<<<<<<<<<
 *                 self._files_in_pyramid))
 * 
 */
    __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pending_jobs); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);

    /* "parabam/chaser.pyx":157
 *                 self._stale_thresh,
 *                 self._pending_jobs,
 *                 self._files_in_pyramid))             # <<<<<<<<<<<<<<
 * 
 *             if iterations == -1:
 */
    __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_files_in_pyramid); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);

    /* "parabam/chaser.pyx":146
 *             sys.stdout.write(("\r %d/%d=%.4f %.2fGB | Proc:%d Des:%d "
 *                          "Purg:%d Stale(Thresh):%d(%d) Jobs:%d Files:%d  ") %\
 *                 (self._rescued["total"],             # <<<<<<<<<<<<<<
 *                 self._total_loners,
 *                 float(self._rescued["total"]+1)/(self._total_loners+1),
 */
    __pyx_t_18 = PyTuple_New(11); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_18, 2, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_18, 3, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_18, 4, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_18, 5, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_18, 6, __pyx_t_12);
    __Pyx_GIVEREF(__pyx_t_14);
    PyTuple_SET_ITEM(__pyx_t_18, 7, __pyx_t_14);
    __Pyx_GIVEREF(__pyx_t_15);
    PyTuple_SET_ITEM(__pyx_t_18, 8, __pyx_t_15);
    __Pyx_GIVEREF(__pyx_t_16);
    PyTuple_SET_ITEM(__pyx_t_18, 9, __pyx_t_16);
    __Pyx_GIVEREF(__pyx_t_17);
    PyTuple_SET_ITEM(__pyx_t_18, 10, __pyx_t_17);
    __pyx_t_6 = 0;
    __pyx_t_5 = 0;
    __pyx_t_7 = 0;
    __pyx_t_10 = 0;
    __pyx_t_8 = 0;
    __pyx_t_9 = 0;
    __pyx_t_12 = 0;
    __pyx_t_14 = 0;
    __pyx_t_15 = 0;
    __pyx_t_16 = 0;
    __pyx_t_17 = 0;

    /* "parabam/chaser.pyx":145
 * 
 *             sys.stdout.write(("\r %d/%d=%.4f %.2fGB | Proc:%d Des:%d "
 *                          "Purg:%d Stale(Thresh):%d(%d) Jobs:%d Files:%d  ") %\             # <<<<<<<<<<<<<<
 *                 (self._rescued["total"],
 *                 self._total_loners,
 */
    __pyx_t_17 = __Pyx_PyString_Format(__pyx_kp_s_d_d_4f_2fGB_Proc_d_Des_d_Purg_d, __pyx_t_18); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    __pyx_t_18 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_18)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_18);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_3 = (__pyx_t_18) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_18, __pyx_t_17) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_17);
    __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "parabam/chaser.pyx":159
 *                 self._files_in_pyramid))
 * 
 *             if iterations == -1:             # <<<<<<<<<<<<<<
 *                 sys.stdout.write("\nFINISHED\n")
 *             sys.stdout.flush()
 */
    __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_v_iterations, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 159, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "parabam/chaser.pyx":160
 * 
 *             if iterations == -1:
 *                 sys.stdout.write("\nFINISHED\n")             # <<<<<<<<<<<<<<
 *             sys.stdout.flush()
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_stdout); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 160, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      __pyx_t_17 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_17)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_17);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      __pyx_t_3 = (__pyx_t_17) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_17, __pyx_kp_s_FINISHED) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_FINISHED);
      __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 160, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "parabam/chaser.pyx":159
 *                 self._files_in_pyramid))
 * 
 *             if iterations == -1:             # <<<<<<<<<<<<<<
 *                 sys.stdout.write("\nFINISHED\n")
 *             sys.stdout.flush()
 */
    }

    /* "parabam/chaser.pyx":161
 *             if iterations == -1:
 *                 sys.stdout.write("\nFINISHED\n")
 *             sys.stdout.flush()             # <<<<<<<<<<<<<<
 * 
 *         if iterations % 2500 == 0:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_stdout); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_flush); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __pyx_t_17 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_17)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_17);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_3 = (__pyx_t_17) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_17) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "parabam/chaser.pyx":139
 * 
 *     def __print_debug__(self,iterations):
 *         if iterations % 50 == 0 or iterations == -1:             # <<<<<<<<<<<<<<
 * 
 *             if iterations == -1:
 */
  }

  /* "parabam/chaser.pyx":163
 *             sys.stdout.flush()
 * 
 *         if iterations % 2500 == 0:             # <<<<<<<<<<<<<<
 *             print ""
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_RemainderObjC(__pyx_v_iterations, __pyx_int_2500, 0x9C4, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_3, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {

    /* "parabam/chaser.pyx":164
 * 
 *         if iterations % 2500 == 0:
 *             print ""             # <<<<<<<<<<<<<<
 * 
 *     def __create_chaser_tasks__(self,total_tasks):
 */
    if (__Pyx_PrintOne(0, __pyx_kp_s__9) < 0) __PYX_ERR(0, 164, __pyx_L1_error)

    /* "parabam/chaser.pyx":163
 *             sys.stdout.flush()
 * 
 *         if iterations % 2500 == 0:             # <<<<<<<<<<<<<<
 *             print ""
 * 
 */
  }

  /* "parabam/chaser.pyx":138
 *         print "PAUSE DEBUG:: ", message
 * 
 *     def __print_debug__(self,iterations):             # <<<<<<<<<<<<<<
 *         if iterations % 50 == 0 or iterations == -1:
 * 
 */

  /* 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_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_AddTraceback("parabam.chaser.Handler.__print_debug__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":166
 *             print ""
 * 
 *     def __create_chaser_tasks__(self,total_tasks):             # <<<<<<<<<<<<<<
 *         tasks = []
 *         for i in xrange(total_tasks):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_7__create_chaser_tasks__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_7__create_chaser_tasks__ = {"__create_chaser_tasks__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_7Handler_7__create_chaser_tasks__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_7__create_chaser_tasks__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_total_tasks = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__create_chaser_tasks__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_total_tasks,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_total_tasks)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__create_chaser_tasks__", 1, 2, 2, 1); __PYX_ERR(0, 166, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__create_chaser_tasks__") < 0)) __PYX_ERR(0, 166, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_total_tasks = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__create_chaser_tasks__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 166, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.Handler.__create_chaser_tasks__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_6__create_chaser_tasks__(__pyx_self, __pyx_v_self, __pyx_v_total_tasks);

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_6__create_chaser_tasks__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_total_tasks) {
  PyObject *__pyx_v_tasks = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_task = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("__create_chaser_tasks__", 0);

  /* "parabam/chaser.pyx":167
 * 
 *     def __create_chaser_tasks__(self,total_tasks):
 *         tasks = []             # <<<<<<<<<<<<<<
 *         for i in xrange(total_tasks):
 *             task = ChaserTask(constants=self._constants,
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_tasks = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":168
 *     def __create_chaser_tasks__(self,total_tasks):
 *         tasks = []
 *         for i in xrange(total_tasks):             # <<<<<<<<<<<<<<
 *             task = ChaserTask(constants=self._constants,
 *                               inqu=self._chaser_qu,
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_xrange, __pyx_v_total_tasks); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 168, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 168, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 168, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 168, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 168, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 168, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":169
 *         tasks = []
 *         for i in xrange(total_tasks):
 *             task = ChaserTask(constants=self._constants,             # <<<<<<<<<<<<<<
 *                               inqu=self._chaser_qu,
 *                               outqu=self._inqu,
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ChaserTask); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_constants_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_constants, __pyx_t_6) < 0) __PYX_ERR(0, 169, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "parabam/chaser.pyx":170
 *         for i in xrange(total_tasks):
 *             task = ChaserTask(constants=self._constants,
 *                               inqu=self._chaser_qu,             # <<<<<<<<<<<<<<
 *                               outqu=self._inqu,
 *                               max_reads=4000000,
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_chaser_qu); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_inqu, __pyx_t_6) < 0) __PYX_ERR(0, 169, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "parabam/chaser.pyx":171
 *             task = ChaserTask(constants=self._constants,
 *                               inqu=self._chaser_qu,
 *                               outqu=self._inqu,             # <<<<<<<<<<<<<<
 *                               max_reads=4000000,
 *                               child_pack=self._child_pack)
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inqu_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 171, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_outqu, __pyx_t_6) < 0) __PYX_ERR(0, 169, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_max_reads, __pyx_int_4000000) < 0) __PYX_ERR(0, 169, __pyx_L1_error)

    /* "parabam/chaser.pyx":173
 *                               outqu=self._inqu,
 *                               max_reads=4000000,
 *                               child_pack=self._child_pack)             # <<<<<<<<<<<<<<
 *             task.start()
 *             tasks.append(task)
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_child_pack); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 173, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_child_pack_2, __pyx_t_6) < 0) __PYX_ERR(0, 169, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "parabam/chaser.pyx":169
 *         tasks = []
 *         for i in xrange(total_tasks):
 *             task = ChaserTask(constants=self._constants,             # <<<<<<<<<<<<<<
 *                               inqu=self._chaser_qu,
 *                               outqu=self._inqu,
 */
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_task, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "parabam/chaser.pyx":174
 *                               max_reads=4000000,
 *                               child_pack=self._child_pack)
 *             task.start()             # <<<<<<<<<<<<<<
 *             tasks.append(task)
 *         return tasks
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_task, __pyx_n_s_start); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_6 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "parabam/chaser.pyx":175
 *                               child_pack=self._child_pack)
 *             task.start()
 *             tasks.append(task)             # <<<<<<<<<<<<<<
 *         return tasks
 * 
 */
    __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_tasks, __pyx_v_task); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 175, __pyx_L1_error)

    /* "parabam/chaser.pyx":168
 *     def __create_chaser_tasks__(self,total_tasks):
 *         tasks = []
 *         for i in xrange(total_tasks):             # <<<<<<<<<<<<<<
 *             task = ChaserTask(constants=self._constants,
 *                               inqu=self._chaser_qu,
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "parabam/chaser.pyx":176
 *             task.start()
 *             tasks.append(task)
 *         return tasks             # <<<<<<<<<<<<<<
 * 
 *     def __get_chrom_bins__(self,parent_bam):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_tasks);
  __pyx_r = __pyx_v_tasks;
  goto __pyx_L0;

  /* "parabam/chaser.pyx":166
 *             print ""
 * 
 *     def __create_chaser_tasks__(self,total_tasks):             # <<<<<<<<<<<<<<
 *         tasks = []
 *         for i in xrange(total_tasks):
 */

  /* 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_AddTraceback("parabam.chaser.Handler.__create_chaser_tasks__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tasks);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_task);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":178
 *         return tasks
 * 
 *     def __get_chrom_bins__(self,parent_bam):             # <<<<<<<<<<<<<<
 *         # Create chromosome `bins` by grouping together smaller chromosomes
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_9__get_chrom_bins__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_9__get_chrom_bins__ = {"__get_chrom_bins__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_7Handler_9__get_chrom_bins__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_9__get_chrom_bins__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_parent_bam = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get_chrom_bins__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_parent_bam,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_parent_bam)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__get_chrom_bins__", 1, 2, 2, 1); __PYX_ERR(0, 178, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__get_chrom_bins__") < 0)) __PYX_ERR(0, 178, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_parent_bam = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__get_chrom_bins__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 178, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.Handler.__get_chrom_bins__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_8__get_chrom_bins__(__pyx_self, __pyx_v_self, __pyx_v_parent_bam);

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

/* "parabam/chaser.pyx":186
 *         chrom_bins = {}
 *         chrom_info = zip(xrange(len(references)),references,lengths)
 *         chrom_info = sorted(chrom_info, key=lambda tup: tup[2])             # <<<<<<<<<<<<<<
 *         group = []
 *         size = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_18__get_chrom_bins___lambda2(PyObject *__pyx_self, PyObject *__pyx_v_tup); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_18__get_chrom_bins___lambda2 = {"lambda2", (PyCFunction)__pyx_pw_7parabam_6chaser_7Handler_18__get_chrom_bins___lambda2, METH_O, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_18__get_chrom_bins___lambda2(PyObject *__pyx_self, PyObject *__pyx_v_tup) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda2 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda2(__pyx_self, ((PyObject *)__pyx_v_tup));

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

static PyObject *__pyx_lambda_funcdef_lambda2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tup) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("lambda2", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_tup, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("parabam.chaser.Handler.__get_chrom_bins__.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":178
 *         return tasks
 * 
 *     def __get_chrom_bins__(self,parent_bam):             # <<<<<<<<<<<<<<
 *         # Create chromosome `bins` by grouping together smaller chromosomes
 * 
 */

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_8__get_chrom_bins__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_parent_bam) {
  PyObject *__pyx_v_references = NULL;
  PyObject *__pyx_v_lengths = NULL;
  PyObject *__pyx_v_chrom_bins = NULL;
  PyObject *__pyx_v_chrom_info = NULL;
  PyObject *__pyx_v_group = NULL;
  PyObject *__pyx_v_size = NULL;
  PyObject *__pyx_v_uid = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_length = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_t_11;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  __Pyx_RefNannySetupContext("__get_chrom_bins__", 0);

  /* "parabam/chaser.pyx":181
 *         # Create chromosome `bins` by grouping together smaller chromosomes
 * 
 *         references = parent_bam.references             # <<<<<<<<<<<<<<
 *         lengths = parent_bam.lengths
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parent_bam, __pyx_n_s_references); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_references = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":182
 * 
 *         references = parent_bam.references
 *         lengths = parent_bam.lengths             # <<<<<<<<<<<<<<
 * 
 *         chrom_bins = {}
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parent_bam, __pyx_n_s_lengths); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_lengths = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":184
 *         lengths = parent_bam.lengths
 * 
 *         chrom_bins = {}             # <<<<<<<<<<<<<<
 *         chrom_info = zip(xrange(len(references)),references,lengths)
 *         chrom_info = sorted(chrom_info, key=lambda tup: tup[2])
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_chrom_bins = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":185
 * 
 *         chrom_bins = {}
 *         chrom_info = zip(xrange(len(references)),references,lengths)             # <<<<<<<<<<<<<<
 *         chrom_info = sorted(chrom_info, key=lambda tup: tup[2])
 *         group = []
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_zip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_Length(__pyx_v_references); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 185, __pyx_L1_error)
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_xrange, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_5, __pyx_v_references, __pyx_v_lengths};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_5, __pyx_v_references, __pyx_v_lengths};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_5);
    __Pyx_INCREF(__pyx_v_references);
    __Pyx_GIVEREF(__pyx_v_references);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_references);
    __Pyx_INCREF(__pyx_v_lengths);
    __Pyx_GIVEREF(__pyx_v_lengths);
    PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_v_lengths);
    __pyx_t_5 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_chrom_info = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":186
 *         chrom_bins = {}
 *         chrom_info = zip(xrange(len(references)),references,lengths)
 *         chrom_info = sorted(chrom_info, key=lambda tup: tup[2])             # <<<<<<<<<<<<<<
 *         group = []
 *         size = 0
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_chrom_info);
  __Pyx_GIVEREF(__pyx_v_chrom_info);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_chrom_info);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_18__get_chrom_bins___lambda2, 0, __pyx_n_s_Handler___get_chrom_bins___local, NULL, __pyx_n_s_parabam_chaser, __pyx_d, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_key, __pyx_t_7) < 0) __PYX_ERR(0, 186, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_sorted, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_chrom_info, __pyx_t_7);
  __pyx_t_7 = 0;

  /* "parabam/chaser.pyx":187
 *         chrom_info = zip(xrange(len(references)),references,lengths)
 *         chrom_info = sorted(chrom_info, key=lambda tup: tup[2])
 *         group = []             # <<<<<<<<<<<<<<
 *         size = 0
 *         uid = 0
 */
  __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_v_group = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "parabam/chaser.pyx":188
 *         chrom_info = sorted(chrom_info, key=lambda tup: tup[2])
 *         group = []
 *         size = 0             # <<<<<<<<<<<<<<
 *         uid = 0
 *         for i,name,length in chrom_info:
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_size = __pyx_int_0;

  /* "parabam/chaser.pyx":189
 *         group = []
 *         size = 0
 *         uid = 0             # <<<<<<<<<<<<<<
 *         for i,name,length in chrom_info:
 *            group.append( (i,name,length,) )
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_uid = __pyx_int_0;

  /* "parabam/chaser.pyx":190
 *         size = 0
 *         uid = 0
 *         for i,name,length in chrom_info:             # <<<<<<<<<<<<<<
 *            group.append( (i,name,length,) )
 *            size += length
 */
  if (likely(PyList_CheckExact(__pyx_v_chrom_info)) || PyTuple_CheckExact(__pyx_v_chrom_info)) {
    __pyx_t_7 = __pyx_v_chrom_info; __Pyx_INCREF(__pyx_t_7); __pyx_t_3 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_chrom_info); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 190, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_7))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_7)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 190, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 190, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_8(__pyx_t_7);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 190, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
      PyObject* sequence = __pyx_t_2;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 3)) {
        if (size > 3) __Pyx_RaiseTooManyValuesError(3);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 190, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); 
      } else {
        __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
        __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
      }
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      #else
      __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 190, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 190, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 190, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
      index = 0; __pyx_t_1 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_1);
      index = 1; __pyx_t_5 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      index = 2; __pyx_t_4 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 3) < 0) __PYX_ERR(0, 190, __pyx_L1_error)
      __pyx_t_10 = NULL;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_10 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 190, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
    __pyx_t_1 = 0;
    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "parabam/chaser.pyx":191
 *         uid = 0
 *         for i,name,length in chrom_info:
 *            group.append( (i,name,length,) )             # <<<<<<<<<<<<<<
 *            size += length
 * 
 */
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_i);
    __Pyx_GIVEREF(__pyx_v_i);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_i);
    __Pyx_INCREF(__pyx_v_name);
    __Pyx_GIVEREF(__pyx_v_name);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_name);
    __Pyx_INCREF(__pyx_v_length);
    __Pyx_GIVEREF(__pyx_v_length);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_length);
    __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_group, __pyx_t_2); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 191, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "parabam/chaser.pyx":192
 *         for i,name,length in chrom_info:
 *            group.append( (i,name,length,) )
 *            size += length             # <<<<<<<<<<<<<<
 * 
 *            if size > 150000000:
 */
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_size, __pyx_v_length); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_size, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "parabam/chaser.pyx":194
 *            size += length
 * 
 *            if size > 150000000:             # <<<<<<<<<<<<<<
 *                 for i,name,length in group:
 *                     chrom_bins[i] = "b%d" % (uid,)
 */
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_size, __pyx_int_150000000, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error)
    __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 194, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_12) {

      /* "parabam/chaser.pyx":195
 * 
 *            if size > 150000000:
 *                 for i,name,length in group:             # <<<<<<<<<<<<<<
 *                     chrom_bins[i] = "b%d" % (uid,)
 *                 group = []
 */
      __pyx_t_2 = __pyx_v_group; __Pyx_INCREF(__pyx_t_2); __pyx_t_13 = 0;
      for (;;) {
        if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_13); __Pyx_INCREF(__pyx_t_4); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 195, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 195, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
        if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
          PyObject* sequence = __pyx_t_4;
          Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
          if (unlikely(size != 3)) {
            if (size > 3) __Pyx_RaiseTooManyValuesError(3);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            __PYX_ERR(0, 195, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
            __pyx_t_9 = PyTuple_GET_ITEM(sequence, 2); 
          } else {
            __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_9 = PyList_GET_ITEM(sequence, 2); 
          }
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_9);
          #else
          __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 195, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_9 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 195, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_14 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 195, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_10 = Py_TYPE(__pyx_t_14)->tp_iternext;
          index = 0; __pyx_t_5 = __pyx_t_10(__pyx_t_14); if (unlikely(!__pyx_t_5)) goto __pyx_L10_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_5);
          index = 1; __pyx_t_1 = __pyx_t_10(__pyx_t_14); if (unlikely(!__pyx_t_1)) goto __pyx_L10_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_1);
          index = 2; __pyx_t_9 = __pyx_t_10(__pyx_t_14); if (unlikely(!__pyx_t_9)) goto __pyx_L10_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_9);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_14), 3) < 0) __PYX_ERR(0, 195, __pyx_L1_error)
          __pyx_t_10 = NULL;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          goto __pyx_L11_unpacking_done;
          __pyx_L10_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __pyx_t_10 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(0, 195, __pyx_L1_error)
          __pyx_L11_unpacking_done:;
        }
        __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_5);
        __pyx_t_5 = 0;
        __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1);
        __pyx_t_1 = 0;
        __Pyx_DECREF_SET(__pyx_v_length, __pyx_t_9);
        __pyx_t_9 = 0;

        /* "parabam/chaser.pyx":196
 *            if size > 150000000:
 *                 for i,name,length in group:
 *                     chrom_bins[i] = "b%d" % (uid,)             # <<<<<<<<<<<<<<
 *                 group = []
 *                 size = 0
 */
        __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 196, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_v_uid);
        __Pyx_GIVEREF(__pyx_v_uid);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_uid);
        __pyx_t_9 = __Pyx_PyString_Format(__pyx_kp_s_b_d, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 196, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(PyDict_SetItem(__pyx_v_chrom_bins, __pyx_v_i, __pyx_t_9) < 0)) __PYX_ERR(0, 196, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "parabam/chaser.pyx":195
 * 
 *            if size > 150000000:
 *                 for i,name,length in group:             # <<<<<<<<<<<<<<
 *                     chrom_bins[i] = "b%d" % (uid,)
 *                 group = []
 */
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "parabam/chaser.pyx":197
 *                 for i,name,length in group:
 *                     chrom_bins[i] = "b%d" % (uid,)
 *                 group = []             # <<<<<<<<<<<<<<
 *                 size = 0
 *                 uid += 1
 */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 197, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_group, ((PyObject*)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "parabam/chaser.pyx":198
 *                     chrom_bins[i] = "b%d" % (uid,)
 *                 group = []
 *                 size = 0             # <<<<<<<<<<<<<<
 *                 uid += 1
 *         return chrom_bins
 */
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_DECREF_SET(__pyx_v_size, __pyx_int_0);

      /* "parabam/chaser.pyx":199
 *                 group = []
 *                 size = 0
 *                 uid += 1             # <<<<<<<<<<<<<<
 *         return chrom_bins
 * 
 */
      __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_uid, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_uid, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "parabam/chaser.pyx":194
 *            size += length
 * 
 *            if size > 150000000:             # <<<<<<<<<<<<<<
 *                 for i,name,length in group:
 *                     chrom_bins[i] = "b%d" % (uid,)
 */
    }

    /* "parabam/chaser.pyx":190
 *         size = 0
 *         uid = 0
 *         for i,name,length in chrom_info:             # <<<<<<<<<<<<<<
 *            group.append( (i,name,length,) )
 *            size += length
 */
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "parabam/chaser.pyx":200
 *                 size = 0
 *                 uid += 1
 *         return chrom_bins             # <<<<<<<<<<<<<<
 * 
 *     def __instalise_primary_store__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_chrom_bins);
  __pyx_r = __pyx_v_chrom_bins;
  goto __pyx_L0;

  /* "parabam/chaser.pyx":178
 *         return tasks
 * 
 *     def __get_chrom_bins__(self,parent_bam):             # <<<<<<<<<<<<<<
 *         # Create chromosome `bins` by grouping together smaller chromosomes
 * 
 */

  /* 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_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("parabam.chaser.Handler.__get_chrom_bins__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_references);
  __Pyx_XDECREF(__pyx_v_lengths);
  __Pyx_XDECREF(__pyx_v_chrom_bins);
  __Pyx_XDECREF(__pyx_v_chrom_info);
  __Pyx_XDECREF(__pyx_v_group);
  __Pyx_XDECREF(__pyx_v_size);
  __Pyx_XDECREF(__pyx_v_uid);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_length);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":202
 *         return chrom_bins
 * 
 *     def __instalise_primary_store__(self):             # <<<<<<<<<<<<<<
 *         return []
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_11__instalise_primary_store__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_11__instalise_primary_store__ = {"__instalise_primary_store__", (PyCFunction)__pyx_pw_7parabam_6chaser_7Handler_11__instalise_primary_store__, METH_O, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_11__instalise_primary_store__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__instalise_primary_store__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_10__instalise_primary_store__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_10__instalise_primary_store__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__instalise_primary_store__", 0);

  /* "parabam/chaser.pyx":203
 * 
 *     def __instalise_primary_store__(self):
 *         return []             # <<<<<<<<<<<<<<
 * 
 *     def __instalise_loner_pyramid__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "parabam/chaser.pyx":202
 *         return chrom_bins
 * 
 *     def __instalise_primary_store__(self):             # <<<<<<<<<<<<<<
 *         return []
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("parabam.chaser.Handler.__instalise_primary_store__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":205
 *         return []
 * 
 *     def __instalise_loner_pyramid__(self):             # <<<<<<<<<<<<<<
 *         return {}
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_13__instalise_loner_pyramid__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_13__instalise_loner_pyramid__ = {"__instalise_loner_pyramid__", (PyCFunction)__pyx_pw_7parabam_6chaser_7Handler_13__instalise_loner_pyramid__, METH_O, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_13__instalise_loner_pyramid__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__instalise_loner_pyramid__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_12__instalise_loner_pyramid__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_12__instalise_loner_pyramid__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__instalise_loner_pyramid__", 0);

  /* "parabam/chaser.pyx":206
 * 
 *     def __instalise_loner_pyramid__(self):
 *         return {}             # <<<<<<<<<<<<<<
 * 
 *     def __update_tasks__(self,active_tasks):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "parabam/chaser.pyx":205
 *         return []
 * 
 *     def __instalise_loner_pyramid__(self):             # <<<<<<<<<<<<<<
 *         return {}
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("parabam.chaser.Handler.__instalise_loner_pyramid__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":208
 *         return {}
 * 
 *     def __update_tasks__(self,active_tasks):             # <<<<<<<<<<<<<<
 *         terminated_procs = []
 *         for pr in active_tasks:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_15__update_tasks__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_15__update_tasks__ = {"__update_tasks__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_7Handler_15__update_tasks__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_15__update_tasks__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_active_tasks = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__update_tasks__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_active_tasks,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_active_tasks)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__update_tasks__", 1, 2, 2, 1); __PYX_ERR(0, 208, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__update_tasks__") < 0)) __PYX_ERR(0, 208, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_active_tasks = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__update_tasks__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 208, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.Handler.__update_tasks__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_14__update_tasks__(__pyx_self, __pyx_v_self, __pyx_v_active_tasks);

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_14__update_tasks__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_active_tasks) {
  PyObject *__pyx_v_terminated_procs = NULL;
  PyObject *__pyx_v_pr = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  __Pyx_RefNannySetupContext("__update_tasks__", 0);

  /* "parabam/chaser.pyx":209
 * 
 *     def __update_tasks__(self,active_tasks):
 *         terminated_procs = []             # <<<<<<<<<<<<<<
 *         for pr in active_tasks:
 *             if not pr.is_alive():
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_terminated_procs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":210
 *     def __update_tasks__(self,active_tasks):
 *         terminated_procs = []
 *         for pr in active_tasks:             # <<<<<<<<<<<<<<
 *             if not pr.is_alive():
 *                 pr.terminate()
 */
  if (likely(PyList_CheckExact(__pyx_v_active_tasks)) || PyTuple_CheckExact(__pyx_v_active_tasks)) {
    __pyx_t_1 = __pyx_v_active_tasks; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_active_tasks); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 210, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 210, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 210, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 210, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 210, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 210, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_pr, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "parabam/chaser.pyx":211
 *         terminated_procs = []
 *         for pr in active_tasks:
 *             if not pr.is_alive():             # <<<<<<<<<<<<<<
 *                 pr.terminate()
 *                 terminated_procs.append(pr)
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_pr, __pyx_n_s_is_alive); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 211, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_8 = ((!__pyx_t_7) != 0);
    if (__pyx_t_8) {

      /* "parabam/chaser.pyx":212
 *         for pr in active_tasks:
 *             if not pr.is_alive():
 *                 pr.terminate()             # <<<<<<<<<<<<<<
 *                 terminated_procs.append(pr)
 * 
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_pr, __pyx_n_s_terminate); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 212, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 212, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "parabam/chaser.pyx":213
 *             if not pr.is_alive():
 *                 pr.terminate()
 *                 terminated_procs.append(pr)             # <<<<<<<<<<<<<<
 * 
 *         for pr in terminated_procs:
 */
      __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_terminated_procs, __pyx_v_pr); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 213, __pyx_L1_error)

      /* "parabam/chaser.pyx":211
 *         terminated_procs = []
 *         for pr in active_tasks:
 *             if not pr.is_alive():             # <<<<<<<<<<<<<<
 *                 pr.terminate()
 *                 terminated_procs.append(pr)
 */
    }

    /* "parabam/chaser.pyx":210
 *     def __update_tasks__(self,active_tasks):
 *         terminated_procs = []
 *         for pr in active_tasks:             # <<<<<<<<<<<<<<
 *             if not pr.is_alive():
 *                 pr.terminate()
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":215
 *                 terminated_procs.append(pr)
 * 
 *         for pr in terminated_procs:             # <<<<<<<<<<<<<<
 *             active_tasks.remove(pr)
 * 
 */
  __pyx_t_1 = __pyx_v_terminated_procs; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 215, __pyx_L1_error)
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 215, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_pr, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "parabam/chaser.pyx":216
 * 
 *         for pr in terminated_procs:
 *             active_tasks.remove(pr)             # <<<<<<<<<<<<<<
 * 
 *         if len(terminated_procs) > 0:
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_active_tasks, __pyx_n_s_remove); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 216, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_pr) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_pr);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 216, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "parabam/chaser.pyx":215
 *                 terminated_procs.append(pr)
 * 
 *         for pr in terminated_procs:             # <<<<<<<<<<<<<<
 *             active_tasks.remove(pr)
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":218
 *             active_tasks.remove(pr)
 * 
 *         if len(terminated_procs) > 0:             # <<<<<<<<<<<<<<
 *             #Only invoked the GC if there is the possibility of
 *             #collecting any memory.
 */
  __pyx_t_2 = PyList_GET_SIZE(__pyx_v_terminated_procs); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 218, __pyx_L1_error)
  __pyx_t_8 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_8) {

    /* "parabam/chaser.pyx":221
 *             #Only invoked the GC if there is the possibility of
 *             #collecting any memory.
 *             del terminated_procs             # <<<<<<<<<<<<<<
 *             gc.collect()
 * 
 */
    __Pyx_DECREF(__pyx_v_terminated_procs);
    __pyx_v_terminated_procs = NULL;

    /* "parabam/chaser.pyx":222
 *             #collecting any memory.
 *             del terminated_procs
 *             gc.collect()             # <<<<<<<<<<<<<<
 * 
 *         return len(active_tasks)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_gc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 222, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_collect); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 222, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":218
 *             active_tasks.remove(pr)
 * 
 *         if len(terminated_procs) > 0:             # <<<<<<<<<<<<<<
 *             #Only invoked the GC if there is the possibility of
 *             #collecting any memory.
 */
  }

  /* "parabam/chaser.pyx":224
 *             gc.collect()
 * 
 *         return len(active_tasks)             # <<<<<<<<<<<<<<
 * 
 *     def __new_package_action__(self,new_package,**kwargs):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyObject_Length(__pyx_v_active_tasks); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 224, __pyx_L1_error)
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "parabam/chaser.pyx":208
 *         return {}
 * 
 *     def __update_tasks__(self,active_tasks):             # <<<<<<<<<<<<<<
 *         terminated_procs = []
 *         for pr in active_tasks:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("parabam.chaser.Handler.__update_tasks__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_terminated_procs);
  __Pyx_XDECREF(__pyx_v_pr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":226
 *         return len(active_tasks)
 * 
 *     def __new_package_action__(self,new_package,**kwargs):             # <<<<<<<<<<<<<<
 *         chaser_type = new_package.chaser_type
 *         if chaser_type == "origin":
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_17__new_package_action__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_17__new_package_action__ = {"__new_package_action__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_7Handler_17__new_package_action__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_17__new_package_action__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_new_package = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new_package_action__ (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_new_package,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_new_package)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__new_package_action__", 1, 2, 2, 1); __PYX_ERR(0, 226, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__new_package_action__") < 0)) __PYX_ERR(0, 226, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_new_package = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new_package_action__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 226, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("parabam.chaser.Handler.__new_package_action__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_16__new_package_action__(__pyx_self, __pyx_v_self, __pyx_v_new_package, __pyx_v_kwargs);

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_16__new_package_action__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_new_package, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_chaser_type = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("__new_package_action__", 0);

  /* "parabam/chaser.pyx":227
 * 
 *     def __new_package_action__(self,new_package,**kwargs):
 *         chaser_type = new_package.chaser_type             # <<<<<<<<<<<<<<
 *         if chaser_type == "origin":
 *             self.__handle_origin_task__(new_package)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_package, __pyx_n_s_chaser_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_chaser_type = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":228
 *     def __new_package_action__(self,new_package,**kwargs):
 *         chaser_type = new_package.chaser_type
 *         if chaser_type == "origin":             # <<<<<<<<<<<<<<
 *             self.__handle_origin_task__(new_package)
 *         elif chaser_type == "match_maker":
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_chaser_type, __pyx_n_s_origin, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 228, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "parabam/chaser.pyx":229
 *         chaser_type = new_package.chaser_type
 *         if chaser_type == "origin":
 *             self.__handle_origin_task__(new_package)             # <<<<<<<<<<<<<<
 *         elif chaser_type == "match_maker":
 *             self.__handle_match_maker__(new_package)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_handle_origin_task); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_new_package) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_new_package);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":228
 *     def __new_package_action__(self,new_package,**kwargs):
 *         chaser_type = new_package.chaser_type
 *         if chaser_type == "origin":             # <<<<<<<<<<<<<<
 *             self.__handle_origin_task__(new_package)
 *         elif chaser_type == "match_maker":
 */
    goto __pyx_L3;
  }

  /* "parabam/chaser.pyx":230
 *         if chaser_type == "origin":
 *             self.__handle_origin_task__(new_package)
 *         elif chaser_type == "match_maker":             # <<<<<<<<<<<<<<
 *             self.__handle_match_maker__(new_package)
 *             self._pending_jobs -= 1
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_chaser_type, __pyx_n_s_match_maker, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 230, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "parabam/chaser.pyx":231
 *             self.__handle_origin_task__(new_package)
 *         elif chaser_type == "match_maker":
 *             self.__handle_match_maker__(new_package)             # <<<<<<<<<<<<<<
 *             self._pending_jobs -= 1
 *         elif chaser_type == "primary":
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_handle_match_maker); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_new_package) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_new_package);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":232
 *         elif chaser_type == "match_maker":
 *             self.__handle_match_maker__(new_package)
 *             self._pending_jobs -= 1             # <<<<<<<<<<<<<<
 *         elif chaser_type == "primary":
 *             self.__handle_primary_task__(new_package)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pending_jobs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 232, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_pending_jobs, __pyx_t_3) < 0) __PYX_ERR(0, 232, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "parabam/chaser.pyx":230
 *         if chaser_type == "origin":
 *             self.__handle_origin_task__(new_package)
 *         elif chaser_type == "match_maker":             # <<<<<<<<<<<<<<
 *             self.__handle_match_maker__(new_package)
 *             self._pending_jobs -= 1
 */
    goto __pyx_L3;
  }

  /* "parabam/chaser.pyx":233
 *             self.__handle_match_maker__(new_package)
 *             self._pending_jobs -= 1
 *         elif chaser_type == "primary":             # <<<<<<<<<<<<<<
 *             self.__handle_primary_task__(new_package)
 *             self._pending_jobs -= 1
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_chaser_type, __pyx_n_s_primary, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 233, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "parabam/chaser.pyx":234
 *             self._pending_jobs -= 1
 *         elif chaser_type == "primary":
 *             self.__handle_primary_task__(new_package)             # <<<<<<<<<<<<<<
 *             self._pending_jobs -= 1
 *         else:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_handle_primary_task); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_v_new_package) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_new_package);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 234, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "parabam/chaser.pyx":235
 *         elif chaser_type == "primary":
 *             self.__handle_primary_task__(new_package)
 *             self._pending_jobs -= 1             # <<<<<<<<<<<<<<
 *         else:
 *             print "Error!"
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pending_jobs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 235, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_t_3, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_pending_jobs, __pyx_t_1) < 0) __PYX_ERR(0, 235, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":233
 *             self.__handle_match_maker__(new_package)
 *             self._pending_jobs -= 1
 *         elif chaser_type == "primary":             # <<<<<<<<<<<<<<
 *             self.__handle_primary_task__(new_package)
 *             self._pending_jobs -= 1
 */
    goto __pyx_L3;
  }

  /* "parabam/chaser.pyx":237
 *             self._pending_jobs -= 1
 *         else:
 *             print "Error!"             # <<<<<<<<<<<<<<
 * 
 *     def __handle_origin_task__(self,new_package):
 */
  /*else*/ {
    if (__Pyx_PrintOne(0, __pyx_kp_s_Error) < 0) __PYX_ERR(0, 237, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "parabam/chaser.pyx":226
 *         return len(active_tasks)
 * 
 *     def __new_package_action__(self,new_package,**kwargs):             # <<<<<<<<<<<<<<
 *         chaser_type = new_package.chaser_type
 *         if chaser_type == "origin":
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("parabam.chaser.Handler.__new_package_action__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_chaser_type);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":239
 *             print "Error!"
 * 
 *     def __handle_origin_task__(self,new_package):             # <<<<<<<<<<<<<<
 *         for loner_count,path in new_package.results:
 *             if loner_count == 0:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_19__handle_origin_task__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_19__handle_origin_task__ = {"__handle_origin_task__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_7Handler_19__handle_origin_task__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_19__handle_origin_task__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_new_package = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__handle_origin_task__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_new_package,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_new_package)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__handle_origin_task__", 1, 2, 2, 1); __PYX_ERR(0, 239, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__handle_origin_task__") < 0)) __PYX_ERR(0, 239, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_new_package = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__handle_origin_task__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 239, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.Handler.__handle_origin_task__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_18__handle_origin_task__(__pyx_self, __pyx_v_self, __pyx_v_new_package);

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_18__handle_origin_task__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_new_package) {
  PyObject *__pyx_v_loner_count = NULL;
  PyObject *__pyx_v_path = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_t_9;
  int __pyx_t_10;
  __Pyx_RefNannySetupContext("__handle_origin_task__", 0);

  /* "parabam/chaser.pyx":240
 * 
 *     def __handle_origin_task__(self,new_package):
 *         for loner_count,path in new_package.results:             # <<<<<<<<<<<<<<
 *             if loner_count == 0:
 *                 os.remove(path)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_package, __pyx_n_s_results); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 240, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 240, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 240, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 240, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 240, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 240, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      #else
      __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 240, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 240, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 240, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
      index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 240, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 240, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_loner_count, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_path, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "parabam/chaser.pyx":241
 *     def __handle_origin_task__(self,new_package):
 *         for loner_count,path in new_package.results:
 *             if loner_count == 0:             # <<<<<<<<<<<<<<
 *                 os.remove(path)
 *             else:
 */
    __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_loner_count, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 241, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_9) {

      /* "parabam/chaser.pyx":242
 *         for loner_count,path in new_package.results:
 *             if loner_count == 0:
 *                 os.remove(path)             # <<<<<<<<<<<<<<
 *             else:
 *                 self._total_loners += loner_count
 */
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_os); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 242, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_remove); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 242, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_path) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_path);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 242, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "parabam/chaser.pyx":241
 *     def __handle_origin_task__(self,new_package):
 *         for loner_count,path in new_package.results:
 *             if loner_count == 0:             # <<<<<<<<<<<<<<
 *                 os.remove(path)
 *             else:
 */
      goto __pyx_L7;
    }

    /* "parabam/chaser.pyx":244
 *                 os.remove(path)
 *             else:
 *                 self._total_loners += loner_count             # <<<<<<<<<<<<<<
 *                 self._primary_store.append(path)
 * 
 */
    /*else*/ {
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_total_loners); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_v_loner_count); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 244, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_total_loners, __pyx_t_5) < 0) __PYX_ERR(0, 244, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "parabam/chaser.pyx":245
 *             else:
 *                 self._total_loners += loner_count
 *                 self._primary_store.append(path)             # <<<<<<<<<<<<<<
 * 
 *     def __handle_match_maker__(self,new_package):
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_primary_store); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 245, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_10 = __Pyx_PyObject_Append(__pyx_t_5, __pyx_v_path); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 245, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __pyx_L7:;

    /* "parabam/chaser.pyx":240
 * 
 *     def __handle_origin_task__(self,new_package):
 *         for loner_count,path in new_package.results:             # <<<<<<<<<<<<<<
 *             if loner_count == 0:
 *                 os.remove(path)
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "parabam/chaser.pyx":239
 *             print "Error!"
 * 
 *     def __handle_origin_task__(self,new_package):             # <<<<<<<<<<<<<<
 *         for loner_count,path in new_package.results:
 *             if loner_count == 0:
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("parabam.chaser.Handler.__handle_origin_task__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_loner_count);
  __Pyx_XDECREF(__pyx_v_path);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":247
 *                 self._primary_store.append(path)
 * 
 *     def __handle_match_maker__(self,new_package):             # <<<<<<<<<<<<<<
 *         loner_type = new_package.loner_type
 *         level = new_package.level
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_21__handle_match_maker__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_21__handle_match_maker__ = {"__handle_match_maker__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_7Handler_21__handle_match_maker__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_21__handle_match_maker__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_new_package = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__handle_match_maker__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_new_package,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_new_package)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__handle_match_maker__", 1, 2, 2, 1); __PYX_ERR(0, 247, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__handle_match_maker__") < 0)) __PYX_ERR(0, 247, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_new_package = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__handle_match_maker__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 247, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.Handler.__handle_match_maker__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_20__handle_match_maker__(__pyx_self, __pyx_v_self, __pyx_v_new_package);

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_20__handle_match_maker__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_new_package) {
  PyObject *__pyx_v_loner_type = NULL;
  PyObject *__pyx_v_level = NULL;
  PyObject *__pyx_v_loner_level = NULL;
  PyObject *__pyx_v_loner_path = NULL;
  PyObject *__pyx_v_pyramid = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  int __pyx_t_15;
  __Pyx_RefNannySetupContext("__handle_match_maker__", 0);

  /* "parabam/chaser.pyx":248
 * 
 *     def __handle_match_maker__(self,new_package):
 *         loner_type = new_package.loner_type             # <<<<<<<<<<<<<<
 *         level = new_package.level
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_package, __pyx_n_s_loner_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_loner_type = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":249
 *     def __handle_match_maker__(self,new_package):
 *         loner_type = new_package.loner_type
 *         level = new_package.level             # <<<<<<<<<<<<<<
 * 
 *         if loner_type == "NP":
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_package, __pyx_n_s_level); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_level = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":251
 *         level = new_package.level
 * 
 *         if loner_type == "NP":             # <<<<<<<<<<<<<<
 *             self._rescued["total"] += new_package.rescued
 *             self._rescued["unpaired"] += new_package.rescued
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_loner_type, __pyx_n_s_NP, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 251, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "parabam/chaser.pyx":252
 * 
 *         if loner_type == "NP":
 *             self._rescued["total"] += new_package.rescued             # <<<<<<<<<<<<<<
 *             self._rescued["unpaired"] += new_package.rescued
 *             for loner_level, loner_path in new_package.results:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rescued_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_total);
    __pyx_t_3 = __pyx_n_s_total;
    __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_package, __pyx_n_s_rescued); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 252, __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;
    if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_t_3, __pyx_t_6) < 0)) __PYX_ERR(0, 252, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":253
 *         if loner_type == "NP":
 *             self._rescued["total"] += new_package.rescued
 *             self._rescued["unpaired"] += new_package.rescued             # <<<<<<<<<<<<<<
 *             for loner_level, loner_path in new_package.results:
 *                 os.remove(loner_path)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rescued_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_unpaired);
    __pyx_t_3 = __pyx_n_s_unpaired;
    __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_package, __pyx_n_s_rescued); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_t_3, __pyx_t_4) < 0)) __PYX_ERR(0, 253, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":254
 *             self._rescued["total"] += new_package.rescued
 *             self._rescued["unpaired"] += new_package.rescued
 *             for loner_level, loner_path in new_package.results:             # <<<<<<<<<<<<<<
 *                 os.remove(loner_path)
 *         else:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_package, __pyx_n_s_results); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
      __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 254, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 254, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      if (likely(!__pyx_t_8)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 254, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 254, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 254, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 254, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_8(__pyx_t_4);
        if (unlikely(!__pyx_t_1)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 254, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
        PyObject* sequence = __pyx_t_1;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 254, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        #else
        __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 254, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 254, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 254, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
        index = 0; __pyx_t_5 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_5);
        index = 1; __pyx_t_6 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_6);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 254, __pyx_L1_error)
        __pyx_t_10 = NULL;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L7_unpacking_done;
        __pyx_L6_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_10 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 254, __pyx_L1_error)
        __pyx_L7_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_loner_level, __pyx_t_5);
      __pyx_t_5 = 0;
      __Pyx_XDECREF_SET(__pyx_v_loner_path, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "parabam/chaser.pyx":255
 *             self._rescued["unpaired"] += new_package.rescued
 *             for loner_level, loner_path in new_package.results:
 *                 os.remove(loner_path)             # <<<<<<<<<<<<<<
 *         else:
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_os); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 255, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_remove); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 255, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_loner_path) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_loner_path);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 255, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "parabam/chaser.pyx":254
 *             self._rescued["total"] += new_package.rescued
 *             self._rescued["unpaired"] += new_package.rescued
 *             for loner_level, loner_path in new_package.results:             # <<<<<<<<<<<<<<
 *                 os.remove(loner_path)
 *         else:
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "parabam/chaser.pyx":251
 *         level = new_package.level
 * 
 *         if loner_type == "NP":             # <<<<<<<<<<<<<<
 *             self._rescued["total"] += new_package.rescued
 *             self._rescued["unpaired"] += new_package.rescued
 */
    goto __pyx_L3;
  }

  /* "parabam/chaser.pyx":259
 * 
 *             #this number is by pairs to get read num we times 2
 *             self._rescued["total"] += (new_package.rescued*2)             # <<<<<<<<<<<<<<
 *             if new_package.results: #This ensures that there are leftover loners
 *                 self._pyramid_idle_counts[loner_type] = 0
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rescued_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_n_s_total);
    __pyx_t_3 = __pyx_n_s_total;
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_package, __pyx_n_s_rescued); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyNumber_Multiply(__pyx_t_5, __pyx_int_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_t_3, __pyx_t_5) < 0)) __PYX_ERR(0, 259, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "parabam/chaser.pyx":260
 *             #this number is by pairs to get read num we times 2
 *             self._rescued["total"] += (new_package.rescued*2)
 *             if new_package.results: #This ensures that there are leftover loners             # <<<<<<<<<<<<<<
 *                 self._pyramid_idle_counts[loner_type] = 0
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_package, __pyx_n_s_results); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 260, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_2) {

      /* "parabam/chaser.pyx":261
 *             self._rescued["total"] += (new_package.rescued*2)
 *             if new_package.results: #This ensures that there are leftover loners
 *                 self._pyramid_idle_counts[loner_type] = 0             # <<<<<<<<<<<<<<
 * 
 *                 try:
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pyramid_idle_counts); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 261, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_v_loner_type, __pyx_int_0) < 0)) __PYX_ERR(0, 261, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "parabam/chaser.pyx":263
 *                 self._pyramid_idle_counts[loner_type] = 0
 * 
 *                 try:             # <<<<<<<<<<<<<<
 *                     pyramid = self._loner_pyramid[loner_type]
 *                 except KeyError:
 */
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_13);
        /*try:*/ {

          /* "parabam/chaser.pyx":264
 * 
 *                 try:
 *                     pyramid = self._loner_pyramid[loner_type]             # <<<<<<<<<<<<<<
 *                 except KeyError:
 *                     self._loner_pyramid[loner_type] = [[]]
 */
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_loner_pyramid); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 264, __pyx_L9_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_loner_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 264, __pyx_L9_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_v_pyramid = __pyx_t_5;
          __pyx_t_5 = 0;

          /* "parabam/chaser.pyx":263
 *                 self._pyramid_idle_counts[loner_type] = 0
 * 
 *                 try:             # <<<<<<<<<<<<<<
 *                     pyramid = self._loner_pyramid[loner_type]
 *                 except KeyError:
 */
        }
        __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;
        goto __pyx_L14_try_end;
        __pyx_L9_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "parabam/chaser.pyx":265
 *                 try:
 *                     pyramid = self._loner_pyramid[loner_type]
 *                 except KeyError:             # <<<<<<<<<<<<<<
 *                     self._loner_pyramid[loner_type] = [[]]
 *                     pyramid = self._loner_pyramid[loner_type]
 */
        __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
        if (__pyx_t_14) {
          __Pyx_AddTraceback("parabam.chaser.Handler.__handle_match_maker__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(0, 265, __pyx_L11_except_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_GOTREF(__pyx_t_6);

          /* "parabam/chaser.pyx":266
 *                     pyramid = self._loner_pyramid[loner_type]
 *                 except KeyError:
 *                     self._loner_pyramid[loner_type] = [[]]             # <<<<<<<<<<<<<<
 *                     pyramid = self._loner_pyramid[loner_type]
 * 
 */
          __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 266, __pyx_L11_except_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 266, __pyx_L11_except_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_GIVEREF(__pyx_t_1);
          PyList_SET_ITEM(__pyx_t_9, 0, __pyx_t_1);
          __pyx_t_1 = 0;
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_loner_pyramid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 266, __pyx_L11_except_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_loner_type, __pyx_t_9) < 0)) __PYX_ERR(0, 266, __pyx_L11_except_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

          /* "parabam/chaser.pyx":267
 *                 except KeyError:
 *                     self._loner_pyramid[loner_type] = [[]]
 *                     pyramid = self._loner_pyramid[loner_type]             # <<<<<<<<<<<<<<
 * 
 *                 if len(pyramid) >= level:
 */
          __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_loner_pyramid); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 267, __pyx_L11_except_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_9, __pyx_v_loner_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L11_except_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_XDECREF_SET(__pyx_v_pyramid, __pyx_t_1);
          __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          goto __pyx_L10_exception_handled;
        }
        goto __pyx_L11_except_error;
        __pyx_L11_except_error:;

        /* "parabam/chaser.pyx":263
 *                 self._pyramid_idle_counts[loner_type] = 0
 * 
 *                 try:             # <<<<<<<<<<<<<<
 *                     pyramid = self._loner_pyramid[loner_type]
 *                 except KeyError:
 */
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_XGIVEREF(__pyx_t_12);
        __Pyx_XGIVEREF(__pyx_t_13);
        __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
        goto __pyx_L1_error;
        __pyx_L10_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_XGIVEREF(__pyx_t_12);
        __Pyx_XGIVEREF(__pyx_t_13);
        __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
        __pyx_L14_try_end:;
      }

      /* "parabam/chaser.pyx":269
 *                     pyramid = self._loner_pyramid[loner_type]
 * 
 *                 if len(pyramid) >= level:             # <<<<<<<<<<<<<<
 *                     pyramid.append([])
 * 
 */
      __pyx_t_7 = PyObject_Length(__pyx_v_pyramid); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 269, __pyx_L1_error)
      __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 269, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_v_level, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 269, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 269, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_2) {

        /* "parabam/chaser.pyx":270
 * 
 *                 if len(pyramid) >= level:
 *                     pyramid.append([])             # <<<<<<<<<<<<<<
 * 
 *                 for loner_level,loner_path in new_package.results:
 */
        __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 270, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_15 = __Pyx_PyObject_Append(__pyx_v_pyramid, __pyx_t_4); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 270, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "parabam/chaser.pyx":269
 *                     pyramid = self._loner_pyramid[loner_type]
 * 
 *                 if len(pyramid) >= level:             # <<<<<<<<<<<<<<
 *                     pyramid.append([])
 * 
 */
      }

      /* "parabam/chaser.pyx":272
 *                     pyramid.append([])
 * 
 *                 for loner_level,loner_path in new_package.results:             # <<<<<<<<<<<<<<
 *                     self.__add_to_pyramid__(loner_type,loner_level,loner_path)
 * 
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_package, __pyx_n_s_results); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 272, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
        __pyx_t_6 = __pyx_t_4; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0;
        __pyx_t_8 = NULL;
      } else {
        __pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 272, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_8 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 272, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      for (;;) {
        if (likely(!__pyx_t_8)) {
          if (likely(PyList_CheckExact(__pyx_t_6))) {
            if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_6)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 272, __pyx_L1_error)
            #else
            __pyx_t_4 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 272, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          } else {
            if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 272, __pyx_L1_error)
            #else
            __pyx_t_4 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 272, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          }
        } else {
          __pyx_t_4 = __pyx_t_8(__pyx_t_6);
          if (unlikely(!__pyx_t_4)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 272, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_4);
        }
        if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
          PyObject* sequence = __pyx_t_4;
          Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
          if (unlikely(size != 2)) {
            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            __PYX_ERR(0, 272, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
          } else {
            __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
          }
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_1);
          #else
          __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 272, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 272, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
          index = 0; __pyx_t_5 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_5)) goto __pyx_L20_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_5);
          index = 1; __pyx_t_1 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_1)) goto __pyx_L20_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_1);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 272, __pyx_L1_error)
          __pyx_t_10 = NULL;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          goto __pyx_L21_unpacking_done;
          __pyx_L20_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __pyx_t_10 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(0, 272, __pyx_L1_error)
          __pyx_L21_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_v_loner_level, __pyx_t_5);
        __pyx_t_5 = 0;
        __Pyx_XDECREF_SET(__pyx_v_loner_path, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "parabam/chaser.pyx":273
 * 
 *                 for loner_level,loner_path in new_package.results:
 *                     self.__add_to_pyramid__(loner_type,loner_level,loner_path)             # <<<<<<<<<<<<<<
 * 
 *             if self._destroy: #TODO:should this move to new_package_action?
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_add_to_pyramid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_5 = NULL;
        __pyx_t_14 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
            __pyx_t_14 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_1)) {
          PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_loner_type, __pyx_v_loner_level, __pyx_v_loner_path};
          __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 3+__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 273, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_4);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
          PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_loner_type, __pyx_v_loner_level, __pyx_v_loner_path};
          __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 3+__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 273, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_4);
        } else
        #endif
        {
          __pyx_t_9 = PyTuple_New(3+__pyx_t_14); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 273, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          if (__pyx_t_5) {
            __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5); __pyx_t_5 = NULL;
          }
          __Pyx_INCREF(__pyx_v_loner_type);
          __Pyx_GIVEREF(__pyx_v_loner_type);
          PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_14, __pyx_v_loner_type);
          __Pyx_INCREF(__pyx_v_loner_level);
          __Pyx_GIVEREF(__pyx_v_loner_level);
          PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_14, __pyx_v_loner_level);
          __Pyx_INCREF(__pyx_v_loner_path);
          __Pyx_GIVEREF(__pyx_v_loner_path);
          PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_14, __pyx_v_loner_path);
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 273, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "parabam/chaser.pyx":272
 *                     pyramid.append([])
 * 
 *                 for loner_level,loner_path in new_package.results:             # <<<<<<<<<<<<<<
 *                     self.__add_to_pyramid__(loner_type,loner_level,loner_path)
 * 
 */
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "parabam/chaser.pyx":260
 *             #this number is by pairs to get read num we times 2
 *             self._rescued["total"] += (new_package.rescued*2)
 *             if new_package.results: #This ensures that there are leftover loners             # <<<<<<<<<<<<<<
 *                 self._pyramid_idle_counts[loner_type] = 0
 * 
 */
    }

    /* "parabam/chaser.pyx":275
 *                     self.__add_to_pyramid__(loner_type,loner_level,loner_path)
 * 
 *             if self._destroy: #TODO:should this move to new_package_action?             # <<<<<<<<<<<<<<
 *                 self._stale_count += 1
 * 
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_destroy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 275, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 275, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_2) {

      /* "parabam/chaser.pyx":276
 * 
 *             if self._destroy: #TODO:should this move to new_package_action?
 *                 self._stale_count += 1             # <<<<<<<<<<<<<<
 * 
 *     def __handle_primary_task__(self,new_package):
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stale_count); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 276, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_6, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 276, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stale_count, __pyx_t_4) < 0) __PYX_ERR(0, 276, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "parabam/chaser.pyx":275
 *                     self.__add_to_pyramid__(loner_type,loner_level,loner_path)
 * 
 *             if self._destroy: #TODO:should this move to new_package_action?             # <<<<<<<<<<<<<<
 *                 self._stale_count += 1
 * 
 */
    }
  }
  __pyx_L3:;

  /* "parabam/chaser.pyx":247
 *                 self._primary_store.append(path)
 * 
 *     def __handle_match_maker__(self,new_package):             # <<<<<<<<<<<<<<
 *         loner_type = new_package.loner_type
 *         level = new_package.level
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("parabam.chaser.Handler.__handle_match_maker__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_loner_type);
  __Pyx_XDECREF(__pyx_v_level);
  __Pyx_XDECREF(__pyx_v_loner_level);
  __Pyx_XDECREF(__pyx_v_loner_path);
  __Pyx_XDECREF(__pyx_v_pyramid);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":278
 *                 self._stale_count += 1
 * 
 *     def __handle_primary_task__(self,new_package):             # <<<<<<<<<<<<<<
 *         for match_package in new_package.results:
 *             self.__handle_match_maker__(match_package)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_23__handle_primary_task__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_23__handle_primary_task__ = {"__handle_primary_task__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_7Handler_23__handle_primary_task__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_23__handle_primary_task__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_new_package = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__handle_primary_task__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_new_package,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_new_package)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__handle_primary_task__", 1, 2, 2, 1); __PYX_ERR(0, 278, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__handle_primary_task__") < 0)) __PYX_ERR(0, 278, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_new_package = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__handle_primary_task__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 278, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.Handler.__handle_primary_task__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_22__handle_primary_task__(__pyx_self, __pyx_v_self, __pyx_v_new_package);

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_22__handle_primary_task__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_new_package) {
  PyObject *__pyx_v_match_package = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__handle_primary_task__", 0);

  /* "parabam/chaser.pyx":279
 * 
 *     def __handle_primary_task__(self,new_package):
 *         for match_package in new_package.results:             # <<<<<<<<<<<<<<
 *             self.__handle_match_maker__(match_package)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_package, __pyx_n_s_results); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 279, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 279, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 279, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 279, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 279, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 279, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_match_package, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":280
 *     def __handle_primary_task__(self,new_package):
 *         for match_package in new_package.results:
 *             self.__handle_match_maker__(match_package)             # <<<<<<<<<<<<<<
 * 
 *     def __test_primary_tasks__(self,required_paths=10):
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_handle_match_maker); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_match_package) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_match_package);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":279
 * 
 *     def __handle_primary_task__(self,new_package):
 *         for match_package in new_package.results:             # <<<<<<<<<<<<<<
 *             self.__handle_match_maker__(match_package)
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "parabam/chaser.pyx":278
 *                 self._stale_count += 1
 * 
 *     def __handle_primary_task__(self,new_package):             # <<<<<<<<<<<<<<
 *         for match_package in new_package.results:
 *             self.__handle_match_maker__(match_package)
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("parabam.chaser.Handler.__handle_primary_task__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_match_package);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":282
 *             self.__handle_match_maker__(match_package)
 * 
 *     def __test_primary_tasks__(self,required_paths=10):             # <<<<<<<<<<<<<<
 *         task_sent = False
 *         if len(self._primary_store) >= required_paths:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_25__test_primary_tasks__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_25__test_primary_tasks__ = {"__test_primary_tasks__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_7Handler_25__test_primary_tasks__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_25__test_primary_tasks__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_required_paths = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__test_primary_tasks__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_required_paths,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject *)__pyx_int_10));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_required_paths);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__test_primary_tasks__") < 0)) __PYX_ERR(0, 282, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_required_paths = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__test_primary_tasks__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 282, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.Handler.__test_primary_tasks__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_24__test_primary_tasks__(__pyx_self, __pyx_v_self, __pyx_v_required_paths);

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_24__test_primary_tasks__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_required_paths) {
  int __pyx_v_task_sent;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("__test_primary_tasks__", 0);

  /* "parabam/chaser.pyx":283
 * 
 *     def __test_primary_tasks__(self,required_paths=10):
 *         task_sent = False             # <<<<<<<<<<<<<<
 *         if len(self._primary_store) >= required_paths:
 *             self.__start_primary_task__()
 */
  __pyx_v_task_sent = 0;

  /* "parabam/chaser.pyx":284
 *     def __test_primary_tasks__(self,required_paths=10):
 *         task_sent = False
 *         if len(self._primary_store) >= required_paths:             # <<<<<<<<<<<<<<
 *             self.__start_primary_task__()
 *             task_sent = True
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_primary_store); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_v_required_paths, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "parabam/chaser.pyx":285
 *         task_sent = False
 *         if len(self._primary_store) >= required_paths:
 *             self.__start_primary_task__()             # <<<<<<<<<<<<<<
 *             task_sent = True
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_start_primary_task); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "parabam/chaser.pyx":286
 *         if len(self._primary_store) >= required_paths:
 *             self.__start_primary_task__()
 *             task_sent = True             # <<<<<<<<<<<<<<
 * 
 *         if task_sent:
 */
    __pyx_v_task_sent = 1;

    /* "parabam/chaser.pyx":284
 *     def __test_primary_tasks__(self,required_paths=10):
 *         task_sent = False
 *         if len(self._primary_store) >= required_paths:             # <<<<<<<<<<<<<<
 *             self.__start_primary_task__()
 *             task_sent = True
 */
  }

  /* "parabam/chaser.pyx":288
 *             task_sent = True
 * 
 *         if task_sent:             # <<<<<<<<<<<<<<
 *             self._primary_store = []
 *             gc.collect()
 */
  __pyx_t_4 = (__pyx_v_task_sent != 0);
  if (__pyx_t_4) {

    /* "parabam/chaser.pyx":289
 * 
 *         if task_sent:
 *             self._primary_store = []             # <<<<<<<<<<<<<<
 *             gc.collect()
 *             time.sleep(1)
 */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_primary_store, __pyx_t_3) < 0) __PYX_ERR(0, 289, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "parabam/chaser.pyx":290
 *         if task_sent:
 *             self._primary_store = []
 *             gc.collect()             # <<<<<<<<<<<<<<
 *             time.sleep(1)
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_gc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 290, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_collect); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 290, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 290, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "parabam/chaser.pyx":291
 *             self._primary_store = []
 *             gc.collect()
 *             time.sleep(1)             # <<<<<<<<<<<<<<
 * 
 *     def __start_primary_task__(self):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_time); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_sleep); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_int_1) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_int_1);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "parabam/chaser.pyx":288
 *             task_sent = True
 * 
 *         if task_sent:             # <<<<<<<<<<<<<<
 *             self._primary_store = []
 *             gc.collect()
 */
  }

  /* "parabam/chaser.pyx":282
 *             self.__handle_match_maker__(match_package)
 * 
 *     def __test_primary_tasks__(self,required_paths=10):             # <<<<<<<<<<<<<<
 *         task_sent = False
 *         if len(self._primary_store) >= required_paths:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("parabam.chaser.Handler.__test_primary_tasks__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":293
 *             time.sleep(1)
 * 
 *     def __start_primary_task__(self):             # <<<<<<<<<<<<<<
 *         self.__start_job__(self._primary_store,"Primary",-1)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_27__start_primary_task__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_27__start_primary_task__ = {"__start_primary_task__", (PyCFunction)__pyx_pw_7parabam_6chaser_7Handler_27__start_primary_task__, METH_O, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_27__start_primary_task__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__start_primary_task__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_26__start_primary_task__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_26__start_primary_task__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__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;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__start_primary_task__", 0);

  /* "parabam/chaser.pyx":294
 * 
 *     def __start_primary_task__(self):
 *         self.__start_job__(self._primary_store,"Primary",-1)             # <<<<<<<<<<<<<<
 * 
 *     def __start_matchmaker_task__(self,paths,loner_type,level):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_start_job); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_primary_store); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_n_s_Primary, __pyx_int_neg_1};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 294, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_n_s_Primary, __pyx_int_neg_1};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 294, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 294, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
    __Pyx_INCREF(__pyx_n_s_Primary);
    __Pyx_GIVEREF(__pyx_n_s_Primary);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_n_s_Primary);
    __Pyx_INCREF(__pyx_int_neg_1);
    __Pyx_GIVEREF(__pyx_int_neg_1);
    PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_int_neg_1);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 294, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":293
 *             time.sleep(1)
 * 
 *     def __start_primary_task__(self):             # <<<<<<<<<<<<<<
 *         self.__start_job__(self._primary_store,"Primary",-1)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("parabam.chaser.Handler.__start_primary_task__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":296
 *         self.__start_job__(self._primary_store,"Primary",-1)
 * 
 *     def __start_matchmaker_task__(self,paths,loner_type,level):             # <<<<<<<<<<<<<<
 *         self.__start_job__(paths,loner_type,level)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_29__start_matchmaker_task__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_29__start_matchmaker_task__ = {"__start_matchmaker_task__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_7Handler_29__start_matchmaker_task__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_29__start_matchmaker_task__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_paths = 0;
  PyObject *__pyx_v_loner_type = 0;
  PyObject *__pyx_v_level = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__start_matchmaker_task__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_paths,&__pyx_n_s_loner_type,&__pyx_n_s_level,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_paths)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__start_matchmaker_task__", 1, 4, 4, 1); __PYX_ERR(0, 296, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loner_type)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__start_matchmaker_task__", 1, 4, 4, 2); __PYX_ERR(0, 296, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_level)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__start_matchmaker_task__", 1, 4, 4, 3); __PYX_ERR(0, 296, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__start_matchmaker_task__") < 0)) __PYX_ERR(0, 296, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_self = values[0];
    __pyx_v_paths = values[1];
    __pyx_v_loner_type = values[2];
    __pyx_v_level = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__start_matchmaker_task__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 296, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.Handler.__start_matchmaker_task__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_28__start_matchmaker_task__(__pyx_self, __pyx_v_self, __pyx_v_paths, __pyx_v_loner_type, __pyx_v_level);

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_28__start_matchmaker_task__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_paths, PyObject *__pyx_v_loner_type, PyObject *__pyx_v_level) {
  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;
  __Pyx_RefNannySetupContext("__start_matchmaker_task__", 0);

  /* "parabam/chaser.pyx":297
 * 
 *     def __start_matchmaker_task__(self,paths,loner_type,level):
 *         self.__start_job__(paths,loner_type,level)             # <<<<<<<<<<<<<<
 * 
 *     def __start_job__(self,paths,loner_type,level):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_start_job); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_paths, __pyx_v_loner_type, __pyx_v_level};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 297, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_paths, __pyx_v_loner_type, __pyx_v_level};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 297, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_paths);
    __Pyx_GIVEREF(__pyx_v_paths);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_paths);
    __Pyx_INCREF(__pyx_v_loner_type);
    __Pyx_GIVEREF(__pyx_v_loner_type);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_loner_type);
    __Pyx_INCREF(__pyx_v_level);
    __Pyx_GIVEREF(__pyx_v_level);
    PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_level);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":296
 *         self.__start_job__(self._primary_store,"Primary",-1)
 * 
 *     def __start_matchmaker_task__(self,paths,loner_type,level):             # <<<<<<<<<<<<<<
 *         self.__start_job__(paths,loner_type,level)
 * 
 */

  /* 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_5);
  __Pyx_AddTraceback("parabam.chaser.Handler.__start_matchmaker_task__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":299
 *         self.__start_job__(paths,loner_type,level)
 * 
 *     def __start_job__(self,paths,loner_type,level):             # <<<<<<<<<<<<<<
 *         fragment_leftovers = self.__request_fragment_output__(paths)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_31__start_job__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_31__start_job__ = {"__start_job__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_7Handler_31__start_job__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_31__start_job__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_paths = 0;
  PyObject *__pyx_v_loner_type = 0;
  PyObject *__pyx_v_level = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__start_job__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_paths,&__pyx_n_s_loner_type,&__pyx_n_s_level,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_paths)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__start_job__", 1, 4, 4, 1); __PYX_ERR(0, 299, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loner_type)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__start_job__", 1, 4, 4, 2); __PYX_ERR(0, 299, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_level)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__start_job__", 1, 4, 4, 3); __PYX_ERR(0, 299, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__start_job__") < 0)) __PYX_ERR(0, 299, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_self = values[0];
    __pyx_v_paths = values[1];
    __pyx_v_loner_type = values[2];
    __pyx_v_level = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__start_job__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 299, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.Handler.__start_job__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_30__start_job__(__pyx_self, __pyx_v_self, __pyx_v_paths, __pyx_v_loner_type, __pyx_v_level);

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_30__start_job__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_paths, PyObject *__pyx_v_loner_type, PyObject *__pyx_v_level) {
  PyObject *__pyx_v_fragment_leftovers = NULL;
  PyObject *__pyx_v_job = 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;
  __Pyx_RefNannySetupContext("__start_job__", 0);

  /* "parabam/chaser.pyx":300
 * 
 *     def __start_job__(self,paths,loner_type,level):
 *         fragment_leftovers = self.__request_fragment_output__(paths)             # <<<<<<<<<<<<<<
 * 
 *         job = JobPackage(paths,loner_type,level,fragment_leftovers)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_request_fragment_output); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_paths) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_paths);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_fragment_leftovers = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":302
 *         fragment_leftovers = self.__request_fragment_output__(paths)
 * 
 *         job = JobPackage(paths,loner_type,level,fragment_leftovers)             # <<<<<<<<<<<<<<
 *         self._pending_jobs += 1
 *         self._chaser_qu.put(job)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_JobPackage); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_3, __pyx_v_paths, __pyx_v_loner_type, __pyx_v_level, __pyx_v_fragment_leftovers};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_3, __pyx_v_paths, __pyx_v_loner_type, __pyx_v_level, __pyx_v_fragment_leftovers};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(4+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 302, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_paths);
    __Pyx_GIVEREF(__pyx_v_paths);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_paths);
    __Pyx_INCREF(__pyx_v_loner_type);
    __Pyx_GIVEREF(__pyx_v_loner_type);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_loner_type);
    __Pyx_INCREF(__pyx_v_level);
    __Pyx_GIVEREF(__pyx_v_level);
    PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_level);
    __Pyx_INCREF(__pyx_v_fragment_leftovers);
    __Pyx_GIVEREF(__pyx_v_fragment_leftovers);
    PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_4, __pyx_v_fragment_leftovers);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_job = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":303
 * 
 *         job = JobPackage(paths,loner_type,level,fragment_leftovers)
 *         self._pending_jobs += 1             # <<<<<<<<<<<<<<
 *         self._chaser_qu.put(job)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pending_jobs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_pending_jobs, __pyx_t_2) < 0) __PYX_ERR(0, 303, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "parabam/chaser.pyx":304
 *         job = JobPackage(paths,loner_type,level,fragment_leftovers)
 *         self._pending_jobs += 1
 *         self._chaser_qu.put(job)             # <<<<<<<<<<<<<<
 * 
 *     def __request_fragment_output__(self,paths):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_chaser_qu); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_put); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_1, __pyx_v_job) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_job);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "parabam/chaser.pyx":299
 *         self.__start_job__(paths,loner_type,level)
 * 
 *     def __start_job__(self,paths,loner_type,level):             # <<<<<<<<<<<<<<
 *         fragment_leftovers = self.__request_fragment_output__(paths)
 * 
 */

  /* 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_5);
  __Pyx_AddTraceback("parabam.chaser.Handler.__start_job__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fragment_leftovers);
  __Pyx_XDECREF(__pyx_v_job);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":306
 *         self._chaser_qu.put(job)
 * 
 *     def __request_fragment_output__(self,paths):             # <<<<<<<<<<<<<<
 *         if self._destroy and self._stale_count > 10:
 *             has_large_file = any([ (os.path.getsize(path) / 100) \
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_33__request_fragment_output__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_33__request_fragment_output__ = {"__request_fragment_output__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_7Handler_33__request_fragment_output__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_33__request_fragment_output__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_paths = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__request_fragment_output__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_paths,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_paths)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__request_fragment_output__", 1, 2, 2, 1); __PYX_ERR(0, 306, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__request_fragment_output__") < 0)) __PYX_ERR(0, 306, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_paths = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__request_fragment_output__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 306, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.Handler.__request_fragment_output__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_32__request_fragment_output__(__pyx_self, __pyx_v_self, __pyx_v_paths);

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_32__request_fragment_output__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_paths) {
  PyObject *__pyx_v_has_large_file = NULL;
  PyObject *__pyx_v_path = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__request_fragment_output__", 0);

  /* "parabam/chaser.pyx":307
 * 
 *     def __request_fragment_output__(self,paths):
 *         if self._destroy and self._stale_count > 10:             # <<<<<<<<<<<<<<
 *             has_large_file = any([ (os.path.getsize(path) / 100) \
 *                                              > 1000000 for path in paths ])
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_destroy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 307, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stale_count); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_int_10, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 307, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 307, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "parabam/chaser.pyx":308
 *     def __request_fragment_output__(self,paths):
 *         if self._destroy and self._stale_count > 10:
 *             has_large_file = any([ (os.path.getsize(path) / 100) \             # <<<<<<<<<<<<<<
 *                                              > 1000000 for path in paths ])
 *             if has_large_file:
 */
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 308, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);

    /* "parabam/chaser.pyx":309
 *         if self._destroy and self._stale_count > 10:
 *             has_large_file = any([ (os.path.getsize(path) / 100) \
 *                                              > 1000000 for path in paths ])             # <<<<<<<<<<<<<<
 *             if has_large_file:
 *                 if self._stale_thresh < 250:
 */
    if (likely(PyList_CheckExact(__pyx_v_paths)) || PyTuple_CheckExact(__pyx_v_paths)) {
      __pyx_t_2 = __pyx_v_paths; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_paths); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 309, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 309, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_6)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 309, __pyx_L1_error)
          #else
          __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 309, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
        } else {
          if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 309, __pyx_L1_error)
          #else
          __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 309, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
        }
      } else {
        __pyx_t_7 = __pyx_t_6(__pyx_t_2);
        if (unlikely(!__pyx_t_7)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 309, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_7);
      }
      __Pyx_XDECREF_SET(__pyx_v_path, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "parabam/chaser.pyx":308
 *     def __request_fragment_output__(self,paths):
 *         if self._destroy and self._stale_count > 10:
 *             has_large_file = any([ (os.path.getsize(path) / 100) \             # <<<<<<<<<<<<<<
 *                                              > 1000000 for path in paths ])
 *             if has_large_file:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_os); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 308, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_path); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 308, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_getsize); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 308, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
        }
      }
      __pyx_t_7 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_v_path) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_path);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 308, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyNumber_Divide(__pyx_t_7, __pyx_int_100); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 308, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyObject_RichCompare(__pyx_t_8, __pyx_int_1000000, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 309, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 308, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "parabam/chaser.pyx":309
 *         if self._destroy and self._stale_count > 10:
 *             has_large_file = any([ (os.path.getsize(path) / 100) \
 *                                              > 1000000 for path in paths ])             # <<<<<<<<<<<<<<
 *             if has_large_file:
 *                 if self._stale_thresh < 250:
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "parabam/chaser.pyx":308
 *     def __request_fragment_output__(self,paths):
 *         if self._destroy and self._stale_count > 10:
 *             has_large_file = any([ (os.path.getsize(path) / 100) \             # <<<<<<<<<<<<<<
 *                                              > 1000000 for path in paths ])
 *             if has_large_file:
 */
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_any, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 308, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_has_large_file = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "parabam/chaser.pyx":310
 *             has_large_file = any([ (os.path.getsize(path) / 100) \
 *                                              > 1000000 for path in paths ])
 *             if has_large_file:             # <<<<<<<<<<<<<<
 *                 if self._stale_thresh < 250:
 *                     self._stale_thresh = 250
 */
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_has_large_file); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 310, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "parabam/chaser.pyx":311
 *                                              > 1000000 for path in paths ])
 *             if has_large_file:
 *                 if self._stale_thresh < 250:             # <<<<<<<<<<<<<<
 *                     self._stale_thresh = 250
 *                 return True
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stale_thresh); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 311, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_int_250, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 311, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 311, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_1) {

        /* "parabam/chaser.pyx":312
 *             if has_large_file:
 *                 if self._stale_thresh < 250:
 *                     self._stale_thresh = 250             # <<<<<<<<<<<<<<
 *                 return True
 *         return False
 */
        if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stale_thresh, __pyx_int_250) < 0) __PYX_ERR(0, 312, __pyx_L1_error)

        /* "parabam/chaser.pyx":311
 *                                              > 1000000 for path in paths ])
 *             if has_large_file:
 *                 if self._stale_thresh < 250:             # <<<<<<<<<<<<<<
 *                     self._stale_thresh = 250
 *                 return True
 */
      }

      /* "parabam/chaser.pyx":313
 *                 if self._stale_thresh < 250:
 *                     self._stale_thresh = 250
 *                 return True             # <<<<<<<<<<<<<<
 *         return False
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;

      /* "parabam/chaser.pyx":310
 *             has_large_file = any([ (os.path.getsize(path) / 100) \
 *                                              > 1000000 for path in paths ])
 *             if has_large_file:             # <<<<<<<<<<<<<<
 *                 if self._stale_thresh < 250:
 *                     self._stale_thresh = 250
 */
    }

    /* "parabam/chaser.pyx":307
 * 
 *     def __request_fragment_output__(self,paths):
 *         if self._destroy and self._stale_count > 10:             # <<<<<<<<<<<<<<
 *             has_large_file = any([ (os.path.getsize(path) / 100) \
 *                                              > 1000000 for path in paths ])
 */
  }

  /* "parabam/chaser.pyx":314
 *                     self._stale_thresh = 250
 *                 return True
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     def __pause_monitor__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "parabam/chaser.pyx":306
 *         self._chaser_qu.put(job)
 * 
 *     def __request_fragment_output__(self,paths):             # <<<<<<<<<<<<<<
 *         if self._destroy and self._stale_count > 10:
 *             has_large_file = any([ (os.path.getsize(path) / 100) \
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("parabam.chaser.Handler.__request_fragment_output__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_has_large_file);
  __Pyx_XDECREF(__pyx_v_path);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":316
 *         return False
 * 
 *     def __pause_monitor__(self):             # <<<<<<<<<<<<<<
 *         if not self._destroy:
 *             max_jobs = self._max_jobs
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_35__pause_monitor__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_35__pause_monitor__ = {"__pause_monitor__", (PyCFunction)__pyx_pw_7parabam_6chaser_7Handler_35__pause_monitor__, METH_O, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_35__pause_monitor__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pause_monitor__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_34__pause_monitor__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_34__pause_monitor__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_max_jobs = NULL;
  PyObject *__pyx_v_qu = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__pause_monitor__", 0);

  /* "parabam/chaser.pyx":317
 * 
 *     def __pause_monitor__(self):
 *         if not self._destroy:             # <<<<<<<<<<<<<<
 *             max_jobs = self._max_jobs
 *             if self._pending_jobs >= max_jobs and not self._file_readers_paused:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_destroy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 317, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((!__pyx_t_2) != 0);
  if (__pyx_t_3) {

    /* "parabam/chaser.pyx":318
 *     def __pause_monitor__(self):
 *         if not self._destroy:
 *             max_jobs = self._max_jobs             # <<<<<<<<<<<<<<
 *             if self._pending_jobs >= max_jobs and not self._file_readers_paused:
 *                 for qu in self._pause_qus:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_max_jobs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 318, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_max_jobs = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":319
 *         if not self._destroy:
 *             max_jobs = self._max_jobs
 *             if self._pending_jobs >= max_jobs and not self._file_readers_paused:             # <<<<<<<<<<<<<<
 *                 for qu in self._pause_qus:
 *                     self._pause_debug("Chaser || PAUSE SENT")
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pending_jobs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_v_max_jobs, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 319, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 319, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_file_readers_paused); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 319, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 319, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = ((!__pyx_t_2) != 0);
    __pyx_t_3 = __pyx_t_5;
    __pyx_L5_bool_binop_done:;
    if (__pyx_t_3) {

      /* "parabam/chaser.pyx":320
 *             max_jobs = self._max_jobs
 *             if self._pending_jobs >= max_jobs and not self._file_readers_paused:
 *                 for qu in self._pause_qus:             # <<<<<<<<<<<<<<
 *                     self._pause_debug("Chaser || PAUSE SENT")
 *                     qu.put(1) #pause
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pause_qus_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 320, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
        __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0;
        __pyx_t_7 = NULL;
      } else {
        __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 320, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      for (;;) {
        if (likely(!__pyx_t_7)) {
          if (likely(PyList_CheckExact(__pyx_t_1))) {
            if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 320, __pyx_L1_error)
            #else
            __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 320, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          } else {
            if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 320, __pyx_L1_error)
            #else
            __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 320, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          }
        } else {
          __pyx_t_4 = __pyx_t_7(__pyx_t_1);
          if (unlikely(!__pyx_t_4)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 320, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_4);
        }
        __Pyx_XDECREF_SET(__pyx_v_qu, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "parabam/chaser.pyx":321
 *             if self._pending_jobs >= max_jobs and not self._file_readers_paused:
 *                 for qu in self._pause_qus:
 *                     self._pause_debug("Chaser || PAUSE SENT")             # <<<<<<<<<<<<<<
 *                     qu.put(1) #pause
 *                     self.__wait_for_ack__(qu)
 */
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pause_debug); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 321, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
          }
        }
        __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_kp_s_Chaser_PAUSE_SENT) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_kp_s_Chaser_PAUSE_SENT);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 321, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "parabam/chaser.pyx":322
 *                 for qu in self._pause_qus:
 *                     self._pause_debug("Chaser || PAUSE SENT")
 *                     qu.put(1) #pause             # <<<<<<<<<<<<<<
 *                     self.__wait_for_ack__(qu)
 *                 self._file_readers_paused = True
 */
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_qu, __pyx_n_s_put); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 322, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
          }
        }
        __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_int_1) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_int_1);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 322, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "parabam/chaser.pyx":323
 *                     self._pause_debug("Chaser || PAUSE SENT")
 *                     qu.put(1) #pause
 *                     self.__wait_for_ack__(qu)             # <<<<<<<<<<<<<<
 *                 self._file_readers_paused = True
 * 
 */
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wait_for_ack); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 323, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
          }
        }
        __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_v_qu) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_qu);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 323, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "parabam/chaser.pyx":320
 *             max_jobs = self._max_jobs
 *             if self._pending_jobs >= max_jobs and not self._file_readers_paused:
 *                 for qu in self._pause_qus:             # <<<<<<<<<<<<<<
 *                     self._pause_debug("Chaser || PAUSE SENT")
 *                     qu.put(1) #pause
 */
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "parabam/chaser.pyx":324
 *                     qu.put(1) #pause
 *                     self.__wait_for_ack__(qu)
 *                 self._file_readers_paused = True             # <<<<<<<<<<<<<<
 * 
 *             elif self._pending_jobs < max_jobs and self._file_readers_paused:
 */
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_file_readers_paused, Py_True) < 0) __PYX_ERR(0, 324, __pyx_L1_error)

      /* "parabam/chaser.pyx":319
 *         if not self._destroy:
 *             max_jobs = self._max_jobs
 *             if self._pending_jobs >= max_jobs and not self._file_readers_paused:             # <<<<<<<<<<<<<<
 *                 for qu in self._pause_qus:
 *                     self._pause_debug("Chaser || PAUSE SENT")
 */
      goto __pyx_L4;
    }

    /* "parabam/chaser.pyx":326
 *                 self._file_readers_paused = True
 * 
 *             elif self._pending_jobs < max_jobs and self._file_readers_paused:             # <<<<<<<<<<<<<<
 *                 for qu in self._pause_qus:
 *                     self._pause_debug("Chaser || UNPAUSE SENT")
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pending_jobs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_v_max_jobs, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 326, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 326, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L9_bool_binop_done;
    }
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_file_readers_paused); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 326, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 326, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_3 = __pyx_t_5;
    __pyx_L9_bool_binop_done:;
    if (__pyx_t_3) {

      /* "parabam/chaser.pyx":327
 * 
 *             elif self._pending_jobs < max_jobs and self._file_readers_paused:
 *                 for qu in self._pause_qus:             # <<<<<<<<<<<<<<
 *                     self._pause_debug("Chaser || UNPAUSE SENT")
 *                     qu.put(0) #unpause
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pause_qus_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 327, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
        __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0;
        __pyx_t_7 = NULL;
      } else {
        __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 327, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 327, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      for (;;) {
        if (likely(!__pyx_t_7)) {
          if (likely(PyList_CheckExact(__pyx_t_1))) {
            if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 327, __pyx_L1_error)
            #else
            __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 327, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          } else {
            if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 327, __pyx_L1_error)
            #else
            __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 327, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          }
        } else {
          __pyx_t_4 = __pyx_t_7(__pyx_t_1);
          if (unlikely(!__pyx_t_4)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 327, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_4);
        }
        __Pyx_XDECREF_SET(__pyx_v_qu, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "parabam/chaser.pyx":328
 *             elif self._pending_jobs < max_jobs and self._file_readers_paused:
 *                 for qu in self._pause_qus:
 *                     self._pause_debug("Chaser || UNPAUSE SENT")             # <<<<<<<<<<<<<<
 *                     qu.put(0) #unpause
 *                     self.__wait_for_ack__(qu)
 */
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pause_debug); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 328, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
          }
        }
        __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_kp_s_Chaser_UNPAUSE_SENT) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_kp_s_Chaser_UNPAUSE_SENT);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 328, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "parabam/chaser.pyx":329
 *                 for qu in self._pause_qus:
 *                     self._pause_debug("Chaser || UNPAUSE SENT")
 *                     qu.put(0) #unpause             # <<<<<<<<<<<<<<
 *                     self.__wait_for_ack__(qu)
 *                 self._file_readers_paused = False
 */
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_qu, __pyx_n_s_put); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 329, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
          }
        }
        __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_int_0);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 329, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "parabam/chaser.pyx":330
 *                     self._pause_debug("Chaser || UNPAUSE SENT")
 *                     qu.put(0) #unpause
 *                     self.__wait_for_ack__(qu)             # <<<<<<<<<<<<<<
 *                 self._file_readers_paused = False
 * 
 */
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wait_for_ack); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 330, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
          }
        }
        __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_v_qu) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_qu);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 330, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "parabam/chaser.pyx":327
 * 
 *             elif self._pending_jobs < max_jobs and self._file_readers_paused:
 *                 for qu in self._pause_qus:             # <<<<<<<<<<<<<<
 *                     self._pause_debug("Chaser || UNPAUSE SENT")
 *                     qu.put(0) #unpause
 */
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "parabam/chaser.pyx":331
 *                     qu.put(0) #unpause
 *                     self.__wait_for_ack__(qu)
 *                 self._file_readers_paused = False             # <<<<<<<<<<<<<<
 * 
 *     def __wait_for_ack__(self, qu):
 */
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_file_readers_paused, Py_False) < 0) __PYX_ERR(0, 331, __pyx_L1_error)

      /* "parabam/chaser.pyx":326
 *                 self._file_readers_paused = True
 * 
 *             elif self._pending_jobs < max_jobs and self._file_readers_paused:             # <<<<<<<<<<<<<<
 *                 for qu in self._pause_qus:
 *                     self._pause_debug("Chaser || UNPAUSE SENT")
 */
    }
    __pyx_L4:;

    /* "parabam/chaser.pyx":317
 * 
 *     def __pause_monitor__(self):
 *         if not self._destroy:             # <<<<<<<<<<<<<<
 *             max_jobs = self._max_jobs
 *             if self._pending_jobs >= max_jobs and not self._file_readers_paused:
 */
  }

  /* "parabam/chaser.pyx":316
 *         return False
 * 
 *     def __pause_monitor__(self):             # <<<<<<<<<<<<<<
 *         if not self._destroy:
 *             max_jobs = self._max_jobs
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("parabam.chaser.Handler.__pause_monitor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_max_jobs);
  __Pyx_XDECREF(__pyx_v_qu);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":333
 *                 self._file_readers_paused = False
 * 
 *     def __wait_for_ack__(self, qu):             # <<<<<<<<<<<<<<
 *         self._pause_debug("Chaser || WAITNG FOR ACK")
 *         boomerang_count = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_37__wait_for_ack__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_37__wait_for_ack__ = {"__wait_for_ack__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_7Handler_37__wait_for_ack__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_37__wait_for_ack__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_qu = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__wait_for_ack__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_qu,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qu)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__wait_for_ack__", 1, 2, 2, 1); __PYX_ERR(0, 333, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__wait_for_ack__") < 0)) __PYX_ERR(0, 333, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_qu = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__wait_for_ack__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 333, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.Handler.__wait_for_ack__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_36__wait_for_ack__(__pyx_self, __pyx_v_self, __pyx_v_qu);

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_36__wait_for_ack__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_qu) {
  PyObject *__pyx_v_boomerang_count = NULL;
  PyObject *__pyx_v_ack = 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;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  __Pyx_RefNannySetupContext("__wait_for_ack__", 0);

  /* "parabam/chaser.pyx":334
 * 
 *     def __wait_for_ack__(self, qu):
 *         self._pause_debug("Chaser || WAITNG FOR ACK")             # <<<<<<<<<<<<<<
 *         boomerang_count = 0
 *         while True:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pause_debug); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Chaser_WAITNG_FOR_ACK) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Chaser_WAITNG_FOR_ACK);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":335
 *     def __wait_for_ack__(self, qu):
 *         self._pause_debug("Chaser || WAITNG FOR ACK")
 *         boomerang_count = 0             # <<<<<<<<<<<<<<
 *         while True:
 *             try:
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_boomerang_count = __pyx_int_0;

  /* "parabam/chaser.pyx":336
 *         self._pause_debug("Chaser || WAITNG FOR ACK")
 *         boomerang_count = 0
 *         while True:             # <<<<<<<<<<<<<<
 *             try:
 *                 ack = qu.get(False)
 */
  while (1) {

    /* "parabam/chaser.pyx":337
 *         boomerang_count = 0
 *         while True:
 *             try:             # <<<<<<<<<<<<<<
 *                 ack = qu.get(False)
 *                 if ack == 2:
 */
    {
      __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:*/ {

        /* "parabam/chaser.pyx":338
 *         while True:
 *             try:
 *                 ack = qu.get(False)             # <<<<<<<<<<<<<<
 *                 if ack == 2:
 *                     self._pause_debug("Chaser || RECEIVED ACK")
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_qu, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 338, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
          }
        }
        __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, Py_False) : __Pyx_PyObject_CallOneArg(__pyx_t_2, Py_False);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 338, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF_SET(__pyx_v_ack, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "parabam/chaser.pyx":339
 *             try:
 *                 ack = qu.get(False)
 *                 if ack == 2:             # <<<<<<<<<<<<<<
 *                     self._pause_debug("Chaser || RECEIVED ACK")
 *                     return
 */
        __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_ack, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 339, __pyx_L5_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (__pyx_t_7) {

          /* "parabam/chaser.pyx":340
 *                 ack = qu.get(False)
 *                 if ack == 2:
 *                     self._pause_debug("Chaser || RECEIVED ACK")             # <<<<<<<<<<<<<<
 *                     return
 *                 else:
 */
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pause_debug); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 340, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_3 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
            __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
            if (likely(__pyx_t_3)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_2, function);
            }
          }
          __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Chaser_RECEIVED_ACK) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Chaser_RECEIVED_ACK);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "parabam/chaser.pyx":341
 *                 if ack == 2:
 *                     self._pause_debug("Chaser || RECEIVED ACK")
 *                     return             # <<<<<<<<<<<<<<
 *                 else:
 *                     self._pause_debug("Chaser || (UN)PAUSE BOOMERANG")
 */
          __Pyx_XDECREF(__pyx_r);
          __pyx_r = Py_None; __Pyx_INCREF(Py_None);
          goto __pyx_L9_try_return;

          /* "parabam/chaser.pyx":339
 *             try:
 *                 ack = qu.get(False)
 *                 if ack == 2:             # <<<<<<<<<<<<<<
 *                     self._pause_debug("Chaser || RECEIVED ACK")
 *                     return
 */
        }

        /* "parabam/chaser.pyx":343
 *                     return
 *                 else:
 *                     self._pause_debug("Chaser || (UN)PAUSE BOOMERANG")             # <<<<<<<<<<<<<<
 *                     boomerang_count += 1
 *                     qu.put(ack)
 */
        /*else*/ {
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pause_debug); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 343, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_3 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
            __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
            if (likely(__pyx_t_3)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_2, function);
            }
          }
          __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Chaser_UN_PAUSE_BOOMERANG) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Chaser_UN_PAUSE_BOOMERANG);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 343, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "parabam/chaser.pyx":344
 *                 else:
 *                     self._pause_debug("Chaser || (UN)PAUSE BOOMERANG")
 *                     boomerang_count += 1             # <<<<<<<<<<<<<<
 *                     qu.put(ack)
 *                     time.sleep(3)
 */
          __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_boomerang_count, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 344, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF_SET(__pyx_v_boomerang_count, __pyx_t_1);
          __pyx_t_1 = 0;

          /* "parabam/chaser.pyx":345
 *                     self._pause_debug("Chaser || (UN)PAUSE BOOMERANG")
 *                     boomerang_count += 1
 *                     qu.put(ack)             # <<<<<<<<<<<<<<
 *                     time.sleep(3)
 * 
 */
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_qu, __pyx_n_s_put); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 345, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_3 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
            __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
            if (likely(__pyx_t_3)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_2, function);
            }
          }
          __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_ack) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_ack);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 345, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "parabam/chaser.pyx":346
 *                     boomerang_count += 1
 *                     qu.put(ack)
 *                     time.sleep(3)             # <<<<<<<<<<<<<<
 * 
 *                     if boomerang_count >= 20:
 */
          __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 346, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sleep); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 346, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = NULL;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
            __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
            if (likely(__pyx_t_2)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_2);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_3, function);
            }
          }
          __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_int_3) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_3);
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "parabam/chaser.pyx":348
 *                     time.sleep(3)
 * 
 *                     if boomerang_count >= 20:             # <<<<<<<<<<<<<<
 *                         self.__fatal_check__()
 *                         break
 */
          __pyx_t_1 = PyObject_RichCompare(__pyx_v_boomerang_count, __pyx_int_20, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 348, __pyx_L5_error)
          __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 348, __pyx_L5_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (__pyx_t_7) {

            /* "parabam/chaser.pyx":349
 * 
 *                     if boomerang_count >= 20:
 *                         self.__fatal_check__()             # <<<<<<<<<<<<<<
 *                         break
 *             except Queue2.Empty:
 */
            __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fatal_check); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 349, __pyx_L5_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_2 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
              __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
              if (likely(__pyx_t_2)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                __Pyx_INCREF(__pyx_t_2);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_3, function);
              }
            }
            __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 349, __pyx_L5_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

            /* "parabam/chaser.pyx":350
 *                     if boomerang_count >= 20:
 *                         self.__fatal_check__()
 *                         break             # <<<<<<<<<<<<<<
 *             except Queue2.Empty:
 *                 time.sleep(2)
 */
            goto __pyx_L10_try_break;

            /* "parabam/chaser.pyx":348
 *                     time.sleep(3)
 * 
 *                     if boomerang_count >= 20:             # <<<<<<<<<<<<<<
 *                         self.__fatal_check__()
 *                         break
 */
          }
        }

        /* "parabam/chaser.pyx":337
 *         boomerang_count = 0
 *         while True:
 *             try:             # <<<<<<<<<<<<<<
 *                 ack = qu.get(False)
 *                 if ack == 2:
 */
      }
      __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_L12_try_end;
      __pyx_L5_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "parabam/chaser.pyx":351
 *                         self.__fatal_check__()
 *                         break
 *             except Queue2.Empty:             # <<<<<<<<<<<<<<
 *                 time.sleep(2)
 * 
 */
      __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_3, &__pyx_t_2);
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_Queue2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 351, __pyx_L7_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_Empty); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 351, __pyx_L7_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_10 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_9);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_ErrRestore(__pyx_t_1, __pyx_t_3, __pyx_t_2);
      __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_2 = 0;
      if (__pyx_t_10) {
        __Pyx_AddTraceback("parabam.chaser.Handler.__wait_for_ack__", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_1) < 0) __PYX_ERR(0, 351, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GOTREF(__pyx_t_1);

        /* "parabam/chaser.pyx":352
 *                         break
 *             except Queue2.Empty:
 *                 time.sleep(2)             # <<<<<<<<<<<<<<
 * 
 *     def __fatal_check__(self):
 */
        __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_time); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 352, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_sleep); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 352, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_11);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_11, function);
          }
        }
        __pyx_t_9 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_8, __pyx_int_2) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_int_2);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 352, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L6_exception_handled;
      }
      goto __pyx_L7_except_error;
      __pyx_L7_except_error:;

      /* "parabam/chaser.pyx":337
 *         boomerang_count = 0
 *         while True:
 *             try:             # <<<<<<<<<<<<<<
 *                 ack = qu.get(False)
 *                 if ack == 2:
 */
      __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_L10_try_break:;
      __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_L4_break;
      __pyx_L9_try_return:;
      __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_L0;
      __pyx_L6_exception_handled:;
      __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);
      __pyx_L12_try_end:;
    }
  }
  __pyx_L4_break:;

  /* "parabam/chaser.pyx":333
 *                 self._file_readers_paused = False
 * 
 *     def __wait_for_ack__(self, qu):             # <<<<<<<<<<<<<<
 *         self._pause_debug("Chaser || WAITNG FOR ACK")
 *         boomerang_count = 0
 */

  /* 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_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("parabam.chaser.Handler.__wait_for_ack__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_boomerang_count);
  __Pyx_XDECREF(__pyx_v_ack);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":354
 *                 time.sleep(2)
 * 
 *     def __fatal_check__(self):             # <<<<<<<<<<<<<<
 *         collected_packs = []
 *         destroy_found = False
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_39__fatal_check__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_39__fatal_check__ = {"__fatal_check__", (PyCFunction)__pyx_pw_7parabam_6chaser_7Handler_39__fatal_check__, METH_O, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_39__fatal_check__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__fatal_check__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_38__fatal_check__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_38__fatal_check__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_collected_packs = NULL;
  int __pyx_v_destroy_found;
  PyObject *__pyx_v_package = NULL;
  PyObject *__pyx_v_pack = 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;
  int __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  __Pyx_RefNannySetupContext("__fatal_check__", 0);

  /* "parabam/chaser.pyx":355
 * 
 *     def __fatal_check__(self):
 *         collected_packs = []             # <<<<<<<<<<<<<<
 *         destroy_found = False
 *         while True:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_collected_packs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":356
 *     def __fatal_check__(self):
 *         collected_packs = []
 *         destroy_found = False             # <<<<<<<<<<<<<<
 *         while True:
 *             try:
 */
  __pyx_v_destroy_found = 0;

  /* "parabam/chaser.pyx":357
 *         collected_packs = []
 *         destroy_found = False
 *         while True:             # <<<<<<<<<<<<<<
 *             try:
 *                 package = self._inqu.get(False)
 */
  while (1) {

    /* "parabam/chaser.pyx":358
 *         destroy_found = False
 *         while True:
 *             try:             # <<<<<<<<<<<<<<
 *                 package = self._inqu.get(False)
 *                 if type(package) == DestroyPackage:
 */
    {
      __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:*/ {

        /* "parabam/chaser.pyx":359
 *         while True:
 *             try:
 *                 package = self._inqu.get(False)             # <<<<<<<<<<<<<<
 *                 if type(package) == DestroyPackage:
 *                     destroy_found = True
 */
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inqu_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 359, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_get); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 359, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
          }
        }
        __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, Py_False) : __Pyx_PyObject_CallOneArg(__pyx_t_6, Py_False);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF_SET(__pyx_v_package, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "parabam/chaser.pyx":360
 *             try:
 *                 package = self._inqu.get(False)
 *                 if type(package) == DestroyPackage:             # <<<<<<<<<<<<<<
 *                     destroy_found = True
 *                 collected_packs.append(package)
 */
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DestroyPackage); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 360, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_package)), __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 360, __pyx_L5_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 360, __pyx_L5_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (__pyx_t_7) {

          /* "parabam/chaser.pyx":361
 *                 package = self._inqu.get(False)
 *                 if type(package) == DestroyPackage:
 *                     destroy_found = True             # <<<<<<<<<<<<<<
 *                 collected_packs.append(package)
 * 
 */
          __pyx_v_destroy_found = 1;

          /* "parabam/chaser.pyx":360
 *             try:
 *                 package = self._inqu.get(False)
 *                 if type(package) == DestroyPackage:             # <<<<<<<<<<<<<<
 *                     destroy_found = True
 *                 collected_packs.append(package)
 */
        }

        /* "parabam/chaser.pyx":362
 *                 if type(package) == DestroyPackage:
 *                     destroy_found = True
 *                 collected_packs.append(package)             # <<<<<<<<<<<<<<
 * 
 *             except Queue2.Empty:
 */
        __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_collected_packs, __pyx_v_package); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 362, __pyx_L5_error)

        /* "parabam/chaser.pyx":358
 *         destroy_found = False
 *         while True:
 *             try:             # <<<<<<<<<<<<<<
 *                 package = self._inqu.get(False)
 *                 if type(package) == DestroyPackage:
 */
      }
      __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_L12_try_end;
      __pyx_L5_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "parabam/chaser.pyx":364
 *                 collected_packs.append(package)
 * 
 *             except Queue2.Empty:             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
      __Pyx_ErrFetch(&__pyx_t_6, &__pyx_t_1, &__pyx_t_5);
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_Queue2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 364, __pyx_L7_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_Empty); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 364, __pyx_L7_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_11 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_6, __pyx_t_10);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_ErrRestore(__pyx_t_6, __pyx_t_1, __pyx_t_5);
      __pyx_t_6 = 0; __pyx_t_1 = 0; __pyx_t_5 = 0;
      if (__pyx_t_11) {
        __Pyx_AddTraceback("parabam.chaser.Handler.__fatal_check__", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_1, &__pyx_t_6) < 0) __PYX_ERR(0, 364, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_t_6);

        /* "parabam/chaser.pyx":365
 * 
 *             except Queue2.Empty:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         if not destroy_found:
 */
        goto __pyx_L14_except_break;
        __pyx_L14_except_break:;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L10_try_break;
      }
      goto __pyx_L7_except_error;
      __pyx_L7_except_error:;

      /* "parabam/chaser.pyx":358
 *         destroy_found = False
 *         while True:
 *             try:             # <<<<<<<<<<<<<<
 *                 package = self._inqu.get(False)
 *                 if type(package) == DestroyPackage:
 */
      __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_L10_try_break:;
      __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_L4_break;
      __pyx_L12_try_end:;
    }
  }
  __pyx_L4_break:;

  /* "parabam/chaser.pyx":367
 *                 break
 * 
 *         if not destroy_found:             # <<<<<<<<<<<<<<
 *             sys.stderr.write((
 *                 "[Fatal Error] Process communication failure.\n"+
 */
  __pyx_t_7 = ((!(__pyx_v_destroy_found != 0)) != 0);
  if (__pyx_t_7) {

    /* "parabam/chaser.pyx":368
 * 
 *         if not destroy_found:
 *             sys.stderr.write((             # <<<<<<<<<<<<<<
 *                 "[Fatal Error] Process communication failure.\n"+
 *                 "              Parabam coming to abrupt halt, sorry!\n"))
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 368, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stderr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 368, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 368, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "parabam/chaser.pyx":369
 *         if not destroy_found:
 *             sys.stderr.write((
 *                 "[Fatal Error] Process communication failure.\n"+             # <<<<<<<<<<<<<<
 *                 "              Parabam coming to abrupt halt, sorry!\n"))
 *             sys.stderr.flush()
 */
    __pyx_t_5 = PyNumber_Add(__pyx_kp_s_Fatal_Error_Process_communicati, __pyx_kp_s_Parabam_coming_to_abrupt_halt_s); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 369, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_6 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_10, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 368, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "parabam/chaser.pyx":371
 *                 "[Fatal Error] Process communication failure.\n"+
 *                 "              Parabam coming to abrupt halt, sorry!\n"))
 *             sys.stderr.flush()             # <<<<<<<<<<<<<<
 *             sys.exit(1)
 *         else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stderr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_flush); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_6 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "parabam/chaser.pyx":372
 *                 "              Parabam coming to abrupt halt, sorry!\n"))
 *             sys.stderr.flush()
 *             sys.exit(1)             # <<<<<<<<<<<<<<
 *         else:
 *             self._destroy = True
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_6 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_1, __pyx_int_1) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_int_1);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "parabam/chaser.pyx":367
 *                 break
 * 
 *         if not destroy_found:             # <<<<<<<<<<<<<<
 *             sys.stderr.write((
 *                 "[Fatal Error] Process communication failure.\n"+
 */
    goto __pyx_L16;
  }

  /* "parabam/chaser.pyx":374
 *             sys.exit(1)
 *         else:
 *             self._destroy = True             # <<<<<<<<<<<<<<
 *             for pack in collected_packs:
 *                 self._inqu.put(pack)
 */
  /*else*/ {
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_destroy, Py_True) < 0) __PYX_ERR(0, 374, __pyx_L1_error)

    /* "parabam/chaser.pyx":375
 *         else:
 *             self._destroy = True
 *             for pack in collected_packs:             # <<<<<<<<<<<<<<
 *                 self._inqu.put(pack)
 *         return True
 */
    __pyx_t_6 = __pyx_v_collected_packs; __Pyx_INCREF(__pyx_t_6); __pyx_t_12 = 0;
    for (;;) {
      if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_6)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_5 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_12); __Pyx_INCREF(__pyx_t_5); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 375, __pyx_L1_error)
      #else
      __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 375, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_pack, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "parabam/chaser.pyx":376
 *             self._destroy = True
 *             for pack in collected_packs:
 *                 self._inqu.put(pack)             # <<<<<<<<<<<<<<
 *         return True
 * 
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inqu_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 376, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_put); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 376, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_10);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_10, function);
        }
      }
      __pyx_t_5 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_1, __pyx_v_pack) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_pack);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 376, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "parabam/chaser.pyx":375
 *         else:
 *             self._destroy = True
 *             for pack in collected_packs:             # <<<<<<<<<<<<<<
 *                 self._inqu.put(pack)
 *         return True
 */
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_L16:;

  /* "parabam/chaser.pyx":377
 *             for pack in collected_packs:
 *                 self._inqu.put(pack)
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     def __periodic_action__(self,iterations):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "parabam/chaser.pyx":354
 *                 time.sleep(2)
 * 
 *     def __fatal_check__(self):             # <<<<<<<<<<<<<<
 *         collected_packs = []
 *         destroy_found = False
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("parabam.chaser.Handler.__fatal_check__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_collected_packs);
  __Pyx_XDECREF(__pyx_v_package);
  __Pyx_XDECREF(__pyx_v_pack);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":379
 *         return True
 * 
 *     def __periodic_action__(self,iterations):             # <<<<<<<<<<<<<<
 * 
 *         self.__pause_monitor__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_41__periodic_action__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_41__periodic_action__ = {"__periodic_action__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_7Handler_41__periodic_action__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_41__periodic_action__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_iterations = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__periodic_action__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_iterations,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iterations)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__periodic_action__", 1, 2, 2, 1); __PYX_ERR(0, 379, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__periodic_action__") < 0)) __PYX_ERR(0, 379, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_iterations = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__periodic_action__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 379, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.Handler.__periodic_action__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_40__periodic_action__(__pyx_self, __pyx_v_self, __pyx_v_iterations);

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_40__periodic_action__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_iterations) {
  long __pyx_v_idle_threshold;
  long __pyx_v_required_paths;
  PyObject *__pyx_v_pyramid_idle_counts = NULL;
  PyObject *__pyx_v_loner_type = NULL;
  PyObject *__pyx_v_pyramid = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_sub_pyramid = NULL;
  PyObject *__pyx_v_level = NULL;
  PyObject *__pyx_v_paths = NULL;
  PyObject *__pyx_v_path = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  Py_ssize_t __pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  Py_ssize_t __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  PyObject *(*__pyx_t_17)(PyObject *);
  PyObject *__pyx_t_18 = NULL;
  __Pyx_RefNannySetupContext("__periodic_action__", 0);

  /* "parabam/chaser.pyx":381
 *     def __periodic_action__(self,iterations):
 * 
 *         self.__pause_monitor__()             # <<<<<<<<<<<<<<
 * 
 *         if not self._destroy:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pause_monitor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":383
 *         self.__pause_monitor__()
 * 
 *         if not self._destroy:             # <<<<<<<<<<<<<<
 *             idle_threshold = 500
 *             required_paths = 10
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_destroy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 383, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = ((!__pyx_t_4) != 0);
  if (__pyx_t_5) {

    /* "parabam/chaser.pyx":384
 * 
 *         if not self._destroy:
 *             idle_threshold = 500             # <<<<<<<<<<<<<<
 *             required_paths = 10
 *         else:
 */
    __pyx_v_idle_threshold = 0x1F4;

    /* "parabam/chaser.pyx":385
 *         if not self._destroy:
 *             idle_threshold = 500
 *             required_paths = 10             # <<<<<<<<<<<<<<
 *         else:
 *             idle_threshold = 200
 */
    __pyx_v_required_paths = 10;

    /* "parabam/chaser.pyx":383
 *         self.__pause_monitor__()
 * 
 *         if not self._destroy:             # <<<<<<<<<<<<<<
 *             idle_threshold = 500
 *             required_paths = 10
 */
    goto __pyx_L3;
  }

  /* "parabam/chaser.pyx":387
 *             required_paths = 10
 *         else:
 *             idle_threshold = 200             # <<<<<<<<<<<<<<
 *             required_paths = 1
 * 
 */
  /*else*/ {
    __pyx_v_idle_threshold = 0xC8;

    /* "parabam/chaser.pyx":388
 *         else:
 *             idle_threshold = 200
 *             required_paths = 1             # <<<<<<<<<<<<<<
 * 
 *         pyramid_idle_counts = self._pyramid_idle_counts
 */
    __pyx_v_required_paths = 1;
  }
  __pyx_L3:;

  /* "parabam/chaser.pyx":390
 *             required_paths = 1
 * 
 *         pyramid_idle_counts = self._pyramid_idle_counts             # <<<<<<<<<<<<<<
 * 
 *         for loner_type,pyramid in self._loner_pyramid.items():
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pyramid_idle_counts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_pyramid_idle_counts = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":392
 *         pyramid_idle_counts = self._pyramid_idle_counts
 * 
 *         for loner_type,pyramid in self._loner_pyramid.items():             # <<<<<<<<<<<<<<
 *             for i,sub_pyramid in enumerate(reversed(pyramid)):
 *                 level = len(pyramid) - (i+1)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_loner_pyramid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 392, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 392, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_7)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 392, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 392, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 392, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 392, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_7(__pyx_t_3);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 392, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 392, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_8);
      #else
      __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 392, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 392, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 392, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
      index = 0; __pyx_t_2 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_2)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_8);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 392, __pyx_L1_error)
      __pyx_t_10 = NULL;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_10 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 392, __pyx_L1_error)
      __pyx_L7_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_loner_type, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_pyramid, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "parabam/chaser.pyx":393
 * 
 *         for loner_type,pyramid in self._loner_pyramid.items():
 *             for i,sub_pyramid in enumerate(reversed(pyramid)):             # <<<<<<<<<<<<<<
 *                 level = len(pyramid) - (i+1)
 *                 paths = self.__get_paths__(loner_type,sub_pyramid,level)
 */
    __Pyx_INCREF(__pyx_int_0);
    __pyx_t_1 = __pyx_int_0;
    __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_reversed, __pyx_v_pyramid); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 393, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
      __pyx_t_2 = __pyx_t_8; __Pyx_INCREF(__pyx_t_2); __pyx_t_11 = 0;
      __pyx_t_12 = NULL;
    } else {
      __pyx_t_11 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 393, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_12 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 393, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    for (;;) {
      if (likely(!__pyx_t_12)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_8 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_11); __Pyx_INCREF(__pyx_t_8); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 393, __pyx_L1_error)
          #else
          __pyx_t_8 = PySequence_ITEM(__pyx_t_2, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 393, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          #endif
        } else {
          if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_11); __Pyx_INCREF(__pyx_t_8); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 393, __pyx_L1_error)
          #else
          __pyx_t_8 = PySequence_ITEM(__pyx_t_2, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 393, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          #endif
        }
      } else {
        __pyx_t_8 = __pyx_t_12(__pyx_t_2);
        if (unlikely(!__pyx_t_8)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 393, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_8);
      }
      __Pyx_XDECREF_SET(__pyx_v_sub_pyramid, __pyx_t_8);
      __pyx_t_8 = 0;
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
      __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 393, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1);
      __pyx_t_1 = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "parabam/chaser.pyx":394
 *         for loner_type,pyramid in self._loner_pyramid.items():
 *             for i,sub_pyramid in enumerate(reversed(pyramid)):
 *                 level = len(pyramid) - (i+1)             # <<<<<<<<<<<<<<
 *                 paths = self.__get_paths__(loner_type,sub_pyramid,level)
 *                 if len(paths) > 0:
 */
      __pyx_t_13 = PyObject_Length(__pyx_v_pyramid); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 394, __pyx_L1_error)
      __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_13); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 394, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 394, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_14 = PyNumber_Subtract(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 394, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF_SET(__pyx_v_level, __pyx_t_14);
      __pyx_t_14 = 0;

      /* "parabam/chaser.pyx":395
 *             for i,sub_pyramid in enumerate(reversed(pyramid)):
 *                 level = len(pyramid) - (i+1)
 *                 paths = self.__get_paths__(loner_type,sub_pyramid,level)             # <<<<<<<<<<<<<<
 *                 if len(paths) > 0:
 *                     self.__start_matchmaker_task__(paths,loner_type,level)
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_paths); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 395, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = NULL;
      __pyx_t_15 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
          __pyx_t_15 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_v_loner_type, __pyx_v_sub_pyramid, __pyx_v_level};
        __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_15, 3+__pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 395, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_14);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_v_loner_type, __pyx_v_sub_pyramid, __pyx_v_level};
        __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_15, 3+__pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 395, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_14);
      } else
      #endif
      {
        __pyx_t_16 = PyTuple_New(3+__pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 395, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        if (__pyx_t_8) {
          __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_8); __pyx_t_8 = NULL;
        }
        __Pyx_INCREF(__pyx_v_loner_type);
        __Pyx_GIVEREF(__pyx_v_loner_type);
        PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_15, __pyx_v_loner_type);
        __Pyx_INCREF(__pyx_v_sub_pyramid);
        __Pyx_GIVEREF(__pyx_v_sub_pyramid);
        PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_15, __pyx_v_sub_pyramid);
        __Pyx_INCREF(__pyx_v_level);
        __Pyx_GIVEREF(__pyx_v_level);
        PyTuple_SET_ITEM(__pyx_t_16, 2+__pyx_t_15, __pyx_v_level);
        __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_16, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 395, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF_SET(__pyx_v_paths, __pyx_t_14);
      __pyx_t_14 = 0;

      /* "parabam/chaser.pyx":396
 *                 level = len(pyramid) - (i+1)
 *                 paths = self.__get_paths__(loner_type,sub_pyramid,level)
 *                 if len(paths) > 0:             # <<<<<<<<<<<<<<
 *                     self.__start_matchmaker_task__(paths,loner_type,level)
 *                     pyramid_idle_counts[loner_type] = 0
 */
      __pyx_t_13 = PyObject_Length(__pyx_v_paths); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 396, __pyx_L1_error)
      __pyx_t_5 = ((__pyx_t_13 > 0) != 0);
      if (__pyx_t_5) {

        /* "parabam/chaser.pyx":397
 *                 paths = self.__get_paths__(loner_type,sub_pyramid,level)
 *                 if len(paths) > 0:
 *                     self.__start_matchmaker_task__(paths,loner_type,level)             # <<<<<<<<<<<<<<
 *                     pyramid_idle_counts[loner_type] = 0
 *                     for path in paths:#remove sent paths
 */
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_start_matchmaker_task); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 397, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_16 = NULL;
        __pyx_t_15 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_16)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_16);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
            __pyx_t_15 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_9)) {
          PyObject *__pyx_temp[4] = {__pyx_t_16, __pyx_v_paths, __pyx_v_loner_type, __pyx_v_level};
          __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_15, 3+__pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 397, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_GOTREF(__pyx_t_14);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
          PyObject *__pyx_temp[4] = {__pyx_t_16, __pyx_v_paths, __pyx_v_loner_type, __pyx_v_level};
          __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_15, 3+__pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 397, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_GOTREF(__pyx_t_14);
        } else
        #endif
        {
          __pyx_t_8 = PyTuple_New(3+__pyx_t_15); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 397, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (__pyx_t_16) {
            __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_16); __pyx_t_16 = NULL;
          }
          __Pyx_INCREF(__pyx_v_paths);
          __Pyx_GIVEREF(__pyx_v_paths);
          PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_15, __pyx_v_paths);
          __Pyx_INCREF(__pyx_v_loner_type);
          __Pyx_GIVEREF(__pyx_v_loner_type);
          PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_15, __pyx_v_loner_type);
          __Pyx_INCREF(__pyx_v_level);
          __Pyx_GIVEREF(__pyx_v_level);
          PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_15, __pyx_v_level);
          __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_8, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 397, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

        /* "parabam/chaser.pyx":398
 *                 if len(paths) > 0:
 *                     self.__start_matchmaker_task__(paths,loner_type,level)
 *                     pyramid_idle_counts[loner_type] = 0             # <<<<<<<<<<<<<<
 *                     for path in paths:#remove sent paths
 *                         self.__remove_from_pyramid__(loner_type,level,path)
 */
        if (unlikely(PyObject_SetItem(__pyx_v_pyramid_idle_counts, __pyx_v_loner_type, __pyx_int_0) < 0)) __PYX_ERR(0, 398, __pyx_L1_error)

        /* "parabam/chaser.pyx":399
 *                     self.__start_matchmaker_task__(paths,loner_type,level)
 *                     pyramid_idle_counts[loner_type] = 0
 *                     for path in paths:#remove sent paths             # <<<<<<<<<<<<<<
 *                         self.__remove_from_pyramid__(loner_type,level,path)
 *                     break
 */
        if (likely(PyList_CheckExact(__pyx_v_paths)) || PyTuple_CheckExact(__pyx_v_paths)) {
          __pyx_t_14 = __pyx_v_paths; __Pyx_INCREF(__pyx_t_14); __pyx_t_13 = 0;
          __pyx_t_17 = NULL;
        } else {
          __pyx_t_13 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_v_paths); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 399, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_17 = Py_TYPE(__pyx_t_14)->tp_iternext; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 399, __pyx_L1_error)
        }
        for (;;) {
          if (likely(!__pyx_t_17)) {
            if (likely(PyList_CheckExact(__pyx_t_14))) {
              if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_14)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_9 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_13); __Pyx_INCREF(__pyx_t_9); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 399, __pyx_L1_error)
              #else
              __pyx_t_9 = PySequence_ITEM(__pyx_t_14, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 399, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_9);
              #endif
            } else {
              if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_14)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_13); __Pyx_INCREF(__pyx_t_9); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 399, __pyx_L1_error)
              #else
              __pyx_t_9 = PySequence_ITEM(__pyx_t_14, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 399, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_9);
              #endif
            }
          } else {
            __pyx_t_9 = __pyx_t_17(__pyx_t_14);
            if (unlikely(!__pyx_t_9)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                else __PYX_ERR(0, 399, __pyx_L1_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_9);
          }
          __Pyx_XDECREF_SET(__pyx_v_path, __pyx_t_9);
          __pyx_t_9 = 0;

          /* "parabam/chaser.pyx":400
 *                     pyramid_idle_counts[loner_type] = 0
 *                     for path in paths:#remove sent paths
 *                         self.__remove_from_pyramid__(loner_type,level,path)             # <<<<<<<<<<<<<<
 *                     break
 *                 if len(sub_pyramid) > 0:
 */
          __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_remove_from_pyramid); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 400, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_16 = NULL;
          __pyx_t_15 = 0;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
            __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_8);
            if (likely(__pyx_t_16)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
              __Pyx_INCREF(__pyx_t_16);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_8, function);
              __pyx_t_15 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_8)) {
            PyObject *__pyx_temp[4] = {__pyx_t_16, __pyx_v_loner_type, __pyx_v_level, __pyx_v_path};
            __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_15, 3+__pyx_t_15); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 400, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_GOTREF(__pyx_t_9);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
            PyObject *__pyx_temp[4] = {__pyx_t_16, __pyx_v_loner_type, __pyx_v_level, __pyx_v_path};
            __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_15, 3+__pyx_t_15); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 400, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_GOTREF(__pyx_t_9);
          } else
          #endif
          {
            __pyx_t_18 = PyTuple_New(3+__pyx_t_15); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 400, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_18);
            if (__pyx_t_16) {
              __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_16); __pyx_t_16 = NULL;
            }
            __Pyx_INCREF(__pyx_v_loner_type);
            __Pyx_GIVEREF(__pyx_v_loner_type);
            PyTuple_SET_ITEM(__pyx_t_18, 0+__pyx_t_15, __pyx_v_loner_type);
            __Pyx_INCREF(__pyx_v_level);
            __Pyx_GIVEREF(__pyx_v_level);
            PyTuple_SET_ITEM(__pyx_t_18, 1+__pyx_t_15, __pyx_v_level);
            __Pyx_INCREF(__pyx_v_path);
            __Pyx_GIVEREF(__pyx_v_path);
            PyTuple_SET_ITEM(__pyx_t_18, 2+__pyx_t_15, __pyx_v_path);
            __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_18, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 400, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
          }
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

          /* "parabam/chaser.pyx":399
 *                     self.__start_matchmaker_task__(paths,loner_type,level)
 *                     pyramid_idle_counts[loner_type] = 0
 *                     for path in paths:#remove sent paths             # <<<<<<<<<<<<<<
 *                         self.__remove_from_pyramid__(loner_type,level,path)
 *                     break
 */
        }
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

        /* "parabam/chaser.pyx":401
 *                     for path in paths:#remove sent paths
 *                         self.__remove_from_pyramid__(loner_type,level,path)
 *                     break             # <<<<<<<<<<<<<<
 *                 if len(sub_pyramid) > 0:
 *                     pyramid_idle_counts[loner_type] += 1
 */
        goto __pyx_L9_break;

        /* "parabam/chaser.pyx":396
 *                 level = len(pyramid) - (i+1)
 *                 paths = self.__get_paths__(loner_type,sub_pyramid,level)
 *                 if len(paths) > 0:             # <<<<<<<<<<<<<<
 *                     self.__start_matchmaker_task__(paths,loner_type,level)
 *                     pyramid_idle_counts[loner_type] = 0
 */
      }

      /* "parabam/chaser.pyx":402
 *                         self.__remove_from_pyramid__(loner_type,level,path)
 *                     break
 *                 if len(sub_pyramid) > 0:             # <<<<<<<<<<<<<<
 *                     pyramid_idle_counts[loner_type] += 1
 *                 del paths
 */
      __pyx_t_13 = PyObject_Length(__pyx_v_sub_pyramid); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 402, __pyx_L1_error)
      __pyx_t_5 = ((__pyx_t_13 > 0) != 0);
      if (__pyx_t_5) {

        /* "parabam/chaser.pyx":403
 *                     break
 *                 if len(sub_pyramid) > 0:
 *                     pyramid_idle_counts[loner_type] += 1             # <<<<<<<<<<<<<<
 *                 del paths
 * 
 */
        __Pyx_INCREF(__pyx_v_loner_type);
        __pyx_t_14 = __pyx_v_loner_type;
        __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_v_pyramid_idle_counts, __pyx_t_14); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 403, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_t_9, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 403, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(PyObject_SetItem(__pyx_v_pyramid_idle_counts, __pyx_t_14, __pyx_t_8) < 0)) __PYX_ERR(0, 403, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

        /* "parabam/chaser.pyx":402
 *                         self.__remove_from_pyramid__(loner_type,level,path)
 *                     break
 *                 if len(sub_pyramid) > 0:             # <<<<<<<<<<<<<<
 *                     pyramid_idle_counts[loner_type] += 1
 *                 del paths
 */
      }

      /* "parabam/chaser.pyx":404
 *                 if len(sub_pyramid) > 0:
 *                     pyramid_idle_counts[loner_type] += 1
 *                 del paths             # <<<<<<<<<<<<<<
 * 
 *             if pyramid_idle_counts[loner_type] >= idle_threshold:
 */
      __Pyx_DECREF(__pyx_v_paths);
      __pyx_v_paths = NULL;

      /* "parabam/chaser.pyx":393
 * 
 *         for loner_type,pyramid in self._loner_pyramid.items():
 *             for i,sub_pyramid in enumerate(reversed(pyramid)):             # <<<<<<<<<<<<<<
 *                 level = len(pyramid) - (i+1)
 *                 paths = self.__get_paths__(loner_type,sub_pyramid,level)
 */
    }
    __pyx_L9_break:;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":406
 *                 del paths
 * 
 *             if pyramid_idle_counts[loner_type] >= idle_threshold:             # <<<<<<<<<<<<<<
 *                 self.__test_pyramid_idle_count__(pyramid,
 *                                                   loner_type,
 */
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_pyramid_idle_counts, __pyx_v_loner_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 406, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_idle_threshold); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 406, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_14 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 406, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 406, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (__pyx_t_5) {

      /* "parabam/chaser.pyx":407
 * 
 *             if pyramid_idle_counts[loner_type] >= idle_threshold:
 *                 self.__test_pyramid_idle_count__(pyramid,             # <<<<<<<<<<<<<<
 *                                                   loner_type,
 *                                                   pyramid_idle_counts)
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_test_pyramid_idle_count); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 407, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);

      /* "parabam/chaser.pyx":409
 *                 self.__test_pyramid_idle_count__(pyramid,
 *                                                   loner_type,
 *                                                   pyramid_idle_counts)             # <<<<<<<<<<<<<<
 * 
 *         self.__test_primary_tasks__(required_paths=required_paths)
 */
      __pyx_t_1 = NULL;
      __pyx_t_15 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_15 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_v_pyramid, __pyx_v_loner_type, __pyx_v_pyramid_idle_counts};
        __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_15, 3+__pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 407, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_GOTREF(__pyx_t_14);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_v_pyramid, __pyx_v_loner_type, __pyx_v_pyramid_idle_counts};
        __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_15, 3+__pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 407, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_GOTREF(__pyx_t_14);
      } else
      #endif
      {
        __pyx_t_8 = PyTuple_New(3+__pyx_t_15); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 407, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (__pyx_t_1) {
          __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __pyx_t_1 = NULL;
        }
        __Pyx_INCREF(__pyx_v_pyramid);
        __Pyx_GIVEREF(__pyx_v_pyramid);
        PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_15, __pyx_v_pyramid);
        __Pyx_INCREF(__pyx_v_loner_type);
        __Pyx_GIVEREF(__pyx_v_loner_type);
        PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_15, __pyx_v_loner_type);
        __Pyx_INCREF(__pyx_v_pyramid_idle_counts);
        __Pyx_GIVEREF(__pyx_v_pyramid_idle_counts);
        PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_15, __pyx_v_pyramid_idle_counts);
        __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 407, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

      /* "parabam/chaser.pyx":406
 *                 del paths
 * 
 *             if pyramid_idle_counts[loner_type] >= idle_threshold:             # <<<<<<<<<<<<<<
 *                 self.__test_pyramid_idle_count__(pyramid,
 *                                                   loner_type,
 */
    }

    /* "parabam/chaser.pyx":392
 *         pyramid_idle_counts = self._pyramid_idle_counts
 * 
 *         for loner_type,pyramid in self._loner_pyramid.items():             # <<<<<<<<<<<<<<
 *             for i,sub_pyramid in enumerate(reversed(pyramid)):
 *                 level = len(pyramid) - (i+1)
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "parabam/chaser.pyx":411
 *                                                   pyramid_idle_counts)
 * 
 *         self.__test_primary_tasks__(required_paths=required_paths)             # <<<<<<<<<<<<<<
 *         self._print_chaser_debug(iterations)
 *         self.__finish_test__()
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_test_primary_tasks); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_14 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_required_paths); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_required_paths, __pyx_t_2) < 0) __PYX_ERR(0, 411, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "parabam/chaser.pyx":412
 * 
 *         self.__test_primary_tasks__(required_paths=required_paths)
 *         self._print_chaser_debug(iterations)             # <<<<<<<<<<<<<<
 *         self.__finish_test__()
 * 
 */
  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_print_chaser_debug); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_14);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_14, function);
    }
  }
  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_14, __pyx_t_3, __pyx_v_iterations) : __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_v_iterations);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "parabam/chaser.pyx":413
 *         self.__test_primary_tasks__(required_paths=required_paths)
 *         self._print_chaser_debug(iterations)
 *         self.__finish_test__()             # <<<<<<<<<<<<<<
 * 
 *         if iterations % 100 == 0:
 */
  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_finish_test); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_14);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_14, function);
    }
  }
  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "parabam/chaser.pyx":415
 *         self.__finish_test__()
 * 
 *         if iterations % 100 == 0:             # <<<<<<<<<<<<<<
 *             gc.collect()
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_RemainderObjC(__pyx_v_iterations, __pyx_int_100, 0x64, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_14 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 415, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  if (__pyx_t_5) {

    /* "parabam/chaser.pyx":416
 * 
 *         if iterations % 100 == 0:
 *             gc.collect()             # <<<<<<<<<<<<<<
 * 
 *     def __test_pyramid_idle_count__(self,pyramid,loner_type,pyramid_idle_counts):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_gc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 416, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_collect); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 416, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_14 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 416, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

    /* "parabam/chaser.pyx":415
 *         self.__finish_test__()
 * 
 *         if iterations % 100 == 0:             # <<<<<<<<<<<<<<
 *             gc.collect()
 * 
 */
  }

  /* "parabam/chaser.pyx":379
 *         return True
 * 
 *     def __periodic_action__(self,iterations):             # <<<<<<<<<<<<<<
 * 
 *         self.__pause_monitor__()
 */

  /* 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_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_AddTraceback("parabam.chaser.Handler.__periodic_action__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pyramid_idle_counts);
  __Pyx_XDECREF(__pyx_v_loner_type);
  __Pyx_XDECREF(__pyx_v_pyramid);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_sub_pyramid);
  __Pyx_XDECREF(__pyx_v_level);
  __Pyx_XDECREF(__pyx_v_paths);
  __Pyx_XDECREF(__pyx_v_path);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":418
 *             gc.collect()
 * 
 *     def __test_pyramid_idle_count__(self,pyramid,loner_type,pyramid_idle_counts):             # <<<<<<<<<<<<<<
 *         #Idle counting is the mechanism whereby loners that have no
 *         #match can be entered into `purgatory` thus clearing the pyramid.
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_43__test_pyramid_idle_count__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_43__test_pyramid_idle_count__ = {"__test_pyramid_idle_count__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_7Handler_43__test_pyramid_idle_count__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_43__test_pyramid_idle_count__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_pyramid = 0;
  PyObject *__pyx_v_loner_type = 0;
  PyObject *__pyx_v_pyramid_idle_counts = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__test_pyramid_idle_count__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_pyramid,&__pyx_n_s_loner_type,&__pyx_n_s_pyramid_idle_counts_2,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyramid)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__test_pyramid_idle_count__", 1, 4, 4, 1); __PYX_ERR(0, 418, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loner_type)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__test_pyramid_idle_count__", 1, 4, 4, 2); __PYX_ERR(0, 418, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyramid_idle_counts_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__test_pyramid_idle_count__", 1, 4, 4, 3); __PYX_ERR(0, 418, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__test_pyramid_idle_count__") < 0)) __PYX_ERR(0, 418, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_self = values[0];
    __pyx_v_pyramid = values[1];
    __pyx_v_loner_type = values[2];
    __pyx_v_pyramid_idle_counts = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__test_pyramid_idle_count__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 418, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.Handler.__test_pyramid_idle_count__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_42__test_pyramid_idle_count__(__pyx_self, __pyx_v_self, __pyx_v_pyramid, __pyx_v_loner_type, __pyx_v_pyramid_idle_counts);

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_42__test_pyramid_idle_count__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_pyramid, PyObject *__pyx_v_loner_type, PyObject *__pyx_v_pyramid_idle_counts) {
  PyObject *__pyx_v_idle_success = NULL;
  PyObject *__pyx_v_idle_paths = NULL;
  PyObject *__pyx_v_idle_levels = NULL;
  PyObject *__pyx_v_idle_level = NULL;
  PyObject *__pyx_v_idle_path = 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)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_t_16;
  __Pyx_RefNannySetupContext("__test_pyramid_idle_count__", 0);

  /* "parabam/chaser.pyx":425
 * 
 *         idle_success,idle_paths,idle_levels = \
 *                             self.__idle_routine__(pyramid,loner_type)             # <<<<<<<<<<<<<<
 * 
 *         # Delete after idle success or when
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_idle_routine); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_pyramid, __pyx_v_loner_type};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_pyramid, __pyx_v_loner_type};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_pyramid);
    __Pyx_GIVEREF(__pyx_v_pyramid);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_pyramid);
    __Pyx_INCREF(__pyx_v_loner_type);
    __Pyx_GIVEREF(__pyx_v_loner_type);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_loner_type);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 3)) {
      if (size > 3) __Pyx_RaiseTooManyValuesError(3);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 424, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 2); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 2); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 424, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 424, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 424, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 424, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_5);
    index = 2; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 3) < 0) __PYX_ERR(0, 424, __pyx_L1_error)
    __pyx_t_7 = NULL;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 424, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }

  /* "parabam/chaser.pyx":424
 *         #reads in the BAM file.
 * 
 *         idle_success,idle_paths,idle_levels = \             # <<<<<<<<<<<<<<
 *                             self.__idle_routine__(pyramid,loner_type)
 * 
 */
  __pyx_v_idle_success = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_idle_paths = __pyx_t_5;
  __pyx_t_5 = 0;
  __pyx_v_idle_levels = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "parabam/chaser.pyx":429
 *         # Delete after idle success or when
 *         # processing has finished and idle fails
 *         if self.__clear_subpyramid__(idle_success,             # <<<<<<<<<<<<<<
 *                                      self._destroy,
 *                                      self._pending_jobs):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_clear_subpyramid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "parabam/chaser.pyx":430
 *         # processing has finished and idle fails
 *         if self.__clear_subpyramid__(idle_success,
 *                                      self._destroy,             # <<<<<<<<<<<<<<
 *                                      self._pending_jobs):
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_destroy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "parabam/chaser.pyx":431
 *         if self.__clear_subpyramid__(idle_success,
 *                                      self._destroy,
 *                                      self._pending_jobs):             # <<<<<<<<<<<<<<
 * 
 *             pyramid_idle_counts[loner_type]=0
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pending_jobs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_idle_success, __pyx_t_5, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 429, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_idle_success, __pyx_t_5, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 429, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_INCREF(__pyx_v_idle_success);
    __Pyx_GIVEREF(__pyx_v_idle_success);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_4, __pyx_v_idle_success);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_4, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_4, __pyx_t_2);
    __pyx_t_5 = 0;
    __pyx_t_2 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "parabam/chaser.pyx":429
 *         # Delete after idle success or when
 *         # processing has finished and idle fails
 *         if self.__clear_subpyramid__(idle_success,             # <<<<<<<<<<<<<<
 *                                      self._destroy,
 *                                      self._pending_jobs):
 */
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 429, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_9) {

    /* "parabam/chaser.pyx":433
 *                                      self._pending_jobs):
 * 
 *             pyramid_idle_counts[loner_type]=0             # <<<<<<<<<<<<<<
 *             for idle_level,idle_path in zip(idle_levels,idle_paths):
 *                 if not idle_success:
 */
    if (unlikely(PyObject_SetItem(__pyx_v_pyramid_idle_counts, __pyx_v_loner_type, __pyx_int_0) < 0)) __PYX_ERR(0, 433, __pyx_L1_error)

    /* "parabam/chaser.pyx":434
 * 
 *             pyramid_idle_counts[loner_type]=0
 *             for idle_level,idle_path in zip(idle_levels,idle_paths):             # <<<<<<<<<<<<<<
 *                 if not idle_success:
 *                     try:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_zip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = NULL;
    __pyx_t_4 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_idle_levels, __pyx_v_idle_paths};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_idle_levels, __pyx_v_idle_paths};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_2 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 434, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__pyx_t_8) {
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8); __pyx_t_8 = NULL;
      }
      __Pyx_INCREF(__pyx_v_idle_levels);
      __Pyx_GIVEREF(__pyx_v_idle_levels);
      PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_4, __pyx_v_idle_levels);
      __Pyx_INCREF(__pyx_v_idle_paths);
      __Pyx_GIVEREF(__pyx_v_idle_paths);
      PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_4, __pyx_v_idle_paths);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
      __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_10 = 0;
      __pyx_t_11 = NULL;
    } else {
      __pyx_t_10 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 434, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 434, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      if (likely(!__pyx_t_11)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 434, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 434, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_11(__pyx_t_3);
        if (unlikely(!__pyx_t_1)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 434, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
        PyObject* sequence = __pyx_t_1;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 434, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_8);
        #else
        __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 434, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 434, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        #endif
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 434, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext;
        index = 0; __pyx_t_2 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L8_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        index = 1; __pyx_t_8 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_8)) goto __pyx_L8_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_8);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_5), 2) < 0) __PYX_ERR(0, 434, __pyx_L1_error)
        __pyx_t_7 = NULL;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        goto __pyx_L9_unpacking_done;
        __pyx_L8_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_7 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 434, __pyx_L1_error)
        __pyx_L9_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_idle_level, __pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_XDECREF_SET(__pyx_v_idle_path, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "parabam/chaser.pyx":435
 *             pyramid_idle_counts[loner_type]=0
 *             for idle_level,idle_path in zip(idle_levels,idle_paths):
 *                 if not idle_success:             # <<<<<<<<<<<<<<
 *                     try:
 *                         self._loner_purgatory[loner_type].\
 */
      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_idle_success); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 435, __pyx_L1_error)
      __pyx_t_12 = ((!__pyx_t_9) != 0);
      if (__pyx_t_12) {

        /* "parabam/chaser.pyx":436
 *             for idle_level,idle_path in zip(idle_levels,idle_paths):
 *                 if not idle_success:
 *                     try:             # <<<<<<<<<<<<<<
 *                         self._loner_purgatory[loner_type].\
 *                                                 append(idle_path)
 */
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_15);
          /*try:*/ {

            /* "parabam/chaser.pyx":437
 *                 if not idle_success:
 *                     try:
 *                         self._loner_purgatory[loner_type].\             # <<<<<<<<<<<<<<
 *                                                 append(idle_path)
 *                     except KeyError:
 */
            __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_loner_purgatory); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 437, __pyx_L11_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_loner_type); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 437, __pyx_L11_error)
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

            /* "parabam/chaser.pyx":438
 *                     try:
 *                         self._loner_purgatory[loner_type].\
 *                                                 append(idle_path)             # <<<<<<<<<<<<<<
 *                     except KeyError:
 *                         self._loner_purgatory[loner_type] = [idle_path]
 */
            __pyx_t_16 = __Pyx_PyObject_Append(__pyx_t_8, __pyx_v_idle_path); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 438, __pyx_L11_error)
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

            /* "parabam/chaser.pyx":436
 *             for idle_level,idle_path in zip(idle_levels,idle_paths):
 *                 if not idle_success:
 *                     try:             # <<<<<<<<<<<<<<
 *                         self._loner_purgatory[loner_type].\
 *                                                 append(idle_path)
 */
          }
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          goto __pyx_L18_try_end;
          __pyx_L11_error:;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 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;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

          /* "parabam/chaser.pyx":439
 *                         self._loner_purgatory[loner_type].\
 *                                                 append(idle_path)
 *                     except KeyError:             # <<<<<<<<<<<<<<
 *                         self._loner_purgatory[loner_type] = [idle_path]
 *                 self.__remove_from_pyramid__(loner_type,idle_level,idle_path)
 */
          __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
          if (__pyx_t_4) {
            __Pyx_AddTraceback("parabam.chaser.Handler.__test_pyramid_idle_count__", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_1, &__pyx_t_2) < 0) __PYX_ERR(0, 439, __pyx_L13_except_error)
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_GOTREF(__pyx_t_2);

            /* "parabam/chaser.pyx":440
 *                                                 append(idle_path)
 *                     except KeyError:
 *                         self._loner_purgatory[loner_type] = [idle_path]             # <<<<<<<<<<<<<<
 *                 self.__remove_from_pyramid__(loner_type,idle_level,idle_path)
 * 
 */
            __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 440, __pyx_L13_except_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_INCREF(__pyx_v_idle_path);
            __Pyx_GIVEREF(__pyx_v_idle_path);
            PyList_SET_ITEM(__pyx_t_5, 0, __pyx_v_idle_path);
            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_loner_purgatory); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 440, __pyx_L13_except_error)
            __Pyx_GOTREF(__pyx_t_6);
            if (unlikely(PyObject_SetItem(__pyx_t_6, __pyx_v_loner_type, __pyx_t_5) < 0)) __PYX_ERR(0, 440, __pyx_L13_except_error)
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            goto __pyx_L12_exception_handled;
          }
          goto __pyx_L13_except_error;
          __pyx_L13_except_error:;

          /* "parabam/chaser.pyx":436
 *             for idle_level,idle_path in zip(idle_levels,idle_paths):
 *                 if not idle_success:
 *                     try:             # <<<<<<<<<<<<<<
 *                         self._loner_purgatory[loner_type].\
 *                                                 append(idle_path)
 */
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
          goto __pyx_L1_error;
          __pyx_L12_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
          __pyx_L18_try_end:;
        }

        /* "parabam/chaser.pyx":435
 *             pyramid_idle_counts[loner_type]=0
 *             for idle_level,idle_path in zip(idle_levels,idle_paths):
 *                 if not idle_success:             # <<<<<<<<<<<<<<
 *                     try:
 *                         self._loner_purgatory[loner_type].\
 */
      }

      /* "parabam/chaser.pyx":441
 *                     except KeyError:
 *                         self._loner_purgatory[loner_type] = [idle_path]
 *                 self.__remove_from_pyramid__(loner_type,idle_level,idle_path)             # <<<<<<<<<<<<<<
 * 
 *         del idle_paths,idle_levels
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_remove_from_pyramid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 441, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = NULL;
      __pyx_t_4 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_4 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_v_loner_type, __pyx_v_idle_level, __pyx_v_idle_path};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 441, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_v_loner_type, __pyx_v_idle_level, __pyx_v_idle_path};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 441, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 441, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (__pyx_t_8) {
          __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8); __pyx_t_8 = NULL;
        }
        __Pyx_INCREF(__pyx_v_loner_type);
        __Pyx_GIVEREF(__pyx_v_loner_type);
        PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_loner_type);
        __Pyx_INCREF(__pyx_v_idle_level);
        __Pyx_GIVEREF(__pyx_v_idle_level);
        PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_idle_level);
        __Pyx_INCREF(__pyx_v_idle_path);
        __Pyx_GIVEREF(__pyx_v_idle_path);
        PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_idle_path);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 441, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "parabam/chaser.pyx":434
 * 
 *             pyramid_idle_counts[loner_type]=0
 *             for idle_level,idle_path in zip(idle_levels,idle_paths):             # <<<<<<<<<<<<<<
 *                 if not idle_success:
 *                     try:
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "parabam/chaser.pyx":429
 *         # Delete after idle success or when
 *         # processing has finished and idle fails
 *         if self.__clear_subpyramid__(idle_success,             # <<<<<<<<<<<<<<
 *                                      self._destroy,
 *                                      self._pending_jobs):
 */
  }

  /* "parabam/chaser.pyx":443
 *                 self.__remove_from_pyramid__(loner_type,idle_level,idle_path)
 * 
 *         del idle_paths,idle_levels             # <<<<<<<<<<<<<<
 * 
 *     def __finish_test__(self):
 */
  __Pyx_DECREF(__pyx_v_idle_paths);
  __pyx_v_idle_paths = NULL;
  __Pyx_DECREF(__pyx_v_idle_levels);
  __pyx_v_idle_levels = NULL;

  /* "parabam/chaser.pyx":418
 *             gc.collect()
 * 
 *     def __test_pyramid_idle_count__(self,pyramid,loner_type,pyramid_idle_counts):             # <<<<<<<<<<<<<<
 *         #Idle counting is the mechanism whereby loners that have no
 *         #match can be entered into `purgatory` thus clearing the pyramid.
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("parabam.chaser.Handler.__test_pyramid_idle_count__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_idle_success);
  __Pyx_XDECREF(__pyx_v_idle_paths);
  __Pyx_XDECREF(__pyx_v_idle_levels);
  __Pyx_XDECREF(__pyx_v_idle_level);
  __Pyx_XDECREF(__pyx_v_idle_path);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":445
 *         del idle_paths,idle_levels
 * 
 *     def __finish_test__(self):             # <<<<<<<<<<<<<<
 *         if self._destroy:
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_45__finish_test__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_45__finish_test__ = {"__finish_test__", (PyCFunction)__pyx_pw_7parabam_6chaser_7Handler_45__finish_test__, METH_O, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_45__finish_test__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__finish_test__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_44__finish_test__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_44__finish_test__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_saved = NULL;
  PyObject *__pyx_v_finished = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("__finish_test__", 0);

  /* "parabam/chaser.pyx":446
 * 
 *     def __finish_test__(self):
 *         if self._destroy:             # <<<<<<<<<<<<<<
 * 
 *             self.__add_post_destory_chaser_tasks__()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_destroy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 446, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "parabam/chaser.pyx":448
 *         if self._destroy:
 * 
 *             self.__add_post_destory_chaser_tasks__()             # <<<<<<<<<<<<<<
 * 
 *             self.__post_destroy_report__()
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_add_post_destory_chaser_tasks); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 448, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 448, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":450
 *             self.__add_post_destory_chaser_tasks__()
 * 
 *             self.__post_destroy_report__()             # <<<<<<<<<<<<<<
 *             if not self._rescued["total"] == self._prev_rescued:
 *                 self._stale_count = 0
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_post_destroy_report); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 450, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 450, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":451
 * 
 *             self.__post_destroy_report__()
 *             if not self._rescued["total"] == self._prev_rescued:             # <<<<<<<<<<<<<<
 *                 self._stale_count = 0
 *                 self.__set_new_stale_thresh__()
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rescued_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 451, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_s_total); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 451, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_prev_rescued); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 451, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 451, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 451, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = ((!__pyx_t_2) != 0);
    if (__pyx_t_5) {

      /* "parabam/chaser.pyx":452
 *             self.__post_destroy_report__()
 *             if not self._rescued["total"] == self._prev_rescued:
 *                 self._stale_count = 0             # <<<<<<<<<<<<<<
 *                 self.__set_new_stale_thresh__()
 * 
 */
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stale_count, __pyx_int_0) < 0) __PYX_ERR(0, 452, __pyx_L1_error)

      /* "parabam/chaser.pyx":453
 *             if not self._rescued["total"] == self._prev_rescued:
 *                 self._stale_count = 0
 *                 self.__set_new_stale_thresh__()             # <<<<<<<<<<<<<<
 * 
 *             self._prev_rescued = self._rescued["total"]
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_set_new_stale_thresh); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 453, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 453, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "parabam/chaser.pyx":451
 * 
 *             self.__post_destroy_report__()
 *             if not self._rescued["total"] == self._prev_rescued:             # <<<<<<<<<<<<<<
 *                 self._stale_count = 0
 *                 self.__set_new_stale_thresh__()
 */
    }

    /* "parabam/chaser.pyx":455
 *                 self.__set_new_stale_thresh__()
 * 
 *             self._prev_rescued = self._rescued["total"]             # <<<<<<<<<<<<<<
 *             saved = self.__save_purgatory_loners__()
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rescued_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 455, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_n_s_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 455, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_prev_rescued, __pyx_t_1) < 0) __PYX_ERR(0, 455, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":456
 * 
 *             self._prev_rescued = self._rescued["total"]
 *             saved = self.__save_purgatory_loners__()             # <<<<<<<<<<<<<<
 * 
 *             finished = False
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_save_purgatory_loners); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_saved = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":458
 *             saved = self.__save_purgatory_loners__()
 * 
 *             finished = False             # <<<<<<<<<<<<<<
 *             if self.__pyramid_is_empty__(saved):
 *                 finished = True
 */
    __Pyx_INCREF(Py_False);
    __pyx_v_finished = Py_False;

    /* "parabam/chaser.pyx":459
 * 
 *             finished = False
 *             if self.__pyramid_is_empty__(saved):             # <<<<<<<<<<<<<<
 *                 finished = True
 *             elif self._stale_count > self._stale_thresh:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pyramid_is_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 459, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_v_saved) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_saved);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 459, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 459, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_5) {

      /* "parabam/chaser.pyx":460
 *             finished = False
 *             if self.__pyramid_is_empty__(saved):
 *                 finished = True             # <<<<<<<<<<<<<<
 *             elif self._stale_count > self._stale_thresh:
 *                 finished = self.__tidy_pyramid__()
 */
      __Pyx_INCREF(Py_True);
      __Pyx_DECREF_SET(__pyx_v_finished, Py_True);

      /* "parabam/chaser.pyx":459
 * 
 *             finished = False
 *             if self.__pyramid_is_empty__(saved):             # <<<<<<<<<<<<<<
 *                 finished = True
 *             elif self._stale_count > self._stale_thresh:
 */
      goto __pyx_L5;
    }

    /* "parabam/chaser.pyx":461
 *             if self.__pyramid_is_empty__(saved):
 *                 finished = True
 *             elif self._stale_count > self._stale_thresh:             # <<<<<<<<<<<<<<
 *                 finished = self.__tidy_pyramid__()
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stale_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 461, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stale_thresh); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 461, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 461, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 461, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_5) {

      /* "parabam/chaser.pyx":462
 *                 finished = True
 *             elif self._stale_count > self._stale_thresh:
 *                 finished = self.__tidy_pyramid__()             # <<<<<<<<<<<<<<
 * 
 *             if finished:
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tidy_pyramid); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 462, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 462, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF_SET(__pyx_v_finished, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "parabam/chaser.pyx":461
 *             if self.__pyramid_is_empty__(saved):
 *                 finished = True
 *             elif self._stale_count > self._stale_thresh:             # <<<<<<<<<<<<<<
 *                 finished = self.__tidy_pyramid__()
 * 
 */
    }
    __pyx_L5:;

    /* "parabam/chaser.pyx":464
 *                 finished = self.__tidy_pyramid__()
 * 
 *             if finished:             # <<<<<<<<<<<<<<
 *                 self._print_chaser_debug(-1)
 *                 self._finished = True
 */
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_finished); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 464, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "parabam/chaser.pyx":465
 * 
 *             if finished:
 *                 self._print_chaser_debug(-1)             # <<<<<<<<<<<<<<
 *                 self._finished = True
 * 
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_print_chaser_debug); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 465, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_1, __pyx_int_neg_1) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_neg_1);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 465, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "parabam/chaser.pyx":466
 *             if finished:
 *                 self._print_chaser_debug(-1)
 *                 self._finished = True             # <<<<<<<<<<<<<<
 * 
 *     def __add_post_destory_chaser_tasks__(self):
 */
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_finished, Py_True) < 0) __PYX_ERR(0, 466, __pyx_L1_error)

      /* "parabam/chaser.pyx":464
 *                 finished = self.__tidy_pyramid__()
 * 
 *             if finished:             # <<<<<<<<<<<<<<
 *                 self._print_chaser_debug(-1)
 *                 self._finished = True
 */
    }

    /* "parabam/chaser.pyx":446
 * 
 *     def __finish_test__(self):
 *         if self._destroy:             # <<<<<<<<<<<<<<
 * 
 *             self.__add_post_destory_chaser_tasks__()
 */
  }

  /* "parabam/chaser.pyx":445
 *         del idle_paths,idle_levels
 * 
 *     def __finish_test__(self):             # <<<<<<<<<<<<<<
 *         if self._destroy:
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("parabam.chaser.Handler.__finish_test__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_saved);
  __Pyx_XDECREF(__pyx_v_finished);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":468
 *                 self._finished = True
 * 
 *     def __add_post_destory_chaser_tasks__(self):             # <<<<<<<<<<<<<<
 *         if self._destroy and not self._post_destroy_tasks_added:
 *             self._post_destroy_tasks_added = True
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_47__add_post_destory_chaser_tasks__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_47__add_post_destory_chaser_tasks__ = {"__add_post_destory_chaser_tasks__", (PyCFunction)__pyx_pw_7parabam_6chaser_7Handler_47__add_post_destory_chaser_tasks__, METH_O, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_47__add_post_destory_chaser_tasks__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__add_post_destory_chaser_tasks__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_46__add_post_destory_chaser_tasks__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_46__add_post_destory_chaser_tasks__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_post_destroy_tasks = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("__add_post_destory_chaser_tasks__", 0);

  /* "parabam/chaser.pyx":469
 * 
 *     def __add_post_destory_chaser_tasks__(self):
 *         if self._destroy and not self._post_destroy_tasks_added:             # <<<<<<<<<<<<<<
 *             self._post_destroy_tasks_added = True
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_destroy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 469, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_post_destroy_tasks_added); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 469, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = ((!__pyx_t_3) != 0);
  __pyx_t_1 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "parabam/chaser.pyx":470
 *     def __add_post_destory_chaser_tasks__(self):
 *         if self._destroy and not self._post_destroy_tasks_added:
 *             self._post_destroy_tasks_added = True             # <<<<<<<<<<<<<<
 * 
 *             self._max_jobs = self._max_jobs * 2
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_post_destroy_tasks_added, Py_True) < 0) __PYX_ERR(0, 470, __pyx_L1_error)

    /* "parabam/chaser.pyx":472
 *             self._post_destroy_tasks_added = True
 * 
 *             self._max_jobs = self._max_jobs * 2             # <<<<<<<<<<<<<<
 *             post_destroy_tasks = self.__create_chaser_tasks__(\
 *                                                 self._constants.total_procs)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_max_jobs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 472, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = PyNumber_Multiply(__pyx_t_2, __pyx_int_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 472, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_max_jobs, __pyx_t_5) < 0) __PYX_ERR(0, 472, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "parabam/chaser.pyx":473
 * 
 *             self._max_jobs = self._max_jobs * 2
 *             post_destroy_tasks = self.__create_chaser_tasks__(\             # <<<<<<<<<<<<<<
 *                                                 self._constants.total_procs)
 *             self._chaser_tasks.extend(post_destroy_tasks)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_create_chaser_tasks); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 473, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "parabam/chaser.pyx":474
 *             self._max_jobs = self._max_jobs * 2
 *             post_destroy_tasks = self.__create_chaser_tasks__(\
 *                                                 self._constants.total_procs)             # <<<<<<<<<<<<<<
 *             self._chaser_tasks.extend(post_destroy_tasks)
 * 
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_constants_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 474, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_total_procs); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 474, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 473, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_post_destroy_tasks = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "parabam/chaser.pyx":475
 *             post_destroy_tasks = self.__create_chaser_tasks__(\
 *                                                 self._constants.total_procs)
 *             self._chaser_tasks.extend(post_destroy_tasks)             # <<<<<<<<<<<<<<
 * 
 *     def __pyramid_is_empty__(self,saved):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_chaser_tasks); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_extend); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_5 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_2, __pyx_v_post_destroy_tasks) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_post_destroy_tasks);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "parabam/chaser.pyx":469
 * 
 *     def __add_post_destory_chaser_tasks__(self):
 *         if self._destroy and not self._post_destroy_tasks_added:             # <<<<<<<<<<<<<<
 *             self._post_destroy_tasks_added = True
 * 
 */
  }

  /* "parabam/chaser.pyx":468
 *                 self._finished = True
 * 
 *     def __add_post_destory_chaser_tasks__(self):             # <<<<<<<<<<<<<<
 *         if self._destroy and not self._post_destroy_tasks_added:
 *             self._post_destroy_tasks_added = True
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("parabam.chaser.Handler.__add_post_destory_chaser_tasks__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_post_destroy_tasks);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":477
 *             self._chaser_tasks.extend(post_destroy_tasks)
 * 
 *     def __pyramid_is_empty__(self,saved):             # <<<<<<<<<<<<<<
 *         return (self._files_in_pyramid == 0 and \
 *                 self._pending_jobs == 0 and \
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_49__pyramid_is_empty__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_49__pyramid_is_empty__ = {"__pyramid_is_empty__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_7Handler_49__pyramid_is_empty__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_49__pyramid_is_empty__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_saved = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyramid_is_empty__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_saved,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_saved)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyramid_is_empty__", 1, 2, 2, 1); __PYX_ERR(0, 477, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyramid_is_empty__") < 0)) __PYX_ERR(0, 477, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_saved = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyramid_is_empty__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 477, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.Handler.__pyramid_is_empty__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_48__pyramid_is_empty__(__pyx_self, __pyx_v_self, __pyx_v_saved);

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_48__pyramid_is_empty__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_saved) {
  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;
  __Pyx_RefNannySetupContext("__pyramid_is_empty__", 0);

  /* "parabam/chaser.pyx":478
 * 
 *     def __pyramid_is_empty__(self,saved):
 *         return (self._files_in_pyramid == 0 and \             # <<<<<<<<<<<<<<
 *                 self._pending_jobs == 0 and \
 *                 saved == 0 and \
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_files_in_pyramid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 478, __pyx_L1_error)
  if (__pyx_t_4) {
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }

  /* "parabam/chaser.pyx":479
 *     def __pyramid_is_empty__(self,saved):
 *         return (self._files_in_pyramid == 0 and \
 *                 self._pending_jobs == 0 and \             # <<<<<<<<<<<<<<
 *                 saved == 0 and \
 *                 self.__is_queue_empty__())
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pending_jobs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_3, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 479, __pyx_L1_error)
  if (__pyx_t_4) {
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L3_bool_binop_done;
  }

  /* "parabam/chaser.pyx":480
 *         return (self._files_in_pyramid == 0 and \
 *                 self._pending_jobs == 0 and \
 *                 saved == 0 and \             # <<<<<<<<<<<<<<
 *                 self.__is_queue_empty__())
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_v_saved, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 480, __pyx_L1_error)
  if (__pyx_t_4) {
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L3_bool_binop_done;
  }

  /* "parabam/chaser.pyx":481
 *                 self._pending_jobs == 0 and \
 *                 saved == 0 and \
 *                 self.__is_queue_empty__())             # <<<<<<<<<<<<<<
 * 
 *     def __set_new_stale_thresh__(self):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_is_queue_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_1 = __pyx_t_2;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "parabam/chaser.pyx":477
 *             self._chaser_tasks.extend(post_destroy_tasks)
 * 
 *     def __pyramid_is_empty__(self,saved):             # <<<<<<<<<<<<<<
 *         return (self._files_in_pyramid == 0 and \
 *                 self._pending_jobs == 0 and \
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("parabam.chaser.Handler.__pyramid_is_empty__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":483
 *                 self.__is_queue_empty__())
 * 
 *     def __set_new_stale_thresh__(self):             # <<<<<<<<<<<<<<
 *         self._stale_thresh = (10 + (self._files_in_pyramid * 5) \
 *                                  + (self._pending_jobs * 8))
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_51__set_new_stale_thresh__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_51__set_new_stale_thresh__ = {"__set_new_stale_thresh__", (PyCFunction)__pyx_pw_7parabam_6chaser_7Handler_51__set_new_stale_thresh__, METH_O, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_51__set_new_stale_thresh__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set_new_stale_thresh__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_50__set_new_stale_thresh__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_50__set_new_stale_thresh__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__set_new_stale_thresh__", 0);

  /* "parabam/chaser.pyx":484
 * 
 *     def __set_new_stale_thresh__(self):
 *         self._stale_thresh = (10 + (self._files_in_pyramid * 5) \             # <<<<<<<<<<<<<<
 *                                  + (self._pending_jobs * 8))
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_files_in_pyramid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_Multiply(__pyx_t_1, __pyx_int_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_AddCObj(__pyx_int_10, __pyx_t_2, 10, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "parabam/chaser.pyx":485
 *     def __set_new_stale_thresh__(self):
 *         self._stale_thresh = (10 + (self._files_in_pyramid * 5) \
 *                                  + (self._pending_jobs * 8))             # <<<<<<<<<<<<<<
 * 
 *     def __is_queue_empty__(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pending_jobs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_2, __pyx_int_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "parabam/chaser.pyx":484
 * 
 *     def __set_new_stale_thresh__(self):
 *         self._stale_thresh = (10 + (self._files_in_pyramid * 5) \             # <<<<<<<<<<<<<<
 *                                  + (self._pending_jobs * 8))
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stale_thresh, __pyx_t_2) < 0) __PYX_ERR(0, 484, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "parabam/chaser.pyx":483
 *                 self.__is_queue_empty__())
 * 
 *     def __set_new_stale_thresh__(self):             # <<<<<<<<<<<<<<
 *         self._stale_thresh = (10 + (self._files_in_pyramid * 5) \
 *                                  + (self._pending_jobs * 8))
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("parabam.chaser.Handler.__set_new_stale_thresh__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":487
 *                                  + (self._pending_jobs * 8))
 * 
 *     def __is_queue_empty__(self):             # <<<<<<<<<<<<<<
 *         try:
 *             pack = self._inqu.get(True,10)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_53__is_queue_empty__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_53__is_queue_empty__ = {"__is_queue_empty__", (PyCFunction)__pyx_pw_7parabam_6chaser_7Handler_53__is_queue_empty__, METH_O, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_53__is_queue_empty__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__is_queue_empty__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_52__is_queue_empty__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_52__is_queue_empty__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_pack = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  __Pyx_RefNannySetupContext("__is_queue_empty__", 0);

  /* "parabam/chaser.pyx":488
 * 
 *     def __is_queue_empty__(self):
 *         try:             # <<<<<<<<<<<<<<
 *             pack = self._inqu.get(True,10)
 *             self._inqu.put(pack)
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "parabam/chaser.pyx":489
 *     def __is_queue_empty__(self):
 *         try:
 *             pack = self._inqu.get(True,10)             # <<<<<<<<<<<<<<
 *             self._inqu.put(pack)
 *             return False
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inqu_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 489, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 489, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 489, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_pack = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "parabam/chaser.pyx":490
 *         try:
 *             pack = self._inqu.get(True,10)
 *             self._inqu.put(pack)             # <<<<<<<<<<<<<<
 *             return False
 *         except Queue2.Empty:
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inqu_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 490, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_put); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 490, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_v_pack) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_pack);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 490, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "parabam/chaser.pyx":491
 *             pack = self._inqu.get(True,10)
 *             self._inqu.put(pack)
 *             return False             # <<<<<<<<<<<<<<
 *         except Queue2.Empty:
 *             return True
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      goto __pyx_L7_try_return;

      /* "parabam/chaser.pyx":488
 * 
 *     def __is_queue_empty__(self):
 *         try:             # <<<<<<<<<<<<<<
 *             pack = self._inqu.get(True,10)
 *             self._inqu.put(pack)
 */
    }
    __pyx_L3_error:;
    __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;

    /* "parabam/chaser.pyx":492
 *             self._inqu.put(pack)
 *             return False
 *         except Queue2.Empty:             # <<<<<<<<<<<<<<
 *             return True
 * 
 */
    __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5);
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Queue2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 492, __pyx_L5_except_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_Empty); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 492, __pyx_L5_except_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_9 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_4, __pyx_t_8);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_ErrRestore(__pyx_t_4, __pyx_t_6, __pyx_t_5);
    __pyx_t_4 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0;
    if (__pyx_t_9) {
      __Pyx_AddTraceback("parabam.chaser.Handler.__is_queue_empty__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_4) < 0) __PYX_ERR(0, 492, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_4);

      /* "parabam/chaser.pyx":493
 *             return False
 *         except Queue2.Empty:
 *             return True             # <<<<<<<<<<<<<<
 * 
 *     def __save_purgatory_loners__(self):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      __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;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "parabam/chaser.pyx":488
 * 
 *     def __is_queue_empty__(self):
 *         try:             # <<<<<<<<<<<<<<
 *             pack = self._inqu.get(True,10)
 *             self._inqu.put(pack)
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
  }

  /* "parabam/chaser.pyx":487
 *                                  + (self._pending_jobs * 8))
 * 
 *     def __is_queue_empty__(self):             # <<<<<<<<<<<<<<
 *         try:
 *             pack = self._inqu.get(True,10)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("parabam.chaser.Handler.__is_queue_empty__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pack);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":495
 *             return True
 * 
 *     def __save_purgatory_loners__(self):             # <<<<<<<<<<<<<<
 *         saved = 0
 *         saved_keys = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_55__save_purgatory_loners__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_55__save_purgatory_loners__ = {"__save_purgatory_loners__", (PyCFunction)__pyx_pw_7parabam_6chaser_7Handler_55__save_purgatory_loners__, METH_O, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_55__save_purgatory_loners__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__save_purgatory_loners__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_54__save_purgatory_loners__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_54__save_purgatory_loners__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_saved = NULL;
  PyObject *__pyx_v_saved_keys = NULL;
  PyObject *__pyx_v_loner_type = NULL;
  PyObject *__pyx_v_paths = NULL;
  PyObject *__pyx_v_path = NULL;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  int __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  __Pyx_RefNannySetupContext("__save_purgatory_loners__", 0);

  /* "parabam/chaser.pyx":496
 * 
 *     def __save_purgatory_loners__(self):
 *         saved = 0             # <<<<<<<<<<<<<<
 *         saved_keys = []
 *         for loner_type,paths in self._loner_purgatory.items():
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_saved = __pyx_int_0;

  /* "parabam/chaser.pyx":497
 *     def __save_purgatory_loners__(self):
 *         saved = 0
 *         saved_keys = []             # <<<<<<<<<<<<<<
 *         for loner_type,paths in self._loner_purgatory.items():
 *             if len(paths) > 1:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_saved_keys = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":498
 *         saved = 0
 *         saved_keys = []
 *         for loner_type,paths in self._loner_purgatory.items():             # <<<<<<<<<<<<<<
 *             if len(paths) > 1:
 *                 saved += 1
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_loner_purgatory); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 498, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 498, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 498, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 498, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 498, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 498, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 498, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 498, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      #else
      __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 498, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 498, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 498, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
      index = 0; __pyx_t_2 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 498, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 498, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_loner_type, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_paths, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "parabam/chaser.pyx":499
 *         saved_keys = []
 *         for loner_type,paths in self._loner_purgatory.items():
 *             if len(paths) > 1:             # <<<<<<<<<<<<<<
 *                 saved += 1
 *                 saved_keys.append(loner_type)
 */
    __pyx_t_9 = PyObject_Length(__pyx_v_paths); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 499, __pyx_L1_error)
    __pyx_t_10 = ((__pyx_t_9 > 1) != 0);
    if (__pyx_t_10) {

      /* "parabam/chaser.pyx":500
 *         for loner_type,paths in self._loner_purgatory.items():
 *             if len(paths) > 1:
 *                 saved += 1             # <<<<<<<<<<<<<<
 *                 saved_keys.append(loner_type)
 *                 self._pyramid_idle_counts[loner_type] = 100
 */
      __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_saved, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_saved, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "parabam/chaser.pyx":501
 *             if len(paths) > 1:
 *                 saved += 1
 *                 saved_keys.append(loner_type)             # <<<<<<<<<<<<<<
 *                 self._pyramid_idle_counts[loner_type] = 100
 *                 for path in paths:
 */
      __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_saved_keys, __pyx_v_loner_type); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 501, __pyx_L1_error)

      /* "parabam/chaser.pyx":502
 *                 saved += 1
 *                 saved_keys.append(loner_type)
 *                 self._pyramid_idle_counts[loner_type] = 100             # <<<<<<<<<<<<<<
 *                 for path in paths:
 *                     self.__add_to_pyramid__(loner_type,0,path)
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pyramid_idle_counts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_loner_type, __pyx_int_100) < 0)) __PYX_ERR(0, 502, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "parabam/chaser.pyx":503
 *                 saved_keys.append(loner_type)
 *                 self._pyramid_idle_counts[loner_type] = 100
 *                 for path in paths:             # <<<<<<<<<<<<<<
 *                     self.__add_to_pyramid__(loner_type,0,path)
 *         for key in saved_keys:
 */
      if (likely(PyList_CheckExact(__pyx_v_paths)) || PyTuple_CheckExact(__pyx_v_paths)) {
        __pyx_t_1 = __pyx_v_paths; __Pyx_INCREF(__pyx_t_1); __pyx_t_9 = 0;
        __pyx_t_12 = NULL;
      } else {
        __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_paths); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 503, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_12 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 503, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_12)) {
          if (likely(PyList_CheckExact(__pyx_t_1))) {
            if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 503, __pyx_L1_error)
            #else
            __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 503, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            #endif
          } else {
            if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 503, __pyx_L1_error)
            #else
            __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 503, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            #endif
          }
        } else {
          __pyx_t_6 = __pyx_t_12(__pyx_t_1);
          if (unlikely(!__pyx_t_6)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 503, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_6);
        }
        __Pyx_XDECREF_SET(__pyx_v_path, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "parabam/chaser.pyx":504
 *                 self._pyramid_idle_counts[loner_type] = 100
 *                 for path in paths:
 *                     self.__add_to_pyramid__(loner_type,0,path)             # <<<<<<<<<<<<<<
 *         for key in saved_keys:
 *             del self._loner_purgatory[key]
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_add_to_pyramid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 504, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_7 = NULL;
        __pyx_t_13 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
            __pyx_t_13 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_2)) {
          PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_loner_type, __pyx_int_0, __pyx_v_path};
          __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 504, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_GOTREF(__pyx_t_6);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
          PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_loner_type, __pyx_int_0, __pyx_v_path};
          __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 504, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_GOTREF(__pyx_t_6);
        } else
        #endif
        {
          __pyx_t_14 = PyTuple_New(3+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 504, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          if (__pyx_t_7) {
            __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_7); __pyx_t_7 = NULL;
          }
          __Pyx_INCREF(__pyx_v_loner_type);
          __Pyx_GIVEREF(__pyx_v_loner_type);
          PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_13, __pyx_v_loner_type);
          __Pyx_INCREF(__pyx_int_0);
          __Pyx_GIVEREF(__pyx_int_0);
          PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_13, __pyx_int_0);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_14, 2+__pyx_t_13, __pyx_v_path);
          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_14, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 504, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "parabam/chaser.pyx":503
 *                 saved_keys.append(loner_type)
 *                 self._pyramid_idle_counts[loner_type] = 100
 *                 for path in paths:             # <<<<<<<<<<<<<<
 *                     self.__add_to_pyramid__(loner_type,0,path)
 *         for key in saved_keys:
 */
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "parabam/chaser.pyx":499
 *         saved_keys = []
 *         for loner_type,paths in self._loner_purgatory.items():
 *             if len(paths) > 1:             # <<<<<<<<<<<<<<
 *                 saved += 1
 *                 saved_keys.append(loner_type)
 */
    }

    /* "parabam/chaser.pyx":498
 *         saved = 0
 *         saved_keys = []
 *         for loner_type,paths in self._loner_purgatory.items():             # <<<<<<<<<<<<<<
 *             if len(paths) > 1:
 *                 saved += 1
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "parabam/chaser.pyx":505
 *                 for path in paths:
 *                     self.__add_to_pyramid__(loner_type,0,path)
 *         for key in saved_keys:             # <<<<<<<<<<<<<<
 *             del self._loner_purgatory[key]
 *         gc.collect()
 */
  __pyx_t_3 = __pyx_v_saved_keys; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
  for (;;) {
    if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 505, __pyx_L1_error)
    #else
    __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":506
 *                     self.__add_to_pyramid__(loner_type,0,path)
 *         for key in saved_keys:
 *             del self._loner_purgatory[key]             # <<<<<<<<<<<<<<
 *         gc.collect()
 *         return saved
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_loner_purgatory); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyObject_DelItem(__pyx_t_1, __pyx_v_key) < 0)) __PYX_ERR(0, 506, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":505
 *                 for path in paths:
 *                     self.__add_to_pyramid__(loner_type,0,path)
 *         for key in saved_keys:             # <<<<<<<<<<<<<<
 *             del self._loner_purgatory[key]
 *         gc.collect()
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "parabam/chaser.pyx":507
 *         for key in saved_keys:
 *             del self._loner_purgatory[key]
 *         gc.collect()             # <<<<<<<<<<<<<<
 *         return saved
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_gc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_collect); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "parabam/chaser.pyx":508
 *             del self._loner_purgatory[key]
 *         gc.collect()
 *         return saved             # <<<<<<<<<<<<<<
 * 
 *     def __add_to_pyramid__(self,loner_type,level,path):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_saved);
  __pyx_r = __pyx_v_saved;
  goto __pyx_L0;

  /* "parabam/chaser.pyx":495
 *             return True
 * 
 *     def __save_purgatory_loners__(self):             # <<<<<<<<<<<<<<
 *         saved = 0
 *         saved_keys = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("parabam.chaser.Handler.__save_purgatory_loners__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_saved);
  __Pyx_XDECREF(__pyx_v_saved_keys);
  __Pyx_XDECREF(__pyx_v_loner_type);
  __Pyx_XDECREF(__pyx_v_paths);
  __Pyx_XDECREF(__pyx_v_path);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":510
 *         return saved
 * 
 *     def __add_to_pyramid__(self,loner_type,level,path):             # <<<<<<<<<<<<<<
 *         self._loner_pyramid[loner_type][level].append(path)
 *         self._files_in_pyramid += 1
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_57__add_to_pyramid__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_57__add_to_pyramid__ = {"__add_to_pyramid__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_7Handler_57__add_to_pyramid__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_57__add_to_pyramid__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_loner_type = 0;
  PyObject *__pyx_v_level = 0;
  PyObject *__pyx_v_path = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__add_to_pyramid__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_loner_type,&__pyx_n_s_level,&__pyx_n_s_path,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loner_type)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__add_to_pyramid__", 1, 4, 4, 1); __PYX_ERR(0, 510, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_level)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__add_to_pyramid__", 1, 4, 4, 2); __PYX_ERR(0, 510, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_path)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__add_to_pyramid__", 1, 4, 4, 3); __PYX_ERR(0, 510, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__add_to_pyramid__") < 0)) __PYX_ERR(0, 510, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_self = values[0];
    __pyx_v_loner_type = values[1];
    __pyx_v_level = values[2];
    __pyx_v_path = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__add_to_pyramid__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 510, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.Handler.__add_to_pyramid__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_56__add_to_pyramid__(__pyx_self, __pyx_v_self, __pyx_v_loner_type, __pyx_v_level, __pyx_v_path);

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_56__add_to_pyramid__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_loner_type, PyObject *__pyx_v_level, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("__add_to_pyramid__", 0);

  /* "parabam/chaser.pyx":511
 * 
 *     def __add_to_pyramid__(self,loner_type,level,path):
 *         self._loner_pyramid[loner_type][level].append(path)             # <<<<<<<<<<<<<<
 *         self._files_in_pyramid += 1
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_loner_pyramid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_loner_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_level); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_v_path); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":512
 *     def __add_to_pyramid__(self,loner_type,level,path):
 *         self._loner_pyramid[loner_type][level].append(path)
 *         self._files_in_pyramid += 1             # <<<<<<<<<<<<<<
 * 
 *     def __remove_from_pyramid__(self,loner_type,level,path):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_files_in_pyramid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_files_in_pyramid, __pyx_t_2) < 0) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "parabam/chaser.pyx":510
 *         return saved
 * 
 *     def __add_to_pyramid__(self,loner_type,level,path):             # <<<<<<<<<<<<<<
 *         self._loner_pyramid[loner_type][level].append(path)
 *         self._files_in_pyramid += 1
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("parabam.chaser.Handler.__add_to_pyramid__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":514
 *         self._files_in_pyramid += 1
 * 
 *     def __remove_from_pyramid__(self,loner_type,level,path):             # <<<<<<<<<<<<<<
 *         self._loner_pyramid[loner_type][level].remove(path)
 *         self._files_in_pyramid -= 1
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_59__remove_from_pyramid__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_59__remove_from_pyramid__ = {"__remove_from_pyramid__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_7Handler_59__remove_from_pyramid__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_59__remove_from_pyramid__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_loner_type = 0;
  PyObject *__pyx_v_level = 0;
  PyObject *__pyx_v_path = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__remove_from_pyramid__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_loner_type,&__pyx_n_s_level,&__pyx_n_s_path,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loner_type)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__remove_from_pyramid__", 1, 4, 4, 1); __PYX_ERR(0, 514, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_level)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__remove_from_pyramid__", 1, 4, 4, 2); __PYX_ERR(0, 514, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_path)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__remove_from_pyramid__", 1, 4, 4, 3); __PYX_ERR(0, 514, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__remove_from_pyramid__") < 0)) __PYX_ERR(0, 514, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_self = values[0];
    __pyx_v_loner_type = values[1];
    __pyx_v_level = values[2];
    __pyx_v_path = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__remove_from_pyramid__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 514, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.Handler.__remove_from_pyramid__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_58__remove_from_pyramid__(__pyx_self, __pyx_v_self, __pyx_v_loner_type, __pyx_v_level, __pyx_v_path);

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_58__remove_from_pyramid__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_loner_type, PyObject *__pyx_v_level, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__remove_from_pyramid__", 0);

  /* "parabam/chaser.pyx":515
 * 
 *     def __remove_from_pyramid__(self,loner_type,level,path):
 *         self._loner_pyramid[loner_type][level].remove(path)             # <<<<<<<<<<<<<<
 *         self._files_in_pyramid -= 1
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_loner_pyramid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_loner_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_level); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_remove); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_path) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_path);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":516
 *     def __remove_from_pyramid__(self,loner_type,level,path):
 *         self._loner_pyramid[loner_type][level].remove(path)
 *         self._files_in_pyramid -= 1             # <<<<<<<<<<<<<<
 * 
 *     def __get_paths__(self,loner_type,sub_pyramid,level):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_files_in_pyramid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_files_in_pyramid, __pyx_t_3) < 0) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "parabam/chaser.pyx":514
 *         self._files_in_pyramid += 1
 * 
 *     def __remove_from_pyramid__(self,loner_type,level,path):             # <<<<<<<<<<<<<<
 *         self._loner_pyramid[loner_type][level].remove(path)
 *         self._files_in_pyramid -= 1
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("parabam.chaser.Handler.__remove_from_pyramid__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":518
 *         self._files_in_pyramid -= 1
 * 
 *     def __get_paths__(self,loner_type,sub_pyramid,level):             # <<<<<<<<<<<<<<
 *         if not self._destroy and "UM" in loner_type:
 *             return []
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_61__get_paths__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_61__get_paths__ = {"__get_paths__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_7Handler_61__get_paths__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_61__get_paths__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_loner_type = 0;
  PyObject *__pyx_v_sub_pyramid = 0;
  PyObject *__pyx_v_level = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get_paths__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_loner_type,&__pyx_n_s_sub_pyramid,&__pyx_n_s_level,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loner_type)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__get_paths__", 1, 4, 4, 1); __PYX_ERR(0, 518, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sub_pyramid)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__get_paths__", 1, 4, 4, 2); __PYX_ERR(0, 518, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_level)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__get_paths__", 1, 4, 4, 3); __PYX_ERR(0, 518, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__get_paths__") < 0)) __PYX_ERR(0, 518, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_self = values[0];
    __pyx_v_loner_type = values[1];
    __pyx_v_sub_pyramid = values[2];
    __pyx_v_level = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__get_paths__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 518, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.Handler.__get_paths__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_60__get_paths__(__pyx_self, __pyx_v_self, __pyx_v_loner_type, __pyx_v_sub_pyramid, __pyx_v_level);

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_60__get_paths__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_loner_type, PyObject *__pyx_v_sub_pyramid, PyObject *__pyx_v_level) {
  PyObject *__pyx_v_task_size = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  __Pyx_RefNannySetupContext("__get_paths__", 0);

  /* "parabam/chaser.pyx":519
 * 
 *     def __get_paths__(self,loner_type,sub_pyramid,level):
 *         if not self._destroy and "UM" in loner_type:             # <<<<<<<<<<<<<<
 *             return []
 *         task_size = self.__get_task_size__(level,loner_type)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_destroy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 519, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = ((!__pyx_t_3) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_UM, __pyx_v_loner_type, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 519, __pyx_L1_error)
  __pyx_t_3 = (__pyx_t_4 != 0);
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "parabam/chaser.pyx":520
 *     def __get_paths__(self,loner_type,sub_pyramid,level):
 *         if not self._destroy and "UM" in loner_type:
 *             return []             # <<<<<<<<<<<<<<
 *         task_size = self.__get_task_size__(level,loner_type)
 *         if len(sub_pyramid) >= task_size:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 520, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "parabam/chaser.pyx":519
 * 
 *     def __get_paths__(self,loner_type,sub_pyramid,level):
 *         if not self._destroy and "UM" in loner_type:             # <<<<<<<<<<<<<<
 *             return []
 *         task_size = self.__get_task_size__(level,loner_type)
 */
  }

  /* "parabam/chaser.pyx":521
 *         if not self._destroy and "UM" in loner_type:
 *             return []
 *         task_size = self.__get_task_size__(level,loner_type)             # <<<<<<<<<<<<<<
 *         if len(sub_pyramid) >= task_size:
 *             if "XX" in loner_type and not self._destroy:
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_task_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_level, __pyx_v_loner_type};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 521, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_level, __pyx_v_loner_type};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 521, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 521, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_INCREF(__pyx_v_level);
    __Pyx_GIVEREF(__pyx_v_level);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_level);
    __Pyx_INCREF(__pyx_v_loner_type);
    __Pyx_GIVEREF(__pyx_v_loner_type);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_loner_type);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 521, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_task_size = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "parabam/chaser.pyx":522
 *             return []
 *         task_size = self.__get_task_size__(level,loner_type)
 *         if len(sub_pyramid) >= task_size:             # <<<<<<<<<<<<<<
 *             if "XX" in loner_type and not self._destroy:
 *                 return sub_pyramid[:task_size]
 */
  __pyx_t_9 = PyObject_Length(__pyx_v_sub_pyramid); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 522, __pyx_L1_error)
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_v_task_size, Py_GE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 522, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 522, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_1) {

    /* "parabam/chaser.pyx":523
 *         task_size = self.__get_task_size__(level,loner_type)
 *         if len(sub_pyramid) >= task_size:
 *             if "XX" in loner_type and not self._destroy:             # <<<<<<<<<<<<<<
 *                 return sub_pyramid[:task_size]
 *             else:
 */
    __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_XX, __pyx_v_loner_type, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 523, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_3 != 0);
    if (__pyx_t_4) {
    } else {
      __pyx_t_1 = __pyx_t_4;
      goto __pyx_L8_bool_binop_done;
    }
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_destroy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 523, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_3 = ((!__pyx_t_4) != 0);
    __pyx_t_1 = __pyx_t_3;
    __pyx_L8_bool_binop_done:;
    if (__pyx_t_1) {

      /* "parabam/chaser.pyx":524
 *         if len(sub_pyramid) >= task_size:
 *             if "XX" in loner_type and not self._destroy:
 *                 return sub_pyramid[:task_size]             # <<<<<<<<<<<<<<
 *             else:
 *                 return random.sample(sub_pyramid,task_size)
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_sub_pyramid, 0, 0, NULL, &__pyx_v_task_size, NULL, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 524, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "parabam/chaser.pyx":523
 *         task_size = self.__get_task_size__(level,loner_type)
 *         if len(sub_pyramid) >= task_size:
 *             if "XX" in loner_type and not self._destroy:             # <<<<<<<<<<<<<<
 *                 return sub_pyramid[:task_size]
 *             else:
 */
    }

    /* "parabam/chaser.pyx":526
 *                 return sub_pyramid[:task_size]
 *             else:
 *                 return random.sample(sub_pyramid,task_size)             # <<<<<<<<<<<<<<
 *         return []
 * 
 */
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_random); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 526, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sample); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 526, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
          __pyx_t_7 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_sub_pyramid, __pyx_v_task_size};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 526, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_5);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_sub_pyramid, __pyx_v_task_size};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 526, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_5);
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 526, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (__pyx_t_2) {
          __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
        }
        __Pyx_INCREF(__pyx_v_sub_pyramid);
        __Pyx_GIVEREF(__pyx_v_sub_pyramid);
        PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_v_sub_pyramid);
        __Pyx_INCREF(__pyx_v_task_size);
        __Pyx_GIVEREF(__pyx_v_task_size);
        PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_v_task_size);
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 526, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L0;
    }

    /* "parabam/chaser.pyx":522
 *             return []
 *         task_size = self.__get_task_size__(level,loner_type)
 *         if len(sub_pyramid) >= task_size:             # <<<<<<<<<<<<<<
 *             if "XX" in loner_type and not self._destroy:
 *                 return sub_pyramid[:task_size]
 */
  }

  /* "parabam/chaser.pyx":527
 *             else:
 *                 return random.sample(sub_pyramid,task_size)
 *         return []             # <<<<<<<<<<<<<<
 * 
 *     def __tidy_pyramid__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "parabam/chaser.pyx":518
 *         self._files_in_pyramid -= 1
 * 
 *     def __get_paths__(self,loner_type,sub_pyramid,level):             # <<<<<<<<<<<<<<
 *         if not self._destroy and "UM" in loner_type:
 *             return []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("parabam.chaser.Handler.__get_paths__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_task_size);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":529
 *         return []
 * 
 *     def __tidy_pyramid__(self):             # <<<<<<<<<<<<<<
 *         reads_found = self.__wait_for_remaining_jobs__()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_63__tidy_pyramid__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_63__tidy_pyramid__ = {"__tidy_pyramid__", (PyCFunction)__pyx_pw_7parabam_6chaser_7Handler_63__tidy_pyramid__, METH_O, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_63__tidy_pyramid__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__tidy_pyramid__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_62__tidy_pyramid__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_62__tidy_pyramid__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_reads_found = NULL;
  PyObject *__pyx_v_loner_type = NULL;
  PyObject *__pyx_v_pyramid = NULL;
  PyObject *__pyx_v_level = NULL;
  PyObject *__pyx_v_sub_pyramid = NULL;
  PyObject *__pyx_v_path = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  Py_ssize_t __pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  Py_ssize_t __pyx_t_13;
  PyObject *(*__pyx_t_14)(PyObject *);
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  __Pyx_RefNannySetupContext("__tidy_pyramid__", 0);

  /* "parabam/chaser.pyx":530
 * 
 *     def __tidy_pyramid__(self):
 *         reads_found = self.__wait_for_remaining_jobs__()             # <<<<<<<<<<<<<<
 * 
 *         if not reads_found:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wait_for_remaining_jobs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_reads_found = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":532
 *         reads_found = self.__wait_for_remaining_jobs__()
 * 
 *         if not reads_found:             # <<<<<<<<<<<<<<
 *             for loner_type,pyramid in self._loner_pyramid.items():
 *                 for level,sub_pyramid in enumerate(pyramid):
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_reads_found); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 532, __pyx_L1_error)
  __pyx_t_5 = ((!__pyx_t_4) != 0);
  if (__pyx_t_5) {

    /* "parabam/chaser.pyx":533
 * 
 *         if not reads_found:
 *             for loner_type,pyramid in self._loner_pyramid.items():             # <<<<<<<<<<<<<<
 *                 for level,sub_pyramid in enumerate(pyramid):
 *                     for path in sub_pyramid:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_loner_pyramid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 533, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 533, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 533, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
      __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 533, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 533, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      if (likely(!__pyx_t_7)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 533, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 533, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 533, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 533, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_7(__pyx_t_3);
        if (unlikely(!__pyx_t_1)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 533, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
        PyObject* sequence = __pyx_t_1;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 533, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_8);
        #else
        __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 533, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 533, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        #endif
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 533, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
        index = 0; __pyx_t_2 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_2)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_8);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 533, __pyx_L1_error)
        __pyx_t_10 = NULL;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L7_unpacking_done;
        __pyx_L6_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_10 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 533, __pyx_L1_error)
        __pyx_L7_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_loner_type, __pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_XDECREF_SET(__pyx_v_pyramid, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "parabam/chaser.pyx":534
 *         if not reads_found:
 *             for loner_type,pyramid in self._loner_pyramid.items():
 *                 for level,sub_pyramid in enumerate(pyramid):             # <<<<<<<<<<<<<<
 *                     for path in sub_pyramid:
 *                         self.__remove_from_pyramid__(loner_type,level,path)
 */
      __Pyx_INCREF(__pyx_int_0);
      __pyx_t_1 = __pyx_int_0;
      if (likely(PyList_CheckExact(__pyx_v_pyramid)) || PyTuple_CheckExact(__pyx_v_pyramid)) {
        __pyx_t_8 = __pyx_v_pyramid; __Pyx_INCREF(__pyx_t_8); __pyx_t_11 = 0;
        __pyx_t_12 = NULL;
      } else {
        __pyx_t_11 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_pyramid); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 534, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_12 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 534, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_12)) {
          if (likely(PyList_CheckExact(__pyx_t_8))) {
            if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_8)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_2 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 534, __pyx_L1_error)
            #else
            __pyx_t_2 = PySequence_ITEM(__pyx_t_8, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 534, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          } else {
            if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 534, __pyx_L1_error)
            #else
            __pyx_t_2 = PySequence_ITEM(__pyx_t_8, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 534, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          }
        } else {
          __pyx_t_2 = __pyx_t_12(__pyx_t_8);
          if (unlikely(!__pyx_t_2)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 534, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_XDECREF_SET(__pyx_v_sub_pyramid, __pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_XDECREF_SET(__pyx_v_level, __pyx_t_1);
        __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 534, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1);
        __pyx_t_1 = __pyx_t_2;
        __pyx_t_2 = 0;

        /* "parabam/chaser.pyx":535
 *             for loner_type,pyramid in self._loner_pyramid.items():
 *                 for level,sub_pyramid in enumerate(pyramid):
 *                     for path in sub_pyramid:             # <<<<<<<<<<<<<<
 *                         self.__remove_from_pyramid__(loner_type,level,path)
 *             gc.collect()
 */
        if (likely(PyList_CheckExact(__pyx_v_sub_pyramid)) || PyTuple_CheckExact(__pyx_v_sub_pyramid)) {
          __pyx_t_2 = __pyx_v_sub_pyramid; __Pyx_INCREF(__pyx_t_2); __pyx_t_13 = 0;
          __pyx_t_14 = NULL;
        } else {
          __pyx_t_13 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_sub_pyramid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 535, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_14 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 535, __pyx_L1_error)
        }
        for (;;) {
          if (likely(!__pyx_t_14)) {
            if (likely(PyList_CheckExact(__pyx_t_2))) {
              if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_2)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_9 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_13); __Pyx_INCREF(__pyx_t_9); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 535, __pyx_L1_error)
              #else
              __pyx_t_9 = PySequence_ITEM(__pyx_t_2, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 535, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_9);
              #endif
            } else {
              if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_13); __Pyx_INCREF(__pyx_t_9); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 535, __pyx_L1_error)
              #else
              __pyx_t_9 = PySequence_ITEM(__pyx_t_2, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 535, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_9);
              #endif
            }
          } else {
            __pyx_t_9 = __pyx_t_14(__pyx_t_2);
            if (unlikely(!__pyx_t_9)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                else __PYX_ERR(0, 535, __pyx_L1_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_9);
          }
          __Pyx_XDECREF_SET(__pyx_v_path, __pyx_t_9);
          __pyx_t_9 = 0;

          /* "parabam/chaser.pyx":536
 *                 for level,sub_pyramid in enumerate(pyramid):
 *                     for path in sub_pyramid:
 *                         self.__remove_from_pyramid__(loner_type,level,path)             # <<<<<<<<<<<<<<
 *             gc.collect()
 *             return True
 */
          __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_remove_from_pyramid); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 536, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          __pyx_t_16 = NULL;
          __pyx_t_17 = 0;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
            __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_15);
            if (likely(__pyx_t_16)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
              __Pyx_INCREF(__pyx_t_16);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_15, function);
              __pyx_t_17 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_15)) {
            PyObject *__pyx_temp[4] = {__pyx_t_16, __pyx_v_loner_type, __pyx_v_level, __pyx_v_path};
            __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_17, 3+__pyx_t_17); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 536, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_GOTREF(__pyx_t_9);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
            PyObject *__pyx_temp[4] = {__pyx_t_16, __pyx_v_loner_type, __pyx_v_level, __pyx_v_path};
            __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_17, 3+__pyx_t_17); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 536, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_GOTREF(__pyx_t_9);
          } else
          #endif
          {
            __pyx_t_18 = PyTuple_New(3+__pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 536, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_18);
            if (__pyx_t_16) {
              __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_16); __pyx_t_16 = NULL;
            }
            __Pyx_INCREF(__pyx_v_loner_type);
            __Pyx_GIVEREF(__pyx_v_loner_type);
            PyTuple_SET_ITEM(__pyx_t_18, 0+__pyx_t_17, __pyx_v_loner_type);
            __Pyx_INCREF(__pyx_v_level);
            __Pyx_GIVEREF(__pyx_v_level);
            PyTuple_SET_ITEM(__pyx_t_18, 1+__pyx_t_17, __pyx_v_level);
            __Pyx_INCREF(__pyx_v_path);
            __Pyx_GIVEREF(__pyx_v_path);
            PyTuple_SET_ITEM(__pyx_t_18, 2+__pyx_t_17, __pyx_v_path);
            __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_18, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 536, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
          }
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

          /* "parabam/chaser.pyx":535
 *             for loner_type,pyramid in self._loner_pyramid.items():
 *                 for level,sub_pyramid in enumerate(pyramid):
 *                     for path in sub_pyramid:             # <<<<<<<<<<<<<<
 *                         self.__remove_from_pyramid__(loner_type,level,path)
 *             gc.collect()
 */
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "parabam/chaser.pyx":534
 *         if not reads_found:
 *             for loner_type,pyramid in self._loner_pyramid.items():
 *                 for level,sub_pyramid in enumerate(pyramid):             # <<<<<<<<<<<<<<
 *                     for path in sub_pyramid:
 *                         self.__remove_from_pyramid__(loner_type,level,path)
 */
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "parabam/chaser.pyx":533
 * 
 *         if not reads_found:
 *             for loner_type,pyramid in self._loner_pyramid.items():             # <<<<<<<<<<<<<<
 *                 for level,sub_pyramid in enumerate(pyramid):
 *                     for path in sub_pyramid:
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "parabam/chaser.pyx":537
 *                     for path in sub_pyramid:
 *                         self.__remove_from_pyramid__(loner_type,level,path)
 *             gc.collect()             # <<<<<<<<<<<<<<
 *             return True
 *         else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_gc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 537, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_collect); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 537, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 537, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "parabam/chaser.pyx":538
 *                         self.__remove_from_pyramid__(loner_type,level,path)
 *             gc.collect()
 *             return True             # <<<<<<<<<<<<<<
 *         else:
 *             return False
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    goto __pyx_L0;

    /* "parabam/chaser.pyx":532
 *         reads_found = self.__wait_for_remaining_jobs__()
 * 
 *         if not reads_found:             # <<<<<<<<<<<<<<
 *             for loner_type,pyramid in self._loner_pyramid.items():
 *                 for level,sub_pyramid in enumerate(pyramid):
 */
  }

  /* "parabam/chaser.pyx":540
 *             return True
 *         else:
 *             return False             # <<<<<<<<<<<<<<
 * 
 *     def __wait_for_remaining_jobs__(self):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;
  }

  /* "parabam/chaser.pyx":529
 *         return []
 * 
 *     def __tidy_pyramid__(self):             # <<<<<<<<<<<<<<
 *         reads_found = self.__wait_for_remaining_jobs__()
 * 
 */

  /* 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_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_AddTraceback("parabam.chaser.Handler.__tidy_pyramid__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_reads_found);
  __Pyx_XDECREF(__pyx_v_loner_type);
  __Pyx_XDECREF(__pyx_v_pyramid);
  __Pyx_XDECREF(__pyx_v_level);
  __Pyx_XDECREF(__pyx_v_sub_pyramid);
  __Pyx_XDECREF(__pyx_v_path);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":542
 *             return False
 * 
 *     def __wait_for_remaining_jobs__(self):             # <<<<<<<<<<<<<<
 *         def waiting_update(found,total):
 *             sys.stdout.write(("\r\t- Waiting for tasks to finish: %d/%d ") % \
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_65__wait_for_remaining_jobs__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_65__wait_for_remaining_jobs__ = {"__wait_for_remaining_jobs__", (PyCFunction)__pyx_pw_7parabam_6chaser_7Handler_65__wait_for_remaining_jobs__, METH_O, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_65__wait_for_remaining_jobs__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__wait_for_remaining_jobs__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_64__wait_for_remaining_jobs__(__pyx_self, ((PyObject *)__pyx_v_self));

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

/* "parabam/chaser.pyx":543
 * 
 *     def __wait_for_remaining_jobs__(self):
 *         def waiting_update(found,total):             # <<<<<<<<<<<<<<
 *             sys.stdout.write(("\r\t- Waiting for tasks to finish: %d/%d ") % \
 *                                                             (found,total))
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_27__wait_for_remaining_jobs___1waiting_update(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_27__wait_for_remaining_jobs___1waiting_update = {"waiting_update", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_7Handler_27__wait_for_remaining_jobs___1waiting_update, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_27__wait_for_remaining_jobs___1waiting_update(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_found = 0;
  PyObject *__pyx_v_total = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("waiting_update (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_found,&__pyx_n_s_total,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_found)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_total)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("waiting_update", 1, 2, 2, 1); __PYX_ERR(0, 543, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "waiting_update") < 0)) __PYX_ERR(0, 543, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_found = values[0];
    __pyx_v_total = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("waiting_update", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 543, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.Handler.__wait_for_remaining_jobs__.waiting_update", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_27__wait_for_remaining_jobs___waiting_update(__pyx_self, __pyx_v_found, __pyx_v_total);

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_27__wait_for_remaining_jobs___waiting_update(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_found, PyObject *__pyx_v_total) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("waiting_update", 0);

  /* "parabam/chaser.pyx":544
 *     def __wait_for_remaining_jobs__(self):
 *         def waiting_update(found,total):
 *             sys.stdout.write(("\r\t- Waiting for tasks to finish: %d/%d ") % \             # <<<<<<<<<<<<<<
 *                                                             (found,total))
 *             sys.stdout.flush()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_stdout); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "parabam/chaser.pyx":545
 *         def waiting_update(found,total):
 *             sys.stdout.write(("\r\t- Waiting for tasks to finish: %d/%d ") % \
 *                                                             (found,total))             # <<<<<<<<<<<<<<
 *             sys.stdout.flush()
 * 
 */
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_found);
  __Pyx_GIVEREF(__pyx_v_found);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_found);
  __Pyx_INCREF(__pyx_v_total);
  __Pyx_GIVEREF(__pyx_v_total);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_total);

  /* "parabam/chaser.pyx":544
 *     def __wait_for_remaining_jobs__(self):
 *         def waiting_update(found,total):
 *             sys.stdout.write(("\r\t- Waiting for tasks to finish: %d/%d ") % \             # <<<<<<<<<<<<<<
 *                                                             (found,total))
 *             sys.stdout.flush()
 */
  __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Waiting_for_tasks_to_finish_d_d, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":546
 *             sys.stdout.write(("\r\t- Waiting for tasks to finish: %d/%d ") % \
 *                                                             (found,total))
 *             sys.stdout.flush()             # <<<<<<<<<<<<<<
 * 
 *         if self._constants.verbose:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_stdout); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_flush); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":543
 * 
 *     def __wait_for_remaining_jobs__(self):
 *         def waiting_update(found,total):             # <<<<<<<<<<<<<<
 *             sys.stdout.write(("\r\t- Waiting for tasks to finish: %d/%d ") % \
 *                                                             (found,total))
 */

  /* 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("parabam.chaser.Handler.__wait_for_remaining_jobs__.waiting_update", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":542
 *             return False
 * 
 *     def __wait_for_remaining_jobs__(self):             # <<<<<<<<<<<<<<
 *         def waiting_update(found,total):
 *             sys.stdout.write(("\r\t- Waiting for tasks to finish: %d/%d ") % \
 */

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_64__wait_for_remaining_jobs__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_waiting_update = 0;
  PyObject *__pyx_v_prev_found = NULL;
  PyObject *__pyx_v_jobs_at_start = NULL;
  PyObject *__pyx_v_jobs_found = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_pack = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  __Pyx_RefNannySetupContext("__wait_for_remaining_jobs__", 0);

  /* "parabam/chaser.pyx":543
 * 
 *     def __wait_for_remaining_jobs__(self):
 *         def waiting_update(found,total):             # <<<<<<<<<<<<<<
 *             sys.stdout.write(("\r\t- Waiting for tasks to finish: %d/%d ") % \
 *                                                             (found,total))
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_27__wait_for_remaining_jobs___1waiting_update, 0, __pyx_n_s_Handler___wait_for_remaining_job, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__12)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_waiting_update = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":548
 *             sys.stdout.flush()
 * 
 *         if self._constants.verbose:             # <<<<<<<<<<<<<<
 *             sys.stdout.write("\n")
 *             sys.stdout.flush()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_constants_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_verbose); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 548, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "parabam/chaser.pyx":549
 * 
 *         if self._constants.verbose:
 *             sys.stdout.write("\n")             # <<<<<<<<<<<<<<
 *             sys.stdout.flush()
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 549, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stdout); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 549, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 549, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_kp_s__13) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_kp_s__13);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 549, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "parabam/chaser.pyx":550
 *         if self._constants.verbose:
 *             sys.stdout.write("\n")
 *             sys.stdout.flush()             # <<<<<<<<<<<<<<
 * 
 *         prev_found = self._rescued["total"]
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 550, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stdout); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 550, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_flush); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 550, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 550, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "parabam/chaser.pyx":548
 *             sys.stdout.flush()
 * 
 *         if self._constants.verbose:             # <<<<<<<<<<<<<<
 *             sys.stdout.write("\n")
 *             sys.stdout.flush()
 */
  }

  /* "parabam/chaser.pyx":552
 *             sys.stdout.flush()
 * 
 *         prev_found = self._rescued["total"]             # <<<<<<<<<<<<<<
 *         jobs_at_start = self._pending_jobs
 *         jobs_found = 0
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rescued_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_s_total); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_prev_found = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":553
 * 
 *         prev_found = self._rescued["total"]
 *         jobs_at_start = self._pending_jobs             # <<<<<<<<<<<<<<
 *         jobs_found = 0
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pending_jobs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_jobs_at_start = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":554
 *         prev_found = self._rescued["total"]
 *         jobs_at_start = self._pending_jobs
 *         jobs_found = 0             # <<<<<<<<<<<<<<
 * 
 *         i = 0
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_jobs_found = __pyx_int_0;

  /* "parabam/chaser.pyx":556
 *         jobs_found = 0
 * 
 *         i = 0             # <<<<<<<<<<<<<<
 *         while self._pending_jobs > 0:
 *             if self._constants.verbose and i % 50 == 0:
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_i = __pyx_int_0;

  /* "parabam/chaser.pyx":557
 * 
 *         i = 0
 *         while self._pending_jobs > 0:             # <<<<<<<<<<<<<<
 *             if self._constants.verbose and i % 50 == 0:
 *                 jobs_at_start = self._pending_jobs
 */
  while (1) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pending_jobs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 557, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 557, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 557, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!__pyx_t_3) break;

    /* "parabam/chaser.pyx":558
 *         i = 0
 *         while self._pending_jobs > 0:
 *             if self._constants.verbose and i % 50 == 0:             # <<<<<<<<<<<<<<
 *                 jobs_at_start = self._pending_jobs
 *                 waiting_update(jobs_found,jobs_at_start)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_constants_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 558, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_verbose); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 558, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 558, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_PyInt_RemainderObjC(__pyx_v_i, __pyx_int_50, 50, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 558, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 558, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 558, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_3 = __pyx_t_5;
    __pyx_L7_bool_binop_done:;
    if (__pyx_t_3) {

      /* "parabam/chaser.pyx":559
 *         while self._pending_jobs > 0:
 *             if self._constants.verbose and i % 50 == 0:
 *                 jobs_at_start = self._pending_jobs             # <<<<<<<<<<<<<<
 *                 waiting_update(jobs_found,jobs_at_start)
 *             try:
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pending_jobs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 559, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_jobs_at_start, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "parabam/chaser.pyx":560
 *             if self._constants.verbose and i % 50 == 0:
 *                 jobs_at_start = self._pending_jobs
 *                 waiting_update(jobs_found,jobs_at_start)             # <<<<<<<<<<<<<<
 *             try:
 *                 pack = self._inqu.get(True,10)
 */
      __pyx_t_2 = __pyx_pf_7parabam_6chaser_7Handler_27__wait_for_remaining_jobs___waiting_update(__pyx_v_waiting_update, __pyx_v_jobs_found, __pyx_v_jobs_at_start); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 560, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "parabam/chaser.pyx":558
 *         i = 0
 *         while self._pending_jobs > 0:
 *             if self._constants.verbose and i % 50 == 0:             # <<<<<<<<<<<<<<
 *                 jobs_at_start = self._pending_jobs
 *                 waiting_update(jobs_found,jobs_at_start)
 */
    }

    /* "parabam/chaser.pyx":561
 *                 jobs_at_start = self._pending_jobs
 *                 waiting_update(jobs_found,jobs_at_start)
 *             try:             # <<<<<<<<<<<<<<
 *                 pack = self._inqu.get(True,10)
 *                 self.__new_package_action__(pack)
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_8);
      /*try:*/ {

        /* "parabam/chaser.pyx":562
 *                 waiting_update(jobs_found,jobs_at_start)
 *             try:
 *                 pack = self._inqu.get(True,10)             # <<<<<<<<<<<<<<
 *                 self.__new_package_action__(pack)
 *                 jobs_found += 1
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inqu_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 562, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 562, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 562, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF_SET(__pyx_v_pack, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "parabam/chaser.pyx":563
 *             try:
 *                 pack = self._inqu.get(True,10)
 *                 self.__new_package_action__(pack)             # <<<<<<<<<<<<<<
 *                 jobs_found += 1
 *             except Queue2.Empty:
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_new_package_action); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_v_pack) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_pack);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 563, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "parabam/chaser.pyx":564
 *                 pack = self._inqu.get(True,10)
 *                 self.__new_package_action__(pack)
 *                 jobs_found += 1             # <<<<<<<<<<<<<<
 *             except Queue2.Empty:
 *                 time.sleep(1)
 */
        __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_jobs_found, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 564, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF_SET(__pyx_v_jobs_found, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "parabam/chaser.pyx":561
 *                 jobs_at_start = self._pending_jobs
 *                 waiting_update(jobs_found,jobs_at_start)
 *             try:             # <<<<<<<<<<<<<<
 *                 pack = self._inqu.get(True,10)
 *                 self.__new_package_action__(pack)
 */
      }
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L16_try_end;
      __pyx_L9_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "parabam/chaser.pyx":565
 *                 self.__new_package_action__(pack)
 *                 jobs_found += 1
 *             except Queue2.Empty:             # <<<<<<<<<<<<<<
 *                 time.sleep(1)
 *             i += 1
 */
      __Pyx_ErrFetch(&__pyx_t_2, &__pyx_t_1, &__pyx_t_4);
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_Queue2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 565, __pyx_L11_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_Empty); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 565, __pyx_L11_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_11 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_2, __pyx_t_10);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_ErrRestore(__pyx_t_2, __pyx_t_1, __pyx_t_4);
      __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_4 = 0;
      if (__pyx_t_11) {
        __Pyx_AddTraceback("parabam.chaser.Handler.__wait_for_remaining_jobs__", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_1, &__pyx_t_2) < 0) __PYX_ERR(0, 565, __pyx_L11_except_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_t_2);

        /* "parabam/chaser.pyx":566
 *                 jobs_found += 1
 *             except Queue2.Empty:
 *                 time.sleep(1)             # <<<<<<<<<<<<<<
 *             i += 1
 * 
 */
        __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_time); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 566, __pyx_L11_except_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_sleep); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 566, __pyx_L11_except_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_12);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_12, function);
          }
        }
        __pyx_t_10 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_9, __pyx_int_1) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_int_1);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 566, __pyx_L11_except_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        goto __pyx_L10_exception_handled;
      }
      goto __pyx_L11_except_error;
      __pyx_L11_except_error:;

      /* "parabam/chaser.pyx":561
 *                 jobs_at_start = self._pending_jobs
 *                 waiting_update(jobs_found,jobs_at_start)
 *             try:             # <<<<<<<<<<<<<<
 *                 pack = self._inqu.get(True,10)
 *                 self.__new_package_action__(pack)
 */
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
      goto __pyx_L1_error;
      __pyx_L10_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
      __pyx_L16_try_end:;
    }

    /* "parabam/chaser.pyx":567
 *             except Queue2.Empty:
 *                 time.sleep(1)
 *             i += 1             # <<<<<<<<<<<<<<
 * 
 *         if self._constants.verbose:
 */
    __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 567, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_2);
    __pyx_t_2 = 0;
  }

  /* "parabam/chaser.pyx":569
 *             i += 1
 * 
 *         if self._constants.verbose:             # <<<<<<<<<<<<<<
 *             waiting_update(jobs_found,jobs_at_start)
 *             sys.stdout.write("\n")
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_constants_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_verbose); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 569, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "parabam/chaser.pyx":570
 * 
 *         if self._constants.verbose:
 *             waiting_update(jobs_found,jobs_at_start)             # <<<<<<<<<<<<<<
 *             sys.stdout.write("\n")
 *             sys.stdout.flush()
 */
    __pyx_t_1 = __pyx_pf_7parabam_6chaser_7Handler_27__wait_for_remaining_jobs___waiting_update(__pyx_v_waiting_update, __pyx_v_jobs_found, __pyx_v_jobs_at_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":571
 *         if self._constants.verbose:
 *             waiting_update(jobs_found,jobs_at_start)
 *             sys.stdout.write("\n")             # <<<<<<<<<<<<<<
 *             sys.stdout.flush()
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 571, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_stdout); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 571, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 571, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_kp_s__13) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s__13);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 571, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":572
 *             waiting_update(jobs_found,jobs_at_start)
 *             sys.stdout.write("\n")
 *             sys.stdout.flush()             # <<<<<<<<<<<<<<
 * 
 *         #print "Saved from wait %d" % (self._rescued["total"] - prev_found)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_stdout); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_flush); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":569
 *             i += 1
 * 
 *         if self._constants.verbose:             # <<<<<<<<<<<<<<
 *             waiting_update(jobs_found,jobs_at_start)
 *             sys.stdout.write("\n")
 */
  }

  /* "parabam/chaser.pyx":575
 * 
 *         #print "Saved from wait %d" % (self._rescued["total"] - prev_found)
 *         return prev_found < self._rescued["total"]             # <<<<<<<<<<<<<<
 * 
 *     def __clear_subpyramid__(self,success,destroy,running):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rescued_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_s_total); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_prev_found, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 575, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "parabam/chaser.pyx":542
 *             return False
 * 
 *     def __wait_for_remaining_jobs__(self):             # <<<<<<<<<<<<<<
 *         def waiting_update(found,total):
 *             sys.stdout.write(("\r\t- Waiting for tasks to finish: %d/%d ") % \
 */

  /* 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_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("parabam.chaser.Handler.__wait_for_remaining_jobs__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_waiting_update);
  __Pyx_XDECREF(__pyx_v_prev_found);
  __Pyx_XDECREF(__pyx_v_jobs_at_start);
  __Pyx_XDECREF(__pyx_v_jobs_found);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_pack);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":577
 *         return prev_found < self._rescued["total"]
 * 
 *     def __clear_subpyramid__(self,success,destroy,running):             # <<<<<<<<<<<<<<
 *         if success:
 *             #If the idle task was sent, clear pyramid
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_67__clear_subpyramid__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_67__clear_subpyramid__ = {"__clear_subpyramid__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_7Handler_67__clear_subpyramid__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_67__clear_subpyramid__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_success = 0;
  PyObject *__pyx_v_destroy = 0;
  PyObject *__pyx_v_running = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__clear_subpyramid__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_success,&__pyx_n_s_destroy_2,&__pyx_n_s_running,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_success)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__clear_subpyramid__", 1, 4, 4, 1); __PYX_ERR(0, 577, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_destroy_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__clear_subpyramid__", 1, 4, 4, 2); __PYX_ERR(0, 577, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_running)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__clear_subpyramid__", 1, 4, 4, 3); __PYX_ERR(0, 577, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__clear_subpyramid__") < 0)) __PYX_ERR(0, 577, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_self = values[0];
    __pyx_v_success = values[1];
    __pyx_v_destroy = values[2];
    __pyx_v_running = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__clear_subpyramid__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 577, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.Handler.__clear_subpyramid__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_66__clear_subpyramid__(__pyx_self, __pyx_v_self, __pyx_v_success, __pyx_v_destroy, __pyx_v_running);

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_66__clear_subpyramid__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_success, PyObject *__pyx_v_destroy, PyObject *__pyx_v_running) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("__clear_subpyramid__", 0);

  /* "parabam/chaser.pyx":578
 * 
 *     def __clear_subpyramid__(self,success,destroy,running):
 *         if success:             # <<<<<<<<<<<<<<
 *             #If the idle task was sent, clear pyramid
 *             return True
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_success); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 578, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "parabam/chaser.pyx":580
 *         if success:
 *             #If the idle task was sent, clear pyramid
 *             return True             # <<<<<<<<<<<<<<
 *         elif destroy and not success:
 *             if running == 0:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    goto __pyx_L0;

    /* "parabam/chaser.pyx":578
 * 
 *     def __clear_subpyramid__(self,success,destroy,running):
 *         if success:             # <<<<<<<<<<<<<<
 *             #If the idle task was sent, clear pyramid
 *             return True
 */
  }

  /* "parabam/chaser.pyx":581
 *             #If the idle task was sent, clear pyramid
 *             return True
 *         elif destroy and not success:             # <<<<<<<<<<<<<<
 *             if running == 0:
 *                 #if main process has finished and no tasks run
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_destroy); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 581, __pyx_L1_error)
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_success); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 581, __pyx_L1_error)
  __pyx_t_3 = ((!__pyx_t_2) != 0);
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "parabam/chaser.pyx":582
 *             return True
 *         elif destroy and not success:
 *             if running == 0:             # <<<<<<<<<<<<<<
 *                 #if main process has finished and no tasks run
 *                 #clear the pyramid
 */
    __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_v_running, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 582, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_1) {

      /* "parabam/chaser.pyx":585
 *                 #if main process has finished and no tasks run
 *                 #clear the pyramid
 *                 return True             # <<<<<<<<<<<<<<
 *             else:
 *                 #Tasks still running. Don't clear
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;

      /* "parabam/chaser.pyx":582
 *             return True
 *         elif destroy and not success:
 *             if running == 0:             # <<<<<<<<<<<<<<
 *                 #if main process has finished and no tasks run
 *                 #clear the pyramid
 */
    }

    /* "parabam/chaser.pyx":588
 *             else:
 *                 #Tasks still running. Don't clear
 *                 return False             # <<<<<<<<<<<<<<
 *         else:
 *             #Idle task not sent, don't clear pyramid
 */
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      goto __pyx_L0;
    }

    /* "parabam/chaser.pyx":581
 *             #If the idle task was sent, clear pyramid
 *             return True
 *         elif destroy and not success:             # <<<<<<<<<<<<<<
 *             if running == 0:
 *                 #if main process has finished and no tasks run
 */
  }

  /* "parabam/chaser.pyx":591
 *         else:
 *             #Idle task not sent, don't clear pyramid
 *             return False             # <<<<<<<<<<<<<<
 * 
 *     def __idle_routine__(self,pyramid,loner_type):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;
  }

  /* "parabam/chaser.pyx":577
 *         return prev_found < self._rescued["total"]
 * 
 *     def __clear_subpyramid__(self,success,destroy,running):             # <<<<<<<<<<<<<<
 *         if success:
 *             #If the idle task was sent, clear pyramid
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("parabam.chaser.Handler.__clear_subpyramid__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":593
 *             return False
 * 
 *     def __idle_routine__(self,pyramid,loner_type):             # <<<<<<<<<<<<<<
 *         if "UM" in loner_type and not self._destroy:
 *             #Don't conduct idle on UMs because we don't expect to see pairs
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_69__idle_routine__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_69__idle_routine__ = {"__idle_routine__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_7Handler_69__idle_routine__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_69__idle_routine__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_pyramid = 0;
  PyObject *__pyx_v_loner_type = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__idle_routine__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_pyramid,&__pyx_n_s_loner_type,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyramid)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__idle_routine__", 1, 3, 3, 1); __PYX_ERR(0, 593, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loner_type)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__idle_routine__", 1, 3, 3, 2); __PYX_ERR(0, 593, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__idle_routine__") < 0)) __PYX_ERR(0, 593, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_pyramid = values[1];
    __pyx_v_loner_type = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__idle_routine__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 593, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.Handler.__idle_routine__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_68__idle_routine__(__pyx_self, __pyx_v_self, __pyx_v_pyramid, __pyx_v_loner_type);

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_68__idle_routine__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_pyramid, PyObject *__pyx_v_loner_type) {
  PyObject *__pyx_v_all_paths = NULL;
  PyObject *__pyx_v_level = NULL;
  PyObject *__pyx_v_sub_pyramid = NULL;
  int __pyx_v_success;
  PyObject *__pyx_v_idle_paths = NULL;
  PyObject *__pyx_v_idle_levels = NULL;
  PyObject *__pyx_v_path_n = NULL;
  PyObject *__pyx_v_idle_tuples = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  PyObject *(*__pyx_t_16)(PyObject *);
  __Pyx_RefNannySetupContext("__idle_routine__", 0);

  /* "parabam/chaser.pyx":594
 * 
 *     def __idle_routine__(self,pyramid,loner_type):
 *         if "UM" in loner_type and not self._destroy:             # <<<<<<<<<<<<<<
 *             #Don't conduct idle on UMs because we don't expect to see pairs
 *             #until after processing has finished
 */
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_UM, __pyx_v_loner_type, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 594, __pyx_L1_error)
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_destroy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 594, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_2 = ((!__pyx_t_3) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "parabam/chaser.pyx":597
 *             #Don't conduct idle on UMs because we don't expect to see pairs
 *             #until after processing has finished
 *             return True,[],[]             # <<<<<<<<<<<<<<
 * 
 *         all_paths = []
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 597, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 597, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 597, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(Py_True);
    __Pyx_GIVEREF(Py_True);
    PyTuple_SET_ITEM(__pyx_t_6, 0, Py_True);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5);
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "parabam/chaser.pyx":594
 * 
 *     def __idle_routine__(self,pyramid,loner_type):
 *         if "UM" in loner_type and not self._destroy:             # <<<<<<<<<<<<<<
 *             #Don't conduct idle on UMs because we don't expect to see pairs
 *             #until after processing has finished
 */
  }

  /* "parabam/chaser.pyx":599
 *             return True,[],[]
 * 
 *         all_paths = []             # <<<<<<<<<<<<<<
 *         for level,sub_pyramid in enumerate(pyramid):
 *             all_paths.extend(zip([level]*len(sub_pyramid),sub_pyramid))
 */
  __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_all_paths = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "parabam/chaser.pyx":600
 * 
 *         all_paths = []
 *         for level,sub_pyramid in enumerate(pyramid):             # <<<<<<<<<<<<<<
 *             all_paths.extend(zip([level]*len(sub_pyramid),sub_pyramid))
 * 
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_t_6 = __pyx_int_0;
  if (likely(PyList_CheckExact(__pyx_v_pyramid)) || PyTuple_CheckExact(__pyx_v_pyramid)) {
    __pyx_t_5 = __pyx_v_pyramid; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_pyramid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 600, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_5))) {
        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 600, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 600, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 600, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 600, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_8(__pyx_t_5);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 600, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_sub_pyramid, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_XDECREF_SET(__pyx_v_level, __pyx_t_6);
    __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_6, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6);
    __pyx_t_6 = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "parabam/chaser.pyx":601
 *         all_paths = []
 *         for level,sub_pyramid in enumerate(pyramid):
 *             all_paths.extend(zip([level]*len(sub_pyramid),sub_pyramid))             # <<<<<<<<<<<<<<
 * 
 *         success = False
 */
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_zip); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 601, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = PyObject_Length(__pyx_v_sub_pyramid); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 601, __pyx_L1_error)
    __pyx_t_11 = PyList_New(1 * ((__pyx_t_10<0) ? 0:__pyx_t_10)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 601, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    { Py_ssize_t __pyx_temp;
      for (__pyx_temp=0; __pyx_temp < __pyx_t_10; __pyx_temp++) {
        __Pyx_INCREF(__pyx_v_level);
        __Pyx_GIVEREF(__pyx_v_level);
        PyList_SET_ITEM(__pyx_t_11, __pyx_temp, __pyx_v_level);
      }
    }
    __pyx_t_12 = NULL;
    __pyx_t_13 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_12)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_12);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_13 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_9)) {
      PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_t_11, __pyx_v_sub_pyramid};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 601, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
      PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_t_11, __pyx_v_sub_pyramid};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 601, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    } else
    #endif
    {
      __pyx_t_14 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 601, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      if (__pyx_t_12) {
        __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_12); __pyx_t_12 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_13, __pyx_t_11);
      __Pyx_INCREF(__pyx_v_sub_pyramid);
      __Pyx_GIVEREF(__pyx_v_sub_pyramid);
      PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_13, __pyx_v_sub_pyramid);
      __pyx_t_11 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_14, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 601, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_15 = __Pyx_PyList_Extend(__pyx_v_all_paths, __pyx_t_4); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 601, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "parabam/chaser.pyx":600
 * 
 *         all_paths = []
 *         for level,sub_pyramid in enumerate(pyramid):             # <<<<<<<<<<<<<<
 *             all_paths.extend(zip([level]*len(sub_pyramid),sub_pyramid))
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "parabam/chaser.pyx":603
 *             all_paths.extend(zip([level]*len(sub_pyramid),sub_pyramid))
 * 
 *         success = False             # <<<<<<<<<<<<<<
 *         idle_paths = []
 *         idle_levels = []
 */
  __pyx_v_success = 0;

  /* "parabam/chaser.pyx":604
 * 
 *         success = False
 *         idle_paths = []             # <<<<<<<<<<<<<<
 *         idle_levels = []
 *         if len(all_paths) > 1:
 */
  __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_idle_paths = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "parabam/chaser.pyx":605
 *         success = False
 *         idle_paths = []
 *         idle_levels = []             # <<<<<<<<<<<<<<
 *         if len(all_paths) > 1:
 *             path_n = random.randint(0,len(all_paths))
 */
  __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_idle_levels = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "parabam/chaser.pyx":606
 *         idle_paths = []
 *         idle_levels = []
 *         if len(all_paths) > 1:             # <<<<<<<<<<<<<<
 *             path_n = random.randint(0,len(all_paths))
 *             if path_n < 2:
 */
  __pyx_t_7 = PyList_GET_SIZE(__pyx_v_all_paths); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 606, __pyx_L1_error)
  __pyx_t_1 = ((__pyx_t_7 > 1) != 0);
  if (__pyx_t_1) {

    /* "parabam/chaser.pyx":607
 *         idle_levels = []
 *         if len(all_paths) > 1:
 *             path_n = random.randint(0,len(all_paths))             # <<<<<<<<<<<<<<
 *             if path_n < 2:
 *                 #This gives 3 chances to roll a 2
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_random); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 607, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_randint); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 607, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = PyList_GET_SIZE(__pyx_v_all_paths); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 607, __pyx_L1_error)
    __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 607, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = NULL;
    __pyx_t_13 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_13 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_int_0, __pyx_t_5};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 607, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_int_0, __pyx_t_5};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 607, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_14 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 607, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      if (__pyx_t_9) {
        __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_9); __pyx_t_9 = NULL;
      }
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_13, __pyx_int_0);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_13, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_14, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 607, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_path_n = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "parabam/chaser.pyx":608
 *         if len(all_paths) > 1:
 *             path_n = random.randint(0,len(all_paths))
 *             if path_n < 2:             # <<<<<<<<<<<<<<
 *                 #This gives 3 chances to roll a 2
 *                 #2 paths means a depth heavy search
 */
    __pyx_t_6 = PyObject_RichCompare(__pyx_v_path_n, __pyx_int_2, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 608, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 608, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_1) {

      /* "parabam/chaser.pyx":611
 *                 #This gives 3 chances to roll a 2
 *                 #2 paths means a depth heavy search
 *                 path_n = 2             # <<<<<<<<<<<<<<
 * 
 *             idle_tuples = random.sample(all_paths,path_n)
 */
      __Pyx_INCREF(__pyx_int_2);
      __Pyx_DECREF_SET(__pyx_v_path_n, __pyx_int_2);

      /* "parabam/chaser.pyx":608
 *         if len(all_paths) > 1:
 *             path_n = random.randint(0,len(all_paths))
 *             if path_n < 2:             # <<<<<<<<<<<<<<
 *                 #This gives 3 chances to roll a 2
 *                 #2 paths means a depth heavy search
 */
    }

    /* "parabam/chaser.pyx":613
 *                 path_n = 2
 * 
 *             idle_tuples = random.sample(all_paths,path_n)             # <<<<<<<<<<<<<<
 *             idle_levels,idle_paths = zip( *idle_tuples )
 *             self.__start_matchmaker_task__(idle_paths,loner_type,max(idle_levels))
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_random); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 613, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sample); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 613, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_13 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_14);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_14, function);
        __pyx_t_13 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_14)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_all_paths, __pyx_v_path_n};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 613, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_6);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_all_paths, __pyx_v_path_n};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 613, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_6);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 613, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_all_paths);
      __Pyx_GIVEREF(__pyx_v_all_paths);
      PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_13, __pyx_v_all_paths);
      __Pyx_INCREF(__pyx_v_path_n);
      __Pyx_GIVEREF(__pyx_v_path_n);
      PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_13, __pyx_v_path_n);
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 613, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __pyx_v_idle_tuples = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "parabam/chaser.pyx":614
 * 
 *             idle_tuples = random.sample(all_paths,path_n)
 *             idle_levels,idle_paths = zip( *idle_tuples )             # <<<<<<<<<<<<<<
 *             self.__start_matchmaker_task__(idle_paths,loner_type,max(idle_levels))
 *             success = True
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_zip); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 614, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_14 = __Pyx_PySequence_Tuple(__pyx_v_idle_tuples); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 614, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_14, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 614, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
      PyObject* sequence = __pyx_t_5;
      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, 614, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_14 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_14 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_14);
      __Pyx_INCREF(__pyx_t_6);
      #else
      __pyx_t_14 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 614, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 614, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 614, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_16 = Py_TYPE(__pyx_t_4)->tp_iternext;
      index = 0; __pyx_t_14 = __pyx_t_16(__pyx_t_4); if (unlikely(!__pyx_t_14)) goto __pyx_L10_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_14);
      index = 1; __pyx_t_6 = __pyx_t_16(__pyx_t_4); if (unlikely(!__pyx_t_6)) goto __pyx_L10_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_4), 2) < 0) __PYX_ERR(0, 614, __pyx_L1_error)
      __pyx_t_16 = NULL;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L11_unpacking_done;
      __pyx_L10_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_16 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 614, __pyx_L1_error)
      __pyx_L11_unpacking_done:;
    }
    __Pyx_DECREF_SET(__pyx_v_idle_levels, __pyx_t_14);
    __pyx_t_14 = 0;
    __Pyx_DECREF_SET(__pyx_v_idle_paths, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "parabam/chaser.pyx":615
 *             idle_tuples = random.sample(all_paths,path_n)
 *             idle_levels,idle_paths = zip( *idle_tuples )
 *             self.__start_matchmaker_task__(idle_paths,loner_type,max(idle_levels))             # <<<<<<<<<<<<<<
 *             success = True
 *             del all_paths,idle_tuples
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_start_matchmaker_task); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 615, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_14 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, __pyx_v_idle_levels); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 615, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_4 = NULL;
    __pyx_t_13 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_13 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_idle_paths, __pyx_v_loner_type, __pyx_t_14};
      __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 615, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_idle_paths, __pyx_v_loner_type, __pyx_t_14};
      __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 615, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(3+__pyx_t_13); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 615, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_idle_paths);
      __Pyx_GIVEREF(__pyx_v_idle_paths);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_13, __pyx_v_idle_paths);
      __Pyx_INCREF(__pyx_v_loner_type);
      __Pyx_GIVEREF(__pyx_v_loner_type);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_13, __pyx_v_loner_type);
      __Pyx_GIVEREF(__pyx_t_14);
      PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_13, __pyx_t_14);
      __pyx_t_14 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 615, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "parabam/chaser.pyx":616
 *             idle_levels,idle_paths = zip( *idle_tuples )
 *             self.__start_matchmaker_task__(idle_paths,loner_type,max(idle_levels))
 *             success = True             # <<<<<<<<<<<<<<
 *             del all_paths,idle_tuples
 *         elif len(all_paths) == 1:
 */
    __pyx_v_success = 1;

    /* "parabam/chaser.pyx":617
 *             self.__start_matchmaker_task__(idle_paths,loner_type,max(idle_levels))
 *             success = True
 *             del all_paths,idle_tuples             # <<<<<<<<<<<<<<
 *         elif len(all_paths) == 1:
 *             idle_levels,idle_paths = zip(*all_paths)
 */
    __Pyx_DECREF(__pyx_v_all_paths);
    __pyx_v_all_paths = NULL;
    __Pyx_DECREF(__pyx_v_idle_tuples);
    __pyx_v_idle_tuples = NULL;

    /* "parabam/chaser.pyx":606
 *         idle_paths = []
 *         idle_levels = []
 *         if len(all_paths) > 1:             # <<<<<<<<<<<<<<
 *             path_n = random.randint(0,len(all_paths))
 *             if path_n < 2:
 */
    goto __pyx_L8;
  }

  /* "parabam/chaser.pyx":618
 *             success = True
 *             del all_paths,idle_tuples
 *         elif len(all_paths) == 1:             # <<<<<<<<<<<<<<
 *             idle_levels,idle_paths = zip(*all_paths)
 * 
 */
  __pyx_t_7 = PyList_GET_SIZE(__pyx_v_all_paths); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 618, __pyx_L1_error)
  __pyx_t_1 = ((__pyx_t_7 == 1) != 0);
  if (__pyx_t_1) {

    /* "parabam/chaser.pyx":619
 *             del all_paths,idle_tuples
 *         elif len(all_paths) == 1:
 *             idle_levels,idle_paths = zip(*all_paths)             # <<<<<<<<<<<<<<
 * 
 *         return success,idle_paths,idle_levels
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_zip); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 619, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PySequence_Tuple(__pyx_v_all_paths); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 619, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 619, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if ((likely(PyTuple_CheckExact(__pyx_t_9))) || (PyList_CheckExact(__pyx_t_9))) {
      PyObject* sequence = __pyx_t_9;
      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, 619, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      #else
      __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 619, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 619, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      #endif
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_14 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 619, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_16 = Py_TYPE(__pyx_t_14)->tp_iternext;
      index = 0; __pyx_t_6 = __pyx_t_16(__pyx_t_14); if (unlikely(!__pyx_t_6)) goto __pyx_L12_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      index = 1; __pyx_t_5 = __pyx_t_16(__pyx_t_14); if (unlikely(!__pyx_t_5)) goto __pyx_L12_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_14), 2) < 0) __PYX_ERR(0, 619, __pyx_L1_error)
      __pyx_t_16 = NULL;
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      goto __pyx_L13_unpacking_done;
      __pyx_L12_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __pyx_t_16 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 619, __pyx_L1_error)
      __pyx_L13_unpacking_done:;
    }
    __Pyx_DECREF_SET(__pyx_v_idle_levels, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_DECREF_SET(__pyx_v_idle_paths, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "parabam/chaser.pyx":618
 *             success = True
 *             del all_paths,idle_tuples
 *         elif len(all_paths) == 1:             # <<<<<<<<<<<<<<
 *             idle_levels,idle_paths = zip(*all_paths)
 * 
 */
  }
  __pyx_L8:;

  /* "parabam/chaser.pyx":621
 *             idle_levels,idle_paths = zip(*all_paths)
 * 
 *         return success,idle_paths,idle_levels             # <<<<<<<<<<<<<<
 * 
 *     def __get_task_size__(self,level,loner_type):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_9 = __Pyx_PyBool_FromLong(__pyx_v_success); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_9);
  __Pyx_INCREF(__pyx_v_idle_paths);
  __Pyx_GIVEREF(__pyx_v_idle_paths);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_idle_paths);
  __Pyx_INCREF(__pyx_v_idle_levels);
  __Pyx_GIVEREF(__pyx_v_idle_levels);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_idle_levels);
  __pyx_t_9 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "parabam/chaser.pyx":593
 *             return False
 * 
 *     def __idle_routine__(self,pyramid,loner_type):             # <<<<<<<<<<<<<<
 *         if "UM" in loner_type and not self._destroy:
 *             #Don't conduct idle on UMs because we don't expect to see pairs
 */

  /* 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_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("parabam.chaser.Handler.__idle_routine__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_all_paths);
  __Pyx_XDECREF(__pyx_v_level);
  __Pyx_XDECREF(__pyx_v_sub_pyramid);
  __Pyx_XDECREF(__pyx_v_idle_paths);
  __Pyx_XDECREF(__pyx_v_idle_levels);
  __Pyx_XDECREF(__pyx_v_path_n);
  __Pyx_XDECREF(__pyx_v_idle_tuples);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":623
 *         return success,idle_paths,idle_levels
 * 
 *     def __get_task_size__(self,level,loner_type):             # <<<<<<<<<<<<<<
 *         if level % 2 == 0:
 *             task_size = 2
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_71__get_task_size__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_71__get_task_size__ = {"__get_task_size__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_7Handler_71__get_task_size__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_71__get_task_size__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_level = 0;
  CYTHON_UNUSED PyObject *__pyx_v_loner_type = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get_task_size__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_level,&__pyx_n_s_loner_type,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_level)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__get_task_size__", 1, 3, 3, 1); __PYX_ERR(0, 623, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loner_type)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__get_task_size__", 1, 3, 3, 2); __PYX_ERR(0, 623, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__get_task_size__") < 0)) __PYX_ERR(0, 623, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_level = values[1];
    __pyx_v_loner_type = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__get_task_size__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 623, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.Handler.__get_task_size__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_70__get_task_size__(__pyx_self, __pyx_v_self, __pyx_v_level, __pyx_v_loner_type);

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_70__get_task_size__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_level, CYTHON_UNUSED PyObject *__pyx_v_loner_type) {
  long __pyx_v_task_size;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("__get_task_size__", 0);

  /* "parabam/chaser.pyx":624
 * 
 *     def __get_task_size__(self,level,loner_type):
 *         if level % 2 == 0:             # <<<<<<<<<<<<<<
 *             task_size = 2
 *         else:
 */
  __pyx_t_1 = __Pyx_PyInt_RemainderObjC(__pyx_v_level, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 624, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "parabam/chaser.pyx":625
 *     def __get_task_size__(self,level,loner_type):
 *         if level % 2 == 0:
 *             task_size = 2             # <<<<<<<<<<<<<<
 *         else:
 *             task_size = 3
 */
    __pyx_v_task_size = 2;

    /* "parabam/chaser.pyx":624
 * 
 *     def __get_task_size__(self,level,loner_type):
 *         if level % 2 == 0:             # <<<<<<<<<<<<<<
 *             task_size = 2
 *         else:
 */
    goto __pyx_L3;
  }

  /* "parabam/chaser.pyx":627
 *             task_size = 2
 *         else:
 *             task_size = 3             # <<<<<<<<<<<<<<
 *         return task_size
 * 
 */
  /*else*/ {
    __pyx_v_task_size = 3;
  }
  __pyx_L3:;

  /* "parabam/chaser.pyx":628
 *         else:
 *             task_size = 3
 *         return task_size             # <<<<<<<<<<<<<<
 * 
 *     def __handler_exit__(self,**kwargs):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_task_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "parabam/chaser.pyx":623
 *         return success,idle_paths,idle_levels
 * 
 *     def __get_task_size__(self,level,loner_type):             # <<<<<<<<<<<<<<
 *         if level % 2 == 0:
 *             task_size = 2
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("parabam.chaser.Handler.__get_task_size__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":630
 *         return task_size
 * 
 *     def __handler_exit__(self,**kwargs):             # <<<<<<<<<<<<<<
 *         for i in xrange(len(self._chaser_tasks)+1):
 *            self._chaser_qu.put(DestroyPackage())
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_73__handler_exit__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_73__handler_exit__ = {"__handler_exit__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_7Handler_73__handler_exit__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_73__handler_exit__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__handler_exit__ (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__handler_exit__") < 0)) __PYX_ERR(0, 630, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__handler_exit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 630, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("parabam.chaser.Handler.__handler_exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_72__handler_exit__(__pyx_self, __pyx_v_self, __pyx_v_kwargs);

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_72__handler_exit__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_remaining_reads = NULL;
  PyObject *__pyx_v_qu = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  __Pyx_RefNannySetupContext("__handler_exit__", 0);

  /* "parabam/chaser.pyx":631
 * 
 *     def __handler_exit__(self,**kwargs):
 *         for i in xrange(len(self._chaser_tasks)+1):             # <<<<<<<<<<<<<<
 *            self._chaser_qu.put(DestroyPackage())
 *         time.sleep(2)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_chaser_tasks); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 631, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 + 1);
  __pyx_t_2 = __pyx_t_3;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_2; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "parabam/chaser.pyx":632
 *     def __handler_exit__(self,**kwargs):
 *         for i in xrange(len(self._chaser_tasks)+1):
 *            self._chaser_qu.put(DestroyPackage())             # <<<<<<<<<<<<<<
 *         time.sleep(2)
 *         self._chaser_qu.close()
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_chaser_qu); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 632, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_put); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 632, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_DestroyPackage); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 632, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 632, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 632, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "parabam/chaser.pyx":633
 *         for i in xrange(len(self._chaser_tasks)+1):
 *            self._chaser_qu.put(DestroyPackage())
 *         time.sleep(2)             # <<<<<<<<<<<<<<
 *         self._chaser_qu.close()
 *         del self._chaser_qu
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_time); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_sleep); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_int_2) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_int_2);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":634
 *            self._chaser_qu.put(DestroyPackage())
 *         time.sleep(2)
 *         self._chaser_qu.close()             # <<<<<<<<<<<<<<
 *         del self._chaser_qu
 *         del self._chaser_tasks
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_chaser_qu); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_close); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":635
 *         time.sleep(2)
 *         self._chaser_qu.close()
 *         del self._chaser_qu             # <<<<<<<<<<<<<<
 *         del self._chaser_tasks
 * 
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_v_self, __pyx_n_s_chaser_qu) < 0) __PYX_ERR(0, 635, __pyx_L1_error)

  /* "parabam/chaser.pyx":636
 *         self._chaser_qu.close()
 *         del self._chaser_qu
 *         del self._chaser_tasks             # <<<<<<<<<<<<<<
 * 
 *         if self._constants.verbose:
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_v_self, __pyx_n_s_chaser_tasks) < 0) __PYX_ERR(0, 636, __pyx_L1_error)

  /* "parabam/chaser.pyx":638
 *         del self._chaser_tasks
 * 
 *         if self._constants.verbose:             # <<<<<<<<<<<<<<
 *             remaining_reads = self._total_loners - self._rescued["total"]
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_constants_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_verbose); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 638, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_9) {

    /* "parabam/chaser.pyx":639
 * 
 *         if self._constants.verbose:
 *             remaining_reads = self._total_loners - self._rescued["total"]             # <<<<<<<<<<<<<<
 * 
 *             if remaining_reads == 0:
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_total_loners); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 639, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rescued_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 639, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_s_total); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 639, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Subtract(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 639, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_remaining_reads = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":641
 *             remaining_reads = self._total_loners - self._rescued["total"]
 * 
 *             if remaining_reads == 0:             # <<<<<<<<<<<<<<
 *                 sys.stdout.write(\
 *                      "\r\t- Read pairing in progress: 100.00% complete\n")
 */
    __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_remaining_reads, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 641, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_9) {

      /* "parabam/chaser.pyx":642
 * 
 *             if remaining_reads == 0:
 *                 sys.stdout.write(\             # <<<<<<<<<<<<<<
 *                      "\r\t- Read pairing in progress: 100.00% complete\n")
 *                 sys.stdout.flush()
 */
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_sys); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 642, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_stdout); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 642, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_write); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 642, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_kp_s_Read_pairing_in_progress_100_00) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_s_Read_pairing_in_progress_100_00);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 642, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "parabam/chaser.pyx":644
 *                 sys.stdout.write(\
 *                      "\r\t- Read pairing in progress: 100.00% complete\n")
 *                 sys.stdout.flush()             # <<<<<<<<<<<<<<
 *             else:
 *                 self.__standard_output__("\n\t- Unpaired reads: %d" %\
 */
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_sys); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 644, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_stdout); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 644, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_flush); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 644, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 644, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "parabam/chaser.pyx":641
 *             remaining_reads = self._total_loners - self._rescued["total"]
 * 
 *             if remaining_reads == 0:             # <<<<<<<<<<<<<<
 *                 sys.stdout.write(\
 *                      "\r\t- Read pairing in progress: 100.00% complete\n")
 */
      goto __pyx_L6;
    }

    /* "parabam/chaser.pyx":646
 *                 sys.stdout.flush()
 *             else:
 *                 self.__standard_output__("\n\t- Unpaired reads: %d" %\             # <<<<<<<<<<<<<<
 *                     (self._total_loners - self._rescued["total"],))
 * 
 */
    /*else*/ {
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_standard_output); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 646, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);

      /* "parabam/chaser.pyx":647
 *             else:
 *                 self.__standard_output__("\n\t- Unpaired reads: %d" %\
 *                     (self._total_loners - self._rescued["total"],))             # <<<<<<<<<<<<<<
 * 
 *             if self._rescued["unpaired"] > 0:
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_total_loners); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 647, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rescued_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 647, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_t_7, __pyx_n_s_total); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 647, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyNumber_Subtract(__pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 647, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 647, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "parabam/chaser.pyx":646
 *                 sys.stdout.flush()
 *             else:
 *                 self.__standard_output__("\n\t- Unpaired reads: %d" %\             # <<<<<<<<<<<<<<
 *                     (self._total_loners - self._rescued["total"],))
 * 
 */
      __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_Unpaired_reads_d, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 646, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_L6:;

    /* "parabam/chaser.pyx":649
 *                     (self._total_loners - self._rescued["total"],))
 * 
 *             if self._rescued["unpaired"] > 0:             # <<<<<<<<<<<<<<
 *                 self.__standard_output__(\
 *                   "\t- Reads flagged as unpaired excluded from analysis: %d" %\
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rescued_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_s_unpaired); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 649, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 649, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_9) {

      /* "parabam/chaser.pyx":650
 * 
 *             if self._rescued["unpaired"] > 0:
 *                 self.__standard_output__(\             # <<<<<<<<<<<<<<
 *                   "\t- Reads flagged as unpaired excluded from analysis: %d" %\
 *                     (self._rescued["unpaired"],))
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_standard_output); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 650, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);

      /* "parabam/chaser.pyx":652
 *                 self.__standard_output__(\
 *                   "\t- Reads flagged as unpaired excluded from analysis: %d" %\
 *                     (self._rescued["unpaired"],))             # <<<<<<<<<<<<<<
 * 
 *         for qu in self._pause_qus:
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rescued_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 652, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_t_7, __pyx_n_s_unpaired); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 652, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 652, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "parabam/chaser.pyx":651
 *             if self._rescued["unpaired"] > 0:
 *                 self.__standard_output__(\
 *                   "\t- Reads flagged as unpaired excluded from analysis: %d" %\             # <<<<<<<<<<<<<<
 *                     (self._rescued["unpaired"],))
 * 
 */
      __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_Reads_flagged_as_unpaired_exclu, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 651, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "parabam/chaser.pyx":649
 *                     (self._total_loners - self._rescued["total"],))
 * 
 *             if self._rescued["unpaired"] > 0:             # <<<<<<<<<<<<<<
 *                 self.__standard_output__(\
 *                   "\t- Reads flagged as unpaired excluded from analysis: %d" %\
 */
    }

    /* "parabam/chaser.pyx":638
 *         del self._chaser_tasks
 * 
 *         if self._constants.verbose:             # <<<<<<<<<<<<<<
 *             remaining_reads = self._total_loners - self._rescued["total"]
 * 
 */
  }

  /* "parabam/chaser.pyx":654
 *                     (self._rescued["unpaired"],))
 * 
 *         for qu in self._pause_qus:             # <<<<<<<<<<<<<<
 *             qu.close()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pause_qus_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5); __pyx_t_3 = 0;
    __pyx_t_10 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 654, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 654, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_10)) {
      if (likely(PyList_CheckExact(__pyx_t_5))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 654, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 654, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_10(__pyx_t_5);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 654, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_qu, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":655
 * 
 *         for qu in self._pause_qus:
 *             qu.close()             # <<<<<<<<<<<<<<
 * 
 *     def __post_destroy_report__(self):
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_qu, __pyx_n_s_close); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 655, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 655, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":654
 *                     (self._rescued["unpaired"],))
 * 
 *         for qu in self._pause_qus:             # <<<<<<<<<<<<<<
 *             qu.close()
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "parabam/chaser.pyx":630
 *         return task_size
 * 
 *     def __handler_exit__(self,**kwargs):             # <<<<<<<<<<<<<<
 *         for i in xrange(len(self._chaser_tasks)+1):
 *            self._chaser_qu.put(DestroyPackage())
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("parabam.chaser.Handler.__handler_exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_remaining_reads);
  __Pyx_XDECREF(__pyx_v_qu);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":657
 *             qu.close()
 * 
 *     def __post_destroy_report__(self):             # <<<<<<<<<<<<<<
 *         if self._constants.verbose:
 *             if self._post_destroy_count >= self._post_destroy_thresh:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_75__post_destroy_report__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_7Handler_75__post_destroy_report__ = {"__post_destroy_report__", (PyCFunction)__pyx_pw_7parabam_6chaser_7Handler_75__post_destroy_report__, METH_O, 0};
static PyObject *__pyx_pw_7parabam_6chaser_7Handler_75__post_destroy_report__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__post_destroy_report__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7parabam_6chaser_7Handler_74__post_destroy_report__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7parabam_6chaser_7Handler_74__post_destroy_report__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("__post_destroy_report__", 0);

  /* "parabam/chaser.pyx":658
 * 
 *     def __post_destroy_report__(self):
 *         if self._constants.verbose:             # <<<<<<<<<<<<<<
 *             if self._post_destroy_count >= self._post_destroy_thresh:
 *                 if self._post_destroy_count % 100 == 0 and\
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_constants_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_verbose); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 658, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "parabam/chaser.pyx":659
 *     def __post_destroy_report__(self):
 *         if self._constants.verbose:
 *             if self._post_destroy_count >= self._post_destroy_thresh:             # <<<<<<<<<<<<<<
 *                 if self._post_destroy_count % 100 == 0 and\
 *                    self._constants.verbose == 2:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_post_destroy_count); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_post_destroy_thresh); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 659, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 659, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_3) {

      /* "parabam/chaser.pyx":660
 *         if self._constants.verbose:
 *             if self._post_destroy_count >= self._post_destroy_thresh:
 *                 if self._post_destroy_count % 100 == 0 and\             # <<<<<<<<<<<<<<
 *                    self._constants.verbose == 2:
 *                     sys.stdout.write(\
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_post_destroy_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 660, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = __Pyx_PyInt_RemainderObjC(__pyx_t_4, __pyx_int_100, 0x64, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 660, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 660, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_5) {
      } else {
        __pyx_t_3 = __pyx_t_5;
        goto __pyx_L6_bool_binop_done;
      }

      /* "parabam/chaser.pyx":661
 *             if self._post_destroy_count >= self._post_destroy_thresh:
 *                 if self._post_destroy_count % 100 == 0 and\
 *                    self._constants.verbose == 2:             # <<<<<<<<<<<<<<
 *                     sys.stdout.write(\
 *                         "\r\t- Read pairing in progress: %.2f%% complete  " %\
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_constants_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 661, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_verbose); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 661, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 661, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 661, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_3 = __pyx_t_5;
      __pyx_L6_bool_binop_done:;

      /* "parabam/chaser.pyx":660
 *         if self._constants.verbose:
 *             if self._post_destroy_count >= self._post_destroy_thresh:
 *                 if self._post_destroy_count % 100 == 0 and\             # <<<<<<<<<<<<<<
 *                    self._constants.verbose == 2:
 *                     sys.stdout.write(\
 */
      if (__pyx_t_3) {

        /* "parabam/chaser.pyx":662
 *                 if self._post_destroy_count % 100 == 0 and\
 *                    self._constants.verbose == 2:
 *                     sys.stdout.write(\             # <<<<<<<<<<<<<<
 *                         "\r\t- Read pairing in progress: %.2f%% complete  " %\
 *                           ((float(self._rescued["total"]+1) / (self._total_loners+1))*100,))
 */
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 662, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stdout); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 662, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 662, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "parabam/chaser.pyx":664
 *                     sys.stdout.write(\
 *                         "\r\t- Read pairing in progress: %.2f%% complete  " %\
 *                           ((float(self._rescued["total"]+1) / (self._total_loners+1))*100,))             # <<<<<<<<<<<<<<
 *                     sys.stdout.flush()
 *                 elif self._post_destroy_count % 2500 == 0 and\
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rescued_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 664, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_s_total); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 664, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_6, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 664, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_PyNumber_Float(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 664, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_total_loners); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 664, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 664, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 664, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = PyNumber_Multiply(__pyx_t_2, __pyx_int_100); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 664, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 664, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "parabam/chaser.pyx":663
 *                    self._constants.verbose == 2:
 *                     sys.stdout.write(\
 *                         "\r\t- Read pairing in progress: %.2f%% complete  " %\             # <<<<<<<<<<<<<<
 *                           ((float(self._rescued["total"]+1) / (self._total_loners+1))*100,))
 *                     sys.stdout.flush()
 */
        __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_Read_pairing_in_progress_2f_com, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 663, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
          }
        }
        __pyx_t_4 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 662, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "parabam/chaser.pyx":665
 *                         "\r\t- Read pairing in progress: %.2f%% complete  " %\
 *                           ((float(self._rescued["total"]+1) / (self._total_loners+1))*100,))
 *                     sys.stdout.flush()             # <<<<<<<<<<<<<<
 *                 elif self._post_destroy_count % 2500 == 0 and\
 *                      self._constants.verbose ==1:
 */
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 665, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stdout); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 665, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_flush); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 665, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
          }
        }
        __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 665, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "parabam/chaser.pyx":660
 *         if self._constants.verbose:
 *             if self._post_destroy_count >= self._post_destroy_thresh:
 *                 if self._post_destroy_count % 100 == 0 and\             # <<<<<<<<<<<<<<
 *                    self._constants.verbose == 2:
 *                     sys.stdout.write(\
 */
        goto __pyx_L5;
      }

      /* "parabam/chaser.pyx":666
 *                           ((float(self._rescued["total"]+1) / (self._total_loners+1))*100,))
 *                     sys.stdout.flush()
 *                 elif self._post_destroy_count % 2500 == 0 and\             # <<<<<<<<<<<<<<
 *                      self._constants.verbose ==1:
 *                     sys.stdout.write(\
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_post_destroy_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 666, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = __Pyx_PyInt_RemainderObjC(__pyx_t_4, __pyx_int_2500, 0x9C4, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 666, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 666, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 666, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_5) {
      } else {
        __pyx_t_3 = __pyx_t_5;
        goto __pyx_L8_bool_binop_done;
      }

      /* "parabam/chaser.pyx":667
 *                     sys.stdout.flush()
 *                 elif self._post_destroy_count % 2500 == 0 and\
 *                      self._constants.verbose ==1:             # <<<<<<<<<<<<<<
 *                     sys.stdout.write(\
 *                         "\n\t- Read pairing in progress: %.2f%% complete" %\
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_constants_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 667, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_verbose); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 667, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 667, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 667, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_3 = __pyx_t_5;
      __pyx_L8_bool_binop_done:;

      /* "parabam/chaser.pyx":666
 *                           ((float(self._rescued["total"]+1) / (self._total_loners+1))*100,))
 *                     sys.stdout.flush()
 *                 elif self._post_destroy_count % 2500 == 0 and\             # <<<<<<<<<<<<<<
 *                      self._constants.verbose ==1:
 *                     sys.stdout.write(\
 */
      if (__pyx_t_3) {

        /* "parabam/chaser.pyx":668
 *                 elif self._post_destroy_count % 2500 == 0 and\
 *                      self._constants.verbose ==1:
 *                     sys.stdout.write(\             # <<<<<<<<<<<<<<
 *                         "\n\t- Read pairing in progress: %.2f%% complete" %\
 *                           ((float(self._rescued["total"]+1) / (self._total_loners+1))*100,))
 */
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 668, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stdout); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 668, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 668, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "parabam/chaser.pyx":670
 *                     sys.stdout.write(\
 *                         "\n\t- Read pairing in progress: %.2f%% complete" %\
 *                           ((float(self._rescued["total"]+1) / (self._total_loners+1))*100,))             # <<<<<<<<<<<<<<
 *                     sys.stdout.flush()
 * 
 */
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rescued_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 670, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_7, __pyx_n_s_total); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 670, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 670, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyNumber_Float(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 670, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_total_loners); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 670, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_7, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 670, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 670, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = PyNumber_Multiply(__pyx_t_7, __pyx_int_100); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 670, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 670, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "parabam/chaser.pyx":669
 *                      self._constants.verbose ==1:
 *                     sys.stdout.write(\
 *                         "\n\t- Read pairing in progress: %.2f%% complete" %\             # <<<<<<<<<<<<<<
 *                           ((float(self._rescued["total"]+1) / (self._total_loners+1))*100,))
 *                     sys.stdout.flush()
 */
        __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Read_pairing_in_progress_2f_com_2, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 669, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
          }
        }
        __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 668, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "parabam/chaser.pyx":671
 *                         "\n\t- Read pairing in progress: %.2f%% complete" %\
 *                           ((float(self._rescued["total"]+1) / (self._total_loners+1))*100,))
 *                     sys.stdout.flush()             # <<<<<<<<<<<<<<
 * 
 *             self._post_destroy_count += 1
 */
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 671, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stdout); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 671, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_flush); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 671, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
          }
        }
        __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 671, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "parabam/chaser.pyx":666
 *                           ((float(self._rescued["total"]+1) / (self._total_loners+1))*100,))
 *                     sys.stdout.flush()
 *                 elif self._post_destroy_count % 2500 == 0 and\             # <<<<<<<<<<<<<<
 *                      self._constants.verbose ==1:
 *                     sys.stdout.write(\
 */
      }
      __pyx_L5:;

      /* "parabam/chaser.pyx":659
 *     def __post_destroy_report__(self):
 *         if self._constants.verbose:
 *             if self._post_destroy_count >= self._post_destroy_thresh:             # <<<<<<<<<<<<<<
 *                 if self._post_destroy_count % 100 == 0 and\
 *                    self._constants.verbose == 2:
 */
    }

    /* "parabam/chaser.pyx":673
 *                     sys.stdout.flush()
 * 
 *             self._post_destroy_count += 1             # <<<<<<<<<<<<<<
 * 
 * class ChaserTask(Process):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_post_destroy_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_post_destroy_count, __pyx_t_1) < 0) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":658
 * 
 *     def __post_destroy_report__(self):
 *         if self._constants.verbose:             # <<<<<<<<<<<<<<
 *             if self._post_destroy_count >= self._post_destroy_thresh:
 *                 if self._post_destroy_count % 100 == 0 and\
 */
  }

  /* "parabam/chaser.pyx":657
 *             qu.close()
 * 
 *     def __post_destroy_report__(self):             # <<<<<<<<<<<<<<
 *         if self._constants.verbose:
 *             if self._post_destroy_count >= self._post_destroy_thresh:
 */

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("parabam.chaser.Handler.__post_destroy_report__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":676
 * 
 * class ChaserTask(Process):
 *     def __init__(self,object constants,object inqu, object outqu,             # <<<<<<<<<<<<<<
 *                       int max_reads, dict child_pack):
 *         super(ChaserTask,self).__init__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_10ChaserTask_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_10ChaserTask_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_10ChaserTask_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_10ChaserTask_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_constants = 0;
  PyObject *__pyx_v_inqu = 0;
  PyObject *__pyx_v_outqu = 0;
  int __pyx_v_max_reads;
  PyObject *__pyx_v_child_pack = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_constants,&__pyx_n_s_inqu,&__pyx_n_s_outqu,&__pyx_n_s_max_reads,&__pyx_n_s_child_pack_2,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_constants)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 6, 6, 1); __PYX_ERR(0, 676, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inqu)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 6, 6, 2); __PYX_ERR(0, 676, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_outqu)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 6, 6, 3); __PYX_ERR(0, 676, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_max_reads)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 6, 6, 4); __PYX_ERR(0, 676, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_child_pack_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 6, 6, 5); __PYX_ERR(0, 676, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 676, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
    }
    __pyx_v_self = values[0];
    __pyx_v_constants = values[1];
    __pyx_v_inqu = values[2];
    __pyx_v_outqu = values[3];
    __pyx_v_max_reads = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_max_reads == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 677, __pyx_L3_error)
    __pyx_v_child_pack = ((PyObject*)values[5]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 676, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.ChaserTask.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_child_pack), (&PyDict_Type), 1, "child_pack", 1))) __PYX_ERR(0, 677, __pyx_L1_error)
  __pyx_r = __pyx_pf_7parabam_6chaser_10ChaserTask___init__(__pyx_self, __pyx_v_self, __pyx_v_constants, __pyx_v_inqu, __pyx_v_outqu, __pyx_v_max_reads, __pyx_v_child_pack);

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

static PyObject *__pyx_pf_7parabam_6chaser_10ChaserTask___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_constants, PyObject *__pyx_v_inqu, PyObject *__pyx_v_outqu, int __pyx_v_max_reads, PyObject *__pyx_v_child_pack) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "parabam/chaser.pyx":678
 *     def __init__(self,object constants,object inqu, object outqu,
 *                       int max_reads, dict child_pack):
 *         super(ChaserTask,self).__init__()             # <<<<<<<<<<<<<<
 *         self._constants = constants
 *         self._inqu = inqu
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ChaserTask); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":679
 *                       int max_reads, dict child_pack):
 *         super(ChaserTask,self).__init__()
 *         self._constants = constants             # <<<<<<<<<<<<<<
 *         self._inqu = inqu
 *         self._outqu = outqu
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_constants_2, __pyx_v_constants) < 0) __PYX_ERR(0, 679, __pyx_L1_error)

  /* "parabam/chaser.pyx":680
 *         super(ChaserTask,self).__init__()
 *         self._constants = constants
 *         self._inqu = inqu             # <<<<<<<<<<<<<<
 *         self._outqu = outqu
 *         self._child_pack = child_pack
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_inqu_2, __pyx_v_inqu) < 0) __PYX_ERR(0, 680, __pyx_L1_error)

  /* "parabam/chaser.pyx":681
 *         self._constants = constants
 *         self._inqu = inqu
 *         self._outqu = outqu             # <<<<<<<<<<<<<<
 *         self._child_pack = child_pack
 *         self._max_reads = max_reads
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_outqu_2, __pyx_v_outqu) < 0) __PYX_ERR(0, 681, __pyx_L1_error)

  /* "parabam/chaser.pyx":682
 *         self._inqu = inqu
 *         self._outqu = outqu
 *         self._child_pack = child_pack             # <<<<<<<<<<<<<<
 *         self._max_reads = max_reads
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_child_pack, __pyx_v_child_pack) < 0) __PYX_ERR(0, 682, __pyx_L1_error)

  /* "parabam/chaser.pyx":683
 *         self._outqu = outqu
 *         self._child_pack = child_pack
 *         self._max_reads = max_reads             # <<<<<<<<<<<<<<
 * 
 *     def run(self):
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_max_reads); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_max_reads_2, __pyx_t_1) < 0) __PYX_ERR(0, 683, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":676
 * 
 * class ChaserTask(Process):
 *     def __init__(self,object constants,object inqu, object outqu,             # <<<<<<<<<<<<<<
 *                       int max_reads, dict child_pack):
 *         super(ChaserTask,self).__init__()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("parabam.chaser.ChaserTask.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":685
 *         self._max_reads = max_reads
 * 
 *     def run(self):             # <<<<<<<<<<<<<<
 *         primary_handler = PrimaryHandler(constants = self._constants,
 *                                          max_reads = self._max_reads,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_10ChaserTask_3run(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_10ChaserTask_3run = {"run", (PyCFunction)__pyx_pw_7parabam_6chaser_10ChaserTask_3run, METH_O, 0};
static PyObject *__pyx_pw_7parabam_6chaser_10ChaserTask_3run(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("run (wrapper)", 0);
  __pyx_r = __pyx_pf_7parabam_6chaser_10ChaserTask_2run(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7parabam_6chaser_10ChaserTask_2run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_primary_handler = NULL;
  PyObject *__pyx_v_match_handler = NULL;
  PyObject *__pyx_v_package = NULL;
  PyObject *__pyx_v_results = 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;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  __Pyx_RefNannySetupContext("run", 0);

  /* "parabam/chaser.pyx":686
 * 
 *     def run(self):
 *         primary_handler = PrimaryHandler(constants = self._constants,             # <<<<<<<<<<<<<<
 *                                          max_reads = self._max_reads,
 *                                          child_pack = self._child_pack,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PrimaryHandler); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_constants_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_constants, __pyx_t_3) < 0) __PYX_ERR(0, 686, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "parabam/chaser.pyx":687
 *     def run(self):
 *         primary_handler = PrimaryHandler(constants = self._constants,
 *                                          max_reads = self._max_reads,             # <<<<<<<<<<<<<<
 *                                          child_pack = self._child_pack,
 *                                          pid = self.pid)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_max_reads_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_max_reads, __pyx_t_3) < 0) __PYX_ERR(0, 686, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "parabam/chaser.pyx":688
 *         primary_handler = PrimaryHandler(constants = self._constants,
 *                                          max_reads = self._max_reads,
 *                                          child_pack = self._child_pack,             # <<<<<<<<<<<<<<
 *                                          pid = self.pid)
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_child_pack); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_child_pack_2, __pyx_t_3) < 0) __PYX_ERR(0, 686, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "parabam/chaser.pyx":689
 *                                          max_reads = self._max_reads,
 *                                          child_pack = self._child_pack,
 *                                          pid = self.pid)             # <<<<<<<<<<<<<<
 * 
 *         match_handler = MatchMakerHandler(constants = self._constants,
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_pid, __pyx_t_3) < 0) __PYX_ERR(0, 686, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "parabam/chaser.pyx":686
 * 
 *     def run(self):
 *         primary_handler = PrimaryHandler(constants = self._constants,             # <<<<<<<<<<<<<<
 *                                          max_reads = self._max_reads,
 *                                          child_pack = self._child_pack,
 */
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_primary_handler = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "parabam/chaser.pyx":691
 *                                          pid = self.pid)
 * 
 *         match_handler = MatchMakerHandler(constants = self._constants,             # <<<<<<<<<<<<<<
 *                                          max_reads = self._max_reads,
 *                                          child_pack = self._child_pack,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MatchMakerHandler); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_constants_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_constants, __pyx_t_1) < 0) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":692
 * 
 *         match_handler = MatchMakerHandler(constants = self._constants,
 *                                          max_reads = self._max_reads,             # <<<<<<<<<<<<<<
 *                                          child_pack = self._child_pack,
 *                                          pid = self.pid)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_max_reads_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_max_reads, __pyx_t_1) < 0) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":693
 *         match_handler = MatchMakerHandler(constants = self._constants,
 *                                          max_reads = self._max_reads,
 *                                          child_pack = self._child_pack,             # <<<<<<<<<<<<<<
 *                                          pid = self.pid)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_child_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_child_pack_2, __pyx_t_1) < 0) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":694
 *                                          max_reads = self._max_reads,
 *                                          child_pack = self._child_pack,
 *                                          pid = self.pid)             # <<<<<<<<<<<<<<
 * 
 *         while True:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_pid, __pyx_t_1) < 0) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":691
 *                                          pid = self.pid)
 * 
 *         match_handler = MatchMakerHandler(constants = self._constants,             # <<<<<<<<<<<<<<
 *                                          max_reads = self._max_reads,
 *                                          child_pack = self._child_pack,
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_match_handler = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":696
 *                                          pid = self.pid)
 * 
 *         while True:             # <<<<<<<<<<<<<<
 *             try:
 *                 package = self._inqu.get(False)
 */
  while (1) {

    /* "parabam/chaser.pyx":697
 * 
 *         while True:
 *             try:             # <<<<<<<<<<<<<<
 *                 package = self._inqu.get(False)
 *                 if type(package) == JobPackage:
 */
    {
      __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:*/ {

        /* "parabam/chaser.pyx":698
 *         while True:
 *             try:
 *                 package = self._inqu.get(False)             # <<<<<<<<<<<<<<
 *                 if type(package) == JobPackage:
 *                     if package.level == -1:
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inqu_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 698, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 698, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, Py_False) : __Pyx_PyObject_CallOneArg(__pyx_t_3, Py_False);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 698, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF_SET(__pyx_v_package, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "parabam/chaser.pyx":699
 *             try:
 *                 package = self._inqu.get(False)
 *                 if type(package) == JobPackage:             # <<<<<<<<<<<<<<
 *                     if package.level == -1:
 *                         results = primary_handler.run(package.paths)
 */
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_JobPackage); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 699, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_package)), __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 699, __pyx_L5_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 699, __pyx_L5_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (__pyx_t_7) {

          /* "parabam/chaser.pyx":700
 *                 package = self._inqu.get(False)
 *                 if type(package) == JobPackage:
 *                     if package.level == -1:             # <<<<<<<<<<<<<<
 *                         results = primary_handler.run(package.paths)
 *                     else:
 */
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_package, __pyx_n_s_level); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 700, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_t_3, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 700, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 700, __pyx_L5_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (__pyx_t_7) {

            /* "parabam/chaser.pyx":701
 *                 if type(package) == JobPackage:
 *                     if package.level == -1:
 *                         results = primary_handler.run(package.paths)             # <<<<<<<<<<<<<<
 *                     else:
 *                         results = match_handler.run(package.paths,
 */
            __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_primary_handler, __pyx_n_s_run); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 701, __pyx_L5_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_package, __pyx_n_s_paths); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 701, __pyx_L5_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_8 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
              __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
              if (likely(__pyx_t_8)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                __Pyx_INCREF(__pyx_t_8);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_3, function);
              }
            }
            __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L5_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF_SET(__pyx_v_results, __pyx_t_1);
            __pyx_t_1 = 0;

            /* "parabam/chaser.pyx":700
 *                 package = self._inqu.get(False)
 *                 if type(package) == JobPackage:
 *                     if package.level == -1:             # <<<<<<<<<<<<<<
 *                         results = primary_handler.run(package.paths)
 *                     else:
 */
            goto __pyx_L14;
          }

          /* "parabam/chaser.pyx":703
 *                         results = primary_handler.run(package.paths)
 *                     else:
 *                         results = match_handler.run(package.paths,             # <<<<<<<<<<<<<<
 *                                           package.loner_type,
 *                                           package.level,
 */
          /*else*/ {
            __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_match_handler, __pyx_n_s_run); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 703, __pyx_L5_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_package, __pyx_n_s_paths); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 703, __pyx_L5_error)
            __Pyx_GOTREF(__pyx_t_2);

            /* "parabam/chaser.pyx":704
 *                     else:
 *                         results = match_handler.run(package.paths,
 *                                           package.loner_type,             # <<<<<<<<<<<<<<
 *                                           package.level,
 *                                           package.fragment_leftovers)
 */
            __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_package, __pyx_n_s_loner_type); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 704, __pyx_L5_error)
            __Pyx_GOTREF(__pyx_t_8);

            /* "parabam/chaser.pyx":705
 *                         results = match_handler.run(package.paths,
 *                                           package.loner_type,
 *                                           package.level,             # <<<<<<<<<<<<<<
 *                                           package.fragment_leftovers)
 *                     self._outqu.put(results)
 */
            __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_package, __pyx_n_s_level); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 705, __pyx_L5_error)
            __Pyx_GOTREF(__pyx_t_9);

            /* "parabam/chaser.pyx":706
 *                                           package.loner_type,
 *                                           package.level,
 *                                           package.fragment_leftovers)             # <<<<<<<<<<<<<<
 *                     self._outqu.put(results)
 * 
 */
            __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_package, __pyx_n_s_fragment_leftovers); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 706, __pyx_L5_error)
            __Pyx_GOTREF(__pyx_t_10);
            __pyx_t_11 = NULL;
            __pyx_t_12 = 0;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
              __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3);
              if (likely(__pyx_t_11)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                __Pyx_INCREF(__pyx_t_11);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_3, function);
                __pyx_t_12 = 1;
              }
            }
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_3)) {
              PyObject *__pyx_temp[5] = {__pyx_t_11, __pyx_t_2, __pyx_t_8, __pyx_t_9, __pyx_t_10};
              __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_12, 4+__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 703, __pyx_L5_error)
              __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            } else
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
              PyObject *__pyx_temp[5] = {__pyx_t_11, __pyx_t_2, __pyx_t_8, __pyx_t_9, __pyx_t_10};
              __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_12, 4+__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 703, __pyx_L5_error)
              __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            } else
            #endif
            {
              __pyx_t_13 = PyTuple_New(4+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 703, __pyx_L5_error)
              __Pyx_GOTREF(__pyx_t_13);
              if (__pyx_t_11) {
                __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_11); __pyx_t_11 = NULL;
              }
              __Pyx_GIVEREF(__pyx_t_2);
              PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_12, __pyx_t_2);
              __Pyx_GIVEREF(__pyx_t_8);
              PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_12, __pyx_t_8);
              __Pyx_GIVEREF(__pyx_t_9);
              PyTuple_SET_ITEM(__pyx_t_13, 2+__pyx_t_12, __pyx_t_9);
              __Pyx_GIVEREF(__pyx_t_10);
              PyTuple_SET_ITEM(__pyx_t_13, 3+__pyx_t_12, __pyx_t_10);
              __pyx_t_2 = 0;
              __pyx_t_8 = 0;
              __pyx_t_9 = 0;
              __pyx_t_10 = 0;
              __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 703, __pyx_L5_error)
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            }
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF_SET(__pyx_v_results, __pyx_t_1);
            __pyx_t_1 = 0;
          }
          __pyx_L14:;

          /* "parabam/chaser.pyx":707
 *                                           package.level,
 *                                           package.fragment_leftovers)
 *                     self._outqu.put(results)             # <<<<<<<<<<<<<<
 * 
 *                 elif type(package) == DestroyPackage:
 */
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_outqu_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 707, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_put); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 707, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) {
            __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_13);
            if (likely(__pyx_t_3)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_13, function);
            }
          }
          __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_13, __pyx_t_3, __pyx_v_results) : __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_v_results);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 707, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "parabam/chaser.pyx":699
 *             try:
 *                 package = self._inqu.get(False)
 *                 if type(package) == JobPackage:             # <<<<<<<<<<<<<<
 *                     if package.level == -1:
 *                         results = primary_handler.run(package.paths)
 */
          goto __pyx_L13;
        }

        /* "parabam/chaser.pyx":709
 *                     self._outqu.put(results)
 * 
 *                 elif type(package) == DestroyPackage:             # <<<<<<<<<<<<<<
 *                     break
 * 
 */
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DestroyPackage); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 709, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_13 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_package)), __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 709, __pyx_L5_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 709, __pyx_L5_error)
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        if (__pyx_t_7) {

          /* "parabam/chaser.pyx":710
 * 
 *                 elif type(package) == DestroyPackage:
 *                     break             # <<<<<<<<<<<<<<
 * 
 *                 time.sleep(0.005)
 */
          goto __pyx_L10_try_break;

          /* "parabam/chaser.pyx":709
 *                     self._outqu.put(results)
 * 
 *                 elif type(package) == DestroyPackage:             # <<<<<<<<<<<<<<
 *                     break
 * 
 */
        }
        __pyx_L13:;

        /* "parabam/chaser.pyx":712
 *                     break
 * 
 *                 time.sleep(0.005)             # <<<<<<<<<<<<<<
 * 
 *             except Queue2.Empty:
 */
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 712, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_sleep); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 712, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_1)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_1);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_13 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_float_0_005) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_float_0_005);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 712, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

        /* "parabam/chaser.pyx":697
 * 
 *         while True:
 *             try:             # <<<<<<<<<<<<<<
 *                 package = self._inqu.get(False)
 *                 if type(package) == JobPackage:
 */
      }
      __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_L12_try_end;
      __pyx_L5_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "parabam/chaser.pyx":714
 *                 time.sleep(0.005)
 * 
 *             except Queue2.Empty:             # <<<<<<<<<<<<<<
 *                 time.sleep(5)
 *         return
 */
      __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_3, &__pyx_t_1);
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Queue2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 714, __pyx_L7_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_Empty); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 714, __pyx_L7_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_12 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_13, __pyx_t_9);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_ErrRestore(__pyx_t_13, __pyx_t_3, __pyx_t_1);
      __pyx_t_13 = 0; __pyx_t_3 = 0; __pyx_t_1 = 0;
      if (__pyx_t_12) {
        __Pyx_AddTraceback("parabam.chaser.ChaserTask.run", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_13) < 0) __PYX_ERR(0, 714, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GOTREF(__pyx_t_13);

        /* "parabam/chaser.pyx":715
 * 
 *             except Queue2.Empty:
 *                 time.sleep(5)             # <<<<<<<<<<<<<<
 *         return
 * 
 */
        __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_time); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 715, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_sleep); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 715, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_10)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
          }
        }
        __pyx_t_9 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_10, __pyx_int_5) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_int_5);
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 715, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        goto __pyx_L6_exception_handled;
      }
      goto __pyx_L7_except_error;
      __pyx_L7_except_error:;

      /* "parabam/chaser.pyx":697
 * 
 *         while True:
 *             try:             # <<<<<<<<<<<<<<
 *                 package = self._inqu.get(False)
 *                 if type(package) == JobPackage:
 */
      __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_L10_try_break:;
      __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_L4_break;
      __pyx_L6_exception_handled:;
      __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);
      __pyx_L12_try_end:;
    }
  }
  __pyx_L4_break:;

  /* "parabam/chaser.pyx":716
 *             except Queue2.Empty:
 *                 time.sleep(5)
 *         return             # <<<<<<<<<<<<<<
 * 
 * class ChaserHandler(object):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "parabam/chaser.pyx":685
 *         self._max_reads = max_reads
 * 
 *     def run(self):             # <<<<<<<<<<<<<<
 *         primary_handler = PrimaryHandler(constants = self._constants,
 *                                          max_reads = self._max_reads,
 */

  /* 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_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("parabam.chaser.ChaserTask.run", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_primary_handler);
  __Pyx_XDECREF(__pyx_v_match_handler);
  __Pyx_XDECREF(__pyx_v_package);
  __Pyx_XDECREF(__pyx_v_results);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":720
 * class ChaserHandler(object):
 * 
 *     def __init__(self,object constants,int max_reads, dict child_pack,int pid):             # <<<<<<<<<<<<<<
 *         self._constants = constants
 *         self._max_reads = max_reads
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_13ChaserHandler_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_13ChaserHandler_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_13ChaserHandler_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_13ChaserHandler_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_constants = 0;
  int __pyx_v_max_reads;
  PyObject *__pyx_v_child_pack = 0;
  int __pyx_v_pid;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_constants,&__pyx_n_s_max_reads,&__pyx_n_s_child_pack_2,&__pyx_n_s_pid,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_constants)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 1); __PYX_ERR(0, 720, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_max_reads)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 2); __PYX_ERR(0, 720, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_child_pack_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 3); __PYX_ERR(0, 720, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pid)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 4); __PYX_ERR(0, 720, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 720, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_self = values[0];
    __pyx_v_constants = values[1];
    __pyx_v_max_reads = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_max_reads == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 720, __pyx_L3_error)
    __pyx_v_child_pack = ((PyObject*)values[3]);
    __pyx_v_pid = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_pid == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 720, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 720, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.ChaserHandler.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_child_pack), (&PyDict_Type), 1, "child_pack", 1))) __PYX_ERR(0, 720, __pyx_L1_error)
  __pyx_r = __pyx_pf_7parabam_6chaser_13ChaserHandler___init__(__pyx_self, __pyx_v_self, __pyx_v_constants, __pyx_v_max_reads, __pyx_v_child_pack, __pyx_v_pid);

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

static PyObject *__pyx_pf_7parabam_6chaser_13ChaserHandler___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_constants, int __pyx_v_max_reads, PyObject *__pyx_v_child_pack, int __pyx_v_pid) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "parabam/chaser.pyx":721
 * 
 *     def __init__(self,object constants,int max_reads, dict child_pack,int pid):
 *         self._constants = constants             # <<<<<<<<<<<<<<
 *         self._max_reads = max_reads
 *         self._child_pack = child_pack
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_constants_2, __pyx_v_constants) < 0) __PYX_ERR(0, 721, __pyx_L1_error)

  /* "parabam/chaser.pyx":722
 *     def __init__(self,object constants,int max_reads, dict child_pack,int pid):
 *         self._constants = constants
 *         self._max_reads = max_reads             # <<<<<<<<<<<<<<
 *         self._child_pack = child_pack
 *         self._parent_bam = self._child_pack["parent_bam"]
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_max_reads); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_max_reads_2, __pyx_t_1) < 0) __PYX_ERR(0, 722, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":723
 *         self._constants = constants
 *         self._max_reads = max_reads
 *         self._child_pack = child_pack             # <<<<<<<<<<<<<<
 *         self._parent_bam = self._child_pack["parent_bam"]
 *         self._header = self._parent_bam.header
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_child_pack, __pyx_v_child_pack) < 0) __PYX_ERR(0, 723, __pyx_L1_error)

  /* "parabam/chaser.pyx":724
 *         self._max_reads = max_reads
 *         self._child_pack = child_pack
 *         self._parent_bam = self._child_pack["parent_bam"]             # <<<<<<<<<<<<<<
 *         self._header = self._parent_bam.header
 *         self._record = 0
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_child_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_s_parent_bam); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_parent_bam_2, __pyx_t_2) < 0) __PYX_ERR(0, 724, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "parabam/chaser.pyx":725
 *         self._child_pack = child_pack
 *         self._parent_bam = self._child_pack["parent_bam"]
 *         self._header = self._parent_bam.header             # <<<<<<<<<<<<<<
 *         self._record = 0
 *         self.pid = pid
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parent_bam_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_header); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_header_2, __pyx_t_1) < 0) __PYX_ERR(0, 725, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":726
 *         self._parent_bam = self._child_pack["parent_bam"]
 *         self._header = self._parent_bam.header
 *         self._record = 0             # <<<<<<<<<<<<<<
 *         self.pid = pid
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_record, __pyx_int_0) < 0) __PYX_ERR(0, 726, __pyx_L1_error)

  /* "parabam/chaser.pyx":727
 *         self._header = self._parent_bam.header
 *         self._record = 0
 *         self.pid = pid             # <<<<<<<<<<<<<<
 * 
 *     def __get_loner_temp_path__(self,loner_type,level=0,unique=""):
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_pid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_pid, __pyx_t_1) < 0) __PYX_ERR(0, 727, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":720
 * class ChaserHandler(object):
 * 
 *     def __init__(self,object constants,int max_reads, dict child_pack,int pid):             # <<<<<<<<<<<<<<
 *         self._constants = constants
 *         self._max_reads = max_reads
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("parabam.chaser.ChaserHandler.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":729
 *         self.pid = pid
 * 
 *     def __get_loner_temp_path__(self,loner_type,level=0,unique=""):             # <<<<<<<<<<<<<<
 *         self._record += 1
 *         return "%s/%s_%d_%d_%s_%s.bam" %\
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_13ChaserHandler_3__get_loner_temp_path__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_13ChaserHandler_3__get_loner_temp_path__ = {"__get_loner_temp_path__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_13ChaserHandler_3__get_loner_temp_path__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_13ChaserHandler_3__get_loner_temp_path__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_loner_type = 0;
  PyObject *__pyx_v_level = 0;
  PyObject *__pyx_v_unique = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get_loner_temp_path__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_loner_type,&__pyx_n_s_level,&__pyx_n_s_unique,0};
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)((PyObject *)__pyx_int_0));
    values[3] = ((PyObject *)((PyObject*)__pyx_kp_s__9));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loner_type)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__get_loner_temp_path__", 0, 2, 4, 1); __PYX_ERR(0, 729, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_level);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_unique);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__get_loner_temp_path__") < 0)) __PYX_ERR(0, 729, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_loner_type = values[1];
    __pyx_v_level = values[2];
    __pyx_v_unique = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__get_loner_temp_path__", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 729, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.ChaserHandler.__get_loner_temp_path__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_13ChaserHandler_2__get_loner_temp_path__(__pyx_self, __pyx_v_self, __pyx_v_loner_type, __pyx_v_level, __pyx_v_unique);

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

static PyObject *__pyx_pf_7parabam_6chaser_13ChaserHandler_2__get_loner_temp_path__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_loner_type, PyObject *__pyx_v_level, PyObject *__pyx_v_unique) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("__get_loner_temp_path__", 0);

  /* "parabam/chaser.pyx":730
 * 
 *     def __get_loner_temp_path__(self,loner_type,level=0,unique=""):
 *         self._record += 1             # <<<<<<<<<<<<<<
 *         return "%s/%s_%d_%d_%s_%s.bam" %\
 *             (self._constants.temp_dir,self.pid,
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_record); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_record, __pyx_t_2) < 0) __PYX_ERR(0, 730, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "parabam/chaser.pyx":731
 *     def __get_loner_temp_path__(self,loner_type,level=0,unique=""):
 *         self._record += 1
 *         return "%s/%s_%d_%d_%s_%s.bam" %\             # <<<<<<<<<<<<<<
 *             (self._constants.temp_dir,self.pid,
 *              self._record,level,loner_type,unique)
 */
  __Pyx_XDECREF(__pyx_r);

  /* "parabam/chaser.pyx":732
 *         self._record += 1
 *         return "%s/%s_%d_%d_%s_%s.bam" %\
 *             (self._constants.temp_dir,self.pid,             # <<<<<<<<<<<<<<
 *              self._record,level,loner_type,unique)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_constants_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_temp_dir_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "parabam/chaser.pyx":733
 *         return "%s/%s_%d_%d_%s_%s.bam" %\
 *             (self._constants.temp_dir,self.pid,
 *              self._record,level,loner_type,unique)             # <<<<<<<<<<<<<<
 * 
 * class PrimaryHandler(ChaserHandler):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_record); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "parabam/chaser.pyx":732
 *         self._record += 1
 *         return "%s/%s_%d_%d_%s_%s.bam" %\
 *             (self._constants.temp_dir,self.pid,             # <<<<<<<<<<<<<<
 *              self._record,level,loner_type,unique)
 * 
 */
  __pyx_t_4 = PyTuple_New(6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
  __Pyx_INCREF(__pyx_v_level);
  __Pyx_GIVEREF(__pyx_v_level);
  PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_level);
  __Pyx_INCREF(__pyx_v_loner_type);
  __Pyx_GIVEREF(__pyx_v_loner_type);
  PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_v_loner_type);
  __Pyx_INCREF(__pyx_v_unique);
  __Pyx_GIVEREF(__pyx_v_unique);
  PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_v_unique);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;

  /* "parabam/chaser.pyx":731
 *     def __get_loner_temp_path__(self,loner_type,level=0,unique=""):
 *         self._record += 1
 *         return "%s/%s_%d_%d_%s_%s.bam" %\             # <<<<<<<<<<<<<<
 *             (self._constants.temp_dir,self.pid,
 *              self._record,level,loner_type,unique)
 */
  __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_s_s__d__d__s__s_bam, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "parabam/chaser.pyx":729
 *         self.pid = pid
 * 
 *     def __get_loner_temp_path__(self,loner_type,level=0,unique=""):             # <<<<<<<<<<<<<<
 *         self._record += 1
 *         return "%s/%s_%d_%d_%s_%s.bam" %\
 */

  /* 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("parabam.chaser.ChaserHandler.__get_loner_temp_path__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":737
 * class PrimaryHandler(ChaserHandler):
 * 
 *     def __init__(self,object constants, int max_reads, dict child_pack,int pid):             # <<<<<<<<<<<<<<
 *         super(PrimaryHandler,self).__init__(constants,max_reads,child_pack,pid)
 *         self.match_handler = MatchMakerHandler(constants,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_14PrimaryHandler_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_14PrimaryHandler_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_14PrimaryHandler_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_14PrimaryHandler_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_constants = 0;
  int __pyx_v_max_reads;
  PyObject *__pyx_v_child_pack = 0;
  int __pyx_v_pid;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_constants,&__pyx_n_s_max_reads,&__pyx_n_s_child_pack_2,&__pyx_n_s_pid,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_constants)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 1); __PYX_ERR(0, 737, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_max_reads)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 2); __PYX_ERR(0, 737, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_child_pack_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 3); __PYX_ERR(0, 737, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pid)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 4); __PYX_ERR(0, 737, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 737, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_self = values[0];
    __pyx_v_constants = values[1];
    __pyx_v_max_reads = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_max_reads == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 737, __pyx_L3_error)
    __pyx_v_child_pack = ((PyObject*)values[3]);
    __pyx_v_pid = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_pid == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 737, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 737, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.PrimaryHandler.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_child_pack), (&PyDict_Type), 1, "child_pack", 1))) __PYX_ERR(0, 737, __pyx_L1_error)
  __pyx_r = __pyx_pf_7parabam_6chaser_14PrimaryHandler___init__(__pyx_self, __pyx_v_self, __pyx_v_constants, __pyx_v_max_reads, __pyx_v_child_pack, __pyx_v_pid);

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

static PyObject *__pyx_pf_7parabam_6chaser_14PrimaryHandler___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_constants, int __pyx_v_max_reads, PyObject *__pyx_v_child_pack, int __pyx_v_pid) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "parabam/chaser.pyx":738
 * 
 *     def __init__(self,object constants, int max_reads, dict child_pack,int pid):
 *         super(PrimaryHandler,self).__init__(constants,max_reads,child_pack,pid)             # <<<<<<<<<<<<<<
 *         self.match_handler = MatchMakerHandler(constants,
 *                                                max_reads,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PrimaryHandler); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_max_reads); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_pid); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_v_constants, __pyx_t_2, __pyx_v_child_pack, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 738, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_v_constants, __pyx_t_2, __pyx_v_child_pack, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 738, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 738, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_INCREF(__pyx_v_constants);
    __Pyx_GIVEREF(__pyx_v_constants);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_constants);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_child_pack);
    __Pyx_GIVEREF(__pyx_v_child_pack);
    PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_v_child_pack);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_6, __pyx_t_4);
    __pyx_t_2 = 0;
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 738, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":739
 *     def __init__(self,object constants, int max_reads, dict child_pack,int pid):
 *         super(PrimaryHandler,self).__init__(constants,max_reads,child_pack,pid)
 *         self.match_handler = MatchMakerHandler(constants,             # <<<<<<<<<<<<<<
 *                                                max_reads,
 *                                                child_pack,pid)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MatchMakerHandler); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "parabam/chaser.pyx":740
 *         super(PrimaryHandler,self).__init__(constants,max_reads,child_pack,pid)
 *         self.match_handler = MatchMakerHandler(constants,
 *                                                max_reads,             # <<<<<<<<<<<<<<
 *                                                child_pack,pid)
 * 
 */
  __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_max_reads); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "parabam/chaser.pyx":741
 *         self.match_handler = MatchMakerHandler(constants,
 *                                                max_reads,
 *                                                child_pack,pid)             # <<<<<<<<<<<<<<
 * 
 *     def run(self,unsorted_paths):
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_pid); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[5] = {__pyx_t_2, __pyx_v_constants, __pyx_t_7, __pyx_v_child_pack, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 739, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[5] = {__pyx_t_2, __pyx_v_constants, __pyx_t_7, __pyx_v_child_pack, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 739, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 739, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_constants);
    __Pyx_GIVEREF(__pyx_v_constants);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_6, __pyx_v_constants);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_6, __pyx_t_7);
    __Pyx_INCREF(__pyx_v_child_pack);
    __Pyx_GIVEREF(__pyx_v_child_pack);
    PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_6, __pyx_v_child_pack);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_6, __pyx_t_4);
    __pyx_t_7 = 0;
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 739, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "parabam/chaser.pyx":739
 *     def __init__(self,object constants, int max_reads, dict child_pack,int pid):
 *         super(PrimaryHandler,self).__init__(constants,max_reads,child_pack,pid)
 *         self.match_handler = MatchMakerHandler(constants,             # <<<<<<<<<<<<<<
 *                                                max_reads,
 *                                                child_pack,pid)
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_match_handler, __pyx_t_1) < 0) __PYX_ERR(0, 739, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":737
 * class PrimaryHandler(ChaserHandler):
 * 
 *     def __init__(self,object constants, int max_reads, dict child_pack,int pid):             # <<<<<<<<<<<<<<
 *         super(PrimaryHandler,self).__init__(constants,max_reads,child_pack,pid)
 *         self.match_handler = MatchMakerHandler(constants,
 */

  /* 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_7);
  __Pyx_AddTraceback("parabam.chaser.PrimaryHandler.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":743
 *                                                child_pack,pid)
 * 
 *     def run(self,unsorted_paths):             # <<<<<<<<<<<<<<
 *         #speedup
 *         write_loner = self.__write_loner__
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_14PrimaryHandler_3run(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_14PrimaryHandler_3run = {"run", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_14PrimaryHandler_3run, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_14PrimaryHandler_3run(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_unsorted_paths = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("run (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_unsorted_paths,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_unsorted_paths)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("run", 1, 2, 2, 1); __PYX_ERR(0, 743, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "run") < 0)) __PYX_ERR(0, 743, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_unsorted_paths = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("run", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 743, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.PrimaryHandler.run", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_14PrimaryHandler_2run(__pyx_self, __pyx_v_self, __pyx_v_unsorted_paths);

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

static PyObject *__pyx_pf_7parabam_6chaser_14PrimaryHandler_2run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_unsorted_paths) {
  PyObject *__pyx_v_write_loner = NULL;
  PyObject *__pyx_v_loner_holder = NULL;
  PyObject *__pyx_v_loner_file_counts = NULL;
  PyObject *__pyx_v_loner_total = NULL;
  PyObject *__pyx_v_chrom_bins = NULL;
  PyObject *__pyx_v_read = NULL;
  PyObject *__pyx_v_loner_type = NULL;
  PyObject *__pyx_v_loner_paths = NULL;
  PyObject *__pyx_v_match_maker_results = NULL;
  PyObject *__pyx_v_paths = NULL;
  PyObject *__pyx_v_path = NULL;
  PyObject *__pyx_v_matchmaker_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  Py_ssize_t __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  __Pyx_RefNannySetupContext("run", 0);

  /* "parabam/chaser.pyx":745
 *     def run(self,unsorted_paths):
 *         #speedup
 *         write_loner = self.__write_loner__             # <<<<<<<<<<<<<<
 *         #speedup
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_write_loner); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_write_loner = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":748
 *         #speedup
 * 
 *         loner_holder = self.__get_loner_holder__()             # <<<<<<<<<<<<<<
 *         loner_file_counts = Counter()
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_loner_holder); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_loner_holder = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":749
 * 
 *         loner_holder = self.__get_loner_holder__()
 *         loner_file_counts = Counter()             # <<<<<<<<<<<<<<
 * 
 *         loner_total = 0
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Counter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_loner_file_counts = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":751
 *         loner_file_counts = Counter()
 * 
 *         loner_total = 0             # <<<<<<<<<<<<<<
 * 
 *         chrom_bins = self._child_pack["chrom_bins"]
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_loner_total = __pyx_int_0;

  /* "parabam/chaser.pyx":753
 *         loner_total = 0
 * 
 *         chrom_bins = self._child_pack["chrom_bins"]             # <<<<<<<<<<<<<<
 * 
 *         for read in self.__read_generator__(unsorted_paths):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_child_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_s_chrom_bins); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_chrom_bins = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "parabam/chaser.pyx":755
 *         chrom_bins = self._child_pack["chrom_bins"]
 * 
 *         for read in self.__read_generator__(unsorted_paths):             # <<<<<<<<<<<<<<
 * 
 *             loner_type = self.__get_loner_type__(read,chrom_bins)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_read_generator); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_v_unsorted_paths) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_unsorted_paths);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 755, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 755, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 755, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 755, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 755, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 755, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_5(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 755, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_read, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "parabam/chaser.pyx":757
 *         for read in self.__read_generator__(unsorted_paths):
 * 
 *             loner_type = self.__get_loner_type__(read,chrom_bins)             # <<<<<<<<<<<<<<
 *             loner_total += 1
 *             write_loner(loner_holder,loner_file_counts,loner_type,read)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_loner_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 757, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_read, __pyx_v_chrom_bins};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 757, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_read, __pyx_v_chrom_bins};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 757, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 757, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_INCREF(__pyx_v_read);
      __Pyx_GIVEREF(__pyx_v_read);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_read);
      __Pyx_INCREF(__pyx_v_chrom_bins);
      __Pyx_GIVEREF(__pyx_v_chrom_bins);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_chrom_bins);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 757, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_loner_type, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "parabam/chaser.pyx":758
 * 
 *             loner_type = self.__get_loner_type__(read,chrom_bins)
 *             loner_total += 1             # <<<<<<<<<<<<<<
 *             write_loner(loner_holder,loner_file_counts,loner_type,read)
 * 
 */
    __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_loner_total, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 758, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_loner_total, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "parabam/chaser.pyx":759
 *             loner_type = self.__get_loner_type__(read,chrom_bins)
 *             loner_total += 1
 *             write_loner(loner_holder,loner_file_counts,loner_type,read)             # <<<<<<<<<<<<<<
 * 
 *         loner_paths = self.__get_paths_and_close__(loner_holder)
 */
    __Pyx_INCREF(__pyx_v_write_loner);
    __pyx_t_3 = __pyx_v_write_loner; __pyx_t_8 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[5] = {__pyx_t_8, __pyx_v_loner_holder, __pyx_v_loner_file_counts, __pyx_v_loner_type, __pyx_v_read};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 759, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[5] = {__pyx_t_8, __pyx_v_loner_holder, __pyx_v_loner_file_counts, __pyx_v_loner_type, __pyx_v_read};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 759, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(4+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 759, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_8) {
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL;
      }
      __Pyx_INCREF(__pyx_v_loner_holder);
      __Pyx_GIVEREF(__pyx_v_loner_holder);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_v_loner_holder);
      __Pyx_INCREF(__pyx_v_loner_file_counts);
      __Pyx_GIVEREF(__pyx_v_loner_file_counts);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_v_loner_file_counts);
      __Pyx_INCREF(__pyx_v_loner_type);
      __Pyx_GIVEREF(__pyx_v_loner_type);
      PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_7, __pyx_v_loner_type);
      __Pyx_INCREF(__pyx_v_read);
      __Pyx_GIVEREF(__pyx_v_read);
      PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_7, __pyx_v_read);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 759, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "parabam/chaser.pyx":755
 *         chrom_bins = self._child_pack["chrom_bins"]
 * 
 *         for read in self.__read_generator__(unsorted_paths):             # <<<<<<<<<<<<<<
 * 
 *             loner_type = self.__get_loner_type__(read,chrom_bins)
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":761
 *             write_loner(loner_holder,loner_file_counts,loner_type,read)
 * 
 *         loner_paths = self.__get_paths_and_close__(loner_holder)             # <<<<<<<<<<<<<<
 * 
 *         match_maker_results = []
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_paths_and_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_loner_holder) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_loner_holder);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_loner_paths = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":763
 *         loner_paths = self.__get_paths_and_close__(loner_holder)
 * 
 *         match_maker_results = []             # <<<<<<<<<<<<<<
 *         for loner_type,paths in loner_paths.items():
 *             for path in paths:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_match_maker_results = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":764
 * 
 *         match_maker_results = []
 *         for loner_type,paths in loner_paths.items():             # <<<<<<<<<<<<<<
 *             for path in paths:
 *                 if loner_type == "NP":
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_loner_paths, __pyx_n_s_items); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 764, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 764, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 764, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 764, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 764, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_5(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 764, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 764, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 764, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 764, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 764, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
      index = 0; __pyx_t_3 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_3)) goto __pyx_L7_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L7_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 764, __pyx_L1_error)
      __pyx_t_9 = NULL;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L8_unpacking_done;
      __pyx_L7_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 764, __pyx_L1_error)
      __pyx_L8_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_loner_type, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_paths, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "parabam/chaser.pyx":765
 *         match_maker_results = []
 *         for loner_type,paths in loner_paths.items():
 *             for path in paths:             # <<<<<<<<<<<<<<
 *                 if loner_type == "NP":
 *                     matchmaker_result = \
 */
    if (likely(PyList_CheckExact(__pyx_v_paths)) || PyTuple_CheckExact(__pyx_v_paths)) {
      __pyx_t_1 = __pyx_v_paths; __Pyx_INCREF(__pyx_t_1); __pyx_t_10 = 0;
      __pyx_t_11 = NULL;
    } else {
      __pyx_t_10 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_paths); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 765, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_11 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 765, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_11)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_6); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 765, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 765, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_6); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 765, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 765, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_11(__pyx_t_1);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 765, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_path, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "parabam/chaser.pyx":766
 *         for loner_type,paths in loner_paths.items():
 *             for path in paths:
 *                 if loner_type == "NP":             # <<<<<<<<<<<<<<
 *                     matchmaker_result = \
 *                         self.__handle_unpaired_reads__(loner_type, path)
 */
      __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_v_loner_type, __pyx_n_s_NP, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 766, __pyx_L1_error)
      if (__pyx_t_12) {

        /* "parabam/chaser.pyx":768
 *                 if loner_type == "NP":
 *                     matchmaker_result = \
 *                         self.__handle_unpaired_reads__(loner_type, path)             # <<<<<<<<<<<<<<
 *                 else:
 *                     matchmaker_result = \
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_handle_unpaired_reads); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 768, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_8 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_7 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_loner_type, __pyx_v_path};
          __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 768, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_GOTREF(__pyx_t_6);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_loner_type, __pyx_v_path};
          __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 768, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_GOTREF(__pyx_t_6);
        } else
        #endif
        {
          __pyx_t_13 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 768, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_13);
          if (__pyx_t_8) {
            __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_8); __pyx_t_8 = NULL;
          }
          __Pyx_INCREF(__pyx_v_loner_type);
          __Pyx_GIVEREF(__pyx_v_loner_type);
          PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_7, __pyx_v_loner_type);
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_7, __pyx_v_path);
          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_13, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 768, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF_SET(__pyx_v_matchmaker_result, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "parabam/chaser.pyx":766
 *         for loner_type,paths in loner_paths.items():
 *             for path in paths:
 *                 if loner_type == "NP":             # <<<<<<<<<<<<<<
 *                     matchmaker_result = \
 *                         self.__handle_unpaired_reads__(loner_type, path)
 */
        goto __pyx_L11;
      }

      /* "parabam/chaser.pyx":771
 *                 else:
 *                     matchmaker_result = \
 *                         self.__start_matchmaker_task__([path],loner_type,-1)             # <<<<<<<<<<<<<<
 * 
 *                 match_maker_results.append(matchmaker_result)
 */
      /*else*/ {
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_start_matchmaker_task); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 771, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 771, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_INCREF(__pyx_v_path);
        __Pyx_GIVEREF(__pyx_v_path);
        PyList_SET_ITEM(__pyx_t_13, 0, __pyx_v_path);
        __pyx_t_8 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_7 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_t_13, __pyx_v_loner_type, __pyx_int_neg_1};
          __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 771, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_t_13, __pyx_v_loner_type, __pyx_int_neg_1};
          __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 771, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        } else
        #endif
        {
          __pyx_t_14 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 771, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          if (__pyx_t_8) {
            __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_8); __pyx_t_8 = NULL;
          }
          __Pyx_GIVEREF(__pyx_t_13);
          PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_7, __pyx_t_13);
          __Pyx_INCREF(__pyx_v_loner_type);
          __Pyx_GIVEREF(__pyx_v_loner_type);
          PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_7, __pyx_v_loner_type);
          __Pyx_INCREF(__pyx_int_neg_1);
          __Pyx_GIVEREF(__pyx_int_neg_1);
          PyTuple_SET_ITEM(__pyx_t_14, 2+__pyx_t_7, __pyx_int_neg_1);
          __pyx_t_13 = 0;
          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_14, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 771, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF_SET(__pyx_v_matchmaker_result, __pyx_t_6);
        __pyx_t_6 = 0;
      }
      __pyx_L11:;

      /* "parabam/chaser.pyx":773
 *                         self.__start_matchmaker_task__([path],loner_type,-1)
 * 
 *                 match_maker_results.append(matchmaker_result)             # <<<<<<<<<<<<<<
 * 
 *         del loner_paths,loner_file_counts,loner_holder
 */
      __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_match_maker_results, __pyx_v_matchmaker_result); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 773, __pyx_L1_error)

      /* "parabam/chaser.pyx":765
 *         match_maker_results = []
 *         for loner_type,paths in loner_paths.items():
 *             for path in paths:             # <<<<<<<<<<<<<<
 *                 if loner_type == "NP":
 *                     matchmaker_result = \
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":764
 * 
 *         match_maker_results = []
 *         for loner_type,paths in loner_paths.items():             # <<<<<<<<<<<<<<
 *             for path in paths:
 *                 if loner_type == "NP":
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "parabam/chaser.pyx":775
 *                 match_maker_results.append(matchmaker_result)
 * 
 *         del loner_paths,loner_file_counts,loner_holder             # <<<<<<<<<<<<<<
 *         return PrimaryResults(match_maker_results,"primary")
 * 
 */
  __Pyx_DECREF(__pyx_v_loner_paths);
  __pyx_v_loner_paths = NULL;
  __Pyx_DECREF(__pyx_v_loner_file_counts);
  __pyx_v_loner_file_counts = NULL;
  __Pyx_DECREF(__pyx_v_loner_holder);
  __pyx_v_loner_holder = NULL;

  /* "parabam/chaser.pyx":776
 * 
 *         del loner_paths,loner_file_counts,loner_holder
 *         return PrimaryResults(match_maker_results,"primary")             # <<<<<<<<<<<<<<
 * 
 *     def __handle_unpaired_reads__(self, loner_type, path):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PrimaryResults); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_match_maker_results, __pyx_n_s_primary};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 776, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_match_maker_results, __pyx_n_s_primary};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 776, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  {
    __pyx_t_3 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 776, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_INCREF(__pyx_v_match_maker_results);
    __Pyx_GIVEREF(__pyx_v_match_maker_results);
    PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_7, __pyx_v_match_maker_results);
    __Pyx_INCREF(__pyx_n_s_primary);
    __Pyx_GIVEREF(__pyx_n_s_primary);
    PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_7, __pyx_n_s_primary);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 776, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "parabam/chaser.pyx":743
 *                                                child_pack,pid)
 * 
 *     def run(self,unsorted_paths):             # <<<<<<<<<<<<<<
 *         #speedup
 *         write_loner = self.__write_loner__
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("parabam.chaser.PrimaryHandler.run", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_write_loner);
  __Pyx_XDECREF(__pyx_v_loner_holder);
  __Pyx_XDECREF(__pyx_v_loner_file_counts);
  __Pyx_XDECREF(__pyx_v_loner_total);
  __Pyx_XDECREF(__pyx_v_chrom_bins);
  __Pyx_XDECREF(__pyx_v_read);
  __Pyx_XDECREF(__pyx_v_loner_type);
  __Pyx_XDECREF(__pyx_v_loner_paths);
  __Pyx_XDECREF(__pyx_v_match_maker_results);
  __Pyx_XDECREF(__pyx_v_paths);
  __Pyx_XDECREF(__pyx_v_path);
  __Pyx_XDECREF(__pyx_v_matchmaker_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":778
 *         return PrimaryResults(match_maker_results,"primary")
 * 
 *     def __handle_unpaired_reads__(self, loner_type, path):             # <<<<<<<<<<<<<<
 *         read_count = 0
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_14PrimaryHandler_5__handle_unpaired_reads__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_14PrimaryHandler_5__handle_unpaired_reads__ = {"__handle_unpaired_reads__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_14PrimaryHandler_5__handle_unpaired_reads__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_14PrimaryHandler_5__handle_unpaired_reads__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_loner_type = 0;
  PyObject *__pyx_v_path = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__handle_unpaired_reads__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_loner_type,&__pyx_n_s_path,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loner_type)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__handle_unpaired_reads__", 1, 3, 3, 1); __PYX_ERR(0, 778, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_path)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__handle_unpaired_reads__", 1, 3, 3, 2); __PYX_ERR(0, 778, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__handle_unpaired_reads__") < 0)) __PYX_ERR(0, 778, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_loner_type = values[1];
    __pyx_v_path = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__handle_unpaired_reads__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 778, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.PrimaryHandler.__handle_unpaired_reads__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_14PrimaryHandler_4__handle_unpaired_reads__(__pyx_self, __pyx_v_self, __pyx_v_loner_type, __pyx_v_path);

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

static PyObject *__pyx_pf_7parabam_6chaser_14PrimaryHandler_4__handle_unpaired_reads__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_loner_type, PyObject *__pyx_v_path) {
  PyObject *__pyx_v_read_count = NULL;
  PyObject *__pyx_v_bam_file = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_r = NULL;
  PyObject *__pyx_v_loner_pack = 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;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  __Pyx_RefNannySetupContext("__handle_unpaired_reads__", 0);

  /* "parabam/chaser.pyx":779
 * 
 *     def __handle_unpaired_reads__(self, loner_type, path):
 *         read_count = 0             # <<<<<<<<<<<<<<
 * 
 *         bam_file = pysam.AlignmentFile(path, "rb")
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_read_count = __pyx_int_0;

  /* "parabam/chaser.pyx":781
 *         read_count = 0
 * 
 *         bam_file = pysam.AlignmentFile(path, "rb")             # <<<<<<<<<<<<<<
 *         for r in bam_file.fetch(until_eof=True):
 *             read_count += 1
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pysam); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_AlignmentFile); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_path, __pyx_n_s_rb};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 781, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_path, __pyx_n_s_rb};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 781, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_path);
    __Pyx_GIVEREF(__pyx_v_path);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_path);
    __Pyx_INCREF(__pyx_n_s_rb);
    __Pyx_GIVEREF(__pyx_n_s_rb);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_rb);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_bam_file = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":782
 * 
 *         bam_file = pysam.AlignmentFile(path, "rb")
 *         for r in bam_file.fetch(until_eof=True):             # <<<<<<<<<<<<<<
 *             read_count += 1
 *         bam_file.close()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_bam_file, __pyx_n_s_fetch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_until_eof, Py_True) < 0) __PYX_ERR(0, 782, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
    __pyx_t_3 = __pyx_t_5; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 782, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 782, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  for (;;) {
    if (likely(!__pyx_t_7)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 782, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 782, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      } else {
        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 782, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 782, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      }
    } else {
      __pyx_t_5 = __pyx_t_7(__pyx_t_3);
      if (unlikely(!__pyx_t_5)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 782, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF_SET(__pyx_v_r, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "parabam/chaser.pyx":783
 *         bam_file = pysam.AlignmentFile(path, "rb")
 *         for r in bam_file.fetch(until_eof=True):
 *             read_count += 1             # <<<<<<<<<<<<<<
 *         bam_file.close()
 * 
 */
    __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_v_read_count, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF_SET(__pyx_v_read_count, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "parabam/chaser.pyx":782
 * 
 *         bam_file = pysam.AlignmentFile(path, "rb")
 *         for r in bam_file.fetch(until_eof=True):             # <<<<<<<<<<<<<<
 *             read_count += 1
 *         bam_file.close()
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "parabam/chaser.pyx":784
 *         for r in bam_file.fetch(until_eof=True):
 *             read_count += 1
 *         bam_file.close()             # <<<<<<<<<<<<<<
 * 
 *         loner_pack = MatchMakerResults(loner_type=loner_type,
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_bam_file, __pyx_n_s_close); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "parabam/chaser.pyx":786
 *         bam_file.close()
 * 
 *         loner_pack = MatchMakerResults(loner_type=loner_type,             # <<<<<<<<<<<<<<
 *                                        results=[(-1,path,),],
 *                                        level=-1,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MatchMakerResults); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_loner_type, __pyx_v_loner_type) < 0) __PYX_ERR(0, 786, __pyx_L1_error)

  /* "parabam/chaser.pyx":787
 * 
 *         loner_pack = MatchMakerResults(loner_type=loner_type,
 *                                        results=[(-1,path,),],             # <<<<<<<<<<<<<<
 *                                        level=-1,
 *                                        chaser_type="match_maker",
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_int_neg_1);
  __Pyx_INCREF(__pyx_v_path);
  __Pyx_GIVEREF(__pyx_v_path);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_path);
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_results, __pyx_t_2) < 0) __PYX_ERR(0, 786, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_level, __pyx_int_neg_1) < 0) __PYX_ERR(0, 786, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_chaser_type, __pyx_n_s_match_maker) < 0) __PYX_ERR(0, 786, __pyx_L1_error)

  /* "parabam/chaser.pyx":790
 *                                        level=-1,
 *                                        chaser_type="match_maker",
 *                                        rescued=read_count)             # <<<<<<<<<<<<<<
 *         return loner_pack
 * 
 */
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_rescued, __pyx_v_read_count) < 0) __PYX_ERR(0, 786, __pyx_L1_error)

  /* "parabam/chaser.pyx":786
 *         bam_file.close()
 * 
 *         loner_pack = MatchMakerResults(loner_type=loner_type,             # <<<<<<<<<<<<<<
 *                                        results=[(-1,path,),],
 *                                        level=-1,
 */
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_loner_pack = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "parabam/chaser.pyx":791
 *                                        chaser_type="match_maker",
 *                                        rescued=read_count)
 *         return loner_pack             # <<<<<<<<<<<<<<
 * 
 *     def __start_matchmaker_task__(self,paths,loner_type,level):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_loner_pack);
  __pyx_r = __pyx_v_loner_pack;
  goto __pyx_L0;

  /* "parabam/chaser.pyx":778
 *         return PrimaryResults(match_maker_results,"primary")
 * 
 *     def __handle_unpaired_reads__(self, loner_type, path):             # <<<<<<<<<<<<<<
 *         read_count = 0
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("parabam.chaser.PrimaryHandler.__handle_unpaired_reads__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_read_count);
  __Pyx_XDECREF(__pyx_v_bam_file);
  __Pyx_XDECREF(__pyx_v_r);
  __Pyx_XDECREF(__pyx_v_loner_pack);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":793
 *         return loner_pack
 * 
 *     def __start_matchmaker_task__(self,paths,loner_type,level):             # <<<<<<<<<<<<<<
 *         return self.match_handler.run(paths,loner_type,
 *                                       level,fragment_leftovers=False)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_14PrimaryHandler_7__start_matchmaker_task__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_14PrimaryHandler_7__start_matchmaker_task__ = {"__start_matchmaker_task__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_14PrimaryHandler_7__start_matchmaker_task__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_14PrimaryHandler_7__start_matchmaker_task__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_paths = 0;
  PyObject *__pyx_v_loner_type = 0;
  PyObject *__pyx_v_level = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__start_matchmaker_task__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_paths,&__pyx_n_s_loner_type,&__pyx_n_s_level,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_paths)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__start_matchmaker_task__", 1, 4, 4, 1); __PYX_ERR(0, 793, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loner_type)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__start_matchmaker_task__", 1, 4, 4, 2); __PYX_ERR(0, 793, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_level)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__start_matchmaker_task__", 1, 4, 4, 3); __PYX_ERR(0, 793, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__start_matchmaker_task__") < 0)) __PYX_ERR(0, 793, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_self = values[0];
    __pyx_v_paths = values[1];
    __pyx_v_loner_type = values[2];
    __pyx_v_level = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__start_matchmaker_task__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 793, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.PrimaryHandler.__start_matchmaker_task__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_14PrimaryHandler_6__start_matchmaker_task__(__pyx_self, __pyx_v_self, __pyx_v_paths, __pyx_v_loner_type, __pyx_v_level);

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

static PyObject *__pyx_pf_7parabam_6chaser_14PrimaryHandler_6__start_matchmaker_task__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_paths, PyObject *__pyx_v_loner_type, PyObject *__pyx_v_level) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("__start_matchmaker_task__", 0);

  /* "parabam/chaser.pyx":794
 * 
 *     def __start_matchmaker_task__(self,paths,loner_type,level):
 *         return self.match_handler.run(paths,loner_type,             # <<<<<<<<<<<<<<
 *                                       level,fragment_leftovers=False)
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_match_handler); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_run); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":795
 *     def __start_matchmaker_task__(self,paths,loner_type,level):
 *         return self.match_handler.run(paths,loner_type,
 *                                       level,fragment_leftovers=False)             # <<<<<<<<<<<<<<
 * 
 *     def __read_generator__(self,unsorted_paths):
 */
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_paths);
  __Pyx_GIVEREF(__pyx_v_paths);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_paths);
  __Pyx_INCREF(__pyx_v_loner_type);
  __Pyx_GIVEREF(__pyx_v_loner_type);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_loner_type);
  __Pyx_INCREF(__pyx_v_level);
  __Pyx_GIVEREF(__pyx_v_level);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_level);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_fragment_leftovers, Py_False) < 0) __PYX_ERR(0, 795, __pyx_L1_error)

  /* "parabam/chaser.pyx":794
 * 
 *     def __start_matchmaker_task__(self,paths,loner_type,level):
 *         return self.match_handler.run(paths,loner_type,             # <<<<<<<<<<<<<<
 *                                       level,fragment_leftovers=False)
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "parabam/chaser.pyx":793
 *         return loner_pack
 * 
 *     def __start_matchmaker_task__(self,paths,loner_type,level):             # <<<<<<<<<<<<<<
 *         return self.match_handler.run(paths,loner_type,
 *                                       level,fragment_leftovers=False)
 */

  /* 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("parabam.chaser.PrimaryHandler.__start_matchmaker_task__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_7parabam_6chaser_14PrimaryHandler_10generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "parabam/chaser.pyx":797
 *                                       level,fragment_leftovers=False)
 * 
 *     def __read_generator__(self,unsorted_paths):             # <<<<<<<<<<<<<<
 *         for path in unsorted_paths:
 *             loner_object = pysam.AlignmentFile(path,"rb")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_14PrimaryHandler_9__read_generator__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_14PrimaryHandler_9__read_generator__ = {"__read_generator__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_14PrimaryHandler_9__read_generator__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_14PrimaryHandler_9__read_generator__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_unsorted_paths = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__read_generator__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_unsorted_paths,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_unsorted_paths)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__read_generator__", 1, 2, 2, 1); __PYX_ERR(0, 797, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__read_generator__") < 0)) __PYX_ERR(0, 797, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_unsorted_paths = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__read_generator__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 797, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.PrimaryHandler.__read_generator__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_14PrimaryHandler_8__read_generator__(__pyx_self, __pyx_v_self, __pyx_v_unsorted_paths);

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

static PyObject *__pyx_pf_7parabam_6chaser_14PrimaryHandler_8__read_generator__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_unsorted_paths) {
  struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_1___read_generator__ *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__read_generator__", 0);
  __pyx_cur_scope = (struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_1___read_generator__ *)__pyx_tp_new_7parabam_6chaser___pyx_scope_struct_1___read_generator__(__pyx_ptype_7parabam_6chaser___pyx_scope_struct_1___read_generator__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_1___read_generator__ *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 797, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self);
  __pyx_cur_scope->__pyx_v_unsorted_paths = __pyx_v_unsorted_paths;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_unsorted_paths);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_unsorted_paths);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7parabam_6chaser_14PrimaryHandler_10generator, __pyx_codeobj__14, (PyObject *) __pyx_cur_scope, __pyx_n_s_read_generator, __pyx_n_s_PrimaryHandler___read_generator, __pyx_n_s_parabam_chaser); if (unlikely(!gen)) __PYX_ERR(0, 797, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("parabam.chaser.PrimaryHandler.__read_generator__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_7parabam_6chaser_14PrimaryHandler_10generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_1___read_generator__ *__pyx_cur_scope = ((struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_1___read_generator__ *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__read_generator__", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L8_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 797, __pyx_L1_error)

  /* "parabam/chaser.pyx":798
 * 
 *     def __read_generator__(self,unsorted_paths):
 *         for path in unsorted_paths:             # <<<<<<<<<<<<<<
 *             loner_object = pysam.AlignmentFile(path,"rb")
 *             for read in loner_object.fetch(until_eof=True):
 */
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_unsorted_paths)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_unsorted_paths)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_unsorted_paths; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_unsorted_paths); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 798, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 798, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 798, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 798, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 798, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 798, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_path);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_path, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;

    /* "parabam/chaser.pyx":799
 *     def __read_generator__(self,unsorted_paths):
 *         for path in unsorted_paths:
 *             loner_object = pysam.AlignmentFile(path,"rb")             # <<<<<<<<<<<<<<
 *             for read in loner_object.fetch(until_eof=True):
 *                 yield read
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pysam); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 799, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_AlignmentFile); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 799, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_path, __pyx_n_s_rb};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 799, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_path, __pyx_n_s_rb};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 799, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 799, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_path);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_path);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_cur_scope->__pyx_v_path);
      __Pyx_INCREF(__pyx_n_s_rb);
      __Pyx_GIVEREF(__pyx_n_s_rb);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_n_s_rb);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 799, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_loner_object);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_loner_object, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;

    /* "parabam/chaser.pyx":800
 *         for path in unsorted_paths:
 *             loner_object = pysam.AlignmentFile(path,"rb")
 *             for read in loner_object.fetch(until_eof=True):             # <<<<<<<<<<<<<<
 *                 yield read
 *             loner_object.close()
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_loner_object, __pyx_n_s_fetch); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 800, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 800, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_until_eof, Py_True) < 0) __PYX_ERR(0, 800, __pyx_L1_error)
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 800, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
      __pyx_t_6 = __pyx_t_8; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0;
      __pyx_t_10 = NULL;
    } else {
      __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 800, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 800, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    for (;;) {
      if (likely(!__pyx_t_10)) {
        if (likely(PyList_CheckExact(__pyx_t_6))) {
          if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_6)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_8 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 800, __pyx_L1_error)
          #else
          __pyx_t_8 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 800, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          #endif
        } else {
          if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 800, __pyx_L1_error)
          #else
          __pyx_t_8 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 800, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          #endif
        }
      } else {
        __pyx_t_8 = __pyx_t_10(__pyx_t_6);
        if (unlikely(!__pyx_t_8)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 800, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_8);
      }
      __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_read);
      __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_read, __pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_8);
      __pyx_t_8 = 0;

      /* "parabam/chaser.pyx":801
 *             loner_object = pysam.AlignmentFile(path,"rb")
 *             for read in loner_object.fetch(until_eof=True):
 *                 yield read             # <<<<<<<<<<<<<<
 *             loner_object.close()
 *             os.remove(path)
 */
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_read);
      __pyx_r = __pyx_cur_scope->__pyx_v_read;
      __Pyx_XGIVEREF(__pyx_t_1);
      __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
      __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
      __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
      __Pyx_XGIVEREF(__pyx_t_6);
      __pyx_cur_scope->__pyx_t_3 = __pyx_t_6;
      __pyx_cur_scope->__pyx_t_4 = __pyx_t_9;
      __pyx_cur_scope->__pyx_t_5 = __pyx_t_10;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
      /* return from generator, yielding value */
      __pyx_generator->resume_label = 1;
      return __pyx_r;
      __pyx_L8_resume_from_yield:;
      __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
      __pyx_cur_scope->__pyx_t_0 = 0;
      __Pyx_XGOTREF(__pyx_t_1);
      __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
      __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
      __pyx_t_6 = __pyx_cur_scope->__pyx_t_3;
      __pyx_cur_scope->__pyx_t_3 = 0;
      __Pyx_XGOTREF(__pyx_t_6);
      __pyx_t_9 = __pyx_cur_scope->__pyx_t_4;
      __pyx_t_10 = __pyx_cur_scope->__pyx_t_5;
      if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 801, __pyx_L1_error)

      /* "parabam/chaser.pyx":800
 *         for path in unsorted_paths:
 *             loner_object = pysam.AlignmentFile(path,"rb")
 *             for read in loner_object.fetch(until_eof=True):             # <<<<<<<<<<<<<<
 *                 yield read
 *             loner_object.close()
 */
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "parabam/chaser.pyx":802
 *             for read in loner_object.fetch(until_eof=True):
 *                 yield read
 *             loner_object.close()             # <<<<<<<<<<<<<<
 *             os.remove(path)
 *         gc.collect()
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_loner_object, __pyx_n_s_close); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 802, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 802, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "parabam/chaser.pyx":803
 *                 yield read
 *             loner_object.close()
 *             os.remove(path)             # <<<<<<<<<<<<<<
 *         gc.collect()
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_os); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 803, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_remove); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 803, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_cur_scope->__pyx_v_path) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_cur_scope->__pyx_v_path);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 803, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "parabam/chaser.pyx":798
 * 
 *     def __read_generator__(self,unsorted_paths):
 *         for path in unsorted_paths:             # <<<<<<<<<<<<<<
 *             loner_object = pysam.AlignmentFile(path,"rb")
 *             for read in loner_object.fetch(until_eof=True):
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":804
 *             loner_object.close()
 *             os.remove(path)
 *         gc.collect()             # <<<<<<<<<<<<<<
 * 
 *     def __get_reference_id_name__(self,read,bins):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_gc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_collect); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "parabam/chaser.pyx":797
 *                                       level,fragment_leftovers=False)
 * 
 *     def __read_generator__(self,unsorted_paths):             # <<<<<<<<<<<<<<
 *         for path in unsorted_paths:
 *             loner_object = pysam.AlignmentFile(path,"rb")
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("__read_generator__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":806
 *         gc.collect()
 * 
 *     def __get_reference_id_name__(self,read,bins):             # <<<<<<<<<<<<<<
 *         if read.reference_id == read.next_reference_id:
 *             return "XX%dv%d" % (read.reference_id,read.next_reference_id)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_14PrimaryHandler_12__get_reference_id_name__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_14PrimaryHandler_12__get_reference_id_name__ = {"__get_reference_id_name__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_14PrimaryHandler_12__get_reference_id_name__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_14PrimaryHandler_12__get_reference_id_name__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_read = 0;
  PyObject *__pyx_v_bins = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get_reference_id_name__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_read,&__pyx_n_s_bins,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_read)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__get_reference_id_name__", 1, 3, 3, 1); __PYX_ERR(0, 806, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bins)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__get_reference_id_name__", 1, 3, 3, 2); __PYX_ERR(0, 806, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__get_reference_id_name__") < 0)) __PYX_ERR(0, 806, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_read = values[1];
    __pyx_v_bins = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__get_reference_id_name__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 806, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.PrimaryHandler.__get_reference_id_name__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_14PrimaryHandler_11__get_reference_id_name__(__pyx_self, __pyx_v_self, __pyx_v_read, __pyx_v_bins);

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

/* "parabam/chaser.pyx":810
 *             return "XX%dv%d" % (read.reference_id,read.next_reference_id)
 *         else:
 *             class_bins = map(lambda x : bins[x],sorted((read.reference_id,             # <<<<<<<<<<<<<<
 *                                                     read.next_reference_id,)))
 *             #reads on different chromosome
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_14PrimaryHandler_25__get_reference_id_name___lambda3(PyObject *__pyx_self, PyObject *__pyx_v_x); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_14PrimaryHandler_25__get_reference_id_name___lambda3 = {"lambda3", (PyCFunction)__pyx_pw_7parabam_6chaser_14PrimaryHandler_25__get_reference_id_name___lambda3, METH_O, 0};
static PyObject *__pyx_pw_7parabam_6chaser_14PrimaryHandler_25__get_reference_id_name___lambda3(PyObject *__pyx_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda3 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda3(__pyx_self, ((PyObject *)__pyx_v_x));

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

static PyObject *__pyx_lambda_funcdef_lambda3(PyObject *__pyx_self, PyObject *__pyx_v_x) {
  struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__ *__pyx_cur_scope;
  struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__ *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("lambda3", 0);
  __pyx_outer_scope = (struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__ *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_bins)) { __Pyx_RaiseClosureNameError("bins"); __PYX_ERR(0, 810, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_cur_scope->__pyx_v_bins, __pyx_v_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("parabam.chaser.PrimaryHandler.__get_reference_id_name__.lambda3", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":806
 *         gc.collect()
 * 
 *     def __get_reference_id_name__(self,read,bins):             # <<<<<<<<<<<<<<
 *         if read.reference_id == read.next_reference_id:
 *             return "XX%dv%d" % (read.reference_id,read.next_reference_id)
 */

static PyObject *__pyx_pf_7parabam_6chaser_14PrimaryHandler_11__get_reference_id_name__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_read, PyObject *__pyx_v_bins) {
  struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__ *__pyx_cur_scope;
  PyObject *__pyx_v_class_bins = 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;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("__get_reference_id_name__", 0);
  __pyx_cur_scope = (struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__ *)__pyx_tp_new_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__(__pyx_ptype_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__ *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 806, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_bins = __pyx_v_bins;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_bins);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_bins);

  /* "parabam/chaser.pyx":807
 * 
 *     def __get_reference_id_name__(self,read,bins):
 *         if read.reference_id == read.next_reference_id:             # <<<<<<<<<<<<<<
 *             return "XX%dv%d" % (read.reference_id,read.next_reference_id)
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_reference_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_next_reference_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 807, __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, 807, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "parabam/chaser.pyx":808
 *     def __get_reference_id_name__(self,read,bins):
 *         if read.reference_id == read.next_reference_id:
 *             return "XX%dv%d" % (read.reference_id,read.next_reference_id)             # <<<<<<<<<<<<<<
 *         else:
 *             class_bins = map(lambda x : bins[x],sorted((read.reference_id,
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_reference_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 808, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_next_reference_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 808, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 808, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_3 = 0;
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_XX_dv_d, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 808, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "parabam/chaser.pyx":807
 * 
 *     def __get_reference_id_name__(self,read,bins):
 *         if read.reference_id == read.next_reference_id:             # <<<<<<<<<<<<<<
 *             return "XX%dv%d" % (read.reference_id,read.next_reference_id)
 *         else:
 */
  }

  /* "parabam/chaser.pyx":810
 *             return "XX%dv%d" % (read.reference_id,read.next_reference_id)
 *         else:
 *             class_bins = map(lambda x : bins[x],sorted((read.reference_id,             # <<<<<<<<<<<<<<
 *                                                     read.next_reference_id,)))
 *             #reads on different chromosome
 */
  /*else*/ {
    __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_14PrimaryHandler_25__get_reference_id_name___lambda3, 0, __pyx_n_s_PrimaryHandler___get_reference_i, ((PyObject*)__pyx_cur_scope), __pyx_n_s_parabam_chaser, __pyx_d, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 810, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_reference_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 810, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);

    /* "parabam/chaser.pyx":811
 *         else:
 *             class_bins = map(lambda x : bins[x],sorted((read.reference_id,
 *                                                     read.next_reference_id,)))             # <<<<<<<<<<<<<<
 *             #reads on different chromosome
 *             return "MM%sv%s" % tuple(class_bins)
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_next_reference_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);

    /* "parabam/chaser.pyx":810
 *             return "XX%dv%d" % (read.reference_id,read.next_reference_id)
 *         else:
 *             class_bins = map(lambda x : bins[x],sorted((read.reference_id,             # <<<<<<<<<<<<<<
 *                                                     read.next_reference_id,)))
 *             #reads on different chromosome
 */
    __pyx_t_6 = PyList_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 810, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_3);
    PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_5);
    PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
    __pyx_t_3 = 0;
    __pyx_t_5 = 0;
    __pyx_t_1 = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_7 = PyList_Sort(__pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 810, __pyx_L1_error)
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 810, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __pyx_t_2 = 0;
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 810, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_class_bins = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":813
 *                                                     read.next_reference_id,)))
 *             #reads on different chromosome
 *             return "MM%sv%s" % tuple(class_bins)             # <<<<<<<<<<<<<<
 * 
 *     def __get_loner_type__(self,read,bins):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_v_class_bins); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 813, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_MM_sv_s, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 813, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;
  }

  /* "parabam/chaser.pyx":806
 *         gc.collect()
 * 
 *     def __get_reference_id_name__(self,read,bins):             # <<<<<<<<<<<<<<
 *         if read.reference_id == read.next_reference_id:
 *             return "XX%dv%d" % (read.reference_id,read.next_reference_id)
 */

  /* 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("parabam.chaser.PrimaryHandler.__get_reference_id_name__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_class_bins);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":815
 *             return "MM%sv%s" % tuple(class_bins)
 * 
 *     def __get_loner_type__(self,read,bins):             # <<<<<<<<<<<<<<
 *         if not read.is_paired:
 *             #read is not paired!
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_14PrimaryHandler_14__get_loner_type__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_14PrimaryHandler_14__get_loner_type__ = {"__get_loner_type__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_14PrimaryHandler_14__get_loner_type__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_14PrimaryHandler_14__get_loner_type__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_read = 0;
  PyObject *__pyx_v_bins = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get_loner_type__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_read,&__pyx_n_s_bins,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_read)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__get_loner_type__", 1, 3, 3, 1); __PYX_ERR(0, 815, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bins)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__get_loner_type__", 1, 3, 3, 2); __PYX_ERR(0, 815, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__get_loner_type__") < 0)) __PYX_ERR(0, 815, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_read = values[1];
    __pyx_v_bins = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__get_loner_type__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 815, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.PrimaryHandler.__get_loner_type__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_14PrimaryHandler_13__get_loner_type__(__pyx_self, __pyx_v_self, __pyx_v_read, __pyx_v_bins);

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

static PyObject *__pyx_pf_7parabam_6chaser_14PrimaryHandler_13__get_loner_type__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_read, PyObject *__pyx_v_bins) {
  PyObject *__pyx_v_loner_type = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("__get_loner_type__", 0);

  /* "parabam/chaser.pyx":816
 * 
 *     def __get_loner_type__(self,read,bins):
 *         if not read.is_paired:             # <<<<<<<<<<<<<<
 *             #read is not paired!
 *             loner_type = "NP"
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_paired); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 816, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((!__pyx_t_2) != 0);
  if (__pyx_t_3) {

    /* "parabam/chaser.pyx":818
 *         if not read.is_paired:
 *             #read is not paired!
 *             loner_type = "NP"             # <<<<<<<<<<<<<<
 *         elif not read.is_unmapped and not read.mate_is_unmapped:
 *             loner_type = self.__get_reference_id_name__(read,bins)
 */
    __Pyx_INCREF(__pyx_n_s_NP);
    __pyx_v_loner_type = __pyx_n_s_NP;

    /* "parabam/chaser.pyx":816
 * 
 *     def __get_loner_type__(self,read,bins):
 *         if not read.is_paired:             # <<<<<<<<<<<<<<
 *             #read is not paired!
 *             loner_type = "NP"
 */
    goto __pyx_L3;
  }

  /* "parabam/chaser.pyx":819
 *             #read is not paired!
 *             loner_type = "NP"
 *         elif not read.is_unmapped and not read.mate_is_unmapped:             # <<<<<<<<<<<<<<
 *             loner_type = self.__get_reference_id_name__(read,bins)
 *         elif read.is_unmapped and read.mate_is_unmapped:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_unmapped); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 819, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = ((!__pyx_t_2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_3 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mate_is_unmapped); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 819, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = ((!__pyx_t_4) != 0);
  __pyx_t_3 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "parabam/chaser.pyx":820
 *             loner_type = "NP"
 *         elif not read.is_unmapped and not read.mate_is_unmapped:
 *             loner_type = self.__get_reference_id_name__(read,bins)             # <<<<<<<<<<<<<<
 *         elif read.is_unmapped and read.mate_is_unmapped:
 *             #both unmapped
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_reference_id_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 820, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_read, __pyx_v_bins};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 820, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_read, __pyx_v_bins};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 820, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 820, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_INCREF(__pyx_v_read);
      __Pyx_GIVEREF(__pyx_v_read);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_read);
      __Pyx_INCREF(__pyx_v_bins);
      __Pyx_GIVEREF(__pyx_v_bins);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_bins);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 820, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_loner_type = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":819
 *             #read is not paired!
 *             loner_type = "NP"
 *         elif not read.is_unmapped and not read.mate_is_unmapped:             # <<<<<<<<<<<<<<
 *             loner_type = self.__get_reference_id_name__(read,bins)
 *         elif read.is_unmapped and read.mate_is_unmapped:
 */
    goto __pyx_L3;
  }

  /* "parabam/chaser.pyx":821
 *         elif not read.is_unmapped and not read.mate_is_unmapped:
 *             loner_type = self.__get_reference_id_name__(read,bins)
 *         elif read.is_unmapped and read.mate_is_unmapped:             # <<<<<<<<<<<<<<
 *             #both unmapped
 *             loner_type = "UU"
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_unmapped); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 821, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mate_is_unmapped); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 821, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_3) {

    /* "parabam/chaser.pyx":823
 *         elif read.is_unmapped and read.mate_is_unmapped:
 *             #both unmapped
 *             loner_type = "UU"             # <<<<<<<<<<<<<<
 *         else:
 *             #one unmapped read, one mapped read
 */
    __Pyx_INCREF(__pyx_n_s_UU);
    __pyx_v_loner_type = __pyx_n_s_UU;

    /* "parabam/chaser.pyx":821
 *         elif not read.is_unmapped and not read.mate_is_unmapped:
 *             loner_type = self.__get_reference_id_name__(read,bins)
 *         elif read.is_unmapped and read.mate_is_unmapped:             # <<<<<<<<<<<<<<
 *             #both unmapped
 *             loner_type = "UU"
 */
    goto __pyx_L3;
  }

  /* "parabam/chaser.pyx":826
 *         else:
 *             #one unmapped read, one mapped read
 *             loner_type = "UM"             # <<<<<<<<<<<<<<
 * 
 *         return loner_type
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_n_s_UM);
    __pyx_v_loner_type = __pyx_n_s_UM;
  }
  __pyx_L3:;

  /* "parabam/chaser.pyx":828
 *             loner_type = "UM"
 * 
 *         return loner_type             # <<<<<<<<<<<<<<
 * 
 *     def __get_loner_holder__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_loner_type);
  __pyx_r = __pyx_v_loner_type;
  goto __pyx_L0;

  /* "parabam/chaser.pyx":815
 *             return "MM%sv%s" % tuple(class_bins)
 * 
 *     def __get_loner_type__(self,read,bins):             # <<<<<<<<<<<<<<
 *         if not read.is_paired:
 *             #read is not paired!
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("parabam.chaser.PrimaryHandler.__get_loner_type__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_loner_type);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":830
 *         return loner_type
 * 
 *     def __get_loner_holder__(self):             # <<<<<<<<<<<<<<
 *         holder = {}
 *         return holder
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_14PrimaryHandler_16__get_loner_holder__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_14PrimaryHandler_16__get_loner_holder__ = {"__get_loner_holder__", (PyCFunction)__pyx_pw_7parabam_6chaser_14PrimaryHandler_16__get_loner_holder__, METH_O, 0};
static PyObject *__pyx_pw_7parabam_6chaser_14PrimaryHandler_16__get_loner_holder__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get_loner_holder__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7parabam_6chaser_14PrimaryHandler_15__get_loner_holder__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_7parabam_6chaser_14PrimaryHandler_15__get_loner_holder__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_v_holder = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get_loner_holder__", 0);

  /* "parabam/chaser.pyx":831
 * 
 *     def __get_loner_holder__(self):
 *         holder = {}             # <<<<<<<<<<<<<<
 *         return holder
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_holder = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":832
 *     def __get_loner_holder__(self):
 *         holder = {}
 *         return holder             # <<<<<<<<<<<<<<
 * 
 *     def __get_loner_object__(self,loner_type,unique):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_holder);
  __pyx_r = __pyx_v_holder;
  goto __pyx_L0;

  /* "parabam/chaser.pyx":830
 *         return loner_type
 * 
 *     def __get_loner_holder__(self):             # <<<<<<<<<<<<<<
 *         holder = {}
 *         return holder
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("parabam.chaser.PrimaryHandler.__get_loner_holder__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_holder);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":834
 *         return holder
 * 
 *     def __get_loner_object__(self,loner_type,unique):             # <<<<<<<<<<<<<<
 *         path = self.__get_loner_temp_path__(loner_type,0,unique=\
 *                                                         "-%d" % (unique,) )
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_14PrimaryHandler_18__get_loner_object__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_14PrimaryHandler_18__get_loner_object__ = {"__get_loner_object__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_14PrimaryHandler_18__get_loner_object__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_14PrimaryHandler_18__get_loner_object__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_loner_type = 0;
  PyObject *__pyx_v_unique = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get_loner_object__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_loner_type,&__pyx_n_s_unique,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loner_type)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__get_loner_object__", 1, 3, 3, 1); __PYX_ERR(0, 834, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_unique)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__get_loner_object__", 1, 3, 3, 2); __PYX_ERR(0, 834, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__get_loner_object__") < 0)) __PYX_ERR(0, 834, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_loner_type = values[1];
    __pyx_v_unique = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__get_loner_object__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 834, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.PrimaryHandler.__get_loner_object__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_14PrimaryHandler_17__get_loner_object__(__pyx_self, __pyx_v_self, __pyx_v_loner_type, __pyx_v_unique);

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

static PyObject *__pyx_pf_7parabam_6chaser_14PrimaryHandler_17__get_loner_object__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_loner_type, PyObject *__pyx_v_unique) {
  PyObject *__pyx_v_path = 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;
  __Pyx_RefNannySetupContext("__get_loner_object__", 0);

  /* "parabam/chaser.pyx":835
 * 
 *     def __get_loner_object__(self,loner_type,unique):
 *         path = self.__get_loner_temp_path__(loner_type,0,unique=\             # <<<<<<<<<<<<<<
 *                                                         "-%d" % (unique,) )
 *         return pysam.AlignmentFile(path,"wb",header=self._header)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_loner_temp_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_loner_type);
  __Pyx_GIVEREF(__pyx_v_loner_type);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_loner_type);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_0);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "parabam/chaser.pyx":836
 *     def __get_loner_object__(self,loner_type,unique):
 *         path = self.__get_loner_temp_path__(loner_type,0,unique=\
 *                                                         "-%d" % (unique,) )             # <<<<<<<<<<<<<<
 *         return pysam.AlignmentFile(path,"wb",header=self._header)
 * 
 */
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_unique);
  __Pyx_GIVEREF(__pyx_v_unique);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_unique);
  __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_d, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_unique, __pyx_t_5) < 0) __PYX_ERR(0, 835, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "parabam/chaser.pyx":835
 * 
 *     def __get_loner_object__(self,loner_type,unique):
 *         path = self.__get_loner_temp_path__(loner_type,0,unique=\             # <<<<<<<<<<<<<<
 *                                                         "-%d" % (unique,) )
 *         return pysam.AlignmentFile(path,"wb",header=self._header)
 */
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_path = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "parabam/chaser.pyx":837
 *         path = self.__get_loner_temp_path__(loner_type,0,unique=\
 *                                                         "-%d" % (unique,) )
 *         return pysam.AlignmentFile(path,"wb",header=self._header)             # <<<<<<<<<<<<<<
 * 
 *     def __write_loner__(self,loner_objects,loner_file_counts,loner_type,read):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pysam); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_AlignmentFile); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_path);
  __Pyx_GIVEREF(__pyx_v_path);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_path);
  __Pyx_INCREF(__pyx_n_s_wb);
  __Pyx_GIVEREF(__pyx_n_s_wb);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_n_s_wb);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_header_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_header, __pyx_t_1) < 0) __PYX_ERR(0, 837, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "parabam/chaser.pyx":834
 *         return holder
 * 
 *     def __get_loner_object__(self,loner_type,unique):             # <<<<<<<<<<<<<<
 *         path = self.__get_loner_temp_path__(loner_type,0,unique=\
 *                                                         "-%d" % (unique,) )
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("parabam.chaser.PrimaryHandler.__get_loner_object__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_path);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":839
 *         return pysam.AlignmentFile(path,"wb",header=self._header)
 * 
 *     def __write_loner__(self,loner_objects,loner_file_counts,loner_type,read):             # <<<<<<<<<<<<<<
 *         try:
 *             loner_path = loner_objects[loner_type][-1].filename
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_14PrimaryHandler_20__write_loner__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_14PrimaryHandler_20__write_loner__ = {"__write_loner__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_14PrimaryHandler_20__write_loner__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_14PrimaryHandler_20__write_loner__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_loner_objects = 0;
  PyObject *__pyx_v_loner_file_counts = 0;
  PyObject *__pyx_v_loner_type = 0;
  PyObject *__pyx_v_read = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__write_loner__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_loner_objects,&__pyx_n_s_loner_file_counts,&__pyx_n_s_loner_type,&__pyx_n_s_read,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loner_objects)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__write_loner__", 1, 5, 5, 1); __PYX_ERR(0, 839, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loner_file_counts)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__write_loner__", 1, 5, 5, 2); __PYX_ERR(0, 839, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loner_type)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__write_loner__", 1, 5, 5, 3); __PYX_ERR(0, 839, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_read)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__write_loner__", 1, 5, 5, 4); __PYX_ERR(0, 839, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__write_loner__") < 0)) __PYX_ERR(0, 839, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_self = values[0];
    __pyx_v_loner_objects = values[1];
    __pyx_v_loner_file_counts = values[2];
    __pyx_v_loner_type = values[3];
    __pyx_v_read = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__write_loner__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 839, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.PrimaryHandler.__write_loner__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_14PrimaryHandler_19__write_loner__(__pyx_self, __pyx_v_self, __pyx_v_loner_objects, __pyx_v_loner_file_counts, __pyx_v_loner_type, __pyx_v_read);

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

static PyObject *__pyx_pf_7parabam_6chaser_14PrimaryHandler_19__write_loner__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_loner_objects, PyObject *__pyx_v_loner_file_counts, PyObject *__pyx_v_loner_type, PyObject *__pyx_v_read) {
  PyObject *__pyx_v_loner_path = NULL;
  PyObject *__pyx_v_new_bam_object = 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;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  __Pyx_RefNannySetupContext("__write_loner__", 0);

  /* "parabam/chaser.pyx":840
 * 
 *     def __write_loner__(self,loner_objects,loner_file_counts,loner_type,read):
 *         try:             # <<<<<<<<<<<<<<
 *             loner_path = loner_objects[loner_type][-1].filename
 *             #Ensure fewer reads than max
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "parabam/chaser.pyx":841
 *     def __write_loner__(self,loner_objects,loner_file_counts,loner_type,read):
 *         try:
 *             loner_path = loner_objects[loner_type][-1].filename             # <<<<<<<<<<<<<<
 *             #Ensure fewer reads than max
 *             if loner_file_counts[loner_path] == ((self._max_reads / 2) - 1):
 */
      __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_loner_objects, __pyx_v_loner_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 841, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 841, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 841, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_loner_path = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "parabam/chaser.pyx":843
 *             loner_path = loner_objects[loner_type][-1].filename
 *             #Ensure fewer reads than max
 *             if loner_file_counts[loner_path] == ((self._max_reads / 2) - 1):             # <<<<<<<<<<<<<<
 *                 new_bam_object = self.__get_loner_object__(\
 *                                     loner_type,len(loner_objects[loner_type]))
 */
      __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_loner_file_counts, __pyx_v_loner_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 843, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_max_reads_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 843, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyNumber_Divide(__pyx_t_5, __pyx_int_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 843, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyInt_SubtractObjC(__pyx_t_6, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 843, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 843, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 843, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_7) {

        /* "parabam/chaser.pyx":844
 *             #Ensure fewer reads than max
 *             if loner_file_counts[loner_path] == ((self._max_reads / 2) - 1):
 *                 new_bam_object = self.__get_loner_object__(\             # <<<<<<<<<<<<<<
 *                                     loner_type,len(loner_objects[loner_type]))
 *                 loner_objects[loner_type][-1].close()
 */
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_loner_object); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 844, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_5);

        /* "parabam/chaser.pyx":845
 *             if loner_file_counts[loner_path] == ((self._max_reads / 2) - 1):
 *                 new_bam_object = self.__get_loner_object__(\
 *                                     loner_type,len(loner_objects[loner_type]))             # <<<<<<<<<<<<<<
 *                 loner_objects[loner_type][-1].close()
 * 
 */
        __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_loner_objects, __pyx_v_loner_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 845, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_8 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 845, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 845, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_9 = NULL;
        __pyx_t_10 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_10 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_loner_type, __pyx_t_4};
          __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 844, __pyx_L3_error)
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_loner_type, __pyx_t_4};
          __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 844, __pyx_L3_error)
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else
        #endif
        {
          __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 844, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_11);
          if (__pyx_t_9) {
            __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
          }
          __Pyx_INCREF(__pyx_v_loner_type);
          __Pyx_GIVEREF(__pyx_v_loner_type);
          PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_v_loner_type);
          __Pyx_GIVEREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_4);
          __pyx_t_4 = 0;
          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_11, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 844, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_v_new_bam_object = __pyx_t_6;
        __pyx_t_6 = 0;

        /* "parabam/chaser.pyx":846
 *                 new_bam_object = self.__get_loner_object__(\
 *                                     loner_type,len(loner_objects[loner_type]))
 *                 loner_objects[loner_type][-1].close()             # <<<<<<<<<<<<<<
 * 
 *                 loner_objects[loner_type].append(new_bam_object)
 */
        __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_loner_objects, __pyx_v_loner_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 846, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_5, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 846, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_close); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 846, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_11)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
          }
        }
        __pyx_t_6 = (__pyx_t_11) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_11) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 846, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "parabam/chaser.pyx":848
 *                 loner_objects[loner_type][-1].close()
 * 
 *                 loner_objects[loner_type].append(new_bam_object)             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             new_bam_object = self.__get_loner_object__(loner_type,0)
 */
        __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_loner_objects, __pyx_v_loner_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 848, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_v_new_bam_object); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 848, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "parabam/chaser.pyx":843
 *             loner_path = loner_objects[loner_type][-1].filename
 *             #Ensure fewer reads than max
 *             if loner_file_counts[loner_path] == ((self._max_reads / 2) - 1):             # <<<<<<<<<<<<<<
 *                 new_bam_object = self.__get_loner_object__(\
 *                                     loner_type,len(loner_objects[loner_type]))
 */
      }

      /* "parabam/chaser.pyx":840
 * 
 *     def __write_loner__(self,loner_objects,loner_file_counts,loner_type,read):
 *         try:             # <<<<<<<<<<<<<<
 *             loner_path = loner_objects[loner_type][-1].filename
 *             #Ensure fewer reads than max
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "parabam/chaser.pyx":849
 * 
 *                 loner_objects[loner_type].append(new_bam_object)
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             new_bam_object = self.__get_loner_object__(loner_type,0)
 *             loner_path = new_bam_object.filename
 */
    __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_10) {
      __Pyx_AddTraceback("parabam.chaser.PrimaryHandler.__write_loner__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_11) < 0) __PYX_ERR(0, 849, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_11);

      /* "parabam/chaser.pyx":850
 *                 loner_objects[loner_type].append(new_bam_object)
 *         except KeyError:
 *             new_bam_object = self.__get_loner_object__(loner_type,0)             # <<<<<<<<<<<<<<
 *             loner_path = new_bam_object.filename
 *             loner_objects[loner_type] = [new_bam_object]
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_loner_object); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 850, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_13 = NULL;
      __pyx_t_10 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_13)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_13);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
          __pyx_t_10 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_v_loner_type, __pyx_int_0};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 850, __pyx_L5_except_error)
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_v_loner_type, __pyx_int_0};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 850, __pyx_L5_except_error)
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      {
        __pyx_t_14 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 850, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_14);
        if (__pyx_t_13) {
          __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_13); __pyx_t_13 = NULL;
        }
        __Pyx_INCREF(__pyx_v_loner_type);
        __Pyx_GIVEREF(__pyx_v_loner_type);
        PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_10, __pyx_v_loner_type);
        __Pyx_INCREF(__pyx_int_0);
        __Pyx_GIVEREF(__pyx_int_0);
        PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_10, __pyx_int_0);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_14, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 850, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF_SET(__pyx_v_new_bam_object, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "parabam/chaser.pyx":851
 *         except KeyError:
 *             new_bam_object = self.__get_loner_object__(loner_type,0)
 *             loner_path = new_bam_object.filename             # <<<<<<<<<<<<<<
 *             loner_objects[loner_type] = [new_bam_object]
 * 
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_bam_object, __pyx_n_s_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 851, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_XDECREF_SET(__pyx_v_loner_path, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "parabam/chaser.pyx":852
 *             new_bam_object = self.__get_loner_object__(loner_type,0)
 *             loner_path = new_bam_object.filename
 *             loner_objects[loner_type] = [new_bam_object]             # <<<<<<<<<<<<<<
 * 
 *         loner_file_counts[loner_path] += 1
 */
      __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 852, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_new_bam_object);
      __Pyx_GIVEREF(__pyx_v_new_bam_object);
      PyList_SET_ITEM(__pyx_t_4, 0, __pyx_v_new_bam_object);
      if (unlikely(PyObject_SetItem(__pyx_v_loner_objects, __pyx_v_loner_type, __pyx_t_4) < 0)) __PYX_ERR(0, 852, __pyx_L5_except_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "parabam/chaser.pyx":840
 * 
 *     def __write_loner__(self,loner_objects,loner_file_counts,loner_type,read):
 *         try:             # <<<<<<<<<<<<<<
 *             loner_path = loner_objects[loner_type][-1].filename
 *             #Ensure fewer reads than max
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L8_try_end:;
  }

  /* "parabam/chaser.pyx":854
 *             loner_objects[loner_type] = [new_bam_object]
 * 
 *         loner_file_counts[loner_path] += 1             # <<<<<<<<<<<<<<
 *         loner_objects[loner_type][-1].write(read)
 * 
 */
  __Pyx_INCREF(__pyx_v_loner_path);
  __pyx_t_11 = __pyx_v_loner_path;
  __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_loner_file_counts, __pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_loner_file_counts, __pyx_t_11, __pyx_t_6) < 0)) __PYX_ERR(0, 854, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "parabam/chaser.pyx":855
 * 
 *         loner_file_counts[loner_path] += 1
 *         loner_objects[loner_type][-1].write(read)             # <<<<<<<<<<<<<<
 * 
 *     def __get_paths_and_close__(self,loner_holder):
 */
  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_loner_objects, __pyx_v_loner_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_6, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_write); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_11 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_v_read) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_read);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "parabam/chaser.pyx":839
 *         return pysam.AlignmentFile(path,"wb",header=self._header)
 * 
 *     def __write_loner__(self,loner_objects,loner_file_counts,loner_type,read):             # <<<<<<<<<<<<<<
 *         try:
 *             loner_path = loner_objects[loner_type][-1].filename
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("parabam.chaser.PrimaryHandler.__write_loner__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_loner_path);
  __Pyx_XDECREF(__pyx_v_new_bam_object);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":857
 *         loner_objects[loner_type][-1].write(read)
 * 
 *     def __get_paths_and_close__(self,loner_holder):             # <<<<<<<<<<<<<<
 *         paths = {}
 *         for loner_type,loner_objects in loner_holder.items():
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_14PrimaryHandler_22__get_paths_and_close__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_14PrimaryHandler_22__get_paths_and_close__ = {"__get_paths_and_close__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_14PrimaryHandler_22__get_paths_and_close__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_14PrimaryHandler_22__get_paths_and_close__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_loner_holder = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get_paths_and_close__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_loner_holder,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loner_holder)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__get_paths_and_close__", 1, 2, 2, 1); __PYX_ERR(0, 857, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__get_paths_and_close__") < 0)) __PYX_ERR(0, 857, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_loner_holder = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__get_paths_and_close__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 857, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.PrimaryHandler.__get_paths_and_close__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_14PrimaryHandler_21__get_paths_and_close__(__pyx_self, __pyx_v_self, __pyx_v_loner_holder);

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

static PyObject *__pyx_pf_7parabam_6chaser_14PrimaryHandler_21__get_paths_and_close__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_loner_holder) {
  PyObject *__pyx_v_paths = NULL;
  PyObject *__pyx_v_loner_type = NULL;
  PyObject *__pyx_v_loner_objects = NULL;
  PyObject *__pyx_v_loner_object = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_t_11;
  __Pyx_RefNannySetupContext("__get_paths_and_close__", 0);

  /* "parabam/chaser.pyx":858
 * 
 *     def __get_paths_and_close__(self,loner_holder):
 *         paths = {}             # <<<<<<<<<<<<<<
 *         for loner_type,loner_objects in loner_holder.items():
 *             paths[loner_type] = []
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_paths = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":859
 *     def __get_paths_and_close__(self,loner_holder):
 *         paths = {}
 *         for loner_type,loner_objects in loner_holder.items():             # <<<<<<<<<<<<<<
 *             paths[loner_type] = []
 *             for loner_object in loner_objects:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_loner_holder, __pyx_n_s_items); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 859, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 859, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 859, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 859, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 859, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 859, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_5(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 859, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 859, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 859, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 859, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 859, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
      index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 859, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 859, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_loner_type, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_loner_objects, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "parabam/chaser.pyx":860
 *         paths = {}
 *         for loner_type,loner_objects in loner_holder.items():
 *             paths[loner_type] = []             # <<<<<<<<<<<<<<
 *             for loner_object in loner_objects:
 *                 paths[loner_type].append(loner_object.filename)
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 860, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_paths, __pyx_v_loner_type, __pyx_t_1) < 0)) __PYX_ERR(0, 860, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":861
 *         for loner_type,loner_objects in loner_holder.items():
 *             paths[loner_type] = []
 *             for loner_object in loner_objects:             # <<<<<<<<<<<<<<
 *                 paths[loner_type].append(loner_object.filename)
 *             loner_object.close()#This close prevents too many open files
 */
    if (likely(PyList_CheckExact(__pyx_v_loner_objects)) || PyTuple_CheckExact(__pyx_v_loner_objects)) {
      __pyx_t_1 = __pyx_v_loner_objects; __Pyx_INCREF(__pyx_t_1); __pyx_t_9 = 0;
      __pyx_t_10 = NULL;
    } else {
      __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_loner_objects); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 861, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 861, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_10)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 861, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 861, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 861, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 861, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_10(__pyx_t_1);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 861, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_loner_object, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "parabam/chaser.pyx":862
 *             paths[loner_type] = []
 *             for loner_object in loner_objects:
 *                 paths[loner_type].append(loner_object.filename)             # <<<<<<<<<<<<<<
 *             loner_object.close()#This close prevents too many open files
 *         return paths
 */
      __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_paths, __pyx_v_loner_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 862, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_loner_object, __pyx_n_s_filename); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 862, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_t_3); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 862, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "parabam/chaser.pyx":861
 *         for loner_type,loner_objects in loner_holder.items():
 *             paths[loner_type] = []
 *             for loner_object in loner_objects:             # <<<<<<<<<<<<<<
 *                 paths[loner_type].append(loner_object.filename)
 *             loner_object.close()#This close prevents too many open files
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":863
 *             for loner_object in loner_objects:
 *                 paths[loner_type].append(loner_object.filename)
 *             loner_object.close()#This close prevents too many open files             # <<<<<<<<<<<<<<
 *         return paths
 * 
 */
    if (unlikely(!__pyx_v_loner_object)) { __Pyx_RaiseUnboundLocalError("loner_object"); __PYX_ERR(0, 863, __pyx_L1_error) }
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_loner_object, __pyx_n_s_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 863, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 863, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":859
 *     def __get_paths_and_close__(self,loner_holder):
 *         paths = {}
 *         for loner_type,loner_objects in loner_holder.items():             # <<<<<<<<<<<<<<
 *             paths[loner_type] = []
 *             for loner_object in loner_objects:
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "parabam/chaser.pyx":864
 *                 paths[loner_type].append(loner_object.filename)
 *             loner_object.close()#This close prevents too many open files
 *         return paths             # <<<<<<<<<<<<<<
 * 
 * class MatchMakerHandler(ChaserHandler):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_paths);
  __pyx_r = __pyx_v_paths;
  goto __pyx_L0;

  /* "parabam/chaser.pyx":857
 *         loner_objects[loner_type][-1].write(read)
 * 
 *     def __get_paths_and_close__(self,loner_holder):             # <<<<<<<<<<<<<<
 *         paths = {}
 *         for loner_type,loner_objects in loner_holder.items():
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("parabam.chaser.PrimaryHandler.__get_paths_and_close__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_paths);
  __Pyx_XDECREF(__pyx_v_loner_type);
  __Pyx_XDECREF(__pyx_v_loner_objects);
  __Pyx_XDECREF(__pyx_v_loner_object);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":868
 * class MatchMakerHandler(ChaserHandler):
 * 
 *     def __init__(self,object constants,int max_reads, dict child_pack,int pid):             # <<<<<<<<<<<<<<
 *         super(MatchMakerHandler,self).__init__(constants,max_reads,
 *                                                 child_pack, pid)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_17MatchMakerHandler_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_17MatchMakerHandler_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_17MatchMakerHandler_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_17MatchMakerHandler_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_constants = 0;
  int __pyx_v_max_reads;
  PyObject *__pyx_v_child_pack = 0;
  int __pyx_v_pid;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_constants,&__pyx_n_s_max_reads,&__pyx_n_s_child_pack_2,&__pyx_n_s_pid,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_constants)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 1); __PYX_ERR(0, 868, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_max_reads)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 2); __PYX_ERR(0, 868, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_child_pack_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 3); __PYX_ERR(0, 868, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pid)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 4); __PYX_ERR(0, 868, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 868, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_self = values[0];
    __pyx_v_constants = values[1];
    __pyx_v_max_reads = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_max_reads == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 868, __pyx_L3_error)
    __pyx_v_child_pack = ((PyObject*)values[3]);
    __pyx_v_pid = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_pid == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 868, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 868, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.MatchMakerHandler.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_child_pack), (&PyDict_Type), 1, "child_pack", 1))) __PYX_ERR(0, 868, __pyx_L1_error)
  __pyx_r = __pyx_pf_7parabam_6chaser_17MatchMakerHandler___init__(__pyx_self, __pyx_v_self, __pyx_v_constants, __pyx_v_max_reads, __pyx_v_child_pack, __pyx_v_pid);

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

static PyObject *__pyx_pf_7parabam_6chaser_17MatchMakerHandler___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_constants, int __pyx_v_max_reads, PyObject *__pyx_v_child_pack, int __pyx_v_pid) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "parabam/chaser.pyx":869
 * 
 *     def __init__(self,object constants,int max_reads, dict child_pack,int pid):
 *         super(MatchMakerHandler,self).__init__(constants,max_reads,             # <<<<<<<<<<<<<<
 *                                                 child_pack, pid)
 *         self.LonerInfo = namedtuple("LonerInfo","paths level loner_type")
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MatchMakerHandler); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_max_reads); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "parabam/chaser.pyx":870
 *     def __init__(self,object constants,int max_reads, dict child_pack,int pid):
 *         super(MatchMakerHandler,self).__init__(constants,max_reads,
 *                                                 child_pack, pid)             # <<<<<<<<<<<<<<
 *         self.LonerInfo = namedtuple("LonerInfo","paths level loner_type")
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_pid); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 870, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_v_constants, __pyx_t_2, __pyx_v_child_pack, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 869, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_v_constants, __pyx_t_2, __pyx_v_child_pack, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 869, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 869, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_INCREF(__pyx_v_constants);
    __Pyx_GIVEREF(__pyx_v_constants);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_constants);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_child_pack);
    __Pyx_GIVEREF(__pyx_v_child_pack);
    PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_v_child_pack);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_6, __pyx_t_4);
    __pyx_t_2 = 0;
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 869, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":871
 *         super(MatchMakerHandler,self).__init__(constants,max_reads,
 *                                                 child_pack, pid)
 *         self.LonerInfo = namedtuple("LonerInfo","paths level loner_type")             # <<<<<<<<<<<<<<
 * 
 *     def run(self,loner_paths,loner_type,level,fragment_leftovers):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_namedtuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_LonerInfo, __pyx_t_3) < 0) __PYX_ERR(0, 871, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "parabam/chaser.pyx":868
 * class MatchMakerHandler(ChaserHandler):
 * 
 *     def __init__(self,object constants,int max_reads, dict child_pack,int pid):             # <<<<<<<<<<<<<<
 *         super(MatchMakerHandler,self).__init__(constants,max_reads,
 *                                                 child_pack, pid)
 */

  /* 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_7);
  __Pyx_AddTraceback("parabam.chaser.MatchMakerHandler.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":873
 *         self.LonerInfo = namedtuple("LonerInfo","paths level loner_type")
 * 
 *     def run(self,loner_paths,loner_type,level,fragment_leftovers):             # <<<<<<<<<<<<<<
 * 
 *         loner_info = self.LonerInfo(loner_paths,level,loner_type)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_17MatchMakerHandler_3run(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_17MatchMakerHandler_3run = {"run", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_17MatchMakerHandler_3run, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_17MatchMakerHandler_3run(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_loner_paths = 0;
  PyObject *__pyx_v_loner_type = 0;
  PyObject *__pyx_v_level = 0;
  PyObject *__pyx_v_fragment_leftovers = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("run (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_loner_paths,&__pyx_n_s_loner_type,&__pyx_n_s_level,&__pyx_n_s_fragment_leftovers,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loner_paths)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("run", 1, 5, 5, 1); __PYX_ERR(0, 873, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loner_type)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("run", 1, 5, 5, 2); __PYX_ERR(0, 873, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_level)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("run", 1, 5, 5, 3); __PYX_ERR(0, 873, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fragment_leftovers)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("run", 1, 5, 5, 4); __PYX_ERR(0, 873, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "run") < 0)) __PYX_ERR(0, 873, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_self = values[0];
    __pyx_v_loner_paths = values[1];
    __pyx_v_loner_type = values[2];
    __pyx_v_level = values[3];
    __pyx_v_fragment_leftovers = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("run", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 873, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.MatchMakerHandler.run", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_17MatchMakerHandler_2run(__pyx_self, __pyx_v_self, __pyx_v_loner_paths, __pyx_v_loner_type, __pyx_v_level, __pyx_v_fragment_leftovers);

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

static PyObject *__pyx_pf_7parabam_6chaser_17MatchMakerHandler_2run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_loner_paths, PyObject *__pyx_v_loner_type, PyObject *__pyx_v_level, PyObject *__pyx_v_fragment_leftovers) {
  PyObject *__pyx_v_loner_info = NULL;
  PyObject *__pyx_v_loner_path = NULL;
  PyObject *__pyx_v_loner_object = NULL;
  PyObject *__pyx_v_pairs = 0;
  PyObject *__pyx_v_read_pairs = 0;
  PyObject *__pyx_v_send_pairs = 0;
  int __pyx_v_rescued;
  int __pyx_v_written;
  PyObject *__pyx_v_leftover_paths = 0;
  PyObject *__pyx_v_read = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_status = NULL;
  PyObject *__pyx_v_return_paths = NULL;
  PyObject *__pyx_v_leftover_path = NULL;
  PyObject *__pyx_v_loner_pack = 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 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  int __pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  __Pyx_RefNannySetupContext("run", 0);

  /* "parabam/chaser.pyx":875
 *     def run(self,loner_paths,loner_type,level,fragment_leftovers):
 * 
 *         loner_info = self.LonerInfo(loner_paths,level,loner_type)             # <<<<<<<<<<<<<<
 * 
 *         loner_path = self.__get_loner_temp_path__(\
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_LonerInfo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_loner_paths, __pyx_v_level, __pyx_v_loner_type};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 875, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_loner_paths, __pyx_v_level, __pyx_v_loner_type};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 875, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 875, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_loner_paths);
    __Pyx_GIVEREF(__pyx_v_loner_paths);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_loner_paths);
    __Pyx_INCREF(__pyx_v_level);
    __Pyx_GIVEREF(__pyx_v_level);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_level);
    __Pyx_INCREF(__pyx_v_loner_type);
    __Pyx_GIVEREF(__pyx_v_loner_type);
    PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_loner_type);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 875, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_loner_info = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":877
 *         loner_info = self.LonerInfo(loner_paths,level,loner_type)
 * 
 *         loner_path = self.__get_loner_temp_path__(\             # <<<<<<<<<<<<<<
 *                                     loner_info.loner_type,loner_info.level+1)
 *         loner_object = self.__get_loner_object__(loner_path)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_loner_temp_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "parabam/chaser.pyx":878
 * 
 *         loner_path = self.__get_loner_temp_path__(\
 *                                     loner_info.loner_type,loner_info.level+1)             # <<<<<<<<<<<<<<
 *         loner_object = self.__get_loner_object__(loner_path)
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_loner_info, __pyx_n_s_loner_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_loner_info, __pyx_n_s_level); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_5, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 877, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_5, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 877, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 877, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_4, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_4, __pyx_t_6);
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 877, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_loner_path = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":879
 *         loner_path = self.__get_loner_temp_path__(\
 *                                     loner_info.loner_type,loner_info.level+1)
 *         loner_object = self.__get_loner_object__(loner_path)             # <<<<<<<<<<<<<<
 * 
 *         cdef dict pairs = self.__first_pass__(loner_info,fragment_leftovers)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_loner_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_v_loner_path) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_loner_path);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_loner_object = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":881
 *         loner_object = self.__get_loner_object__(loner_path)
 * 
 *         cdef dict pairs = self.__first_pass__(loner_info,fragment_leftovers)             # <<<<<<<<<<<<<<
 *         cdef dict read_pairs = {}
 *         cdef dict send_pairs = {}
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_first_pass); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 881, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_loner_info, __pyx_v_fragment_leftovers};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 881, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_loner_info, __pyx_v_fragment_leftovers};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 881, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 881, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_INCREF(__pyx_v_loner_info);
    __Pyx_GIVEREF(__pyx_v_loner_info);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_4, __pyx_v_loner_info);
    __Pyx_INCREF(__pyx_v_fragment_leftovers);
    __Pyx_GIVEREF(__pyx_v_fragment_leftovers);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_4, __pyx_v_fragment_leftovers);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 881, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 881, __pyx_L1_error)
  __pyx_v_pairs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":882
 * 
 *         cdef dict pairs = self.__first_pass__(loner_info,fragment_leftovers)
 *         cdef dict read_pairs = {}             # <<<<<<<<<<<<<<
 *         cdef dict send_pairs = {}
 *         cdef int rescued = 0
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_read_pairs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":883
 *         cdef dict pairs = self.__first_pass__(loner_info,fragment_leftovers)
 *         cdef dict read_pairs = {}
 *         cdef dict send_pairs = {}             # <<<<<<<<<<<<<<
 *         cdef int rescued = 0
 *         cdef int written = 0
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_send_pairs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":884
 *         cdef dict read_pairs = {}
 *         cdef dict send_pairs = {}
 *         cdef int rescued = 0             # <<<<<<<<<<<<<<
 *         cdef int written = 0
 *         cdef list leftover_paths = []
 */
  __pyx_v_rescued = 0;

  /* "parabam/chaser.pyx":885
 *         cdef dict send_pairs = {}
 *         cdef int rescued = 0
 *         cdef int written = 0             # <<<<<<<<<<<<<<
 *         cdef list leftover_paths = []
 * 
 */
  __pyx_v_written = 0;

  /* "parabam/chaser.pyx":886
 *         cdef int rescued = 0
 *         cdef int written = 0
 *         cdef list leftover_paths = []             # <<<<<<<<<<<<<<
 * 
 *         for read in self.__read_generator__(loner_info,second_pass=True,
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_leftover_paths = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":888
 *         cdef list leftover_paths = []
 * 
 *         for read in self.__read_generator__(loner_info,second_pass=True,             # <<<<<<<<<<<<<<
 *                                             leftover_paths=leftover_paths,
 *                                             fragment_leftovers=fragment_leftovers):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_read_generator); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_loner_info);
  __Pyx_GIVEREF(__pyx_v_loner_info);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_loner_info);
  __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_second_pass, Py_True) < 0) __PYX_ERR(0, 888, __pyx_L1_error)

  /* "parabam/chaser.pyx":889
 * 
 *         for read in self.__read_generator__(loner_info,second_pass=True,
 *                                             leftover_paths=leftover_paths,             # <<<<<<<<<<<<<<
 *                                             fragment_leftovers=fragment_leftovers):
 *             try:
 */
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_leftover_paths, __pyx_v_leftover_paths) < 0) __PYX_ERR(0, 888, __pyx_L1_error)

  /* "parabam/chaser.pyx":890
 *         for read in self.__read_generator__(loner_info,second_pass=True,
 *                                             leftover_paths=leftover_paths,
 *                                             fragment_leftovers=fragment_leftovers):             # <<<<<<<<<<<<<<
 *             try:
 *                 status = pairs[read.qname]
 */
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_fragment_leftovers, __pyx_v_fragment_leftovers) < 0) __PYX_ERR(0, 888, __pyx_L1_error)

  /* "parabam/chaser.pyx":888
 *         cdef list leftover_paths = []
 * 
 *         for read in self.__read_generator__(loner_info,second_pass=True,             # <<<<<<<<<<<<<<
 *                                             leftover_paths=leftover_paths,
 *                                             fragment_leftovers=fragment_leftovers):
 */
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
    __pyx_t_6 = __pyx_t_7; __Pyx_INCREF(__pyx_t_6); __pyx_t_8 = 0;
    __pyx_t_9 = NULL;
  } else {
    __pyx_t_8 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 888, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 888, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  for (;;) {
    if (likely(!__pyx_t_9)) {
      if (likely(PyList_CheckExact(__pyx_t_6))) {
        if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_6)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 888, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 888, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      } else {
        if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 888, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 888, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      }
    } else {
      __pyx_t_7 = __pyx_t_9(__pyx_t_6);
      if (unlikely(!__pyx_t_7)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 888, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_7);
    }
    __Pyx_XDECREF_SET(__pyx_v_read, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "parabam/chaser.pyx":891
 *                                             leftover_paths=leftover_paths,
 *                                             fragment_leftovers=fragment_leftovers):
 *             try:             # <<<<<<<<<<<<<<
 *                 status = pairs[read.qname]
 *                 try:
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      /*try:*/ {

        /* "parabam/chaser.pyx":892
 *                                             fragment_leftovers=fragment_leftovers):
 *             try:
 *                 status = pairs[read.qname]             # <<<<<<<<<<<<<<
 *                 try:
 *                     read_pairs[read.qname].append(read)
 */
        if (unlikely(__pyx_v_pairs == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(0, 892, __pyx_L5_error)
        }
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_qname); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 892, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_pairs, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 892, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF_SET(__pyx_v_status, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "parabam/chaser.pyx":893
 *             try:
 *                 status = pairs[read.qname]
 *                 try:             # <<<<<<<<<<<<<<
 *                     read_pairs[read.qname].append(read)
 *                 except KeyError:
 */
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_15);
          /*try:*/ {

            /* "parabam/chaser.pyx":894
 *                 status = pairs[read.qname]
 *                 try:
 *                     read_pairs[read.qname].append(read)             # <<<<<<<<<<<<<<
 *                 except KeyError:
 *                     read_pairs[read.qname] = [read]
 */
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_qname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 894, __pyx_L13_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_read_pairs, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 894, __pyx_L13_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_16 = __Pyx_PyObject_Append(__pyx_t_7, __pyx_v_read); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 894, __pyx_L13_error)
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

            /* "parabam/chaser.pyx":893
 *             try:
 *                 status = pairs[read.qname]
 *                 try:             # <<<<<<<<<<<<<<
 *                     read_pairs[read.qname].append(read)
 *                 except KeyError:
 */
          }
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          goto __pyx_L20_try_end;
          __pyx_L13_error:;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

          /* "parabam/chaser.pyx":895
 *                 try:
 *                     read_pairs[read.qname].append(read)
 *                 except KeyError:             # <<<<<<<<<<<<<<
 *                     read_pairs[read.qname] = [read]
 * 
 */
          __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
          if (__pyx_t_4) {
            __Pyx_AddTraceback("parabam.chaser.MatchMakerHandler.run", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 895, __pyx_L15_except_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_GOTREF(__pyx_t_1);

            /* "parabam/chaser.pyx":896
 *                     read_pairs[read.qname].append(read)
 *                 except KeyError:
 *                     read_pairs[read.qname] = [read]             # <<<<<<<<<<<<<<
 * 
 *                 if len(read_pairs[read.qname]) == 2:
 */
            __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 896, __pyx_L15_except_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_INCREF(__pyx_v_read);
            __Pyx_GIVEREF(__pyx_v_read);
            PyList_SET_ITEM(__pyx_t_5, 0, __pyx_v_read);
            __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_qname); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 896, __pyx_L15_except_error)
            __Pyx_GOTREF(__pyx_t_3);
            if (unlikely(PyDict_SetItem(__pyx_v_read_pairs, __pyx_t_3, __pyx_t_5) < 0)) __PYX_ERR(0, 896, __pyx_L15_except_error)
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            goto __pyx_L14_exception_handled;
          }
          goto __pyx_L15_except_error;
          __pyx_L15_except_error:;

          /* "parabam/chaser.pyx":893
 *             try:
 *                 status = pairs[read.qname]
 *                 try:             # <<<<<<<<<<<<<<
 *                     read_pairs[read.qname].append(read)
 *                 except KeyError:
 */
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
          goto __pyx_L5_error;
          __pyx_L14_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
          __pyx_L20_try_end:;
        }

        /* "parabam/chaser.pyx":898
 *                     read_pairs[read.qname] = [read]
 * 
 *                 if len(read_pairs[read.qname]) == 2:             # <<<<<<<<<<<<<<
 *                     send_pairs[read.qname] = read_pairs[read.qname]
 *                     del pairs[read.qname]
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_qname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 898, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_read_pairs, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 898, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_17 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_17 == ((Py_ssize_t)-1))) __PYX_ERR(0, 898, __pyx_L5_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_18 = ((__pyx_t_17 == 2) != 0);
        if (__pyx_t_18) {

          /* "parabam/chaser.pyx":899
 * 
 *                 if len(read_pairs[read.qname]) == 2:
 *                     send_pairs[read.qname] = read_pairs[read.qname]             # <<<<<<<<<<<<<<
 *                     del pairs[read.qname]
 *                     del read_pairs[read.qname]
 */
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_qname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 899, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_read_pairs, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_qname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 899, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
          if (unlikely(PyDict_SetItem(__pyx_v_send_pairs, __pyx_t_2, __pyx_t_1) < 0)) __PYX_ERR(0, 899, __pyx_L5_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "parabam/chaser.pyx":900
 *                 if len(read_pairs[read.qname]) == 2:
 *                     send_pairs[read.qname] = read_pairs[read.qname]
 *                     del pairs[read.qname]             # <<<<<<<<<<<<<<
 *                     del read_pairs[read.qname]
 * 
 */
          if (unlikely(__pyx_v_pairs == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
            __PYX_ERR(0, 900, __pyx_L5_error)
          }
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_qname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 900, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (unlikely(PyDict_DelItem(__pyx_v_pairs, __pyx_t_1) < 0)) __PYX_ERR(0, 900, __pyx_L5_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "parabam/chaser.pyx":901
 *                     send_pairs[read.qname] = read_pairs[read.qname]
 *                     del pairs[read.qname]
 *                     del read_pairs[read.qname]             # <<<<<<<<<<<<<<
 * 
 *                 #If over hard limit, send to main stream.
 */
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_qname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 901, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (unlikely(PyDict_DelItem(__pyx_v_read_pairs, __pyx_t_1) < 0)) __PYX_ERR(0, 901, __pyx_L5_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "parabam/chaser.pyx":898
 *                     read_pairs[read.qname] = [read]
 * 
 *                 if len(read_pairs[read.qname]) == 2:             # <<<<<<<<<<<<<<
 *                     send_pairs[read.qname] = read_pairs[read.qname]
 *                     del pairs[read.qname]
 */
        }

        /* "parabam/chaser.pyx":904
 * 
 *                 #If over hard limit, send to main stream.
 *                 if len(send_pairs) >= 100000:             # <<<<<<<<<<<<<<
 *                     rescued += self.__launch_child_task__(send_pairs)
 *                     send_pairs = {}
 */
        __pyx_t_17 = PyDict_Size(__pyx_v_send_pairs); if (unlikely(__pyx_t_17 == ((Py_ssize_t)-1))) __PYX_ERR(0, 904, __pyx_L5_error)
        __pyx_t_18 = ((__pyx_t_17 >= 0x186A0) != 0);
        if (__pyx_t_18) {

          /* "parabam/chaser.pyx":905
 *                 #If over hard limit, send to main stream.
 *                 if len(send_pairs) >= 100000:
 *                     rescued += self.__launch_child_task__(send_pairs)             # <<<<<<<<<<<<<<
 *                     send_pairs = {}
 *                     gc.collect()
 */
          __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rescued); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 905, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_launch_child_task); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 905, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_5 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
            __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
            if (likely(__pyx_t_5)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
              __Pyx_INCREF(__pyx_t_5);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_7, function);
            }
          }
          __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_5, __pyx_v_send_pairs) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_send_pairs);
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 905, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 905, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 905, __pyx_L5_error)
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_v_rescued = __pyx_t_4;

          /* "parabam/chaser.pyx":906
 *                 if len(send_pairs) >= 100000:
 *                     rescued += self.__launch_child_task__(send_pairs)
 *                     send_pairs = {}             # <<<<<<<<<<<<<<
 *                     gc.collect()
 * 
 */
          __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 906, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF_SET(__pyx_v_send_pairs, ((PyObject*)__pyx_t_7));
          __pyx_t_7 = 0;

          /* "parabam/chaser.pyx":907
 *                     rescued += self.__launch_child_task__(send_pairs)
 *                     send_pairs = {}
 *                     gc.collect()             # <<<<<<<<<<<<<<
 * 
 *             except KeyError:
 */
          __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_gc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 907, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_collect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 907, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = NULL;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
            __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
            if (likely(__pyx_t_2)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
              __Pyx_INCREF(__pyx_t_2);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_1, function);
            }
          }
          __pyx_t_7 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 907, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

          /* "parabam/chaser.pyx":904
 * 
 *                 #If over hard limit, send to main stream.
 *                 if len(send_pairs) >= 100000:             # <<<<<<<<<<<<<<
 *                     rescued += self.__launch_child_task__(send_pairs)
 *                     send_pairs = {}
 */
        }

        /* "parabam/chaser.pyx":891
 *                                             leftover_paths=leftover_paths,
 *                                             fragment_leftovers=fragment_leftovers):
 *             try:             # <<<<<<<<<<<<<<
 *                 status = pairs[read.qname]
 *                 try:
 */
      }
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      goto __pyx_L12_try_end;
      __pyx_L5_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "parabam/chaser.pyx":909
 *                     gc.collect()
 * 
 *             except KeyError:             # <<<<<<<<<<<<<<
 *                 written += 1
 *                 loner_object.write(read)
 */
      __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
      if (__pyx_t_4) {
        __Pyx_AddTraceback("parabam.chaser.MatchMakerHandler.run", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_1, &__pyx_t_2) < 0) __PYX_ERR(0, 909, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_t_2);

        /* "parabam/chaser.pyx":910
 * 
 *             except KeyError:
 *                 written += 1             # <<<<<<<<<<<<<<
 *                 loner_object.write(read)
 *         loner_object.close()
 */
        __pyx_v_written = (__pyx_v_written + 1);

        /* "parabam/chaser.pyx":911
 *             except KeyError:
 *                 written += 1
 *                 loner_object.write(read)             # <<<<<<<<<<<<<<
 *         loner_object.close()
 * 
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_loner_object, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 911, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_19 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_19)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_19);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_5 = (__pyx_t_19) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_19, __pyx_v_read) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_read);
        __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 911, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        goto __pyx_L6_exception_handled;
      }
      goto __pyx_L7_except_error;
      __pyx_L7_except_error:;

      /* "parabam/chaser.pyx":891
 *                                             leftover_paths=leftover_paths,
 *                                             fragment_leftovers=fragment_leftovers):
 *             try:             # <<<<<<<<<<<<<<
 *                 status = pairs[read.qname]
 *                 try:
 */
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      goto __pyx_L1_error;
      __pyx_L6_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      __pyx_L12_try_end:;
    }

    /* "parabam/chaser.pyx":888
 *         cdef list leftover_paths = []
 * 
 *         for read in self.__read_generator__(loner_info,second_pass=True,             # <<<<<<<<<<<<<<
 *                                             leftover_paths=leftover_paths,
 *                                             fragment_leftovers=fragment_leftovers):
 */
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "parabam/chaser.pyx":912
 *                 written += 1
 *                 loner_object.write(read)
 *         loner_object.close()             # <<<<<<<<<<<<<<
 * 
 *         if len(send_pairs) > 0:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_loner_object, __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_6 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "parabam/chaser.pyx":914
 *         loner_object.close()
 * 
 *         if len(send_pairs) > 0:             # <<<<<<<<<<<<<<
 *             rescued += self.__launch_child_task__(send_pairs)
 * 
 */
  __pyx_t_8 = PyDict_Size(__pyx_v_send_pairs); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 914, __pyx_L1_error)
  __pyx_t_18 = ((__pyx_t_8 > 0) != 0);
  if (__pyx_t_18) {

    /* "parabam/chaser.pyx":915
 * 
 *         if len(send_pairs) > 0:
 *             rescued += self.__launch_child_task__(send_pairs)             # <<<<<<<<<<<<<<
 * 
 *         del read_pairs
 */
    __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_rescued); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 915, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_launch_child_task); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 915, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_7, __pyx_v_send_pairs) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_send_pairs);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 915, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 915, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 915, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_rescued = __pyx_t_4;

    /* "parabam/chaser.pyx":914
 *         loner_object.close()
 * 
 *         if len(send_pairs) > 0:             # <<<<<<<<<<<<<<
 *             rescued += self.__launch_child_task__(send_pairs)
 * 
 */
  }

  /* "parabam/chaser.pyx":917
 *             rescued += self.__launch_child_task__(send_pairs)
 * 
 *         del read_pairs             # <<<<<<<<<<<<<<
 *         del pairs
 * 
 */
  __Pyx_DECREF(__pyx_v_read_pairs);
  __pyx_v_read_pairs = NULL;

  /* "parabam/chaser.pyx":918
 * 
 *         del read_pairs
 *         del pairs             # <<<<<<<<<<<<<<
 * 
 *         gc.collect()
 */
  __Pyx_DECREF(__pyx_v_pairs);
  __pyx_v_pairs = NULL;

  /* "parabam/chaser.pyx":920
 *         del pairs
 * 
 *         gc.collect()             # <<<<<<<<<<<<<<
 * 
 *         return_paths = []
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_gc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_collect); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":922
 *         gc.collect()
 * 
 *         return_paths = []             # <<<<<<<<<<<<<<
 * 
 *         if written == 0:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_return_paths = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":924
 *         return_paths = []
 * 
 *         if written == 0:             # <<<<<<<<<<<<<<
 *             os.remove(loner_path)
 *         else:
 */
  __pyx_t_18 = ((__pyx_v_written == 0) != 0);
  if (__pyx_t_18) {

    /* "parabam/chaser.pyx":925
 * 
 *         if written == 0:
 *             os.remove(loner_path)             # <<<<<<<<<<<<<<
 *         else:
 *             return_paths.append((loner_info.level+1,loner_path))
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_os); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 925, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_remove); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 925, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_v_loner_path) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_loner_path);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 925, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":924
 *         return_paths = []
 * 
 *         if written == 0:             # <<<<<<<<<<<<<<
 *             os.remove(loner_path)
 *         else:
 */
    goto __pyx_L28;
  }

  /* "parabam/chaser.pyx":927
 *             os.remove(loner_path)
 *         else:
 *             return_paths.append((loner_info.level+1,loner_path))             # <<<<<<<<<<<<<<
 * 
 *         if len(leftover_paths) > 0:
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_loner_info, __pyx_n_s_level); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 927, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 927, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 927, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_loner_path);
    __Pyx_GIVEREF(__pyx_v_loner_path);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_loner_path);
    __pyx_t_2 = 0;
    __pyx_t_16 = __Pyx_PyList_Append(__pyx_v_return_paths, __pyx_t_1); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 927, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L28:;

  /* "parabam/chaser.pyx":929
 *             return_paths.append((loner_info.level+1,loner_path))
 * 
 *         if len(leftover_paths) > 0:             # <<<<<<<<<<<<<<
 *             for leftover_path in leftover_paths:
 *                 return_paths.append((loner_info.level,leftover_path))
 */
  __pyx_t_8 = PyList_GET_SIZE(__pyx_v_leftover_paths); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 929, __pyx_L1_error)
  __pyx_t_18 = ((__pyx_t_8 > 0) != 0);
  if (__pyx_t_18) {

    /* "parabam/chaser.pyx":930
 * 
 *         if len(leftover_paths) > 0:
 *             for leftover_path in leftover_paths:             # <<<<<<<<<<<<<<
 *                 return_paths.append((loner_info.level,leftover_path))
 * 
 */
    __pyx_t_1 = __pyx_v_leftover_paths; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0;
    for (;;) {
      if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 930, __pyx_L1_error)
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 930, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_leftover_path, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "parabam/chaser.pyx":931
 *         if len(leftover_paths) > 0:
 *             for leftover_path in leftover_paths:
 *                 return_paths.append((loner_info.level,leftover_path))             # <<<<<<<<<<<<<<
 * 
 *         loner_pack = MatchMakerResults(loner_type=loner_info.loner_type,
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_loner_info, __pyx_n_s_level); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 931, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 931, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
      __Pyx_INCREF(__pyx_v_leftover_path);
      __Pyx_GIVEREF(__pyx_v_leftover_path);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_leftover_path);
      __pyx_t_2 = 0;
      __pyx_t_16 = __Pyx_PyList_Append(__pyx_v_return_paths, __pyx_t_6); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 931, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "parabam/chaser.pyx":930
 * 
 *         if len(leftover_paths) > 0:
 *             for leftover_path in leftover_paths:             # <<<<<<<<<<<<<<
 *                 return_paths.append((loner_info.level,leftover_path))
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":929
 *             return_paths.append((loner_info.level+1,loner_path))
 * 
 *         if len(leftover_paths) > 0:             # <<<<<<<<<<<<<<
 *             for leftover_path in leftover_paths:
 *                 return_paths.append((loner_info.level,leftover_path))
 */
  }

  /* "parabam/chaser.pyx":933
 *                 return_paths.append((loner_info.level,leftover_path))
 * 
 *         loner_pack = MatchMakerResults(loner_type=loner_info.loner_type,             # <<<<<<<<<<<<<<
 *                                        results=return_paths,
 *                                        level=loner_info.level+1,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MatchMakerResults); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_loner_info, __pyx_n_s_loner_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_loner_type, __pyx_t_2) < 0) __PYX_ERR(0, 933, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "parabam/chaser.pyx":934
 * 
 *         loner_pack = MatchMakerResults(loner_type=loner_info.loner_type,
 *                                        results=return_paths,             # <<<<<<<<<<<<<<
 *                                        level=loner_info.level+1,
 *                                        chaser_type="match_maker",
 */
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_results, __pyx_v_return_paths) < 0) __PYX_ERR(0, 933, __pyx_L1_error)

  /* "parabam/chaser.pyx":935
 *         loner_pack = MatchMakerResults(loner_type=loner_info.loner_type,
 *                                        results=return_paths,
 *                                        level=loner_info.level+1,             # <<<<<<<<<<<<<<
 *                                        chaser_type="match_maker",
 *                                        rescued=rescued)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_loner_info, __pyx_n_s_level); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_level, __pyx_t_7) < 0) __PYX_ERR(0, 933, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_chaser_type, __pyx_n_s_match_maker) < 0) __PYX_ERR(0, 933, __pyx_L1_error)

  /* "parabam/chaser.pyx":937
 *                                        level=loner_info.level+1,
 *                                        chaser_type="match_maker",
 *                                        rescued=rescued)             # <<<<<<<<<<<<<<
 *         return loner_pack
 * 
 */
  __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_rescued); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_rescued, __pyx_t_7) < 0) __PYX_ERR(0, 933, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "parabam/chaser.pyx":933
 *                 return_paths.append((loner_info.level,leftover_path))
 * 
 *         loner_pack = MatchMakerResults(loner_type=loner_info.loner_type,             # <<<<<<<<<<<<<<
 *                                        results=return_paths,
 *                                        level=loner_info.level+1,
 */
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_loner_pack = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "parabam/chaser.pyx":938
 *                                        chaser_type="match_maker",
 *                                        rescued=rescued)
 *         return loner_pack             # <<<<<<<<<<<<<<
 * 
 *     def __first_pass__(self,loner_info,fragment_leftovers):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_loner_pack);
  __pyx_r = __pyx_v_loner_pack;
  goto __pyx_L0;

  /* "parabam/chaser.pyx":873
 *         self.LonerInfo = namedtuple("LonerInfo","paths level loner_type")
 * 
 *     def run(self,loner_paths,loner_type,level,fragment_leftovers):             # <<<<<<<<<<<<<<
 * 
 *         loner_info = self.LonerInfo(loner_paths,level,loner_type)
 */

  /* 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_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_AddTraceback("parabam.chaser.MatchMakerHandler.run", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_loner_info);
  __Pyx_XDECREF(__pyx_v_loner_path);
  __Pyx_XDECREF(__pyx_v_loner_object);
  __Pyx_XDECREF(__pyx_v_pairs);
  __Pyx_XDECREF(__pyx_v_read_pairs);
  __Pyx_XDECREF(__pyx_v_send_pairs);
  __Pyx_XDECREF(__pyx_v_leftover_paths);
  __Pyx_XDECREF(__pyx_v_read);
  __Pyx_XDECREF(__pyx_v_status);
  __Pyx_XDECREF(__pyx_v_return_paths);
  __Pyx_XDECREF(__pyx_v_leftover_path);
  __Pyx_XDECREF(__pyx_v_loner_pack);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":940
 *         return loner_pack
 * 
 *     def __first_pass__(self,loner_info,fragment_leftovers):             # <<<<<<<<<<<<<<
 *         cdef dict pairs = {}
 *         for read in self.__read_generator__(loner_info,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_17MatchMakerHandler_5__first_pass__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_17MatchMakerHandler_5__first_pass__ = {"__first_pass__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_17MatchMakerHandler_5__first_pass__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_17MatchMakerHandler_5__first_pass__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_loner_info = 0;
  PyObject *__pyx_v_fragment_leftovers = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__first_pass__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_loner_info,&__pyx_n_s_fragment_leftovers,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loner_info)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__first_pass__", 1, 3, 3, 1); __PYX_ERR(0, 940, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fragment_leftovers)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__first_pass__", 1, 3, 3, 2); __PYX_ERR(0, 940, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__first_pass__") < 0)) __PYX_ERR(0, 940, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_loner_info = values[1];
    __pyx_v_fragment_leftovers = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__first_pass__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 940, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.MatchMakerHandler.__first_pass__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_17MatchMakerHandler_4__first_pass__(__pyx_self, __pyx_v_self, __pyx_v_loner_info, __pyx_v_fragment_leftovers);

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

static PyObject *__pyx_pf_7parabam_6chaser_17MatchMakerHandler_4__first_pass__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_loner_info, PyObject *__pyx_v_fragment_leftovers) {
  PyObject *__pyx_v_pairs = 0;
  PyObject *__pyx_v_read = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_status = 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;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  __Pyx_RefNannySetupContext("__first_pass__", 0);

  /* "parabam/chaser.pyx":941
 * 
 *     def __first_pass__(self,loner_info,fragment_leftovers):
 *         cdef dict pairs = {}             # <<<<<<<<<<<<<<
 *         for read in self.__read_generator__(loner_info,
 *                                       fragment_leftovers=fragment_leftovers):
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_pairs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":942
 *     def __first_pass__(self,loner_info,fragment_leftovers):
 *         cdef dict pairs = {}
 *         for read in self.__read_generator__(loner_info,             # <<<<<<<<<<<<<<
 *                                       fragment_leftovers=fragment_leftovers):
 *             try:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_read_generator); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_loner_info);
  __Pyx_GIVEREF(__pyx_v_loner_info);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_loner_info);

  /* "parabam/chaser.pyx":943
 *         cdef dict pairs = {}
 *         for read in self.__read_generator__(loner_info,
 *                                       fragment_leftovers=fragment_leftovers):             # <<<<<<<<<<<<<<
 *             try:
 *                 status = pairs[read.qname]
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_fragment_leftovers, __pyx_v_fragment_leftovers) < 0) __PYX_ERR(0, 943, __pyx_L1_error)

  /* "parabam/chaser.pyx":942
 *     def __first_pass__(self,loner_info,fragment_leftovers):
 *         cdef dict pairs = {}
 *         for read in self.__read_generator__(loner_info,             # <<<<<<<<<<<<<<
 *                                       fragment_leftovers=fragment_leftovers):
 *             try:
 */
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 942, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 942, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 942, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 942, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 942, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 942, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_6(__pyx_t_3);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 942, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_read, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "parabam/chaser.pyx":944
 *         for read in self.__read_generator__(loner_info,
 *                                       fragment_leftovers=fragment_leftovers):
 *             try:             # <<<<<<<<<<<<<<
 *                 status = pairs[read.qname]
 *                 pairs[read.qname] = True
 */
    {
      __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:*/ {

        /* "parabam/chaser.pyx":945
 *                                       fragment_leftovers=fragment_leftovers):
 *             try:
 *                 status = pairs[read.qname]             # <<<<<<<<<<<<<<
 *                 pairs[read.qname] = True
 *             except KeyError:
 */
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_qname); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 945, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_pairs, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 945, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF_SET(__pyx_v_status, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "parabam/chaser.pyx":946
 *             try:
 *                 status = pairs[read.qname]
 *                 pairs[read.qname] = True             # <<<<<<<<<<<<<<
 *             except KeyError:
 *                 pairs[read.qname] = False
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_qname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 946, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (unlikely(PyDict_SetItem(__pyx_v_pairs, __pyx_t_2, Py_True) < 0)) __PYX_ERR(0, 946, __pyx_L5_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "parabam/chaser.pyx":944
 *         for read in self.__read_generator__(loner_info,
 *                                       fragment_leftovers=fragment_leftovers):
 *             try:             # <<<<<<<<<<<<<<
 *                 status = pairs[read.qname]
 *                 pairs[read.qname] = True
 */
      }
      __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_L5_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "parabam/chaser.pyx":947
 *                 status = pairs[read.qname]
 *                 pairs[read.qname] = True
 *             except KeyError:             # <<<<<<<<<<<<<<
 *                 pairs[read.qname] = False
 *         return self.__prepare_for_second_pass__(pairs)
 */
      __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
      if (__pyx_t_10) {
        __Pyx_AddTraceback("parabam.chaser.MatchMakerHandler.__first_pass__", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_1) < 0) __PYX_ERR(0, 947, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_t_1);

        /* "parabam/chaser.pyx":948
 *                 pairs[read.qname] = True
 *             except KeyError:
 *                 pairs[read.qname] = False             # <<<<<<<<<<<<<<
 *         return self.__prepare_for_second_pass__(pairs)
 * 
 */
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_qname); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 948, __pyx_L7_except_error)
        __Pyx_GOTREF(__pyx_t_11);
        if (unlikely(PyDict_SetItem(__pyx_v_pairs, __pyx_t_11, Py_False) < 0)) __PYX_ERR(0, 948, __pyx_L7_except_error)
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L6_exception_handled;
      }
      goto __pyx_L7_except_error;
      __pyx_L7_except_error:;

      /* "parabam/chaser.pyx":944
 *         for read in self.__read_generator__(loner_info,
 *                                       fragment_leftovers=fragment_leftovers):
 *             try:             # <<<<<<<<<<<<<<
 *                 status = pairs[read.qname]
 *                 pairs[read.qname] = True
 */
      __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_L6_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:;
    }

    /* "parabam/chaser.pyx":942
 *     def __first_pass__(self,loner_info,fragment_leftovers):
 *         cdef dict pairs = {}
 *         for read in self.__read_generator__(loner_info,             # <<<<<<<<<<<<<<
 *                                       fragment_leftovers=fragment_leftovers):
 *             try:
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "parabam/chaser.pyx":949
 *             except KeyError:
 *                 pairs[read.qname] = False
 *         return self.__prepare_for_second_pass__(pairs)             # <<<<<<<<<<<<<<
 * 
 *     def __prepare_for_second_pass__(self,pairs):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_prepare_for_second_pass); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_v_pairs) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_pairs);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "parabam/chaser.pyx":940
 *         return loner_pack
 * 
 *     def __first_pass__(self,loner_info,fragment_leftovers):             # <<<<<<<<<<<<<<
 *         cdef dict pairs = {}
 *         for read in self.__read_generator__(loner_info,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("parabam.chaser.MatchMakerHandler.__first_pass__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pairs);
  __Pyx_XDECREF(__pyx_v_read);
  __Pyx_XDECREF(__pyx_v_status);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":951
 *         return self.__prepare_for_second_pass__(pairs)
 * 
 *     def __prepare_for_second_pass__(self,pairs):             # <<<<<<<<<<<<<<
 *         return dict(filter( lambda tup : tup[1], iter(pairs.items()) ))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_17MatchMakerHandler_7__prepare_for_second_pass__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_17MatchMakerHandler_7__prepare_for_second_pass__ = {"__prepare_for_second_pass__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_17MatchMakerHandler_7__prepare_for_second_pass__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_17MatchMakerHandler_7__prepare_for_second_pass__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_pairs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__prepare_for_second_pass__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_pairs,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pairs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__prepare_for_second_pass__", 1, 2, 2, 1); __PYX_ERR(0, 951, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__prepare_for_second_pass__") < 0)) __PYX_ERR(0, 951, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_pairs = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__prepare_for_second_pass__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 951, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.MatchMakerHandler.__prepare_for_second_pass__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_17MatchMakerHandler_6__prepare_for_second_pass__(__pyx_self, __pyx_v_self, __pyx_v_pairs);

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

/* "parabam/chaser.pyx":952
 * 
 *     def __prepare_for_second_pass__(self,pairs):
 *         return dict(filter( lambda tup : tup[1], iter(pairs.items()) ))             # <<<<<<<<<<<<<<
 * 
 *     def __read_generator__(self,loner_info,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_17MatchMakerHandler_27__prepare_for_second_pass___lambda4(PyObject *__pyx_self, PyObject *__pyx_v_tup); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_17MatchMakerHandler_27__prepare_for_second_pass___lambda4 = {"lambda4", (PyCFunction)__pyx_pw_7parabam_6chaser_17MatchMakerHandler_27__prepare_for_second_pass___lambda4, METH_O, 0};
static PyObject *__pyx_pw_7parabam_6chaser_17MatchMakerHandler_27__prepare_for_second_pass___lambda4(PyObject *__pyx_self, PyObject *__pyx_v_tup) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda4 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda4(__pyx_self, ((PyObject *)__pyx_v_tup));

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

static PyObject *__pyx_lambda_funcdef_lambda4(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tup) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("lambda4", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_tup, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("parabam.chaser.MatchMakerHandler.__prepare_for_second_pass__.lambda4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":951
 *         return self.__prepare_for_second_pass__(pairs)
 * 
 *     def __prepare_for_second_pass__(self,pairs):             # <<<<<<<<<<<<<<
 *         return dict(filter( lambda tup : tup[1], iter(pairs.items()) ))
 * 
 */

static PyObject *__pyx_pf_7parabam_6chaser_17MatchMakerHandler_6__prepare_for_second_pass__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_pairs) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("__prepare_for_second_pass__", 0);

  /* "parabam/chaser.pyx":952
 * 
 *     def __prepare_for_second_pass__(self,pairs):
 *         return dict(filter( lambda tup : tup[1], iter(pairs.items()) ))             # <<<<<<<<<<<<<<
 * 
 *     def __read_generator__(self,loner_info,
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_17MatchMakerHandler_27__prepare_for_second_pass___lambda4, 0, __pyx_n_s_MatchMakerHandler___prepare_for, NULL, __pyx_n_s_parabam_chaser, __pyx_d, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_pairs, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_filter, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "parabam/chaser.pyx":951
 *         return self.__prepare_for_second_pass__(pairs)
 * 
 *     def __prepare_for_second_pass__(self,pairs):             # <<<<<<<<<<<<<<
 *         return dict(filter( lambda tup : tup[1], iter(pairs.items()) ))
 * 
 */

  /* 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("parabam.chaser.MatchMakerHandler.__prepare_for_second_pass__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_7parabam_6chaser_17MatchMakerHandler_10generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "parabam/chaser.pyx":954
 *         return dict(filter( lambda tup : tup[1], iter(pairs.items()) ))
 * 
 *     def __read_generator__(self,loner_info,             # <<<<<<<<<<<<<<
 *                             second_pass=False,leftover_paths=None,
 *                             fragment_leftovers=False):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_17MatchMakerHandler_9__read_generator__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_17MatchMakerHandler_9__read_generator__ = {"__read_generator__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_17MatchMakerHandler_9__read_generator__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_17MatchMakerHandler_9__read_generator__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_loner_info = 0;
  PyObject *__pyx_v_second_pass = 0;
  PyObject *__pyx_v_leftover_paths = 0;
  PyObject *__pyx_v_fragment_leftovers = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__read_generator__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_loner_info,&__pyx_n_s_second_pass,&__pyx_n_s_leftover_paths,&__pyx_n_s_fragment_leftovers,0};
    PyObject* values[5] = {0,0,0,0,0};

    /* "parabam/chaser.pyx":955
 * 
 *     def __read_generator__(self,loner_info,
 *                             second_pass=False,leftover_paths=None,             # <<<<<<<<<<<<<<
 *                             fragment_leftovers=False):
 * 
 */
    values[2] = ((PyObject *)((PyObject *)Py_False));
    values[3] = ((PyObject *)((PyObject *)Py_None));

    /* "parabam/chaser.pyx":956
 *     def __read_generator__(self,loner_info,
 *                             second_pass=False,leftover_paths=None,
 *                             fragment_leftovers=False):             # <<<<<<<<<<<<<<
 * 
 *         if not fragment_leftovers:
 */
    values[4] = ((PyObject *)((PyObject *)Py_False));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loner_info)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__read_generator__", 0, 2, 5, 1); __PYX_ERR(0, 954, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_second_pass);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_leftover_paths);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fragment_leftovers);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__read_generator__") < 0)) __PYX_ERR(0, 954, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_loner_info = values[1];
    __pyx_v_second_pass = values[2];
    __pyx_v_leftover_paths = values[3];
    __pyx_v_fragment_leftovers = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__read_generator__", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 954, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.MatchMakerHandler.__read_generator__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_17MatchMakerHandler_8__read_generator__(__pyx_self, __pyx_v_self, __pyx_v_loner_info, __pyx_v_second_pass, __pyx_v_leftover_paths, __pyx_v_fragment_leftovers);

  /* "parabam/chaser.pyx":954
 *         return dict(filter( lambda tup : tup[1], iter(pairs.items()) ))
 * 
 *     def __read_generator__(self,loner_info,             # <<<<<<<<<<<<<<
 *                             second_pass=False,leftover_paths=None,
 *                             fragment_leftovers=False):
 */

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

static PyObject *__pyx_pf_7parabam_6chaser_17MatchMakerHandler_8__read_generator__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_loner_info, PyObject *__pyx_v_second_pass, PyObject *__pyx_v_leftover_paths, PyObject *__pyx_v_fragment_leftovers) {
  struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_3___read_generator__ *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__read_generator__", 0);
  __pyx_cur_scope = (struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_3___read_generator__ *)__pyx_tp_new_7parabam_6chaser___pyx_scope_struct_3___read_generator__(__pyx_ptype_7parabam_6chaser___pyx_scope_struct_3___read_generator__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_3___read_generator__ *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 954, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self);
  __pyx_cur_scope->__pyx_v_loner_info = __pyx_v_loner_info;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_loner_info);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_loner_info);
  __pyx_cur_scope->__pyx_v_second_pass = __pyx_v_second_pass;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_second_pass);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_second_pass);
  __pyx_cur_scope->__pyx_v_leftover_paths = __pyx_v_leftover_paths;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_leftover_paths);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_leftover_paths);
  __pyx_cur_scope->__pyx_v_fragment_leftovers = __pyx_v_fragment_leftovers;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fragment_leftovers);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fragment_leftovers);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7parabam_6chaser_17MatchMakerHandler_10generator1, __pyx_codeobj__16, (PyObject *) __pyx_cur_scope, __pyx_n_s_read_generator, __pyx_n_s_MatchMakerHandler___read_generat, __pyx_n_s_parabam_chaser); if (unlikely(!gen)) __PYX_ERR(0, 954, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("parabam.chaser.MatchMakerHandler.__read_generator__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_7parabam_6chaser_17MatchMakerHandler_10generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_3___read_generator__ *__pyx_cur_scope = ((struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_3___read_generator__ *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__read_generator__", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L9_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 954, __pyx_L1_error)

  /* "parabam/chaser.pyx":958
 *                             fragment_leftovers=False):
 * 
 *         if not fragment_leftovers:             # <<<<<<<<<<<<<<
 *             count = self._max_reads // len(loner_info.paths)
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_fragment_leftovers); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 958, __pyx_L1_error)
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "parabam/chaser.pyx":959
 * 
 *         if not fragment_leftovers:
 *             count = self._max_reads // len(loner_info.paths)             # <<<<<<<<<<<<<<
 *         else:
 *             count = 50000
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_max_reads_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 959, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_loner_info, __pyx_n_s_paths); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 959, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 959, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 959, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = PyNumber_FloorDivide(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 959, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_cur_scope->__pyx_v_count = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "parabam/chaser.pyx":958
 *                             fragment_leftovers=False):
 * 
 *         if not fragment_leftovers:             # <<<<<<<<<<<<<<
 *             count = self._max_reads // len(loner_info.paths)
 *         else:
 */
    goto __pyx_L4;
  }

  /* "parabam/chaser.pyx":961
 *             count = self._max_reads // len(loner_info.paths)
 *         else:
 *             count = 50000             # <<<<<<<<<<<<<<
 * 
 *         count_limit = False
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_int_50000);
    __Pyx_GIVEREF(__pyx_int_50000);
    __pyx_cur_scope->__pyx_v_count = __pyx_int_50000;
  }
  __pyx_L4:;

  /* "parabam/chaser.pyx":963
 *             count = 50000
 * 
 *         count_limit = False             # <<<<<<<<<<<<<<
 *         for path in loner_info.paths:
 *             loner_object = pysam.AlignmentFile(path,"rb")
 */
  __pyx_cur_scope->__pyx_v_count_limit = 0;

  /* "parabam/chaser.pyx":964
 * 
 *         count_limit = False
 *         for path in loner_info.paths:             # <<<<<<<<<<<<<<
 *             loner_object = pysam.AlignmentFile(path,"rb")
 *             bam_iterator = loner_object.fetch(until_eof=True)
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_loner_info, __pyx_n_s_paths); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
    __pyx_t_4 = __pyx_t_6; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 964, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 964, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  for (;;) {
    if (likely(!__pyx_t_7)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_6); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 964, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 964, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_6); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 964, __pyx_L1_error)
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 964, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      }
    } else {
      __pyx_t_6 = __pyx_t_7(__pyx_t_4);
      if (unlikely(!__pyx_t_6)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 964, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_path);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_path, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;

    /* "parabam/chaser.pyx":965
 *         count_limit = False
 *         for path in loner_info.paths:
 *             loner_object = pysam.AlignmentFile(path,"rb")             # <<<<<<<<<<<<<<
 *             bam_iterator = loner_object.fetch(until_eof=True)
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pysam); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 965, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_AlignmentFile); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 965, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_9 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_path, __pyx_n_s_rb};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 965, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_6);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_path, __pyx_n_s_rb};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 965, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_6);
    } else
    #endif
    {
      __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 965, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      if (__pyx_t_3) {
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
      }
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_path);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_path);
      PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_cur_scope->__pyx_v_path);
      __Pyx_INCREF(__pyx_n_s_rb);
      __Pyx_GIVEREF(__pyx_n_s_rb);
      PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_n_s_rb);
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 965, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_loner_object);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_loner_object, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;

    /* "parabam/chaser.pyx":966
 *         for path in loner_info.paths:
 *             loner_object = pysam.AlignmentFile(path,"rb")
 *             bam_iterator = loner_object.fetch(until_eof=True)             # <<<<<<<<<<<<<<
 * 
 *             for i,read in enumerate(bam_iterator):
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_loner_object, __pyx_n_s_fetch); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 966, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 966, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_until_eof, Py_True) < 0) __PYX_ERR(0, 966, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 966, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_bam_iterator);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_bam_iterator, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_10);
    __pyx_t_10 = 0;

    /* "parabam/chaser.pyx":968
 *             bam_iterator = loner_object.fetch(until_eof=True)
 * 
 *             for i,read in enumerate(bam_iterator):             # <<<<<<<<<<<<<<
 *                 yield read
 *                 if i == count:
 */
    __Pyx_INCREF(__pyx_int_0);
    __pyx_t_10 = __pyx_int_0;
    if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_bam_iterator)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_bam_iterator)) {
      __pyx_t_8 = __pyx_cur_scope->__pyx_v_bam_iterator; __Pyx_INCREF(__pyx_t_8); __pyx_t_11 = 0;
      __pyx_t_12 = NULL;
    } else {
      __pyx_t_11 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_bam_iterator); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 968, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_12 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 968, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_12)) {
        if (likely(PyList_CheckExact(__pyx_t_8))) {
          if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_8)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_11); __Pyx_INCREF(__pyx_t_6); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 968, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_8, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 968, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_11); __Pyx_INCREF(__pyx_t_6); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 968, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_8, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 968, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_12(__pyx_t_8);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 968, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_read);
      __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_read, __pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_i);
      __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_i, __pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_10);
      __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_10, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 968, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_10);
      __pyx_t_10 = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "parabam/chaser.pyx":969
 * 
 *             for i,read in enumerate(bam_iterator):
 *                 yield read             # <<<<<<<<<<<<<<
 *                 if i == count:
 *                     count_limit = True
 */
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_read);
      __pyx_r = __pyx_cur_scope->__pyx_v_read;
      __Pyx_XGIVEREF(__pyx_t_4);
      __pyx_cur_scope->__pyx_t_0 = __pyx_t_4;
      __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
      __pyx_cur_scope->__pyx_t_2 = __pyx_t_7;
      __Pyx_XGIVEREF(__pyx_t_8);
      __pyx_cur_scope->__pyx_t_3 = __pyx_t_8;
      __Pyx_XGIVEREF(__pyx_t_10);
      __pyx_cur_scope->__pyx_t_4 = __pyx_t_10;
      __pyx_cur_scope->__pyx_t_5 = __pyx_t_11;
      __pyx_cur_scope->__pyx_t_6 = __pyx_t_12;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
      /* return from generator, yielding value */
      __pyx_generator->resume_label = 1;
      return __pyx_r;
      __pyx_L9_resume_from_yield:;
      __pyx_t_4 = __pyx_cur_scope->__pyx_t_0;
      __pyx_cur_scope->__pyx_t_0 = 0;
      __Pyx_XGOTREF(__pyx_t_4);
      __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
      __pyx_t_7 = __pyx_cur_scope->__pyx_t_2;
      __pyx_t_8 = __pyx_cur_scope->__pyx_t_3;
      __pyx_cur_scope->__pyx_t_3 = 0;
      __Pyx_XGOTREF(__pyx_t_8);
      __pyx_t_10 = __pyx_cur_scope->__pyx_t_4;
      __pyx_cur_scope->__pyx_t_4 = 0;
      __Pyx_XGOTREF(__pyx_t_10);
      __pyx_t_11 = __pyx_cur_scope->__pyx_t_5;
      __pyx_t_12 = __pyx_cur_scope->__pyx_t_6;
      if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 969, __pyx_L1_error)

      /* "parabam/chaser.pyx":970
 *             for i,read in enumerate(bam_iterator):
 *                 yield read
 *                 if i == count:             # <<<<<<<<<<<<<<
 *                     count_limit = True
 *                     break
 */
      __pyx_t_6 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_i, __pyx_cur_scope->__pyx_v_count, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 970, __pyx_L1_error)
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 970, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_2) {

        /* "parabam/chaser.pyx":971
 *                 yield read
 *                 if i == count:
 *                     count_limit = True             # <<<<<<<<<<<<<<
 *                     break
 * 
 */
        __pyx_cur_scope->__pyx_v_count_limit = 1;

        /* "parabam/chaser.pyx":972
 *                 if i == count:
 *                     count_limit = True
 *                     break             # <<<<<<<<<<<<<<
 * 
 *             if second_pass:
 */
        goto __pyx_L8_break;

        /* "parabam/chaser.pyx":970
 *             for i,read in enumerate(bam_iterator):
 *                 yield read
 *                 if i == count:             # <<<<<<<<<<<<<<
 *                     count_limit = True
 *                     break
 */
      }

      /* "parabam/chaser.pyx":968
 *             bam_iterator = loner_object.fetch(until_eof=True)
 * 
 *             for i,read in enumerate(bam_iterator):             # <<<<<<<<<<<<<<
 *                 yield read
 *                 if i == count:
 */
    }
    __pyx_L8_break:;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "parabam/chaser.pyx":974
 *                     break
 * 
 *             if second_pass:             # <<<<<<<<<<<<<<
 *                 if count_limit:
 *                     count_limit = False
 */
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_second_pass); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 974, __pyx_L1_error)
    if (__pyx_t_2) {

      /* "parabam/chaser.pyx":975
 * 
 *             if second_pass:
 *                 if count_limit:             # <<<<<<<<<<<<<<
 *                     count_limit = False
 *                     self.__write_leftovers__(bam_iterator,
 */
      __pyx_t_2 = (__pyx_cur_scope->__pyx_v_count_limit != 0);
      if (__pyx_t_2) {

        /* "parabam/chaser.pyx":976
 *             if second_pass:
 *                 if count_limit:
 *                     count_limit = False             # <<<<<<<<<<<<<<
 *                     self.__write_leftovers__(bam_iterator,
 *                                              fragment_leftovers,
 */
        __pyx_cur_scope->__pyx_v_count_limit = 0;

        /* "parabam/chaser.pyx":977
 *                 if count_limit:
 *                     count_limit = False
 *                     self.__write_leftovers__(bam_iterator,             # <<<<<<<<<<<<<<
 *                                              fragment_leftovers,
 *                                              loner_info,
 */
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_write_leftovers); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 977, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);

        /* "parabam/chaser.pyx":980
 *                                              fragment_leftovers,
 *                                              loner_info,
 *                                              leftover_paths)             # <<<<<<<<<<<<<<
 * 
 *                 os.remove(path)
 */
        __pyx_t_6 = NULL;
        __pyx_t_9 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
            __pyx_t_9 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_8)) {
          PyObject *__pyx_temp[5] = {__pyx_t_6, __pyx_cur_scope->__pyx_v_bam_iterator, __pyx_cur_scope->__pyx_v_fragment_leftovers, __pyx_cur_scope->__pyx_v_loner_info, __pyx_cur_scope->__pyx_v_leftover_paths};
          __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 4+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 977, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_10);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
          PyObject *__pyx_temp[5] = {__pyx_t_6, __pyx_cur_scope->__pyx_v_bam_iterator, __pyx_cur_scope->__pyx_v_fragment_leftovers, __pyx_cur_scope->__pyx_v_loner_info, __pyx_cur_scope->__pyx_v_leftover_paths};
          __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 4+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 977, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_10);
        } else
        #endif
        {
          __pyx_t_3 = PyTuple_New(4+__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 977, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          if (__pyx_t_6) {
            __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL;
          }
          __Pyx_INCREF(__pyx_cur_scope->__pyx_v_bam_iterator);
          __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_bam_iterator);
          PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_9, __pyx_cur_scope->__pyx_v_bam_iterator);
          __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fragment_leftovers);
          __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fragment_leftovers);
          PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_9, __pyx_cur_scope->__pyx_v_fragment_leftovers);
          __Pyx_INCREF(__pyx_cur_scope->__pyx_v_loner_info);
          __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_loner_info);
          PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_9, __pyx_cur_scope->__pyx_v_loner_info);
          __Pyx_INCREF(__pyx_cur_scope->__pyx_v_leftover_paths);
          __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_leftover_paths);
          PyTuple_SET_ITEM(__pyx_t_3, 3+__pyx_t_9, __pyx_cur_scope->__pyx_v_leftover_paths);
          __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_3, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 977, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

        /* "parabam/chaser.pyx":975
 * 
 *             if second_pass:
 *                 if count_limit:             # <<<<<<<<<<<<<<
 *                     count_limit = False
 *                     self.__write_leftovers__(bam_iterator,
 */
      }

      /* "parabam/chaser.pyx":982
 *                                              leftover_paths)
 * 
 *                 os.remove(path)             # <<<<<<<<<<<<<<
 *             loner_object.close()
 *         gc.collect()
 */
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_os); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 982, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_remove); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 982, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      __pyx_t_10 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_cur_scope->__pyx_v_path) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_cur_scope->__pyx_v_path);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 982, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "parabam/chaser.pyx":974
 *                     break
 * 
 *             if second_pass:             # <<<<<<<<<<<<<<
 *                 if count_limit:
 *                     count_limit = False
 */
    }

    /* "parabam/chaser.pyx":983
 * 
 *                 os.remove(path)
 *             loner_object.close()             # <<<<<<<<<<<<<<
 *         gc.collect()
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_loner_object, __pyx_n_s_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 983, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_10 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 983, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "parabam/chaser.pyx":964
 * 
 *         count_limit = False
 *         for path in loner_info.paths:             # <<<<<<<<<<<<<<
 *             loner_object = pysam.AlignmentFile(path,"rb")
 *             bam_iterator = loner_object.fetch(until_eof=True)
 */
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "parabam/chaser.pyx":984
 *                 os.remove(path)
 *             loner_object.close()
 *         gc.collect()             # <<<<<<<<<<<<<<
 * 
 *     def __write_leftovers__(self,bam_iterator,fragment_leftovers,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_gc); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_collect); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_4 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "parabam/chaser.pyx":954
 *         return dict(filter( lambda tup : tup[1], iter(pairs.items()) ))
 * 
 *     def __read_generator__(self,loner_info,             # <<<<<<<<<<<<<<
 *                             second_pass=False,leftover_paths=None,
 *                             fragment_leftovers=False):
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("__read_generator__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":986
 *         gc.collect()
 * 
 *     def __write_leftovers__(self,bam_iterator,fragment_leftovers,             # <<<<<<<<<<<<<<
 *                                  loner_info,leftover_paths):
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_17MatchMakerHandler_12__write_leftovers__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_17MatchMakerHandler_12__write_leftovers__ = {"__write_leftovers__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_17MatchMakerHandler_12__write_leftovers__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_17MatchMakerHandler_12__write_leftovers__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_bam_iterator = 0;
  PyObject *__pyx_v_fragment_leftovers = 0;
  PyObject *__pyx_v_loner_info = 0;
  PyObject *__pyx_v_leftover_paths = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__write_leftovers__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_bam_iterator,&__pyx_n_s_fragment_leftovers,&__pyx_n_s_loner_info,&__pyx_n_s_leftover_paths,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bam_iterator)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__write_leftovers__", 1, 5, 5, 1); __PYX_ERR(0, 986, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fragment_leftovers)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__write_leftovers__", 1, 5, 5, 2); __PYX_ERR(0, 986, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loner_info)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__write_leftovers__", 1, 5, 5, 3); __PYX_ERR(0, 986, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_leftover_paths)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__write_leftovers__", 1, 5, 5, 4); __PYX_ERR(0, 986, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__write_leftovers__") < 0)) __PYX_ERR(0, 986, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_self = values[0];
    __pyx_v_bam_iterator = values[1];
    __pyx_v_fragment_leftovers = values[2];
    __pyx_v_loner_info = values[3];
    __pyx_v_leftover_paths = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__write_leftovers__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 986, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.MatchMakerHandler.__write_leftovers__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_17MatchMakerHandler_11__write_leftovers__(__pyx_self, __pyx_v_self, __pyx_v_bam_iterator, __pyx_v_fragment_leftovers, __pyx_v_loner_info, __pyx_v_leftover_paths);

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

static PyObject *__pyx_pf_7parabam_6chaser_17MatchMakerHandler_11__write_leftovers__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_bam_iterator, PyObject *__pyx_v_fragment_leftovers, PyObject *__pyx_v_loner_info, PyObject *__pyx_v_leftover_paths) {
  PyObject *__pyx_v_leftover_file = NULL;
  PyObject *__pyx_v_leftover_count = NULL;
  PyObject *__pyx_v_read = NULL;
  PyObject *__pyx_v_empty_leftover_path = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_t_9;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  __Pyx_RefNannySetupContext("__write_leftovers__", 0);

  /* "parabam/chaser.pyx":989
 *                                  loner_info,leftover_paths):
 * 
 *         leftover_file = self.__get_leftover_object__(\             # <<<<<<<<<<<<<<
 *                                         loner_info,len(leftover_paths))
 *         leftover_count = 0
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_leftover_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "parabam/chaser.pyx":990
 * 
 *         leftover_file = self.__get_leftover_object__(\
 *                                         loner_info,len(leftover_paths))             # <<<<<<<<<<<<<<
 *         leftover_count = 0
 *         for read in bam_iterator:
 */
  __pyx_t_3 = PyObject_Length(__pyx_v_leftover_paths); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 990, __pyx_L1_error)
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 990, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_loner_info, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 989, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_loner_info, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 989, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 989, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_INCREF(__pyx_v_loner_info);
    __Pyx_GIVEREF(__pyx_v_loner_info);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_loner_info);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 989, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_leftover_file = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":991
 *         leftover_file = self.__get_leftover_object__(\
 *                                         loner_info,len(leftover_paths))
 *         leftover_count = 0             # <<<<<<<<<<<<<<
 *         for read in bam_iterator:
 *             if fragment_leftovers and\
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_leftover_count = __pyx_int_0;

  /* "parabam/chaser.pyx":992
 *                                         loner_info,len(leftover_paths))
 *         leftover_count = 0
 *         for read in bam_iterator:             # <<<<<<<<<<<<<<
 *             if fragment_leftovers and\
 *                leftover_count > 0 and\
 */
  if (likely(PyList_CheckExact(__pyx_v_bam_iterator)) || PyTuple_CheckExact(__pyx_v_bam_iterator)) {
    __pyx_t_1 = __pyx_v_bam_iterator; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_bam_iterator); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 992, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 992, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 992, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 992, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 992, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 992, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_8(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 992, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_read, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "parabam/chaser.pyx":993
 *         leftover_count = 0
 *         for read in bam_iterator:
 *             if fragment_leftovers and\             # <<<<<<<<<<<<<<
 *                leftover_count > 0 and\
 *                leftover_count % 25000 == 0:
 */
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_fragment_leftovers); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 993, __pyx_L1_error)
    if (__pyx_t_10) {
    } else {
      __pyx_t_9 = __pyx_t_10;
      goto __pyx_L6_bool_binop_done;
    }

    /* "parabam/chaser.pyx":994
 *         for read in bam_iterator:
 *             if fragment_leftovers and\
 *                leftover_count > 0 and\             # <<<<<<<<<<<<<<
 *                leftover_count % 25000 == 0:
 * 
 */
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_leftover_count, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 994, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 994, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_10) {
    } else {
      __pyx_t_9 = __pyx_t_10;
      goto __pyx_L6_bool_binop_done;
    }

    /* "parabam/chaser.pyx":995
 *             if fragment_leftovers and\
 *                leftover_count > 0 and\
 *                leftover_count % 25000 == 0:             # <<<<<<<<<<<<<<
 * 
 *                 self.__add_to_leftover_paths__(leftover_file,
 */
    __pyx_t_2 = __Pyx_PyInt_RemainderObjC(__pyx_v_leftover_count, __pyx_int_25000, 0x61A8, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 995, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 995, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 995, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_9 = __pyx_t_10;
    __pyx_L6_bool_binop_done:;

    /* "parabam/chaser.pyx":993
 *         leftover_count = 0
 *         for read in bam_iterator:
 *             if fragment_leftovers and\             # <<<<<<<<<<<<<<
 *                leftover_count > 0 and\
 *                leftover_count % 25000 == 0:
 */
    if (__pyx_t_9) {

      /* "parabam/chaser.pyx":997
 *                leftover_count % 25000 == 0:
 * 
 *                 self.__add_to_leftover_paths__(leftover_file,             # <<<<<<<<<<<<<<
 *                                                leftover_paths)
 * 
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_add_to_leftover_paths); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 997, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);

      /* "parabam/chaser.pyx":998
 * 
 *                 self.__add_to_leftover_paths__(leftover_file,
 *                                                leftover_paths)             # <<<<<<<<<<<<<<
 * 
 *                 leftover_file = self.__get_leftover_object__(\
 */
      __pyx_t_4 = NULL;
      __pyx_t_6 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_6 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_leftover_file, __pyx_v_leftover_paths};
        __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 997, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_7);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_leftover_file, __pyx_v_leftover_paths};
        __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 997, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_7);
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 997, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (__pyx_t_4) {
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
        }
        __Pyx_INCREF(__pyx_v_leftover_file);
        __Pyx_GIVEREF(__pyx_v_leftover_file);
        PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_6, __pyx_v_leftover_file);
        __Pyx_INCREF(__pyx_v_leftover_paths);
        __Pyx_GIVEREF(__pyx_v_leftover_paths);
        PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_6, __pyx_v_leftover_paths);
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 997, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "parabam/chaser.pyx":1000
 *                                                leftover_paths)
 * 
 *                 leftover_file = self.__get_leftover_object__(\             # <<<<<<<<<<<<<<
 *                                         loner_info,len(leftover_paths))
 * 
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_leftover_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1000, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);

      /* "parabam/chaser.pyx":1001
 * 
 *                 leftover_file = self.__get_leftover_object__(\
 *                                         loner_info,len(leftover_paths))             # <<<<<<<<<<<<<<
 * 
 *             leftover_file.write(read)
 */
      __pyx_t_11 = PyObject_Length(__pyx_v_leftover_paths); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1001, __pyx_L1_error)
      __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1001, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = NULL;
      __pyx_t_6 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_6 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_loner_info, __pyx_t_5};
        __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1000, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_loner_info, __pyx_t_5};
        __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1000, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      {
        __pyx_t_12 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1000, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        if (__pyx_t_4) {
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_4); __pyx_t_4 = NULL;
        }
        __Pyx_INCREF(__pyx_v_loner_info);
        __Pyx_GIVEREF(__pyx_v_loner_info);
        PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_6, __pyx_v_loner_info);
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_6, __pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_12, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1000, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF_SET(__pyx_v_leftover_file, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "parabam/chaser.pyx":993
 *         leftover_count = 0
 *         for read in bam_iterator:
 *             if fragment_leftovers and\             # <<<<<<<<<<<<<<
 *                leftover_count > 0 and\
 *                leftover_count % 25000 == 0:
 */
    }

    /* "parabam/chaser.pyx":1003
 *                                         loner_info,len(leftover_paths))
 * 
 *             leftover_file.write(read)             # <<<<<<<<<<<<<<
 *             leftover_count += 1
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_leftover_file, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1003, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_12 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_12)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_12);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_7 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_12, __pyx_v_read) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_read);
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1003, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "parabam/chaser.pyx":1004
 * 
 *             leftover_file.write(read)
 *             leftover_count += 1             # <<<<<<<<<<<<<<
 * 
 *         if leftover_count > 0:
 */
    __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_v_leftover_count, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1004, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF_SET(__pyx_v_leftover_count, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "parabam/chaser.pyx":992
 *                                         loner_info,len(leftover_paths))
 *         leftover_count = 0
 *         for read in bam_iterator:             # <<<<<<<<<<<<<<
 *             if fragment_leftovers and\
 *                leftover_count > 0 and\
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":1006
 *             leftover_count += 1
 * 
 *         if leftover_count > 0:             # <<<<<<<<<<<<<<
 *             self.__add_to_leftover_paths__(leftover_file,
 *                                            leftover_paths)
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_leftover_count, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1006, __pyx_L1_error)
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1006, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_9) {

    /* "parabam/chaser.pyx":1007
 * 
 *         if leftover_count > 0:
 *             self.__add_to_leftover_paths__(leftover_file,             # <<<<<<<<<<<<<<
 *                                            leftover_paths)
 *         else:
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_add_to_leftover_paths); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1007, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);

    /* "parabam/chaser.pyx":1008
 *         if leftover_count > 0:
 *             self.__add_to_leftover_paths__(leftover_file,
 *                                            leftover_paths)             # <<<<<<<<<<<<<<
 *         else:
 *             empty_leftover_path = leftover_file.filename
 */
    __pyx_t_2 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_leftover_file, __pyx_v_leftover_paths};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1007, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_leftover_file, __pyx_v_leftover_paths};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1007, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_12 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1007, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      if (__pyx_t_2) {
        __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_2); __pyx_t_2 = NULL;
      }
      __Pyx_INCREF(__pyx_v_leftover_file);
      __Pyx_GIVEREF(__pyx_v_leftover_file);
      PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_6, __pyx_v_leftover_file);
      __Pyx_INCREF(__pyx_v_leftover_paths);
      __Pyx_GIVEREF(__pyx_v_leftover_paths);
      PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_6, __pyx_v_leftover_paths);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1007, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":1006
 *             leftover_count += 1
 * 
 *         if leftover_count > 0:             # <<<<<<<<<<<<<<
 *             self.__add_to_leftover_paths__(leftover_file,
 *                                            leftover_paths)
 */
    goto __pyx_L9;
  }

  /* "parabam/chaser.pyx":1010
 *                                            leftover_paths)
 *         else:
 *             empty_leftover_path = leftover_file.filename             # <<<<<<<<<<<<<<
 *             leftover_file.close()
 *             os.remove(empty_leftover_path)
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_leftover_file, __pyx_n_s_filename); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1010, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_empty_leftover_path = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":1011
 *         else:
 *             empty_leftover_path = leftover_file.filename
 *             leftover_file.close()             # <<<<<<<<<<<<<<
 *             os.remove(empty_leftover_path)
 * 
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_leftover_file, __pyx_n_s_close); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1011, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_12 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_12)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_12);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1011, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "parabam/chaser.pyx":1012
 *             empty_leftover_path = leftover_file.filename
 *             leftover_file.close()
 *             os.remove(empty_leftover_path)             # <<<<<<<<<<<<<<
 * 
 *     def __add_to_leftover_paths__(self,leftover_file,leftover_paths):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_os); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1012, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_remove); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1012, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_12);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_12, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_7, __pyx_v_empty_leftover_path) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_empty_leftover_path);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1012, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L9:;

  /* "parabam/chaser.pyx":986
 *         gc.collect()
 * 
 *     def __write_leftovers__(self,bam_iterator,fragment_leftovers,             # <<<<<<<<<<<<<<
 *                                  loner_info,leftover_paths):
 * 
 */

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("parabam.chaser.MatchMakerHandler.__write_leftovers__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_leftover_file);
  __Pyx_XDECREF(__pyx_v_leftover_count);
  __Pyx_XDECREF(__pyx_v_read);
  __Pyx_XDECREF(__pyx_v_empty_leftover_path);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":1014
 *             os.remove(empty_leftover_path)
 * 
 *     def __add_to_leftover_paths__(self,leftover_file,leftover_paths):             # <<<<<<<<<<<<<<
 *         leftover_paths.append(leftover_file.filename)
 *         leftover_file.close()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_17MatchMakerHandler_14__add_to_leftover_paths__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_17MatchMakerHandler_14__add_to_leftover_paths__ = {"__add_to_leftover_paths__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_17MatchMakerHandler_14__add_to_leftover_paths__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_17MatchMakerHandler_14__add_to_leftover_paths__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_leftover_file = 0;
  PyObject *__pyx_v_leftover_paths = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__add_to_leftover_paths__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_leftover_file,&__pyx_n_s_leftover_paths,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_leftover_file)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__add_to_leftover_paths__", 1, 3, 3, 1); __PYX_ERR(0, 1014, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_leftover_paths)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__add_to_leftover_paths__", 1, 3, 3, 2); __PYX_ERR(0, 1014, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__add_to_leftover_paths__") < 0)) __PYX_ERR(0, 1014, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_leftover_file = values[1];
    __pyx_v_leftover_paths = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__add_to_leftover_paths__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1014, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.MatchMakerHandler.__add_to_leftover_paths__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_17MatchMakerHandler_13__add_to_leftover_paths__(__pyx_self, __pyx_v_self, __pyx_v_leftover_file, __pyx_v_leftover_paths);

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

static PyObject *__pyx_pf_7parabam_6chaser_17MatchMakerHandler_13__add_to_leftover_paths__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_leftover_file, PyObject *__pyx_v_leftover_paths) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("__add_to_leftover_paths__", 0);

  /* "parabam/chaser.pyx":1015
 * 
 *     def __add_to_leftover_paths__(self,leftover_file,leftover_paths):
 *         leftover_paths.append(leftover_file.filename)             # <<<<<<<<<<<<<<
 *         leftover_file.close()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_leftover_file, __pyx_n_s_filename); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Append(__pyx_v_leftover_paths, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1015, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":1016
 *     def __add_to_leftover_paths__(self,leftover_file,leftover_paths):
 *         leftover_paths.append(leftover_file.filename)
 *         leftover_file.close()             # <<<<<<<<<<<<<<
 * 
 *     def __launch_child_task__(self,pairs):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_leftover_file, __pyx_n_s_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":1014
 *             os.remove(empty_leftover_path)
 * 
 *     def __add_to_leftover_paths__(self,leftover_file,leftover_paths):             # <<<<<<<<<<<<<<
 *         leftover_paths.append(leftover_file.filename)
 *         leftover_file.close()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("parabam.chaser.MatchMakerHandler.__add_to_leftover_paths__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":1018
 *         leftover_file.close()
 * 
 *     def __launch_child_task__(self,pairs):             # <<<<<<<<<<<<<<
 *         child_pack = self._child_pack
 *         results = child_pack["chaser_task"].handle_pair_dict(pairs,\
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_17MatchMakerHandler_16__launch_child_task__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_17MatchMakerHandler_16__launch_child_task__ = {"__launch_child_task__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_17MatchMakerHandler_16__launch_child_task__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_17MatchMakerHandler_16__launch_child_task__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_pairs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__launch_child_task__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_pairs,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pairs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__launch_child_task__", 1, 2, 2, 1); __PYX_ERR(0, 1018, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__launch_child_task__") < 0)) __PYX_ERR(0, 1018, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_pairs = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__launch_child_task__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1018, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.MatchMakerHandler.__launch_child_task__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_17MatchMakerHandler_15__launch_child_task__(__pyx_self, __pyx_v_self, __pyx_v_pairs);

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

static PyObject *__pyx_pf_7parabam_6chaser_17MatchMakerHandler_15__launch_child_task__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_pairs) {
  PyObject *__pyx_v_child_pack = NULL;
  PyObject *__pyx_v_results = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  __Pyx_RefNannySetupContext("__launch_child_task__", 0);

  /* "parabam/chaser.pyx":1019
 * 
 *     def __launch_child_task__(self,pairs):
 *         child_pack = self._child_pack             # <<<<<<<<<<<<<<
 *         results = child_pack["chaser_task"].handle_pair_dict(pairs,\
 *                                     int("%d%d" % (self.pid,self._record,)))
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_child_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_child_pack = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":1020
 *     def __launch_child_task__(self,pairs):
 *         child_pack = self._child_pack
 *         results = child_pack["chaser_task"].handle_pair_dict(pairs,\             # <<<<<<<<<<<<<<
 *                                     int("%d%d" % (self.pid,self._record,)))
 *         child_pack["queue"].put(parabam.core.Package(results=results))
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_child_pack, __pyx_n_s_chaser_task); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_handle_pair_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "parabam/chaser.pyx":1021
 *         child_pack = self._child_pack
 *         results = child_pack["chaser_task"].handle_pair_dict(pairs,\
 *                                     int("%d%d" % (self.pid,self._record,)))             # <<<<<<<<<<<<<<
 *         child_pack["queue"].put(parabam.core.Package(results=results))
 *         self._record += 1
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_record); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
  __pyx_t_2 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_d_d, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_pairs, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1020, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_pairs, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1020, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_2 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1020, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(__pyx_v_pairs);
    __Pyx_GIVEREF(__pyx_v_pairs);
    PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_6, __pyx_v_pairs);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_6, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1020, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_results = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":1022
 *         results = child_pack["chaser_task"].handle_pair_dict(pairs,\
 *                                     int("%d%d" % (self.pid,self._record,)))
 *         child_pack["queue"].put(parabam.core.Package(results=results))             # <<<<<<<<<<<<<<
 *         self._record += 1
 *         return len(pairs)
 */
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_child_pack, __pyx_n_s_queue); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_put); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_parabam); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_core); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_Package); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_results, __pyx_v_results) < 0) __PYX_ERR(0, 1022, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":1023
 *                                     int("%d%d" % (self.pid,self._record,)))
 *         child_pack["queue"].put(parabam.core.Package(results=results))
 *         self._record += 1             # <<<<<<<<<<<<<<
 *         return len(pairs)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_record); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_record, __pyx_t_2) < 0) __PYX_ERR(0, 1023, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "parabam/chaser.pyx":1024
 *         child_pack["queue"].put(parabam.core.Package(results=results))
 *         self._record += 1
 *         return len(pairs)             # <<<<<<<<<<<<<<
 * 
 *     def __get_leftover_object__(self,loner_info,unique):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = PyObject_Length(__pyx_v_pairs); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1024, __pyx_L1_error)
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1024, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "parabam/chaser.pyx":1018
 *         leftover_file.close()
 * 
 *     def __launch_child_task__(self,pairs):             # <<<<<<<<<<<<<<
 *         child_pack = self._child_pack
 *         results = child_pack["chaser_task"].handle_pair_dict(pairs,\
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("parabam.chaser.MatchMakerHandler.__launch_child_task__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_child_pack);
  __Pyx_XDECREF(__pyx_v_results);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":1026
 *         return len(pairs)
 * 
 *     def __get_leftover_object__(self,loner_info,unique):             # <<<<<<<<<<<<<<
 *         path = self.__get_loner_temp_path__(loner_info.loner_type,\
 *                                         loner_info.level,"lftovr%d" % (unique,))
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_17MatchMakerHandler_18__get_leftover_object__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_17MatchMakerHandler_18__get_leftover_object__ = {"__get_leftover_object__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_17MatchMakerHandler_18__get_leftover_object__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_17MatchMakerHandler_18__get_leftover_object__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_loner_info = 0;
  PyObject *__pyx_v_unique = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get_leftover_object__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_loner_info,&__pyx_n_s_unique,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loner_info)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__get_leftover_object__", 1, 3, 3, 1); __PYX_ERR(0, 1026, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_unique)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__get_leftover_object__", 1, 3, 3, 2); __PYX_ERR(0, 1026, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__get_leftover_object__") < 0)) __PYX_ERR(0, 1026, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_loner_info = values[1];
    __pyx_v_unique = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__get_leftover_object__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1026, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.MatchMakerHandler.__get_leftover_object__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_17MatchMakerHandler_17__get_leftover_object__(__pyx_self, __pyx_v_self, __pyx_v_loner_info, __pyx_v_unique);

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

static PyObject *__pyx_pf_7parabam_6chaser_17MatchMakerHandler_17__get_leftover_object__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_loner_info, PyObject *__pyx_v_unique) {
  PyObject *__pyx_v_path = NULL;
  PyObject *__pyx_v_leftover = 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;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("__get_leftover_object__", 0);

  /* "parabam/chaser.pyx":1027
 * 
 *     def __get_leftover_object__(self,loner_info,unique):
 *         path = self.__get_loner_temp_path__(loner_info.loner_type,\             # <<<<<<<<<<<<<<
 *                                         loner_info.level,"lftovr%d" % (unique,))
 *         leftover = pysam.AlignmentFile(path,"wb",header=self._header)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_loner_temp_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_loner_info, __pyx_n_s_loner_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "parabam/chaser.pyx":1028
 *     def __get_leftover_object__(self,loner_info,unique):
 *         path = self.__get_loner_temp_path__(loner_info.loner_type,\
 *                                         loner_info.level,"lftovr%d" % (unique,))             # <<<<<<<<<<<<<<
 *         leftover = pysam.AlignmentFile(path,"wb",header=self._header)
 *         return leftover
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_loner_info, __pyx_n_s_level); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_unique);
  __Pyx_GIVEREF(__pyx_v_unique);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_unique);
  __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_lftovr_d, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_3, __pyx_t_4, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1027, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_3, __pyx_t_4, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1027, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1027, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_6);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_6 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1027, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_path = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":1029
 *         path = self.__get_loner_temp_path__(loner_info.loner_type,\
 *                                         loner_info.level,"lftovr%d" % (unique,))
 *         leftover = pysam.AlignmentFile(path,"wb",header=self._header)             # <<<<<<<<<<<<<<
 *         return leftover
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pysam); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_AlignmentFile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_path);
  __Pyx_GIVEREF(__pyx_v_path);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_path);
  __Pyx_INCREF(__pyx_n_s_wb);
  __Pyx_GIVEREF(__pyx_n_s_wb);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_wb);
  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_header_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_header, __pyx_t_6) < 0) __PYX_ERR(0, 1029, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_v_leftover = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "parabam/chaser.pyx":1030
 *                                         loner_info.level,"lftovr%d" % (unique,))
 *         leftover = pysam.AlignmentFile(path,"wb",header=self._header)
 *         return leftover             # <<<<<<<<<<<<<<
 * 
 *     def __get_loner_object__(self,path):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_leftover);
  __pyx_r = __pyx_v_leftover;
  goto __pyx_L0;

  /* "parabam/chaser.pyx":1026
 *         return len(pairs)
 * 
 *     def __get_leftover_object__(self,loner_info,unique):             # <<<<<<<<<<<<<<
 *         path = self.__get_loner_temp_path__(loner_info.loner_type,\
 *                                         loner_info.level,"lftovr%d" % (unique,))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("parabam.chaser.MatchMakerHandler.__get_leftover_object__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_path);
  __Pyx_XDECREF(__pyx_v_leftover);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "parabam/chaser.pyx":1032
 *         return leftover
 * 
 *     def __get_loner_object__(self,path):             # <<<<<<<<<<<<<<
 *         loner_object = pysam.AlignmentFile(path,"wb",header=self._header)
 *         return loner_object
 */

/* Python wrapper */
static PyObject *__pyx_pw_7parabam_6chaser_17MatchMakerHandler_20__get_loner_object__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7parabam_6chaser_17MatchMakerHandler_20__get_loner_object__ = {"__get_loner_object__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7parabam_6chaser_17MatchMakerHandler_20__get_loner_object__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7parabam_6chaser_17MatchMakerHandler_20__get_loner_object__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_path = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get_loner_object__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_path,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_path)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__get_loner_object__", 1, 2, 2, 1); __PYX_ERR(0, 1032, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__get_loner_object__") < 0)) __PYX_ERR(0, 1032, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_path = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__get_loner_object__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1032, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("parabam.chaser.MatchMakerHandler.__get_loner_object__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7parabam_6chaser_17MatchMakerHandler_19__get_loner_object__(__pyx_self, __pyx_v_self, __pyx_v_path);

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

static PyObject *__pyx_pf_7parabam_6chaser_17MatchMakerHandler_19__get_loner_object__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_path) {
  PyObject *__pyx_v_loner_object = 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;
  __Pyx_RefNannySetupContext("__get_loner_object__", 0);

  /* "parabam/chaser.pyx":1033
 * 
 *     def __get_loner_object__(self,path):
 *         loner_object = pysam.AlignmentFile(path,"wb",header=self._header)             # <<<<<<<<<<<<<<
 *         return loner_object
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pysam); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_AlignmentFile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_path);
  __Pyx_GIVEREF(__pyx_v_path);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_path);
  __Pyx_INCREF(__pyx_n_s_wb);
  __Pyx_GIVEREF(__pyx_n_s_wb);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_wb);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_header_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_header, __pyx_t_4) < 0) __PYX_ERR(0, 1033, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_loner_object = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "parabam/chaser.pyx":1034
 *     def __get_loner_object__(self,path):
 *         loner_object = pysam.AlignmentFile(path,"wb",header=self._header)
 *         return loner_object             # <<<<<<<<<<<<<<
 * 
 * #.....happily ever after
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_loner_object);
  __pyx_r = __pyx_v_loner_object;
  goto __pyx_L0;

  /* "parabam/chaser.pyx":1032
 *         return leftover
 * 
 *     def __get_loner_object__(self,path):             # <<<<<<<<<<<<<<
 *         loner_object = pysam.AlignmentFile(path,"wb",header=self._header)
 *         return loner_object
 */

  /* 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("parabam.chaser.MatchMakerHandler.__get_loner_object__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_loner_object);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_7parabam_6chaser___pyx_scope_struct____init__ *__pyx_freelist_7parabam_6chaser___pyx_scope_struct____init__[8];
static int __pyx_freecount_7parabam_6chaser___pyx_scope_struct____init__ = 0;

static PyObject *__pyx_tp_new_7parabam_6chaser___pyx_scope_struct____init__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_7parabam_6chaser___pyx_scope_struct____init__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_7parabam_6chaser___pyx_scope_struct____init__)))) {
    o = (PyObject*)__pyx_freelist_7parabam_6chaser___pyx_scope_struct____init__[--__pyx_freecount_7parabam_6chaser___pyx_scope_struct____init__];
    memset(o, 0, sizeof(struct __pyx_obj_7parabam_6chaser___pyx_scope_struct____init__));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_7parabam_6chaser___pyx_scope_struct____init__(PyObject *o) {
  struct __pyx_obj_7parabam_6chaser___pyx_scope_struct____init__ *p = (struct __pyx_obj_7parabam_6chaser___pyx_scope_struct____init__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_RuleTask);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_7parabam_6chaser___pyx_scope_struct____init__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7parabam_6chaser___pyx_scope_struct____init__)))) {
    __pyx_freelist_7parabam_6chaser___pyx_scope_struct____init__[__pyx_freecount_7parabam_6chaser___pyx_scope_struct____init__++] = ((struct __pyx_obj_7parabam_6chaser___pyx_scope_struct____init__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_7parabam_6chaser___pyx_scope_struct____init__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7parabam_6chaser___pyx_scope_struct____init__ *p = (struct __pyx_obj_7parabam_6chaser___pyx_scope_struct____init__ *)o;
  if (p->__pyx_v_RuleTask) {
    e = (*v)(p->__pyx_v_RuleTask, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7parabam_6chaser___pyx_scope_struct____init__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7parabam_6chaser___pyx_scope_struct____init__ *p = (struct __pyx_obj_7parabam_6chaser___pyx_scope_struct____init__ *)o;
  tmp = ((PyObject*)p->__pyx_v_RuleTask);
  p->__pyx_v_RuleTask = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_7parabam_6chaser___pyx_scope_struct____init__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "parabam.chaser.__pyx_scope_struct____init__", /*tp_name*/
  sizeof(struct __pyx_obj_7parabam_6chaser___pyx_scope_struct____init__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7parabam_6chaser___pyx_scope_struct____init__, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7parabam_6chaser___pyx_scope_struct____init__, /*tp_traverse*/
  __pyx_tp_clear_7parabam_6chaser___pyx_scope_struct____init__, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7parabam_6chaser___pyx_scope_struct____init__, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_1___read_generator__ *__pyx_freelist_7parabam_6chaser___pyx_scope_struct_1___read_generator__[8];
static int __pyx_freecount_7parabam_6chaser___pyx_scope_struct_1___read_generator__ = 0;

static PyObject *__pyx_tp_new_7parabam_6chaser___pyx_scope_struct_1___read_generator__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_7parabam_6chaser___pyx_scope_struct_1___read_generator__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_1___read_generator__)))) {
    o = (PyObject*)__pyx_freelist_7parabam_6chaser___pyx_scope_struct_1___read_generator__[--__pyx_freecount_7parabam_6chaser___pyx_scope_struct_1___read_generator__];
    memset(o, 0, sizeof(struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_1___read_generator__));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_7parabam_6chaser___pyx_scope_struct_1___read_generator__(PyObject *o) {
  struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_1___read_generator__ *p = (struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_1___read_generator__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_loner_object);
  Py_CLEAR(p->__pyx_v_path);
  Py_CLEAR(p->__pyx_v_read);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_unsorted_paths);
  Py_CLEAR(p->__pyx_t_0);
  Py_CLEAR(p->__pyx_t_3);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_7parabam_6chaser___pyx_scope_struct_1___read_generator__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_1___read_generator__)))) {
    __pyx_freelist_7parabam_6chaser___pyx_scope_struct_1___read_generator__[__pyx_freecount_7parabam_6chaser___pyx_scope_struct_1___read_generator__++] = ((struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_1___read_generator__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_7parabam_6chaser___pyx_scope_struct_1___read_generator__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_1___read_generator__ *p = (struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_1___read_generator__ *)o;
  if (p->__pyx_v_loner_object) {
    e = (*v)(p->__pyx_v_loner_object, a); if (e) return e;
  }
  if (p->__pyx_v_path) {
    e = (*v)(p->__pyx_v_path, a); if (e) return e;
  }
  if (p->__pyx_v_read) {
    e = (*v)(p->__pyx_v_read, a); if (e) return e;
  }
  if (p->__pyx_v_self) {
    e = (*v)(p->__pyx_v_self, a); if (e) return e;
  }
  if (p->__pyx_v_unsorted_paths) {
    e = (*v)(p->__pyx_v_unsorted_paths, a); if (e) return e;
  }
  if (p->__pyx_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  if (p->__pyx_t_3) {
    e = (*v)(p->__pyx_t_3, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_7parabam_6chaser___pyx_scope_struct_1___read_generator__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "parabam.chaser.__pyx_scope_struct_1___read_generator__", /*tp_name*/
  sizeof(struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_1___read_generator__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7parabam_6chaser___pyx_scope_struct_1___read_generator__, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7parabam_6chaser___pyx_scope_struct_1___read_generator__, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7parabam_6chaser___pyx_scope_struct_1___read_generator__, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__ *__pyx_freelist_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__[8];
static int __pyx_freecount_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__ = 0;

static PyObject *__pyx_tp_new_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__)))) {
    o = (PyObject*)__pyx_freelist_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__[--__pyx_freecount_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__];
    memset(o, 0, sizeof(struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__(PyObject *o) {
  struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__ *p = (struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_bins);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__)))) {
    __pyx_freelist_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__[__pyx_freecount_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__++] = ((struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__ *p = (struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__ *)o;
  if (p->__pyx_v_bins) {
    e = (*v)(p->__pyx_v_bins, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__ *p = (struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__ *)o;
  tmp = ((PyObject*)p->__pyx_v_bins);
  p->__pyx_v_bins = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "parabam.chaser.__pyx_scope_struct_2___get_reference_id_name__", /*tp_name*/
  sizeof(struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__, /*tp_traverse*/
  __pyx_tp_clear_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_3___read_generator__ *__pyx_freelist_7parabam_6chaser___pyx_scope_struct_3___read_generator__[8];
static int __pyx_freecount_7parabam_6chaser___pyx_scope_struct_3___read_generator__ = 0;

static PyObject *__pyx_tp_new_7parabam_6chaser___pyx_scope_struct_3___read_generator__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_7parabam_6chaser___pyx_scope_struct_3___read_generator__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_3___read_generator__)))) {
    o = (PyObject*)__pyx_freelist_7parabam_6chaser___pyx_scope_struct_3___read_generator__[--__pyx_freecount_7parabam_6chaser___pyx_scope_struct_3___read_generator__];
    memset(o, 0, sizeof(struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_3___read_generator__));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_7parabam_6chaser___pyx_scope_struct_3___read_generator__(PyObject *o) {
  struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_3___read_generator__ *p = (struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_3___read_generator__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_bam_iterator);
  Py_CLEAR(p->__pyx_v_count);
  Py_CLEAR(p->__pyx_v_fragment_leftovers);
  Py_CLEAR(p->__pyx_v_i);
  Py_CLEAR(p->__pyx_v_leftover_paths);
  Py_CLEAR(p->__pyx_v_loner_info);
  Py_CLEAR(p->__pyx_v_loner_object);
  Py_CLEAR(p->__pyx_v_path);
  Py_CLEAR(p->__pyx_v_read);
  Py_CLEAR(p->__pyx_v_second_pass);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_t_0);
  Py_CLEAR(p->__pyx_t_3);
  Py_CLEAR(p->__pyx_t_4);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_7parabam_6chaser___pyx_scope_struct_3___read_generator__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_3___read_generator__)))) {
    __pyx_freelist_7parabam_6chaser___pyx_scope_struct_3___read_generator__[__pyx_freecount_7parabam_6chaser___pyx_scope_struct_3___read_generator__++] = ((struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_3___read_generator__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_7parabam_6chaser___pyx_scope_struct_3___read_generator__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_3___read_generator__ *p = (struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_3___read_generator__ *)o;
  if (p->__pyx_v_bam_iterator) {
    e = (*v)(p->__pyx_v_bam_iterator, a); if (e) return e;
  }
  if (p->__pyx_v_count) {
    e = (*v)(p->__pyx_v_count, a); if (e) return e;
  }
  if (p->__pyx_v_fragment_leftovers) {
    e = (*v)(p->__pyx_v_fragment_leftovers, a); if (e) return e;
  }
  if (p->__pyx_v_i) {
    e = (*v)(p->__pyx_v_i, a); if (e) return e;
  }
  if (p->__pyx_v_leftover_paths) {
    e = (*v)(p->__pyx_v_leftover_paths, a); if (e) return e;
  }
  if (p->__pyx_v_loner_info) {
    e = (*v)(p->__pyx_v_loner_info, a); if (e) return e;
  }
  if (p->__pyx_v_loner_object) {
    e = (*v)(p->__pyx_v_loner_object, a); if (e) return e;
  }
  if (p->__pyx_v_path) {
    e = (*v)(p->__pyx_v_path, a); if (e) return e;
  }
  if (p->__pyx_v_read) {
    e = (*v)(p->__pyx_v_read, a); if (e) return e;
  }
  if (p->__pyx_v_second_pass) {
    e = (*v)(p->__pyx_v_second_pass, a); if (e) return e;
  }
  if (p->__pyx_v_self) {
    e = (*v)(p->__pyx_v_self, a); if (e) return e;
  }
  if (p->__pyx_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  if (p->__pyx_t_3) {
    e = (*v)(p->__pyx_t_3, a); if (e) return e;
  }
  if (p->__pyx_t_4) {
    e = (*v)(p->__pyx_t_4, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_7parabam_6chaser___pyx_scope_struct_3___read_generator__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "parabam.chaser.__pyx_scope_struct_3___read_generator__", /*tp_name*/
  sizeof(struct __pyx_obj_7parabam_6chaser___pyx_scope_struct_3___read_generator__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7parabam_6chaser___pyx_scope_struct_3___read_generator__, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7parabam_6chaser___pyx_scope_struct_3___read_generator__, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7parabam_6chaser___pyx_scope_struct_3___read_generator__, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec_chaser(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_chaser},
  {0, NULL}
};
#endif

static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    "chaser",
    0, /* m_doc */
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    0, /* m_size */
  #else
    -1, /* m_size */
  #endif
    __pyx_methods /* m_methods */,
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    __pyx_moduledef_slots, /* m_slots */
  #else
    NULL, /* m_reload */
  #endif
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
    #define CYTHON_SMALL_CODE __attribute__((cold))
#else
    #define CYTHON_SMALL_CODE
#endif
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_n_s_AlignmentFile, __pyx_k_AlignmentFile, sizeof(__pyx_k_AlignmentFile), 0, 0, 1, 1},
  {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1},
  {&__pyx_n_s_ChaserHandler, __pyx_k_ChaserHandler, sizeof(__pyx_k_ChaserHandler), 0, 0, 1, 1},
  {&__pyx_n_s_ChaserHandler___get_loner_temp_p, __pyx_k_ChaserHandler___get_loner_temp_p, sizeof(__pyx_k_ChaserHandler___get_loner_temp_p), 0, 0, 1, 1},
  {&__pyx_n_s_ChaserHandler___init, __pyx_k_ChaserHandler___init, sizeof(__pyx_k_ChaserHandler___init), 0, 0, 1, 1},
  {&__pyx_n_s_ChaserResults, __pyx_k_ChaserResults, sizeof(__pyx_k_ChaserResults), 0, 0, 1, 1},
  {&__pyx_n_s_ChaserResults___init, __pyx_k_ChaserResults___init, sizeof(__pyx_k_ChaserResults___init), 0, 0, 1, 1},
  {&__pyx_n_s_ChaserTask, __pyx_k_ChaserTask, sizeof(__pyx_k_ChaserTask), 0, 0, 1, 1},
  {&__pyx_n_s_ChaserTask___init, __pyx_k_ChaserTask___init, sizeof(__pyx_k_ChaserTask___init), 0, 0, 1, 1},
  {&__pyx_n_s_ChaserTask_run, __pyx_k_ChaserTask_run, sizeof(__pyx_k_ChaserTask_run), 0, 0, 1, 1},
  {&__pyx_kp_s_Chaser_PAUSE_SENT, __pyx_k_Chaser_PAUSE_SENT, sizeof(__pyx_k_Chaser_PAUSE_SENT), 0, 0, 1, 0},
  {&__pyx_kp_s_Chaser_RECEIVED_ACK, __pyx_k_Chaser_RECEIVED_ACK, sizeof(__pyx_k_Chaser_RECEIVED_ACK), 0, 0, 1, 0},
  {&__pyx_kp_s_Chaser_UNPAUSE_SENT, __pyx_k_Chaser_UNPAUSE_SENT, sizeof(__pyx_k_Chaser_UNPAUSE_SENT), 0, 0, 1, 0},
  {&__pyx_kp_s_Chaser_UN_PAUSE_BOOMERANG, __pyx_k_Chaser_UN_PAUSE_BOOMERANG, sizeof(__pyx_k_Chaser_UN_PAUSE_BOOMERANG), 0, 0, 1, 0},
  {&__pyx_kp_s_Chaser_WAITNG_FOR_ACK, __pyx_k_Chaser_WAITNG_FOR_ACK, sizeof(__pyx_k_Chaser_WAITNG_FOR_ACK), 0, 0, 1, 0},
  {&__pyx_n_s_Counter, __pyx_k_Counter, sizeof(__pyx_k_Counter), 0, 0, 1, 1},
  {&__pyx_n_s_DestroyPackage, __pyx_k_DestroyPackage, sizeof(__pyx_k_DestroyPackage), 0, 0, 1, 1},
  {&__pyx_n_s_Empty, __pyx_k_Empty, sizeof(__pyx_k_Empty), 0, 0, 1, 1},
  {&__pyx_kp_s_Error, __pyx_k_Error, sizeof(__pyx_k_Error), 0, 0, 1, 0},
  {&__pyx_kp_s_FINISHED, __pyx_k_FINISHED, sizeof(__pyx_k_FINISHED), 0, 0, 1, 0},
  {&__pyx_kp_s_Fatal_Error_Process_communicati, __pyx_k_Fatal_Error_Process_communicati, sizeof(__pyx_k_Fatal_Error_Process_communicati), 0, 0, 1, 0},
  {&__pyx_n_s_Handler, __pyx_k_Handler, sizeof(__pyx_k_Handler), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___add_post_destory_chase, __pyx_k_Handler___add_post_destory_chase, sizeof(__pyx_k_Handler___add_post_destory_chase), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___add_to_pyramid, __pyx_k_Handler___add_to_pyramid, sizeof(__pyx_k_Handler___add_to_pyramid), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___clear_subpyramid, __pyx_k_Handler___clear_subpyramid, sizeof(__pyx_k_Handler___clear_subpyramid), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___create_chaser_tasks, __pyx_k_Handler___create_chaser_tasks, sizeof(__pyx_k_Handler___create_chaser_tasks), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___fatal_check, __pyx_k_Handler___fatal_check, sizeof(__pyx_k_Handler___fatal_check), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___finish_test, __pyx_k_Handler___finish_test, sizeof(__pyx_k_Handler___finish_test), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___get_chrom_bins, __pyx_k_Handler___get_chrom_bins, sizeof(__pyx_k_Handler___get_chrom_bins), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___get_chrom_bins___local, __pyx_k_Handler___get_chrom_bins___local, sizeof(__pyx_k_Handler___get_chrom_bins___local), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___get_paths, __pyx_k_Handler___get_paths, sizeof(__pyx_k_Handler___get_paths), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___get_task_size, __pyx_k_Handler___get_task_size, sizeof(__pyx_k_Handler___get_task_size), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___handle_match_maker, __pyx_k_Handler___handle_match_maker, sizeof(__pyx_k_Handler___handle_match_maker), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___handle_origin_task, __pyx_k_Handler___handle_origin_task, sizeof(__pyx_k_Handler___handle_origin_task), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___handle_primary_task, __pyx_k_Handler___handle_primary_task, sizeof(__pyx_k_Handler___handle_primary_task), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___handler_exit, __pyx_k_Handler___handler_exit, sizeof(__pyx_k_Handler___handler_exit), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___idle_routine, __pyx_k_Handler___idle_routine, sizeof(__pyx_k_Handler___idle_routine), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___init, __pyx_k_Handler___init, sizeof(__pyx_k_Handler___init), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___init___locals_RuleTask, __pyx_k_Handler___init___locals_RuleTask, sizeof(__pyx_k_Handler___init___locals_RuleTask), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___init___locals_RuleTask_2, __pyx_k_Handler___init___locals_RuleTask_2, sizeof(__pyx_k_Handler___init___locals_RuleTask_2), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___init___locals_RuleTask_3, __pyx_k_Handler___init___locals_RuleTask_3, sizeof(__pyx_k_Handler___init___locals_RuleTask_3), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___init___locals_RuleTask_4, __pyx_k_Handler___init___locals_RuleTask_4, sizeof(__pyx_k_Handler___init___locals_RuleTask_4), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___init___locals_RuleTask_5, __pyx_k_Handler___init___locals_RuleTask_5, sizeof(__pyx_k_Handler___init___locals_RuleTask_5), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___init___locals_lambda, __pyx_k_Handler___init___locals_lambda, sizeof(__pyx_k_Handler___init___locals_lambda), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___instalise_loner_pyrami, __pyx_k_Handler___instalise_loner_pyrami, sizeof(__pyx_k_Handler___instalise_loner_pyrami), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___instalise_primary_stor, __pyx_k_Handler___instalise_primary_stor, sizeof(__pyx_k_Handler___instalise_primary_stor), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___is_queue_empty, __pyx_k_Handler___is_queue_empty, sizeof(__pyx_k_Handler___is_queue_empty), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___new_package_action, __pyx_k_Handler___new_package_action, sizeof(__pyx_k_Handler___new_package_action), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___pause_debug, __pyx_k_Handler___pause_debug, sizeof(__pyx_k_Handler___pause_debug), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___pause_monitor, __pyx_k_Handler___pause_monitor, sizeof(__pyx_k_Handler___pause_monitor), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___periodic_action, __pyx_k_Handler___periodic_action, sizeof(__pyx_k_Handler___periodic_action), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___post_destroy_report, __pyx_k_Handler___post_destroy_report, sizeof(__pyx_k_Handler___post_destroy_report), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___print_debug, __pyx_k_Handler___print_debug, sizeof(__pyx_k_Handler___print_debug), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___pyramid_is_empty, __pyx_k_Handler___pyramid_is_empty, sizeof(__pyx_k_Handler___pyramid_is_empty), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___remove_from_pyramid, __pyx_k_Handler___remove_from_pyramid, sizeof(__pyx_k_Handler___remove_from_pyramid), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___request_fragment_outpu, __pyx_k_Handler___request_fragment_outpu, sizeof(__pyx_k_Handler___request_fragment_outpu), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___save_purgatory_loners, __pyx_k_Handler___save_purgatory_loners, sizeof(__pyx_k_Handler___save_purgatory_loners), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___set_new_stale_thresh, __pyx_k_Handler___set_new_stale_thresh, sizeof(__pyx_k_Handler___set_new_stale_thresh), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___start_job, __pyx_k_Handler___start_job, sizeof(__pyx_k_Handler___start_job), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___start_matchmaker_task, __pyx_k_Handler___start_matchmaker_task, sizeof(__pyx_k_Handler___start_matchmaker_task), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___start_primary_task, __pyx_k_Handler___start_primary_task, sizeof(__pyx_k_Handler___start_primary_task), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___test_primary_tasks, __pyx_k_Handler___test_primary_tasks, sizeof(__pyx_k_Handler___test_primary_tasks), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___test_pyramid_idle_coun, __pyx_k_Handler___test_pyramid_idle_coun, sizeof(__pyx_k_Handler___test_pyramid_idle_coun), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___tidy_pyramid, __pyx_k_Handler___tidy_pyramid, sizeof(__pyx_k_Handler___tidy_pyramid), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___update_tasks, __pyx_k_Handler___update_tasks, sizeof(__pyx_k_Handler___update_tasks), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___wait_for_ack, __pyx_k_Handler___wait_for_ack, sizeof(__pyx_k_Handler___wait_for_ack), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___wait_for_remaining_job, __pyx_k_Handler___wait_for_remaining_job, sizeof(__pyx_k_Handler___wait_for_remaining_job), 0, 0, 1, 1},
  {&__pyx_n_s_Handler___wait_for_remaining_job_2, __pyx_k_Handler___wait_for_remaining_job_2, sizeof(__pyx_k_Handler___wait_for_remaining_job_2), 0, 0, 1, 1},
  {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
  {&__pyx_n_s_JobPackage, __pyx_k_JobPackage, sizeof(__pyx_k_JobPackage), 0, 0, 1, 1},
  {&__pyx_n_s_JobPackage___init, __pyx_k_JobPackage___init, sizeof(__pyx_k_JobPackage___init), 0, 0, 1, 1},
  {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
  {&__pyx_n_s_LonerInfo, __pyx_k_LonerInfo, sizeof(__pyx_k_LonerInfo), 0, 0, 1, 1},
  {&__pyx_kp_s_MM_sv_s, __pyx_k_MM_sv_s, sizeof(__pyx_k_MM_sv_s), 0, 0, 1, 0},
  {&__pyx_n_s_MatchMakerHandler, __pyx_k_MatchMakerHandler, sizeof(__pyx_k_MatchMakerHandler), 0, 0, 1, 1},
  {&__pyx_n_s_MatchMakerHandler___add_to_lefto, __pyx_k_MatchMakerHandler___add_to_lefto, sizeof(__pyx_k_MatchMakerHandler___add_to_lefto), 0, 0, 1, 1},
  {&__pyx_n_s_MatchMakerHandler___first_pass, __pyx_k_MatchMakerHandler___first_pass, sizeof(__pyx_k_MatchMakerHandler___first_pass), 0, 0, 1, 1},
  {&__pyx_n_s_MatchMakerHandler___get_leftover, __pyx_k_MatchMakerHandler___get_leftover, sizeof(__pyx_k_MatchMakerHandler___get_leftover), 0, 0, 1, 1},
  {&__pyx_n_s_MatchMakerHandler___get_loner_ob, __pyx_k_MatchMakerHandler___get_loner_ob, sizeof(__pyx_k_MatchMakerHandler___get_loner_ob), 0, 0, 1, 1},
  {&__pyx_n_s_MatchMakerHandler___init, __pyx_k_MatchMakerHandler___init, sizeof(__pyx_k_MatchMakerHandler___init), 0, 0, 1, 1},
  {&__pyx_n_s_MatchMakerHandler___launch_child, __pyx_k_MatchMakerHandler___launch_child, sizeof(__pyx_k_MatchMakerHandler___launch_child), 0, 0, 1, 1},
  {&__pyx_n_s_MatchMakerHandler___prepare_for, __pyx_k_MatchMakerHandler___prepare_for, sizeof(__pyx_k_MatchMakerHandler___prepare_for), 0, 0, 1, 1},
  {&__pyx_n_s_MatchMakerHandler___prepare_for_2, __pyx_k_MatchMakerHandler___prepare_for_2, sizeof(__pyx_k_MatchMakerHandler___prepare_for_2), 0, 0, 1, 1},
  {&__pyx_n_s_MatchMakerHandler___read_generat, __pyx_k_MatchMakerHandler___read_generat, sizeof(__pyx_k_MatchMakerHandler___read_generat), 0, 0, 1, 1},
  {&__pyx_n_s_MatchMakerHandler___write_leftov, __pyx_k_MatchMakerHandler___write_leftov, sizeof(__pyx_k_MatchMakerHandler___write_leftov), 0, 0, 1, 1},
  {&__pyx_n_s_MatchMakerHandler_run, __pyx_k_MatchMakerHandler_run, sizeof(__pyx_k_MatchMakerHandler_run), 0, 0, 1, 1},
  {&__pyx_n_s_MatchMakerResults, __pyx_k_MatchMakerResults, sizeof(__pyx_k_MatchMakerResults), 0, 0, 1, 1},
  {&__pyx_n_s_MatchMakerResults___init, __pyx_k_MatchMakerResults___init, sizeof(__pyx_k_MatchMakerResults___init), 0, 0, 1, 1},
  {&__pyx_n_s_NP, __pyx_k_NP, sizeof(__pyx_k_NP), 0, 0, 1, 1},
  {&__pyx_kp_s_PAUSE_DEBUG, __pyx_k_PAUSE_DEBUG, sizeof(__pyx_k_PAUSE_DEBUG), 0, 0, 1, 0},
  {&__pyx_n_s_Package, __pyx_k_Package, sizeof(__pyx_k_Package), 0, 0, 1, 1},
  {&__pyx_kp_s_Parabam_coming_to_abrupt_halt_s, __pyx_k_Parabam_coming_to_abrupt_halt_s, sizeof(__pyx_k_Parabam_coming_to_abrupt_halt_s), 0, 0, 1, 0},
  {&__pyx_n_s_Primary, __pyx_k_Primary, sizeof(__pyx_k_Primary), 0, 0, 1, 1},
  {&__pyx_n_s_PrimaryHandler, __pyx_k_PrimaryHandler, sizeof(__pyx_k_PrimaryHandler), 0, 0, 1, 1},
  {&__pyx_n_s_PrimaryHandler___get_loner_holde, __pyx_k_PrimaryHandler___get_loner_holde, sizeof(__pyx_k_PrimaryHandler___get_loner_holde), 0, 0, 1, 1},
  {&__pyx_n_s_PrimaryHandler___get_loner_objec, __pyx_k_PrimaryHandler___get_loner_objec, sizeof(__pyx_k_PrimaryHandler___get_loner_objec), 0, 0, 1, 1},
  {&__pyx_n_s_PrimaryHandler___get_loner_type, __pyx_k_PrimaryHandler___get_loner_type, sizeof(__pyx_k_PrimaryHandler___get_loner_type), 0, 0, 1, 1},
  {&__pyx_n_s_PrimaryHandler___get_paths_and_c, __pyx_k_PrimaryHandler___get_paths_and_c, sizeof(__pyx_k_PrimaryHandler___get_paths_and_c), 0, 0, 1, 1},
  {&__pyx_n_s_PrimaryHandler___get_reference_i, __pyx_k_PrimaryHandler___get_reference_i, sizeof(__pyx_k_PrimaryHandler___get_reference_i), 0, 0, 1, 1},
  {&__pyx_n_s_PrimaryHandler___get_reference_i_2, __pyx_k_PrimaryHandler___get_reference_i_2, sizeof(__pyx_k_PrimaryHandler___get_reference_i_2), 0, 0, 1, 1},
  {&__pyx_n_s_PrimaryHandler___handle_unpaired, __pyx_k_PrimaryHandler___handle_unpaired, sizeof(__pyx_k_PrimaryHandler___handle_unpaired), 0, 0, 1, 1},
  {&__pyx_n_s_PrimaryHandler___init, __pyx_k_PrimaryHandler___init, sizeof(__pyx_k_PrimaryHandler___init), 0, 0, 1, 1},
  {&__pyx_n_s_PrimaryHandler___read_generator, __pyx_k_PrimaryHandler___read_generator, sizeof(__pyx_k_PrimaryHandler___read_generator), 0, 0, 1, 1},
  {&__pyx_n_s_PrimaryHandler___start_matchmake, __pyx_k_PrimaryHandler___start_matchmake, sizeof(__pyx_k_PrimaryHandler___start_matchmake), 0, 0, 1, 1},
  {&__pyx_n_s_PrimaryHandler___write_loner, __pyx_k_PrimaryHandler___write_loner, sizeof(__pyx_k_PrimaryHandler___write_loner), 0, 0, 1, 1},
  {&__pyx_n_s_PrimaryHandler_run, __pyx_k_PrimaryHandler_run, sizeof(__pyx_k_PrimaryHandler_run), 0, 0, 1, 1},
  {&__pyx_n_s_PrimaryResults, __pyx_k_PrimaryResults, sizeof(__pyx_k_PrimaryResults), 0, 0, 1, 1},
  {&__pyx_n_s_PrimaryResults___init, __pyx_k_PrimaryResults___init, sizeof(__pyx_k_PrimaryResults___init), 0, 0, 1, 1},
  {&__pyx_n_s_Process, __pyx_k_Process, sizeof(__pyx_k_Process), 0, 0, 1, 1},
  {&__pyx_n_s_Queue, __pyx_k_Queue, sizeof(__pyx_k_Queue), 0, 0, 1, 1},
  {&__pyx_n_s_Queue2, __pyx_k_Queue2, sizeof(__pyx_k_Queue2), 0, 0, 1, 1},
  {&__pyx_kp_s_Read_pairing_in_progress_100_00, __pyx_k_Read_pairing_in_progress_100_00, sizeof(__pyx_k_Read_pairing_in_progress_100_00), 0, 0, 1, 0},
  {&__pyx_kp_s_Read_pairing_in_progress_2f_com, __pyx_k_Read_pairing_in_progress_2f_com, sizeof(__pyx_k_Read_pairing_in_progress_2f_com), 0, 0, 1, 0},
  {&__pyx_kp_s_Read_pairing_in_progress_2f_com_2, __pyx_k_Read_pairing_in_progress_2f_com_2, sizeof(__pyx_k_Read_pairing_in_progress_2f_com_2), 0, 0, 1, 0},
  {&__pyx_kp_s_Reads_flagged_as_unpaired_exclu, __pyx_k_Reads_flagged_as_unpaired_exclu, sizeof(__pyx_k_Reads_flagged_as_unpaired_exclu), 0, 0, 1, 0},
  {&__pyx_n_s_RuleTask, __pyx_k_RuleTask, sizeof(__pyx_k_RuleTask), 0, 0, 1, 1},
  {&__pyx_n_s_Task, __pyx_k_Task, sizeof(__pyx_k_Task), 0, 0, 1, 1},
  {&__pyx_n_s_Total, __pyx_k_Total, sizeof(__pyx_k_Total), 0, 0, 1, 1},
  {&__pyx_n_s_UM, __pyx_k_UM, sizeof(__pyx_k_UM), 0, 0, 1, 1},
  {&__pyx_n_s_UU, __pyx_k_UU, sizeof(__pyx_k_UU), 0, 0, 1, 1},
  {&__pyx_n_s_UnicodeDecodeError, __pyx_k_UnicodeDecodeError, sizeof(__pyx_k_UnicodeDecodeError), 0, 0, 1, 1},
  {&__pyx_kp_s_Unpaired_reads_d, __pyx_k_Unpaired_reads_d, sizeof(__pyx_k_Unpaired_reads_d), 0, 0, 1, 0},
  {&__pyx_kp_s_Waiting_for_tasks_to_finish_d_d, __pyx_k_Waiting_for_tasks_to_finish_d_d, sizeof(__pyx_k_Waiting_for_tasks_to_finish_d_d), 0, 0, 1, 0},
  {&__pyx_n_s_XX, __pyx_k_XX, sizeof(__pyx_k_XX), 0, 0, 1, 1},
  {&__pyx_kp_s_XX_dv_d, __pyx_k_XX_dv_d, sizeof(__pyx_k_XX_dv_d), 0, 0, 1, 0},
  {&__pyx_kp_s__13, __pyx_k__13, sizeof(__pyx_k__13), 0, 0, 1, 0},
  {&__pyx_n_s__17, __pyx_k__17, sizeof(__pyx_k__17), 0, 0, 1, 1},
  {&__pyx_kp_s__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 0, 1, 0},
  {&__pyx_n_s_ack, __pyx_k_ack, sizeof(__pyx_k_ack), 0, 0, 1, 1},
  {&__pyx_n_s_active_tasks, __pyx_k_active_tasks, sizeof(__pyx_k_active_tasks), 0, 0, 1, 1},
  {&__pyx_n_s_add_post_destory_chaser_tasks, __pyx_k_add_post_destory_chaser_tasks, sizeof(__pyx_k_add_post_destory_chaser_tasks), 0, 0, 1, 1},
  {&__pyx_n_s_add_to_leftover_paths, __pyx_k_add_to_leftover_paths, sizeof(__pyx_k_add_to_leftover_paths), 0, 0, 1, 1},
  {&__pyx_n_s_add_to_pyramid, __pyx_k_add_to_pyramid, sizeof(__pyx_k_add_to_pyramid), 0, 0, 1, 1},
  {&__pyx_n_s_all_paths, __pyx_k_all_paths, sizeof(__pyx_k_all_paths), 0, 0, 1, 1},
  {&__pyx_n_s_any, __pyx_k_any, sizeof(__pyx_k_any), 0, 0, 1, 1},
  {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
  {&__pyx_kp_s_b_d, __pyx_k_b_d, sizeof(__pyx_k_b_d), 0, 0, 1, 0},
  {&__pyx_n_s_bam_file, __pyx_k_bam_file, sizeof(__pyx_k_bam_file), 0, 0, 1, 1},
  {&__pyx_n_s_bam_iterator, __pyx_k_bam_iterator, sizeof(__pyx_k_bam_iterator), 0, 0, 1, 1},
  {&__pyx_n_s_bins, __pyx_k_bins, sizeof(__pyx_k_bins), 0, 0, 1, 1},
  {&__pyx_n_s_boomerang_count, __pyx_k_boomerang_count, sizeof(__pyx_k_boomerang_count), 0, 0, 1, 1},
  {&__pyx_n_s_chaser_qu, __pyx_k_chaser_qu, sizeof(__pyx_k_chaser_qu), 0, 0, 1, 1},
  {&__pyx_n_s_chaser_task, __pyx_k_chaser_task, sizeof(__pyx_k_chaser_task), 0, 0, 1, 1},
  {&__pyx_n_s_chaser_tasks, __pyx_k_chaser_tasks, sizeof(__pyx_k_chaser_tasks), 0, 0, 1, 1},
  {&__pyx_n_s_chaser_type, __pyx_k_chaser_type, sizeof(__pyx_k_chaser_type), 0, 0, 1, 1},
  {&__pyx_n_s_child_pack, __pyx_k_child_pack, sizeof(__pyx_k_child_pack), 0, 0, 1, 1},
  {&__pyx_n_s_child_pack_2, __pyx_k_child_pack_2, sizeof(__pyx_k_child_pack_2), 0, 0, 1, 1},
  {&__pyx_n_s_chrom_bins, __pyx_k_chrom_bins, sizeof(__pyx_k_chrom_bins), 0, 0, 1, 1},
  {&__pyx_n_s_chrom_info, __pyx_k_chrom_info, sizeof(__pyx_k_chrom_info), 0, 0, 1, 1},
  {&__pyx_n_s_class_bins, __pyx_k_class_bins, sizeof(__pyx_k_class_bins), 0, 0, 1, 1},
  {&__pyx_n_s_clear_subpyramid, __pyx_k_clear_subpyramid, sizeof(__pyx_k_clear_subpyramid), 0, 0, 1, 1},
  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
  {&__pyx_n_s_collect, __pyx_k_collect, sizeof(__pyx_k_collect), 0, 0, 1, 1},
  {&__pyx_n_s_collected_packs, __pyx_k_collected_packs, sizeof(__pyx_k_collected_packs), 0, 0, 1, 1},
  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
  {&__pyx_n_s_constants, __pyx_k_constants, sizeof(__pyx_k_constants), 0, 0, 1, 1},
  {&__pyx_n_s_constants_2, __pyx_k_constants_2, sizeof(__pyx_k_constants_2), 0, 0, 1, 1},
  {&__pyx_n_s_core, __pyx_k_core, sizeof(__pyx_k_core), 0, 0, 1, 1},
  {&__pyx_n_s_count, __pyx_k_count, sizeof(__pyx_k_count), 0, 0, 1, 1},
  {&__pyx_n_s_count_limit, __pyx_k_count_limit, sizeof(__pyx_k_count_limit), 0, 0, 1, 1},
  {&__pyx_n_s_create_chaser_tasks, __pyx_k_create_chaser_tasks, sizeof(__pyx_k_create_chaser_tasks), 0, 0, 1, 1},
  {&__pyx_kp_s_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 0, 1, 0},
  {&__pyx_kp_s_d_d, __pyx_k_d_d, sizeof(__pyx_k_d_d), 0, 0, 1, 0},
  {&__pyx_kp_s_d_d_4f_2fGB_Proc_d_Des_d_Purg_d, __pyx_k_d_d_4f_2fGB_Proc_d_Des_d_Purg_d, sizeof(__pyx_k_d_d_4f_2fGB_Proc_d_Des_d_Purg_d), 0, 0, 1, 0},
  {&__pyx_n_s_dealt, __pyx_k_dealt, sizeof(__pyx_k_dealt), 0, 0, 1, 1},
  {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1},
  {&__pyx_n_s_destroy, __pyx_k_destroy, sizeof(__pyx_k_destroy), 0, 0, 1, 1},
  {&__pyx_n_s_destroy_2, __pyx_k_destroy_2, sizeof(__pyx_k_destroy_2), 0, 0, 1, 1},
  {&__pyx_n_s_destroy_found, __pyx_k_destroy_found, sizeof(__pyx_k_destroy_found), 0, 0, 1, 1},
  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
  {&__pyx_n_s_empty_leftover_path, __pyx_k_empty_leftover_path, sizeof(__pyx_k_empty_leftover_path), 0, 0, 1, 1},
  {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1},
  {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
  {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1},
  {&__pyx_n_s_extend, __pyx_k_extend, sizeof(__pyx_k_extend), 0, 0, 1, 1},
  {&__pyx_n_s_fatal_check, __pyx_k_fatal_check, sizeof(__pyx_k_fatal_check), 0, 0, 1, 1},
  {&__pyx_n_s_fetch, __pyx_k_fetch, sizeof(__pyx_k_fetch), 0, 0, 1, 1},
  {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1},
  {&__pyx_n_s_file_name, __pyx_k_file_name, sizeof(__pyx_k_file_name), 0, 0, 1, 1},
  {&__pyx_n_s_file_readers_paused, __pyx_k_file_readers_paused, sizeof(__pyx_k_file_readers_paused), 0, 0, 1, 1},
  {&__pyx_n_s_filename, __pyx_k_filename, sizeof(__pyx_k_filename), 0, 0, 1, 1},
  {&__pyx_n_s_files_in_pyramid, __pyx_k_files_in_pyramid, sizeof(__pyx_k_files_in_pyramid), 0, 0, 1, 1},
  {&__pyx_n_s_filter, __pyx_k_filter, sizeof(__pyx_k_filter), 0, 0, 1, 1},
  {&__pyx_n_s_finish_test, __pyx_k_finish_test, sizeof(__pyx_k_finish_test), 0, 0, 1, 1},
  {&__pyx_n_s_finished, __pyx_k_finished, sizeof(__pyx_k_finished), 0, 0, 1, 1},
  {&__pyx_n_s_finished_2, __pyx_k_finished_2, sizeof(__pyx_k_finished_2), 0, 0, 1, 1},
  {&__pyx_n_s_first_pass, __pyx_k_first_pass, sizeof(__pyx_k_first_pass), 0, 0, 1, 1},
  {&__pyx_n_s_flush, __pyx_k_flush, sizeof(__pyx_k_flush), 0, 0, 1, 1},
  {&__pyx_n_s_found, __pyx_k_found, sizeof(__pyx_k_found), 0, 0, 1, 1},
  {&__pyx_n_s_fragment_leftovers, __pyx_k_fragment_leftovers, sizeof(__pyx_k_fragment_leftovers), 0, 0, 1, 1},
  {&__pyx_n_s_gc, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 0, 1, 1},
  {&__pyx_n_s_generate_results, __pyx_k_generate_results, sizeof(__pyx_k_generate_results), 0, 0, 1, 1},
  {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
  {&__pyx_n_s_get_chrom_bins, __pyx_k_get_chrom_bins, sizeof(__pyx_k_get_chrom_bins), 0, 0, 1, 1},
  {&__pyx_n_s_get_leftover_object, __pyx_k_get_leftover_object, sizeof(__pyx_k_get_leftover_object), 0, 0, 1, 1},
  {&__pyx_n_s_get_loner_holder, __pyx_k_get_loner_holder, sizeof(__pyx_k_get_loner_holder), 0, 0, 1, 1},
  {&__pyx_n_s_get_loner_object, __pyx_k_get_loner_object, sizeof(__pyx_k_get_loner_object), 0, 0, 1, 1},
  {&__pyx_n_s_get_loner_temp_path, __pyx_k_get_loner_temp_path, sizeof(__pyx_k_get_loner_temp_path), 0, 0, 1, 1},
  {&__pyx_n_s_get_loner_type, __pyx_k_get_loner_type, sizeof(__pyx_k_get_loner_type), 0, 0, 1, 1},
  {&__pyx_n_s_get_paths, __pyx_k_get_paths, sizeof(__pyx_k_get_paths), 0, 0, 1, 1},
  {&__pyx_n_s_get_paths_and_close, __pyx_k_get_paths_and_close, sizeof(__pyx_k_get_paths_and_close), 0, 0, 1, 1},
  {&__pyx_n_s_get_reference_id_name, __pyx_k_get_reference_id_name, sizeof(__pyx_k_get_reference_id_name), 0, 0, 1, 1},
  {&__pyx_n_s_get_task_size, __pyx_k_get_task_size, sizeof(__pyx_k_get_task_size), 0, 0, 1, 1},
  {&__pyx_n_s_get_temp_path, __pyx_k_get_temp_path, sizeof(__pyx_k_get_temp_path), 0, 0, 1, 1},
  {&__pyx_n_s_getsize, __pyx_k_getsize, sizeof(__pyx_k_getsize), 0, 0, 1, 1},
  {&__pyx_n_s_group, __pyx_k_group, sizeof(__pyx_k_group), 0, 0, 1, 1},
  {&__pyx_n_s_handle_match_maker, __pyx_k_handle_match_maker, sizeof(__pyx_k_handle_match_maker), 0, 0, 1, 1},
  {&__pyx_n_s_handle_origin_task, __pyx_k_handle_origin_task, sizeof(__pyx_k_handle_origin_task), 0, 0, 1, 1},
  {&__pyx_n_s_handle_output, __pyx_k_handle_output, sizeof(__pyx_k_handle_output), 0, 0, 1, 1},
  {&__pyx_n_s_handle_pair_dict, __pyx_k_handle_pair_dict, sizeof(__pyx_k_handle_pair_dict), 0, 0, 1, 1},
  {&__pyx_n_s_handle_primary_task, __pyx_k_handle_primary_task, sizeof(__pyx_k_handle_primary_task), 0, 0, 1, 1},
  {&__pyx_n_s_handle_rule_output, __pyx_k_handle_rule_output, sizeof(__pyx_k_handle_rule_output), 0, 0, 1, 1},
  {&__pyx_n_s_handle_unpaired_reads, __pyx_k_handle_unpaired_reads, sizeof(__pyx_k_handle_unpaired_reads), 0, 0, 1, 1},
  {&__pyx_n_s_handler_exit, __pyx_k_handler_exit, sizeof(__pyx_k_handler_exit), 0, 0, 1, 1},
  {&__pyx_n_s_has_large_file, __pyx_k_has_large_file, sizeof(__pyx_k_has_large_file), 0, 0, 1, 1},
  {&__pyx_n_s_header, __pyx_k_header, sizeof(__pyx_k_header), 0, 0, 1, 1},
  {&__pyx_n_s_header_2, __pyx_k_header_2, sizeof(__pyx_k_header_2), 0, 0, 1, 1},
  {&__pyx_n_s_holder, __pyx_k_holder, sizeof(__pyx_k_holder), 0, 0, 1, 1},
  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
  {&__pyx_n_s_identity, __pyx_k_identity, sizeof(__pyx_k_identity), 0, 0, 1, 1},
  {&__pyx_n_s_idle_level, __pyx_k_idle_level, sizeof(__pyx_k_idle_level), 0, 0, 1, 1},
  {&__pyx_n_s_idle_levels, __pyx_k_idle_levels, sizeof(__pyx_k_idle_levels), 0, 0, 1, 1},
  {&__pyx_n_s_idle_path, __pyx_k_idle_path, sizeof(__pyx_k_idle_path), 0, 0, 1, 1},
  {&__pyx_n_s_idle_paths, __pyx_k_idle_paths, sizeof(__pyx_k_idle_paths), 0, 0, 1, 1},
  {&__pyx_n_s_idle_routine, __pyx_k_idle_routine, sizeof(__pyx_k_idle_routine), 0, 0, 1, 1},
  {&__pyx_n_s_idle_success, __pyx_k_idle_success, sizeof(__pyx_k_idle_success), 0, 0, 1, 1},
  {&__pyx_n_s_idle_threshold, __pyx_k_idle_threshold, sizeof(__pyx_k_idle_threshold), 0, 0, 1, 1},
  {&__pyx_n_s_idle_tuples, __pyx_k_idle_tuples, sizeof(__pyx_k_idle_tuples), 0, 0, 1, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
  {&__pyx_n_s_inqu, __pyx_k_inqu, sizeof(__pyx_k_inqu), 0, 0, 1, 1},
  {&__pyx_n_s_inqu_2, __pyx_k_inqu_2, sizeof(__pyx_k_inqu_2), 0, 0, 1, 1},
  {&__pyx_n_s_instalise_loner_pyramid, __pyx_k_instalise_loner_pyramid, sizeof(__pyx_k_instalise_loner_pyramid), 0, 0, 1, 1},
  {&__pyx_n_s_instalise_primary_store, __pyx_k_instalise_primary_store, sizeof(__pyx_k_instalise_primary_store), 0, 0, 1, 1},
  {&__pyx_n_s_is_alive, __pyx_k_is_alive, sizeof(__pyx_k_is_alive), 0, 0, 1, 1},
  {&__pyx_n_s_is_paired, __pyx_k_is_paired, sizeof(__pyx_k_is_paired), 0, 0, 1, 1},
  {&__pyx_n_s_is_queue_empty, __pyx_k_is_queue_empty, sizeof(__pyx_k_is_queue_empty), 0, 0, 1, 1},
  {&__pyx_n_s_is_unmapped, __pyx_k_is_unmapped, sizeof(__pyx_k_is_unmapped), 0, 0, 1, 1},
  {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
  {&__pyx_n_s_iterations, __pyx_k_iterations, sizeof(__pyx_k_iterations), 0, 0, 1, 1},
  {&__pyx_n_s_iterator, __pyx_k_iterator, sizeof(__pyx_k_iterator), 0, 0, 1, 1},
  {&__pyx_n_s_itertools_izip, __pyx_k_itertools_izip, sizeof(__pyx_k_itertools_izip), 0, 0, 1, 1},
  {&__pyx_n_s_job, __pyx_k_job, sizeof(__pyx_k_job), 0, 0, 1, 1},
  {&__pyx_n_s_jobs_at_start, __pyx_k_jobs_at_start, sizeof(__pyx_k_jobs_at_start), 0, 0, 1, 1},
  {&__pyx_n_s_jobs_found, __pyx_k_jobs_found, sizeof(__pyx_k_jobs_found), 0, 0, 1, 1},
  {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
  {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1},
  {&__pyx_n_s_kwargs, __pyx_k_kwargs, sizeof(__pyx_k_kwargs), 0, 0, 1, 1},
  {&__pyx_n_s_launch_child_task, __pyx_k_launch_child_task, sizeof(__pyx_k_launch_child_task), 0, 0, 1, 1},
  {&__pyx_n_s_leftover, __pyx_k_leftover, sizeof(__pyx_k_leftover), 0, 0, 1, 1},
  {&__pyx_n_s_leftover_count, __pyx_k_leftover_count, sizeof(__pyx_k_leftover_count), 0, 0, 1, 1},
  {&__pyx_n_s_leftover_file, __pyx_k_leftover_file, sizeof(__pyx_k_leftover_file), 0, 0, 1, 1},
  {&__pyx_n_s_leftover_path, __pyx_k_leftover_path, sizeof(__pyx_k_leftover_path), 0, 0, 1, 1},
  {&__pyx_n_s_leftover_paths, __pyx_k_leftover_paths, sizeof(__pyx_k_leftover_paths), 0, 0, 1, 1},
  {&__pyx_n_s_length, __pyx_k_length, sizeof(__pyx_k_length), 0, 0, 1, 1},
  {&__pyx_n_s_lengths, __pyx_k_lengths, sizeof(__pyx_k_lengths), 0, 0, 1, 1},
  {&__pyx_n_s_level, __pyx_k_level, sizeof(__pyx_k_level), 0, 0, 1, 1},
  {&__pyx_kp_s_lftovr_d, __pyx_k_lftovr_d, sizeof(__pyx_k_lftovr_d), 0, 0, 1, 0},
  {&__pyx_n_s_loner_count, __pyx_k_loner_count, sizeof(__pyx_k_loner_count), 0, 0, 1, 1},
  {&__pyx_n_s_loner_file_counts, __pyx_k_loner_file_counts, sizeof(__pyx_k_loner_file_counts), 0, 0, 1, 1},
  {&__pyx_n_s_loner_holder, __pyx_k_loner_holder, sizeof(__pyx_k_loner_holder), 0, 0, 1, 1},
  {&__pyx_n_s_loner_info, __pyx_k_loner_info, sizeof(__pyx_k_loner_info), 0, 0, 1, 1},
  {&__pyx_n_s_loner_level, __pyx_k_loner_level, sizeof(__pyx_k_loner_level), 0, 0, 1, 1},
  {&__pyx_n_s_loner_object, __pyx_k_loner_object, sizeof(__pyx_k_loner_object), 0, 0, 1, 1},
  {&__pyx_n_s_loner_objects, __pyx_k_loner_objects, sizeof(__pyx_k_loner_objects), 0, 0, 1, 1},
  {&__pyx_n_s_loner_pack, __pyx_k_loner_pack, sizeof(__pyx_k_loner_pack), 0, 0, 1, 1},
  {&__pyx_n_s_loner_path, __pyx_k_loner_path, sizeof(__pyx_k_loner_path), 0, 0, 1, 1},
  {&__pyx_n_s_loner_paths, __pyx_k_loner_paths, sizeof(__pyx_k_loner_paths), 0, 0, 1, 1},
  {&__pyx_n_s_loner_purgatory, __pyx_k_loner_purgatory, sizeof(__pyx_k_loner_purgatory), 0, 0, 1, 1},
  {&__pyx_n_s_loner_pyramid, __pyx_k_loner_pyramid, sizeof(__pyx_k_loner_pyramid), 0, 0, 1, 1},
  {&__pyx_n_s_loner_total, __pyx_k_loner_total, sizeof(__pyx_k_loner_total), 0, 0, 1, 1},
  {&__pyx_n_s_loner_type, __pyx_k_loner_type, sizeof(__pyx_k_loner_type), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_main_2, __pyx_k_main_2, sizeof(__pyx_k_main_2), 0, 0, 1, 1},
  {&__pyx_n_s_map, __pyx_k_map, sizeof(__pyx_k_map), 0, 0, 1, 1},
  {&__pyx_n_s_match_handler, __pyx_k_match_handler, sizeof(__pyx_k_match_handler), 0, 0, 1, 1},
  {&__pyx_n_s_match_maker, __pyx_k_match_maker, sizeof(__pyx_k_match_maker), 0, 0, 1, 1},
  {&__pyx_n_s_match_maker_results, __pyx_k_match_maker_results, sizeof(__pyx_k_match_maker_results), 0, 0, 1, 1},
  {&__pyx_n_s_match_package, __pyx_k_match_package, sizeof(__pyx_k_match_package), 0, 0, 1, 1},
  {&__pyx_n_s_matchmaker_result, __pyx_k_matchmaker_result, sizeof(__pyx_k_matchmaker_result), 0, 0, 1, 1},
  {&__pyx_n_s_mate_is_unmapped, __pyx_k_mate_is_unmapped, sizeof(__pyx_k_mate_is_unmapped), 0, 0, 1, 1},
  {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
  {&__pyx_n_s_max_jobs, __pyx_k_max_jobs, sizeof(__pyx_k_max_jobs), 0, 0, 1, 1},
  {&__pyx_n_s_max_jobs_2, __pyx_k_max_jobs_2, sizeof(__pyx_k_max_jobs_2), 0, 0, 1, 1},
  {&__pyx_n_s_max_reads, __pyx_k_max_reads, sizeof(__pyx_k_max_reads), 0, 0, 1, 1},
  {&__pyx_n_s_max_reads_2, __pyx_k_max_reads_2, sizeof(__pyx_k_max_reads_2), 0, 0, 1, 1},
  {&__pyx_n_s_message, __pyx_k_message, sizeof(__pyx_k_message), 0, 0, 1, 1},
  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
  {&__pyx_n_s_multiprocessing, __pyx_k_multiprocessing, sizeof(__pyx_k_multiprocessing), 0, 0, 1, 1},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
  {&__pyx_n_s_namedtuple, __pyx_k_namedtuple, sizeof(__pyx_k_namedtuple), 0, 0, 1, 1},
  {&__pyx_n_s_new_bam_object, __pyx_k_new_bam_object, sizeof(__pyx_k_new_bam_object), 0, 0, 1, 1},
  {&__pyx_n_s_new_package, __pyx_k_new_package, sizeof(__pyx_k_new_package), 0, 0, 1, 1},
  {&__pyx_n_s_new_package_action, __pyx_k_new_package_action, sizeof(__pyx_k_new_package_action), 0, 0, 1, 1},
  {&__pyx_n_s_next_reference_id, __pyx_k_next_reference_id, sizeof(__pyx_k_next_reference_id), 0, 0, 1, 1},
  {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},
  {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
  {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
  {&__pyx_n_s_origin, __pyx_k_origin, sizeof(__pyx_k_origin), 0, 0, 1, 1},
  {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
  {&__pyx_n_s_out_qu_dict, __pyx_k_out_qu_dict, sizeof(__pyx_k_out_qu_dict), 0, 0, 1, 1},
  {&__pyx_n_s_output_paths, __pyx_k_output_paths, sizeof(__pyx_k_output_paths), 0, 0, 1, 1},
  {&__pyx_n_s_outqu, __pyx_k_outqu, sizeof(__pyx_k_outqu), 0, 0, 1, 1},
  {&__pyx_n_s_outqu_2, __pyx_k_outqu_2, sizeof(__pyx_k_outqu_2), 0, 0, 1, 1},
  {&__pyx_n_s_pack, __pyx_k_pack, sizeof(__pyx_k_pack), 0, 0, 1, 1},
  {&__pyx_n_s_package, __pyx_k_package, sizeof(__pyx_k_package), 0, 0, 1, 1},
  {&__pyx_n_s_pair, __pyx_k_pair, sizeof(__pyx_k_pair), 0, 0, 1, 1},
  {&__pyx_n_s_pairs, __pyx_k_pairs, sizeof(__pyx_k_pairs), 0, 0, 1, 1},
  {&__pyx_n_s_parabam, __pyx_k_parabam, sizeof(__pyx_k_parabam), 0, 0, 1, 1},
  {&__pyx_n_s_parabam_chaser, __pyx_k_parabam_chaser, sizeof(__pyx_k_parabam_chaser), 0, 0, 1, 1},
  {&__pyx_kp_s_parabam_chaser_pyx, __pyx_k_parabam_chaser_pyx, sizeof(__pyx_k_parabam_chaser_pyx), 0, 0, 1, 0},
  {&__pyx_n_s_parabam_core, __pyx_k_parabam_core, sizeof(__pyx_k_parabam_core), 0, 0, 1, 1},
  {&__pyx_n_s_parent_bam, __pyx_k_parent_bam, sizeof(__pyx_k_parent_bam), 0, 0, 1, 1},
  {&__pyx_n_s_parent_bam_2, __pyx_k_parent_bam_2, sizeof(__pyx_k_parent_bam_2), 0, 0, 1, 1},
  {&__pyx_n_s_parent_bam_file_name, __pyx_k_parent_bam_file_name, sizeof(__pyx_k_parent_bam_file_name), 0, 0, 1, 1},
  {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
  {&__pyx_n_s_path_n, __pyx_k_path_n, sizeof(__pyx_k_path_n), 0, 0, 1, 1},
  {&__pyx_n_s_paths, __pyx_k_paths, sizeof(__pyx_k_paths), 0, 0, 1, 1},
  {&__pyx_kp_s_paths_level_loner_type, __pyx_k_paths_level_loner_type, sizeof(__pyx_k_paths_level_loner_type), 0, 0, 1, 0},
  {&__pyx_n_s_pause_debug, __pyx_k_pause_debug, sizeof(__pyx_k_pause_debug), 0, 0, 1, 1},
  {&__pyx_n_s_pause_debug_2, __pyx_k_pause_debug_2, sizeof(__pyx_k_pause_debug_2), 0, 0, 1, 1},
  {&__pyx_n_s_pause_monitor, __pyx_k_pause_monitor, sizeof(__pyx_k_pause_monitor), 0, 0, 1, 1},
  {&__pyx_n_s_pause_qus, __pyx_k_pause_qus, sizeof(__pyx_k_pause_qus), 0, 0, 1, 1},
  {&__pyx_n_s_pause_qus_2, __pyx_k_pause_qus_2, sizeof(__pyx_k_pause_qus_2), 0, 0, 1, 1},
  {&__pyx_n_s_pending_jobs, __pyx_k_pending_jobs, sizeof(__pyx_k_pending_jobs), 0, 0, 1, 1},
  {&__pyx_n_s_periodic_action, __pyx_k_periodic_action, sizeof(__pyx_k_periodic_action), 0, 0, 1, 1},
  {&__pyx_n_s_periodic_interval, __pyx_k_periodic_interval, sizeof(__pyx_k_periodic_interval), 0, 0, 1, 1},
  {&__pyx_n_s_pid, __pyx_k_pid, sizeof(__pyx_k_pid), 0, 0, 1, 1},
  {&__pyx_n_s_post_destroy_count, __pyx_k_post_destroy_count, sizeof(__pyx_k_post_destroy_count), 0, 0, 1, 1},
  {&__pyx_n_s_post_destroy_report, __pyx_k_post_destroy_report, sizeof(__pyx_k_post_destroy_report), 0, 0, 1, 1},
  {&__pyx_n_s_post_destroy_tasks, __pyx_k_post_destroy_tasks, sizeof(__pyx_k_post_destroy_tasks), 0, 0, 1, 1},
  {&__pyx_n_s_post_destroy_tasks_added, __pyx_k_post_destroy_tasks_added, sizeof(__pyx_k_post_destroy_tasks_added), 0, 0, 1, 1},
  {&__pyx_n_s_post_destroy_thresh, __pyx_k_post_destroy_thresh, sizeof(__pyx_k_post_destroy_thresh), 0, 0, 1, 1},
  {&__pyx_n_s_pr, __pyx_k_pr, sizeof(__pyx_k_pr), 0, 0, 1, 1},
  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
  {&__pyx_n_s_prepare_for_second_pass, __pyx_k_prepare_for_second_pass, sizeof(__pyx_k_prepare_for_second_pass), 0, 0, 1, 1},
  {&__pyx_n_s_prev_found, __pyx_k_prev_found, sizeof(__pyx_k_prev_found), 0, 0, 1, 1},
  {&__pyx_n_s_prev_rescued, __pyx_k_prev_rescued, sizeof(__pyx_k_prev_rescued), 0, 0, 1, 1},
  {&__pyx_n_s_primary, __pyx_k_primary, sizeof(__pyx_k_primary), 0, 0, 1, 1},
  {&__pyx_n_s_primary_handler, __pyx_k_primary_handler, sizeof(__pyx_k_primary_handler), 0, 0, 1, 1},
  {&__pyx_n_s_primary_store, __pyx_k_primary_store, sizeof(__pyx_k_primary_store), 0, 0, 1, 1},
  {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1},
  {&__pyx_n_s_print_chaser_debug, __pyx_k_print_chaser_debug, sizeof(__pyx_k_print_chaser_debug), 0, 0, 1, 1},
  {&__pyx_n_s_print_debug, __pyx_k_print_debug, sizeof(__pyx_k_print_debug), 0, 0, 1, 1},
  {&__pyx_n_s_process_task_set, __pyx_k_process_task_set, sizeof(__pyx_k_process_task_set), 0, 0, 1, 1},
  {&__pyx_n_s_processing, __pyx_k_processing, sizeof(__pyx_k_processing), 0, 0, 1, 1},
  {&__pyx_n_s_put, __pyx_k_put, sizeof(__pyx_k_put), 0, 0, 1, 1},
  {&__pyx_n_s_pyramid, __pyx_k_pyramid, sizeof(__pyx_k_pyramid), 0, 0, 1, 1},
  {&__pyx_n_s_pyramid_idle_counts, __pyx_k_pyramid_idle_counts, sizeof(__pyx_k_pyramid_idle_counts), 0, 0, 1, 1},
  {&__pyx_n_s_pyramid_idle_counts_2, __pyx_k_pyramid_idle_counts_2, sizeof(__pyx_k_pyramid_idle_counts_2), 0, 0, 1, 1},
  {&__pyx_n_s_pyramid_is_empty, __pyx_k_pyramid_is_empty, sizeof(__pyx_k_pyramid_is_empty), 0, 0, 1, 1},
  {&__pyx_n_s_pysam, __pyx_k_pysam, sizeof(__pyx_k_pysam), 0, 0, 1, 1},
  {&__pyx_n_s_qname, __pyx_k_qname, sizeof(__pyx_k_qname), 0, 0, 1, 1},
  {&__pyx_n_s_qu, __pyx_k_qu, sizeof(__pyx_k_qu), 0, 0, 1, 1},
  {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
  {&__pyx_n_s_queue, __pyx_k_queue, sizeof(__pyx_k_queue), 0, 0, 1, 1},
  {&__pyx_n_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 1},
  {&__pyx_n_s_randint, __pyx_k_randint, sizeof(__pyx_k_randint), 0, 0, 1, 1},
  {&__pyx_n_s_random, __pyx_k_random, sizeof(__pyx_k_random), 0, 0, 1, 1},
  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {&__pyx_n_s_rb, __pyx_k_rb, sizeof(__pyx_k_rb), 0, 0, 1, 1},
  {&__pyx_n_s_read, __pyx_k_read, sizeof(__pyx_k_read), 0, 0, 1, 1},
  {&__pyx_n_s_read_count, __pyx_k_read_count, sizeof(__pyx_k_read_count), 0, 0, 1, 1},
  {&__pyx_n_s_read_generator, __pyx_k_read_generator, sizeof(__pyx_k_read_generator), 0, 0, 1, 1},
  {&__pyx_n_s_read_name, __pyx_k_read_name, sizeof(__pyx_k_read_name), 0, 0, 1, 1},
  {&__pyx_n_s_read_pairs, __pyx_k_read_pairs, sizeof(__pyx_k_read_pairs), 0, 0, 1, 1},
  {&__pyx_n_s_reads_found, __pyx_k_reads_found, sizeof(__pyx_k_reads_found), 0, 0, 1, 1},
  {&__pyx_n_s_record, __pyx_k_record, sizeof(__pyx_k_record), 0, 0, 1, 1},
  {&__pyx_n_s_reference_id, __pyx_k_reference_id, sizeof(__pyx_k_reference_id), 0, 0, 1, 1},
  {&__pyx_n_s_references, __pyx_k_references, sizeof(__pyx_k_references), 0, 0, 1, 1},
  {&__pyx_n_s_remaining_reads, __pyx_k_remaining_reads, sizeof(__pyx_k_remaining_reads), 0, 0, 1, 1},
  {&__pyx_n_s_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1},
  {&__pyx_n_s_remove_from_pyramid, __pyx_k_remove_from_pyramid, sizeof(__pyx_k_remove_from_pyramid), 0, 0, 1, 1},
  {&__pyx_n_s_report, __pyx_k_report, sizeof(__pyx_k_report), 0, 0, 1, 1},
  {&__pyx_n_s_request_fragment_output, __pyx_k_request_fragment_output, sizeof(__pyx_k_request_fragment_output), 0, 0, 1, 1},
  {&__pyx_n_s_required_paths, __pyx_k_required_paths, sizeof(__pyx_k_required_paths), 0, 0, 1, 1},
  {&__pyx_n_s_rescued, __pyx_k_rescued, sizeof(__pyx_k_rescued), 0, 0, 1, 1},
  {&__pyx_n_s_rescued_2, __pyx_k_rescued_2, sizeof(__pyx_k_rescued_2), 0, 0, 1, 1},
  {&__pyx_n_s_results, __pyx_k_results, sizeof(__pyx_k_results), 0, 0, 1, 1},
  {&__pyx_n_s_return_paths, __pyx_k_return_paths, sizeof(__pyx_k_return_paths), 0, 0, 1, 1},
  {&__pyx_n_s_reversed, __pyx_k_reversed, sizeof(__pyx_k_reversed), 0, 0, 1, 1},
  {&__pyx_n_s_rule, __pyx_k_rule, sizeof(__pyx_k_rule), 0, 0, 1, 1},
  {&__pyx_n_s_rule_output, __pyx_k_rule_output, sizeof(__pyx_k_rule_output), 0, 0, 1, 1},
  {&__pyx_n_s_run, __pyx_k_run, sizeof(__pyx_k_run), 0, 0, 1, 1},
  {&__pyx_n_s_running, __pyx_k_running, sizeof(__pyx_k_running), 0, 0, 1, 1},
  {&__pyx_kp_s_s__d__d__s, __pyx_k_s__d__d__s, sizeof(__pyx_k_s__d__d__s), 0, 0, 1, 0},
  {&__pyx_kp_s_s_s__d__d__s__s_bam, __pyx_k_s_s__d__d__s__s_bam, sizeof(__pyx_k_s_s__d__d__s__s_bam), 0, 0, 1, 0},
  {&__pyx_n_s_sample, __pyx_k_sample, sizeof(__pyx_k_sample), 0, 0, 1, 1},
  {&__pyx_n_s_save_purgatory_loners, __pyx_k_save_purgatory_loners, sizeof(__pyx_k_save_purgatory_loners), 0, 0, 1, 1},
  {&__pyx_n_s_saved, __pyx_k_saved, sizeof(__pyx_k_saved), 0, 0, 1, 1},
  {&__pyx_n_s_saved_keys, __pyx_k_saved_keys, sizeof(__pyx_k_saved_keys), 0, 0, 1, 1},
  {&__pyx_n_s_second_pass, __pyx_k_second_pass, sizeof(__pyx_k_second_pass), 0, 0, 1, 1},
  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
  {&__pyx_n_s_send_pairs, __pyx_k_send_pairs, sizeof(__pyx_k_send_pairs), 0, 0, 1, 1},
  {&__pyx_n_s_set_new_stale_thresh, __pyx_k_set_new_stale_thresh, sizeof(__pyx_k_set_new_stale_thresh), 0, 0, 1, 1},
  {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
  {&__pyx_n_s_sleep, __pyx_k_sleep, sizeof(__pyx_k_sleep), 0, 0, 1, 1},
  {&__pyx_n_s_sorted, __pyx_k_sorted, sizeof(__pyx_k_sorted), 0, 0, 1, 1},
  {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
  {&__pyx_n_s_stale_count, __pyx_k_stale_count, sizeof(__pyx_k_stale_count), 0, 0, 1, 1},
  {&__pyx_n_s_stale_thresh, __pyx_k_stale_thresh, sizeof(__pyx_k_stale_thresh), 0, 0, 1, 1},
  {&__pyx_n_s_standard_output, __pyx_k_standard_output, sizeof(__pyx_k_standard_output), 0, 0, 1, 1},
  {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
  {&__pyx_n_s_start_job, __pyx_k_start_job, sizeof(__pyx_k_start_job), 0, 0, 1, 1},
  {&__pyx_n_s_start_matchmaker_task, __pyx_k_start_matchmaker_task, sizeof(__pyx_k_start_matchmaker_task), 0, 0, 1, 1},
  {&__pyx_n_s_start_primary_task, __pyx_k_start_primary_task, sizeof(__pyx_k_start_primary_task), 0, 0, 1, 1},
  {&__pyx_n_s_status, __pyx_k_status, sizeof(__pyx_k_status), 0, 0, 1, 1},
  {&__pyx_n_s_statusqu, __pyx_k_statusqu, sizeof(__pyx_k_statusqu), 0, 0, 1, 1},
  {&__pyx_n_s_stderr, __pyx_k_stderr, sizeof(__pyx_k_stderr), 0, 0, 1, 1},
  {&__pyx_n_s_stdout, __pyx_k_stdout, sizeof(__pyx_k_stdout), 0, 0, 1, 1},
  {&__pyx_n_s_sub_pyramid, __pyx_k_sub_pyramid, sizeof(__pyx_k_sub_pyramid), 0, 0, 1, 1},
  {&__pyx_n_s_success, __pyx_k_success, sizeof(__pyx_k_success), 0, 0, 1, 1},
  {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
  {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
  {&__pyx_n_s_task, __pyx_k_task, sizeof(__pyx_k_task), 0, 0, 1, 1},
  {&__pyx_n_s_task_sent, __pyx_k_task_sent, sizeof(__pyx_k_task_sent), 0, 0, 1, 1},
  {&__pyx_n_s_task_size, __pyx_k_task_size, sizeof(__pyx_k_task_size), 0, 0, 1, 1},
  {&__pyx_n_s_tasks, __pyx_k_tasks, sizeof(__pyx_k_tasks), 0, 0, 1, 1},
  {&__pyx_n_s_temp_dir, __pyx_k_temp_dir, sizeof(__pyx_k_temp_dir), 0, 0, 1, 1},
  {&__pyx_n_s_temp_dir_2, __pyx_k_temp_dir_2, sizeof(__pyx_k_temp_dir_2), 0, 0, 1, 1},
  {&__pyx_n_s_terminate, __pyx_k_terminate, sizeof(__pyx_k_terminate), 0, 0, 1, 1},
  {&__pyx_n_s_terminated_procs, __pyx_k_terminated_procs, sizeof(__pyx_k_terminated_procs), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_test_primary_tasks, __pyx_k_test_primary_tasks, sizeof(__pyx_k_test_primary_tasks), 0, 0, 1, 1},
  {&__pyx_n_s_test_pyramid_idle_count, __pyx_k_test_pyramid_idle_count, sizeof(__pyx_k_test_pyramid_idle_count), 0, 0, 1, 1},
  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
  {&__pyx_n_s_tidy_pyramid, __pyx_k_tidy_pyramid, sizeof(__pyx_k_tidy_pyramid), 0, 0, 1, 1},
  {&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1},
  {&__pyx_n_s_total, __pyx_k_total, sizeof(__pyx_k_total), 0, 0, 1, 1},
  {&__pyx_n_s_total_loners, __pyx_k_total_loners, sizeof(__pyx_k_total_loners), 0, 0, 1, 1},
  {&__pyx_n_s_total_procs, __pyx_k_total_procs, sizeof(__pyx_k_total_procs), 0, 0, 1, 1},
  {&__pyx_n_s_total_tasks, __pyx_k_total_tasks, sizeof(__pyx_k_total_tasks), 0, 0, 1, 1},
  {&__pyx_n_s_uid, __pyx_k_uid, sizeof(__pyx_k_uid), 0, 0, 1, 1},
  {&__pyx_n_s_unique, __pyx_k_unique, sizeof(__pyx_k_unique), 0, 0, 1, 1},
  {&__pyx_n_s_unpaired, __pyx_k_unpaired, sizeof(__pyx_k_unpaired), 0, 0, 1, 1},
  {&__pyx_n_s_unsorted_paths, __pyx_k_unsorted_paths, sizeof(__pyx_k_unsorted_paths), 0, 0, 1, 1},
  {&__pyx_n_s_until_eof, __pyx_k_until_eof, sizeof(__pyx_k_until_eof), 0, 0, 1, 1},
  {&__pyx_n_s_update_tasks, __pyx_k_update_tasks, sizeof(__pyx_k_update_tasks), 0, 0, 1, 1},
  {&__pyx_n_s_user_constants, __pyx_k_user_constants, sizeof(__pyx_k_user_constants), 0, 0, 1, 1},
  {&__pyx_n_s_user_rule, __pyx_k_user_rule, sizeof(__pyx_k_user_rule), 0, 0, 1, 1},
  {&__pyx_n_s_verbose, __pyx_k_verbose, sizeof(__pyx_k_verbose), 0, 0, 1, 1},
  {&__pyx_n_s_wait_for_ack, __pyx_k_wait_for_ack, sizeof(__pyx_k_wait_for_ack), 0, 0, 1, 1},
  {&__pyx_n_s_wait_for_remaining_jobs, __pyx_k_wait_for_remaining_jobs, sizeof(__pyx_k_wait_for_remaining_jobs), 0, 0, 1, 1},
  {&__pyx_n_s_waiting_update, __pyx_k_waiting_update, sizeof(__pyx_k_waiting_update), 0, 0, 1, 1},
  {&__pyx_n_s_wb, __pyx_k_wb, sizeof(__pyx_k_wb), 0, 0, 1, 1},
  {&__pyx_n_s_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1},
  {&__pyx_n_s_write_leftovers, __pyx_k_write_leftovers, sizeof(__pyx_k_write_leftovers), 0, 0, 1, 1},
  {&__pyx_n_s_write_loner, __pyx_k_write_loner, sizeof(__pyx_k_write_loner), 0, 0, 1, 1},
  {&__pyx_n_s_write_loner_2, __pyx_k_write_loner_2, sizeof(__pyx_k_write_loner_2), 0, 0, 1, 1},
  {&__pyx_n_s_written, __pyx_k_written, sizeof(__pyx_k_written), 0, 0, 1, 1},
  {&__pyx_n_s_xrange, __pyx_k_xrange, sizeof(__pyx_k_xrange), 0, 0, 1, 1},
  {&__pyx_n_s_zip, __pyx_k_zip, sizeof(__pyx_k_zip), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 16, __pyx_L1_error)
  __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 38, __pyx_L1_error)
  __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 24, __pyx_L1_error)
  __pyx_builtin_UnicodeDecodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeDecodeError); if (!__pyx_builtin_UnicodeDecodeError) __PYX_ERR(0, 89, __pyx_L1_error)
  __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 89, __pyx_L1_error)
  #if PY_MAJOR_VERSION >= 3
  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_xrange) __PYX_ERR(0, 168, __pyx_L1_error)
  #else
  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_xrange); if (!__pyx_builtin_xrange) __PYX_ERR(0, 168, __pyx_L1_error)
  #endif
  __pyx_builtin_sorted = __Pyx_GetBuiltinName(__pyx_n_s_sorted); if (!__pyx_builtin_sorted) __PYX_ERR(0, 186, __pyx_L1_error)
  __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 265, __pyx_L1_error)
  __pyx_builtin_any = __Pyx_GetBuiltinName(__pyx_n_s_any); if (!__pyx_builtin_any) __PYX_ERR(0, 308, __pyx_L1_error)
  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 393, __pyx_L1_error)
  __pyx_builtin_reversed = __Pyx_GetBuiltinName(__pyx_n_s_reversed); if (!__pyx_builtin_reversed) __PYX_ERR(0, 393, __pyx_L1_error)
  __pyx_builtin_max = __Pyx_GetBuiltinName(__pyx_n_s_max); if (!__pyx_builtin_max) __PYX_ERR(0, 615, __pyx_L1_error)
  __pyx_builtin_map = __Pyx_GetBuiltinName(__pyx_n_s_map); if (!__pyx_builtin_map) __PYX_ERR(0, 810, __pyx_L1_error)
  __pyx_builtin_filter = __Pyx_GetBuiltinName(__pyx_n_s_filter); if (!__pyx_builtin_filter) __PYX_ERR(0, 952, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "parabam/chaser.pyx":59
 * 
 *         class RuleTask(Task):
 *             def __init__(self,parent_bam,constants):             # <<<<<<<<<<<<<<
 *                 super(RuleTask,self).__init__(parent_bam=parent_bam,
 *                                                     inqu=None,
 */
  __pyx_tuple_ = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_parent_bam, __pyx_n_s_constants); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple_);
  __Pyx_GIVEREF(__pyx_tuple_);
  __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_init, 59, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 59, __pyx_L1_error)

  /* "parabam/chaser.pyx":67
 *                                                     constants=constants)
 * 
 *             def handle_pair_dict(self,pairs,unique):             # <<<<<<<<<<<<<<
 *                 self.unique = unique
 *                 results = self.__generate_results__(pairs)
 */
  __pyx_tuple__3 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_pairs, __pyx_n_s_unique, __pyx_n_s_results); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__3);
  __Pyx_GIVEREF(__pyx_tuple__3);
  __pyx_codeobj__4 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__3, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_handle_pair_dict, 67, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__4)) __PYX_ERR(0, 67, __pyx_L1_error)

  /* "parabam/chaser.pyx":75
 *                 return results
 * 
 *             def __process_task_set__(self,iterator):             # <<<<<<<<<<<<<<
 *                 user_rule = self._constants.rule
 *                 parent_bam = self._parent_bam
 */
  __pyx_tuple__5 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_iterator, __pyx_n_s_user_rule, __pyx_n_s_parent_bam, __pyx_n_s_handle_output, __pyx_n_s_user_constants, __pyx_n_s_read_name, __pyx_n_s_pair, __pyx_n_s_rule_output); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 75, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__5);
  __Pyx_GIVEREF(__pyx_tuple__5);
  __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__5, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_process_task_set, 75, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 75, __pyx_L1_error)

  /* "parabam/chaser.pyx":85
 *                     handle_output(rule_output,pair)
 * 
 *             def __get_temp_path__(self,identity):             # <<<<<<<<<<<<<<
 *                 parent_bam_file_name = self._parent_bam.filename
 *                 try:
 */
  __pyx_tuple__7 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_identity, __pyx_n_s_parent_bam_file_name, __pyx_n_s_file_name); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__7);
  __Pyx_GIVEREF(__pyx_tuple__7);
  __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__7, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_get_temp_path, 85, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 85, __pyx_L1_error)

  /* "parabam/chaser.pyx":489
 *     def __is_queue_empty__(self):
 *         try:
 *             pack = self._inqu.get(True,10)             # <<<<<<<<<<<<<<
 *             self._inqu.put(pack)
 *             return False
 */
  __pyx_tuple__10 = PyTuple_Pack(2, Py_True, __pyx_int_10); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);

  /* "parabam/chaser.pyx":543
 * 
 *     def __wait_for_remaining_jobs__(self):
 *         def waiting_update(found,total):             # <<<<<<<<<<<<<<
 *             sys.stdout.write(("\r\t- Waiting for tasks to finish: %d/%d ") % \
 *                                                             (found,total))
 */
  __pyx_tuple__11 = PyTuple_Pack(2, __pyx_n_s_found, __pyx_n_s_total); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__11);
  __Pyx_GIVEREF(__pyx_tuple__11);
  __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__11, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_waiting_update, 543, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 543, __pyx_L1_error)

  /* "parabam/chaser.pyx":871
 *         super(MatchMakerHandler,self).__init__(constants,max_reads,
 *                                                 child_pack, pid)
 *         self.LonerInfo = namedtuple("LonerInfo","paths level loner_type")             # <<<<<<<<<<<<<<
 * 
 *     def run(self,loner_paths,loner_type,level,fragment_leftovers):
 */
  __pyx_tuple__15 = PyTuple_Pack(2, __pyx_n_s_LonerInfo, __pyx_kp_s_paths_level_loner_type); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);

  /* "parabam/chaser.pyx":23
 * 
 * class ChaserResults(parabam.core.Package):
 *     def __init__(self,results,chaser_type):             # <<<<<<<<<<<<<<
 *         super(ChaserResults,self).__init__(results)
 *         self.chaser_type=chaser_type
 */
  __pyx_tuple__18 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_results, __pyx_n_s_chaser_type); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__18);
  __Pyx_GIVEREF(__pyx_tuple__18);
  __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_init, 23, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(0, 23, __pyx_L1_error)

  /* "parabam/chaser.pyx":28
 * 
 * class PrimaryResults(ChaserResults):
 *     def __init__(self,results,chaser_type):             # <<<<<<<<<<<<<<
 *         super(PrimaryResults,self).__init__(results,chaser_type)
 * 
 */
  __pyx_tuple__20 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_results, __pyx_n_s_chaser_type); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);
  __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_init, 28, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(0, 28, __pyx_L1_error)

  /* "parabam/chaser.pyx":32
 * 
 * class MatchMakerResults(ChaserResults):
 *     def __init__(self,loner_type,results,chaser_type,rescued,level):             # <<<<<<<<<<<<<<
 *         super(MatchMakerResults,self).__init__(results,chaser_type)
 *         self.rescued = rescued
 */
  __pyx_tuple__22 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_loner_type, __pyx_n_s_results, __pyx_n_s_chaser_type, __pyx_n_s_rescued, __pyx_n_s_level); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__22);
  __Pyx_GIVEREF(__pyx_tuple__22);
  __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_init, 32, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(0, 32, __pyx_L1_error)

  /* "parabam/chaser.pyx":38
 *         self.level = level
 * 
 * class JobPackage(object):             # <<<<<<<<<<<<<<
 *     def __init__(self,paths,loner_type,level,fragment_leftovers=False):
 *         self.paths = paths
 */
  __pyx_tuple__24 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__24);
  __Pyx_GIVEREF(__pyx_tuple__24);

  /* "parabam/chaser.pyx":39
 * 
 * class JobPackage(object):
 *     def __init__(self,paths,loner_type,level,fragment_leftovers=False):             # <<<<<<<<<<<<<<
 *         self.paths = paths
 *         self.loner_type = loner_type
 */
  __pyx_tuple__25 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_paths, __pyx_n_s_loner_type, __pyx_n_s_level, __pyx_n_s_fragment_leftovers); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__25);
  __Pyx_GIVEREF(__pyx_tuple__25);
  __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_init, 39, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 39, __pyx_L1_error)
  __pyx_tuple__27 = PyTuple_Pack(1, ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__27);
  __Pyx_GIVEREF(__pyx_tuple__27);

  /* "parabam/chaser.pyx":47
 * class Handler(parabam.core.Handler):
 * 
 *     def __init__(self,object parent_bam, object output_paths,             # <<<<<<<<<<<<<<
 *                       object inqu,object constants,object pause_qus,
 *                       dict out_qu_dict,object Task):
 */
  __pyx_tuple__28 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_parent_bam, __pyx_n_s_output_paths, __pyx_n_s_inqu, __pyx_n_s_constants, __pyx_n_s_pause_qus, __pyx_n_s_out_qu_dict, __pyx_n_s_Task, __pyx_n_s_RuleTask); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__28);
  __Pyx_GIVEREF(__pyx_tuple__28);
  __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(8, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_init, 47, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 47, __pyx_L1_error)

  /* "parabam/chaser.pyx":135
 *         #self._pause_debug = self.__pause_debug__
 * 
 *     def __pause_debug__(self, message):             # <<<<<<<<<<<<<<
 *         print "PAUSE DEBUG:: ", message
 * 
 */
  __pyx_tuple__30 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_message); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__30);
  __Pyx_GIVEREF(__pyx_tuple__30);
  __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_pause_debug_2, 135, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 135, __pyx_L1_error)

  /* "parabam/chaser.pyx":138
 *         print "PAUSE DEBUG:: ", message
 * 
 *     def __print_debug__(self,iterations):             # <<<<<<<<<<<<<<
 *         if iterations % 50 == 0 or iterations == -1:
 * 
 */
  __pyx_tuple__32 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_iterations); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__32);
  __Pyx_GIVEREF(__pyx_tuple__32);
  __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_print_debug, 138, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 138, __pyx_L1_error)

  /* "parabam/chaser.pyx":166
 *             print ""
 * 
 *     def __create_chaser_tasks__(self,total_tasks):             # <<<<<<<<<<<<<<
 *         tasks = []
 *         for i in xrange(total_tasks):
 */
  __pyx_tuple__34 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_total_tasks, __pyx_n_s_tasks, __pyx_n_s_i, __pyx_n_s_task); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__34);
  __Pyx_GIVEREF(__pyx_tuple__34);
  __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_create_chaser_tasks, 166, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 166, __pyx_L1_error)

  /* "parabam/chaser.pyx":178
 *         return tasks
 * 
 *     def __get_chrom_bins__(self,parent_bam):             # <<<<<<<<<<<<<<
 *         # Create chromosome `bins` by grouping together smaller chromosomes
 * 
 */
  __pyx_tuple__36 = PyTuple_Pack(12, __pyx_n_s_self, __pyx_n_s_parent_bam, __pyx_n_s_references, __pyx_n_s_lengths, __pyx_n_s_chrom_bins, __pyx_n_s_chrom_info, __pyx_n_s_group, __pyx_n_s_size, __pyx_n_s_uid, __pyx_n_s_i, __pyx_n_s_name_2, __pyx_n_s_length); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);
  __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(2, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_get_chrom_bins, 178, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 178, __pyx_L1_error)

  /* "parabam/chaser.pyx":202
 *         return chrom_bins
 * 
 *     def __instalise_primary_store__(self):             # <<<<<<<<<<<<<<
 *         return []
 * 
 */
  __pyx_tuple__38 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__38);
  __Pyx_GIVEREF(__pyx_tuple__38);
  __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_instalise_primary_store, 202, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 202, __pyx_L1_error)

  /* "parabam/chaser.pyx":205
 *         return []
 * 
 *     def __instalise_loner_pyramid__(self):             # <<<<<<<<<<<<<<
 *         return {}
 * 
 */
  __pyx_tuple__40 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__40);
  __Pyx_GIVEREF(__pyx_tuple__40);
  __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_instalise_loner_pyramid, 205, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 205, __pyx_L1_error)

  /* "parabam/chaser.pyx":208
 *         return {}
 * 
 *     def __update_tasks__(self,active_tasks):             # <<<<<<<<<<<<<<
 *         terminated_procs = []
 *         for pr in active_tasks:
 */
  __pyx_tuple__42 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_active_tasks, __pyx_n_s_terminated_procs, __pyx_n_s_pr); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__42);
  __Pyx_GIVEREF(__pyx_tuple__42);
  __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_update_tasks, 208, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 208, __pyx_L1_error)

  /* "parabam/chaser.pyx":226
 *         return len(active_tasks)
 * 
 *     def __new_package_action__(self,new_package,**kwargs):             # <<<<<<<<<<<<<<
 *         chaser_type = new_package.chaser_type
 *         if chaser_type == "origin":
 */
  __pyx_tuple__44 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_new_package, __pyx_n_s_kwargs, __pyx_n_s_chaser_type); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__44);
  __Pyx_GIVEREF(__pyx_tuple__44);
  __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_new_package_action, 226, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 226, __pyx_L1_error)

  /* "parabam/chaser.pyx":239
 *             print "Error!"
 * 
 *     def __handle_origin_task__(self,new_package):             # <<<<<<<<<<<<<<
 *         for loner_count,path in new_package.results:
 *             if loner_count == 0:
 */
  __pyx_tuple__46 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_new_package, __pyx_n_s_loner_count, __pyx_n_s_path); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__46);
  __Pyx_GIVEREF(__pyx_tuple__46);
  __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__46, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_handle_origin_task, 239, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(0, 239, __pyx_L1_error)

  /* "parabam/chaser.pyx":247
 *                 self._primary_store.append(path)
 * 
 *     def __handle_match_maker__(self,new_package):             # <<<<<<<<<<<<<<
 *         loner_type = new_package.loner_type
 *         level = new_package.level
 */
  __pyx_tuple__48 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_new_package, __pyx_n_s_loner_type, __pyx_n_s_level, __pyx_n_s_loner_level, __pyx_n_s_loner_path, __pyx_n_s_pyramid); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__48);
  __Pyx_GIVEREF(__pyx_tuple__48);
  __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_handle_match_maker, 247, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(0, 247, __pyx_L1_error)

  /* "parabam/chaser.pyx":278
 *                 self._stale_count += 1
 * 
 *     def __handle_primary_task__(self,new_package):             # <<<<<<<<<<<<<<
 *         for match_package in new_package.results:
 *             self.__handle_match_maker__(match_package)
 */
  __pyx_tuple__50 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_new_package, __pyx_n_s_match_package); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__50);
  __Pyx_GIVEREF(__pyx_tuple__50);
  __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_handle_primary_task, 278, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(0, 278, __pyx_L1_error)

  /* "parabam/chaser.pyx":282
 *             self.__handle_match_maker__(match_package)
 * 
 *     def __test_primary_tasks__(self,required_paths=10):             # <<<<<<<<<<<<<<
 *         task_sent = False
 *         if len(self._primary_store) >= required_paths:
 */
  __pyx_tuple__52 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_required_paths, __pyx_n_s_task_sent); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__52);
  __Pyx_GIVEREF(__pyx_tuple__52);
  __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_test_primary_tasks, 282, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(0, 282, __pyx_L1_error)
  __pyx_tuple__54 = PyTuple_Pack(1, ((PyObject *)__pyx_int_10)); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__54);
  __Pyx_GIVEREF(__pyx_tuple__54);

  /* "parabam/chaser.pyx":293
 *             time.sleep(1)
 * 
 *     def __start_primary_task__(self):             # <<<<<<<<<<<<<<
 *         self.__start_job__(self._primary_store,"Primary",-1)
 * 
 */
  __pyx_tuple__55 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__55);
  __Pyx_GIVEREF(__pyx_tuple__55);
  __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__55, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_start_primary_task, 293, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 293, __pyx_L1_error)

  /* "parabam/chaser.pyx":296
 *         self.__start_job__(self._primary_store,"Primary",-1)
 * 
 *     def __start_matchmaker_task__(self,paths,loner_type,level):             # <<<<<<<<<<<<<<
 *         self.__start_job__(paths,loner_type,level)
 * 
 */
  __pyx_tuple__57 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_paths, __pyx_n_s_loner_type, __pyx_n_s_level); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__57);
  __Pyx_GIVEREF(__pyx_tuple__57);
  __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_start_matchmaker_task, 296, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 296, __pyx_L1_error)

  /* "parabam/chaser.pyx":299
 *         self.__start_job__(paths,loner_type,level)
 * 
 *     def __start_job__(self,paths,loner_type,level):             # <<<<<<<<<<<<<<
 *         fragment_leftovers = self.__request_fragment_output__(paths)
 * 
 */
  __pyx_tuple__59 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_paths, __pyx_n_s_loner_type, __pyx_n_s_level, __pyx_n_s_fragment_leftovers, __pyx_n_s_job); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__59);
  __Pyx_GIVEREF(__pyx_tuple__59);
  __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_start_job, 299, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 299, __pyx_L1_error)

  /* "parabam/chaser.pyx":306
 *         self._chaser_qu.put(job)
 * 
 *     def __request_fragment_output__(self,paths):             # <<<<<<<<<<<<<<
 *         if self._destroy and self._stale_count > 10:
 *             has_large_file = any([ (os.path.getsize(path) / 100) \
 */
  __pyx_tuple__61 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_paths, __pyx_n_s_has_large_file, __pyx_n_s_path); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__61);
  __Pyx_GIVEREF(__pyx_tuple__61);
  __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_request_fragment_output, 306, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 306, __pyx_L1_error)

  /* "parabam/chaser.pyx":316
 *         return False
 * 
 *     def __pause_monitor__(self):             # <<<<<<<<<<<<<<
 *         if not self._destroy:
 *             max_jobs = self._max_jobs
 */
  __pyx_tuple__63 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_max_jobs_2, __pyx_n_s_qu); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__63);
  __Pyx_GIVEREF(__pyx_tuple__63);
  __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_pause_monitor, 316, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 316, __pyx_L1_error)

  /* "parabam/chaser.pyx":333
 *                 self._file_readers_paused = False
 * 
 *     def __wait_for_ack__(self, qu):             # <<<<<<<<<<<<<<
 *         self._pause_debug("Chaser || WAITNG FOR ACK")
 *         boomerang_count = 0
 */
  __pyx_tuple__65 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_qu, __pyx_n_s_boomerang_count, __pyx_n_s_ack); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__65);
  __Pyx_GIVEREF(__pyx_tuple__65);
  __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_wait_for_ack, 333, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(0, 333, __pyx_L1_error)

  /* "parabam/chaser.pyx":354
 *                 time.sleep(2)
 * 
 *     def __fatal_check__(self):             # <<<<<<<<<<<<<<
 *         collected_packs = []
 *         destroy_found = False
 */
  __pyx_tuple__67 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_collected_packs, __pyx_n_s_destroy_found, __pyx_n_s_package, __pyx_n_s_pack); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__67);
  __Pyx_GIVEREF(__pyx_tuple__67);
  __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__67, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_fatal_check, 354, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(0, 354, __pyx_L1_error)

  /* "parabam/chaser.pyx":379
 *         return True
 * 
 *     def __periodic_action__(self,iterations):             # <<<<<<<<<<<<<<
 * 
 *         self.__pause_monitor__()
 */
  __pyx_tuple__69 = PyTuple_Pack(12, __pyx_n_s_self, __pyx_n_s_iterations, __pyx_n_s_idle_threshold, __pyx_n_s_required_paths, __pyx_n_s_pyramid_idle_counts_2, __pyx_n_s_loner_type, __pyx_n_s_pyramid, __pyx_n_s_i, __pyx_n_s_sub_pyramid, __pyx_n_s_level, __pyx_n_s_paths, __pyx_n_s_path); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__69);
  __Pyx_GIVEREF(__pyx_tuple__69);
  __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(2, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_periodic_action, 379, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(0, 379, __pyx_L1_error)

  /* "parabam/chaser.pyx":418
 *             gc.collect()
 * 
 *     def __test_pyramid_idle_count__(self,pyramid,loner_type,pyramid_idle_counts):             # <<<<<<<<<<<<<<
 *         #Idle counting is the mechanism whereby loners that have no
 *         #match can be entered into `purgatory` thus clearing the pyramid.
 */
  __pyx_tuple__71 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_pyramid, __pyx_n_s_loner_type, __pyx_n_s_pyramid_idle_counts_2, __pyx_n_s_idle_success, __pyx_n_s_idle_paths, __pyx_n_s_idle_levels, __pyx_n_s_idle_level, __pyx_n_s_idle_path); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__71);
  __Pyx_GIVEREF(__pyx_tuple__71);
  __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__71, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_test_pyramid_idle_count, 418, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(0, 418, __pyx_L1_error)

  /* "parabam/chaser.pyx":445
 *         del idle_paths,idle_levels
 * 
 *     def __finish_test__(self):             # <<<<<<<<<<<<<<
 *         if self._destroy:
 * 
 */
  __pyx_tuple__73 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_saved, __pyx_n_s_finished_2); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__73);
  __Pyx_GIVEREF(__pyx_tuple__73);
  __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__73, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_finish_test, 445, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(0, 445, __pyx_L1_error)

  /* "parabam/chaser.pyx":468
 *                 self._finished = True
 * 
 *     def __add_post_destory_chaser_tasks__(self):             # <<<<<<<<<<<<<<
 *         if self._destroy and not self._post_destroy_tasks_added:
 *             self._post_destroy_tasks_added = True
 */
  __pyx_tuple__75 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_post_destroy_tasks); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__75);
  __Pyx_GIVEREF(__pyx_tuple__75);
  __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_add_post_destory_chaser_tasks, 468, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(0, 468, __pyx_L1_error)

  /* "parabam/chaser.pyx":477
 *             self._chaser_tasks.extend(post_destroy_tasks)
 * 
 *     def __pyramid_is_empty__(self,saved):             # <<<<<<<<<<<<<<
 *         return (self._files_in_pyramid == 0 and \
 *                 self._pending_jobs == 0 and \
 */
  __pyx_tuple__77 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_saved); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__77);
  __Pyx_GIVEREF(__pyx_tuple__77);
  __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_pyramid_is_empty, 477, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(0, 477, __pyx_L1_error)

  /* "parabam/chaser.pyx":483
 *                 self.__is_queue_empty__())
 * 
 *     def __set_new_stale_thresh__(self):             # <<<<<<<<<<<<<<
 *         self._stale_thresh = (10 + (self._files_in_pyramid * 5) \
 *                                  + (self._pending_jobs * 8))
 */
  __pyx_tuple__79 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__79);
  __Pyx_GIVEREF(__pyx_tuple__79);
  __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_set_new_stale_thresh, 483, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 483, __pyx_L1_error)

  /* "parabam/chaser.pyx":487
 *                                  + (self._pending_jobs * 8))
 * 
 *     def __is_queue_empty__(self):             # <<<<<<<<<<<<<<
 *         try:
 *             pack = self._inqu.get(True,10)
 */
  __pyx_tuple__81 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pack); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__81);
  __Pyx_GIVEREF(__pyx_tuple__81);
  __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_is_queue_empty, 487, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 487, __pyx_L1_error)

  /* "parabam/chaser.pyx":495
 *             return True
 * 
 *     def __save_purgatory_loners__(self):             # <<<<<<<<<<<<<<
 *         saved = 0
 *         saved_keys = []
 */
  __pyx_tuple__83 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_saved, __pyx_n_s_saved_keys, __pyx_n_s_loner_type, __pyx_n_s_paths, __pyx_n_s_path, __pyx_n_s_key); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__83);
  __Pyx_GIVEREF(__pyx_tuple__83);
  __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_save_purgatory_loners, 495, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(0, 495, __pyx_L1_error)

  /* "parabam/chaser.pyx":510
 *         return saved
 * 
 *     def __add_to_pyramid__(self,loner_type,level,path):             # <<<<<<<<<<<<<<
 *         self._loner_pyramid[loner_type][level].append(path)
 *         self._files_in_pyramid += 1
 */
  __pyx_tuple__85 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_loner_type, __pyx_n_s_level, __pyx_n_s_path); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__85);
  __Pyx_GIVEREF(__pyx_tuple__85);
  __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_add_to_pyramid, 510, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(0, 510, __pyx_L1_error)

  /* "parabam/chaser.pyx":514
 *         self._files_in_pyramid += 1
 * 
 *     def __remove_from_pyramid__(self,loner_type,level,path):             # <<<<<<<<<<<<<<
 *         self._loner_pyramid[loner_type][level].remove(path)
 *         self._files_in_pyramid -= 1
 */
  __pyx_tuple__87 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_loner_type, __pyx_n_s_level, __pyx_n_s_path); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__87);
  __Pyx_GIVEREF(__pyx_tuple__87);
  __pyx_codeobj__88 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__87, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_remove_from_pyramid, 514, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__88)) __PYX_ERR(0, 514, __pyx_L1_error)

  /* "parabam/chaser.pyx":518
 *         self._files_in_pyramid -= 1
 * 
 *     def __get_paths__(self,loner_type,sub_pyramid,level):             # <<<<<<<<<<<<<<
 *         if not self._destroy and "UM" in loner_type:
 *             return []
 */
  __pyx_tuple__89 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_loner_type, __pyx_n_s_sub_pyramid, __pyx_n_s_level, __pyx_n_s_task_size); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__89);
  __Pyx_GIVEREF(__pyx_tuple__89);
  __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__89, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_get_paths, 518, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(0, 518, __pyx_L1_error)

  /* "parabam/chaser.pyx":529
 *         return []
 * 
 *     def __tidy_pyramid__(self):             # <<<<<<<<<<<<<<
 *         reads_found = self.__wait_for_remaining_jobs__()
 * 
 */
  __pyx_tuple__91 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_reads_found, __pyx_n_s_loner_type, __pyx_n_s_pyramid, __pyx_n_s_level, __pyx_n_s_sub_pyramid, __pyx_n_s_path); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__91);
  __Pyx_GIVEREF(__pyx_tuple__91);
  __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__91, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_tidy_pyramid, 529, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) __PYX_ERR(0, 529, __pyx_L1_error)

  /* "parabam/chaser.pyx":542
 *             return False
 * 
 *     def __wait_for_remaining_jobs__(self):             # <<<<<<<<<<<<<<
 *         def waiting_update(found,total):
 *             sys.stdout.write(("\r\t- Waiting for tasks to finish: %d/%d ") % \
 */
  __pyx_tuple__93 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_waiting_update, __pyx_n_s_waiting_update, __pyx_n_s_prev_found, __pyx_n_s_jobs_at_start, __pyx_n_s_jobs_found, __pyx_n_s_i, __pyx_n_s_pack); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__93);
  __Pyx_GIVEREF(__pyx_tuple__93);
  __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__93, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_wait_for_remaining_jobs, 542, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) __PYX_ERR(0, 542, __pyx_L1_error)

  /* "parabam/chaser.pyx":577
 *         return prev_found < self._rescued["total"]
 * 
 *     def __clear_subpyramid__(self,success,destroy,running):             # <<<<<<<<<<<<<<
 *         if success:
 *             #If the idle task was sent, clear pyramid
 */
  __pyx_tuple__95 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_success, __pyx_n_s_destroy_2, __pyx_n_s_running); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__95);
  __Pyx_GIVEREF(__pyx_tuple__95);
  __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__95, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_clear_subpyramid, 577, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(0, 577, __pyx_L1_error)

  /* "parabam/chaser.pyx":593
 *             return False
 * 
 *     def __idle_routine__(self,pyramid,loner_type):             # <<<<<<<<<<<<<<
 *         if "UM" in loner_type and not self._destroy:
 *             #Don't conduct idle on UMs because we don't expect to see pairs
 */
  __pyx_tuple__97 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_pyramid, __pyx_n_s_loner_type, __pyx_n_s_all_paths, __pyx_n_s_level, __pyx_n_s_sub_pyramid, __pyx_n_s_success, __pyx_n_s_idle_paths, __pyx_n_s_idle_levels, __pyx_n_s_path_n, __pyx_n_s_idle_tuples); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__97);
  __Pyx_GIVEREF(__pyx_tuple__97);
  __pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(3, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__97, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_idle_routine, 593, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__98)) __PYX_ERR(0, 593, __pyx_L1_error)

  /* "parabam/chaser.pyx":623
 *         return success,idle_paths,idle_levels
 * 
 *     def __get_task_size__(self,level,loner_type):             # <<<<<<<<<<<<<<
 *         if level % 2 == 0:
 *             task_size = 2
 */
  __pyx_tuple__99 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_level, __pyx_n_s_loner_type, __pyx_n_s_task_size); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__99);
  __Pyx_GIVEREF(__pyx_tuple__99);
  __pyx_codeobj__100 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__99, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_get_task_size, 623, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__100)) __PYX_ERR(0, 623, __pyx_L1_error)

  /* "parabam/chaser.pyx":630
 *         return task_size
 * 
 *     def __handler_exit__(self,**kwargs):             # <<<<<<<<<<<<<<
 *         for i in xrange(len(self._chaser_tasks)+1):
 *            self._chaser_qu.put(DestroyPackage())
 */
  __pyx_tuple__101 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_kwargs, __pyx_n_s_i, __pyx_n_s_remaining_reads, __pyx_n_s_qu); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__101);
  __Pyx_GIVEREF(__pyx_tuple__101);
  __pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__101, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_handler_exit, 630, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(0, 630, __pyx_L1_error)

  /* "parabam/chaser.pyx":657
 *             qu.close()
 * 
 *     def __post_destroy_report__(self):             # <<<<<<<<<<<<<<
 *         if self._constants.verbose:
 *             if self._post_destroy_count >= self._post_destroy_thresh:
 */
  __pyx_tuple__103 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(0, 657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__103);
  __Pyx_GIVEREF(__pyx_tuple__103);
  __pyx_codeobj__104 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__103, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_post_destroy_report, 657, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__104)) __PYX_ERR(0, 657, __pyx_L1_error)

  /* "parabam/chaser.pyx":676
 * 
 * class ChaserTask(Process):
 *     def __init__(self,object constants,object inqu, object outqu,             # <<<<<<<<<<<<<<
 *                       int max_reads, dict child_pack):
 *         super(ChaserTask,self).__init__()
 */
  __pyx_tuple__105 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_constants, __pyx_n_s_inqu, __pyx_n_s_outqu, __pyx_n_s_max_reads, __pyx_n_s_child_pack_2); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(0, 676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__105);
  __Pyx_GIVEREF(__pyx_tuple__105);
  __pyx_codeobj__106 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__105, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_init, 676, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__106)) __PYX_ERR(0, 676, __pyx_L1_error)

  /* "parabam/chaser.pyx":685
 *         self._max_reads = max_reads
 * 
 *     def run(self):             # <<<<<<<<<<<<<<
 *         primary_handler = PrimaryHandler(constants = self._constants,
 *                                          max_reads = self._max_reads,
 */
  __pyx_tuple__107 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_primary_handler, __pyx_n_s_match_handler, __pyx_n_s_package, __pyx_n_s_results); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(0, 685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__107);
  __Pyx_GIVEREF(__pyx_tuple__107);
  __pyx_codeobj__108 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__107, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_run, 685, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__108)) __PYX_ERR(0, 685, __pyx_L1_error)

  /* "parabam/chaser.pyx":718
 *         return
 * 
 * class ChaserHandler(object):             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self,object constants,int max_reads, dict child_pack,int pid):
 */
  __pyx_tuple__109 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(0, 718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__109);
  __Pyx_GIVEREF(__pyx_tuple__109);

  /* "parabam/chaser.pyx":720
 * class ChaserHandler(object):
 * 
 *     def __init__(self,object constants,int max_reads, dict child_pack,int pid):             # <<<<<<<<<<<<<<
 *         self._constants = constants
 *         self._max_reads = max_reads
 */
  __pyx_tuple__110 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_constants, __pyx_n_s_max_reads, __pyx_n_s_child_pack_2, __pyx_n_s_pid); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(0, 720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__110);
  __Pyx_GIVEREF(__pyx_tuple__110);
  __pyx_codeobj__111 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__110, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_init, 720, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__111)) __PYX_ERR(0, 720, __pyx_L1_error)

  /* "parabam/chaser.pyx":729
 *         self.pid = pid
 * 
 *     def __get_loner_temp_path__(self,loner_type,level=0,unique=""):             # <<<<<<<<<<<<<<
 *         self._record += 1
 *         return "%s/%s_%d_%d_%s_%s.bam" %\
 */
  __pyx_tuple__112 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_loner_type, __pyx_n_s_level, __pyx_n_s_unique); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(0, 729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__112);
  __Pyx_GIVEREF(__pyx_tuple__112);
  __pyx_codeobj__113 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__112, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_get_loner_temp_path, 729, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__113)) __PYX_ERR(0, 729, __pyx_L1_error)
  __pyx_tuple__114 = PyTuple_Pack(2, ((PyObject *)__pyx_int_0), ((PyObject*)__pyx_kp_s__9)); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(0, 729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__114);
  __Pyx_GIVEREF(__pyx_tuple__114);

  /* "parabam/chaser.pyx":737
 * class PrimaryHandler(ChaserHandler):
 * 
 *     def __init__(self,object constants, int max_reads, dict child_pack,int pid):             # <<<<<<<<<<<<<<
 *         super(PrimaryHandler,self).__init__(constants,max_reads,child_pack,pid)
 *         self.match_handler = MatchMakerHandler(constants,
 */
  __pyx_tuple__115 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_constants, __pyx_n_s_max_reads, __pyx_n_s_child_pack_2, __pyx_n_s_pid); if (unlikely(!__pyx_tuple__115)) __PYX_ERR(0, 737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__115);
  __Pyx_GIVEREF(__pyx_tuple__115);
  __pyx_codeobj__116 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__115, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_init, 737, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__116)) __PYX_ERR(0, 737, __pyx_L1_error)

  /* "parabam/chaser.pyx":743
 *                                                child_pack,pid)
 * 
 *     def run(self,unsorted_paths):             # <<<<<<<<<<<<<<
 *         #speedup
 *         write_loner = self.__write_loner__
 */
  __pyx_tuple__117 = PyTuple_Pack(14, __pyx_n_s_self, __pyx_n_s_unsorted_paths, __pyx_n_s_write_loner_2, __pyx_n_s_loner_holder, __pyx_n_s_loner_file_counts, __pyx_n_s_loner_total, __pyx_n_s_chrom_bins, __pyx_n_s_read, __pyx_n_s_loner_type, __pyx_n_s_loner_paths, __pyx_n_s_match_maker_results, __pyx_n_s_paths, __pyx_n_s_path, __pyx_n_s_matchmaker_result); if (unlikely(!__pyx_tuple__117)) __PYX_ERR(0, 743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__117);
  __Pyx_GIVEREF(__pyx_tuple__117);
  __pyx_codeobj__118 = (PyObject*)__Pyx_PyCode_New(2, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__117, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_run, 743, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__118)) __PYX_ERR(0, 743, __pyx_L1_error)

  /* "parabam/chaser.pyx":778
 *         return PrimaryResults(match_maker_results,"primary")
 * 
 *     def __handle_unpaired_reads__(self, loner_type, path):             # <<<<<<<<<<<<<<
 *         read_count = 0
 * 
 */
  __pyx_tuple__119 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_loner_type, __pyx_n_s_path, __pyx_n_s_read_count, __pyx_n_s_bam_file, __pyx_n_s_r, __pyx_n_s_loner_pack); if (unlikely(!__pyx_tuple__119)) __PYX_ERR(0, 778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__119);
  __Pyx_GIVEREF(__pyx_tuple__119);
  __pyx_codeobj__120 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__119, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_handle_unpaired_reads, 778, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__120)) __PYX_ERR(0, 778, __pyx_L1_error)

  /* "parabam/chaser.pyx":793
 *         return loner_pack
 * 
 *     def __start_matchmaker_task__(self,paths,loner_type,level):             # <<<<<<<<<<<<<<
 *         return self.match_handler.run(paths,loner_type,
 *                                       level,fragment_leftovers=False)
 */
  __pyx_tuple__121 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_paths, __pyx_n_s_loner_type, __pyx_n_s_level); if (unlikely(!__pyx_tuple__121)) __PYX_ERR(0, 793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__121);
  __Pyx_GIVEREF(__pyx_tuple__121);
  __pyx_codeobj__122 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__121, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_start_matchmaker_task, 793, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__122)) __PYX_ERR(0, 793, __pyx_L1_error)

  /* "parabam/chaser.pyx":797
 *                                       level,fragment_leftovers=False)
 * 
 *     def __read_generator__(self,unsorted_paths):             # <<<<<<<<<<<<<<
 *         for path in unsorted_paths:
 *             loner_object = pysam.AlignmentFile(path,"rb")
 */
  __pyx_tuple__123 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_unsorted_paths, __pyx_n_s_path, __pyx_n_s_loner_object, __pyx_n_s_read); if (unlikely(!__pyx_tuple__123)) __PYX_ERR(0, 797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__123);
  __Pyx_GIVEREF(__pyx_tuple__123);
  __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__123, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_read_generator, 797, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 797, __pyx_L1_error)

  /* "parabam/chaser.pyx":806
 *         gc.collect()
 * 
 *     def __get_reference_id_name__(self,read,bins):             # <<<<<<<<<<<<<<
 *         if read.reference_id == read.next_reference_id:
 *             return "XX%dv%d" % (read.reference_id,read.next_reference_id)
 */
  __pyx_tuple__124 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_read, __pyx_n_s_bins, __pyx_n_s_class_bins); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(0, 806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__124);
  __Pyx_GIVEREF(__pyx_tuple__124);
  __pyx_codeobj__125 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__124, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_get_reference_id_name, 806, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__125)) __PYX_ERR(0, 806, __pyx_L1_error)

  /* "parabam/chaser.pyx":815
 *             return "MM%sv%s" % tuple(class_bins)
 * 
 *     def __get_loner_type__(self,read,bins):             # <<<<<<<<<<<<<<
 *         if not read.is_paired:
 *             #read is not paired!
 */
  __pyx_tuple__126 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_read, __pyx_n_s_bins, __pyx_n_s_loner_type); if (unlikely(!__pyx_tuple__126)) __PYX_ERR(0, 815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__126);
  __Pyx_GIVEREF(__pyx_tuple__126);
  __pyx_codeobj__127 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__126, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_get_loner_type, 815, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__127)) __PYX_ERR(0, 815, __pyx_L1_error)

  /* "parabam/chaser.pyx":830
 *         return loner_type
 * 
 *     def __get_loner_holder__(self):             # <<<<<<<<<<<<<<
 *         holder = {}
 *         return holder
 */
  __pyx_tuple__128 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_holder); if (unlikely(!__pyx_tuple__128)) __PYX_ERR(0, 830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__128);
  __Pyx_GIVEREF(__pyx_tuple__128);
  __pyx_codeobj__129 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__128, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_get_loner_holder, 830, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__129)) __PYX_ERR(0, 830, __pyx_L1_error)

  /* "parabam/chaser.pyx":834
 *         return holder
 * 
 *     def __get_loner_object__(self,loner_type,unique):             # <<<<<<<<<<<<<<
 *         path = self.__get_loner_temp_path__(loner_type,0,unique=\
 *                                                         "-%d" % (unique,) )
 */
  __pyx_tuple__130 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_loner_type, __pyx_n_s_unique, __pyx_n_s_path); if (unlikely(!__pyx_tuple__130)) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__130);
  __Pyx_GIVEREF(__pyx_tuple__130);
  __pyx_codeobj__131 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__130, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_get_loner_object, 834, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__131)) __PYX_ERR(0, 834, __pyx_L1_error)

  /* "parabam/chaser.pyx":839
 *         return pysam.AlignmentFile(path,"wb",header=self._header)
 * 
 *     def __write_loner__(self,loner_objects,loner_file_counts,loner_type,read):             # <<<<<<<<<<<<<<
 *         try:
 *             loner_path = loner_objects[loner_type][-1].filename
 */
  __pyx_tuple__132 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_loner_objects, __pyx_n_s_loner_file_counts, __pyx_n_s_loner_type, __pyx_n_s_read, __pyx_n_s_loner_path, __pyx_n_s_new_bam_object); if (unlikely(!__pyx_tuple__132)) __PYX_ERR(0, 839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__132);
  __Pyx_GIVEREF(__pyx_tuple__132);
  __pyx_codeobj__133 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_write_loner, 839, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__133)) __PYX_ERR(0, 839, __pyx_L1_error)

  /* "parabam/chaser.pyx":857
 *         loner_objects[loner_type][-1].write(read)
 * 
 *     def __get_paths_and_close__(self,loner_holder):             # <<<<<<<<<<<<<<
 *         paths = {}
 *         for loner_type,loner_objects in loner_holder.items():
 */
  __pyx_tuple__134 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_loner_holder, __pyx_n_s_paths, __pyx_n_s_loner_type, __pyx_n_s_loner_objects, __pyx_n_s_loner_object); if (unlikely(!__pyx_tuple__134)) __PYX_ERR(0, 857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__134);
  __Pyx_GIVEREF(__pyx_tuple__134);
  __pyx_codeobj__135 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__134, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_get_paths_and_close, 857, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__135)) __PYX_ERR(0, 857, __pyx_L1_error)

  /* "parabam/chaser.pyx":868
 * class MatchMakerHandler(ChaserHandler):
 * 
 *     def __init__(self,object constants,int max_reads, dict child_pack,int pid):             # <<<<<<<<<<<<<<
 *         super(MatchMakerHandler,self).__init__(constants,max_reads,
 *                                                 child_pack, pid)
 */
  __pyx_tuple__136 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_constants, __pyx_n_s_max_reads, __pyx_n_s_child_pack_2, __pyx_n_s_pid); if (unlikely(!__pyx_tuple__136)) __PYX_ERR(0, 868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__136);
  __Pyx_GIVEREF(__pyx_tuple__136);
  __pyx_codeobj__137 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__136, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_init, 868, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__137)) __PYX_ERR(0, 868, __pyx_L1_error)

  /* "parabam/chaser.pyx":873
 *         self.LonerInfo = namedtuple("LonerInfo","paths level loner_type")
 * 
 *     def run(self,loner_paths,loner_type,level,fragment_leftovers):             # <<<<<<<<<<<<<<
 * 
 *         loner_info = self.LonerInfo(loner_paths,level,loner_type)
 */
  __pyx_tuple__138 = PyTuple_Pack(19, __pyx_n_s_self, __pyx_n_s_loner_paths, __pyx_n_s_loner_type, __pyx_n_s_level, __pyx_n_s_fragment_leftovers, __pyx_n_s_loner_info, __pyx_n_s_loner_path, __pyx_n_s_loner_object, __pyx_n_s_pairs, __pyx_n_s_read_pairs, __pyx_n_s_send_pairs, __pyx_n_s_rescued, __pyx_n_s_written, __pyx_n_s_leftover_paths, __pyx_n_s_read, __pyx_n_s_status, __pyx_n_s_return_paths, __pyx_n_s_leftover_path, __pyx_n_s_loner_pack); if (unlikely(!__pyx_tuple__138)) __PYX_ERR(0, 873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__138);
  __Pyx_GIVEREF(__pyx_tuple__138);
  __pyx_codeobj__139 = (PyObject*)__Pyx_PyCode_New(5, 0, 19, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__138, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_run, 873, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) __PYX_ERR(0, 873, __pyx_L1_error)

  /* "parabam/chaser.pyx":940
 *         return loner_pack
 * 
 *     def __first_pass__(self,loner_info,fragment_leftovers):             # <<<<<<<<<<<<<<
 *         cdef dict pairs = {}
 *         for read in self.__read_generator__(loner_info,
 */
  __pyx_tuple__140 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_loner_info, __pyx_n_s_fragment_leftovers, __pyx_n_s_pairs, __pyx_n_s_read, __pyx_n_s_status); if (unlikely(!__pyx_tuple__140)) __PYX_ERR(0, 940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__140);
  __Pyx_GIVEREF(__pyx_tuple__140);
  __pyx_codeobj__141 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_first_pass, 940, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__141)) __PYX_ERR(0, 940, __pyx_L1_error)

  /* "parabam/chaser.pyx":951
 *         return self.__prepare_for_second_pass__(pairs)
 * 
 *     def __prepare_for_second_pass__(self,pairs):             # <<<<<<<<<<<<<<
 *         return dict(filter( lambda tup : tup[1], iter(pairs.items()) ))
 * 
 */
  __pyx_tuple__142 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pairs); if (unlikely(!__pyx_tuple__142)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__142);
  __Pyx_GIVEREF(__pyx_tuple__142);
  __pyx_codeobj__143 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__142, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_prepare_for_second_pass, 951, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__143)) __PYX_ERR(0, 951, __pyx_L1_error)

  /* "parabam/chaser.pyx":954
 *         return dict(filter( lambda tup : tup[1], iter(pairs.items()) ))
 * 
 *     def __read_generator__(self,loner_info,             # <<<<<<<<<<<<<<
 *                             second_pass=False,leftover_paths=None,
 *                             fragment_leftovers=False):
 */
  __pyx_tuple__144 = PyTuple_Pack(12, __pyx_n_s_self, __pyx_n_s_loner_info, __pyx_n_s_second_pass, __pyx_n_s_leftover_paths, __pyx_n_s_fragment_leftovers, __pyx_n_s_count, __pyx_n_s_count_limit, __pyx_n_s_path, __pyx_n_s_loner_object, __pyx_n_s_bam_iterator, __pyx_n_s_i, __pyx_n_s_read); if (unlikely(!__pyx_tuple__144)) __PYX_ERR(0, 954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__144);
  __Pyx_GIVEREF(__pyx_tuple__144);
  __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(5, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__144, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_read_generator, 954, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 954, __pyx_L1_error)
  __pyx_tuple__145 = PyTuple_Pack(3, ((PyObject *)Py_False), ((PyObject *)Py_None), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__145)) __PYX_ERR(0, 954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__145);
  __Pyx_GIVEREF(__pyx_tuple__145);

  /* "parabam/chaser.pyx":986
 *         gc.collect()
 * 
 *     def __write_leftovers__(self,bam_iterator,fragment_leftovers,             # <<<<<<<<<<<<<<
 *                                  loner_info,leftover_paths):
 * 
 */
  __pyx_tuple__146 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_bam_iterator, __pyx_n_s_fragment_leftovers, __pyx_n_s_loner_info, __pyx_n_s_leftover_paths, __pyx_n_s_leftover_file, __pyx_n_s_leftover_count, __pyx_n_s_read, __pyx_n_s_empty_leftover_path); if (unlikely(!__pyx_tuple__146)) __PYX_ERR(0, 986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__146);
  __Pyx_GIVEREF(__pyx_tuple__146);
  __pyx_codeobj__147 = (PyObject*)__Pyx_PyCode_New(5, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__146, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_write_leftovers, 986, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__147)) __PYX_ERR(0, 986, __pyx_L1_error)

  /* "parabam/chaser.pyx":1014
 *             os.remove(empty_leftover_path)
 * 
 *     def __add_to_leftover_paths__(self,leftover_file,leftover_paths):             # <<<<<<<<<<<<<<
 *         leftover_paths.append(leftover_file.filename)
 *         leftover_file.close()
 */
  __pyx_tuple__148 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_leftover_file, __pyx_n_s_leftover_paths); if (unlikely(!__pyx_tuple__148)) __PYX_ERR(0, 1014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__148);
  __Pyx_GIVEREF(__pyx_tuple__148);
  __pyx_codeobj__149 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__148, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_add_to_leftover_paths, 1014, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__149)) __PYX_ERR(0, 1014, __pyx_L1_error)

  /* "parabam/chaser.pyx":1018
 *         leftover_file.close()
 * 
 *     def __launch_child_task__(self,pairs):             # <<<<<<<<<<<<<<
 *         child_pack = self._child_pack
 *         results = child_pack["chaser_task"].handle_pair_dict(pairs,\
 */
  __pyx_tuple__150 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_pairs, __pyx_n_s_child_pack_2, __pyx_n_s_results); if (unlikely(!__pyx_tuple__150)) __PYX_ERR(0, 1018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__150);
  __Pyx_GIVEREF(__pyx_tuple__150);
  __pyx_codeobj__151 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__150, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_launch_child_task, 1018, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__151)) __PYX_ERR(0, 1018, __pyx_L1_error)

  /* "parabam/chaser.pyx":1026
 *         return len(pairs)
 * 
 *     def __get_leftover_object__(self,loner_info,unique):             # <<<<<<<<<<<<<<
 *         path = self.__get_loner_temp_path__(loner_info.loner_type,\
 *                                         loner_info.level,"lftovr%d" % (unique,))
 */
  __pyx_tuple__152 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_loner_info, __pyx_n_s_unique, __pyx_n_s_path, __pyx_n_s_leftover); if (unlikely(!__pyx_tuple__152)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__152);
  __Pyx_GIVEREF(__pyx_tuple__152);
  __pyx_codeobj__153 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__152, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_get_leftover_object, 1026, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__153)) __PYX_ERR(0, 1026, __pyx_L1_error)

  /* "parabam/chaser.pyx":1032
 *         return leftover
 * 
 *     def __get_loner_object__(self,path):             # <<<<<<<<<<<<<<
 *         loner_object = pysam.AlignmentFile(path,"wb",header=self._header)
 *         return loner_object
 */
  __pyx_tuple__154 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_path, __pyx_n_s_loner_object); if (unlikely(!__pyx_tuple__154)) __PYX_ERR(0, 1032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__154);
  __Pyx_GIVEREF(__pyx_tuple__154);
  __pyx_codeobj__155 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__154, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_parabam_chaser_pyx, __pyx_n_s_get_loner_object, 1032, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__155)) __PYX_ERR(0, 1032, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  __pyx_float__01 = PyFloat_FromDouble(.01); if (unlikely(!__pyx_float__01)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_0_005 = PyFloat_FromDouble(0.005); if (unlikely(!__pyx_float_0_005)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_20 = PyInt_FromLong(20); if (unlikely(!__pyx_int_20)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_50 = PyInt_FromLong(50); if (unlikely(!__pyx_int_50)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_100 = PyInt_FromLong(100); if (unlikely(!__pyx_int_100)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_130 = PyInt_FromLong(130); if (unlikely(!__pyx_int_130)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_250 = PyInt_FromLong(250); if (unlikely(!__pyx_int_250)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_2500 = PyInt_FromLong(2500); if (unlikely(!__pyx_int_2500)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_25000 = PyInt_FromLong(25000L); if (unlikely(!__pyx_int_25000)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_50000 = PyInt_FromLong(50000L); if (unlikely(!__pyx_int_50000)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1000000 = PyInt_FromLong(1000000L); if (unlikely(!__pyx_int_1000000)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_4000000 = PyInt_FromLong(4000000L); if (unlikely(!__pyx_int_4000000)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_150000000 = PyInt_FromLong(150000000L); if (unlikely(!__pyx_int_150000000)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  if (PyType_Ready(&__pyx_type_7parabam_6chaser___pyx_scope_struct____init__) < 0) __PYX_ERR(0, 47, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7parabam_6chaser___pyx_scope_struct____init__.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7parabam_6chaser___pyx_scope_struct____init__.tp_dictoffset && __pyx_type_7parabam_6chaser___pyx_scope_struct____init__.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7parabam_6chaser___pyx_scope_struct____init__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_7parabam_6chaser___pyx_scope_struct____init__ = &__pyx_type_7parabam_6chaser___pyx_scope_struct____init__;
  if (PyType_Ready(&__pyx_type_7parabam_6chaser___pyx_scope_struct_1___read_generator__) < 0) __PYX_ERR(0, 797, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7parabam_6chaser___pyx_scope_struct_1___read_generator__.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7parabam_6chaser___pyx_scope_struct_1___read_generator__.tp_dictoffset && __pyx_type_7parabam_6chaser___pyx_scope_struct_1___read_generator__.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7parabam_6chaser___pyx_scope_struct_1___read_generator__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_7parabam_6chaser___pyx_scope_struct_1___read_generator__ = &__pyx_type_7parabam_6chaser___pyx_scope_struct_1___read_generator__;
  if (PyType_Ready(&__pyx_type_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__) < 0) __PYX_ERR(0, 806, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__.tp_dictoffset && __pyx_type_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__ = &__pyx_type_7parabam_6chaser___pyx_scope_struct_2___get_reference_id_name__;
  if (PyType_Ready(&__pyx_type_7parabam_6chaser___pyx_scope_struct_3___read_generator__) < 0) __PYX_ERR(0, 954, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_7parabam_6chaser___pyx_scope_struct_3___read_generator__.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7parabam_6chaser___pyx_scope_struct_3___read_generator__.tp_dictoffset && __pyx_type_7parabam_6chaser___pyx_scope_struct_3___read_generator__.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_7parabam_6chaser___pyx_scope_struct_3___read_generator__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_7parabam_6chaser___pyx_scope_struct_3___read_generator__ = &__pyx_type_7parabam_6chaser___pyx_scope_struct_3___read_generator__;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}


#if PY_MAJOR_VERSION < 3
#ifdef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC void
#else
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#endif
#else
#ifdef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC initchaser(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initchaser(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_chaser(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_chaser(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    #if PY_VERSION_HEX >= 0x030700A1
    static PY_INT64_T main_interpreter_id = -1;
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return (unlikely(current_id == -1)) ? -1 : 0;
    } else if (unlikely(main_interpreter_id != current_id))
    #else
    static PyInterpreterState *main_interpreter = NULL;
    PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
    if (!main_interpreter) {
        main_interpreter = current_interpreter;
    } else if (unlikely(main_interpreter != current_interpreter))
    #endif
    {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        if (allow_none || value != Py_None) {
            result = PyDict_SetItemString(moddict, to_name, value);
        }
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    if (__Pyx_check_single_interpreter())
        return NULL;
    if (__pyx_m)
        return __Pyx_NewRef(__pyx_m);
    modname = PyObject_GetAttrString(spec, "name");
    if (unlikely(!modname)) goto bad;
    module = PyModule_NewObject(modname);
    Py_DECREF(modname);
    if (unlikely(!module)) goto bad;
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static CYTHON_SMALL_CODE int __pyx_pymod_exec_chaser(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module 'chaser' has already been imported. Re-initialisation is not supported.");
    return -1;
  }
  #elif PY_MAJOR_VERSION >= 3
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  #if CYTHON_REFNANNY
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
if (!__Pyx_RefNanny) {
  PyErr_Clear();
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
  if (!__Pyx_RefNanny)
      Py_FatalError("failed to import 'refnanny' module");
}
#endif
  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_chaser(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pxy_PyFrame_Initialize_Offsets
  __Pxy_PyFrame_Initialize_Offsets();
  #endif
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  #ifdef WITH_THREAD /* Python build with threading support? */
  PyEval_InitThreads();
  #endif
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_m = __pyx_pyinit_module;
  Py_INCREF(__pyx_m);
  #else
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("chaser", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_b);
  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_cython_runtime);
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_parabam__chaser) {
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "parabam.chaser")) {
      if (unlikely(PyDict_SetItemString(modules, "parabam.chaser", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error;
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error;
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code();
  (void)__Pyx_modinit_variable_export_code();
  (void)__Pyx_modinit_function_export_code();
  if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error;
  (void)__Pyx_modinit_type_import_code();
  (void)__Pyx_modinit_variable_import_code();
  (void)__Pyx_modinit_function_import_code();
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif

  /* "parabam/chaser.pyx":2
 * #Once upon a time
 * import pysam             # <<<<<<<<<<<<<<
 * import time
 * import sys
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_pysam, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pysam, __pyx_t_1) < 0) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":3
 * #Once upon a time
 * import pysam
 * import time             # <<<<<<<<<<<<<<
 * import sys
 * import os
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_time, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_time, __pyx_t_1) < 0) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":4
 * import pysam
 * import time
 * import sys             # <<<<<<<<<<<<<<
 * import os
 * import gc
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":5
 * import time
 * import sys
 * import os             # <<<<<<<<<<<<<<
 * import gc
 * import parabam
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) __PYX_ERR(0, 5, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":6
 * import sys
 * import os
 * import gc             # <<<<<<<<<<<<<<
 * import parabam
 * import random
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_gc, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_gc, __pyx_t_1) < 0) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":7
 * import os
 * import gc
 * import parabam             # <<<<<<<<<<<<<<
 * import random
 * 
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_parabam, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parabam, __pyx_t_1) < 0) __PYX_ERR(0, 7, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":8
 * import gc
 * import parabam
 * import random             # <<<<<<<<<<<<<<
 * 
 * import queue as Queue2
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_random, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_random, __pyx_t_1) < 0) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":10
 * import random
 * 
 * import queue as Queue2             # <<<<<<<<<<<<<<
 * import numpy as np
 * 
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_queue, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Queue2, __pyx_t_1) < 0) __PYX_ERR(0, 10, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":11
 * 
 * import queue as Queue2
 * import numpy as np             # <<<<<<<<<<<<<<
 * 
 * from parabam.core import DestroyPackage
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 11, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":13
 * import numpy as np
 * 
 * from parabam.core import DestroyPackage             # <<<<<<<<<<<<<<
 * try:
 *     import itertools.izip as zip
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_DestroyPackage);
  __Pyx_GIVEREF(__pyx_n_s_DestroyPackage);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_DestroyPackage);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_parabam_core, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_DestroyPackage); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DestroyPackage, __pyx_t_1) < 0) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "parabam/chaser.pyx":14
 * 
 * from parabam.core import DestroyPackage
 * try:             # <<<<<<<<<<<<<<
 *     import itertools.izip as zip
 * except ImportError:
 */
  {
    __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:*/ {

      /* "parabam/chaser.pyx":15
 * from parabam.core import DestroyPackage
 * try:
 *     import itertools.izip as zip             # <<<<<<<<<<<<<<
 * except ImportError:
 *     pass
 */
      __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_n_s__17);
      __Pyx_GIVEREF(__pyx_n_s__17);
      PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s__17);
      __pyx_t_1 = __Pyx_Import(__pyx_n_s_itertools_izip, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_zip, __pyx_t_1) < 0) __PYX_ERR(0, 15, __pyx_L2_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "parabam/chaser.pyx":14
 * 
 * from parabam.core import DestroyPackage
 * try:             # <<<<<<<<<<<<<<
 *     import itertools.izip as zip
 * except ImportError:
 */
    }
    __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_L7_try_end;
    __pyx_L2_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "parabam/chaser.pyx":16
 * try:
 *     import itertools.izip as zip
 * except ImportError:             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError);
    if (__pyx_t_6) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L3_exception_handled;
    }
    goto __pyx_L4_except_error;
    __pyx_L4_except_error:;

    /* "parabam/chaser.pyx":14
 * 
 * from parabam.core import DestroyPackage
 * try:             # <<<<<<<<<<<<<<
 *     import itertools.izip as zip
 * except ImportError:
 */
    __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_L3_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_L7_try_end:;
  }

  /* "parabam/chaser.pyx":19
 *     pass
 * 
 * from collections import Counter,namedtuple             # <<<<<<<<<<<<<<
 * from multiprocessing import Queue,Process
 * 
 */
  __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_Counter);
  __Pyx_GIVEREF(__pyx_n_s_Counter);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Counter);
  __Pyx_INCREF(__pyx_n_s_namedtuple);
  __Pyx_GIVEREF(__pyx_n_s_namedtuple);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_namedtuple);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_collections, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Counter, __pyx_t_1) < 0) __PYX_ERR(0, 19, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_namedtuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_namedtuple, __pyx_t_1) < 0) __PYX_ERR(0, 19, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "parabam/chaser.pyx":20
 * 
 * from collections import Counter,namedtuple
 * from multiprocessing import Queue,Process             # <<<<<<<<<<<<<<
 * 
 * class ChaserResults(parabam.core.Package):
 */
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_Queue);
  __Pyx_GIVEREF(__pyx_n_s_Queue);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Queue);
  __Pyx_INCREF(__pyx_n_s_Process);
  __Pyx_GIVEREF(__pyx_n_s_Process);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_Process);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_multiprocessing, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Queue); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Queue, __pyx_t_2) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Process); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Process, __pyx_t_2) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":22
 * from multiprocessing import Queue,Process
 * 
 * class ChaserResults(parabam.core.Package):             # <<<<<<<<<<<<<<
 *     def __init__(self,results,chaser_type):
 *         super(ChaserResults,self).__init__(results)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_parabam); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_core); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Package); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_ChaserResults, __pyx_n_s_ChaserResults, (PyObject *) NULL, __pyx_n_s_parabam_chaser, (PyObject *) NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "parabam/chaser.pyx":23
 * 
 * class ChaserResults(parabam.core.Package):
 *     def __init__(self,results,chaser_type):             # <<<<<<<<<<<<<<
 *         super(ChaserResults,self).__init__(results)
 *         self.chaser_type=chaser_type
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_13ChaserResults_1__init__, 0, __pyx_n_s_ChaserResults___init, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__19)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_init, __pyx_t_8) < 0) __PYX_ERR(0, 23, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":22
 * from multiprocessing import Queue,Process
 * 
 * class ChaserResults(parabam.core.Package):             # <<<<<<<<<<<<<<
 *     def __init__(self,results,chaser_type):
 *         super(ChaserResults,self).__init__(results)
 */
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ChaserResults, __pyx_t_2, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ChaserResults, __pyx_t_8) < 0) __PYX_ERR(0, 22, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "parabam/chaser.pyx":27
 *         self.chaser_type=chaser_type
 * 
 * class PrimaryResults(ChaserResults):             # <<<<<<<<<<<<<<
 *     def __init__(self,results,chaser_type):
 *         super(PrimaryResults,self).__init__(results,chaser_type)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ChaserResults); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_PrimaryResults, __pyx_n_s_PrimaryResults, (PyObject *) NULL, __pyx_n_s_parabam_chaser, (PyObject *) NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "parabam/chaser.pyx":28
 * 
 * class PrimaryResults(ChaserResults):
 *     def __init__(self,results,chaser_type):             # <<<<<<<<<<<<<<
 *         super(PrimaryResults,self).__init__(results,chaser_type)
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_14PrimaryResults_1__init__, 0, __pyx_n_s_PrimaryResults___init, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__21)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_init, __pyx_t_8) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":27
 *         self.chaser_type=chaser_type
 * 
 * class PrimaryResults(ChaserResults):             # <<<<<<<<<<<<<<
 *     def __init__(self,results,chaser_type):
 *         super(PrimaryResults,self).__init__(results,chaser_type)
 */
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_PrimaryResults, __pyx_t_1, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PrimaryResults, __pyx_t_8) < 0) __PYX_ERR(0, 27, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":31
 *         super(PrimaryResults,self).__init__(results,chaser_type)
 * 
 * class MatchMakerResults(ChaserResults):             # <<<<<<<<<<<<<<
 *     def __init__(self,loner_type,results,chaser_type,rescued,level):
 *         super(MatchMakerResults,self).__init__(results,chaser_type)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ChaserResults); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_MatchMakerResults, __pyx_n_s_MatchMakerResults, (PyObject *) NULL, __pyx_n_s_parabam_chaser, (PyObject *) NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "parabam/chaser.pyx":32
 * 
 * class MatchMakerResults(ChaserResults):
 *     def __init__(self,loner_type,results,chaser_type,rescued,level):             # <<<<<<<<<<<<<<
 *         super(MatchMakerResults,self).__init__(results,chaser_type)
 *         self.rescued = rescued
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_17MatchMakerResults_1__init__, 0, __pyx_n_s_MatchMakerResults___init, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__23)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_init, __pyx_t_8) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":31
 *         super(PrimaryResults,self).__init__(results,chaser_type)
 * 
 * class MatchMakerResults(ChaserResults):             # <<<<<<<<<<<<<<
 *     def __init__(self,loner_type,results,chaser_type,rescued,level):
 *         super(MatchMakerResults,self).__init__(results,chaser_type)
 */
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_MatchMakerResults, __pyx_t_2, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MatchMakerResults, __pyx_t_8) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "parabam/chaser.pyx":38
 *         self.level = level
 * 
 * class JobPackage(object):             # <<<<<<<<<<<<<<
 *     def __init__(self,paths,loner_type,level,fragment_leftovers=False):
 *         self.paths = paths
 */
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__24); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_tuple__24, __pyx_n_s_JobPackage, __pyx_n_s_JobPackage, (PyObject *) NULL, __pyx_n_s_parabam_chaser, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "parabam/chaser.pyx":39
 * 
 * class JobPackage(object):
 *     def __init__(self,paths,loner_type,level,fragment_leftovers=False):             # <<<<<<<<<<<<<<
 *         self.paths = paths
 *         self.loner_type = loner_type
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_10JobPackage_1__init__, 0, __pyx_n_s_JobPackage___init, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__26)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__27);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init, __pyx_t_7) < 0) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "parabam/chaser.pyx":38
 *         self.level = level
 * 
 * class JobPackage(object):             # <<<<<<<<<<<<<<
 *     def __init__(self,paths,loner_type,level,fragment_leftovers=False):
 *         self.paths = paths
 */
  __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_JobPackage, __pyx_tuple__24, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_JobPackage, __pyx_t_7) < 0) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "parabam/chaser.pyx":45
 *         self.fragment_leftovers = fragment_leftovers
 * 
 * class Handler(parabam.core.Handler):             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self,object parent_bam, object output_paths,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_parabam); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_core); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Handler); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_Handler, __pyx_n_s_Handler, (PyObject *) NULL, __pyx_n_s_parabam_chaser, (PyObject *) NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "parabam/chaser.pyx":47
 * class Handler(parabam.core.Handler):
 * 
 *     def __init__(self,object parent_bam, object output_paths,             # <<<<<<<<<<<<<<
 *                       object inqu,object constants,object pause_qus,
 *                       dict out_qu_dict,object Task):
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_1__init__, 0, __pyx_n_s_Handler___init, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_init, __pyx_t_8) < 0) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":135
 *         #self._pause_debug = self.__pause_debug__
 * 
 *     def __pause_debug__(self, message):             # <<<<<<<<<<<<<<
 *         print "PAUSE DEBUG:: ", message
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_3__pause_debug__, 0, __pyx_n_s_Handler___pause_debug, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_pause_debug_2, __pyx_t_8) < 0) __PYX_ERR(0, 135, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":138
 *         print "PAUSE DEBUG:: ", message
 * 
 *     def __print_debug__(self,iterations):             # <<<<<<<<<<<<<<
 *         if iterations % 50 == 0 or iterations == -1:
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_5__print_debug__, 0, __pyx_n_s_Handler___print_debug, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_print_debug, __pyx_t_8) < 0) __PYX_ERR(0, 138, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":166
 *             print ""
 * 
 *     def __create_chaser_tasks__(self,total_tasks):             # <<<<<<<<<<<<<<
 *         tasks = []
 *         for i in xrange(total_tasks):
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_7__create_chaser_tasks__, 0, __pyx_n_s_Handler___create_chaser_tasks, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_create_chaser_tasks, __pyx_t_8) < 0) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":178
 *         return tasks
 * 
 *     def __get_chrom_bins__(self,parent_bam):             # <<<<<<<<<<<<<<
 *         # Create chromosome `bins` by grouping together smaller chromosomes
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_9__get_chrom_bins__, 0, __pyx_n_s_Handler___get_chrom_bins, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_get_chrom_bins, __pyx_t_8) < 0) __PYX_ERR(0, 178, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":202
 *         return chrom_bins
 * 
 *     def __instalise_primary_store__(self):             # <<<<<<<<<<<<<<
 *         return []
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_11__instalise_primary_store__, 0, __pyx_n_s_Handler___instalise_primary_stor, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_instalise_primary_store, __pyx_t_8) < 0) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":205
 *         return []
 * 
 *     def __instalise_loner_pyramid__(self):             # <<<<<<<<<<<<<<
 *         return {}
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_13__instalise_loner_pyramid__, 0, __pyx_n_s_Handler___instalise_loner_pyrami, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_instalise_loner_pyramid, __pyx_t_8) < 0) __PYX_ERR(0, 205, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":208
 *         return {}
 * 
 *     def __update_tasks__(self,active_tasks):             # <<<<<<<<<<<<<<
 *         terminated_procs = []
 *         for pr in active_tasks:
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_15__update_tasks__, 0, __pyx_n_s_Handler___update_tasks, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_update_tasks, __pyx_t_8) < 0) __PYX_ERR(0, 208, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":226
 *         return len(active_tasks)
 * 
 *     def __new_package_action__(self,new_package,**kwargs):             # <<<<<<<<<<<<<<
 *         chaser_type = new_package.chaser_type
 *         if chaser_type == "origin":
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_17__new_package_action__, 0, __pyx_n_s_Handler___new_package_action, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_new_package_action, __pyx_t_8) < 0) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":239
 *             print "Error!"
 * 
 *     def __handle_origin_task__(self,new_package):             # <<<<<<<<<<<<<<
 *         for loner_count,path in new_package.results:
 *             if loner_count == 0:
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_19__handle_origin_task__, 0, __pyx_n_s_Handler___handle_origin_task, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__47)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_handle_origin_task, __pyx_t_8) < 0) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":247
 *                 self._primary_store.append(path)
 * 
 *     def __handle_match_maker__(self,new_package):             # <<<<<<<<<<<<<<
 *         loner_type = new_package.loner_type
 *         level = new_package.level
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_21__handle_match_maker__, 0, __pyx_n_s_Handler___handle_match_maker, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__49)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_handle_match_maker, __pyx_t_8) < 0) __PYX_ERR(0, 247, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":278
 *                 self._stale_count += 1
 * 
 *     def __handle_primary_task__(self,new_package):             # <<<<<<<<<<<<<<
 *         for match_package in new_package.results:
 *             self.__handle_match_maker__(match_package)
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_23__handle_primary_task__, 0, __pyx_n_s_Handler___handle_primary_task, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__51)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_handle_primary_task, __pyx_t_8) < 0) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":282
 *             self.__handle_match_maker__(match_package)
 * 
 *     def __test_primary_tasks__(self,required_paths=10):             # <<<<<<<<<<<<<<
 *         task_sent = False
 *         if len(self._primary_store) >= required_paths:
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_25__test_primary_tasks__, 0, __pyx_n_s_Handler___test_primary_tasks, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__53)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__54);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_test_primary_tasks, __pyx_t_8) < 0) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":293
 *             time.sleep(1)
 * 
 *     def __start_primary_task__(self):             # <<<<<<<<<<<<<<
 *         self.__start_job__(self._primary_store,"Primary",-1)
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_27__start_primary_task__, 0, __pyx_n_s_Handler___start_primary_task, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__56)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_start_primary_task, __pyx_t_8) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":296
 *         self.__start_job__(self._primary_store,"Primary",-1)
 * 
 *     def __start_matchmaker_task__(self,paths,loner_type,level):             # <<<<<<<<<<<<<<
 *         self.__start_job__(paths,loner_type,level)
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_29__start_matchmaker_task__, 0, __pyx_n_s_Handler___start_matchmaker_task, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_start_matchmaker_task, __pyx_t_8) < 0) __PYX_ERR(0, 296, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":299
 *         self.__start_job__(paths,loner_type,level)
 * 
 *     def __start_job__(self,paths,loner_type,level):             # <<<<<<<<<<<<<<
 *         fragment_leftovers = self.__request_fragment_output__(paths)
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_31__start_job__, 0, __pyx_n_s_Handler___start_job, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_start_job, __pyx_t_8) < 0) __PYX_ERR(0, 299, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":306
 *         self._chaser_qu.put(job)
 * 
 *     def __request_fragment_output__(self,paths):             # <<<<<<<<<<<<<<
 *         if self._destroy and self._stale_count > 10:
 *             has_large_file = any([ (os.path.getsize(path) / 100) \
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_33__request_fragment_output__, 0, __pyx_n_s_Handler___request_fragment_outpu, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__62)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_request_fragment_output, __pyx_t_8) < 0) __PYX_ERR(0, 306, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":316
 *         return False
 * 
 *     def __pause_monitor__(self):             # <<<<<<<<<<<<<<
 *         if not self._destroy:
 *             max_jobs = self._max_jobs
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_35__pause_monitor__, 0, __pyx_n_s_Handler___pause_monitor, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__64)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_pause_monitor, __pyx_t_8) < 0) __PYX_ERR(0, 316, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":333
 *                 self._file_readers_paused = False
 * 
 *     def __wait_for_ack__(self, qu):             # <<<<<<<<<<<<<<
 *         self._pause_debug("Chaser || WAITNG FOR ACK")
 *         boomerang_count = 0
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_37__wait_for_ack__, 0, __pyx_n_s_Handler___wait_for_ack, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_wait_for_ack, __pyx_t_8) < 0) __PYX_ERR(0, 333, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":354
 *                 time.sleep(2)
 * 
 *     def __fatal_check__(self):             # <<<<<<<<<<<<<<
 *         collected_packs = []
 *         destroy_found = False
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_39__fatal_check__, 0, __pyx_n_s_Handler___fatal_check, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_fatal_check, __pyx_t_8) < 0) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":379
 *         return True
 * 
 *     def __periodic_action__(self,iterations):             # <<<<<<<<<<<<<<
 * 
 *         self.__pause_monitor__()
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_41__periodic_action__, 0, __pyx_n_s_Handler___periodic_action, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__70)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_periodic_action, __pyx_t_8) < 0) __PYX_ERR(0, 379, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":418
 *             gc.collect()
 * 
 *     def __test_pyramid_idle_count__(self,pyramid,loner_type,pyramid_idle_counts):             # <<<<<<<<<<<<<<
 *         #Idle counting is the mechanism whereby loners that have no
 *         #match can be entered into `purgatory` thus clearing the pyramid.
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_43__test_pyramid_idle_count__, 0, __pyx_n_s_Handler___test_pyramid_idle_coun, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__72)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_test_pyramid_idle_count, __pyx_t_8) < 0) __PYX_ERR(0, 418, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":445
 *         del idle_paths,idle_levels
 * 
 *     def __finish_test__(self):             # <<<<<<<<<<<<<<
 *         if self._destroy:
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_45__finish_test__, 0, __pyx_n_s_Handler___finish_test, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__74)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_finish_test, __pyx_t_8) < 0) __PYX_ERR(0, 445, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":468
 *                 self._finished = True
 * 
 *     def __add_post_destory_chaser_tasks__(self):             # <<<<<<<<<<<<<<
 *         if self._destroy and not self._post_destroy_tasks_added:
 *             self._post_destroy_tasks_added = True
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_47__add_post_destory_chaser_tasks__, 0, __pyx_n_s_Handler___add_post_destory_chase, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__76)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_add_post_destory_chaser_tasks, __pyx_t_8) < 0) __PYX_ERR(0, 468, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":477
 *             self._chaser_tasks.extend(post_destroy_tasks)
 * 
 *     def __pyramid_is_empty__(self,saved):             # <<<<<<<<<<<<<<
 *         return (self._files_in_pyramid == 0 and \
 *                 self._pending_jobs == 0 and \
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_49__pyramid_is_empty__, 0, __pyx_n_s_Handler___pyramid_is_empty, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_pyramid_is_empty, __pyx_t_8) < 0) __PYX_ERR(0, 477, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":483
 *                 self.__is_queue_empty__())
 * 
 *     def __set_new_stale_thresh__(self):             # <<<<<<<<<<<<<<
 *         self._stale_thresh = (10 + (self._files_in_pyramid * 5) \
 *                                  + (self._pending_jobs * 8))
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_51__set_new_stale_thresh__, 0, __pyx_n_s_Handler___set_new_stale_thresh, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_set_new_stale_thresh, __pyx_t_8) < 0) __PYX_ERR(0, 483, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":487
 *                                  + (self._pending_jobs * 8))
 * 
 *     def __is_queue_empty__(self):             # <<<<<<<<<<<<<<
 *         try:
 *             pack = self._inqu.get(True,10)
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_53__is_queue_empty__, 0, __pyx_n_s_Handler___is_queue_empty, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_is_queue_empty, __pyx_t_8) < 0) __PYX_ERR(0, 487, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":495
 *             return True
 * 
 *     def __save_purgatory_loners__(self):             # <<<<<<<<<<<<<<
 *         saved = 0
 *         saved_keys = []
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_55__save_purgatory_loners__, 0, __pyx_n_s_Handler___save_purgatory_loners, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__84)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_save_purgatory_loners, __pyx_t_8) < 0) __PYX_ERR(0, 495, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":510
 *         return saved
 * 
 *     def __add_to_pyramid__(self,loner_type,level,path):             # <<<<<<<<<<<<<<
 *         self._loner_pyramid[loner_type][level].append(path)
 *         self._files_in_pyramid += 1
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_57__add_to_pyramid__, 0, __pyx_n_s_Handler___add_to_pyramid, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__86)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_add_to_pyramid, __pyx_t_8) < 0) __PYX_ERR(0, 510, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":514
 *         self._files_in_pyramid += 1
 * 
 *     def __remove_from_pyramid__(self,loner_type,level,path):             # <<<<<<<<<<<<<<
 *         self._loner_pyramid[loner_type][level].remove(path)
 *         self._files_in_pyramid -= 1
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_59__remove_from_pyramid__, 0, __pyx_n_s_Handler___remove_from_pyramid, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__88)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_remove_from_pyramid, __pyx_t_8) < 0) __PYX_ERR(0, 514, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":518
 *         self._files_in_pyramid -= 1
 * 
 *     def __get_paths__(self,loner_type,sub_pyramid,level):             # <<<<<<<<<<<<<<
 *         if not self._destroy and "UM" in loner_type:
 *             return []
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_61__get_paths__, 0, __pyx_n_s_Handler___get_paths, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__90)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_get_paths, __pyx_t_8) < 0) __PYX_ERR(0, 518, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":529
 *         return []
 * 
 *     def __tidy_pyramid__(self):             # <<<<<<<<<<<<<<
 *         reads_found = self.__wait_for_remaining_jobs__()
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_63__tidy_pyramid__, 0, __pyx_n_s_Handler___tidy_pyramid, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__92)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_tidy_pyramid, __pyx_t_8) < 0) __PYX_ERR(0, 529, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":542
 *             return False
 * 
 *     def __wait_for_remaining_jobs__(self):             # <<<<<<<<<<<<<<
 *         def waiting_update(found,total):
 *             sys.stdout.write(("\r\t- Waiting for tasks to finish: %d/%d ") % \
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_65__wait_for_remaining_jobs__, 0, __pyx_n_s_Handler___wait_for_remaining_job_2, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__94)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_wait_for_remaining_jobs, __pyx_t_8) < 0) __PYX_ERR(0, 542, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":577
 *         return prev_found < self._rescued["total"]
 * 
 *     def __clear_subpyramid__(self,success,destroy,running):             # <<<<<<<<<<<<<<
 *         if success:
 *             #If the idle task was sent, clear pyramid
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_67__clear_subpyramid__, 0, __pyx_n_s_Handler___clear_subpyramid, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__96)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_clear_subpyramid, __pyx_t_8) < 0) __PYX_ERR(0, 577, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":593
 *             return False
 * 
 *     def __idle_routine__(self,pyramid,loner_type):             # <<<<<<<<<<<<<<
 *         if "UM" in loner_type and not self._destroy:
 *             #Don't conduct idle on UMs because we don't expect to see pairs
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_69__idle_routine__, 0, __pyx_n_s_Handler___idle_routine, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__98)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_idle_routine, __pyx_t_8) < 0) __PYX_ERR(0, 593, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":623
 *         return success,idle_paths,idle_levels
 * 
 *     def __get_task_size__(self,level,loner_type):             # <<<<<<<<<<<<<<
 *         if level % 2 == 0:
 *             task_size = 2
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_71__get_task_size__, 0, __pyx_n_s_Handler___get_task_size, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__100)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_get_task_size, __pyx_t_8) < 0) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":630
 *         return task_size
 * 
 *     def __handler_exit__(self,**kwargs):             # <<<<<<<<<<<<<<
 *         for i in xrange(len(self._chaser_tasks)+1):
 *            self._chaser_qu.put(DestroyPackage())
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_73__handler_exit__, 0, __pyx_n_s_Handler___handler_exit, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__102)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_handler_exit, __pyx_t_8) < 0) __PYX_ERR(0, 630, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":657
 *             qu.close()
 * 
 *     def __post_destroy_report__(self):             # <<<<<<<<<<<<<<
 *         if self._constants.verbose:
 *             if self._post_destroy_count >= self._post_destroy_thresh:
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_7Handler_75__post_destroy_report__, 0, __pyx_n_s_Handler___post_destroy_report, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__104)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_post_destroy_report, __pyx_t_8) < 0) __PYX_ERR(0, 657, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":45
 *         self.fragment_leftovers = fragment_leftovers
 * 
 * class Handler(parabam.core.Handler):             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self,object parent_bam, object output_paths,
 */
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_Handler, __pyx_t_1, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Handler, __pyx_t_8) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":675
 *             self._post_destroy_count += 1
 * 
 * class ChaserTask(Process):             # <<<<<<<<<<<<<<
 *     def __init__(self,object constants,object inqu, object outqu,
 *                       int max_reads, dict child_pack):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Process); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_ChaserTask, __pyx_n_s_ChaserTask, (PyObject *) NULL, __pyx_n_s_parabam_chaser, (PyObject *) NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "parabam/chaser.pyx":676
 * 
 * class ChaserTask(Process):
 *     def __init__(self,object constants,object inqu, object outqu,             # <<<<<<<<<<<<<<
 *                       int max_reads, dict child_pack):
 *         super(ChaserTask,self).__init__()
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_10ChaserTask_1__init__, 0, __pyx_n_s_ChaserTask___init, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__106)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_init, __pyx_t_8) < 0) __PYX_ERR(0, 676, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":685
 *         self._max_reads = max_reads
 * 
 *     def run(self):             # <<<<<<<<<<<<<<
 *         primary_handler = PrimaryHandler(constants = self._constants,
 *                                          max_reads = self._max_reads,
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_10ChaserTask_3run, 0, __pyx_n_s_ChaserTask_run, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__108)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_run, __pyx_t_8) < 0) __PYX_ERR(0, 685, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":675
 *             self._post_destroy_count += 1
 * 
 * class ChaserTask(Process):             # <<<<<<<<<<<<<<
 *     def __init__(self,object constants,object inqu, object outqu,
 *                       int max_reads, dict child_pack):
 */
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ChaserTask, __pyx_t_2, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ChaserTask, __pyx_t_8) < 0) __PYX_ERR(0, 675, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "parabam/chaser.pyx":718
 *         return
 * 
 * class ChaserHandler(object):             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self,object constants,int max_reads, dict child_pack,int pid):
 */
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__109); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_tuple__109, __pyx_n_s_ChaserHandler, __pyx_n_s_ChaserHandler, (PyObject *) NULL, __pyx_n_s_parabam_chaser, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "parabam/chaser.pyx":720
 * class ChaserHandler(object):
 * 
 *     def __init__(self,object constants,int max_reads, dict child_pack,int pid):             # <<<<<<<<<<<<<<
 *         self._constants = constants
 *         self._max_reads = max_reads
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_13ChaserHandler_1__init__, 0, __pyx_n_s_ChaserHandler___init, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__111)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init, __pyx_t_7) < 0) __PYX_ERR(0, 720, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "parabam/chaser.pyx":729
 *         self.pid = pid
 * 
 *     def __get_loner_temp_path__(self,loner_type,level=0,unique=""):             # <<<<<<<<<<<<<<
 *         self._record += 1
 *         return "%s/%s_%d_%d_%s_%s.bam" %\
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_13ChaserHandler_3__get_loner_temp_path__, 0, __pyx_n_s_ChaserHandler___get_loner_temp_p, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__113)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__114);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_get_loner_temp_path, __pyx_t_7) < 0) __PYX_ERR(0, 729, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "parabam/chaser.pyx":718
 *         return
 * 
 * class ChaserHandler(object):             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self,object constants,int max_reads, dict child_pack,int pid):
 */
  __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ChaserHandler, __pyx_tuple__109, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ChaserHandler, __pyx_t_7) < 0) __PYX_ERR(0, 718, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "parabam/chaser.pyx":735
 *              self._record,level,loner_type,unique)
 * 
 * class PrimaryHandler(ChaserHandler):             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self,object constants, int max_reads, dict child_pack,int pid):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ChaserHandler); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_PrimaryHandler, __pyx_n_s_PrimaryHandler, (PyObject *) NULL, __pyx_n_s_parabam_chaser, (PyObject *) NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "parabam/chaser.pyx":737
 * class PrimaryHandler(ChaserHandler):
 * 
 *     def __init__(self,object constants, int max_reads, dict child_pack,int pid):             # <<<<<<<<<<<<<<
 *         super(PrimaryHandler,self).__init__(constants,max_reads,child_pack,pid)
 *         self.match_handler = MatchMakerHandler(constants,
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_14PrimaryHandler_1__init__, 0, __pyx_n_s_PrimaryHandler___init, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__116)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_init, __pyx_t_8) < 0) __PYX_ERR(0, 737, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":743
 *                                                child_pack,pid)
 * 
 *     def run(self,unsorted_paths):             # <<<<<<<<<<<<<<
 *         #speedup
 *         write_loner = self.__write_loner__
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_14PrimaryHandler_3run, 0, __pyx_n_s_PrimaryHandler_run, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__118)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_run, __pyx_t_8) < 0) __PYX_ERR(0, 743, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":778
 *         return PrimaryResults(match_maker_results,"primary")
 * 
 *     def __handle_unpaired_reads__(self, loner_type, path):             # <<<<<<<<<<<<<<
 *         read_count = 0
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_14PrimaryHandler_5__handle_unpaired_reads__, 0, __pyx_n_s_PrimaryHandler___handle_unpaired, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__120)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_handle_unpaired_reads, __pyx_t_8) < 0) __PYX_ERR(0, 778, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":793
 *         return loner_pack
 * 
 *     def __start_matchmaker_task__(self,paths,loner_type,level):             # <<<<<<<<<<<<<<
 *         return self.match_handler.run(paths,loner_type,
 *                                       level,fragment_leftovers=False)
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_14PrimaryHandler_7__start_matchmaker_task__, 0, __pyx_n_s_PrimaryHandler___start_matchmake, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__122)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_start_matchmaker_task, __pyx_t_8) < 0) __PYX_ERR(0, 793, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":797
 *                                       level,fragment_leftovers=False)
 * 
 *     def __read_generator__(self,unsorted_paths):             # <<<<<<<<<<<<<<
 *         for path in unsorted_paths:
 *             loner_object = pysam.AlignmentFile(path,"rb")
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_14PrimaryHandler_9__read_generator__, 0, __pyx_n_s_PrimaryHandler___read_generator, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__14)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_read_generator, __pyx_t_8) < 0) __PYX_ERR(0, 797, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":806
 *         gc.collect()
 * 
 *     def __get_reference_id_name__(self,read,bins):             # <<<<<<<<<<<<<<
 *         if read.reference_id == read.next_reference_id:
 *             return "XX%dv%d" % (read.reference_id,read.next_reference_id)
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_14PrimaryHandler_12__get_reference_id_name__, 0, __pyx_n_s_PrimaryHandler___get_reference_i_2, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__125)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_get_reference_id_name, __pyx_t_8) < 0) __PYX_ERR(0, 806, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":815
 *             return "MM%sv%s" % tuple(class_bins)
 * 
 *     def __get_loner_type__(self,read,bins):             # <<<<<<<<<<<<<<
 *         if not read.is_paired:
 *             #read is not paired!
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_14PrimaryHandler_14__get_loner_type__, 0, __pyx_n_s_PrimaryHandler___get_loner_type, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__127)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_get_loner_type, __pyx_t_8) < 0) __PYX_ERR(0, 815, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":830
 *         return loner_type
 * 
 *     def __get_loner_holder__(self):             # <<<<<<<<<<<<<<
 *         holder = {}
 *         return holder
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_14PrimaryHandler_16__get_loner_holder__, 0, __pyx_n_s_PrimaryHandler___get_loner_holde, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__129)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_get_loner_holder, __pyx_t_8) < 0) __PYX_ERR(0, 830, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":834
 *         return holder
 * 
 *     def __get_loner_object__(self,loner_type,unique):             # <<<<<<<<<<<<<<
 *         path = self.__get_loner_temp_path__(loner_type,0,unique=\
 *                                                         "-%d" % (unique,) )
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_14PrimaryHandler_18__get_loner_object__, 0, __pyx_n_s_PrimaryHandler___get_loner_objec, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__131)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_get_loner_object, __pyx_t_8) < 0) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":839
 *         return pysam.AlignmentFile(path,"wb",header=self._header)
 * 
 *     def __write_loner__(self,loner_objects,loner_file_counts,loner_type,read):             # <<<<<<<<<<<<<<
 *         try:
 *             loner_path = loner_objects[loner_type][-1].filename
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_14PrimaryHandler_20__write_loner__, 0, __pyx_n_s_PrimaryHandler___write_loner, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__133)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_write_loner, __pyx_t_8) < 0) __PYX_ERR(0, 839, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":857
 *         loner_objects[loner_type][-1].write(read)
 * 
 *     def __get_paths_and_close__(self,loner_holder):             # <<<<<<<<<<<<<<
 *         paths = {}
 *         for loner_type,loner_objects in loner_holder.items():
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_14PrimaryHandler_22__get_paths_and_close__, 0, __pyx_n_s_PrimaryHandler___get_paths_and_c, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__135)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_get_paths_and_close, __pyx_t_8) < 0) __PYX_ERR(0, 857, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":735
 *              self._record,level,loner_type,unique)
 * 
 * class PrimaryHandler(ChaserHandler):             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self,object constants, int max_reads, dict child_pack,int pid):
 */
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_PrimaryHandler, __pyx_t_1, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PrimaryHandler, __pyx_t_8) < 0) __PYX_ERR(0, 735, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "parabam/chaser.pyx":866
 *         return paths
 * 
 * class MatchMakerHandler(ChaserHandler):             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self,object constants,int max_reads, dict child_pack,int pid):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ChaserHandler); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_MatchMakerHandler, __pyx_n_s_MatchMakerHandler, (PyObject *) NULL, __pyx_n_s_parabam_chaser, (PyObject *) NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "parabam/chaser.pyx":868
 * class MatchMakerHandler(ChaserHandler):
 * 
 *     def __init__(self,object constants,int max_reads, dict child_pack,int pid):             # <<<<<<<<<<<<<<
 *         super(MatchMakerHandler,self).__init__(constants,max_reads,
 *                                                 child_pack, pid)
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_17MatchMakerHandler_1__init__, 0, __pyx_n_s_MatchMakerHandler___init, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__137)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_init, __pyx_t_8) < 0) __PYX_ERR(0, 868, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":873
 *         self.LonerInfo = namedtuple("LonerInfo","paths level loner_type")
 * 
 *     def run(self,loner_paths,loner_type,level,fragment_leftovers):             # <<<<<<<<<<<<<<
 * 
 *         loner_info = self.LonerInfo(loner_paths,level,loner_type)
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_17MatchMakerHandler_3run, 0, __pyx_n_s_MatchMakerHandler_run, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__139)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_run, __pyx_t_8) < 0) __PYX_ERR(0, 873, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":940
 *         return loner_pack
 * 
 *     def __first_pass__(self,loner_info,fragment_leftovers):             # <<<<<<<<<<<<<<
 *         cdef dict pairs = {}
 *         for read in self.__read_generator__(loner_info,
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_17MatchMakerHandler_5__first_pass__, 0, __pyx_n_s_MatchMakerHandler___first_pass, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__141)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_first_pass, __pyx_t_8) < 0) __PYX_ERR(0, 940, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":951
 *         return self.__prepare_for_second_pass__(pairs)
 * 
 *     def __prepare_for_second_pass__(self,pairs):             # <<<<<<<<<<<<<<
 *         return dict(filter( lambda tup : tup[1], iter(pairs.items()) ))
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_17MatchMakerHandler_7__prepare_for_second_pass__, 0, __pyx_n_s_MatchMakerHandler___prepare_for_2, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__143)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_prepare_for_second_pass, __pyx_t_8) < 0) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":954
 *         return dict(filter( lambda tup : tup[1], iter(pairs.items()) ))
 * 
 *     def __read_generator__(self,loner_info,             # <<<<<<<<<<<<<<
 *                             second_pass=False,leftover_paths=None,
 *                             fragment_leftovers=False):
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_17MatchMakerHandler_9__read_generator__, 0, __pyx_n_s_MatchMakerHandler___read_generat, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__16)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__145);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_read_generator, __pyx_t_8) < 0) __PYX_ERR(0, 954, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":986
 *         gc.collect()
 * 
 *     def __write_leftovers__(self,bam_iterator,fragment_leftovers,             # <<<<<<<<<<<<<<
 *                                  loner_info,leftover_paths):
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_17MatchMakerHandler_12__write_leftovers__, 0, __pyx_n_s_MatchMakerHandler___write_leftov, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__147)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_write_leftovers, __pyx_t_8) < 0) __PYX_ERR(0, 986, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":1014
 *             os.remove(empty_leftover_path)
 * 
 *     def __add_to_leftover_paths__(self,leftover_file,leftover_paths):             # <<<<<<<<<<<<<<
 *         leftover_paths.append(leftover_file.filename)
 *         leftover_file.close()
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_17MatchMakerHandler_14__add_to_leftover_paths__, 0, __pyx_n_s_MatchMakerHandler___add_to_lefto, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__149)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_add_to_leftover_paths, __pyx_t_8) < 0) __PYX_ERR(0, 1014, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":1018
 *         leftover_file.close()
 * 
 *     def __launch_child_task__(self,pairs):             # <<<<<<<<<<<<<<
 *         child_pack = self._child_pack
 *         results = child_pack["chaser_task"].handle_pair_dict(pairs,\
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_17MatchMakerHandler_16__launch_child_task__, 0, __pyx_n_s_MatchMakerHandler___launch_child, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__151)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_launch_child_task, __pyx_t_8) < 0) __PYX_ERR(0, 1018, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":1026
 *         return len(pairs)
 * 
 *     def __get_leftover_object__(self,loner_info,unique):             # <<<<<<<<<<<<<<
 *         path = self.__get_loner_temp_path__(loner_info.loner_type,\
 *                                         loner_info.level,"lftovr%d" % (unique,))
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_17MatchMakerHandler_18__get_leftover_object__, 0, __pyx_n_s_MatchMakerHandler___get_leftover, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__153)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_get_leftover_object, __pyx_t_8) < 0) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":1032
 *         return leftover
 * 
 *     def __get_loner_object__(self,path):             # <<<<<<<<<<<<<<
 *         loner_object = pysam.AlignmentFile(path,"wb",header=self._header)
 *         return loner_object
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7parabam_6chaser_17MatchMakerHandler_20__get_loner_object__, 0, __pyx_n_s_MatchMakerHandler___get_loner_ob, NULL, __pyx_n_s_parabam_chaser, __pyx_d, ((PyObject *)__pyx_codeobj__155)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_get_loner_object, __pyx_t_8) < 0) __PYX_ERR(0, 1032, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "parabam/chaser.pyx":866
 *         return paths
 * 
 * class MatchMakerHandler(ChaserHandler):             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self,object constants,int max_reads, dict child_pack,int pid):
 */
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_MatchMakerHandler, __pyx_t_2, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MatchMakerHandler, __pyx_t_8) < 0) __PYX_ERR(0, 866, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "parabam/chaser.pyx":1
 * #Once upon a time             # <<<<<<<<<<<<<<
 * import pysam
 * import time
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init parabam.chaser", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_CLEAR(__pyx_m);
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init parabam.chaser");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #elif PY_MAJOR_VERSION >= 3
  return __pyx_m;
  #else
  return;
  #endif
}

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule(modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, "RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyObjectGetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
    if (unlikely(!result)) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

/* RaiseArgTupleInvalid */
static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

/* RaiseDoubleKeywords */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

/* ParseKeywords */
static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

/* PyDictVersioning */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
    PyObject **dictptr = NULL;
    Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
    if (offset) {
#if CYTHON_COMPILING_IN_CPYTHON
        dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
#else
        dictptr = _PyObject_GetDictPtr(obj);
#endif
    }
    return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
}
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
        return 0;
    return obj_dict_version == __Pyx_get_object_dict_version(obj);
}
#endif

/* GetModuleGlobalName */
#if CYTHON_USE_DICT_VERSIONS
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
#else
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
#endif
{
    PyObject *result;
#if !CYTHON_AVOID_BORROWED_REFS
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
    result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    } else if (unlikely(PyErr_Occurred())) {
        return NULL;
    }
#else
    result = PyDict_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
#endif
#else
    result = PyObject_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
    PyErr_Clear();
#endif
    return __Pyx_GetBuiltinName(name);
}

/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = func->ob_type->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyCFunctionFastCall */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
    PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    int flags = PyCFunction_GET_FLAGS(func);
    assert(PyCFunction_Check(func));
    assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
    assert(nargs >= 0);
    assert(nargs == 0 || args != NULL);
    /* _PyCFunction_FastCallDict() must not be called with an exception set,
       because it may clear it (directly or indirectly) and so the
       caller loses its exception */
    assert(!PyErr_Occurred());
    if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
        return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
    } else {
        return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
    }
}
#endif

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject **fastlocals;
    Py_ssize_t i;
    PyObject *result;
    assert(globals != NULL);
    /* XXX Perhaps we should create a specialized
       PyFrame_New() that doesn't take locals, but does
       take builtins without sanity checking them.
       */
    assert(tstate != NULL);
    f = PyFrame_New(tstate, co, globals, NULL);
    if (f == NULL) {
        return NULL;
    }
    fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
    for (i = 0; i < na; i++) {
        Py_INCREF(*args);
        fastlocals[i] = *args++;
    }
    result = PyEval_EvalFrameEx(f,0);
    ++tstate->recursion_depth;
    Py_DECREF(f);
    --tstate->recursion_depth;
    return result;
}
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
#if PY_MAJOR_VERSION >= 3
    PyObject *kwdefs;
#endif
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
        return NULL;
    }
    if (
#if PY_MAJOR_VERSION >= 3
            co->co_kwonlyargcount == 0 &&
#endif
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
#if PY_MAJOR_VERSION >= 3
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif
#endif

/* PyObjectCall2Args */
static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
    PyObject *args, *result = NULL;
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyFunction_FastCall(function, args, 2);
    }
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyCFunction_FastCall(function, args, 2);
    }
    #endif
    args = PyTuple_New(2);
    if (unlikely(!args)) goto done;
    Py_INCREF(arg1);
    PyTuple_SET_ITEM(args, 0, arg1);
    Py_INCREF(arg2);
    PyTuple_SET_ITEM(args, 1, arg2);
    Py_INCREF(function);
    result = __Pyx_PyObject_Call(function, args, NULL);
    Py_DECREF(args);
    Py_DECREF(function);
done:
    return result;
}

/* PyObjectCallMethO */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallOneArg */
#if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_New(1);
    if (unlikely(!args)) return NULL;
    Py_INCREF(arg);
    PyTuple_SET_ITEM(args, 0, arg);
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, &arg, 1);
    }
#endif
    if (likely(PyCFunction_Check(func))) {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
#if CYTHON_FAST_PYCCALL
        } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
            return __Pyx_PyCFunction_FastCall(func, &arg, 1);
#endif
        }
    }
    return __Pyx__PyObject_CallOneArg(func, arg);
}
#else
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_Pack(1, arg);
    if (unlikely(!args)) return NULL;
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
#endif

/* PyObjectSetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_setattro))
        return tp->tp_setattro(obj, attr_name, value);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_setattr))
        return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
#endif
    return PyObject_SetAttr(obj, attr_name, value);
}
#endif

/* ArgTypeTest */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    else if (exact) {
        #if PY_MAJOR_VERSION == 2
        if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
        #endif
    }
    else {
        if (likely(__Pyx_TypeCheck(obj, type))) return 1;
    }
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
        name, type->tp_name, Py_TYPE(obj)->tp_name);
    return 0;
}

/* None */
static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace;
    (void)zerodivision_check;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            x = (long)((unsigned long)a + b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            double result;
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

/* PyObjectCallNoArg */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, NULL, 0);
    }
#endif
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
#else
    if (likely(PyCFunction_Check(func)))
#endif
    {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
            return __Pyx_PyObject_CallMethO(func, NULL);
        }
    }
    return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
}
#endif

/* 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) {
#if CYTHON_FAST_THREAD_STATE
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

/* UnpackItemEndCheck */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    } else {
        return __Pyx_IterFinish();
    }
    return 0;
}

/* GetTopmostException */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
           exc_info->previous_item != NULL)
    {
        exc_info = exc_info->previous_item;
    }
    return exc_info;
}
#endif

/* SaveResetException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    #endif
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = type;
    exc_info->exc_value = value;
    exc_info->exc_traceback = tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
#endif

/* PyErrExceptionMatches */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    PyObject *exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
    if (unlikely(PyTuple_Check(err)))
        return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
}
#endif

/* PyErrFetchRestore */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
}
#endif

/* GetItemInt */
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!j) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyTuple_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (is_list || PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

/* CalculateMetaclass */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
    for (i=0; i < nbases; i++) {
        PyTypeObject *tmptype;
        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
        tmptype = Py_TYPE(tmp);
#if PY_MAJOR_VERSION < 3
        if (tmptype == &PyClass_Type)
            continue;
#endif
        if (!metaclass) {
            metaclass = tmptype;
            continue;
        }
        if (PyType_IsSubtype(metaclass, tmptype))
            continue;
        if (PyType_IsSubtype(tmptype, metaclass)) {
            metaclass = tmptype;
            continue;
        }
        PyErr_SetString(PyExc_TypeError,
                        "metaclass conflict: "
                        "the metaclass of a derived class "
                        "must be a (non-strict) subclass "
                        "of the metaclasses of all its bases");
        return NULL;
    }
    if (!metaclass) {
#if PY_MAJOR_VERSION < 3
        metaclass = &PyClass_Type;
#else
        metaclass = &PyType_Type;
#endif
    }
    Py_INCREF((PyObject*) metaclass);
    return (PyObject*) metaclass;
}

/* FetchCommonType */
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* fake_module;
    PyTypeObject* cached_type = NULL;
    fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
    if (!fake_module) return NULL;
    Py_INCREF(fake_module);
    cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
    if (cached_type) {
        if (!PyType_Check((PyObject*)cached_type)) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s is not a type object",
                type->tp_name);
            goto bad;
        }
        if (cached_type->tp_basicsize != type->tp_basicsize) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s has the wrong size, try recompiling",
                type->tp_name);
            goto bad;
        }
    } else {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
        PyErr_Clear();
        if (PyType_Ready(type) < 0) goto bad;
        if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
            goto bad;
        Py_INCREF(type);
        cached_type = type;
    }
done:
    Py_DECREF(fake_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

/* CythonFunction */
#include <structmember.h>
static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
{
    if (unlikely(op->func_doc == NULL)) {
        if (op->func.m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
            op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
#else
            op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
#endif
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp = op->func_doc;
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    op->func_doc = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    if (unlikely(op->func_name == NULL)) {
#if PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = op->func_name;
    Py_INCREF(value);
    op->func_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = op->func_qualname;
    Py_INCREF(value);
    op->func_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
{
    PyObject *self;
    self = m->func_closure;
    if (self == NULL)
        self = Py_None;
    Py_INCREF(self);
    return self;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    tmp = op->func_dict;
    Py_INCREF(value);
    op->func_dict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    #else
    op->defaults_tuple = PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyTuple_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_tuple;
    op->defaults_tuple = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_kwdict;
    op->defaults_kwdict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value || value == Py_None) {
        value = NULL;
    } else if (!PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    tmp = op->func_annotations;
    op->func_annotations = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
    {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromString(m->func.m_ml->ml_name);
#else
    return PyString_FromString(m->func.m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if PY_VERSION_HEX < 0x030500A0
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
    if (op == NULL)
        return NULL;
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
    op->func.m_ml = ml;
    op->func.m_self = (PyObject *) op;
    Py_XINCREF(closure);
    op->func_closure = closure;
    Py_XINCREF(module);
    op->func.m_module = module;
    op->func_dict = NULL;
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
    op->func_classobj = NULL;
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    PyObject_GC_Track(op);
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
    Py_CLEAR(m->func.m_module);
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
    Py_CLEAR(m->func_classobj);
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyObject_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    PyObject_GC_Del(m);
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    __Pyx__CyFunction_dealloc(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
    Py_VISIT(m->func.m_module);
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    Py_VISIT(m->func_code);
    Py_VISIT(m->func_classobj);
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
{
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
        Py_INCREF(func);
        return func;
    }
    if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
        if (type == NULL)
            type = (PyObject *)(Py_TYPE(obj));
        return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
    }
    if (obj == Py_None)
        obj = NULL;
    return __Pyx_PyMethod_New(func, obj, type);
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    Py_ssize_t size;
    switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
    case METH_VARARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0))
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 0))
                return (*meth)(self, NULL);
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
                #endif
                result = (*meth)(self, arg0);
                #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
                Py_DECREF(arg0);
                #endif
                return result;
            }
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags in "
                        "__Pyx_CyFunction_Call. METH_OLDARGS is no "
                        "longer supported!");
        return NULL;
    }
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
        argc = PyTuple_GET_SIZE(args);
        new_args = PyTuple_GetSlice(args, 1, argc);
        if (unlikely(!new_args))
            return NULL;
        self = PyTuple_GetItem(args, 0);
        if (unlikely(!self)) {
            Py_DECREF(new_args);
            return NULL;
        }
        result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
        Py_DECREF(new_args);
    } else {
        result = __Pyx_CyFunction_Call(func, args, kw);
    }
    return result;
}
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
    (destructor) __Pyx_CyFunction_dealloc,
    0,
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    (reprfunc) __Pyx_CyFunction_repr,
    0,
    0,
    0,
    0,
    __Pyx_CyFunction_CallAsMethod,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
    0,
    (traverseproc) __Pyx_CyFunction_traverse,
    (inquiry) __Pyx_CyFunction_clear,
    0,
#if PY_VERSION_HEX < 0x030500A0
    offsetof(__pyx_CyFunctionObject, func_weakreflist),
#else
    offsetof(PyCFunctionObject, m_weakreflist),
#endif
    0,
    0,
    __pyx_CyFunction_methods,
    __pyx_CyFunction_members,
    __pyx_CyFunction_getsets,
    0,
    0,
    __Pyx_CyFunction_descr_get,
    0,
    offsetof(__pyx_CyFunctionObject, func_dict),
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
    0,
#endif
};
static int __pyx_CyFunction_init(void) {
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
    if (unlikely(__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_Malloc(size);
    if (unlikely(!m->defaults))
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    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);
}

/* Py3ClassCreate */
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
                                           PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
    PyObject *ns;
    if (metaclass) {
        PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
        if (prep) {
            PyObject *pargs = PyTuple_Pack(2, name, bases);
            if (unlikely(!pargs)) {
                Py_DECREF(prep);
                return NULL;
            }
            ns = PyObject_Call(prep, pargs, mkw);
            Py_DECREF(prep);
            Py_DECREF(pargs);
        } else {
            if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
                return NULL;
            PyErr_Clear();
            ns = PyDict_New();
        }
    } else {
        ns = PyDict_New();
    }
    if (unlikely(!ns))
        return NULL;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
    return ns;
bad:
    Py_DECREF(ns);
    return NULL;
}
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
                                      PyObject *dict, PyObject *mkw,
                                      int calculate_metaclass, int allow_py2_metaclass) {
    PyObject *result, *margs;
    PyObject *owned_metaclass = NULL;
    if (allow_py2_metaclass) {
        owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
        if (owned_metaclass) {
            metaclass = owned_metaclass;
        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
            PyErr_Clear();
        } else {
            return NULL;
        }
    }
    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
        Py_XDECREF(owned_metaclass);
        if (unlikely(!metaclass))
            return NULL;
        owned_metaclass = metaclass;
    }
    margs = PyTuple_Pack(3, name, bases, dict);
    if (unlikely(!margs)) {
        result = NULL;
    } else {
        result = PyObject_Call(metaclass, margs, mkw);
        Py_DECREF(margs);
    }
    Py_XDECREF(owned_metaclass);
    return result;
}

/* DictGetItem */
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (!PyErr_Occurred()) {
            if (unlikely(PyTuple_Check(key))) {
                PyObject* args = PyTuple_Pack(1, key);
                if (likely(args)) {
                    PyErr_SetObject(PyExc_KeyError, args);
                    Py_DECREF(args);
                }
            } else {
                PyErr_SetObject(PyExc_KeyError, key);
            }
        }
        return NULL;
    }
    Py_INCREF(value);
    return value;
}
#endif

/* PyIntCompare */
static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) {
    if (op1 == op2) {
        Py_RETURN_TRUE;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = Py_SIZE(op1);
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        if (intval == 0) {
            if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
        } else if (intval < 0) {
            if (size >= 0)
                Py_RETURN_FALSE;
            intval = -intval;
            size = -size;
        } else {
            if (size <= 0)
                Py_RETURN_FALSE;
        }
        uintval = (unsigned long) intval;
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 4)) {
            unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 3)) {
            unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 2)) {
            unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 1)) {
            unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
            unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
        if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
        if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    return (
        PyObject_RichCompare(op1, op2, Py_EQ));
}

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
#if PY_MAJOR_VERSION < 3 || CYTHON_USE_PYLONG_INTERNALS
#define __Pyx_PyInt_RemainderObjC_ZeroDivisionError(operand)\
    if (unlikely(zerodivision_check && ((operand) == 0))) {\
        PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");\
        return NULL;\
    }
#endif
static PyObject* __Pyx_PyInt_RemainderObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace;
    (void)zerodivision_check;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            __Pyx_PyInt_RemainderObjC_ZeroDivisionError(b)
            x = a % b;
            x += ((x != 0) & ((x ^ b) < 0)) * b;
            return PyInt_FromLong(x);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_remainder(op1, op2);
            }
        }
                __Pyx_PyInt_RemainderObjC_ZeroDivisionError(b)
                x = a % b;
                x += ((x != 0) & ((x ^ b) < 0)) * b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla % llb;
                llx += ((llx != 0) & ((llx ^ llb) < 0)) * llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    return (inplace ? PyNumber_InPlaceRemainder : PyNumber_Remainder)(op1, op2);
}
#endif

/* pyobject_as_double */
static double __Pyx__PyObject_AsDouble(PyObject* obj) {
    PyObject* float_value;
#if !CYTHON_USE_TYPE_SLOTS
    float_value = PyNumber_Float(obj);  if ((0)) goto bad;
#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))) {
            PyErr_Format(PyExc_TypeError,
                "__float__ returned non-float (type %.200s)",
                Py_TYPE(float_value)->tp_name);
            Py_DECREF(float_value);
            goto bad;
        }
    } else if (PyUnicode_CheckExact(obj) || PyBytes_CheckExact(obj)) {
#if PY_MAJOR_VERSION >= 3
        float_value = PyFloat_FromString(obj);
#else
        float_value = PyFloat_FromString(obj, 0);
#endif
    } else {
        PyObject* args = PyTuple_New(1);
        if (unlikely(!args)) goto bad;
        PyTuple_SET_ITEM(args, 0, obj);
        float_value = PyObject_Call((PyObject*)&PyFloat_Type, args, 0);
        PyTuple_SET_ITEM(args, 0, 0);
        Py_DECREF(args);
    }
#endif
    if (likely(float_value)) {
        double value = PyFloat_AS_DOUBLE(float_value);
        Py_DECREF(float_value);
        return value;
    }
bad:
    return (double)-1;
}

/* BytesEquals */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result;
#if CYTHON_USE_UNICODE_INTERNALS
            Py_hash_t hash1, hash2;
            hash1 = ((PyBytesObject*)s1)->ob_shash;
            hash2 = ((PyBytesObject*)s2)->ob_shash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                return (equals == Py_NE);
            }
#endif
            result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

/* UnicodeEquals */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
#if PY_MAJOR_VERSION < 3
    PyObject* owned_ref = NULL;
#endif
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
#if PY_MAJOR_VERSION < 3
    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
        owned_ref = PyUnicode_FromObject(s2);
        if (unlikely(!owned_ref))
            return -1;
        s2 = owned_ref;
        s2_is_unicode = 1;
    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
        owned_ref = PyUnicode_FromObject(s1);
        if (unlikely(!owned_ref))
            return -1;
        s1 = owned_ref;
        s1_is_unicode = 1;
    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
        return __Pyx_PyBytes_Equals(s1, s2, equals);
    }
#endif
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length;
        int kind;
        void *data1, *data2;
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
        #if CYTHON_PEP393_ENABLED
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
        #else
            hash1 = ((PyUnicodeObject*)s1)->hash;
            hash2 = ((PyUnicodeObject*)s2)->hash;
        #endif
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                goto return_ne;
            }
        }
#endif
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            #if PY_MAJOR_VERSION < 3
            Py_XDECREF(owned_ref);
            #endif
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        #if PY_MAJOR_VERSION < 3
        Py_XDECREF(owned_ref);
        #endif
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_EQ);
return_ne:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_NE);
#endif
}

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace;
    (void)zerodivision_check;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            x = (long)((unsigned long)a - b);
            if (likely((x^a) >= 0 || (x^~b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
            }
        }
                x = a - b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla - llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            double result;
            PyFPE_START_PROTECT("subtract", return NULL)
            result = ((double)a) - (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
}
#endif

/* PyObjectGetMethod */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
    PyObject *attr;
#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
    PyTypeObject *tp = Py_TYPE(obj);
    PyObject *descr;
    descrgetfunc f = NULL;
    PyObject **dictptr, *dict;
    int meth_found = 0;
    assert (*method == NULL);
    if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
        attr = __Pyx_PyObject_GetAttrStr(obj, name);
        goto try_unpack;
    }
    if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
        return 0;
    }
    descr = _PyType_Lookup(tp, name);
    if (likely(descr != NULL)) {
        Py_INCREF(descr);
#if PY_MAJOR_VERSION >= 3
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
        #endif
#else
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr)))
        #endif
#endif
        {
            meth_found = 1;
        } else {
            f = Py_TYPE(descr)->tp_descr_get;
            if (f != NULL && PyDescr_IsData(descr)) {
                attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
                Py_DECREF(descr);
                goto try_unpack;
            }
        }
    }
    dictptr = _PyObject_GetDictPtr(obj);
    if (dictptr != NULL && (dict = *dictptr) != NULL) {
        Py_INCREF(dict);
        attr = __Pyx_PyDict_GetItemStr(dict, name);
        if (attr != NULL) {
            Py_INCREF(attr);
            Py_DECREF(dict);
            Py_XDECREF(descr);
            goto try_unpack;
        }
        Py_DECREF(dict);
    }
    if (meth_found) {
        *method = descr;
        return 1;
    }
    if (f != NULL) {
        attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
        Py_DECREF(descr);
        goto try_unpack;
    }
    if (descr != NULL) {
        *method = descr;
        return 0;
    }
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(name));
#endif
    return 0;
#else
    attr = __Pyx_PyObject_GetAttrStr(obj, name);
    goto try_unpack;
#endif
try_unpack:
#if CYTHON_UNPACK_METHODS
    if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
        PyObject *function = PyMethod_GET_FUNCTION(attr);
        Py_INCREF(function);
        Py_DECREF(attr);
        *method = function;
        return 1;
    }
#endif
    *method = attr;
    return 0;
}

/* PyObjectCallMethod1 */
static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
    PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
    Py_DECREF(method);
    return result;
}
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
    PyObject *method = NULL, *result;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_Call2Args(method, obj, arg);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) return NULL;
    return __Pyx__PyObject_CallMethod1(method, arg);
}

/* 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_n_s_append, x);
        if (unlikely(!retval))
            return -1;
        Py_DECREF(retval);
    }
    return 0;
}

/* ObjectGetItem */
#if CYTHON_USE_TYPE_SLOTS
static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
    PyObject *runerr;
    Py_ssize_t key_value;
    PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
    if (unlikely(!(m && m->sq_item))) {
        PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
        return NULL;
    }
    key_value = __Pyx_PyIndex_AsSsize_t(index);
    if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
        return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
    }
    if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
        PyErr_Clear();
        PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
    }
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
    PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
    if (likely(m && m->mp_subscript)) {
        return m->mp_subscript(obj, key);
    }
    return __Pyx_PyObject_GetIndex(obj, key);
}
#endif

/* GetException */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
#endif
{
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
    #if CYTHON_USE_EXC_INFO_STACK
    {
        _PyErr_StackItem *exc_info = tstate->exc_info;
        tmp_type = exc_info->exc_type;
        tmp_value = exc_info->exc_value;
        tmp_tb = exc_info->exc_traceback;
        exc_info->exc_type = local_type;
        exc_info->exc_value = local_value;
        exc_info->exc_traceback = local_tb;
    }
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = a->tp_base;
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
#if PY_MAJOR_VERSION == 2
static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
    PyObject *exception, *value, *tb;
    int res;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&exception, &value, &tb);
    res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
    if (unlikely(res == -1)) {
        PyErr_WriteUnraisable(err);
        res = 0;
    }
    if (!res) {
        res = PyObject_IsSubclass(err, exc_type2);
        if (unlikely(res == -1)) {
            PyErr_WriteUnraisable(err);
            res = 0;
        }
    }
    __Pyx_ErrRestore(exception, value, tb);
    return res;
}
#else
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
    if (!res) {
        res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
    return res;
}
#endif
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        #if PY_MAJOR_VERSION < 3
        if (likely(exc_type == t)) return 1;
        #endif
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddCObj(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace;
    (void)zerodivision_check;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op2))) {
        const long a = intval;
        long x;
        long b = PyInt_AS_LONG(op2);
            x = (long)((unsigned long)a + b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op2))) {
        const long a = intval;
        long b, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG lla = intval;
        PY_LONG_LONG llb, llx;
#endif
        const digit* digits = ((PyLongObject*)op2)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op2);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            b = likely(size) ? digits[0] : 0;
            if (size == -1) b = -b;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        b = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        llb = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        b = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        llb = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        b = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        llb = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        b = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        llb = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        b = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        llb = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        b = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        llb = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op2)) {
        const long a = intval;
        double b = PyFloat_AS_DOUBLE(op2);
            double result;
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

/* SliceObject */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
        Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
        int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
#if CYTHON_USE_TYPE_SLOTS
    PyMappingMethods* mp;
#if PY_MAJOR_VERSION < 3
    PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
    if (likely(ms && ms->sq_slice)) {
        if (!has_cstart) {
            if (_py_start && (*_py_start != Py_None)) {
                cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
                if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstart = 0;
        }
        if (!has_cstop) {
            if (_py_stop && (*_py_stop != Py_None)) {
                cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
                if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstop = PY_SSIZE_T_MAX;
        }
        if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
            Py_ssize_t l = ms->sq_length(obj);
            if (likely(l >= 0)) {
                if (cstop < 0) {
                    cstop += l;
                    if (cstop < 0) cstop = 0;
                }
                if (cstart < 0) {
                    cstart += l;
                    if (cstart < 0) cstart = 0;
                }
            } else {
                if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                    goto bad;
                PyErr_Clear();
            }
        }
        return ms->sq_slice(obj, cstart, cstop);
    }
#endif
    mp = Py_TYPE(obj)->tp_as_mapping;
    if (likely(mp && mp->mp_subscript))
#endif
    {
        PyObject* result;
        PyObject *py_slice, *py_start, *py_stop;
        if (_py_slice) {
            py_slice = *_py_slice;
        } else {
            PyObject* owned_start = NULL;
            PyObject* owned_stop = NULL;
            if (_py_start) {
                py_start = *_py_start;
            } else {
                if (has_cstart) {
                    owned_start = py_start = PyInt_FromSsize_t(cstart);
                    if (unlikely(!py_start)) goto bad;
                } else
                    py_start = Py_None;
            }
            if (_py_stop) {
                py_stop = *_py_stop;
            } else {
                if (has_cstop) {
                    owned_stop = py_stop = PyInt_FromSsize_t(cstop);
                    if (unlikely(!py_stop)) {
                        Py_XDECREF(owned_start);
                        goto bad;
                    }
                } else
                    py_stop = Py_None;
            }
            py_slice = PySlice_New(py_start, py_stop, Py_None);
            Py_XDECREF(owned_start);
            Py_XDECREF(owned_stop);
            if (unlikely(!py_slice)) goto bad;
        }
#if CYTHON_USE_TYPE_SLOTS
        result = mp->mp_subscript(obj, py_slice);
#else
        result = PyObject_GetItem(obj, py_slice);
#endif
        if (!_py_slice) {
            Py_DECREF(py_slice);
        }
        return result;
    }
    PyErr_Format(PyExc_TypeError,
        "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
bad:
    return NULL;
}

/* None */
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

/* PyObject_GenericGetAttrNoDict */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, attr_name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(attr_name));
#endif
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
    PyObject *descr;
    PyTypeObject *tp = Py_TYPE(obj);
    if (unlikely(!PyString_Check(attr_name))) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    assert(!tp->tp_dictoffset);
    descr = _PyType_Lookup(tp, attr_name);
    if (unlikely(!descr)) {
        return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
    }
    Py_INCREF(descr);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
    #endif
    {
        descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
        if (unlikely(f)) {
            PyObject *res = f(descr, obj, (PyObject *)tp);
            Py_DECREF(descr);
            return res;
        }
    }
    return descr;
}
#endif

/* Import */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (!py_import)
        goto bad;
    #endif
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if (strchr(__Pyx_MODULE_NAME, '.')) {
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_MAJOR_VERSION < 3
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
bad:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* ImportFrom */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

/* CLineInTraceback */
#ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    if (unlikely(!__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, *cython_runtime_dict,
            __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(filename);
    #else
    py_srcfile = PyUnicode_FromString(filename);
    #endif
    if (!py_srcfile) goto bad;
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    Py_DECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_srcfile);
    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;
    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) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_d,    /*PyObject *globals,*/
        0                  /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

/* CIntFromPyVerify */
#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
    const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

/* Print */
#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3
static PyObject *__Pyx_GetStdout(void) {
    PyObject *f = PySys_GetObject((char *)"stdout");
    if (!f) {
        PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout");
    }
    return f;
}
static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) {
    int i;
    if (!f) {
        if (!(f = __Pyx_GetStdout()))
            return -1;
    }
    Py_INCREF(f);
    for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) {
        PyObject* v;
        if (PyFile_SoftSpace(f, 1)) {
            if (PyFile_WriteString(" ", f) < 0)
                goto error;
        }
        v = PyTuple_GET_ITEM(arg_tuple, i);
        if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0)
            goto error;
        if (PyString_Check(v)) {
            char *s = PyString_AsString(v);
            Py_ssize_t len = PyString_Size(v);
            if (len > 0) {
                switch (s[len-1]) {
                    case ' ': break;
                    case '\f': case '\r': case '\n': case '\t': case '\v':
                        PyFile_SoftSpace(f, 0);
                        break;
                    default:  break;
                }
            }
        }
    }
    if (newline) {
        if (PyFile_WriteString("\n", f) < 0)
            goto error;
        PyFile_SoftSpace(f, 0);
    }
    Py_DECREF(f);
    return 0;
error:
    Py_DECREF(f);
    return -1;
}
#else
static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) {
    PyObject* kwargs = 0;
    PyObject* result = 0;
    PyObject* end_string;
    if (unlikely(!__pyx_print)) {
        __pyx_print = PyObject_GetAttr(__pyx_b, __pyx_n_s_print);
        if (!__pyx_print)
            return -1;
    }
    if (stream) {
        kwargs = PyDict_New();
        if (unlikely(!kwargs))
            return -1;
        if (unlikely(PyDict_SetItem(kwargs, __pyx_n_s_file, stream) < 0))
            goto bad;
        if (!newline) {
            end_string = PyUnicode_FromStringAndSize(" ", 1);
            if (unlikely(!end_string))
                goto bad;
            if (PyDict_SetItem(kwargs, __pyx_n_s_end, end_string) < 0) {
                Py_DECREF(end_string);
                goto bad;
            }
            Py_DECREF(end_string);
        }
    } else if (!newline) {
        if (unlikely(!__pyx_print_kwargs)) {
            __pyx_print_kwargs = PyDict_New();
            if (unlikely(!__pyx_print_kwargs))
                return -1;
            end_string = PyUnicode_FromStringAndSize(" ", 1);
            if (unlikely(!end_string))
                return -1;
            if (PyDict_SetItem(__pyx_print_kwargs, __pyx_n_s_end, end_string) < 0) {
                Py_DECREF(end_string);
                return -1;
            }
            Py_DECREF(end_string);
        }
        kwargs = __pyx_print_kwargs;
    }
    result = PyObject_Call(__pyx_print, arg_tuple, kwargs);
    if (unlikely(kwargs) && (kwargs != __pyx_print_kwargs))
        Py_DECREF(kwargs);
    if (!result)
        return -1;
    Py_DECREF(result);
    return 0;
bad:
    if (kwargs != __pyx_print_kwargs)
        Py_XDECREF(kwargs);
    return -1;
}
#endif

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
    const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
    const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* PrintOne */
#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3
static int __Pyx_PrintOne(PyObject* f, PyObject *o) {
    if (!f) {
        if (!(f = __Pyx_GetStdout()))
            return -1;
    }
    Py_INCREF(f);
    if (PyFile_SoftSpace(f, 0)) {
        if (PyFile_WriteString(" ", f) < 0)
            goto error;
    }
    if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0)
        goto error;
    if (PyFile_WriteString("\n", f) < 0)
        goto error;
    Py_DECREF(f);
    return 0;
error:
    Py_DECREF(f);
    return -1;
    /* the line below is just to avoid C compiler
     * warnings about unused functions */
    return __Pyx_Print(f, NULL, 0);
}
#else
static int __Pyx_PrintOne(PyObject* stream, PyObject *o) {
    int res;
    PyObject* arg_tuple = PyTuple_Pack(1, o);
    if (unlikely(!arg_tuple))
        return -1;
    res = __Pyx_Print(stream, arg_tuple, 1);
    Py_DECREF(arg_tuple);
    return res;
}
#endif

/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
    const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (long) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(long) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(long) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* RaiseException */
#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    __Pyx_PyThreadState_declare
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
    }
    __Pyx_PyThreadState_assign
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause) {
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
#if CYTHON_COMPILING_IN_PYPY
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#else
        PyThreadState *tstate = __Pyx_PyThreadState_Current;
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

/* SwapException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = *type;
    exc_info->exc_value = *value;
    exc_info->exc_traceback = *tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = *type;
    tstate->exc_value = *value;
    tstate->exc_traceback = *tb;
    #endif
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#endif

/* CoroutineBase */
#include <structmember.h>
#include <frameobject.h>
#define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) {
    PyObject *et, *ev, *tb;
    PyObject *value = NULL;
    __Pyx_ErrFetch(&et, &ev, &tb);
    if (!et) {
        Py_XDECREF(tb);
        Py_XDECREF(ev);
        Py_INCREF(Py_None);
        *pvalue = Py_None;
        return 0;
    }
    if (likely(et == PyExc_StopIteration)) {
        if (!ev) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#if PY_VERSION_HEX >= 0x030300A0
        else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
            value = ((PyStopIterationObject *)ev)->value;
            Py_INCREF(value);
            Py_DECREF(ev);
        }
#endif
        else if (unlikely(PyTuple_Check(ev))) {
            if (PyTuple_GET_SIZE(ev) >= 1) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                value = PyTuple_GET_ITEM(ev, 0);
                Py_INCREF(value);
#else
                value = PySequence_ITEM(ev, 0);
#endif
            } else {
                Py_INCREF(Py_None);
                value = Py_None;
            }
            Py_DECREF(ev);
        }
        else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
            value = ev;
        }
        if (likely(value)) {
            Py_XDECREF(tb);
            Py_DECREF(et);
            *pvalue = value;
            return 0;
        }
    } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    PyErr_NormalizeException(&et, &ev, &tb);
    if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    Py_XDECREF(tb);
    Py_DECREF(et);
#if PY_VERSION_HEX >= 0x030300A0
    value = ((PyStopIterationObject *)ev)->value;
    Py_INCREF(value);
    Py_DECREF(ev);
#else
    {
        PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
        Py_DECREF(ev);
        if (likely(args)) {
            value = PySequence_GetItem(args, 0);
            Py_DECREF(args);
        }
        if (unlikely(!value)) {
            __Pyx_ErrRestore(NULL, NULL, NULL);
            Py_INCREF(Py_None);
            value = Py_None;
        }
    }
#endif
    *pvalue = value;
    return 0;
}
static CYTHON_INLINE
void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) {
    PyObject *t, *v, *tb;
    t = exc_state->exc_type;
    v = exc_state->exc_value;
    tb = exc_state->exc_traceback;
    exc_state->exc_type = NULL;
    exc_state->exc_value = NULL;
    exc_state->exc_traceback = NULL;
    Py_XDECREF(t);
    Py_XDECREF(v);
    Py_XDECREF(tb);
}
#define __Pyx_Coroutine_AlreadyRunningError(gen)  (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) {
    const char *msg;
    if ((0)) {
    #ifdef __Pyx_Coroutine_USED
    } else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
        msg = "coroutine already executing";
    #endif
    #ifdef __Pyx_AsyncGen_USED
    } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
        msg = "async generator already executing";
    #endif
    } else {
        msg = "generator already executing";
    }
    PyErr_SetString(PyExc_ValueError, msg);
}
#define __Pyx_Coroutine_NotStartedError(gen)  (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) {
    const char *msg;
    if ((0)) {
    #ifdef __Pyx_Coroutine_USED
    } else if (__Pyx_Coroutine_Check(gen)) {
        msg = "can't send non-None value to a just-started coroutine";
    #endif
    #ifdef __Pyx_AsyncGen_USED
    } else if (__Pyx_AsyncGen_CheckExact(gen)) {
        msg = "can't send non-None value to a just-started async generator";
    #endif
    } else {
        msg = "can't send non-None value to a just-started generator";
    }
    PyErr_SetString(PyExc_TypeError, msg);
}
#define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing)  (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) {
    #ifdef __Pyx_Coroutine_USED
    if (!closing && __Pyx_Coroutine_Check(gen)) {
        PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
    } else
    #endif
    if (value) {
        #ifdef __Pyx_AsyncGen_USED
        if (__Pyx_AsyncGen_CheckExact(gen))
            PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
        else
        #endif
        PyErr_SetNone(PyExc_StopIteration);
    }
}
static
PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
    __Pyx_PyThreadState_declare
    PyThreadState *tstate;
    __Pyx_ExcInfoStruct *exc_state;
    PyObject *retval;
    assert(!self->is_running);
    if (unlikely(self->resume_label == 0)) {
        if (unlikely(value && value != Py_None)) {
            return __Pyx_Coroutine_NotStartedError((PyObject*)self);
        }
    }
    if (unlikely(self->resume_label == -1)) {
        return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
    }
#if CYTHON_FAST_THREAD_STATE
    __Pyx_PyThreadState_assign
    tstate = __pyx_tstate;
#else
    tstate = __Pyx_PyThreadState_Current;
#endif
    exc_state = &self->gi_exc_state;
    if (exc_state->exc_type) {
        #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
        #else
        if (exc_state->exc_traceback) {
            PyTracebackObject *tb = (PyTracebackObject *) exc_state->exc_traceback;
            PyFrameObject *f = tb->tb_frame;
            Py_XINCREF(tstate->frame);
            assert(f->f_back == NULL);
            f->f_back = tstate->frame;
        }
        #endif
    }
#if CYTHON_USE_EXC_INFO_STACK
    exc_state->previous_item = tstate->exc_info;
    tstate->exc_info = exc_state;
#else
    if (exc_state->exc_type) {
        __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
    } else {
        __Pyx_Coroutine_ExceptionClear(exc_state);
        __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
    }
#endif
    self->is_running = 1;
    retval = self->body((PyObject *) self, tstate, value);
    self->is_running = 0;
#if CYTHON_USE_EXC_INFO_STACK
    exc_state = &self->gi_exc_state;
    tstate->exc_info = exc_state->previous_item;
    exc_state->previous_item = NULL;
    __Pyx_Coroutine_ResetFrameBackpointer(exc_state);
#endif
    return retval;
}
static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) {
    PyObject *exc_tb = exc_state->exc_traceback;
    if (likely(exc_tb)) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
#else
        PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
        PyFrameObject *f = tb->tb_frame;
        Py_CLEAR(f->f_back);
#endif
    }
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) {
    if (unlikely(!retval)) {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        if (!__Pyx_PyErr_Occurred()) {
            PyObject *exc = PyExc_StopIteration;
            #ifdef __Pyx_AsyncGen_USED
            if (__Pyx_AsyncGen_CheckExact(gen))
                exc = __Pyx_PyExc_StopAsyncIteration;
            #endif
            __Pyx_PyErr_SetNone(exc);
        }
    }
    return retval;
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
    PyObject *ret;
    PyObject *val = NULL;
    __Pyx_Coroutine_Undelegate(gen);
    __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
    ret = __Pyx_Coroutine_SendEx(gen, val, 0);
    Py_XDECREF(val);
    return ret;
}
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
    PyObject *retval;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_Check(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        #ifdef __Pyx_AsyncGen_USED
        if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
            ret = __Pyx_async_gen_asend_send(yf, value);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyGen_CheckExact(yf)) {
            ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyCoro_CheckExact(yf)) {
            ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
        } else
        #endif
        {
            if (value == Py_None)
                ret = Py_TYPE(yf)->tp_iternext(yf);
            else
                ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
        }
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        retval = __Pyx_Coroutine_FinishDelegation(gen);
    } else {
        retval = __Pyx_Coroutine_SendEx(gen, value, 0);
    }
    return __Pyx_Coroutine_MethodReturn(self, retval);
}
static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
    PyObject *retval = NULL;
    int err = 0;
    #ifdef __Pyx_Generator_USED
    if (__Pyx_Generator_CheckExact(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    #endif
    #ifdef __Pyx_Coroutine_USED
    if (__Pyx_Coroutine_Check(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    if (__Pyx_CoroutineAwait_CheckExact(yf)) {
        retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL);
        if (!retval)
            return -1;
    } else
    #endif
    #ifdef __Pyx_AsyncGen_USED
    if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
        retval = __Pyx_async_gen_asend_close(yf, NULL);
    } else
    if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
        retval = __Pyx_async_gen_athrow_close(yf, NULL);
    } else
    #endif
    {
        PyObject *meth;
        gen->is_running = 1;
        meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
        if (unlikely(!meth)) {
            if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                PyErr_WriteUnraisable(yf);
            }
            PyErr_Clear();
        } else {
            retval = PyObject_CallFunction(meth, NULL);
            Py_DECREF(meth);
            if (!retval)
                err = -1;
        }
        gen->is_running = 0;
    }
    Py_XDECREF(retval);
    return err;
}
static PyObject *__Pyx_Generator_Next(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Generator_Next(yf);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyGen_CheckExact(yf)) {
            ret = _PyGen_Send((PyGenObject*)yf, NULL);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_Check(yf)) {
            ret = __Pyx_Coroutine_Send(yf, Py_None);
        } else
        #endif
            ret = Py_TYPE(yf)->tp_iternext(yf);
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        return __Pyx_Coroutine_FinishDelegation(gen);
    }
    return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
}
static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, CYTHON_UNUSED PyObject *arg) {
    return __Pyx_Coroutine_Close(self);
}
static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *retval, *raised_exception;
    PyObject *yf = gen->yieldfrom;
    int err = 0;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        Py_INCREF(yf);
        err = __Pyx_Coroutine_CloseIter(gen, yf);
        __Pyx_Coroutine_Undelegate(gen);
        Py_DECREF(yf);
    }
    if (err == 0)
        PyErr_SetNone(PyExc_GeneratorExit);
    retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
    if (unlikely(retval)) {
        const char *msg;
        Py_DECREF(retval);
        if ((0)) {
        #ifdef __Pyx_Coroutine_USED
        } else if (__Pyx_Coroutine_Check(self)) {
            msg = "coroutine ignored GeneratorExit";
        #endif
        #ifdef __Pyx_AsyncGen_USED
        } else if (__Pyx_AsyncGen_CheckExact(self)) {
#if PY_VERSION_HEX < 0x03060000
            msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
#else
            msg = "async generator ignored GeneratorExit";
#endif
        #endif
        } else {
            msg = "generator ignored GeneratorExit";
        }
        PyErr_SetString(PyExc_RuntimeError, msg);
        return NULL;
    }
    raised_exception = PyErr_Occurred();
    if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
        if (raised_exception) PyErr_Clear();
        Py_INCREF(Py_None);
        return Py_None;
    }
    return NULL;
}
static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
                                        PyObject *args, int close_on_genexit) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        Py_INCREF(yf);
        if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
            int err = __Pyx_Coroutine_CloseIter(gen, yf);
            Py_DECREF(yf);
            __Pyx_Coroutine_Undelegate(gen);
            if (err < 0)
                return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
            goto throw_here;
        }
        gen->is_running = 1;
        if (0
        #ifdef __Pyx_Generator_USED
            || __Pyx_Generator_CheckExact(yf)
        #endif
        #ifdef __Pyx_Coroutine_USED
            || __Pyx_Coroutine_Check(yf)
        #endif
            ) {
            ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
        #ifdef __Pyx_Coroutine_USED
        } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
            ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
        #endif
        } else {
            PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
            if (unlikely(!meth)) {
                Py_DECREF(yf);
                if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                    gen->is_running = 0;
                    return NULL;
                }
                PyErr_Clear();
                __Pyx_Coroutine_Undelegate(gen);
                gen->is_running = 0;
                goto throw_here;
            }
            if (likely(args)) {
                ret = PyObject_CallObject(meth, args);
            } else {
                ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL);
            }
            Py_DECREF(meth);
        }
        gen->is_running = 0;
        Py_DECREF(yf);
        if (!ret) {
            ret = __Pyx_Coroutine_FinishDelegation(gen);
        }
        return __Pyx_Coroutine_MethodReturn(self, ret);
    }
throw_here:
    __Pyx_Raise(typ, val, tb, NULL);
    return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
}
static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
    PyObject *typ;
    PyObject *val = NULL;
    PyObject *tb = NULL;
    if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
        return NULL;
    return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
}
static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) {
    Py_VISIT(exc_state->exc_type);
    Py_VISIT(exc_state->exc_value);
    Py_VISIT(exc_state->exc_traceback);
    return 0;
}
static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
    Py_VISIT(gen->closure);
    Py_VISIT(gen->classobj);
    Py_VISIT(gen->yieldfrom);
    return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg);
}
static int __Pyx_Coroutine_clear(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    Py_CLEAR(gen->closure);
    Py_CLEAR(gen->classobj);
    Py_CLEAR(gen->yieldfrom);
    __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state);
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
    }
#endif
    Py_CLEAR(gen->gi_code);
    Py_CLEAR(gen->gi_name);
    Py_CLEAR(gen->gi_qualname);
    Py_CLEAR(gen->gi_modulename);
    return 0;
}
static void __Pyx_Coroutine_dealloc(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject_GC_UnTrack(gen);
    if (gen->gi_weakreflist != NULL)
        PyObject_ClearWeakRefs(self);
    if (gen->resume_label >= 0) {
        PyObject_GC_Track(self);
#if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
        if (PyObject_CallFinalizerFromDealloc(self))
#else
        Py_TYPE(gen)->tp_del(self);
        if (self->ob_refcnt > 0)
#endif
        {
            return;
        }
        PyObject_GC_UnTrack(self);
    }
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        /* We have to handle this case for asynchronous generators
           right here, because this code has to be between UNTRACK
           and GC_Del. */
        Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
    }
#endif
    __Pyx_Coroutine_clear(self);
    PyObject_GC_Del(gen);
}
static void __Pyx_Coroutine_del(PyObject *self) {
    PyObject *error_type, *error_value, *error_traceback;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    __Pyx_PyThreadState_declare
    if (gen->resume_label < 0) {
        return;
    }
#if !CYTHON_USE_TP_FINALIZE
    assert(self->ob_refcnt == 0);
    self->ob_refcnt = 1;
#endif
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
        PyObject *finalizer = agen->ag_finalizer;
        if (finalizer && !agen->ag_closed) {
            PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
            if (unlikely(!res)) {
                PyErr_WriteUnraisable(self);
            } else {
                Py_DECREF(res);
            }
            __Pyx_ErrRestore(error_type, error_value, error_traceback);
            return;
        }
    }
#endif
    if (unlikely(gen->resume_label == 0 && !error_value)) {
#ifdef __Pyx_Coroutine_USED
#ifdef __Pyx_Generator_USED
    if (!__Pyx_Generator_CheckExact(self))
#endif
        {
        PyObject_GC_UnTrack(self);
#if PY_MAJOR_VERSION >= 3  || defined(PyErr_WarnFormat)
        if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
            PyErr_WriteUnraisable(self);
#else
        {PyObject *msg;
        char *cmsg;
        #if CYTHON_COMPILING_IN_PYPY
        msg = NULL;
        cmsg = (char*) "coroutine was never awaited";
        #else
        char *cname;
        PyObject *qualname;
        qualname = gen->gi_qualname;
        cname = PyString_AS_STRING(qualname);
        msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
        if (unlikely(!msg)) {
            PyErr_Clear();
            cmsg = (char*) "coroutine was never awaited";
        } else {
            cmsg = PyString_AS_STRING(msg);
        }
        #endif
        if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
            PyErr_WriteUnraisable(self);
        Py_XDECREF(msg);}
#endif
        PyObject_GC_Track(self);
        }
#endif
    } else {
        PyObject *res = __Pyx_Coroutine_Close(self);
        if (unlikely(!res)) {
            if (PyErr_Occurred())
                PyErr_WriteUnraisable(self);
        } else {
            Py_DECREF(res);
        }
    }
    __Pyx_ErrRestore(error_type, error_value, error_traceback);
#if !CYTHON_USE_TP_FINALIZE
    assert(self->ob_refcnt > 0);
    if (--self->ob_refcnt == 0) {
        return;
    }
    {
        Py_ssize_t refcnt = self->ob_refcnt;
        _Py_NewReference(self);
        self->ob_refcnt = refcnt;
    }
#if CYTHON_COMPILING_IN_CPYTHON
    assert(PyType_IS_GC(self->ob_type) &&
           _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
    _Py_DEC_REFTOTAL;
#endif
#ifdef COUNT_ALLOCS
    --Py_TYPE(self)->tp_frees;
    --Py_TYPE(self)->tp_allocs;
#endif
#endif
}
static PyObject *
__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
{
    PyObject *name = self->gi_name;
    if (unlikely(!name)) name = Py_None;
    Py_INCREF(name);
    return name;
}
static int
__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = self->gi_name;
    Py_INCREF(value);
    self->gi_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
{
    PyObject *name = self->gi_qualname;
    if (unlikely(!name)) name = Py_None;
    Py_INCREF(name);
    return name;
}
static int
__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = self->gi_qualname;
    Py_INCREF(value);
    self->gi_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static __pyx_CoroutineObject *__Pyx__Coroutine_New(
            PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name) {
    __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
    if (unlikely(!gen))
        return NULL;
    return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name);
}
static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
            __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name) {
    gen->body = body;
    gen->closure = closure;
    Py_XINCREF(closure);
    gen->is_running = 0;
    gen->resume_label = 0;
    gen->classobj = NULL;
    gen->yieldfrom = NULL;
    gen->gi_exc_state.exc_type = NULL;
    gen->gi_exc_state.exc_value = NULL;
    gen->gi_exc_state.exc_traceback = NULL;
#if CYTHON_USE_EXC_INFO_STACK
    gen->gi_exc_state.previous_item = NULL;
#endif
    gen->gi_weakreflist = NULL;
    Py_XINCREF(qualname);
    gen->gi_qualname = qualname;
    Py_XINCREF(name);
    gen->gi_name = name;
    Py_XINCREF(module_name);
    gen->gi_modulename = module_name;
    Py_XINCREF(code);
    gen->gi_code = code;
    PyObject_GC_Track(gen);
    return gen;
}

/* PatchModuleWithCoroutine */
static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    int result;
    PyObject *globals, *result_obj;
    globals = PyDict_New();  if (unlikely(!globals)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_coroutine_type",
    #ifdef __Pyx_Coroutine_USED
        (PyObject*)__pyx_CoroutineType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_generator_type",
    #ifdef __Pyx_Generator_USED
        (PyObject*)__pyx_GeneratorType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
    result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
    if (unlikely(!result_obj)) goto ignore;
    Py_DECREF(result_obj);
    Py_DECREF(globals);
    return module;
ignore:
    Py_XDECREF(globals);
    PyErr_WriteUnraisable(module);
    if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
        Py_DECREF(module);
        module = NULL;
    }
#else
    py_code++;
#endif
    return module;
}

/* PatchGeneratorABC */
#ifndef CYTHON_REGISTER_ABCS
#define CYTHON_REGISTER_ABCS 1
#endif
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
static PyObject* __Pyx_patch_abc_module(PyObject *module);
static PyObject* __Pyx_patch_abc_module(PyObject *module) {
    module = __Pyx_Coroutine_patch_module(
        module, ""
"if _cython_generator_type is not None:\n"
"    try: Generator = _module.Generator\n"
"    except AttributeError: pass\n"
"    else: Generator.register(_cython_generator_type)\n"
"if _cython_coroutine_type is not None:\n"
"    try: Coroutine = _module.Coroutine\n"
"    except AttributeError: pass\n"
"    else: Coroutine.register(_cython_coroutine_type)\n"
    );
    return module;
}
#endif
static int __Pyx_patch_abc(void) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    static int abc_patched = 0;
    if (CYTHON_REGISTER_ABCS && !abc_patched) {
        PyObject *module;
        module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
        if (!module) {
            PyErr_WriteUnraisable(NULL);
            if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
                    ((PY_MAJOR_VERSION >= 3) ?
                        "Cython module failed to register with collections.abc module" :
                        "Cython module failed to register with collections module"), 1) < 0)) {
                return -1;
            }
        } else {
            module = __Pyx_patch_abc_module(module);
            abc_patched = 1;
            if (unlikely(!module))
                return -1;
            Py_DECREF(module);
        }
        module = PyImport_ImportModule("backports_abc");
        if (module) {
            module = __Pyx_patch_abc_module(module);
            Py_XDECREF(module);
        }
        if (!module) {
            PyErr_Clear();
        }
    }
#else
    if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
#endif
    return 0;
}

/* Generator */
static PyMethodDef __pyx_Generator_methods[] = {
    {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
     (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
    {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
     (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
    {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS,
     (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
    {0, 0, 0, 0}
};
static PyMemberDef __pyx_Generator_memberlist[] = {
    {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
    {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
     (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
    {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
    {0, 0, 0, 0, 0}
};
static PyGetSetDef __pyx_Generator_getsets[] = {
    {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
     (char*) PyDoc_STR("name of the generator"), 0},
    {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
     (char*) PyDoc_STR("qualified name of the generator"), 0},
    {0, 0, 0, 0, 0}
};
static PyTypeObject __pyx_GeneratorType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "generator",
    sizeof(__pyx_CoroutineObject),
    0,
    (destructor) __Pyx_Coroutine_dealloc,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
    0,
    (traverseproc) __Pyx_Coroutine_traverse,
    0,
    0,
    offsetof(__pyx_CoroutineObject, gi_weakreflist),
    0,
    (iternextfunc) __Pyx_Generator_Next,
    __pyx_Generator_methods,
    __pyx_Generator_memberlist,
    __pyx_Generator_getsets,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if CYTHON_USE_TP_FINALIZE
    0,
#else
    __Pyx_Coroutine_del,
#endif
    0,
#if CYTHON_USE_TP_FINALIZE
    __Pyx_Coroutine_del,
#elif PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
    0,
#endif
};
static int __pyx_Generator_init(void) {
    __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
    __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
    __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
    if (unlikely(!__pyx_GeneratorType)) {
        return -1;
    }
    return 0;
}

/* CheckBinaryVersion */
static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

/* InitStrings */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        if (PyObject_Hash(*t->p) == -1)
            return -1;
        ++t;
    }
    return 0;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#if !CYTHON_PEP393_ENABLED
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    char* defenc_c;
    PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
    if (!defenc) return NULL;
    defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    {
        char* end = defenc_c + PyBytes_GET_SIZE(defenc);
        char* c;
        for (c = defenc_c; c < end; c++) {
            if ((unsigned char) (*c) >= 128) {
                PyUnicode_AsASCIIString(o);
                return NULL;
            }
        }
    }
#endif
    *length = PyBytes_GET_SIZE(defenc);
    return defenc_c;
}
#else
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
}
#endif
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
#if PY_MAJOR_VERSION >= 3
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type %.200s).  "
                "The ability to return an instance of a strict subclass of int "
                "is deprecated, and may be removed in a future version of Python.",
                Py_TYPE(result)->tp_name)) {
            Py_DECREF(result);
            return NULL;
        }
        return result;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type %.200s)",
                 type_name, type_name, Py_TYPE(result)->tp_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
  if (likely(PyLong_Check(x)))
#endif
    return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  #if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = m->nb_int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = m->nb_long(x);
  }
  #else
  if (likely(m && m->nb_int)) {
    name = "int";
    res = m->nb_int(x);
  }
  #endif
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
    res = PyNumber_Int(x);
  }
#endif
  if (likely(res)) {
#if PY_MAJOR_VERSION < 3
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
    if (unlikely(!PyLong_CheckExact(res))) {
#endif
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(b);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
