/* Generated by Cython 0.28 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "depends": [
            "../../../../src/monosat/api/Monosat.h"
        ],
        "extra_compile_args": [
            "-DNDEBUG",
            "-O3"
        ],
        "include_dirs": [
            ".",
            "monosat",
            "../../../../src/"
        ],
        "language": "c",
        "libraries": [
            "monosat"
        ],
        "name": "monosat.monosat_p",
        "sources": [
            "monosat/monosat_p.pyx"
        ]
    },
    "module_name": "monosat.monosat_p"
}
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_28"
#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
#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
#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 (0 && PY_VERSION_HEX >= 0x03050000)
#endif
#ifndef CYTHON_USE_TP_FINALIZE
#define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
#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
#endif
#ifndef __has_attribute
#define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
#define __has_cpp_attribute(x) 0
#endif
#ifndef CYTHON_RESTRICT
#if defined(__GNUC__)
#define CYTHON_RESTRICT __restrict__
#elif defined(_MSC_VER) && _MSC_VER >= 1400
#define CYTHON_RESTRICT __restrict
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define CYTHON_RESTRICT restrict
#else
#define CYTHON_RESTRICT
#endif
#endif
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
#  if defined(__cplusplus)
template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#ifdef _MSC_VER
#ifndef _MSC_STDINT_H_
#if _MSC_VER < 1300
      typedef unsigned char     uint8_t;
      typedef unsigned int      uint32_t;
#else
      typedef unsigned __int8   uint8_t;
      typedef unsigned __int32  uint32_t;
#endif
#endif
#else
#include <stdint.h>
#endif
#ifndef CYTHON_FALLTHROUGH
#if defined(__cplusplus) && __cplusplus >= 201103L
#if __has_cpp_attribute(fallthrough)
#define CYTHON_FALLTHROUGH [[fallthrough]]
#elif __has_cpp_attribute(clang::fallthrough)
#define CYTHON_FALLTHROUGH [[clang::fallthrough]]
#elif __has_cpp_attribute(gnu::fallthrough)
#define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
#endif
#endif
#ifndef CYTHON_FALLTHROUGH
#if __has_attribute(fallthrough)
#define CYTHON_FALLTHROUGH __attribute__((fallthrough))
#else
#define CYTHON_FALLTHROUGH
#endif
#endif
#if defined(__clang__ ) && defined(__apple_build_version__)
#if __apple_build_version__ < 7000000
#undef  CYTHON_FALLTHROUGH
#define CYTHON_FALLTHROUGH
#endif
#endif
#endif

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

#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
#define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
#define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
#define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#define __Pyx_DefaultClassType PyClass_Type
#else
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
#define __Pyx_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 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
#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)))))
#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_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; // PyThread_create_key reports success always
}
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 // TSS (Thread Specific Storage) API
#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)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? 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
#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__monosat__monosat_p
#define __PYX_HAVE_API__monosat__monosat_p
/* Early includes */
#include <string.h>
#include <stdio.h>
#include "pythread.h"
#include <stdint.h>
#include "monosat/api/Monosat.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

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

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

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
#define __PYX_DEFAULT_STRING_ENCODING "ascii  # for cython>=0.19"
#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)))  )
#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)
#define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False))
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(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));
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;
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[] = {
"monosat/monosat_p.pyx",
"array.pxd",
"type.pxd",
"bool.pxd",
"complex.pxd",
};

/*--- Type declarations ---*/
#ifndef _ARRAYARRAY_H
struct arrayobject;
typedef struct arrayobject arrayobject;
#endif

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

/* 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, int nargs, PyObject *kwargs);
#else
#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
#endif
#endif

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

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

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

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

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

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

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

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

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

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

/* ArrayAPI.proto */
#ifndef _ARRAYARRAY_H
#define _ARRAYARRAY_H
typedef struct arraydescr {
int typecode;
int itemsize;
PyObject * (*getitem)(struct arrayobject *, Py_ssize_t);
int (*setitem)(struct arrayobject *, Py_ssize_t, PyObject *);
#if PY_MAJOR_VERSION >= 3
char *formats;
#endif
} arraydescr;
struct arrayobject {
PyObject_HEAD
Py_ssize_t ob_size;
union {
   char *ob_item;
   float *as_floats;
   double *as_doubles;
   int *as_ints;
   unsigned int *as_uints;
   unsigned char *as_uchars;
   signed char *as_schars;
   char *as_chars;
   unsigned long *as_ulongs;
   long *as_longs;
#if PY_MAJOR_VERSION >= 3
   unsigned long long *as_ulonglongs;
   long long *as_longlongs;
#endif
   short *as_shorts;
   unsigned short *as_ushorts;
   Py_UNICODE *as_pyunicodes;
   void *as_voidptr;
} data;
Py_ssize_t allocated;
struct arraydescr *ob_descr;
PyObject *weakreflist;
#if PY_MAJOR_VERSION >= 3
   int ob_exports;
#endif
};
#ifndef NO_NEWARRAY_INLINE
static CYTHON_INLINE PyObject * newarrayobject(PyTypeObject *type, Py_ssize_t size,
struct arraydescr *descr) {
arrayobject *op;
size_t nbytes;
if (size < 0) {
   PyErr_BadInternalCall();
   return NULL;
}
nbytes = size * descr->itemsize;
if (nbytes / descr->itemsize != (size_t)size) {
   return PyErr_NoMemory();
}
op = (arrayobject *) type->tp_alloc(type, 0);
if (op == NULL) {
   return NULL;
}
op->ob_descr = descr;
op->allocated = size;
op->weakreflist = NULL;
op->ob_size = size;
if (size <= 0) {
   op->data.ob_item = NULL;
}
else {
   op->data.ob_item = PyMem_NEW(char, nbytes);
   if (op->data.ob_item == NULL) {
       Py_DECREF(op);
       return PyErr_NoMemory();
   }
}
return (PyObject *) op;
}
#else
PyObject* newarrayobject(PyTypeObject *type, Py_ssize_t size,
struct arraydescr *descr);
#endif
static CYTHON_INLINE int resize(arrayobject *self, Py_ssize_t n) {
void *items = (void*) self->data.ob_item;
PyMem_Resize(items, char, (size_t)(n * self->ob_descr->itemsize));
if (items == NULL) {
   PyErr_NoMemory();
   return -1;
}
self->data.ob_item = (char*) items;
self->ob_size = n;
self->allocated = n;
return 0;
}
static CYTHON_INLINE int resize_smart(arrayobject *self, Py_ssize_t n) {
void *items = (void*) self->data.ob_item;
Py_ssize_t newsize;
if (n < self->allocated && n*4 > self->allocated) {
   self->ob_size = n;
   return 0;
}
newsize = n + (n / 2) + 1;
if (newsize <= n) {
   PyErr_NoMemory();
   return -1;
}
PyMem_Resize(items, char, (size_t)(newsize * self->ob_descr->itemsize));
if (items == NULL) {
   PyErr_NoMemory();
   return -1;
}
self->data.ob_item = (char*) items;
self->ob_size = n;
self->allocated = newsize;
return 0;
}
#endif

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value);

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

/* CIntFromPy.proto */
static CYTHON_INLINE int64_t __Pyx_PyInt_As_int64_t(PyObject *);

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

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

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

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

/* PyIdentifierFromString.proto */
#if !defined(__Pyx_PyIdentifier_FromString)
#if PY_MAJOR_VERSION < 3
#define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
#else
#define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
#endif
#endif

/* ModuleImport.proto */
static PyObject *__Pyx_ImportModule(const char *name);

/* TypeImport.proto */
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);

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


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

/* Module declarations from '__builtin__' */

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* Module declarations from '__builtin__' */

/* Module declarations from 'cpython.bool' */
static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0;

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

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

/* Module declarations from '__builtin__' */

/* Module declarations from 'cpython.complex' */
static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* Module declarations from 'cpython' */

/* Module declarations from 'array' */

/* Module declarations from 'cpython.array' */
static PyTypeObject *__pyx_ptype_7cpython_5array_array = 0;
static CYTHON_INLINE int __pyx_f_7cpython_5array_extend_buffer(arrayobject *, char *, Py_ssize_t); /*proto*/

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

/* Module declarations from 'monosat.monosat_header' */

/* Module declarations from 'monosat.monosat_p' */
#define __Pyx_MODULE_NAME "monosat.monosat_p"
extern int __pyx_module_is_main_monosat__monosat_p;
int __pyx_module_is_main_monosat__monosat_p = 0;

/* Implementation of 'monosat.monosat_p' */
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_MemoryError;
static const char __pyx_k_G[] = "G";
static const char __pyx_k_S[] = "S";
static const char __pyx_k_a[] = "a";
static const char __pyx_k_b[] = "b";
static const char __pyx_k_i[] = "i";
static const char __pyx_k_r[] = "_r";
static const char __pyx_k_v[] = "v";
static const char __pyx_k_bv[] = "bv";
static const char __pyx_k_to[] = "to";
static const char __pyx_k_aID[] = "aID";
static const char __pyx_k_bID[] = "bID";
static const char __pyx_k_lit[] = "lit";
static const char __pyx_k_rhs[] = "rhs";
static const char __pyx_k_var[] = "var";
static const char __pyx_k_args[] = "args";
static const char __pyx_k_argv[] = "argv";
static const char __pyx_k_bits[] = "bits";
static const char __pyx_k_bvID[] = "bvID";
static const char __pyx_k_dist[] = "dist";
static const char __pyx_k_from[] = "_from";
static const char __pyx_k_lit1[] = "lit1";
static const char __pyx_k_lit2[] = "lit2";
static const char __pyx_k_lit3[] = "lit3";
static const char __pyx_k_lits[] = "lits";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_node[] = "node";
static const char __pyx_k_sink[] = "sink";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_vars[] = "vars";
static const char __pyx_k_array[] = "array";
static const char __pyx_k_bvID1[] = "bvID1";
static const char __pyx_k_bvID2[] = "bvID2";
static const char __pyx_k_bv_or[] = "bv_or";
static const char __pyx_k_bvaID[] = "bvaID";
static const char __pyx_k_bvbID[] = "bvbID";
static const char __pyx_k_clear[] = "clear";
static const char __pyx_k_edges[] = "edges";
static const char __pyx_k_lower[] = "lower";
static const char __pyx_k_nVars[] = "nVars";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_solve[] = "solve";
static const char __pyx_k_steps[] = "steps";
static const char __pyx_k_store[] = "store";
static const char __pyx_k_upper[] = "upper";
static const char __pyx_k_append[] = "append";
static const char __pyx_k_bv_and[] = "bv_and";
static const char __pyx_k_bv_ite[] = "bv_ite";
static const char __pyx_k_bv_max[] = "bv_max";
static const char __pyx_k_bv_min[] = "bv_min";
static const char __pyx_k_bv_nor[] = "bv_nor";
static const char __pyx_k_bv_not[] = "bv_not";
static const char __pyx_k_bv_xor[] = "bv_xor";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_nEdges[] = "nEdges";
static const char __pyx_k_nNodes[] = "nNodes";
static const char __pyx_k_n_args[] = "n_args";
static const char __pyx_k_n_bits[] = "n_bits";
static const char __pyx_k_n_lits[] = "n_lits";
static const char __pyx_k_n_vars[] = "n_vars";
static const char __pyx_k_newVar[] = "newVar";
static const char __pyx_k_onPath[] = "onPath";
static const char __pyx_k_output[] = "output";
static const char __pyx_k_router[] = "router";
static const char __pyx_k_source[] = "source";
static const char __pyx_k_weight[] = "weight";
static const char __pyx_k_bvWidth[] = "bvWidth";
static const char __pyx_k_bv_nand[] = "bv_nand";
static const char __pyx_k_bv_xnor[] = "bv_xnor";
static const char __pyx_k_edgeLit[] = "edgeLit";
static const char __pyx_k_flushPB[] = "flushPB";
static const char __pyx_k_loadGNF[] = "loadGNF";
static const char __pyx_k_n_edges[] = "n_edges";
static const char __pyx_k_n_pairs[] = "n_pairs";
static const char __pyx_k_newEdge[] = "newEdge";
static const char __pyx_k_newNode[] = "newNode";
static const char __pyx_k_reaches[] = "reaches";
static const char __pyx_k_readGNF[] = "readGNF";
static const char __pyx_k_seconds[] = "seconds";
static const char __pyx_k_weights[] = "weights";
static const char __pyx_k_bvElseID[] = "bvElseID";
static const char __pyx_k_bvThenID[] = "bvThenID";
static const char __pyx_k_bv_slice[] = "bv_slice";
static const char __pyx_k_bv_unary[] = "bv_unary";
static const char __pyx_k_bv_width[] = "bv_width";
static const char __pyx_k_constval[] = "constval";
static const char __pyx_k_destNode[] = "destNode";
static const char __pyx_k_filename[] = "filename";
static const char __pyx_k_literals[] = "literals";
static const char __pyx_k_nClauses[] = "nClauses";
static const char __pyx_k_newGraph[] = "newGraph";
static const char __pyx_k_priority[] = "priority";
static const char __pyx_k_resultID[] = "resultID";
static const char __pyx_k_true_lit[] = "true_lit";
static const char __pyx_k_addClause[] = "addClause";
static const char __pyx_k_backtrack[] = "backtrack";
static const char __pyx_k_bv_concat[] = "bv_concat";
static const char __pyx_k_bv_divide[] = "bv_divide";
static const char __pyx_k_compareID[] = "compareID";
static const char __pyx_k_decidable[] = "decidable";
static const char __pyx_k_edge_lits[] = "edge_lits";
static const char __pyx_k_n_members[] = "n_members";
static const char __pyx_k_newSolver[] = "newSolver";
static const char __pyx_k_py_result[] = "py_result";
static const char __pyx_k_bvResultID[] = "bvResultID";
static const char __pyx_k_first_args[] = "first_args";
static const char __pyx_k_getVersion[] = "getVersion";
static const char __pyx_k_maxflowLit[] = "maxflowLit";
static const char __pyx_k_maximizeBV[] = "maximizeBV";
static const char __pyx_k_minimizeBV[] = "minimizeBV";
static const char __pyx_k_newEdgeSet[] = "newEdgeSet";
static const char __pyx_k_newEdge_bv[] = "newEdge_bv";
static const char __pyx_k_nodeOnPath[] = "nodeOnPath";
static const char __pyx_k_reach_lits[] = "reach_lits";
static const char __pyx_k_sourceNode[] = "sourceNode";
static const char __pyx_k_MemoryError[] = "MemoryError";
static const char __pyx_k_assertPB_eq[] = "assertPB_eq";
static const char __pyx_k_assertPB_gt[] = "assertPB_gt";
static const char __pyx_k_assertPB_lt[] = "assertPB_lt";
static const char __pyx_k_assumptions[] = "assumptions";
static const char __pyx_k_at_most_one[] = "at_most_one";
static const char __pyx_k_bv_addition[] = "bv_addition";
static const char __pyx_k_bv_bitblast[] = "bv_bitblast";
static const char __pyx_k_bv_multiply[] = "bv_multiply";
static const char __pyx_k_bv_popcount[] = "bv_popcount";
static const char __pyx_k_getModel_BV[] = "getModel_BV";
static const char __pyx_k_initializer[] = "initializer";
static const char __pyx_k_nBitvectors[] = "nBitvectors";
static const char __pyx_k_second_args[] = "second_args";
static const char __pyx_k_assertPB_geq[] = "assertPB_geq";
static const char __pyx_k_assertPB_leq[] = "assertPB_leq";
static const char __pyx_k_coefficients[] = "coefficients";
static const char __pyx_k_deleteSolver[] = "deleteSolver";
static const char __pyx_k_disabledEdge[] = "disabledEdge";
static const char __pyx_k_initBVTheory[] = "initBVTheory";
static const char __pyx_k_maximizeLits[] = "maximizeLits";
static const char __pyx_k_minimizeLits[] = "minimizeLits";
static const char __pyx_k_newBitvector[] = "newBitvector";
static const char __pyx_k_setTimeLimit[] = "setTimeLimit";
static const char __pyx_k_solveLimited[] = "solveLimited";
static const char __pyx_k_store_clause[] = "store_clause";
static const char __pyx_k_store_length[] = "store_length";
static const char __pyx_k_addRoutingNet[] = "addRoutingNet";
static const char __pyx_k_addUnitClause[] = "addUnitClause";
static const char __pyx_k_condition_lit[] = "condition_lit";
static const char __pyx_k_isDecisionVar[] = "isDecisionVar";
static const char __pyx_k_n_assumptions[] = "n_assumptions";
static const char __pyx_k_newSolver_arg[] = "newSolver_arg";
static const char __pyx_k_num_conflicts[] = "num_conflicts";
static const char __pyx_k_setOutputFile[] = "setOutputFile";
static const char __pyx_k_bv_subtraction[] = "bv_subtraction";
static const char __pyx_k_max_store_size[] = "max_store_size";
static const char __pyx_k_maximumFlow_gt[] = "maximumFlow_gt";
static const char __pyx_k_newEdge_double[] = "newEdge_double";
static const char __pyx_k_setDecisionVar[] = "setDecisionVar";
static const char __pyx_k_addBinaryClause[] = "addBinaryClause";
static const char __pyx_k_getMaximumValue[] = "getMaximumValue";
static const char __pyx_k_maxflow_literal[] = "maxflow_literal";
static const char __pyx_k_maximumFlow_geq[] = "maximumFlow_geq";
static const char __pyx_k_reachesBackward[] = "reachesBackward";
static const char __pyx_k_acyclic_directed[] = "acyclic_directed";
static const char __pyx_k_addBinaryClauses[] = "addBinaryClauses";
static const char __pyx_k_arg_b_wrong_type[] = "arg b wrong type";
static const char __pyx_k_arg_v_wrong_type[] = "arg v wrong type";
static const char __pyx_k_getModel_Literal[] = "getModel_Literal";
static const char __pyx_k_getModel_MaxFlow[] = "getModel_MaxFlow";
static const char __pyx_k_num_propagations[] = "num_propagations";
static const char __pyx_k_setConflictLimit[] = "setConflictLimit";
static const char __pyx_k_solveAssumptions[] = "solveAssumptions";
static const char __pyx_k_addTertiaryClause[] = "addTertiaryClause";
static const char __pyx_k_arg_to_wrong_type[] = "arg to wrong type";
static const char __pyx_k_createFlowRouting[] = "createFlowRouting";
static const char __pyx_k_getConflictClause[] = "getConflictClause";
static const char __pyx_k_getModel_EdgeFlow[] = "getModel_EdgeFlow";
static const char __pyx_k_maximumFlow_gt_bv[] = "maximumFlow_gt_bv";
static const char __pyx_k_minimizeUnsatCore[] = "minimizeUnsatCore";
static const char __pyx_k_monosat_monosat_p[] = "monosat.monosat_p";
static const char __pyx_k_newBitvector_anon[] = "newBitvector_anon";
static const char __pyx_k_acyclic_undirected[] = "acyclic_undirected";
static const char __pyx_k_arg_aID_wrong_type[] = "arg aID wrong type";
static const char __pyx_k_arg_bID_wrong_type[] = "arg bID wrong type";
static const char __pyx_k_arg_lit_wrong_type[] = "arg lit wrong type";
static const char __pyx_k_arg_rhs_wrong_type[] = "arg rhs wrong type";
static const char __pyx_k_arg_var_wrong_type[] = "arg var wrong type";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_maximumFlow_geq_bv[] = "maximumFlow_geq_bv";
static const char __pyx_k_newBitvector_const[] = "newBitvector_const";
static const char __pyx_k_shortestPath_lt_bv[] = "shortestPath_lt_bv";
static const char __pyx_k_arg_args_wrong_type[] = "arg args wrong type";
static const char __pyx_k_arg_argv_wrong_type[] = "arg argv wrong type";
static const char __pyx_k_arg_bits_wrong_type[] = "arg bits wrong type";
static const char __pyx_k_arg_dist_wrong_type[] = "arg dist wrong type";
static const char __pyx_k_arg_lit1_wrong_type[] = "arg lit1 wrong type";
static const char __pyx_k_arg_lit2_wrong_type[] = "arg lit2 wrong type";
static const char __pyx_k_arg_lit3_wrong_type[] = "arg lit3 wrong type";
static const char __pyx_k_arg_lits_wrong_type[] = "arg lits wrong type";
static const char __pyx_k_arg_sink_wrong_type[] = "arg sink wrong type";
static const char __pyx_k_arg_vars_wrong_type[] = "arg vars wrong type";
static const char __pyx_k_getDecisionPolarity[] = "getDecisionPolarity";
static const char __pyx_k_getDecisionPriority[] = "getDecisionPriority";
static const char __pyx_k_getModel_Path_Nodes[] = "getModel_Path_Nodes";
static const char __pyx_k_setDecisionPolarity[] = "setDecisionPolarity";
static const char __pyx_k_setDecisionPriority[] = "setDecisionPriority";
static const char __pyx_k_setPropagationLimit[] = "setPropagationLimit";
static const char __pyx_k_shortestPath_leq_bv[] = "shortestPath_leq_bv";
static const char __pyx_k_arg__from_wrong_type[] = "arg _from wrong type";
static const char __pyx_k_arg_bvID1_wrong_type[] = "arg bvID1 wrong type";
static const char __pyx_k_arg_bvID2_wrong_type[] = "arg bvID2 wrong type";
static const char __pyx_k_arg_bvaID_wrong_type[] = "arg bvaID wrong type";
static const char __pyx_k_arg_bvbID_wrong_type[] = "arg bvbID wrong type";
static const char __pyx_k_arg_lower_wrong_type[] = "arg lower wrong type";
static const char __pyx_k_arg_steps_wrong_type[] = "arg steps wrong type";
static const char __pyx_k_arg_store_wrong_type[] = "arg store wrong type";
static const char __pyx_k_arg_upper_wrong_type[] = "arg upper wrong type";
static const char __pyx_k_disablePreprocessing[] = "disablePreprocessing";
static const char __pyx_k_maximizeWeightedLits[] = "maximizeWeightedLits";
static const char __pyx_k_minimizeWeightedLits[] = "minimizeWeightedLits";
static const char __pyx_k_arg_n_args_wrong_type[] = "arg n_args wrong type";
static const char __pyx_k_arg_n_bits_wrong_type[] = "arg n_bits wrong type";
static const char __pyx_k_arg_n_lits_wrong_type[] = "arg n_lits wrong type";
static const char __pyx_k_arg_n_vars_wrong_type[] = "arg n_vars wrong type";
static const char __pyx_k_arg_output_wrong_type[] = "arg output wrong type";
static const char __pyx_k_arg_router_wrong_type[] = "arg router wrong type";
static const char __pyx_k_arg_source_wrong_type[] = "arg source wrong type";
static const char __pyx_k_arg_weight_wrong_type[] = "arg weight wrong type";
static const char __pyx_k_enforceEdgeAssignment[] = "enforceEdgeAssignment";
static const char __pyx_k_monosat_monosat_p_pyx[] = "monosat/monosat_p.pyx";
static const char __pyx_k_newBVComparison_bv_gt[] = "newBVComparison_bv_gt";
static const char __pyx_k_newBVComparison_bv_lt[] = "newBVComparison_bv_lt";
static const char __pyx_k_shortestPath_lt_const[] = "shortestPath_lt_const";
static const char __pyx_k_spanning_tree_literal[] = "spanning_tree_literal";
static const char __pyx_k_arg_bvWidth_wrong_type[] = "arg bvWidth wrong type";
static const char __pyx_k_arg_edgeLit_wrong_type[] = "arg edgeLit wrong type";
static const char __pyx_k_arg_seconds_wrong_type[] = "arg seconds wrong type";
static const char __pyx_k_arg_weights_wrong_type[] = "arg weights wrong type";
static const char __pyx_k_getModel_Path_EdgeLits[] = "getModel_Path_EdgeLits";
static const char __pyx_k_lastSolutionWasOptimal[] = "lastSolutionWasOptimal";
static const char __pyx_k_minimizeConflictClause[] = "minimizeConflictClause";
static const char __pyx_k_minimumSpanningTree_lt[] = "minimumSpanningTree_lt";
static const char __pyx_k_newBVComparison_bv_geq[] = "newBVComparison_bv_geq";
static const char __pyx_k_newBVComparison_bv_leq[] = "newBVComparison_bv_leq";
static const char __pyx_k_shortestPath_leq_const[] = "shortestPath_leq_const";
static const char __pyx_k_arg_bvElseID_wrong_type[] = "arg bvElseID wrong type";
static const char __pyx_k_arg_bvThenID_wrong_type[] = "arg bvThenID wrong type";
static const char __pyx_k_arg_constval_wrong_type[] = "arg constval wrong type";
static const char __pyx_k_arg_destNode_wrong_type[] = "arg destNode wrong type";
static const char __pyx_k_arg_filename_wrong_type[] = "arg filename wrong type";
static const char __pyx_k_arg_literals_wrong_type[] = "arg literals wrong type";
static const char __pyx_k_arg_priority_wrong_type[] = "arg priority wrong type";
static const char __pyx_k_arg_resultID_wrong_type[] = "arg resultID wrong type";
static const char __pyx_k_minimumSpanningTree_leq[] = "minimumSpanningTree_leq";
static const char __pyx_k_solveAssumptionsLimited[] = "solveAssumptionsLimited";
static const char __pyx_k_arg_compareID_wrong_type[] = "arg compareID wrong type";
static const char __pyx_k_arg_decidable_wrong_type[] = "arg decidable wrong type";
static const char __pyx_k_arg_edge_lits_wrong_type[] = "arg edge_lits wrong type";
static const char __pyx_k_arg_n_members_wrong_type[] = "arg n_members wrong type";
static const char __pyx_k_getModel_AcyclicEdgeFlow[] = "getModel_AcyclicEdgeFlow";
static const char __pyx_k_newBVComparison_const_gt[] = "newBVComparison_const_gt";
static const char __pyx_k_newBVComparison_const_lt[] = "newBVComparison_const_lt";
static const char __pyx_k_arg_bvResultID_wrong_type[] = "arg bvResultID wrong type";
static const char __pyx_k_arg_maxflowLit_wrong_type[] = "arg maxflowLit wrong type";
static const char __pyx_k_arg_reach_lits_wrong_type[] = "arg reach_lits wrong type";
static const char __pyx_k_arg_sourceNode_wrong_type[] = "arg sourceNode wrong type";
static const char __pyx_k_newBVComparison_const_geq[] = "newBVComparison_const_geq";
static const char __pyx_k_newBVComparison_const_leq[] = "newBVComparison_const_leq";
static const char __pyx_k_reach_or_distance_literal[] = "reach_or_distance_literal";
static const char __pyx_k_arg_assumptions_wrong_type[] = "arg assumptions wrong type";
static const char __pyx_k_getModel_Path_Nodes_Length[] = "getModel_Path_Nodes_Length";
static const char __pyx_k_arg_coefficients_wrong_type[] = "arg coefficients wrong type";
static const char __pyx_k_arg_disabledEdge_wrong_type[] = "arg disabledEdge wrong type";
static const char __pyx_k_arg_store_clause_wrong_type[] = "arg store_clause wrong type";
static const char __pyx_k_arg_store_length_wrong_type[] = "arg store_length wrong type";
static const char __pyx_k_clearOptimizationObjectives[] = "clearOptimizationObjectives";
static const char __pyx_k_arg_condition_lit_wrong_type[] = "arg condition_lit wrong type";
static const char __pyx_k_arg_n_assumptions_wrong_type[] = "arg n_assumptions wrong type";
static const char __pyx_k_arg_num_conflicts_wrong_type[] = "arg num_conflicts wrong type";
static const char __pyx_k_graph_setAssignEdgesToWeight[] = "graph_setAssignEdgesToWeight";
static const char __pyx_k_arg_max_store_size_wrong_type[] = "arg max_store_size wrong type";
static const char __pyx_k_disallowLiteralSimplification[] = "disallowLiteralSimplification";
static const char __pyx_k_getModel_Path_EdgeLits_Length[] = "getModel_Path_EdgeLits_Length";
static const char __pyx_k_arg_getMaximumValue_wrong_type[] = "arg getMaximumValue wrong type";
static const char __pyx_k_arg_maxflow_literal_wrong_type[] = "arg maxflow_literal wrong type";
static const char __pyx_k_arg_num_propagations_wrong_type[] = "arg num_propagations wrong type";
static const char __pyx_k_arg_spanning_tree_literal_wrong[] = "arg spanning_tree_literal wrong type";
static const char __pyx_k_shortestPathUnweighted_lt_const[] = "shortestPathUnweighted_lt_const";
static const char __pyx_k_arg_reach_or_distance_literal_wr[] = "arg reach_or_distance_literal wrong type";
static const char __pyx_k_getModel_MinimumSpanningTreeWeig[] = "getModel_MinimumSpanningTreeWeight";
static const char __pyx_k_shortestPathUnweighted_leq_const[] = "shortestPathUnweighted_leq_const";
static PyObject *__pyx_n_s_G;
static PyObject *__pyx_n_s_MemoryError;
static PyObject *__pyx_n_s_S;
static PyObject *__pyx_n_s_a;
static PyObject *__pyx_n_s_aID;
static PyObject *__pyx_n_s_acyclic_directed;
static PyObject *__pyx_n_s_acyclic_undirected;
static PyObject *__pyx_n_s_addBinaryClause;
static PyObject *__pyx_n_s_addBinaryClauses;
static PyObject *__pyx_n_s_addClause;
static PyObject *__pyx_n_s_addRoutingNet;
static PyObject *__pyx_n_s_addTertiaryClause;
static PyObject *__pyx_n_s_addUnitClause;
static PyObject *__pyx_n_s_append;
static PyObject *__pyx_kp_s_arg__from_wrong_type;
static PyObject *__pyx_kp_s_arg_aID_wrong_type;
static PyObject *__pyx_kp_s_arg_args_wrong_type;
static PyObject *__pyx_kp_s_arg_argv_wrong_type;
static PyObject *__pyx_kp_s_arg_assumptions_wrong_type;
static PyObject *__pyx_kp_s_arg_bID_wrong_type;
static PyObject *__pyx_kp_s_arg_b_wrong_type;
static PyObject *__pyx_kp_s_arg_bits_wrong_type;
static PyObject *__pyx_kp_s_arg_bvElseID_wrong_type;
static PyObject *__pyx_kp_s_arg_bvID1_wrong_type;
static PyObject *__pyx_kp_s_arg_bvID2_wrong_type;
static PyObject *__pyx_kp_s_arg_bvResultID_wrong_type;
static PyObject *__pyx_kp_s_arg_bvThenID_wrong_type;
static PyObject *__pyx_kp_s_arg_bvWidth_wrong_type;
static PyObject *__pyx_kp_s_arg_bvaID_wrong_type;
static PyObject *__pyx_kp_s_arg_bvbID_wrong_type;
static PyObject *__pyx_kp_s_arg_coefficients_wrong_type;
static PyObject *__pyx_kp_s_arg_compareID_wrong_type;
static PyObject *__pyx_kp_s_arg_condition_lit_wrong_type;
static PyObject *__pyx_kp_s_arg_constval_wrong_type;
static PyObject *__pyx_kp_s_arg_decidable_wrong_type;
static PyObject *__pyx_kp_s_arg_destNode_wrong_type;
static PyObject *__pyx_kp_s_arg_disabledEdge_wrong_type;
static PyObject *__pyx_kp_s_arg_dist_wrong_type;
static PyObject *__pyx_kp_s_arg_edgeLit_wrong_type;
static PyObject *__pyx_kp_s_arg_edge_lits_wrong_type;
static PyObject *__pyx_kp_s_arg_filename_wrong_type;
static PyObject *__pyx_kp_s_arg_getMaximumValue_wrong_type;
static PyObject *__pyx_kp_s_arg_lit1_wrong_type;
static PyObject *__pyx_kp_s_arg_lit2_wrong_type;
static PyObject *__pyx_kp_s_arg_lit3_wrong_type;
static PyObject *__pyx_kp_s_arg_lit_wrong_type;
static PyObject *__pyx_kp_s_arg_literals_wrong_type;
static PyObject *__pyx_kp_s_arg_lits_wrong_type;
static PyObject *__pyx_kp_s_arg_lower_wrong_type;
static PyObject *__pyx_kp_s_arg_max_store_size_wrong_type;
static PyObject *__pyx_kp_s_arg_maxflowLit_wrong_type;
static PyObject *__pyx_kp_s_arg_maxflow_literal_wrong_type;
static PyObject *__pyx_kp_s_arg_n_args_wrong_type;
static PyObject *__pyx_kp_s_arg_n_assumptions_wrong_type;
static PyObject *__pyx_kp_s_arg_n_bits_wrong_type;
static PyObject *__pyx_kp_s_arg_n_lits_wrong_type;
static PyObject *__pyx_kp_s_arg_n_members_wrong_type;
static PyObject *__pyx_kp_s_arg_n_vars_wrong_type;
static PyObject *__pyx_kp_s_arg_num_conflicts_wrong_type;
static PyObject *__pyx_kp_s_arg_num_propagations_wrong_type;
static PyObject *__pyx_kp_s_arg_output_wrong_type;
static PyObject *__pyx_kp_s_arg_priority_wrong_type;
static PyObject *__pyx_kp_s_arg_reach_lits_wrong_type;
static PyObject *__pyx_kp_s_arg_reach_or_distance_literal_wr;
static PyObject *__pyx_kp_s_arg_resultID_wrong_type;
static PyObject *__pyx_kp_s_arg_rhs_wrong_type;
static PyObject *__pyx_kp_s_arg_router_wrong_type;
static PyObject *__pyx_kp_s_arg_seconds_wrong_type;
static PyObject *__pyx_kp_s_arg_sink_wrong_type;
static PyObject *__pyx_kp_s_arg_sourceNode_wrong_type;
static PyObject *__pyx_kp_s_arg_source_wrong_type;
static PyObject *__pyx_kp_s_arg_spanning_tree_literal_wrong;
static PyObject *__pyx_kp_s_arg_steps_wrong_type;
static PyObject *__pyx_kp_s_arg_store_clause_wrong_type;
static PyObject *__pyx_kp_s_arg_store_length_wrong_type;
static PyObject *__pyx_kp_s_arg_store_wrong_type;
static PyObject *__pyx_kp_s_arg_to_wrong_type;
static PyObject *__pyx_kp_s_arg_upper_wrong_type;
static PyObject *__pyx_kp_s_arg_v_wrong_type;
static PyObject *__pyx_kp_s_arg_var_wrong_type;
static PyObject *__pyx_kp_s_arg_vars_wrong_type;
static PyObject *__pyx_kp_s_arg_weight_wrong_type;
static PyObject *__pyx_kp_s_arg_weights_wrong_type;
static PyObject *__pyx_n_s_args;
static PyObject *__pyx_n_s_argv;
static PyObject *__pyx_n_s_array;
static PyObject *__pyx_n_s_assertPB_eq;
static PyObject *__pyx_n_s_assertPB_geq;
static PyObject *__pyx_n_s_assertPB_gt;
static PyObject *__pyx_n_s_assertPB_leq;
static PyObject *__pyx_n_s_assertPB_lt;
static PyObject *__pyx_n_s_assumptions;
static PyObject *__pyx_n_s_at_most_one;
static PyObject *__pyx_n_s_b;
static PyObject *__pyx_n_s_bID;
static PyObject *__pyx_n_s_backtrack;
static PyObject *__pyx_n_s_bits;
static PyObject *__pyx_n_s_bv;
static PyObject *__pyx_n_s_bvElseID;
static PyObject *__pyx_n_s_bvID;
static PyObject *__pyx_n_s_bvID1;
static PyObject *__pyx_n_s_bvID2;
static PyObject *__pyx_n_s_bvResultID;
static PyObject *__pyx_n_s_bvThenID;
static PyObject *__pyx_n_s_bvWidth;
static PyObject *__pyx_n_s_bv_addition;
static PyObject *__pyx_n_s_bv_and;
static PyObject *__pyx_n_s_bv_bitblast;
static PyObject *__pyx_n_s_bv_concat;
static PyObject *__pyx_n_s_bv_divide;
static PyObject *__pyx_n_s_bv_ite;
static PyObject *__pyx_n_s_bv_max;
static PyObject *__pyx_n_s_bv_min;
static PyObject *__pyx_n_s_bv_multiply;
static PyObject *__pyx_n_s_bv_nand;
static PyObject *__pyx_n_s_bv_nor;
static PyObject *__pyx_n_s_bv_not;
static PyObject *__pyx_n_s_bv_or;
static PyObject *__pyx_n_s_bv_popcount;
static PyObject *__pyx_n_s_bv_slice;
static PyObject *__pyx_n_s_bv_subtraction;
static PyObject *__pyx_n_s_bv_unary;
static PyObject *__pyx_n_s_bv_width;
static PyObject *__pyx_n_s_bv_xnor;
static PyObject *__pyx_n_s_bv_xor;
static PyObject *__pyx_n_s_bvaID;
static PyObject *__pyx_n_s_bvbID;
static PyObject *__pyx_n_s_clear;
static PyObject *__pyx_n_s_clearOptimizationObjectives;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_coefficients;
static PyObject *__pyx_n_s_compareID;
static PyObject *__pyx_n_s_condition_lit;
static PyObject *__pyx_n_s_constval;
static PyObject *__pyx_n_s_createFlowRouting;
static PyObject *__pyx_n_s_decidable;
static PyObject *__pyx_n_s_deleteSolver;
static PyObject *__pyx_n_s_destNode;
static PyObject *__pyx_n_s_disablePreprocessing;
static PyObject *__pyx_n_s_disabledEdge;
static PyObject *__pyx_n_s_disallowLiteralSimplification;
static PyObject *__pyx_n_s_dist;
static PyObject *__pyx_n_s_edgeLit;
static PyObject *__pyx_n_s_edge_lits;
static PyObject *__pyx_n_s_edges;
static PyObject *__pyx_n_s_enforceEdgeAssignment;
static PyObject *__pyx_n_s_filename;
static PyObject *__pyx_n_s_first_args;
static PyObject *__pyx_n_s_flushPB;
static PyObject *__pyx_n_s_from;
static PyObject *__pyx_n_s_getConflictClause;
static PyObject *__pyx_n_s_getDecisionPolarity;
static PyObject *__pyx_n_s_getDecisionPriority;
static PyObject *__pyx_n_s_getMaximumValue;
static PyObject *__pyx_n_s_getModel_AcyclicEdgeFlow;
static PyObject *__pyx_n_s_getModel_BV;
static PyObject *__pyx_n_s_getModel_EdgeFlow;
static PyObject *__pyx_n_s_getModel_Literal;
static PyObject *__pyx_n_s_getModel_MaxFlow;
static PyObject *__pyx_n_s_getModel_MinimumSpanningTreeWeig;
static PyObject *__pyx_n_s_getModel_Path_EdgeLits;
static PyObject *__pyx_n_s_getModel_Path_EdgeLits_Length;
static PyObject *__pyx_n_s_getModel_Path_Nodes;
static PyObject *__pyx_n_s_getModel_Path_Nodes_Length;
static PyObject *__pyx_n_s_getVersion;
static PyObject *__pyx_n_s_graph_setAssignEdgesToWeight;
static PyObject *__pyx_n_s_i;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_initBVTheory;
static PyObject *__pyx_n_s_initializer;
static PyObject *__pyx_n_s_isDecisionVar;
static PyObject *__pyx_n_s_lastSolutionWasOptimal;
static PyObject *__pyx_n_s_lit;
static PyObject *__pyx_n_s_lit1;
static PyObject *__pyx_n_s_lit2;
static PyObject *__pyx_n_s_lit3;
static PyObject *__pyx_n_s_literals;
static PyObject *__pyx_n_s_lits;
static PyObject *__pyx_n_s_loadGNF;
static PyObject *__pyx_n_s_lower;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_max_store_size;
static PyObject *__pyx_n_s_maxflowLit;
static PyObject *__pyx_n_s_maxflow_literal;
static PyObject *__pyx_n_s_maximizeBV;
static PyObject *__pyx_n_s_maximizeLits;
static PyObject *__pyx_n_s_maximizeWeightedLits;
static PyObject *__pyx_n_s_maximumFlow_geq;
static PyObject *__pyx_n_s_maximumFlow_geq_bv;
static PyObject *__pyx_n_s_maximumFlow_gt;
static PyObject *__pyx_n_s_maximumFlow_gt_bv;
static PyObject *__pyx_n_s_minimizeBV;
static PyObject *__pyx_n_s_minimizeConflictClause;
static PyObject *__pyx_n_s_minimizeLits;
static PyObject *__pyx_n_s_minimizeUnsatCore;
static PyObject *__pyx_n_s_minimizeWeightedLits;
static PyObject *__pyx_n_s_minimumSpanningTree_leq;
static PyObject *__pyx_n_s_minimumSpanningTree_lt;
static PyObject *__pyx_n_s_monosat_monosat_p;
static PyObject *__pyx_kp_s_monosat_monosat_p_pyx;
static PyObject *__pyx_n_s_nBitvectors;
static PyObject *__pyx_n_s_nClauses;
static PyObject *__pyx_n_s_nEdges;
static PyObject *__pyx_n_s_nNodes;
static PyObject *__pyx_n_s_nVars;
static PyObject *__pyx_n_s_n_args;
static PyObject *__pyx_n_s_n_assumptions;
static PyObject *__pyx_n_s_n_bits;
static PyObject *__pyx_n_s_n_edges;
static PyObject *__pyx_n_s_n_lits;
static PyObject *__pyx_n_s_n_members;
static PyObject *__pyx_n_s_n_pairs;
static PyObject *__pyx_n_s_n_vars;
static PyObject *__pyx_n_s_newBVComparison_bv_geq;
static PyObject *__pyx_n_s_newBVComparison_bv_gt;
static PyObject *__pyx_n_s_newBVComparison_bv_leq;
static PyObject *__pyx_n_s_newBVComparison_bv_lt;
static PyObject *__pyx_n_s_newBVComparison_const_geq;
static PyObject *__pyx_n_s_newBVComparison_const_gt;
static PyObject *__pyx_n_s_newBVComparison_const_leq;
static PyObject *__pyx_n_s_newBVComparison_const_lt;
static PyObject *__pyx_n_s_newBitvector;
static PyObject *__pyx_n_s_newBitvector_anon;
static PyObject *__pyx_n_s_newBitvector_const;
static PyObject *__pyx_n_s_newEdge;
static PyObject *__pyx_n_s_newEdgeSet;
static PyObject *__pyx_n_s_newEdge_bv;
static PyObject *__pyx_n_s_newEdge_double;
static PyObject *__pyx_n_s_newGraph;
static PyObject *__pyx_n_s_newNode;
static PyObject *__pyx_n_s_newSolver;
static PyObject *__pyx_n_s_newSolver_arg;
static PyObject *__pyx_n_s_newVar;
static PyObject *__pyx_n_s_node;
static PyObject *__pyx_n_s_nodeOnPath;
static PyObject *__pyx_n_s_num_conflicts;
static PyObject *__pyx_n_s_num_propagations;
static PyObject *__pyx_n_s_onPath;
static PyObject *__pyx_n_s_output;
static PyObject *__pyx_n_s_priority;
static PyObject *__pyx_n_s_py_result;
static PyObject *__pyx_n_s_r;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_reach_lits;
static PyObject *__pyx_n_s_reach_or_distance_literal;
static PyObject *__pyx_n_s_reaches;
static PyObject *__pyx_n_s_reachesBackward;
static PyObject *__pyx_n_s_readGNF;
static PyObject *__pyx_n_s_resultID;
static PyObject *__pyx_n_s_rhs;
static PyObject *__pyx_n_s_router;
static PyObject *__pyx_n_s_second_args;
static PyObject *__pyx_n_s_seconds;
static PyObject *__pyx_n_s_setConflictLimit;
static PyObject *__pyx_n_s_setDecisionPolarity;
static PyObject *__pyx_n_s_setDecisionPriority;
static PyObject *__pyx_n_s_setDecisionVar;
static PyObject *__pyx_n_s_setOutputFile;
static PyObject *__pyx_n_s_setPropagationLimit;
static PyObject *__pyx_n_s_setTimeLimit;
static PyObject *__pyx_n_s_shortestPathUnweighted_leq_const;
static PyObject *__pyx_n_s_shortestPathUnweighted_lt_const;
static PyObject *__pyx_n_s_shortestPath_leq_bv;
static PyObject *__pyx_n_s_shortestPath_leq_const;
static PyObject *__pyx_n_s_shortestPath_lt_bv;
static PyObject *__pyx_n_s_shortestPath_lt_const;
static PyObject *__pyx_n_s_sink;
static PyObject *__pyx_n_s_solve;
static PyObject *__pyx_n_s_solveAssumptions;
static PyObject *__pyx_n_s_solveAssumptionsLimited;
static PyObject *__pyx_n_s_solveLimited;
static PyObject *__pyx_n_s_source;
static PyObject *__pyx_n_s_sourceNode;
static PyObject *__pyx_n_s_spanning_tree_literal;
static PyObject *__pyx_n_s_steps;
static PyObject *__pyx_n_s_store;
static PyObject *__pyx_n_s_store_clause;
static PyObject *__pyx_n_s_store_length;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_to;
static PyObject *__pyx_n_s_true_lit;
static PyObject *__pyx_n_s_upper;
static PyObject *__pyx_n_s_v;
static PyObject *__pyx_n_s_var;
static PyObject *__pyx_n_s_vars;
static PyObject *__pyx_n_s_weight;
static PyObject *__pyx_n_s_weights;
static PyObject *__pyx_pf_7monosat_9monosat_p_acyclic_directed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_2acyclic_undirected(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_4addBinaryClause(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_lit1, PyObject *__pyx_v_lit2); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_6addBinaryClauses(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_first_args, PyObject *__pyx_v_second_args, PyObject *__pyx_v_n_pairs); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_8addClause(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_lits, PyObject *__pyx_v_n_lits); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_10addRoutingNet(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_router, PyObject *__pyx_v_disabledEdge, PyObject *__pyx_v_n_members, PyObject *__pyx_v_edge_lits, PyObject *__pyx_v_reach_lits); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_12addTertiaryClause(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_lit1, PyObject *__pyx_v_lit2, PyObject *__pyx_v_lit3); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_14addUnitClause(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_lit); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_16assertPB_eq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_rhs, PyObject *__pyx_v_n_args, PyObject *__pyx_v_literals, PyObject *__pyx_v_coefficients); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_18assertPB_geq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_rhs, PyObject *__pyx_v_n_args, PyObject *__pyx_v_literals, PyObject *__pyx_v_coefficients); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_20assertPB_gt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_rhs, PyObject *__pyx_v_n_args, PyObject *__pyx_v_literals, PyObject *__pyx_v_coefficients); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_22assertPB_leq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_rhs, PyObject *__pyx_v_n_args, PyObject *__pyx_v_literals, PyObject *__pyx_v_coefficients); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_24assertPB_lt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_rhs, PyObject *__pyx_v_n_args, PyObject *__pyx_v_literals, PyObject *__pyx_v_coefficients); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_26at_most_one(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_vars, PyObject *__pyx_v_n_vars); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_28backtrack(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_30bv_addition(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvID1, PyObject *__pyx_v_bvID2, PyObject *__pyx_v_resultID); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_32bv_and(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvaID, PyObject *__pyx_v_bvbID, PyObject *__pyx_v_bvResultID); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_34bv_bitblast(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvID); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_36bv_concat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_aID, PyObject *__pyx_v_bID, PyObject *__pyx_v_resultID); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_38bv_divide(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvID1, PyObject *__pyx_v_bvID2, PyObject *__pyx_v_resultID); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_40bv_ite(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_condition_lit, PyObject *__pyx_v_bvThenID, PyObject *__pyx_v_bvElseID, PyObject *__pyx_v_bvResultID); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_42bv_max(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_args, PyObject *__pyx_v_n_args, PyObject *__pyx_v_resultID); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_44bv_min(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_args, PyObject *__pyx_v_n_args, PyObject *__pyx_v_resultID); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_46bv_multiply(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvID1, PyObject *__pyx_v_bvID2, PyObject *__pyx_v_resultID); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_48bv_nand(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvaID, PyObject *__pyx_v_bvbID, PyObject *__pyx_v_bvResultID); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_50bv_nor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvaID, PyObject *__pyx_v_bvbID, PyObject *__pyx_v_bvResultID); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_52bv_not(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvaID, PyObject *__pyx_v_bvResultID); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_54bv_or(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvaID, PyObject *__pyx_v_bvbID, PyObject *__pyx_v_bvResultID); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_56bv_popcount(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_args, PyObject *__pyx_v_n_args, PyObject *__pyx_v_resultID); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_58bv_slice(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_aID, PyObject *__pyx_v_lower, PyObject *__pyx_v_upper, PyObject *__pyx_v_resultID); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_60bv_subtraction(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvID1, PyObject *__pyx_v_bvID2, PyObject *__pyx_v_resultID); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_62bv_unary(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_args, PyObject *__pyx_v_n_args, PyObject *__pyx_v_resultID); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_64bv_width(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvID); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_66bv_xnor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvaID, PyObject *__pyx_v_bvbID, PyObject *__pyx_v_bvResultID); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_68bv_xor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvaID, PyObject *__pyx_v_bvbID, PyObject *__pyx_v_bvResultID); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_70clearOptimizationObjectives(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_72createFlowRouting(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_sourceNode, PyObject *__pyx_v_destNode, PyObject *__pyx_v_maxflowLit); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_74deleteSolver(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_76disablePreprocessing(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_78disallowLiteralSimplification(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_lit); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_80flushPB(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_82getConflictClause(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_store_clause, PyObject *__pyx_v_max_store_size); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_84minimizeUnsatCore(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_assumptions, PyObject *__pyx_v_n_lits); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_86minimizeConflictClause(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_88getDecisionPolarity(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_v); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_90getDecisionPriority(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_var); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_92getModel_AcyclicEdgeFlow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_maxflow_literal, PyObject *__pyx_v_edgeLit); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_94getModel_BV(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvID, PyObject *__pyx_v_getMaximumValue); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_96getModel_EdgeFlow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_maxflow_literal, PyObject *__pyx_v_edgeLit); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_98getModel_Literal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_lit); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_100getModel_MaxFlow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_maxflow_literal); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_102getModel_MinimumSpanningTreeWeight(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_spanning_tree_literal); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_104getModel_Path_EdgeLits(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_reach_or_distance_literal, PyObject *__pyx_v_store_length, PyObject *__pyx_v_store); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_106getModel_Path_EdgeLits_Length(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_reach_or_distance_literal); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_108getModel_Path_Nodes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_reach_or_distance_literal, PyObject *__pyx_v_store_length, PyObject *__pyx_v_store); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_110getModel_Path_Nodes_Length(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_reach_or_distance_literal); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_112getVersion(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_114graph_setAssignEdgesToWeight(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_weight); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_116initBVTheory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_118isDecisionVar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_var); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_120lastSolutionWasOptimal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_122maximizeBV(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvID); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_124maximizeLits(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_lits, PyObject *__pyx_v_n_lits); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_126maximizeWeightedLits(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_lits, PyObject *__pyx_v_weights, PyObject *__pyx_v_n_lits); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_128maximumFlow_geq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_source, PyObject *__pyx_v_sink, PyObject *__pyx_v_weight); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_130maximumFlow_geq_bv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_source, PyObject *__pyx_v_sink, PyObject *__pyx_v_bvID); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_132maximumFlow_gt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_source, PyObject *__pyx_v_sink, PyObject *__pyx_v_weight); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_134maximumFlow_gt_bv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_source, PyObject *__pyx_v_sink, PyObject *__pyx_v_bvID); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_136minimizeBV(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvID); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_138minimizeLits(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_lits, PyObject *__pyx_v_n_lits); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_140minimizeWeightedLits(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_lits, PyObject *__pyx_v_weights, PyObject *__pyx_v_n_lits); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_142minimumSpanningTree_leq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_weight); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_144minimumSpanningTree_lt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_weight); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_146nBitvectors(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_148nClauses(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_150nEdges(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_152nNodes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_154nVars(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_156newBVComparison_bv_geq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvID, PyObject *__pyx_v_compareID); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_158newBVComparison_bv_gt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvID, PyObject *__pyx_v_compareID); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_160newBVComparison_bv_leq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvID, PyObject *__pyx_v_compareID); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_162newBVComparison_bv_lt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvID, PyObject *__pyx_v_compareID); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_164newBVComparison_const_geq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvID, PyObject *__pyx_v_weight); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_166newBVComparison_const_gt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvID, PyObject *__pyx_v_weight); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_168newBVComparison_const_leq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvID, PyObject *__pyx_v_weight); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_170newBVComparison_const_lt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvID, PyObject *__pyx_v_weight); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_172newBitvector(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bits, PyObject *__pyx_v_n_bits); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_174newBitvector_anon(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvWidth); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_176newBitvector_const(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvWidth, PyObject *__pyx_v_constval); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_178newEdge(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v__from, PyObject *__pyx_v_to, PyObject *__pyx_v_weight); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_180newEdgeSet(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_edges, PyObject *__pyx_v_n_edges, PyObject *__pyx_v_enforceEdgeAssignment); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_182newEdge_bv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v__from, PyObject *__pyx_v_to, PyObject *__pyx_v_bvID); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_184newEdge_double(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v__from, PyObject *__pyx_v_to, double __pyx_v_weight); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_186newGraph(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_188newNode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_190newSolver(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_192newSolver_arg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_argv); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_194newVar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_196reaches(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v__from, PyObject *__pyx_v_to); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_198reachesBackward(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v__from, PyObject *__pyx_v_to); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_200onPath(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_nodeOnPath, PyObject *__pyx_v__from, PyObject *__pyx_v_to); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_202readGNF(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_filename); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_204loadGNF(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_filename); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_206setConflictLimit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_num_conflicts); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_208setDecisionPolarity(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_v, PyObject *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_210setDecisionPriority(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_var, PyObject *__pyx_v_priority); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_212setDecisionVar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_var, PyObject *__pyx_v_decidable); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_214setOutputFile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_output); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_216setPropagationLimit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_num_propagations); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_218setTimeLimit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_seconds); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_220shortestPathUnweighted_leq_const(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v__from, PyObject *__pyx_v_to, PyObject *__pyx_v_steps); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_222shortestPathUnweighted_lt_const(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v__from, PyObject *__pyx_v_to, PyObject *__pyx_v_steps); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_224shortestPath_leq_bv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v__from, PyObject *__pyx_v_to, PyObject *__pyx_v_bvID); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_226shortestPath_leq_const(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v__from, PyObject *__pyx_v_to, PyObject *__pyx_v_dist); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_228shortestPath_lt_bv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v__from, PyObject *__pyx_v_to, PyObject *__pyx_v_bvID); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_230shortestPath_lt_const(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v__from, PyObject *__pyx_v_to, PyObject *__pyx_v_dist); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_232solve(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_234solveAssumptions(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_assumptions, PyObject *__pyx_v_n_assumptions); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_236solveAssumptionsLimited(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_assumptions, PyObject *__pyx_v_n_assumptions); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_238solveLimited(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S); /* proto */
static PyObject *__pyx_pf_7monosat_9monosat_p_240true_lit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S); /* proto */
static int __pyx_pf_7cpython_5array_5array___getbuffer__(arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info, CYTHON_UNUSED int __pyx_v_flags); /* proto */
static void __pyx_pf_7cpython_5array_5array_2__releasebuffer__(CYTHON_UNUSED arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */
static PyObject *__pyx_tuple_;
static PyObject *__pyx_tuple__3;
static PyObject *__pyx_tuple__5;
static PyObject *__pyx_tuple__7;
static PyObject *__pyx_tuple__9;
static PyObject *__pyx_tuple__11;
static PyObject *__pyx_tuple__13;
static PyObject *__pyx_tuple__15;
static PyObject *__pyx_tuple__17;
static PyObject *__pyx_tuple__19;
static PyObject *__pyx_tuple__21;
static PyObject *__pyx_tuple__23;
static PyObject *__pyx_tuple__25;
static PyObject *__pyx_tuple__27;
static PyObject *__pyx_tuple__29;
static PyObject *__pyx_tuple__31;
static PyObject *__pyx_tuple__33;
static PyObject *__pyx_tuple__35;
static PyObject *__pyx_tuple__37;
static PyObject *__pyx_tuple__39;
static PyObject *__pyx_tuple__41;
static PyObject *__pyx_tuple__43;
static PyObject *__pyx_tuple__45;
static PyObject *__pyx_tuple__47;
static PyObject *__pyx_tuple__49;
static PyObject *__pyx_tuple__51;
static PyObject *__pyx_tuple__53;
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__111;
static PyObject *__pyx_tuple__113;
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__125;
static PyObject *__pyx_tuple__127;
static PyObject *__pyx_tuple__129;
static PyObject *__pyx_tuple__131;
static PyObject *__pyx_tuple__133;
static PyObject *__pyx_tuple__135;
static PyObject *__pyx_tuple__137;
static PyObject *__pyx_tuple__139;
static PyObject *__pyx_tuple__141;
static PyObject *__pyx_tuple__143;
static PyObject *__pyx_tuple__145;
static PyObject *__pyx_tuple__147;
static PyObject *__pyx_tuple__149;
static PyObject *__pyx_tuple__151;
static PyObject *__pyx_tuple__153;
static PyObject *__pyx_tuple__155;
static PyObject *__pyx_tuple__157;
static PyObject *__pyx_tuple__159;
static PyObject *__pyx_tuple__161;
static PyObject *__pyx_tuple__163;
static PyObject *__pyx_tuple__165;
static PyObject *__pyx_tuple__167;
static PyObject *__pyx_tuple__169;
static PyObject *__pyx_tuple__171;
static PyObject *__pyx_tuple__173;
static PyObject *__pyx_tuple__175;
static PyObject *__pyx_tuple__177;
static PyObject *__pyx_tuple__179;
static PyObject *__pyx_tuple__181;
static PyObject *__pyx_tuple__183;
static PyObject *__pyx_tuple__185;
static PyObject *__pyx_tuple__187;
static PyObject *__pyx_tuple__189;
static PyObject *__pyx_tuple__191;
static PyObject *__pyx_tuple__193;
static PyObject *__pyx_tuple__195;
static PyObject *__pyx_tuple__197;
static PyObject *__pyx_tuple__199;
static PyObject *__pyx_tuple__201;
static PyObject *__pyx_tuple__203;
static PyObject *__pyx_tuple__205;
static PyObject *__pyx_tuple__207;
static PyObject *__pyx_tuple__209;
static PyObject *__pyx_tuple__211;
static PyObject *__pyx_tuple__213;
static PyObject *__pyx_tuple__215;
static PyObject *__pyx_tuple__217;
static PyObject *__pyx_tuple__219;
static PyObject *__pyx_tuple__221;
static PyObject *__pyx_tuple__223;
static PyObject *__pyx_tuple__225;
static PyObject *__pyx_tuple__227;
static PyObject *__pyx_tuple__229;
static PyObject *__pyx_tuple__231;
static PyObject *__pyx_tuple__233;
static PyObject *__pyx_tuple__235;
static PyObject *__pyx_tuple__237;
static PyObject *__pyx_tuple__239;
static PyObject *__pyx_tuple__241;
static PyObject *__pyx_codeobj__10;
static PyObject *__pyx_codeobj__12;
static PyObject *__pyx_codeobj__14;
static PyObject *__pyx_codeobj__16;
static PyObject *__pyx_codeobj__18;
static PyObject *__pyx_codeobj__20;
static PyObject *__pyx_codeobj__22;
static PyObject *__pyx_codeobj__24;
static PyObject *__pyx_codeobj__26;
static PyObject *__pyx_codeobj__28;
static PyObject *__pyx_codeobj__30;
static PyObject *__pyx_codeobj__32;
static PyObject *__pyx_codeobj__34;
static PyObject *__pyx_codeobj__36;
static PyObject *__pyx_codeobj__38;
static PyObject *__pyx_codeobj__40;
static PyObject *__pyx_codeobj__42;
static PyObject *__pyx_codeobj__44;
static PyObject *__pyx_codeobj__46;
static PyObject *__pyx_codeobj__48;
static PyObject *__pyx_codeobj__50;
static PyObject *__pyx_codeobj__52;
static PyObject *__pyx_codeobj__54;
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__110;
static PyObject *__pyx_codeobj__112;
static PyObject *__pyx_codeobj__114;
static PyObject *__pyx_codeobj__116;
static PyObject *__pyx_codeobj__118;
static PyObject *__pyx_codeobj__120;
static PyObject *__pyx_codeobj__122;
static PyObject *__pyx_codeobj__124;
static PyObject *__pyx_codeobj__126;
static PyObject *__pyx_codeobj__128;
static PyObject *__pyx_codeobj__130;
static PyObject *__pyx_codeobj__132;
static PyObject *__pyx_codeobj__134;
static PyObject *__pyx_codeobj__136;
static PyObject *__pyx_codeobj__138;
static PyObject *__pyx_codeobj__140;
static PyObject *__pyx_codeobj__142;
static PyObject *__pyx_codeobj__144;
static PyObject *__pyx_codeobj__146;
static PyObject *__pyx_codeobj__148;
static PyObject *__pyx_codeobj__150;
static PyObject *__pyx_codeobj__152;
static PyObject *__pyx_codeobj__154;
static PyObject *__pyx_codeobj__156;
static PyObject *__pyx_codeobj__158;
static PyObject *__pyx_codeobj__160;
static PyObject *__pyx_codeobj__162;
static PyObject *__pyx_codeobj__164;
static PyObject *__pyx_codeobj__166;
static PyObject *__pyx_codeobj__168;
static PyObject *__pyx_codeobj__170;
static PyObject *__pyx_codeobj__172;
static PyObject *__pyx_codeobj__174;
static PyObject *__pyx_codeobj__176;
static PyObject *__pyx_codeobj__178;
static PyObject *__pyx_codeobj__180;
static PyObject *__pyx_codeobj__182;
static PyObject *__pyx_codeobj__184;
static PyObject *__pyx_codeobj__186;
static PyObject *__pyx_codeobj__188;
static PyObject *__pyx_codeobj__190;
static PyObject *__pyx_codeobj__192;
static PyObject *__pyx_codeobj__194;
static PyObject *__pyx_codeobj__196;
static PyObject *__pyx_codeobj__198;
static PyObject *__pyx_codeobj__200;
static PyObject *__pyx_codeobj__202;
static PyObject *__pyx_codeobj__204;
static PyObject *__pyx_codeobj__206;
static PyObject *__pyx_codeobj__208;
static PyObject *__pyx_codeobj__210;
static PyObject *__pyx_codeobj__212;
static PyObject *__pyx_codeobj__214;
static PyObject *__pyx_codeobj__216;
static PyObject *__pyx_codeobj__218;
static PyObject *__pyx_codeobj__220;
static PyObject *__pyx_codeobj__222;
static PyObject *__pyx_codeobj__224;
static PyObject *__pyx_codeobj__226;
static PyObject *__pyx_codeobj__228;
static PyObject *__pyx_codeobj__230;
static PyObject *__pyx_codeobj__232;
static PyObject *__pyx_codeobj__234;
static PyObject *__pyx_codeobj__236;
static PyObject *__pyx_codeobj__238;
static PyObject *__pyx_codeobj__240;
static PyObject *__pyx_codeobj__242;
/* Late includes */

/* "monosat/monosat_p.pyx":151
*
*
* def acyclic_directed( S ,  G ):             # <<<<<<<<<<<<<<
*     """Cython signature: int acyclic_directed(void* S, void* G)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_1acyclic_directed(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_acyclic_directed[] = "Cython signature: int acyclic_directed(void* S, void* G)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_1acyclic_directed = {"acyclic_directed", (PyCFunction)__pyx_pw_7monosat_9monosat_p_1acyclic_directed, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_acyclic_directed};
static PyObject *__pyx_pw_7monosat_9monosat_p_1acyclic_directed(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_G = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("acyclic_directed (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_G,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_S)) != 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_G)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("acyclic_directed", 1, 2, 2, 1); __PYX_ERR(0, 151, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "acyclic_directed") < 0)) __PYX_ERR(0, 151, __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_S = values[0];
__pyx_v_G = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("acyclic_directed", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 151, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.acyclic_directed", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_acyclic_directed(__pyx_self, __pyx_v_S, __pyx_v_G);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_acyclic_directed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
void *__pyx_t_1;
void *__pyx_t_2;
PyObject *__pyx_t_3 = NULL;
__Pyx_RefNannySetupContext("acyclic_directed", 0);

/* "monosat/monosat_p.pyx":157
*
*
*     cdef int _r = _acyclic_directed_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_1 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 157, __pyx_L1_error)
__pyx_t_2 = PyCapsule_GetPointer(__pyx_v_G, NULL); if (unlikely(__pyx_t_2 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 157, __pyx_L1_error)
__pyx_v__r = acyclic_directed(((void *)__pyx_t_1), ((void *)__pyx_t_2));

/* "monosat/monosat_p.pyx":158
*
*     cdef int _r = _acyclic_directed_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":159
*     cdef int _r = _acyclic_directed_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def acyclic_undirected( S ,  G ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":151
*
*
* def acyclic_directed( S ,  G ):             # <<<<<<<<<<<<<<
*     """Cython signature: int acyclic_directed(void* S, void* G)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("monosat.monosat_p.acyclic_directed", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":161
*     return py_result
*
* def acyclic_undirected( S ,  G ):             # <<<<<<<<<<<<<<
*     """Cython signature: int acyclic_undirected(void* S, void* G)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_3acyclic_undirected(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_2acyclic_undirected[] = "Cython signature: int acyclic_undirected(void* S, void* G)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_3acyclic_undirected = {"acyclic_undirected", (PyCFunction)__pyx_pw_7monosat_9monosat_p_3acyclic_undirected, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_2acyclic_undirected};
static PyObject *__pyx_pw_7monosat_9monosat_p_3acyclic_undirected(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_G = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("acyclic_undirected (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_G,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_S)) != 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_G)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("acyclic_undirected", 1, 2, 2, 1); __PYX_ERR(0, 161, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "acyclic_undirected") < 0)) __PYX_ERR(0, 161, __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_S = values[0];
__pyx_v_G = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("acyclic_undirected", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 161, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.acyclic_undirected", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_2acyclic_undirected(__pyx_self, __pyx_v_S, __pyx_v_G);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_2acyclic_undirected(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
void *__pyx_t_1;
void *__pyx_t_2;
PyObject *__pyx_t_3 = NULL;
__Pyx_RefNannySetupContext("acyclic_undirected", 0);

/* "monosat/monosat_p.pyx":167
*
*
*     cdef int _r = _acyclic_undirected_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_1 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 167, __pyx_L1_error)
__pyx_t_2 = PyCapsule_GetPointer(__pyx_v_G, NULL); if (unlikely(__pyx_t_2 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 167, __pyx_L1_error)
__pyx_v__r = acyclic_undirected(((void *)__pyx_t_1), ((void *)__pyx_t_2));

/* "monosat/monosat_p.pyx":168
*
*     cdef int _r = _acyclic_undirected_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":169
*     cdef int _r = _acyclic_undirected_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def addBinaryClause( S ,  lit1 ,  lit2 ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 169, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":161
*     return py_result
*
* def acyclic_undirected( S ,  G ):             # <<<<<<<<<<<<<<
*     """Cython signature: int acyclic_undirected(void* S, void* G)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("monosat.monosat_p.acyclic_undirected", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":171
*     return py_result
*
* def addBinaryClause( S ,  lit1 ,  lit2 ):             # <<<<<<<<<<<<<<
*     """Cython signature: bint addBinaryClause(void* S, int lit1, int lit2)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_5addBinaryClause(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_4addBinaryClause[] = "Cython signature: bint addBinaryClause(void* S, int lit1, int lit2)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_5addBinaryClause = {"addBinaryClause", (PyCFunction)__pyx_pw_7monosat_9monosat_p_5addBinaryClause, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_4addBinaryClause};
static PyObject *__pyx_pw_7monosat_9monosat_p_5addBinaryClause(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_lit1 = 0;
PyObject *__pyx_v_lit2 = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("addBinaryClause (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_lit1,&__pyx_n_s_lit2,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_S)) != 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_lit1)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("addBinaryClause", 1, 3, 3, 1); __PYX_ERR(0, 171, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lit2)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("addBinaryClause", 1, 3, 3, 2); __PYX_ERR(0, 171, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addBinaryClause") < 0)) __PYX_ERR(0, 171, __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_S = values[0];
__pyx_v_lit1 = values[1];
__pyx_v_lit2 = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("addBinaryClause", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 171, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.addBinaryClause", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_4addBinaryClause(__pyx_self, __pyx_v_S, __pyx_v_lit1, __pyx_v_lit2);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_4addBinaryClause(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_lit1, PyObject *__pyx_v_lit2) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
int __pyx_t_5;
int __pyx_t_6;
PyObject *__pyx_t_7 = NULL;
__Pyx_RefNannySetupContext("addBinaryClause", 0);

/* "monosat/monosat_p.pyx":174
*     """Cython signature: bint addBinaryClause(void* S, int lit1, int lit2)"""
*
*     assert isinstance(lit1, (int, long)), 'arg lit1 wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(lit2, (int, long)), 'arg lit2 wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_lit1);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_lit1);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_lit1_wrong_type);
 __PYX_ERR(0, 174, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":175
*
*     assert isinstance(lit1, (int, long)), 'arg lit1 wrong type'
*     assert isinstance(lit2, (int, long)), 'arg lit2 wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_lit2);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_lit2);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_lit2_wrong_type);
 __PYX_ERR(0, 175, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":179
*
*
*     cdef bint _r = _addBinaryClause_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>lit1), (<int>lit2))             # <<<<<<<<<<<<<<
*     py_result = <bint>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 179, __pyx_L1_error)
__pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_lit1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 179, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_lit2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 179, __pyx_L1_error)
__pyx_v__r = addBinaryClause(((void *)__pyx_t_4), ((int)__pyx_t_5), ((int)__pyx_t_6));

/* "monosat/monosat_p.pyx":180
*
*     cdef bint _r = _addBinaryClause_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>lit1), (<int>lit2))
*     py_result = <bint>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = (__pyx_v__r != 0);

/* "monosat/monosat_p.pyx":181
*     cdef bint _r = _addBinaryClause_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>lit1), (<int>lit2))
*     py_result = <bint>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def addBinaryClauses( S ,  first_args ,  second_args ,  n_pairs ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_py_result); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 181, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_r = __pyx_t_7;
__pyx_t_7 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":171
*     return py_result
*
* def addBinaryClause( S ,  lit1 ,  lit2 ):             # <<<<<<<<<<<<<<
*     """Cython signature: bint addBinaryClause(void* S, int lit1, int lit2)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_7);
__Pyx_AddTraceback("monosat.monosat_p.addBinaryClause", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":183
*     return py_result
*
* def addBinaryClauses( S ,  first_args ,  second_args ,  n_pairs ):             # <<<<<<<<<<<<<<
*     """Cython signature: void addBinaryClauses(void* S, int* first_args, int* second_args, int n_pairs)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_7addBinaryClauses(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_6addBinaryClauses[] = "Cython signature: void addBinaryClauses(void* S, int* first_args, int* second_args, int n_pairs)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_7addBinaryClauses = {"addBinaryClauses", (PyCFunction)__pyx_pw_7monosat_9monosat_p_7addBinaryClauses, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_6addBinaryClauses};
static PyObject *__pyx_pw_7monosat_9monosat_p_7addBinaryClauses(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_first_args = 0;
PyObject *__pyx_v_second_args = 0;
PyObject *__pyx_v_n_pairs = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("addBinaryClauses (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_first_args,&__pyx_n_s_second_args,&__pyx_n_s_n_pairs,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_S)) != 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_first_args)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("addBinaryClauses", 1, 4, 4, 1); __PYX_ERR(0, 183, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_second_args)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("addBinaryClauses", 1, 4, 4, 2); __PYX_ERR(0, 183, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n_pairs)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("addBinaryClauses", 1, 4, 4, 3); __PYX_ERR(0, 183, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addBinaryClauses") < 0)) __PYX_ERR(0, 183, __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_S = values[0];
__pyx_v_first_args = values[1];
__pyx_v_second_args = values[2];
__pyx_v_n_pairs = values[3];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("addBinaryClauses", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 183, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.addBinaryClauses", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_6addBinaryClauses(__pyx_self, __pyx_v_S, __pyx_v_first_args, __pyx_v_second_args, __pyx_v_n_pairs);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_6addBinaryClauses(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_first_args, PyObject *__pyx_v_second_args, PyObject *__pyx_v_n_pairs) {
arrayobject *__pyx_v_a = 0;
arrayobject *__pyx_v_b = 0;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
void *__pyx_t_3;
int __pyx_t_4;
__Pyx_RefNannySetupContext("addBinaryClauses", 0);

/* "monosat/monosat_p.pyx":187
*
*
*     cdef array.array a =  array.array('i', first_args)             # <<<<<<<<<<<<<<
*     cdef array.array b =  array.array('i', second_args)
*
*/
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_n_s_i);
__Pyx_GIVEREF(__pyx_n_s_i);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_i);
__Pyx_INCREF(__pyx_v_first_args);
__Pyx_GIVEREF(__pyx_v_first_args);
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_first_args);
__pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 187, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_a = ((arrayobject *)__pyx_t_2);
__pyx_t_2 = 0;

/* "monosat/monosat_p.pyx":188
*
*     cdef array.array a =  array.array('i', first_args)
*     cdef array.array b =  array.array('i', second_args)             # <<<<<<<<<<<<<<
*
*     _addBinaryClauses_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int*>a.data.as_ints),(<int*>b.data.as_ints), (<int>n_pairs))
*/
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 188, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_n_s_i);
__Pyx_GIVEREF(__pyx_n_s_i);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_i);
__Pyx_INCREF(__pyx_v_second_args);
__Pyx_GIVEREF(__pyx_v_second_args);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_second_args);
__pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_v_b = ((arrayobject *)__pyx_t_1);
__pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":190
*     cdef array.array b =  array.array('i', second_args)
*
*     _addBinaryClauses_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int*>a.data.as_ints),(<int*>b.data.as_ints), (<int>n_pairs))             # <<<<<<<<<<<<<<
*
* def addClause( S ,  lits ,  n_lits ):
*/
__pyx_t_3 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_3 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 190, __pyx_L1_error)
__pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_n_pairs); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 190, __pyx_L1_error)
addBinaryClauses(((void *)__pyx_t_3), ((int *)__pyx_v_a->data.as_ints), ((int *)__pyx_v_b->data.as_ints), ((int)__pyx_t_4));

/* "monosat/monosat_p.pyx":183
*     return py_result
*
* def addBinaryClauses( S ,  first_args ,  second_args ,  n_pairs ):             # <<<<<<<<<<<<<<
*     """Cython signature: void addBinaryClauses(void* S, int* first_args, int* second_args, int n_pairs)"""
*
*/

/* function exit code */
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("monosat.monosat_p.addBinaryClauses", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_a);
__Pyx_XDECREF((PyObject *)__pyx_v_b);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":192
*     _addBinaryClauses_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int*>a.data.as_ints),(<int*>b.data.as_ints), (<int>n_pairs))
*
* def addClause( S ,  lits ,  n_lits ):             # <<<<<<<<<<<<<<
*     """Cython signature: bint addClause(void* S, int* lits, int n_lits)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_9addClause(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_8addClause[] = "Cython signature: bint addClause(void* S, int* lits, int n_lits)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_9addClause = {"addClause", (PyCFunction)__pyx_pw_7monosat_9monosat_p_9addClause, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_8addClause};
static PyObject *__pyx_pw_7monosat_9monosat_p_9addClause(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_lits = 0;
PyObject *__pyx_v_n_lits = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("addClause (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_lits,&__pyx_n_s_n_lits,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_S)) != 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_lits)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("addClause", 1, 3, 3, 1); __PYX_ERR(0, 192, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n_lits)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("addClause", 1, 3, 3, 2); __PYX_ERR(0, 192, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addClause") < 0)) __PYX_ERR(0, 192, __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_S = values[0];
__pyx_v_lits = values[1];
__pyx_v_n_lits = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("addClause", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 192, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.addClause", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_8addClause(__pyx_self, __pyx_v_S, __pyx_v_lits, __pyx_v_n_lits);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_8addClause(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_lits, PyObject *__pyx_v_n_lits) {
arrayobject *__pyx_v_a = 0;
int __pyx_v__r;
int __pyx_v_py_result;
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;
void *__pyx_t_6;
int __pyx_t_7;
__Pyx_RefNannySetupContext("addClause", 0);

/* "monosat/monosat_p.pyx":195
*     """Cython signature: bint addClause(void* S, int* lits, int n_lits)"""
*
*     assert isinstance(lits, list), 'arg lits wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(n_lits, (int, long)), 'arg n_lits wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_1 = PyList_Check(__pyx_v_lits);
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_lits_wrong_type);
 __PYX_ERR(0, 195, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":196
*
*     assert isinstance(lits, list), 'arg lits wrong type'
*     assert isinstance(n_lits, (int, long)), 'arg n_lits wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_n_lits);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_n_lits);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_n_lits_wrong_type);
 __PYX_ERR(0, 196, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":199
*
*
*     cdef array.array a =  array.array('i', lits)             # <<<<<<<<<<<<<<
*     cdef bint _r = _addClause_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int*>a.data.as_ints), (<int>n_lits))
*     py_result = <bint>_r
*/
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 199, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_n_s_i);
__Pyx_GIVEREF(__pyx_n_s_i);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_i);
__Pyx_INCREF(__pyx_v_lits);
__Pyx_GIVEREF(__pyx_v_lits);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_lits);
__pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 199, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_a = ((arrayobject *)__pyx_t_5);
__pyx_t_5 = 0;

/* "monosat/monosat_p.pyx":200
*
*     cdef array.array a =  array.array('i', lits)
*     cdef bint _r = _addClause_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int*>a.data.as_ints), (<int>n_lits))             # <<<<<<<<<<<<<<
*     py_result = <bint>_r
*     return py_result
*/
__pyx_t_6 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_6 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 200, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_n_lits); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 200, __pyx_L1_error)
__pyx_v__r = addClause(((void *)__pyx_t_6), ((int *)__pyx_v_a->data.as_ints), ((int)__pyx_t_7));

/* "monosat/monosat_p.pyx":201
*     cdef array.array a =  array.array('i', lits)
*     cdef bint _r = _addClause_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int*>a.data.as_ints), (<int>n_lits))
*     py_result = <bint>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = (__pyx_v__r != 0);

/* "monosat/monosat_p.pyx":202
*     cdef bint _r = _addClause_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int*>a.data.as_ints), (<int>n_lits))
*     py_result = <bint>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def addRoutingNet( S ,  G ,  router ,  disabledEdge ,  n_members ,  edge_lits ,  reach_lits ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_py_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 202, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_r = __pyx_t_5;
__pyx_t_5 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":192
*     _addBinaryClauses_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int*>a.data.as_ints),(<int*>b.data.as_ints), (<int>n_pairs))
*
* def addClause( S ,  lits ,  n_lits ):             # <<<<<<<<<<<<<<
*     """Cython signature: bint addClause(void* S, int* lits, int n_lits)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_AddTraceback("monosat.monosat_p.addClause", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_a);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":204
*     return py_result
*
* def addRoutingNet( S ,  G ,  router ,  disabledEdge ,  n_members ,  edge_lits ,  reach_lits ):             # <<<<<<<<<<<<<<
*     """Cython signature: void addRoutingNet(void* S, void* G, void* router, int disabledEdge, int n_members, int* edge_lits, int* reach_lits)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_11addRoutingNet(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_10addRoutingNet[] = "Cython signature: void addRoutingNet(void* S, void* G, void* router, int disabledEdge, int n_members, int* edge_lits, int* reach_lits)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_11addRoutingNet = {"addRoutingNet", (PyCFunction)__pyx_pw_7monosat_9monosat_p_11addRoutingNet, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_10addRoutingNet};
static PyObject *__pyx_pw_7monosat_9monosat_p_11addRoutingNet(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_G = 0;
PyObject *__pyx_v_router = 0;
PyObject *__pyx_v_disabledEdge = 0;
PyObject *__pyx_v_n_members = 0;
PyObject *__pyx_v_edge_lits = 0;
PyObject *__pyx_v_reach_lits = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("addRoutingNet (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_G,&__pyx_n_s_router,&__pyx_n_s_disabledEdge,&__pyx_n_s_n_members,&__pyx_n_s_edge_lits,&__pyx_n_s_reach_lits,0};
PyObject* values[7] = {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  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_S)) != 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_G)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("addRoutingNet", 1, 7, 7, 1); __PYX_ERR(0, 204, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_router)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("addRoutingNet", 1, 7, 7, 2); __PYX_ERR(0, 204, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_disabledEdge)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("addRoutingNet", 1, 7, 7, 3); __PYX_ERR(0, 204, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n_members)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("addRoutingNet", 1, 7, 7, 4); __PYX_ERR(0, 204, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  5:
   if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_edge_lits)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("addRoutingNet", 1, 7, 7, 5); __PYX_ERR(0, 204, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  6:
   if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reach_lits)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("addRoutingNet", 1, 7, 7, 6); __PYX_ERR(0, 204, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addRoutingNet") < 0)) __PYX_ERR(0, 204, __pyx_L3_error)
 }
} else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
 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);
}
__pyx_v_S = values[0];
__pyx_v_G = values[1];
__pyx_v_router = values[2];
__pyx_v_disabledEdge = values[3];
__pyx_v_n_members = values[4];
__pyx_v_edge_lits = values[5];
__pyx_v_reach_lits = values[6];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("addRoutingNet", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 204, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.addRoutingNet", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_10addRoutingNet(__pyx_self, __pyx_v_S, __pyx_v_G, __pyx_v_router, __pyx_v_disabledEdge, __pyx_v_n_members, __pyx_v_edge_lits, __pyx_v_reach_lits);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_10addRoutingNet(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_router, PyObject *__pyx_v_disabledEdge, PyObject *__pyx_v_n_members, PyObject *__pyx_v_edge_lits, PyObject *__pyx_v_reach_lits) {
arrayobject *__pyx_v_a = 0;
arrayobject *__pyx_v_b = 0;
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;
void *__pyx_t_6;
void *__pyx_t_7;
int __pyx_t_8;
int __pyx_t_9;
__Pyx_RefNannySetupContext("addRoutingNet", 0);

/* "monosat/monosat_p.pyx":208
*
*
*     assert isinstance(router, (int, long)), 'arg router wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(disabledEdge, (int, long)), 'arg disabledEdge wrong type'
*     assert isinstance(n_members, (int, long)), 'arg n_members wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_router);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_router);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_router_wrong_type);
 __PYX_ERR(0, 208, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":209
*
*     assert isinstance(router, (int, long)), 'arg router wrong type'
*     assert isinstance(disabledEdge, (int, long)), 'arg disabledEdge wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(n_members, (int, long)), 'arg n_members wrong type'
*     assert isinstance(edge_lits, (int, long)), 'arg edge_lits wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_disabledEdge);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_disabledEdge);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_disabledEdge_wrong_type);
 __PYX_ERR(0, 209, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":210
*     assert isinstance(router, (int, long)), 'arg router wrong type'
*     assert isinstance(disabledEdge, (int, long)), 'arg disabledEdge wrong type'
*     assert isinstance(n_members, (int, long)), 'arg n_members wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(edge_lits, (int, long)), 'arg edge_lits wrong type'
*     assert isinstance(reach_lits, (int, long)), 'arg reach_lits wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_n_members);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L7_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_n_members);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_n_members_wrong_type);
 __PYX_ERR(0, 210, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":211
*     assert isinstance(disabledEdge, (int, long)), 'arg disabledEdge wrong type'
*     assert isinstance(n_members, (int, long)), 'arg n_members wrong type'
*     assert isinstance(edge_lits, (int, long)), 'arg edge_lits wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(reach_lits, (int, long)), 'arg reach_lits wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_edge_lits);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L9_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_edge_lits);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L9_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_edge_lits_wrong_type);
 __PYX_ERR(0, 211, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":212
*     assert isinstance(n_members, (int, long)), 'arg n_members wrong type'
*     assert isinstance(edge_lits, (int, long)), 'arg edge_lits wrong type'
*     assert isinstance(reach_lits, (int, long)), 'arg reach_lits wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_reach_lits);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L11_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_reach_lits);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L11_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_reach_lits_wrong_type);
 __PYX_ERR(0, 212, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":215
*
*
*     cdef array.array a =  array.array('i', edge_lits)             # <<<<<<<<<<<<<<
*     cdef array.array b =  array.array('i', reach_lits)
*     _addRoutingNet_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<void*>router), (<int>disabledEdge), (<int>n_members), (<int*>a.data.as_ints), (<int*>b.data.as_ints))
*/
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 215, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_n_s_i);
__Pyx_GIVEREF(__pyx_n_s_i);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_i);
__Pyx_INCREF(__pyx_v_edge_lits);
__Pyx_GIVEREF(__pyx_v_edge_lits);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_edge_lits);
__pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 215, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_a = ((arrayobject *)__pyx_t_5);
__pyx_t_5 = 0;

/* "monosat/monosat_p.pyx":216
*
*     cdef array.array a =  array.array('i', edge_lits)
*     cdef array.array b =  array.array('i', reach_lits)             # <<<<<<<<<<<<<<
*     _addRoutingNet_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<void*>router), (<int>disabledEdge), (<int>n_members), (<int*>a.data.as_ints), (<int*>b.data.as_ints))
*
*/
__pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 216, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_INCREF(__pyx_n_s_i);
__Pyx_GIVEREF(__pyx_n_s_i);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_i);
__Pyx_INCREF(__pyx_v_reach_lits);
__Pyx_GIVEREF(__pyx_v_reach_lits);
PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_reach_lits);
__pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_5, NULL); 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_v_b = ((arrayobject *)__pyx_t_4);
__pyx_t_4 = 0;

/* "monosat/monosat_p.pyx":217
*     cdef array.array a =  array.array('i', edge_lits)
*     cdef array.array b =  array.array('i', reach_lits)
*     _addRoutingNet_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<void*>router), (<int>disabledEdge), (<int>n_members), (<int*>a.data.as_ints), (<int*>b.data.as_ints))             # <<<<<<<<<<<<<<
*
* def addTertiaryClause( S ,  lit1 ,  lit2 ,  lit3 ):
*/
__pyx_t_6 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_6 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 217, __pyx_L1_error)
__pyx_t_7 = PyCapsule_GetPointer(__pyx_v_G, NULL); if (unlikely(__pyx_t_7 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 217, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_disabledEdge); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 217, __pyx_L1_error)
__pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_n_members); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 217, __pyx_L1_error)
addRoutingNet(((void *)__pyx_t_6), ((void *)__pyx_t_7), ((void *)__pyx_v_router), ((int)__pyx_t_8), ((int)__pyx_t_9), ((int *)__pyx_v_a->data.as_ints), ((int *)__pyx_v_b->data.as_ints));

/* "monosat/monosat_p.pyx":204
*     return py_result
*
* def addRoutingNet( S ,  G ,  router ,  disabledEdge ,  n_members ,  edge_lits ,  reach_lits ):             # <<<<<<<<<<<<<<
*     """Cython signature: void addRoutingNet(void* S, void* G, void* router, int disabledEdge, int n_members, int* edge_lits, int* reach_lits)"""
*
*/

/* 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_AddTraceback("monosat.monosat_p.addRoutingNet", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_a);
__Pyx_XDECREF((PyObject *)__pyx_v_b);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":219
*     _addRoutingNet_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<void*>router), (<int>disabledEdge), (<int>n_members), (<int*>a.data.as_ints), (<int*>b.data.as_ints))
*
* def addTertiaryClause( S ,  lit1 ,  lit2 ,  lit3 ):             # <<<<<<<<<<<<<<
*     """Cython signature: bint addTertiaryClause(void* S, int lit1, int lit2, int lit3)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_13addTertiaryClause(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_12addTertiaryClause[] = "Cython signature: bint addTertiaryClause(void* S, int lit1, int lit2, int lit3)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_13addTertiaryClause = {"addTertiaryClause", (PyCFunction)__pyx_pw_7monosat_9monosat_p_13addTertiaryClause, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_12addTertiaryClause};
static PyObject *__pyx_pw_7monosat_9monosat_p_13addTertiaryClause(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_lit1 = 0;
PyObject *__pyx_v_lit2 = 0;
PyObject *__pyx_v_lit3 = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("addTertiaryClause (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_lit1,&__pyx_n_s_lit2,&__pyx_n_s_lit3,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_S)) != 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_lit1)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("addTertiaryClause", 1, 4, 4, 1); __PYX_ERR(0, 219, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lit2)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("addTertiaryClause", 1, 4, 4, 2); __PYX_ERR(0, 219, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lit3)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("addTertiaryClause", 1, 4, 4, 3); __PYX_ERR(0, 219, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addTertiaryClause") < 0)) __PYX_ERR(0, 219, __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_S = values[0];
__pyx_v_lit1 = values[1];
__pyx_v_lit2 = values[2];
__pyx_v_lit3 = values[3];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("addTertiaryClause", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 219, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.addTertiaryClause", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_12addTertiaryClause(__pyx_self, __pyx_v_S, __pyx_v_lit1, __pyx_v_lit2, __pyx_v_lit3);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_12addTertiaryClause(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_lit1, PyObject *__pyx_v_lit2, PyObject *__pyx_v_lit3) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
int __pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("addTertiaryClause", 0);

/* "monosat/monosat_p.pyx":222
*     """Cython signature: bint addTertiaryClause(void* S, int lit1, int lit2, int lit3)"""
*
*     assert isinstance(lit1, (int, long)), 'arg lit1 wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(lit2, (int, long)), 'arg lit2 wrong type'
*     assert isinstance(lit3, (int, long)), 'arg lit3 wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_lit1);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_lit1);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_lit1_wrong_type);
 __PYX_ERR(0, 222, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":223
*
*     assert isinstance(lit1, (int, long)), 'arg lit1 wrong type'
*     assert isinstance(lit2, (int, long)), 'arg lit2 wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(lit3, (int, long)), 'arg lit3 wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_lit2);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_lit2);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_lit2_wrong_type);
 __PYX_ERR(0, 223, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":224
*     assert isinstance(lit1, (int, long)), 'arg lit1 wrong type'
*     assert isinstance(lit2, (int, long)), 'arg lit2 wrong type'
*     assert isinstance(lit3, (int, long)), 'arg lit3 wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_lit3);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L7_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_lit3);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_lit3_wrong_type);
 __PYX_ERR(0, 224, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":229
*
*
*     cdef bint _r = _addTertiaryClause_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>lit1), (<int>lit2), (<int>lit3))             # <<<<<<<<<<<<<<
*     py_result = <bint>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 229, __pyx_L1_error)
__pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_lit1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 229, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_lit2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 229, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_lit3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 229, __pyx_L1_error)
__pyx_v__r = addTertiaryClause(((void *)__pyx_t_4), ((int)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7));

/* "monosat/monosat_p.pyx":230
*
*     cdef bint _r = _addTertiaryClause_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>lit1), (<int>lit2), (<int>lit3))
*     py_result = <bint>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = (__pyx_v__r != 0);

/* "monosat/monosat_p.pyx":231
*     cdef bint _r = _addTertiaryClause_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>lit1), (<int>lit2), (<int>lit3))
*     py_result = <bint>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def addUnitClause( S ,  lit ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_8 = __Pyx_PyBool_FromLong(__pyx_v_py_result); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 231, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__pyx_r = __pyx_t_8;
__pyx_t_8 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":219
*     _addRoutingNet_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<void*>router), (<int>disabledEdge), (<int>n_members), (<int*>a.data.as_ints), (<int*>b.data.as_ints))
*
* def addTertiaryClause( S ,  lit1 ,  lit2 ,  lit3 ):             # <<<<<<<<<<<<<<
*     """Cython signature: bint addTertiaryClause(void* S, int lit1, int lit2, int lit3)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_8);
__Pyx_AddTraceback("monosat.monosat_p.addTertiaryClause", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":233
*     return py_result
*
* def addUnitClause( S ,  lit ):             # <<<<<<<<<<<<<<
*     """Cython signature: bint addUnitClause(void* S, int lit)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_15addUnitClause(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_14addUnitClause[] = "Cython signature: bint addUnitClause(void* S, int lit)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_15addUnitClause = {"addUnitClause", (PyCFunction)__pyx_pw_7monosat_9monosat_p_15addUnitClause, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_14addUnitClause};
static PyObject *__pyx_pw_7monosat_9monosat_p_15addUnitClause(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_lit = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("addUnitClause (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_lit,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_S)) != 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_lit)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("addUnitClause", 1, 2, 2, 1); __PYX_ERR(0, 233, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addUnitClause") < 0)) __PYX_ERR(0, 233, __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_S = values[0];
__pyx_v_lit = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("addUnitClause", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 233, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.addUnitClause", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_14addUnitClause(__pyx_self, __pyx_v_S, __pyx_v_lit);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_14addUnitClause(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_lit) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
int __pyx_t_5;
PyObject *__pyx_t_6 = NULL;
__Pyx_RefNannySetupContext("addUnitClause", 0);

/* "monosat/monosat_p.pyx":236
*     """Cython signature: bint addUnitClause(void* S, int lit)"""
*
*     assert isinstance(lit, (int, long)), 'arg lit wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_lit);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_lit);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_lit_wrong_type);
 __PYX_ERR(0, 236, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":239
*
*
*     cdef bint _r = _addUnitClause_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>lit))             # <<<<<<<<<<<<<<
*     py_result = <bint>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 239, __pyx_L1_error)
__pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_lit); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 239, __pyx_L1_error)
__pyx_v__r = addUnitClause(((void *)__pyx_t_4), ((int)__pyx_t_5));

/* "monosat/monosat_p.pyx":240
*
*     cdef bint _r = _addUnitClause_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>lit))
*     py_result = <bint>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = (__pyx_v__r != 0);

/* "monosat/monosat_p.pyx":241
*     cdef bint _r = _addUnitClause_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>lit))
*     py_result = <bint>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def assertPB_eq( S ,  rhs ,  n_args ,  literals ,  coefficients ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_py_result); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 241, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_r = __pyx_t_6;
__pyx_t_6 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":233
*     return py_result
*
* def addUnitClause( S ,  lit ):             # <<<<<<<<<<<<<<
*     """Cython signature: bint addUnitClause(void* S, int lit)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_6);
__Pyx_AddTraceback("monosat.monosat_p.addUnitClause", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":243
*     return py_result
*
* def assertPB_eq( S ,  rhs ,  n_args ,  literals ,  coefficients ):             # <<<<<<<<<<<<<<
*     """Cython signature: void assertPB_eq(void* S, int rhs, int n_args, int* literals, int* coefficients)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_17assertPB_eq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_16assertPB_eq[] = "Cython signature: void assertPB_eq(void* S, int rhs, int n_args, int* literals, int* coefficients)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_17assertPB_eq = {"assertPB_eq", (PyCFunction)__pyx_pw_7monosat_9monosat_p_17assertPB_eq, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_16assertPB_eq};
static PyObject *__pyx_pw_7monosat_9monosat_p_17assertPB_eq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_rhs = 0;
PyObject *__pyx_v_n_args = 0;
PyObject *__pyx_v_literals = 0;
PyObject *__pyx_v_coefficients = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("assertPB_eq (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_rhs,&__pyx_n_s_n_args,&__pyx_n_s_literals,&__pyx_n_s_coefficients,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_S)) != 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_rhs)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("assertPB_eq", 1, 5, 5, 1); __PYX_ERR(0, 243, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n_args)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("assertPB_eq", 1, 5, 5, 2); __PYX_ERR(0, 243, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_literals)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("assertPB_eq", 1, 5, 5, 3); __PYX_ERR(0, 243, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_coefficients)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("assertPB_eq", 1, 5, 5, 4); __PYX_ERR(0, 243, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "assertPB_eq") < 0)) __PYX_ERR(0, 243, __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_S = values[0];
__pyx_v_rhs = values[1];
__pyx_v_n_args = values[2];
__pyx_v_literals = values[3];
__pyx_v_coefficients = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("assertPB_eq", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 243, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.assertPB_eq", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_16assertPB_eq(__pyx_self, __pyx_v_S, __pyx_v_rhs, __pyx_v_n_args, __pyx_v_literals, __pyx_v_coefficients);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_16assertPB_eq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_rhs, PyObject *__pyx_v_n_args, PyObject *__pyx_v_literals, PyObject *__pyx_v_coefficients) {
arrayobject *__pyx_v_a = 0;
arrayobject *__pyx_v_b = 0;
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;
void *__pyx_t_6;
int __pyx_t_7;
int __pyx_t_8;
__Pyx_RefNannySetupContext("assertPB_eq", 0);

/* "monosat/monosat_p.pyx":246
*     """Cython signature: void assertPB_eq(void* S, int rhs, int n_args, int* literals, int* coefficients)"""
*
*     assert isinstance(rhs, (int, long)), 'arg rhs wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(n_args, (int, long)), 'arg n_args wrong type'
*     assert isinstance(literals, (int, long)), 'arg literals wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_rhs);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_rhs);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_rhs_wrong_type);
 __PYX_ERR(0, 246, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":247
*
*     assert isinstance(rhs, (int, long)), 'arg rhs wrong type'
*     assert isinstance(n_args, (int, long)), 'arg n_args wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(literals, (int, long)), 'arg literals wrong type'
*     assert isinstance(coefficients, (int, long)), 'arg coefficients wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_n_args);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_n_args);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_n_args_wrong_type);
 __PYX_ERR(0, 247, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":248
*     assert isinstance(rhs, (int, long)), 'arg rhs wrong type'
*     assert isinstance(n_args, (int, long)), 'arg n_args wrong type'
*     assert isinstance(literals, (int, long)), 'arg literals wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(coefficients, (int, long)), 'arg coefficients wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_literals);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L7_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_literals);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_literals_wrong_type);
 __PYX_ERR(0, 248, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":249
*     assert isinstance(n_args, (int, long)), 'arg n_args wrong type'
*     assert isinstance(literals, (int, long)), 'arg literals wrong type'
*     assert isinstance(coefficients, (int, long)), 'arg coefficients wrong type'             # <<<<<<<<<<<<<<
*
*     cdef array.array a =  array.array('i', literals)
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_coefficients);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L9_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_coefficients);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L9_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_coefficients_wrong_type);
 __PYX_ERR(0, 249, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":251
*     assert isinstance(coefficients, (int, long)), 'arg coefficients wrong type'
*
*     cdef array.array a =  array.array('i', literals)             # <<<<<<<<<<<<<<
*     cdef array.array b =  array.array('i', coefficients)
*
*/
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 251, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_n_s_i);
__Pyx_GIVEREF(__pyx_n_s_i);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_i);
__Pyx_INCREF(__pyx_v_literals);
__Pyx_GIVEREF(__pyx_v_literals);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_literals);
__pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 251, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_a = ((arrayobject *)__pyx_t_5);
__pyx_t_5 = 0;

/* "monosat/monosat_p.pyx":252
*
*     cdef array.array a =  array.array('i', literals)
*     cdef array.array b =  array.array('i', coefficients)             # <<<<<<<<<<<<<<
*
*
*/
__pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 252, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_INCREF(__pyx_n_s_i);
__Pyx_GIVEREF(__pyx_n_s_i);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_i);
__Pyx_INCREF(__pyx_v_coefficients);
__Pyx_GIVEREF(__pyx_v_coefficients);
PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_coefficients);
__pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 252, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_v_b = ((arrayobject *)__pyx_t_4);
__pyx_t_4 = 0;

/* "monosat/monosat_p.pyx":256
*
*
*     _assertPB_eq_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>rhs), (<int>n_args), (<int*>a.data.as_ints), (<int*>b.data.as_ints))             # <<<<<<<<<<<<<<
*
* def assertPB_geq( S ,  rhs ,  n_args ,  literals ,  coefficients ):
*/
__pyx_t_6 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_6 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 256, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_rhs); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 256, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_n_args); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 256, __pyx_L1_error)
assertPB_eq(((void *)__pyx_t_6), ((int)__pyx_t_7), ((int)__pyx_t_8), ((int *)__pyx_v_a->data.as_ints), ((int *)__pyx_v_b->data.as_ints));

/* "monosat/monosat_p.pyx":243
*     return py_result
*
* def assertPB_eq( S ,  rhs ,  n_args ,  literals ,  coefficients ):             # <<<<<<<<<<<<<<
*     """Cython signature: void assertPB_eq(void* S, int rhs, int n_args, int* literals, int* coefficients)"""
*
*/

/* 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_AddTraceback("monosat.monosat_p.assertPB_eq", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_a);
__Pyx_XDECREF((PyObject *)__pyx_v_b);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":258
*     _assertPB_eq_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>rhs), (<int>n_args), (<int*>a.data.as_ints), (<int*>b.data.as_ints))
*
* def assertPB_geq( S ,  rhs ,  n_args ,  literals ,  coefficients ):             # <<<<<<<<<<<<<<
*     """Cython signature: void assertPB_geq(void* S, int rhs, int n_args, int* literals, int* coefficients)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_19assertPB_geq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_18assertPB_geq[] = "Cython signature: void assertPB_geq(void* S, int rhs, int n_args, int* literals, int* coefficients)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_19assertPB_geq = {"assertPB_geq", (PyCFunction)__pyx_pw_7monosat_9monosat_p_19assertPB_geq, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_18assertPB_geq};
static PyObject *__pyx_pw_7monosat_9monosat_p_19assertPB_geq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_rhs = 0;
PyObject *__pyx_v_n_args = 0;
PyObject *__pyx_v_literals = 0;
PyObject *__pyx_v_coefficients = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("assertPB_geq (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_rhs,&__pyx_n_s_n_args,&__pyx_n_s_literals,&__pyx_n_s_coefficients,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_S)) != 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_rhs)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("assertPB_geq", 1, 5, 5, 1); __PYX_ERR(0, 258, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n_args)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("assertPB_geq", 1, 5, 5, 2); __PYX_ERR(0, 258, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_literals)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("assertPB_geq", 1, 5, 5, 3); __PYX_ERR(0, 258, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_coefficients)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("assertPB_geq", 1, 5, 5, 4); __PYX_ERR(0, 258, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "assertPB_geq") < 0)) __PYX_ERR(0, 258, __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_S = values[0];
__pyx_v_rhs = values[1];
__pyx_v_n_args = values[2];
__pyx_v_literals = values[3];
__pyx_v_coefficients = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("assertPB_geq", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 258, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.assertPB_geq", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_18assertPB_geq(__pyx_self, __pyx_v_S, __pyx_v_rhs, __pyx_v_n_args, __pyx_v_literals, __pyx_v_coefficients);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_18assertPB_geq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_rhs, PyObject *__pyx_v_n_args, PyObject *__pyx_v_literals, PyObject *__pyx_v_coefficients) {
arrayobject *__pyx_v_a = 0;
arrayobject *__pyx_v_b = 0;
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;
void *__pyx_t_6;
int __pyx_t_7;
int __pyx_t_8;
__Pyx_RefNannySetupContext("assertPB_geq", 0);

/* "monosat/monosat_p.pyx":261
*     """Cython signature: void assertPB_geq(void* S, int rhs, int n_args, int* literals, int* coefficients)"""
*
*     assert isinstance(rhs, (int, long)), 'arg rhs wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(n_args, (int, long)), 'arg n_args wrong type'
*     assert isinstance(literals, (int, long)), 'arg literals wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_rhs);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_rhs);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_rhs_wrong_type);
 __PYX_ERR(0, 261, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":262
*
*     assert isinstance(rhs, (int, long)), 'arg rhs wrong type'
*     assert isinstance(n_args, (int, long)), 'arg n_args wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(literals, (int, long)), 'arg literals wrong type'
*     assert isinstance(coefficients, (int, long)), 'arg coefficients wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_n_args);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_n_args);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_n_args_wrong_type);
 __PYX_ERR(0, 262, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":263
*     assert isinstance(rhs, (int, long)), 'arg rhs wrong type'
*     assert isinstance(n_args, (int, long)), 'arg n_args wrong type'
*     assert isinstance(literals, (int, long)), 'arg literals wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(coefficients, (int, long)), 'arg coefficients wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_literals);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L7_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_literals);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_literals_wrong_type);
 __PYX_ERR(0, 263, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":264
*     assert isinstance(n_args, (int, long)), 'arg n_args wrong type'
*     assert isinstance(literals, (int, long)), 'arg literals wrong type'
*     assert isinstance(coefficients, (int, long)), 'arg coefficients wrong type'             # <<<<<<<<<<<<<<
*
*     cdef array.array a =  array.array('i', literals)
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_coefficients);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L9_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_coefficients);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L9_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_coefficients_wrong_type);
 __PYX_ERR(0, 264, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":266
*     assert isinstance(coefficients, (int, long)), 'arg coefficients wrong type'
*
*     cdef array.array a =  array.array('i', literals)             # <<<<<<<<<<<<<<
*     cdef array.array b =  array.array('i', coefficients)
*
*/
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 266, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_n_s_i);
__Pyx_GIVEREF(__pyx_n_s_i);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_i);
__Pyx_INCREF(__pyx_v_literals);
__Pyx_GIVEREF(__pyx_v_literals);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_literals);
__pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 266, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_a = ((arrayobject *)__pyx_t_5);
__pyx_t_5 = 0;

/* "monosat/monosat_p.pyx":267
*
*     cdef array.array a =  array.array('i', literals)
*     cdef array.array b =  array.array('i', coefficients)             # <<<<<<<<<<<<<<
*
*
*/
__pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 267, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_INCREF(__pyx_n_s_i);
__Pyx_GIVEREF(__pyx_n_s_i);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_i);
__Pyx_INCREF(__pyx_v_coefficients);
__Pyx_GIVEREF(__pyx_v_coefficients);
PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_coefficients);
__pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 267, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_v_b = ((arrayobject *)__pyx_t_4);
__pyx_t_4 = 0;

/* "monosat/monosat_p.pyx":271
*
*
*     _assertPB_geq_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>rhs), (<int>n_args), (<int*>a.data.as_ints), (<int*>b.data.as_ints))             # <<<<<<<<<<<<<<
*
* def assertPB_gt( S ,  rhs ,  n_args ,  literals ,  coefficients ):
*/
__pyx_t_6 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_6 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 271, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_rhs); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 271, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_n_args); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 271, __pyx_L1_error)
assertPB_geq(((void *)__pyx_t_6), ((int)__pyx_t_7), ((int)__pyx_t_8), ((int *)__pyx_v_a->data.as_ints), ((int *)__pyx_v_b->data.as_ints));

/* "monosat/monosat_p.pyx":258
*     _assertPB_eq_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>rhs), (<int>n_args), (<int*>a.data.as_ints), (<int*>b.data.as_ints))
*
* def assertPB_geq( S ,  rhs ,  n_args ,  literals ,  coefficients ):             # <<<<<<<<<<<<<<
*     """Cython signature: void assertPB_geq(void* S, int rhs, int n_args, int* literals, int* coefficients)"""
*
*/

/* 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_AddTraceback("monosat.monosat_p.assertPB_geq", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_a);
__Pyx_XDECREF((PyObject *)__pyx_v_b);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":273
*     _assertPB_geq_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>rhs), (<int>n_args), (<int*>a.data.as_ints), (<int*>b.data.as_ints))
*
* def assertPB_gt( S ,  rhs ,  n_args ,  literals ,  coefficients ):             # <<<<<<<<<<<<<<
*     """Cython signature: void assertPB_gt(void* S, int rhs, int n_args, int* literals, int* coefficients)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_21assertPB_gt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_20assertPB_gt[] = "Cython signature: void assertPB_gt(void* S, int rhs, int n_args, int* literals, int* coefficients)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_21assertPB_gt = {"assertPB_gt", (PyCFunction)__pyx_pw_7monosat_9monosat_p_21assertPB_gt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_20assertPB_gt};
static PyObject *__pyx_pw_7monosat_9monosat_p_21assertPB_gt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_rhs = 0;
PyObject *__pyx_v_n_args = 0;
PyObject *__pyx_v_literals = 0;
PyObject *__pyx_v_coefficients = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("assertPB_gt (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_rhs,&__pyx_n_s_n_args,&__pyx_n_s_literals,&__pyx_n_s_coefficients,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_S)) != 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_rhs)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("assertPB_gt", 1, 5, 5, 1); __PYX_ERR(0, 273, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n_args)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("assertPB_gt", 1, 5, 5, 2); __PYX_ERR(0, 273, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_literals)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("assertPB_gt", 1, 5, 5, 3); __PYX_ERR(0, 273, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_coefficients)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("assertPB_gt", 1, 5, 5, 4); __PYX_ERR(0, 273, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "assertPB_gt") < 0)) __PYX_ERR(0, 273, __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_S = values[0];
__pyx_v_rhs = values[1];
__pyx_v_n_args = values[2];
__pyx_v_literals = values[3];
__pyx_v_coefficients = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("assertPB_gt", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 273, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.assertPB_gt", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_20assertPB_gt(__pyx_self, __pyx_v_S, __pyx_v_rhs, __pyx_v_n_args, __pyx_v_literals, __pyx_v_coefficients);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_20assertPB_gt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_rhs, PyObject *__pyx_v_n_args, PyObject *__pyx_v_literals, PyObject *__pyx_v_coefficients) {
arrayobject *__pyx_v_a = 0;
arrayobject *__pyx_v_b = 0;
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;
void *__pyx_t_6;
int __pyx_t_7;
int __pyx_t_8;
__Pyx_RefNannySetupContext("assertPB_gt", 0);

/* "monosat/monosat_p.pyx":276
*     """Cython signature: void assertPB_gt(void* S, int rhs, int n_args, int* literals, int* coefficients)"""
*
*     assert isinstance(rhs, (int, long)), 'arg rhs wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(n_args, (int, long)), 'arg n_args wrong type'
*     assert isinstance(literals, (int, long)), 'arg literals wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_rhs);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_rhs);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_rhs_wrong_type);
 __PYX_ERR(0, 276, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":277
*
*     assert isinstance(rhs, (int, long)), 'arg rhs wrong type'
*     assert isinstance(n_args, (int, long)), 'arg n_args wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(literals, (int, long)), 'arg literals wrong type'
*     assert isinstance(coefficients, (int, long)), 'arg coefficients wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_n_args);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_n_args);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_n_args_wrong_type);
 __PYX_ERR(0, 277, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":278
*     assert isinstance(rhs, (int, long)), 'arg rhs wrong type'
*     assert isinstance(n_args, (int, long)), 'arg n_args wrong type'
*     assert isinstance(literals, (int, long)), 'arg literals wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(coefficients, (int, long)), 'arg coefficients wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_literals);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L7_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_literals);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_literals_wrong_type);
 __PYX_ERR(0, 278, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":279
*     assert isinstance(n_args, (int, long)), 'arg n_args wrong type'
*     assert isinstance(literals, (int, long)), 'arg literals wrong type'
*     assert isinstance(coefficients, (int, long)), 'arg coefficients wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_coefficients);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L9_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_coefficients);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L9_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_coefficients_wrong_type);
 __PYX_ERR(0, 279, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":282
*
*
*     cdef array.array a =  array.array('i', literals)             # <<<<<<<<<<<<<<
*     cdef array.array b =  array.array('i', coefficients)
*
*/
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 282, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_n_s_i);
__Pyx_GIVEREF(__pyx_n_s_i);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_i);
__Pyx_INCREF(__pyx_v_literals);
__Pyx_GIVEREF(__pyx_v_literals);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_literals);
__pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 282, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_a = ((arrayobject *)__pyx_t_5);
__pyx_t_5 = 0;

/* "monosat/monosat_p.pyx":283
*
*     cdef array.array a =  array.array('i', literals)
*     cdef array.array b =  array.array('i', coefficients)             # <<<<<<<<<<<<<<
*
*
*/
__pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 283, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_INCREF(__pyx_n_s_i);
__Pyx_GIVEREF(__pyx_n_s_i);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_i);
__Pyx_INCREF(__pyx_v_coefficients);
__Pyx_GIVEREF(__pyx_v_coefficients);
PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_coefficients);
__pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 283, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_v_b = ((arrayobject *)__pyx_t_4);
__pyx_t_4 = 0;

/* "monosat/monosat_p.pyx":287
*
*
*     _assertPB_gt_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>rhs), (<int>n_args), (<int*>a.data.as_ints), (<int*>b.data.as_ints))             # <<<<<<<<<<<<<<
*
* def assertPB_leq( S ,  rhs ,  n_args ,  literals ,  coefficients ):
*/
__pyx_t_6 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_6 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 287, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_rhs); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 287, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_n_args); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 287, __pyx_L1_error)
assertPB_gt(((void *)__pyx_t_6), ((int)__pyx_t_7), ((int)__pyx_t_8), ((int *)__pyx_v_a->data.as_ints), ((int *)__pyx_v_b->data.as_ints));

/* "monosat/monosat_p.pyx":273
*     _assertPB_geq_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>rhs), (<int>n_args), (<int*>a.data.as_ints), (<int*>b.data.as_ints))
*
* def assertPB_gt( S ,  rhs ,  n_args ,  literals ,  coefficients ):             # <<<<<<<<<<<<<<
*     """Cython signature: void assertPB_gt(void* S, int rhs, int n_args, int* literals, int* coefficients)"""
*
*/

/* 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_AddTraceback("monosat.monosat_p.assertPB_gt", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_a);
__Pyx_XDECREF((PyObject *)__pyx_v_b);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":289
*     _assertPB_gt_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>rhs), (<int>n_args), (<int*>a.data.as_ints), (<int*>b.data.as_ints))
*
* def assertPB_leq( S ,  rhs ,  n_args ,  literals ,  coefficients ):             # <<<<<<<<<<<<<<
*     """Cython signature: void assertPB_leq(void* S, int rhs, int n_args, int* literals, int* coefficients)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_23assertPB_leq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_22assertPB_leq[] = "Cython signature: void assertPB_leq(void* S, int rhs, int n_args, int* literals, int* coefficients)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_23assertPB_leq = {"assertPB_leq", (PyCFunction)__pyx_pw_7monosat_9monosat_p_23assertPB_leq, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_22assertPB_leq};
static PyObject *__pyx_pw_7monosat_9monosat_p_23assertPB_leq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_rhs = 0;
PyObject *__pyx_v_n_args = 0;
PyObject *__pyx_v_literals = 0;
PyObject *__pyx_v_coefficients = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("assertPB_leq (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_rhs,&__pyx_n_s_n_args,&__pyx_n_s_literals,&__pyx_n_s_coefficients,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_S)) != 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_rhs)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("assertPB_leq", 1, 5, 5, 1); __PYX_ERR(0, 289, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n_args)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("assertPB_leq", 1, 5, 5, 2); __PYX_ERR(0, 289, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_literals)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("assertPB_leq", 1, 5, 5, 3); __PYX_ERR(0, 289, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_coefficients)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("assertPB_leq", 1, 5, 5, 4); __PYX_ERR(0, 289, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "assertPB_leq") < 0)) __PYX_ERR(0, 289, __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_S = values[0];
__pyx_v_rhs = values[1];
__pyx_v_n_args = values[2];
__pyx_v_literals = values[3];
__pyx_v_coefficients = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("assertPB_leq", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 289, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.assertPB_leq", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_22assertPB_leq(__pyx_self, __pyx_v_S, __pyx_v_rhs, __pyx_v_n_args, __pyx_v_literals, __pyx_v_coefficients);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_22assertPB_leq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_rhs, PyObject *__pyx_v_n_args, PyObject *__pyx_v_literals, PyObject *__pyx_v_coefficients) {
arrayobject *__pyx_v_a = 0;
arrayobject *__pyx_v_b = 0;
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;
void *__pyx_t_6;
int __pyx_t_7;
int __pyx_t_8;
__Pyx_RefNannySetupContext("assertPB_leq", 0);

/* "monosat/monosat_p.pyx":292
*     """Cython signature: void assertPB_leq(void* S, int rhs, int n_args, int* literals, int* coefficients)"""
*
*     assert isinstance(rhs, (int, long)), 'arg rhs wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(n_args, (int, long)), 'arg n_args wrong type'
*     assert isinstance(literals, (int, long)), 'arg literals wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_rhs);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_rhs);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_rhs_wrong_type);
 __PYX_ERR(0, 292, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":293
*
*     assert isinstance(rhs, (int, long)), 'arg rhs wrong type'
*     assert isinstance(n_args, (int, long)), 'arg n_args wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(literals, (int, long)), 'arg literals wrong type'
*     assert isinstance(coefficients, (int, long)), 'arg coefficients wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_n_args);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_n_args);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_n_args_wrong_type);
 __PYX_ERR(0, 293, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":294
*     assert isinstance(rhs, (int, long)), 'arg rhs wrong type'
*     assert isinstance(n_args, (int, long)), 'arg n_args wrong type'
*     assert isinstance(literals, (int, long)), 'arg literals wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(coefficients, (int, long)), 'arg coefficients wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_literals);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L7_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_literals);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_literals_wrong_type);
 __PYX_ERR(0, 294, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":295
*     assert isinstance(n_args, (int, long)), 'arg n_args wrong type'
*     assert isinstance(literals, (int, long)), 'arg literals wrong type'
*     assert isinstance(coefficients, (int, long)), 'arg coefficients wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_coefficients);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L9_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_coefficients);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L9_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_coefficients_wrong_type);
 __PYX_ERR(0, 295, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":298
*
*
*     cdef array.array a =  array.array('i', literals)             # <<<<<<<<<<<<<<
*     cdef array.array b =  array.array('i', coefficients)
*
*/
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 298, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_n_s_i);
__Pyx_GIVEREF(__pyx_n_s_i);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_i);
__Pyx_INCREF(__pyx_v_literals);
__Pyx_GIVEREF(__pyx_v_literals);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_literals);
__pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 298, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_a = ((arrayobject *)__pyx_t_5);
__pyx_t_5 = 0;

/* "monosat/monosat_p.pyx":299
*
*     cdef array.array a =  array.array('i', literals)
*     cdef array.array b =  array.array('i', coefficients)             # <<<<<<<<<<<<<<
*
*
*/
__pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 299, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_INCREF(__pyx_n_s_i);
__Pyx_GIVEREF(__pyx_n_s_i);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_i);
__Pyx_INCREF(__pyx_v_coefficients);
__Pyx_GIVEREF(__pyx_v_coefficients);
PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_coefficients);
__pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 299, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_v_b = ((arrayobject *)__pyx_t_4);
__pyx_t_4 = 0;

/* "monosat/monosat_p.pyx":303
*
*
*     _assertPB_leq_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>rhs), (<int>n_args),  (<int*>a.data.as_ints), (<int*>b.data.as_ints))             # <<<<<<<<<<<<<<
*
* def assertPB_lt( S ,  rhs ,  n_args ,  literals ,  coefficients ):
*/
__pyx_t_6 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_6 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 303, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_rhs); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 303, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_n_args); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 303, __pyx_L1_error)
assertPB_leq(((void *)__pyx_t_6), ((int)__pyx_t_7), ((int)__pyx_t_8), ((int *)__pyx_v_a->data.as_ints), ((int *)__pyx_v_b->data.as_ints));

/* "monosat/monosat_p.pyx":289
*     _assertPB_gt_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>rhs), (<int>n_args), (<int*>a.data.as_ints), (<int*>b.data.as_ints))
*
* def assertPB_leq( S ,  rhs ,  n_args ,  literals ,  coefficients ):             # <<<<<<<<<<<<<<
*     """Cython signature: void assertPB_leq(void* S, int rhs, int n_args, int* literals, int* coefficients)"""
*
*/

/* 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_AddTraceback("monosat.monosat_p.assertPB_leq", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_a);
__Pyx_XDECREF((PyObject *)__pyx_v_b);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":305
*     _assertPB_leq_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>rhs), (<int>n_args),  (<int*>a.data.as_ints), (<int*>b.data.as_ints))
*
* def assertPB_lt( S ,  rhs ,  n_args ,  literals ,  coefficients ):             # <<<<<<<<<<<<<<
*     """Cython signature: void assertPB_lt(void* S, int rhs, int n_args, int* literals, int* coefficients)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_25assertPB_lt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_24assertPB_lt[] = "Cython signature: void assertPB_lt(void* S, int rhs, int n_args, int* literals, int* coefficients)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_25assertPB_lt = {"assertPB_lt", (PyCFunction)__pyx_pw_7monosat_9monosat_p_25assertPB_lt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_24assertPB_lt};
static PyObject *__pyx_pw_7monosat_9monosat_p_25assertPB_lt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_rhs = 0;
PyObject *__pyx_v_n_args = 0;
PyObject *__pyx_v_literals = 0;
PyObject *__pyx_v_coefficients = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("assertPB_lt (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_rhs,&__pyx_n_s_n_args,&__pyx_n_s_literals,&__pyx_n_s_coefficients,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_S)) != 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_rhs)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("assertPB_lt", 1, 5, 5, 1); __PYX_ERR(0, 305, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n_args)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("assertPB_lt", 1, 5, 5, 2); __PYX_ERR(0, 305, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_literals)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("assertPB_lt", 1, 5, 5, 3); __PYX_ERR(0, 305, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_coefficients)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("assertPB_lt", 1, 5, 5, 4); __PYX_ERR(0, 305, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "assertPB_lt") < 0)) __PYX_ERR(0, 305, __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_S = values[0];
__pyx_v_rhs = values[1];
__pyx_v_n_args = values[2];
__pyx_v_literals = values[3];
__pyx_v_coefficients = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("assertPB_lt", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 305, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.assertPB_lt", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_24assertPB_lt(__pyx_self, __pyx_v_S, __pyx_v_rhs, __pyx_v_n_args, __pyx_v_literals, __pyx_v_coefficients);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_24assertPB_lt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_rhs, PyObject *__pyx_v_n_args, PyObject *__pyx_v_literals, PyObject *__pyx_v_coefficients) {
arrayobject *__pyx_v_a = 0;
arrayobject *__pyx_v_b = 0;
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;
void *__pyx_t_6;
int __pyx_t_7;
int __pyx_t_8;
__Pyx_RefNannySetupContext("assertPB_lt", 0);

/* "monosat/monosat_p.pyx":308
*     """Cython signature: void assertPB_lt(void* S, int rhs, int n_args, int* literals, int* coefficients)"""
*
*     assert isinstance(rhs, (int, long)), 'arg rhs wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(n_args, (int, long)), 'arg n_args wrong type'
*     assert isinstance(literals, (int, long)), 'arg literals wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_rhs);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_rhs);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_rhs_wrong_type);
 __PYX_ERR(0, 308, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":309
*
*     assert isinstance(rhs, (int, long)), 'arg rhs wrong type'
*     assert isinstance(n_args, (int, long)), 'arg n_args wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(literals, (int, long)), 'arg literals wrong type'
*     assert isinstance(coefficients, (int, long)), 'arg coefficients wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_n_args);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_n_args);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_n_args_wrong_type);
 __PYX_ERR(0, 309, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":310
*     assert isinstance(rhs, (int, long)), 'arg rhs wrong type'
*     assert isinstance(n_args, (int, long)), 'arg n_args wrong type'
*     assert isinstance(literals, (int, long)), 'arg literals wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(coefficients, (int, long)), 'arg coefficients wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_literals);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L7_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_literals);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_literals_wrong_type);
 __PYX_ERR(0, 310, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":311
*     assert isinstance(n_args, (int, long)), 'arg n_args wrong type'
*     assert isinstance(literals, (int, long)), 'arg literals wrong type'
*     assert isinstance(coefficients, (int, long)), 'arg coefficients wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_coefficients);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L9_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_coefficients);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L9_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_coefficients_wrong_type);
 __PYX_ERR(0, 311, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":314
*
*
*     cdef array.array a =  array.array('i', literals)             # <<<<<<<<<<<<<<
*     cdef array.array b =  array.array('i', coefficients)
*
*/
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 314, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_n_s_i);
__Pyx_GIVEREF(__pyx_n_s_i);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_i);
__Pyx_INCREF(__pyx_v_literals);
__Pyx_GIVEREF(__pyx_v_literals);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_literals);
__pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 314, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_a = ((arrayobject *)__pyx_t_5);
__pyx_t_5 = 0;

/* "monosat/monosat_p.pyx":315
*
*     cdef array.array a =  array.array('i', literals)
*     cdef array.array b =  array.array('i', coefficients)             # <<<<<<<<<<<<<<
*
*
*/
__pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 315, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_INCREF(__pyx_n_s_i);
__Pyx_GIVEREF(__pyx_n_s_i);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_i);
__Pyx_INCREF(__pyx_v_coefficients);
__Pyx_GIVEREF(__pyx_v_coefficients);
PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_coefficients);
__pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 315, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_v_b = ((arrayobject *)__pyx_t_4);
__pyx_t_4 = 0;

/* "monosat/monosat_p.pyx":319
*
*
*     _assertPB_lt_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>rhs), (<int>n_args), (<int*>a.data.as_ints), (<int*>b.data.as_ints))             # <<<<<<<<<<<<<<
*
* def at_most_one( S ,  vars ,  n_vars ):
*/
__pyx_t_6 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_6 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 319, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_rhs); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 319, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_n_args); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 319, __pyx_L1_error)
assertPB_lt(((void *)__pyx_t_6), ((int)__pyx_t_7), ((int)__pyx_t_8), ((int *)__pyx_v_a->data.as_ints), ((int *)__pyx_v_b->data.as_ints));

/* "monosat/monosat_p.pyx":305
*     _assertPB_leq_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>rhs), (<int>n_args),  (<int*>a.data.as_ints), (<int*>b.data.as_ints))
*
* def assertPB_lt( S ,  rhs ,  n_args ,  literals ,  coefficients ):             # <<<<<<<<<<<<<<
*     """Cython signature: void assertPB_lt(void* S, int rhs, int n_args, int* literals, int* coefficients)"""
*
*/

/* 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_AddTraceback("monosat.monosat_p.assertPB_lt", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_a);
__Pyx_XDECREF((PyObject *)__pyx_v_b);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":321
*     _assertPB_lt_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>rhs), (<int>n_args), (<int*>a.data.as_ints), (<int*>b.data.as_ints))
*
* def at_most_one( S ,  vars ,  n_vars ):             # <<<<<<<<<<<<<<
*     """Cython signature: void at_most_one(void* S, int* vars, int n_vars)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_27at_most_one(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_26at_most_one[] = "Cython signature: void at_most_one(void* S, int* vars, int n_vars)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_27at_most_one = {"at_most_one", (PyCFunction)__pyx_pw_7monosat_9monosat_p_27at_most_one, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_26at_most_one};
static PyObject *__pyx_pw_7monosat_9monosat_p_27at_most_one(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_vars = 0;
PyObject *__pyx_v_n_vars = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("at_most_one (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_vars,&__pyx_n_s_n_vars,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_S)) != 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_vars)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("at_most_one", 1, 3, 3, 1); __PYX_ERR(0, 321, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n_vars)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("at_most_one", 1, 3, 3, 2); __PYX_ERR(0, 321, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "at_most_one") < 0)) __PYX_ERR(0, 321, __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_S = values[0];
__pyx_v_vars = values[1];
__pyx_v_n_vars = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("at_most_one", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 321, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.at_most_one", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_26at_most_one(__pyx_self, __pyx_v_S, __pyx_v_vars, __pyx_v_n_vars);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_26at_most_one(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_vars, PyObject *__pyx_v_n_vars) {
arrayobject *__pyx_v_a = 0;
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;
void *__pyx_t_6;
int __pyx_t_7;
__Pyx_RefNannySetupContext("at_most_one", 0);

/* "monosat/monosat_p.pyx":324
*     """Cython signature: void at_most_one(void* S, int* vars, int n_vars)"""
*
*     assert isinstance(vars, list), 'arg vars wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(n_vars, (int, long)), 'arg n_vars wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_1 = PyList_Check(__pyx_v_vars);
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_vars_wrong_type);
 __PYX_ERR(0, 324, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":325
*
*     assert isinstance(vars, list), 'arg vars wrong type'
*     assert isinstance(n_vars, (int, long)), 'arg n_vars wrong type'             # <<<<<<<<<<<<<<
*
*     cdef array.array a =  array.array('i', vars)
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_n_vars);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_n_vars);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_n_vars_wrong_type);
 __PYX_ERR(0, 325, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":327
*     assert isinstance(n_vars, (int, long)), 'arg n_vars wrong type'
*
*     cdef array.array a =  array.array('i', vars)             # <<<<<<<<<<<<<<
*
*     _at_most_one_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)),  (<int*>a.data.as_ints), (<int>n_vars))
*/
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 327, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_n_s_i);
__Pyx_GIVEREF(__pyx_n_s_i);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_i);
__Pyx_INCREF(__pyx_v_vars);
__Pyx_GIVEREF(__pyx_v_vars);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_vars);
__pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 327, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_a = ((arrayobject *)__pyx_t_5);
__pyx_t_5 = 0;

/* "monosat/monosat_p.pyx":329
*     cdef array.array a =  array.array('i', vars)
*
*     _at_most_one_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)),  (<int*>a.data.as_ints), (<int>n_vars))             # <<<<<<<<<<<<<<
*
* def backtrack( S ):
*/
__pyx_t_6 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_6 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 329, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_n_vars); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 329, __pyx_L1_error)
at_most_one(((void *)__pyx_t_6), ((int *)__pyx_v_a->data.as_ints), ((int)__pyx_t_7));

/* "monosat/monosat_p.pyx":321
*     _assertPB_lt_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>rhs), (<int>n_args), (<int*>a.data.as_ints), (<int*>b.data.as_ints))
*
* def at_most_one( S ,  vars ,  n_vars ):             # <<<<<<<<<<<<<<
*     """Cython signature: void at_most_one(void* S, int* vars, int n_vars)"""
*
*/

/* 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_AddTraceback("monosat.monosat_p.at_most_one", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_a);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":331
*     _at_most_one_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)),  (<int*>a.data.as_ints), (<int>n_vars))
*
* def backtrack( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: void backtrack(void* S)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_29backtrack(PyObject *__pyx_self, PyObject *__pyx_v_S); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_28backtrack[] = "Cython signature: void backtrack(void* S)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_29backtrack = {"backtrack", (PyCFunction)__pyx_pw_7monosat_9monosat_p_29backtrack, METH_O, __pyx_doc_7monosat_9monosat_p_28backtrack};
static PyObject *__pyx_pw_7monosat_9monosat_p_29backtrack(PyObject *__pyx_self, PyObject *__pyx_v_S) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("backtrack (wrapper)", 0);
__pyx_r = __pyx_pf_7monosat_9monosat_p_28backtrack(__pyx_self, ((PyObject *)__pyx_v_S));

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

static PyObject *__pyx_pf_7monosat_9monosat_p_28backtrack(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
void *__pyx_t_1;
__Pyx_RefNannySetupContext("backtrack", 0);

/* "monosat/monosat_p.pyx":335
*
*
*     _backtrack_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))             # <<<<<<<<<<<<<<
*
* def bv_addition( S ,  bv ,  bvID1 ,  bvID2 ,  resultID ):
*/
__pyx_t_1 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 335, __pyx_L1_error)
backtrack(((void *)__pyx_t_1));

/* "monosat/monosat_p.pyx":331
*     _at_most_one_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)),  (<int*>a.data.as_ints), (<int>n_vars))
*
* def backtrack( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: void backtrack(void* S)"""
*
*/

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

/* "monosat/monosat_p.pyx":337
*     _backtrack_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))
*
* def bv_addition( S ,  bv ,  bvID1 ,  bvID2 ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_addition(void* S, void* bv, int bvID1, int bvID2, int resultID)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_31bv_addition(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_30bv_addition[] = "Cython signature: void bv_addition(void* S, void* bv, int bvID1, int bvID2, int resultID)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_31bv_addition = {"bv_addition", (PyCFunction)__pyx_pw_7monosat_9monosat_p_31bv_addition, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_30bv_addition};
static PyObject *__pyx_pw_7monosat_9monosat_p_31bv_addition(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_bv = 0;
PyObject *__pyx_v_bvID1 = 0;
PyObject *__pyx_v_bvID2 = 0;
PyObject *__pyx_v_resultID = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("bv_addition (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_bv,&__pyx_n_s_bvID1,&__pyx_n_s_bvID2,&__pyx_n_s_resultID,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_S)) != 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_bv)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_addition", 1, 5, 5, 1); __PYX_ERR(0, 337, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvID1)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_addition", 1, 5, 5, 2); __PYX_ERR(0, 337, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvID2)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_addition", 1, 5, 5, 3); __PYX_ERR(0, 337, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_resultID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_addition", 1, 5, 5, 4); __PYX_ERR(0, 337, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "bv_addition") < 0)) __PYX_ERR(0, 337, __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_S = values[0];
__pyx_v_bv = values[1];
__pyx_v_bvID1 = values[2];
__pyx_v_bvID2 = values[3];
__pyx_v_resultID = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("bv_addition", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 337, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.bv_addition", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_30bv_addition(__pyx_self, __pyx_v_S, __pyx_v_bv, __pyx_v_bvID1, __pyx_v_bvID2, __pyx_v_resultID);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_30bv_addition(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvID1, PyObject *__pyx_v_bvID2, PyObject *__pyx_v_resultID) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
int __pyx_t_8;
__Pyx_RefNannySetupContext("bv_addition", 0);

/* "monosat/monosat_p.pyx":341
*
*
*     assert isinstance(bvID1, (int, long)), 'arg bvID1 wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(bvID2, (int, long)), 'arg bvID2 wrong type'
*     assert isinstance(resultID, (int, long)), 'arg resultID wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_bvID1);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_bvID1);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_bvID1_wrong_type);
 __PYX_ERR(0, 341, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":342
*
*     assert isinstance(bvID1, (int, long)), 'arg bvID1 wrong type'
*     assert isinstance(bvID2, (int, long)), 'arg bvID2 wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(resultID, (int, long)), 'arg resultID wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_bvID2);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_bvID2);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_bvID2_wrong_type);
 __PYX_ERR(0, 342, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":343
*     assert isinstance(bvID1, (int, long)), 'arg bvID1 wrong type'
*     assert isinstance(bvID2, (int, long)), 'arg bvID2 wrong type'
*     assert isinstance(resultID, (int, long)), 'arg resultID wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_resultID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L7_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_resultID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_resultID_wrong_type);
 __PYX_ERR(0, 343, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":349
*
*
*     _bv_addition_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID1), (<int>bvID2), (<int>resultID))             # <<<<<<<<<<<<<<
*
* def bv_and( S ,  bv ,  bvaID ,  bvbID ,  bvResultID ):
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 349, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_bv, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 349, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_bvID1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 349, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_bvID2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 349, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_resultID); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 349, __pyx_L1_error)
bv_addition(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7), ((int)__pyx_t_8));

/* "monosat/monosat_p.pyx":337
*     _backtrack_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))
*
* def bv_addition( S ,  bv ,  bvID1 ,  bvID2 ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_addition(void* S, void* bv, int bvID1, int bvID2, int resultID)"""
*
*/

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

/* "monosat/monosat_p.pyx":351
*     _bv_addition_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID1), (<int>bvID2), (<int>resultID))
*
* def bv_and( S ,  bv ,  bvaID ,  bvbID ,  bvResultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_and(void* S, void* bv, int bvaID, int bvbID, int bvResultID)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_33bv_and(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_32bv_and[] = "Cython signature: void bv_and(void* S, void* bv, int bvaID, int bvbID, int bvResultID)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_33bv_and = {"bv_and", (PyCFunction)__pyx_pw_7monosat_9monosat_p_33bv_and, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_32bv_and};
static PyObject *__pyx_pw_7monosat_9monosat_p_33bv_and(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_bv = 0;
PyObject *__pyx_v_bvaID = 0;
PyObject *__pyx_v_bvbID = 0;
PyObject *__pyx_v_bvResultID = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("bv_and (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_bv,&__pyx_n_s_bvaID,&__pyx_n_s_bvbID,&__pyx_n_s_bvResultID,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_S)) != 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_bv)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_and", 1, 5, 5, 1); __PYX_ERR(0, 351, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvaID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_and", 1, 5, 5, 2); __PYX_ERR(0, 351, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvbID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_and", 1, 5, 5, 3); __PYX_ERR(0, 351, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvResultID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_and", 1, 5, 5, 4); __PYX_ERR(0, 351, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "bv_and") < 0)) __PYX_ERR(0, 351, __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_S = values[0];
__pyx_v_bv = values[1];
__pyx_v_bvaID = values[2];
__pyx_v_bvbID = values[3];
__pyx_v_bvResultID = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("bv_and", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 351, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.bv_and", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_32bv_and(__pyx_self, __pyx_v_S, __pyx_v_bv, __pyx_v_bvaID, __pyx_v_bvbID, __pyx_v_bvResultID);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_32bv_and(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvaID, PyObject *__pyx_v_bvbID, PyObject *__pyx_v_bvResultID) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
int __pyx_t_8;
__Pyx_RefNannySetupContext("bv_and", 0);

/* "monosat/monosat_p.pyx":355
*
*
*     assert isinstance(bvaID, (int, long)), 'arg bvaID wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(bvbID, (int, long)), 'arg bvbID wrong type'
*     assert isinstance(bvResultID, (int, long)), 'arg bvResultID wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_bvaID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_bvaID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_bvaID_wrong_type);
 __PYX_ERR(0, 355, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":356
*
*     assert isinstance(bvaID, (int, long)), 'arg bvaID wrong type'
*     assert isinstance(bvbID, (int, long)), 'arg bvbID wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(bvResultID, (int, long)), 'arg bvResultID wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_bvbID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_bvbID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_bvbID_wrong_type);
 __PYX_ERR(0, 356, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":357
*     assert isinstance(bvaID, (int, long)), 'arg bvaID wrong type'
*     assert isinstance(bvbID, (int, long)), 'arg bvbID wrong type'
*     assert isinstance(bvResultID, (int, long)), 'arg bvResultID wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_bvResultID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L7_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_bvResultID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_bvResultID_wrong_type);
 __PYX_ERR(0, 357, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":363
*
*
*     _bv_and_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvaID), (<int>bvbID), (<int>bvResultID))             # <<<<<<<<<<<<<<
*
* def bv_bitblast( S ,  bv ,  bvID ):
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 363, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_bv, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 363, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_bvaID); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 363, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_bvbID); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 363, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_bvResultID); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 363, __pyx_L1_error)
bv_and(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7), ((int)__pyx_t_8));

/* "monosat/monosat_p.pyx":351
*     _bv_addition_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID1), (<int>bvID2), (<int>resultID))
*
* def bv_and( S ,  bv ,  bvaID ,  bvbID ,  bvResultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_and(void* S, void* bv, int bvaID, int bvbID, int bvResultID)"""
*
*/

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

/* "monosat/monosat_p.pyx":365
*     _bv_and_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvaID), (<int>bvbID), (<int>bvResultID))
*
* def bv_bitblast( S ,  bv ,  bvID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_bitblast(void* S, void* bv, int bvID)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_35bv_bitblast(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_34bv_bitblast[] = "Cython signature: void bv_bitblast(void* S, void* bv, int bvID)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_35bv_bitblast = {"bv_bitblast", (PyCFunction)__pyx_pw_7monosat_9monosat_p_35bv_bitblast, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_34bv_bitblast};
static PyObject *__pyx_pw_7monosat_9monosat_p_35bv_bitblast(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_bv = 0;
PyObject *__pyx_v_bvID = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("bv_bitblast (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_bv,&__pyx_n_s_bvID,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_S)) != 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_bv)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_bitblast", 1, 3, 3, 1); __PYX_ERR(0, 365, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_bitblast", 1, 3, 3, 2); __PYX_ERR(0, 365, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "bv_bitblast") < 0)) __PYX_ERR(0, 365, __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_S = values[0];
__pyx_v_bv = values[1];
__pyx_v_bvID = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("bv_bitblast", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 365, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.bv_bitblast", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_34bv_bitblast(__pyx_self, __pyx_v_S, __pyx_v_bv, __pyx_v_bvID);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_34bv_bitblast(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvID) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
void *__pyx_t_1;
void *__pyx_t_2;
int __pyx_t_3;
__Pyx_RefNannySetupContext("bv_bitblast", 0);

/* "monosat/monosat_p.pyx":373
*
*
*     _bv_bitblast_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID))             # <<<<<<<<<<<<<<
*
* def bv_concat( S ,  bv ,  aID ,  bID ,  resultID ):
*/
__pyx_t_1 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 373, __pyx_L1_error)
__pyx_t_2 = PyCapsule_GetPointer(__pyx_v_bv, NULL); if (unlikely(__pyx_t_2 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 373, __pyx_L1_error)
__pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_bvID); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 373, __pyx_L1_error)
bv_bitblast(((void *)__pyx_t_1), ((void *)__pyx_t_2), ((int)__pyx_t_3));

/* "monosat/monosat_p.pyx":365
*     _bv_and_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvaID), (<int>bvbID), (<int>bvResultID))
*
* def bv_bitblast( S ,  bv ,  bvID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_bitblast(void* S, void* bv, int bvID)"""
*
*/

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

/* "monosat/monosat_p.pyx":375
*     _bv_bitblast_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID))
*
* def bv_concat( S ,  bv ,  aID ,  bID ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_concat(void* S, void* bv, int aID, int bID, int resultID)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_37bv_concat(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_36bv_concat[] = "Cython signature: void bv_concat(void* S, void* bv, int aID, int bID, int resultID)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_37bv_concat = {"bv_concat", (PyCFunction)__pyx_pw_7monosat_9monosat_p_37bv_concat, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_36bv_concat};
static PyObject *__pyx_pw_7monosat_9monosat_p_37bv_concat(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_bv = 0;
PyObject *__pyx_v_aID = 0;
PyObject *__pyx_v_bID = 0;
PyObject *__pyx_v_resultID = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("bv_concat (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_bv,&__pyx_n_s_aID,&__pyx_n_s_bID,&__pyx_n_s_resultID,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_S)) != 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_bv)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_concat", 1, 5, 5, 1); __PYX_ERR(0, 375, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_aID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_concat", 1, 5, 5, 2); __PYX_ERR(0, 375, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_concat", 1, 5, 5, 3); __PYX_ERR(0, 375, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_resultID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_concat", 1, 5, 5, 4); __PYX_ERR(0, 375, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "bv_concat") < 0)) __PYX_ERR(0, 375, __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_S = values[0];
__pyx_v_bv = values[1];
__pyx_v_aID = values[2];
__pyx_v_bID = values[3];
__pyx_v_resultID = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("bv_concat", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 375, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.bv_concat", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_36bv_concat(__pyx_self, __pyx_v_S, __pyx_v_bv, __pyx_v_aID, __pyx_v_bID, __pyx_v_resultID);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_36bv_concat(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_aID, PyObject *__pyx_v_bID, PyObject *__pyx_v_resultID) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
int __pyx_t_8;
__Pyx_RefNannySetupContext("bv_concat", 0);

/* "monosat/monosat_p.pyx":379
*
*
*     assert isinstance(aID, (int, long)), 'arg aID wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(bID, (int, long)), 'arg bID wrong type'
*     assert isinstance(resultID, (int, long)), 'arg resultID wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_aID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_aID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_aID_wrong_type);
 __PYX_ERR(0, 379, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":380
*
*     assert isinstance(aID, (int, long)), 'arg aID wrong type'
*     assert isinstance(bID, (int, long)), 'arg bID wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(resultID, (int, long)), 'arg resultID wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_bID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_bID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_bID_wrong_type);
 __PYX_ERR(0, 380, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":381
*     assert isinstance(aID, (int, long)), 'arg aID wrong type'
*     assert isinstance(bID, (int, long)), 'arg bID wrong type'
*     assert isinstance(resultID, (int, long)), 'arg resultID wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_resultID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L7_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_resultID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_resultID_wrong_type);
 __PYX_ERR(0, 381, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":387
*
*
*     _bv_concat_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>aID), (<int>bID), (<int>resultID))             # <<<<<<<<<<<<<<
*
* def bv_divide( S ,  bv ,  bvID1 ,  bvID2 ,  resultID ):
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 387, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_bv, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 387, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_aID); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 387, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_bID); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 387, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_resultID); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 387, __pyx_L1_error)
bv_concat(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7), ((int)__pyx_t_8));

/* "monosat/monosat_p.pyx":375
*     _bv_bitblast_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID))
*
* def bv_concat( S ,  bv ,  aID ,  bID ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_concat(void* S, void* bv, int aID, int bID, int resultID)"""
*
*/

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

/* "monosat/monosat_p.pyx":389
*     _bv_concat_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>aID), (<int>bID), (<int>resultID))
*
* def bv_divide( S ,  bv ,  bvID1 ,  bvID2 ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_divide(void* S, void* bv, int bvID1, int bvID2, int resultID)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_39bv_divide(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_38bv_divide[] = "Cython signature: void bv_divide(void* S, void* bv, int bvID1, int bvID2, int resultID)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_39bv_divide = {"bv_divide", (PyCFunction)__pyx_pw_7monosat_9monosat_p_39bv_divide, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_38bv_divide};
static PyObject *__pyx_pw_7monosat_9monosat_p_39bv_divide(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_bv = 0;
PyObject *__pyx_v_bvID1 = 0;
PyObject *__pyx_v_bvID2 = 0;
PyObject *__pyx_v_resultID = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("bv_divide (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_bv,&__pyx_n_s_bvID1,&__pyx_n_s_bvID2,&__pyx_n_s_resultID,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_S)) != 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_bv)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_divide", 1, 5, 5, 1); __PYX_ERR(0, 389, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvID1)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_divide", 1, 5, 5, 2); __PYX_ERR(0, 389, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvID2)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_divide", 1, 5, 5, 3); __PYX_ERR(0, 389, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_resultID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_divide", 1, 5, 5, 4); __PYX_ERR(0, 389, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "bv_divide") < 0)) __PYX_ERR(0, 389, __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_S = values[0];
__pyx_v_bv = values[1];
__pyx_v_bvID1 = values[2];
__pyx_v_bvID2 = values[3];
__pyx_v_resultID = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("bv_divide", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 389, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.bv_divide", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_38bv_divide(__pyx_self, __pyx_v_S, __pyx_v_bv, __pyx_v_bvID1, __pyx_v_bvID2, __pyx_v_resultID);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_38bv_divide(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvID1, PyObject *__pyx_v_bvID2, PyObject *__pyx_v_resultID) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
int __pyx_t_8;
__Pyx_RefNannySetupContext("bv_divide", 0);

/* "monosat/monosat_p.pyx":393
*
*
*     assert isinstance(bvID1, (int, long)), 'arg bvID1 wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(bvID2, (int, long)), 'arg bvID2 wrong type'
*     assert isinstance(resultID, (int, long)), 'arg resultID wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_bvID1);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_bvID1);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_bvID1_wrong_type);
 __PYX_ERR(0, 393, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":394
*
*     assert isinstance(bvID1, (int, long)), 'arg bvID1 wrong type'
*     assert isinstance(bvID2, (int, long)), 'arg bvID2 wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(resultID, (int, long)), 'arg resultID wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_bvID2);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_bvID2);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_bvID2_wrong_type);
 __PYX_ERR(0, 394, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":395
*     assert isinstance(bvID1, (int, long)), 'arg bvID1 wrong type'
*     assert isinstance(bvID2, (int, long)), 'arg bvID2 wrong type'
*     assert isinstance(resultID, (int, long)), 'arg resultID wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_resultID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L7_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_resultID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_resultID_wrong_type);
 __PYX_ERR(0, 395, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":401
*
*
*     _bv_divide_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID1), (<int>bvID2), (<int>resultID))             # <<<<<<<<<<<<<<
*
* def bv_ite( S ,  bv ,  condition_lit ,  bvThenID ,  bvElseID ,  bvResultID ):
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 401, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_bv, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 401, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_bvID1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 401, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_bvID2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 401, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_resultID); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 401, __pyx_L1_error)
bv_divide(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7), ((int)__pyx_t_8));

/* "monosat/monosat_p.pyx":389
*     _bv_concat_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>aID), (<int>bID), (<int>resultID))
*
* def bv_divide( S ,  bv ,  bvID1 ,  bvID2 ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_divide(void* S, void* bv, int bvID1, int bvID2, int resultID)"""
*
*/

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

/* "monosat/monosat_p.pyx":403
*     _bv_divide_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID1), (<int>bvID2), (<int>resultID))
*
* def bv_ite( S ,  bv ,  condition_lit ,  bvThenID ,  bvElseID ,  bvResultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_ite(void* S, void* bv, int condition_lit, int bvThenID, int bvElseID, int bvResultID)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_41bv_ite(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_40bv_ite[] = "Cython signature: void bv_ite(void* S, void* bv, int condition_lit, int bvThenID, int bvElseID, int bvResultID)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_41bv_ite = {"bv_ite", (PyCFunction)__pyx_pw_7monosat_9monosat_p_41bv_ite, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_40bv_ite};
static PyObject *__pyx_pw_7monosat_9monosat_p_41bv_ite(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_bv = 0;
PyObject *__pyx_v_condition_lit = 0;
PyObject *__pyx_v_bvThenID = 0;
PyObject *__pyx_v_bvElseID = 0;
PyObject *__pyx_v_bvResultID = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("bv_ite (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_bv,&__pyx_n_s_condition_lit,&__pyx_n_s_bvThenID,&__pyx_n_s_bvElseID,&__pyx_n_s_bvResultID,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_S)) != 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_bv)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_ite", 1, 6, 6, 1); __PYX_ERR(0, 403, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_condition_lit)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_ite", 1, 6, 6, 2); __PYX_ERR(0, 403, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvThenID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_ite", 1, 6, 6, 3); __PYX_ERR(0, 403, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvElseID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_ite", 1, 6, 6, 4); __PYX_ERR(0, 403, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  5:
   if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvResultID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_ite", 1, 6, 6, 5); __PYX_ERR(0, 403, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "bv_ite") < 0)) __PYX_ERR(0, 403, __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_S = values[0];
__pyx_v_bv = values[1];
__pyx_v_condition_lit = values[2];
__pyx_v_bvThenID = values[3];
__pyx_v_bvElseID = values[4];
__pyx_v_bvResultID = values[5];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("bv_ite", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 403, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.bv_ite", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_40bv_ite(__pyx_self, __pyx_v_S, __pyx_v_bv, __pyx_v_condition_lit, __pyx_v_bvThenID, __pyx_v_bvElseID, __pyx_v_bvResultID);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_40bv_ite(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_condition_lit, PyObject *__pyx_v_bvThenID, PyObject *__pyx_v_bvElseID, PyObject *__pyx_v_bvResultID) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
int __pyx_t_8;
int __pyx_t_9;
__Pyx_RefNannySetupContext("bv_ite", 0);

/* "monosat/monosat_p.pyx":407
*
*
*     assert isinstance(condition_lit, (int, long)), 'arg condition_lit wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(bvThenID, (int, long)), 'arg bvThenID wrong type'
*     assert isinstance(bvElseID, (int, long)), 'arg bvElseID wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_condition_lit);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_condition_lit);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_condition_lit_wrong_type);
 __PYX_ERR(0, 407, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":408
*
*     assert isinstance(condition_lit, (int, long)), 'arg condition_lit wrong type'
*     assert isinstance(bvThenID, (int, long)), 'arg bvThenID wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(bvElseID, (int, long)), 'arg bvElseID wrong type'
*     assert isinstance(bvResultID, (int, long)), 'arg bvResultID wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_bvThenID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_bvThenID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_bvThenID_wrong_type);
 __PYX_ERR(0, 408, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":409
*     assert isinstance(condition_lit, (int, long)), 'arg condition_lit wrong type'
*     assert isinstance(bvThenID, (int, long)), 'arg bvThenID wrong type'
*     assert isinstance(bvElseID, (int, long)), 'arg bvElseID wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(bvResultID, (int, long)), 'arg bvResultID wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_bvElseID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L7_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_bvElseID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_bvElseID_wrong_type);
 __PYX_ERR(0, 409, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":410
*     assert isinstance(bvThenID, (int, long)), 'arg bvThenID wrong type'
*     assert isinstance(bvElseID, (int, long)), 'arg bvElseID wrong type'
*     assert isinstance(bvResultID, (int, long)), 'arg bvResultID wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_bvResultID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L9_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_bvResultID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L9_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_bvResultID_wrong_type);
 __PYX_ERR(0, 410, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":417
*
*
*     _bv_ite_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>condition_lit), (<int>bvThenID), (<int>bvElseID), (<int>bvResultID))             # <<<<<<<<<<<<<<
*
* def bv_max( S ,  bv ,  args ,  n_args ,  resultID ):
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 417, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_bv, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 417, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_condition_lit); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 417, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_bvThenID); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 417, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_bvElseID); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 417, __pyx_L1_error)
__pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_bvResultID); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 417, __pyx_L1_error)
bv_ite(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7), ((int)__pyx_t_8), ((int)__pyx_t_9));

/* "monosat/monosat_p.pyx":403
*     _bv_divide_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID1), (<int>bvID2), (<int>resultID))
*
* def bv_ite( S ,  bv ,  condition_lit ,  bvThenID ,  bvElseID ,  bvResultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_ite(void* S, void* bv, int condition_lit, int bvThenID, int bvElseID, int bvResultID)"""
*
*/

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

/* "monosat/monosat_p.pyx":419
*     _bv_ite_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>condition_lit), (<int>bvThenID), (<int>bvElseID), (<int>bvResultID))
*
* def bv_max( S ,  bv ,  args ,  n_args ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_max(void* S, void* bv, int* args, int n_args, int resultID)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_43bv_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_42bv_max[] = "Cython signature: void bv_max(void* S, void* bv, int* args, int n_args, int resultID)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_43bv_max = {"bv_max", (PyCFunction)__pyx_pw_7monosat_9monosat_p_43bv_max, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_42bv_max};
static PyObject *__pyx_pw_7monosat_9monosat_p_43bv_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_bv = 0;
PyObject *__pyx_v_args = 0;
PyObject *__pyx_v_n_args = 0;
PyObject *__pyx_v_resultID = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("bv_max (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_bv,&__pyx_n_s_args,&__pyx_n_s_n_args,&__pyx_n_s_resultID,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_S)) != 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_bv)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_max", 1, 5, 5, 1); __PYX_ERR(0, 419, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_max", 1, 5, 5, 2); __PYX_ERR(0, 419, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n_args)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_max", 1, 5, 5, 3); __PYX_ERR(0, 419, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_resultID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_max", 1, 5, 5, 4); __PYX_ERR(0, 419, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "bv_max") < 0)) __PYX_ERR(0, 419, __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_S = values[0];
__pyx_v_bv = values[1];
__pyx_v_args = values[2];
__pyx_v_n_args = values[3];
__pyx_v_resultID = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("bv_max", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 419, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.bv_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_42bv_max(__pyx_self, __pyx_v_S, __pyx_v_bv, __pyx_v_args, __pyx_v_n_args, __pyx_v_resultID);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_42bv_max(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_args, PyObject *__pyx_v_n_args, PyObject *__pyx_v_resultID) {
arrayobject *__pyx_v_a = 0;
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;
void *__pyx_t_6;
void *__pyx_t_7;
int __pyx_t_8;
int __pyx_t_9;
__Pyx_RefNannySetupContext("bv_max", 0);

/* "monosat/monosat_p.pyx":423
*
*
*     assert isinstance(args, (int, long)), 'arg args wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(n_args, (int, long)), 'arg n_args wrong type'
*     assert isinstance(resultID, (int, long)), 'arg resultID wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_args);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_args);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_args_wrong_type);
 __PYX_ERR(0, 423, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":424
*
*     assert isinstance(args, (int, long)), 'arg args wrong type'
*     assert isinstance(n_args, (int, long)), 'arg n_args wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(resultID, (int, long)), 'arg resultID wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_n_args);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_n_args);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_n_args_wrong_type);
 __PYX_ERR(0, 424, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":425
*     assert isinstance(args, (int, long)), 'arg args wrong type'
*     assert isinstance(n_args, (int, long)), 'arg n_args wrong type'
*     assert isinstance(resultID, (int, long)), 'arg resultID wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_resultID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L7_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_resultID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_resultID_wrong_type);
 __PYX_ERR(0, 425, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":428
*
*
*     cdef array.array a =  array.array('i', args)             # <<<<<<<<<<<<<<
*
*
*/
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 428, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_n_s_i);
__Pyx_GIVEREF(__pyx_n_s_i);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_i);
__Pyx_INCREF(__pyx_v_args);
__Pyx_GIVEREF(__pyx_v_args);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_args);
__pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 428, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_a = ((arrayobject *)__pyx_t_5);
__pyx_t_5 = 0;

/* "monosat/monosat_p.pyx":431
*
*
*     _bv_max_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)),(<int*>a.data.as_ints), (<int>n_args), (<int>resultID))             # <<<<<<<<<<<<<<
*
* def bv_min( S ,  bv ,  args ,  n_args ,  resultID ):
*/
__pyx_t_6 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_6 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 431, __pyx_L1_error)
__pyx_t_7 = PyCapsule_GetPointer(__pyx_v_bv, NULL); if (unlikely(__pyx_t_7 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 431, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_n_args); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 431, __pyx_L1_error)
__pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_resultID); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 431, __pyx_L1_error)
bv_max(((void *)__pyx_t_6), ((void *)__pyx_t_7), ((int *)__pyx_v_a->data.as_ints), ((int)__pyx_t_8), ((int)__pyx_t_9));

/* "monosat/monosat_p.pyx":419
*     _bv_ite_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>condition_lit), (<int>bvThenID), (<int>bvElseID), (<int>bvResultID))
*
* def bv_max( S ,  bv ,  args ,  n_args ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_max(void* S, void* bv, int* args, int n_args, int resultID)"""
*
*/

/* 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_AddTraceback("monosat.monosat_p.bv_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_a);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":433
*     _bv_max_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)),(<int*>a.data.as_ints), (<int>n_args), (<int>resultID))
*
* def bv_min( S ,  bv ,  args ,  n_args ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_min(void* S, void* bv, int* args, int n_args, int resultID)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_45bv_min(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_44bv_min[] = "Cython signature: void bv_min(void* S, void* bv, int* args, int n_args, int resultID)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_45bv_min = {"bv_min", (PyCFunction)__pyx_pw_7monosat_9monosat_p_45bv_min, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_44bv_min};
static PyObject *__pyx_pw_7monosat_9monosat_p_45bv_min(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_bv = 0;
PyObject *__pyx_v_args = 0;
PyObject *__pyx_v_n_args = 0;
PyObject *__pyx_v_resultID = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("bv_min (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_bv,&__pyx_n_s_args,&__pyx_n_s_n_args,&__pyx_n_s_resultID,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_S)) != 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_bv)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_min", 1, 5, 5, 1); __PYX_ERR(0, 433, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_min", 1, 5, 5, 2); __PYX_ERR(0, 433, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n_args)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_min", 1, 5, 5, 3); __PYX_ERR(0, 433, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_resultID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_min", 1, 5, 5, 4); __PYX_ERR(0, 433, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "bv_min") < 0)) __PYX_ERR(0, 433, __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_S = values[0];
__pyx_v_bv = values[1];
__pyx_v_args = values[2];
__pyx_v_n_args = values[3];
__pyx_v_resultID = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("bv_min", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 433, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.bv_min", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_44bv_min(__pyx_self, __pyx_v_S, __pyx_v_bv, __pyx_v_args, __pyx_v_n_args, __pyx_v_resultID);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_44bv_min(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_args, PyObject *__pyx_v_n_args, PyObject *__pyx_v_resultID) {
arrayobject *__pyx_v_a = 0;
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;
void *__pyx_t_6;
void *__pyx_t_7;
int __pyx_t_8;
int __pyx_t_9;
__Pyx_RefNannySetupContext("bv_min", 0);

/* "monosat/monosat_p.pyx":437
*
*
*     assert isinstance(args, (int, long)), 'arg args wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(n_args, (int, long)), 'arg n_args wrong type'
*     assert isinstance(resultID, (int, long)), 'arg resultID wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_args);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_args);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_args_wrong_type);
 __PYX_ERR(0, 437, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":438
*
*     assert isinstance(args, (int, long)), 'arg args wrong type'
*     assert isinstance(n_args, (int, long)), 'arg n_args wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(resultID, (int, long)), 'arg resultID wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_n_args);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_n_args);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_n_args_wrong_type);
 __PYX_ERR(0, 438, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":439
*     assert isinstance(args, (int, long)), 'arg args wrong type'
*     assert isinstance(n_args, (int, long)), 'arg n_args wrong type'
*     assert isinstance(resultID, (int, long)), 'arg resultID wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_resultID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L7_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_resultID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_resultID_wrong_type);
 __PYX_ERR(0, 439, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":442
*
*
*     cdef array.array a =  array.array('i', args)             # <<<<<<<<<<<<<<
*
*
*/
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 442, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_n_s_i);
__Pyx_GIVEREF(__pyx_n_s_i);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_i);
__Pyx_INCREF(__pyx_v_args);
__Pyx_GIVEREF(__pyx_v_args);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_args);
__pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 442, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_a = ((arrayobject *)__pyx_t_5);
__pyx_t_5 = 0;

/* "monosat/monosat_p.pyx":445
*
*
*     _bv_min_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int*>a.data.as_ints), (<int>n_args), (<int>resultID))             # <<<<<<<<<<<<<<
*
* def bv_multiply( S ,  bv ,  bvID1 ,  bvID2 ,  resultID ):
*/
__pyx_t_6 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_6 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 445, __pyx_L1_error)
__pyx_t_7 = PyCapsule_GetPointer(__pyx_v_bv, NULL); if (unlikely(__pyx_t_7 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 445, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_n_args); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 445, __pyx_L1_error)
__pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_resultID); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 445, __pyx_L1_error)
bv_min(((void *)__pyx_t_6), ((void *)__pyx_t_7), ((int *)__pyx_v_a->data.as_ints), ((int)__pyx_t_8), ((int)__pyx_t_9));

/* "monosat/monosat_p.pyx":433
*     _bv_max_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)),(<int*>a.data.as_ints), (<int>n_args), (<int>resultID))
*
* def bv_min( S ,  bv ,  args ,  n_args ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_min(void* S, void* bv, int* args, int n_args, int resultID)"""
*
*/

/* 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_AddTraceback("monosat.monosat_p.bv_min", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_a);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":447
*     _bv_min_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int*>a.data.as_ints), (<int>n_args), (<int>resultID))
*
* def bv_multiply( S ,  bv ,  bvID1 ,  bvID2 ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_multiply(void* S, void* bv, int bvID1, int bvID2, int resultID)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_47bv_multiply(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_46bv_multiply[] = "Cython signature: void bv_multiply(void* S, void* bv, int bvID1, int bvID2, int resultID)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_47bv_multiply = {"bv_multiply", (PyCFunction)__pyx_pw_7monosat_9monosat_p_47bv_multiply, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_46bv_multiply};
static PyObject *__pyx_pw_7monosat_9monosat_p_47bv_multiply(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_bv = 0;
PyObject *__pyx_v_bvID1 = 0;
PyObject *__pyx_v_bvID2 = 0;
PyObject *__pyx_v_resultID = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("bv_multiply (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_bv,&__pyx_n_s_bvID1,&__pyx_n_s_bvID2,&__pyx_n_s_resultID,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_S)) != 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_bv)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_multiply", 1, 5, 5, 1); __PYX_ERR(0, 447, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvID1)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_multiply", 1, 5, 5, 2); __PYX_ERR(0, 447, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvID2)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_multiply", 1, 5, 5, 3); __PYX_ERR(0, 447, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_resultID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_multiply", 1, 5, 5, 4); __PYX_ERR(0, 447, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "bv_multiply") < 0)) __PYX_ERR(0, 447, __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_S = values[0];
__pyx_v_bv = values[1];
__pyx_v_bvID1 = values[2];
__pyx_v_bvID2 = values[3];
__pyx_v_resultID = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("bv_multiply", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 447, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.bv_multiply", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_46bv_multiply(__pyx_self, __pyx_v_S, __pyx_v_bv, __pyx_v_bvID1, __pyx_v_bvID2, __pyx_v_resultID);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_46bv_multiply(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvID1, PyObject *__pyx_v_bvID2, PyObject *__pyx_v_resultID) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
int __pyx_t_8;
__Pyx_RefNannySetupContext("bv_multiply", 0);

/* "monosat/monosat_p.pyx":451
*
*
*     assert isinstance(bvID1, (int, long)), 'arg bvID1 wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(bvID2, (int, long)), 'arg bvID2 wrong type'
*     assert isinstance(resultID, (int, long)), 'arg resultID wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_bvID1);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_bvID1);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_bvID1_wrong_type);
 __PYX_ERR(0, 451, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":452
*
*     assert isinstance(bvID1, (int, long)), 'arg bvID1 wrong type'
*     assert isinstance(bvID2, (int, long)), 'arg bvID2 wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(resultID, (int, long)), 'arg resultID wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_bvID2);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_bvID2);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_bvID2_wrong_type);
 __PYX_ERR(0, 452, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":453
*     assert isinstance(bvID1, (int, long)), 'arg bvID1 wrong type'
*     assert isinstance(bvID2, (int, long)), 'arg bvID2 wrong type'
*     assert isinstance(resultID, (int, long)), 'arg resultID wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_resultID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L7_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_resultID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_resultID_wrong_type);
 __PYX_ERR(0, 453, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":459
*
*
*     _bv_multiply_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID1), (<int>bvID2), (<int>resultID))             # <<<<<<<<<<<<<<
*
* def bv_nand( S ,  bv ,  bvaID ,  bvbID ,  bvResultID ):
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 459, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_bv, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 459, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_bvID1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 459, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_bvID2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 459, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_resultID); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 459, __pyx_L1_error)
bv_multiply(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7), ((int)__pyx_t_8));

/* "monosat/monosat_p.pyx":447
*     _bv_min_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int*>a.data.as_ints), (<int>n_args), (<int>resultID))
*
* def bv_multiply( S ,  bv ,  bvID1 ,  bvID2 ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_multiply(void* S, void* bv, int bvID1, int bvID2, int resultID)"""
*
*/

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

/* "monosat/monosat_p.pyx":461
*     _bv_multiply_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID1), (<int>bvID2), (<int>resultID))
*
* def bv_nand( S ,  bv ,  bvaID ,  bvbID ,  bvResultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_nand(void* S, void* bv, int bvaID, int bvbID, int bvResultID)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_49bv_nand(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_48bv_nand[] = "Cython signature: void bv_nand(void* S, void* bv, int bvaID, int bvbID, int bvResultID)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_49bv_nand = {"bv_nand", (PyCFunction)__pyx_pw_7monosat_9monosat_p_49bv_nand, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_48bv_nand};
static PyObject *__pyx_pw_7monosat_9monosat_p_49bv_nand(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_bv = 0;
PyObject *__pyx_v_bvaID = 0;
PyObject *__pyx_v_bvbID = 0;
PyObject *__pyx_v_bvResultID = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("bv_nand (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_bv,&__pyx_n_s_bvaID,&__pyx_n_s_bvbID,&__pyx_n_s_bvResultID,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_S)) != 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_bv)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_nand", 1, 5, 5, 1); __PYX_ERR(0, 461, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvaID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_nand", 1, 5, 5, 2); __PYX_ERR(0, 461, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvbID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_nand", 1, 5, 5, 3); __PYX_ERR(0, 461, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvResultID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_nand", 1, 5, 5, 4); __PYX_ERR(0, 461, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "bv_nand") < 0)) __PYX_ERR(0, 461, __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_S = values[0];
__pyx_v_bv = values[1];
__pyx_v_bvaID = values[2];
__pyx_v_bvbID = values[3];
__pyx_v_bvResultID = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("bv_nand", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 461, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.bv_nand", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_48bv_nand(__pyx_self, __pyx_v_S, __pyx_v_bv, __pyx_v_bvaID, __pyx_v_bvbID, __pyx_v_bvResultID);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_48bv_nand(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvaID, PyObject *__pyx_v_bvbID, PyObject *__pyx_v_bvResultID) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
int __pyx_t_8;
__Pyx_RefNannySetupContext("bv_nand", 0);

/* "monosat/monosat_p.pyx":465
*
*
*     assert isinstance(bvaID, (int, long)), 'arg bvaID wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(bvbID, (int, long)), 'arg bvbID wrong type'
*     assert isinstance(bvResultID, (int, long)), 'arg bvResultID wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_bvaID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_bvaID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_bvaID_wrong_type);
 __PYX_ERR(0, 465, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":466
*
*     assert isinstance(bvaID, (int, long)), 'arg bvaID wrong type'
*     assert isinstance(bvbID, (int, long)), 'arg bvbID wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(bvResultID, (int, long)), 'arg bvResultID wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_bvbID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_bvbID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_bvbID_wrong_type);
 __PYX_ERR(0, 466, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":467
*     assert isinstance(bvaID, (int, long)), 'arg bvaID wrong type'
*     assert isinstance(bvbID, (int, long)), 'arg bvbID wrong type'
*     assert isinstance(bvResultID, (int, long)), 'arg bvResultID wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_bvResultID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L7_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_bvResultID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_bvResultID_wrong_type);
 __PYX_ERR(0, 467, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":473
*
*
*     _bv_nand_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvaID), (<int>bvbID), (<int>bvResultID))             # <<<<<<<<<<<<<<
*
* def bv_nor( S ,  bv ,  bvaID ,  bvbID ,  bvResultID ):
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 473, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_bv, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 473, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_bvaID); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 473, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_bvbID); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 473, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_bvResultID); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 473, __pyx_L1_error)
bv_nand(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7), ((int)__pyx_t_8));

/* "monosat/monosat_p.pyx":461
*     _bv_multiply_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID1), (<int>bvID2), (<int>resultID))
*
* def bv_nand( S ,  bv ,  bvaID ,  bvbID ,  bvResultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_nand(void* S, void* bv, int bvaID, int bvbID, int bvResultID)"""
*
*/

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

/* "monosat/monosat_p.pyx":475
*     _bv_nand_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvaID), (<int>bvbID), (<int>bvResultID))
*
* def bv_nor( S ,  bv ,  bvaID ,  bvbID ,  bvResultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_nor(void* S, void* bv, int bvaID, int bvbID, int bvResultID)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_51bv_nor(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_50bv_nor[] = "Cython signature: void bv_nor(void* S, void* bv, int bvaID, int bvbID, int bvResultID)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_51bv_nor = {"bv_nor", (PyCFunction)__pyx_pw_7monosat_9monosat_p_51bv_nor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_50bv_nor};
static PyObject *__pyx_pw_7monosat_9monosat_p_51bv_nor(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_bv = 0;
PyObject *__pyx_v_bvaID = 0;
PyObject *__pyx_v_bvbID = 0;
PyObject *__pyx_v_bvResultID = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("bv_nor (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_bv,&__pyx_n_s_bvaID,&__pyx_n_s_bvbID,&__pyx_n_s_bvResultID,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_S)) != 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_bv)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_nor", 1, 5, 5, 1); __PYX_ERR(0, 475, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvaID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_nor", 1, 5, 5, 2); __PYX_ERR(0, 475, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvbID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_nor", 1, 5, 5, 3); __PYX_ERR(0, 475, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvResultID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_nor", 1, 5, 5, 4); __PYX_ERR(0, 475, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "bv_nor") < 0)) __PYX_ERR(0, 475, __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_S = values[0];
__pyx_v_bv = values[1];
__pyx_v_bvaID = values[2];
__pyx_v_bvbID = values[3];
__pyx_v_bvResultID = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("bv_nor", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 475, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.bv_nor", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_50bv_nor(__pyx_self, __pyx_v_S, __pyx_v_bv, __pyx_v_bvaID, __pyx_v_bvbID, __pyx_v_bvResultID);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_50bv_nor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvaID, PyObject *__pyx_v_bvbID, PyObject *__pyx_v_bvResultID) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
int __pyx_t_8;
__Pyx_RefNannySetupContext("bv_nor", 0);

/* "monosat/monosat_p.pyx":479
*
*
*     assert isinstance(bvaID, (int, long)), 'arg bvaID wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(bvbID, (int, long)), 'arg bvbID wrong type'
*     assert isinstance(bvResultID, (int, long)), 'arg bvResultID wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_bvaID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_bvaID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_bvaID_wrong_type);
 __PYX_ERR(0, 479, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":480
*
*     assert isinstance(bvaID, (int, long)), 'arg bvaID wrong type'
*     assert isinstance(bvbID, (int, long)), 'arg bvbID wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(bvResultID, (int, long)), 'arg bvResultID wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_bvbID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_bvbID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_bvbID_wrong_type);
 __PYX_ERR(0, 480, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":481
*     assert isinstance(bvaID, (int, long)), 'arg bvaID wrong type'
*     assert isinstance(bvbID, (int, long)), 'arg bvbID wrong type'
*     assert isinstance(bvResultID, (int, long)), 'arg bvResultID wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_bvResultID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L7_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_bvResultID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_bvResultID_wrong_type);
 __PYX_ERR(0, 481, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":487
*
*
*     _bv_nor_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvaID), (<int>bvbID), (<int>bvResultID))             # <<<<<<<<<<<<<<
*
* def bv_not( S ,  bv ,  bvaID ,  bvResultID ):
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 487, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_bv, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 487, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_bvaID); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 487, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_bvbID); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 487, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_bvResultID); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 487, __pyx_L1_error)
bv_nor(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7), ((int)__pyx_t_8));

/* "monosat/monosat_p.pyx":475
*     _bv_nand_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvaID), (<int>bvbID), (<int>bvResultID))
*
* def bv_nor( S ,  bv ,  bvaID ,  bvbID ,  bvResultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_nor(void* S, void* bv, int bvaID, int bvbID, int bvResultID)"""
*
*/

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

/* "monosat/monosat_p.pyx":489
*     _bv_nor_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvaID), (<int>bvbID), (<int>bvResultID))
*
* def bv_not( S ,  bv ,  bvaID ,  bvResultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_not(void* S, void* bv, int bvaID, int bvResultID)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_53bv_not(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_52bv_not[] = "Cython signature: void bv_not(void* S, void* bv, int bvaID, int bvResultID)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_53bv_not = {"bv_not", (PyCFunction)__pyx_pw_7monosat_9monosat_p_53bv_not, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_52bv_not};
static PyObject *__pyx_pw_7monosat_9monosat_p_53bv_not(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_bv = 0;
PyObject *__pyx_v_bvaID = 0;
PyObject *__pyx_v_bvResultID = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("bv_not (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_bv,&__pyx_n_s_bvaID,&__pyx_n_s_bvResultID,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_S)) != 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_bv)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_not", 1, 4, 4, 1); __PYX_ERR(0, 489, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvaID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_not", 1, 4, 4, 2); __PYX_ERR(0, 489, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvResultID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_not", 1, 4, 4, 3); __PYX_ERR(0, 489, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "bv_not") < 0)) __PYX_ERR(0, 489, __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_S = values[0];
__pyx_v_bv = values[1];
__pyx_v_bvaID = values[2];
__pyx_v_bvResultID = values[3];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("bv_not", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 489, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.bv_not", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_52bv_not(__pyx_self, __pyx_v_S, __pyx_v_bv, __pyx_v_bvaID, __pyx_v_bvResultID);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_52bv_not(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvaID, PyObject *__pyx_v_bvResultID) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
__Pyx_RefNannySetupContext("bv_not", 0);

/* "monosat/monosat_p.pyx":493
*
*
*     assert isinstance(bvaID, (int, long)), 'arg bvaID wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(bvResultID, (int, long)), 'arg bvResultID wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_bvaID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_bvaID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_bvaID_wrong_type);
 __PYX_ERR(0, 493, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":494
*
*     assert isinstance(bvaID, (int, long)), 'arg bvaID wrong type'
*     assert isinstance(bvResultID, (int, long)), 'arg bvResultID wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_bvResultID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_bvResultID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_bvResultID_wrong_type);
 __PYX_ERR(0, 494, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":499
*
*
*     _bv_not_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvaID), (<int>bvResultID))             # <<<<<<<<<<<<<<
*
* def bv_or( S ,  bv ,  bvaID ,  bvbID ,  bvResultID ):
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 499, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_bv, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 499, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_bvaID); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 499, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_bvResultID); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 499, __pyx_L1_error)
bv_not(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7));

/* "monosat/monosat_p.pyx":489
*     _bv_nor_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvaID), (<int>bvbID), (<int>bvResultID))
*
* def bv_not( S ,  bv ,  bvaID ,  bvResultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_not(void* S, void* bv, int bvaID, int bvResultID)"""
*
*/

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

/* "monosat/monosat_p.pyx":501
*     _bv_not_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvaID), (<int>bvResultID))
*
* def bv_or( S ,  bv ,  bvaID ,  bvbID ,  bvResultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_or(void* S, void* bv, int bvaID, int bvbID, int bvResultID)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_55bv_or(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_54bv_or[] = "Cython signature: void bv_or(void* S, void* bv, int bvaID, int bvbID, int bvResultID)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_55bv_or = {"bv_or", (PyCFunction)__pyx_pw_7monosat_9monosat_p_55bv_or, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_54bv_or};
static PyObject *__pyx_pw_7monosat_9monosat_p_55bv_or(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_bv = 0;
PyObject *__pyx_v_bvaID = 0;
PyObject *__pyx_v_bvbID = 0;
PyObject *__pyx_v_bvResultID = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("bv_or (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_bv,&__pyx_n_s_bvaID,&__pyx_n_s_bvbID,&__pyx_n_s_bvResultID,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_S)) != 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_bv)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_or", 1, 5, 5, 1); __PYX_ERR(0, 501, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvaID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_or", 1, 5, 5, 2); __PYX_ERR(0, 501, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvbID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_or", 1, 5, 5, 3); __PYX_ERR(0, 501, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvResultID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_or", 1, 5, 5, 4); __PYX_ERR(0, 501, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "bv_or") < 0)) __PYX_ERR(0, 501, __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_S = values[0];
__pyx_v_bv = values[1];
__pyx_v_bvaID = values[2];
__pyx_v_bvbID = values[3];
__pyx_v_bvResultID = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("bv_or", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 501, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.bv_or", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_54bv_or(__pyx_self, __pyx_v_S, __pyx_v_bv, __pyx_v_bvaID, __pyx_v_bvbID, __pyx_v_bvResultID);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_54bv_or(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvaID, PyObject *__pyx_v_bvbID, PyObject *__pyx_v_bvResultID) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
int __pyx_t_8;
__Pyx_RefNannySetupContext("bv_or", 0);

/* "monosat/monosat_p.pyx":505
*
*
*     assert isinstance(bvaID, (int, long)), 'arg bvaID wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(bvbID, (int, long)), 'arg bvbID wrong type'
*     assert isinstance(bvResultID, (int, long)), 'arg bvResultID wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_bvaID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_bvaID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_bvaID_wrong_type);
 __PYX_ERR(0, 505, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":506
*
*     assert isinstance(bvaID, (int, long)), 'arg bvaID wrong type'
*     assert isinstance(bvbID, (int, long)), 'arg bvbID wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(bvResultID, (int, long)), 'arg bvResultID wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_bvbID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_bvbID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_bvbID_wrong_type);
 __PYX_ERR(0, 506, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":507
*     assert isinstance(bvaID, (int, long)), 'arg bvaID wrong type'
*     assert isinstance(bvbID, (int, long)), 'arg bvbID wrong type'
*     assert isinstance(bvResultID, (int, long)), 'arg bvResultID wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_bvResultID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L7_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_bvResultID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_bvResultID_wrong_type);
 __PYX_ERR(0, 507, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":513
*
*
*     _bv_or_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvaID), (<int>bvbID), (<int>bvResultID))             # <<<<<<<<<<<<<<
*
* def bv_popcount( S ,  bv ,  args ,  n_args ,  resultID ):
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 513, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_bv, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 513, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_bvaID); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 513, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_bvbID); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 513, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_bvResultID); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 513, __pyx_L1_error)
bv_or(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7), ((int)__pyx_t_8));

/* "monosat/monosat_p.pyx":501
*     _bv_not_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvaID), (<int>bvResultID))
*
* def bv_or( S ,  bv ,  bvaID ,  bvbID ,  bvResultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_or(void* S, void* bv, int bvaID, int bvbID, int bvResultID)"""
*
*/

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

/* "monosat/monosat_p.pyx":515
*     _bv_or_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvaID), (<int>bvbID), (<int>bvResultID))
*
* def bv_popcount( S ,  bv ,  args ,  n_args ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_popcount(void* S, void* bv, int* args, int n_args, int resultID)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_57bv_popcount(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_56bv_popcount[] = "Cython signature: void bv_popcount(void* S, void* bv, int* args, int n_args, int resultID)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_57bv_popcount = {"bv_popcount", (PyCFunction)__pyx_pw_7monosat_9monosat_p_57bv_popcount, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_56bv_popcount};
static PyObject *__pyx_pw_7monosat_9monosat_p_57bv_popcount(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_bv = 0;
PyObject *__pyx_v_args = 0;
PyObject *__pyx_v_n_args = 0;
PyObject *__pyx_v_resultID = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("bv_popcount (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_bv,&__pyx_n_s_args,&__pyx_n_s_n_args,&__pyx_n_s_resultID,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_S)) != 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_bv)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_popcount", 1, 5, 5, 1); __PYX_ERR(0, 515, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_popcount", 1, 5, 5, 2); __PYX_ERR(0, 515, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n_args)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_popcount", 1, 5, 5, 3); __PYX_ERR(0, 515, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_resultID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_popcount", 1, 5, 5, 4); __PYX_ERR(0, 515, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "bv_popcount") < 0)) __PYX_ERR(0, 515, __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_S = values[0];
__pyx_v_bv = values[1];
__pyx_v_args = values[2];
__pyx_v_n_args = values[3];
__pyx_v_resultID = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("bv_popcount", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 515, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.bv_popcount", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_56bv_popcount(__pyx_self, __pyx_v_S, __pyx_v_bv, __pyx_v_args, __pyx_v_n_args, __pyx_v_resultID);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_56bv_popcount(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_args, PyObject *__pyx_v_n_args, PyObject *__pyx_v_resultID) {
arrayobject *__pyx_v_a = 0;
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;
void *__pyx_t_6;
void *__pyx_t_7;
int __pyx_t_8;
int __pyx_t_9;
__Pyx_RefNannySetupContext("bv_popcount", 0);

/* "monosat/monosat_p.pyx":519
*
*
*     assert isinstance(args, (int, long)), 'arg args wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(n_args, (int, long)), 'arg n_args wrong type'
*     assert isinstance(resultID, (int, long)), 'arg resultID wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_args);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_args);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_args_wrong_type);
 __PYX_ERR(0, 519, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":520
*
*     assert isinstance(args, (int, long)), 'arg args wrong type'
*     assert isinstance(n_args, (int, long)), 'arg n_args wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(resultID, (int, long)), 'arg resultID wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_n_args);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_n_args);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_n_args_wrong_type);
 __PYX_ERR(0, 520, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":521
*     assert isinstance(args, (int, long)), 'arg args wrong type'
*     assert isinstance(n_args, (int, long)), 'arg n_args wrong type'
*     assert isinstance(resultID, (int, long)), 'arg resultID wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_resultID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L7_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_resultID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_resultID_wrong_type);
 __PYX_ERR(0, 521, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":524
*
*
*     cdef array.array a =  array.array('i', args)             # <<<<<<<<<<<<<<
*
*
*/
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 524, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_n_s_i);
__Pyx_GIVEREF(__pyx_n_s_i);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_i);
__Pyx_INCREF(__pyx_v_args);
__Pyx_GIVEREF(__pyx_v_args);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_args);
__pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 524, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_a = ((arrayobject *)__pyx_t_5);
__pyx_t_5 = 0;

/* "monosat/monosat_p.pyx":527
*
*
*     _bv_popcount_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)),(<int*>a.data.as_ints), (<int>n_args), (<int>resultID))             # <<<<<<<<<<<<<<
*
* def bv_slice( S ,  bv ,  aID ,  lower ,  upper ,  resultID ):
*/
__pyx_t_6 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_6 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 527, __pyx_L1_error)
__pyx_t_7 = PyCapsule_GetPointer(__pyx_v_bv, NULL); if (unlikely(__pyx_t_7 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 527, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_n_args); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 527, __pyx_L1_error)
__pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_resultID); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 527, __pyx_L1_error)
bv_popcount(((void *)__pyx_t_6), ((void *)__pyx_t_7), ((int *)__pyx_v_a->data.as_ints), ((int)__pyx_t_8), ((int)__pyx_t_9));

/* "monosat/monosat_p.pyx":515
*     _bv_or_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvaID), (<int>bvbID), (<int>bvResultID))
*
* def bv_popcount( S ,  bv ,  args ,  n_args ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_popcount(void* S, void* bv, int* args, int n_args, int resultID)"""
*
*/

/* 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_AddTraceback("monosat.monosat_p.bv_popcount", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_a);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":529
*     _bv_popcount_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)),(<int*>a.data.as_ints), (<int>n_args), (<int>resultID))
*
* def bv_slice( S ,  bv ,  aID ,  lower ,  upper ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_slice(void* S, void* bv, int aID, int lower, int upper, int resultID)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_59bv_slice(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_58bv_slice[] = "Cython signature: void bv_slice(void* S, void* bv, int aID, int lower, int upper, int resultID)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_59bv_slice = {"bv_slice", (PyCFunction)__pyx_pw_7monosat_9monosat_p_59bv_slice, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_58bv_slice};
static PyObject *__pyx_pw_7monosat_9monosat_p_59bv_slice(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_bv = 0;
PyObject *__pyx_v_aID = 0;
PyObject *__pyx_v_lower = 0;
PyObject *__pyx_v_upper = 0;
PyObject *__pyx_v_resultID = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("bv_slice (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_bv,&__pyx_n_s_aID,&__pyx_n_s_lower,&__pyx_n_s_upper,&__pyx_n_s_resultID,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_S)) != 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_bv)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_slice", 1, 6, 6, 1); __PYX_ERR(0, 529, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_aID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_slice", 1, 6, 6, 2); __PYX_ERR(0, 529, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lower)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_slice", 1, 6, 6, 3); __PYX_ERR(0, 529, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_upper)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_slice", 1, 6, 6, 4); __PYX_ERR(0, 529, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  5:
   if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_resultID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_slice", 1, 6, 6, 5); __PYX_ERR(0, 529, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "bv_slice") < 0)) __PYX_ERR(0, 529, __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_S = values[0];
__pyx_v_bv = values[1];
__pyx_v_aID = values[2];
__pyx_v_lower = values[3];
__pyx_v_upper = values[4];
__pyx_v_resultID = values[5];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("bv_slice", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 529, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.bv_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_58bv_slice(__pyx_self, __pyx_v_S, __pyx_v_bv, __pyx_v_aID, __pyx_v_lower, __pyx_v_upper, __pyx_v_resultID);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_58bv_slice(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_aID, PyObject *__pyx_v_lower, PyObject *__pyx_v_upper, PyObject *__pyx_v_resultID) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
int __pyx_t_8;
int __pyx_t_9;
__Pyx_RefNannySetupContext("bv_slice", 0);

/* "monosat/monosat_p.pyx":533
*
*
*     assert isinstance(aID, (int, long)), 'arg aID wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(lower, (int, long)), 'arg lower wrong type'
*     assert isinstance(upper, (int, long)), 'arg upper wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_aID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_aID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_aID_wrong_type);
 __PYX_ERR(0, 533, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":534
*
*     assert isinstance(aID, (int, long)), 'arg aID wrong type'
*     assert isinstance(lower, (int, long)), 'arg lower wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(upper, (int, long)), 'arg upper wrong type'
*     assert isinstance(resultID, (int, long)), 'arg resultID wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_lower);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_lower);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_lower_wrong_type);
 __PYX_ERR(0, 534, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":535
*     assert isinstance(aID, (int, long)), 'arg aID wrong type'
*     assert isinstance(lower, (int, long)), 'arg lower wrong type'
*     assert isinstance(upper, (int, long)), 'arg upper wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(resultID, (int, long)), 'arg resultID wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_upper);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L7_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_upper);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_upper_wrong_type);
 __PYX_ERR(0, 535, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":536
*     assert isinstance(lower, (int, long)), 'arg lower wrong type'
*     assert isinstance(upper, (int, long)), 'arg upper wrong type'
*     assert isinstance(resultID, (int, long)), 'arg resultID wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_resultID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L9_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_resultID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L9_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_resultID_wrong_type);
 __PYX_ERR(0, 536, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":543
*
*
*     _bv_slice_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>aID), (<int>lower), (<int>upper), (<int>resultID))             # <<<<<<<<<<<<<<
*
* def bv_subtraction( S ,  bv ,  bvID1 ,  bvID2 ,  resultID ):
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 543, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_bv, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 543, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_aID); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 543, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_lower); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 543, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_upper); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 543, __pyx_L1_error)
__pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_resultID); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 543, __pyx_L1_error)
bv_slice(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7), ((int)__pyx_t_8), ((int)__pyx_t_9));

/* "monosat/monosat_p.pyx":529
*     _bv_popcount_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)),(<int*>a.data.as_ints), (<int>n_args), (<int>resultID))
*
* def bv_slice( S ,  bv ,  aID ,  lower ,  upper ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_slice(void* S, void* bv, int aID, int lower, int upper, int resultID)"""
*
*/

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

/* "monosat/monosat_p.pyx":545
*     _bv_slice_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>aID), (<int>lower), (<int>upper), (<int>resultID))
*
* def bv_subtraction( S ,  bv ,  bvID1 ,  bvID2 ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_subtraction(void* S, void* bv, int bvID1, int bvID2, int resultID)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_61bv_subtraction(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_60bv_subtraction[] = "Cython signature: void bv_subtraction(void* S, void* bv, int bvID1, int bvID2, int resultID)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_61bv_subtraction = {"bv_subtraction", (PyCFunction)__pyx_pw_7monosat_9monosat_p_61bv_subtraction, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_60bv_subtraction};
static PyObject *__pyx_pw_7monosat_9monosat_p_61bv_subtraction(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_bv = 0;
PyObject *__pyx_v_bvID1 = 0;
PyObject *__pyx_v_bvID2 = 0;
PyObject *__pyx_v_resultID = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("bv_subtraction (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_bv,&__pyx_n_s_bvID1,&__pyx_n_s_bvID2,&__pyx_n_s_resultID,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_S)) != 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_bv)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_subtraction", 1, 5, 5, 1); __PYX_ERR(0, 545, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvID1)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_subtraction", 1, 5, 5, 2); __PYX_ERR(0, 545, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvID2)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_subtraction", 1, 5, 5, 3); __PYX_ERR(0, 545, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_resultID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_subtraction", 1, 5, 5, 4); __PYX_ERR(0, 545, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "bv_subtraction") < 0)) __PYX_ERR(0, 545, __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_S = values[0];
__pyx_v_bv = values[1];
__pyx_v_bvID1 = values[2];
__pyx_v_bvID2 = values[3];
__pyx_v_resultID = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("bv_subtraction", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 545, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.bv_subtraction", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_60bv_subtraction(__pyx_self, __pyx_v_S, __pyx_v_bv, __pyx_v_bvID1, __pyx_v_bvID2, __pyx_v_resultID);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_60bv_subtraction(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvID1, PyObject *__pyx_v_bvID2, PyObject *__pyx_v_resultID) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
int __pyx_t_8;
__Pyx_RefNannySetupContext("bv_subtraction", 0);

/* "monosat/monosat_p.pyx":549
*
*
*     assert isinstance(bvID1, (int, long)), 'arg bvID1 wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(bvID2, (int, long)), 'arg bvID2 wrong type'
*     assert isinstance(resultID, (int, long)), 'arg resultID wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_bvID1);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_bvID1);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_bvID1_wrong_type);
 __PYX_ERR(0, 549, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":550
*
*     assert isinstance(bvID1, (int, long)), 'arg bvID1 wrong type'
*     assert isinstance(bvID2, (int, long)), 'arg bvID2 wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(resultID, (int, long)), 'arg resultID wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_bvID2);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_bvID2);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_bvID2_wrong_type);
 __PYX_ERR(0, 550, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":551
*     assert isinstance(bvID1, (int, long)), 'arg bvID1 wrong type'
*     assert isinstance(bvID2, (int, long)), 'arg bvID2 wrong type'
*     assert isinstance(resultID, (int, long)), 'arg resultID wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_resultID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L7_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_resultID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_resultID_wrong_type);
 __PYX_ERR(0, 551, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":557
*
*
*     _bv_subtraction_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID1), (<int>bvID2), (<int>resultID))             # <<<<<<<<<<<<<<
*
* def bv_unary( S ,  bv ,  args ,  n_args ,  resultID ):
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 557, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_bv, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 557, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_bvID1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 557, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_bvID2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 557, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_resultID); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 557, __pyx_L1_error)
bv_subtraction(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7), ((int)__pyx_t_8));

/* "monosat/monosat_p.pyx":545
*     _bv_slice_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>aID), (<int>lower), (<int>upper), (<int>resultID))
*
* def bv_subtraction( S ,  bv ,  bvID1 ,  bvID2 ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_subtraction(void* S, void* bv, int bvID1, int bvID2, int resultID)"""
*
*/

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

/* "monosat/monosat_p.pyx":559
*     _bv_subtraction_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID1), (<int>bvID2), (<int>resultID))
*
* def bv_unary( S ,  bv ,  args ,  n_args ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_unary(void* S, void* bv, int* args, int n_args, int resultID)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_63bv_unary(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_62bv_unary[] = "Cython signature: void bv_unary(void* S, void* bv, int* args, int n_args, int resultID)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_63bv_unary = {"bv_unary", (PyCFunction)__pyx_pw_7monosat_9monosat_p_63bv_unary, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_62bv_unary};
static PyObject *__pyx_pw_7monosat_9monosat_p_63bv_unary(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_bv = 0;
PyObject *__pyx_v_args = 0;
PyObject *__pyx_v_n_args = 0;
PyObject *__pyx_v_resultID = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("bv_unary (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_bv,&__pyx_n_s_args,&__pyx_n_s_n_args,&__pyx_n_s_resultID,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_S)) != 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_bv)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_unary", 1, 5, 5, 1); __PYX_ERR(0, 559, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_unary", 1, 5, 5, 2); __PYX_ERR(0, 559, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n_args)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_unary", 1, 5, 5, 3); __PYX_ERR(0, 559, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_resultID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_unary", 1, 5, 5, 4); __PYX_ERR(0, 559, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "bv_unary") < 0)) __PYX_ERR(0, 559, __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_S = values[0];
__pyx_v_bv = values[1];
__pyx_v_args = values[2];
__pyx_v_n_args = values[3];
__pyx_v_resultID = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("bv_unary", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 559, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.bv_unary", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_62bv_unary(__pyx_self, __pyx_v_S, __pyx_v_bv, __pyx_v_args, __pyx_v_n_args, __pyx_v_resultID);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_62bv_unary(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_args, PyObject *__pyx_v_n_args, PyObject *__pyx_v_resultID) {
arrayobject *__pyx_v_a = 0;
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;
void *__pyx_t_6;
void *__pyx_t_7;
int __pyx_t_8;
int __pyx_t_9;
__Pyx_RefNannySetupContext("bv_unary", 0);

/* "monosat/monosat_p.pyx":563
*
*
*     assert isinstance(args, (int, long)), 'arg args wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(n_args, (int, long)), 'arg n_args wrong type'
*     assert isinstance(resultID, (int, long)), 'arg resultID wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_args);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_args);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_args_wrong_type);
 __PYX_ERR(0, 563, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":564
*
*     assert isinstance(args, (int, long)), 'arg args wrong type'
*     assert isinstance(n_args, (int, long)), 'arg n_args wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(resultID, (int, long)), 'arg resultID wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_n_args);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_n_args);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_n_args_wrong_type);
 __PYX_ERR(0, 564, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":565
*     assert isinstance(args, (int, long)), 'arg args wrong type'
*     assert isinstance(n_args, (int, long)), 'arg n_args wrong type'
*     assert isinstance(resultID, (int, long)), 'arg resultID wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_resultID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L7_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_resultID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_resultID_wrong_type);
 __PYX_ERR(0, 565, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":568
*
*
*     cdef array.array a =  array.array('i', args)             # <<<<<<<<<<<<<<
*
*
*/
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 568, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_n_s_i);
__Pyx_GIVEREF(__pyx_n_s_i);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_i);
__Pyx_INCREF(__pyx_v_args);
__Pyx_GIVEREF(__pyx_v_args);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_args);
__pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 568, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_a = ((arrayobject *)__pyx_t_5);
__pyx_t_5 = 0;

/* "monosat/monosat_p.pyx":571
*
*
*     _bv_unary_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int*>a.data.as_ints), (<int>n_args), (<int>resultID))             # <<<<<<<<<<<<<<
*
* def bv_width( S ,  bv ,  bvID ):
*/
__pyx_t_6 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_6 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 571, __pyx_L1_error)
__pyx_t_7 = PyCapsule_GetPointer(__pyx_v_bv, NULL); if (unlikely(__pyx_t_7 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 571, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_n_args); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 571, __pyx_L1_error)
__pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_resultID); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 571, __pyx_L1_error)
bv_unary(((void *)__pyx_t_6), ((void *)__pyx_t_7), ((int *)__pyx_v_a->data.as_ints), ((int)__pyx_t_8), ((int)__pyx_t_9));

/* "monosat/monosat_p.pyx":559
*     _bv_subtraction_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID1), (<int>bvID2), (<int>resultID))
*
* def bv_unary( S ,  bv ,  args ,  n_args ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_unary(void* S, void* bv, int* args, int n_args, int resultID)"""
*
*/

/* 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_AddTraceback("monosat.monosat_p.bv_unary", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_a);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":573
*     _bv_unary_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int*>a.data.as_ints), (<int>n_args), (<int>resultID))
*
* def bv_width( S ,  bv ,  bvID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int bv_width(void* S, void* bv, int bvID)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_65bv_width(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_64bv_width[] = "Cython signature: int bv_width(void* S, void* bv, int bvID)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_65bv_width = {"bv_width", (PyCFunction)__pyx_pw_7monosat_9monosat_p_65bv_width, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_64bv_width};
static PyObject *__pyx_pw_7monosat_9monosat_p_65bv_width(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_bv = 0;
PyObject *__pyx_v_bvID = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("bv_width (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_bv,&__pyx_n_s_bvID,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_S)) != 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_bv)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_width", 1, 3, 3, 1); __PYX_ERR(0, 573, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_width", 1, 3, 3, 2); __PYX_ERR(0, 573, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "bv_width") < 0)) __PYX_ERR(0, 573, __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_S = values[0];
__pyx_v_bv = values[1];
__pyx_v_bvID = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("bv_width", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 573, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.bv_width", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_64bv_width(__pyx_self, __pyx_v_S, __pyx_v_bv, __pyx_v_bvID);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_64bv_width(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvID) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
void *__pyx_t_1;
void *__pyx_t_2;
int __pyx_t_3;
PyObject *__pyx_t_4 = NULL;
__Pyx_RefNannySetupContext("bv_width", 0);

/* "monosat/monosat_p.pyx":581
*
*
*     cdef int _r = _bv_width_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_1 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 581, __pyx_L1_error)
__pyx_t_2 = PyCapsule_GetPointer(__pyx_v_bv, NULL); if (unlikely(__pyx_t_2 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 581, __pyx_L1_error)
__pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_bvID); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 581, __pyx_L1_error)
__pyx_v__r = bv_width(((void *)__pyx_t_1), ((void *)__pyx_t_2), ((int)__pyx_t_3));

/* "monosat/monosat_p.pyx":582
*
*     cdef int _r = _bv_width_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":583
*     cdef int _r = _bv_width_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def bv_xnor( S ,  bv ,  bvaID ,  bvbID ,  bvResultID ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 583, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_r = __pyx_t_4;
__pyx_t_4 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":573
*     _bv_unary_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int*>a.data.as_ints), (<int>n_args), (<int>resultID))
*
* def bv_width( S ,  bv ,  bvID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int bv_width(void* S, void* bv, int bvID)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_4);
__Pyx_AddTraceback("monosat.monosat_p.bv_width", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":585
*     return py_result
*
* def bv_xnor( S ,  bv ,  bvaID ,  bvbID ,  bvResultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_xnor(void* S, void* bv, int bvaID, int bvbID, int bvResultID)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_67bv_xnor(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_66bv_xnor[] = "Cython signature: void bv_xnor(void* S, void* bv, int bvaID, int bvbID, int bvResultID)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_67bv_xnor = {"bv_xnor", (PyCFunction)__pyx_pw_7monosat_9monosat_p_67bv_xnor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_66bv_xnor};
static PyObject *__pyx_pw_7monosat_9monosat_p_67bv_xnor(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_bv = 0;
PyObject *__pyx_v_bvaID = 0;
PyObject *__pyx_v_bvbID = 0;
PyObject *__pyx_v_bvResultID = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("bv_xnor (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_bv,&__pyx_n_s_bvaID,&__pyx_n_s_bvbID,&__pyx_n_s_bvResultID,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_S)) != 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_bv)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_xnor", 1, 5, 5, 1); __PYX_ERR(0, 585, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvaID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_xnor", 1, 5, 5, 2); __PYX_ERR(0, 585, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvbID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_xnor", 1, 5, 5, 3); __PYX_ERR(0, 585, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvResultID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_xnor", 1, 5, 5, 4); __PYX_ERR(0, 585, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "bv_xnor") < 0)) __PYX_ERR(0, 585, __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_S = values[0];
__pyx_v_bv = values[1];
__pyx_v_bvaID = values[2];
__pyx_v_bvbID = values[3];
__pyx_v_bvResultID = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("bv_xnor", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 585, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.bv_xnor", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_66bv_xnor(__pyx_self, __pyx_v_S, __pyx_v_bv, __pyx_v_bvaID, __pyx_v_bvbID, __pyx_v_bvResultID);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_66bv_xnor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvaID, PyObject *__pyx_v_bvbID, PyObject *__pyx_v_bvResultID) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
int __pyx_t_8;
__Pyx_RefNannySetupContext("bv_xnor", 0);

/* "monosat/monosat_p.pyx":589
*
*
*     assert isinstance(bvaID, (int, long)), 'arg bvaID wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(bvbID, (int, long)), 'arg bvbID wrong type'
*     assert isinstance(bvResultID, (int, long)), 'arg bvResultID wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_bvaID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_bvaID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_bvaID_wrong_type);
 __PYX_ERR(0, 589, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":590
*
*     assert isinstance(bvaID, (int, long)), 'arg bvaID wrong type'
*     assert isinstance(bvbID, (int, long)), 'arg bvbID wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(bvResultID, (int, long)), 'arg bvResultID wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_bvbID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_bvbID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_bvbID_wrong_type);
 __PYX_ERR(0, 590, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":591
*     assert isinstance(bvaID, (int, long)), 'arg bvaID wrong type'
*     assert isinstance(bvbID, (int, long)), 'arg bvbID wrong type'
*     assert isinstance(bvResultID, (int, long)), 'arg bvResultID wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_bvResultID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L7_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_bvResultID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_bvResultID_wrong_type);
 __PYX_ERR(0, 591, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":597
*
*
*     _bv_xnor_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvaID), (<int>bvbID), (<int>bvResultID))             # <<<<<<<<<<<<<<
*
* def bv_xor( S ,  bv ,  bvaID ,  bvbID ,  bvResultID ):
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 597, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_bv, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 597, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_bvaID); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 597, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_bvbID); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 597, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_bvResultID); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 597, __pyx_L1_error)
bv_xnor(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7), ((int)__pyx_t_8));

/* "monosat/monosat_p.pyx":585
*     return py_result
*
* def bv_xnor( S ,  bv ,  bvaID ,  bvbID ,  bvResultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_xnor(void* S, void* bv, int bvaID, int bvbID, int bvResultID)"""
*
*/

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

/* "monosat/monosat_p.pyx":599
*     _bv_xnor_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvaID), (<int>bvbID), (<int>bvResultID))
*
* def bv_xor( S ,  bv ,  bvaID ,  bvbID ,  bvResultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_xor(void* S, void* bv, int bvaID, int bvbID, int bvResultID)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_69bv_xor(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_68bv_xor[] = "Cython signature: void bv_xor(void* S, void* bv, int bvaID, int bvbID, int bvResultID)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_69bv_xor = {"bv_xor", (PyCFunction)__pyx_pw_7monosat_9monosat_p_69bv_xor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_68bv_xor};
static PyObject *__pyx_pw_7monosat_9monosat_p_69bv_xor(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_bv = 0;
PyObject *__pyx_v_bvaID = 0;
PyObject *__pyx_v_bvbID = 0;
PyObject *__pyx_v_bvResultID = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("bv_xor (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_bv,&__pyx_n_s_bvaID,&__pyx_n_s_bvbID,&__pyx_n_s_bvResultID,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_S)) != 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_bv)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_xor", 1, 5, 5, 1); __PYX_ERR(0, 599, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvaID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_xor", 1, 5, 5, 2); __PYX_ERR(0, 599, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvbID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_xor", 1, 5, 5, 3); __PYX_ERR(0, 599, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvResultID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("bv_xor", 1, 5, 5, 4); __PYX_ERR(0, 599, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "bv_xor") < 0)) __PYX_ERR(0, 599, __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_S = values[0];
__pyx_v_bv = values[1];
__pyx_v_bvaID = values[2];
__pyx_v_bvbID = values[3];
__pyx_v_bvResultID = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("bv_xor", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 599, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.bv_xor", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_68bv_xor(__pyx_self, __pyx_v_S, __pyx_v_bv, __pyx_v_bvaID, __pyx_v_bvbID, __pyx_v_bvResultID);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_68bv_xor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvaID, PyObject *__pyx_v_bvbID, PyObject *__pyx_v_bvResultID) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
int __pyx_t_8;
__Pyx_RefNannySetupContext("bv_xor", 0);

/* "monosat/monosat_p.pyx":603
*
*
*     assert isinstance(bvaID, (int, long)), 'arg bvaID wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(bvbID, (int, long)), 'arg bvbID wrong type'
*     assert isinstance(bvResultID, (int, long)), 'arg bvResultID wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_bvaID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_bvaID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_bvaID_wrong_type);
 __PYX_ERR(0, 603, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":604
*
*     assert isinstance(bvaID, (int, long)), 'arg bvaID wrong type'
*     assert isinstance(bvbID, (int, long)), 'arg bvbID wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(bvResultID, (int, long)), 'arg bvResultID wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_bvbID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_bvbID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_bvbID_wrong_type);
 __PYX_ERR(0, 604, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":605
*     assert isinstance(bvaID, (int, long)), 'arg bvaID wrong type'
*     assert isinstance(bvbID, (int, long)), 'arg bvbID wrong type'
*     assert isinstance(bvResultID, (int, long)), 'arg bvResultID wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_bvResultID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L7_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_bvResultID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_bvResultID_wrong_type);
 __PYX_ERR(0, 605, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":611
*
*
*     _bv_xor_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvaID), (<int>bvbID), (<int>bvResultID))             # <<<<<<<<<<<<<<
*
* def clearOptimizationObjectives( S ):
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 611, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_bv, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 611, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_bvaID); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 611, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_bvbID); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 611, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_bvResultID); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 611, __pyx_L1_error)
bv_xor(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7), ((int)__pyx_t_8));

/* "monosat/monosat_p.pyx":599
*     _bv_xnor_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvaID), (<int>bvbID), (<int>bvResultID))
*
* def bv_xor( S ,  bv ,  bvaID ,  bvbID ,  bvResultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_xor(void* S, void* bv, int bvaID, int bvbID, int bvResultID)"""
*
*/

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

/* "monosat/monosat_p.pyx":613
*     _bv_xor_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvaID), (<int>bvbID), (<int>bvResultID))
*
* def clearOptimizationObjectives( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: void clearOptimizationObjectives(void* S)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_71clearOptimizationObjectives(PyObject *__pyx_self, PyObject *__pyx_v_S); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_70clearOptimizationObjectives[] = "Cython signature: void clearOptimizationObjectives(void* S)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_71clearOptimizationObjectives = {"clearOptimizationObjectives", (PyCFunction)__pyx_pw_7monosat_9monosat_p_71clearOptimizationObjectives, METH_O, __pyx_doc_7monosat_9monosat_p_70clearOptimizationObjectives};
static PyObject *__pyx_pw_7monosat_9monosat_p_71clearOptimizationObjectives(PyObject *__pyx_self, PyObject *__pyx_v_S) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("clearOptimizationObjectives (wrapper)", 0);
__pyx_r = __pyx_pf_7monosat_9monosat_p_70clearOptimizationObjectives(__pyx_self, ((PyObject *)__pyx_v_S));

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

static PyObject *__pyx_pf_7monosat_9monosat_p_70clearOptimizationObjectives(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
void *__pyx_t_1;
__Pyx_RefNannySetupContext("clearOptimizationObjectives", 0);

/* "monosat/monosat_p.pyx":617
*
*
*     _clearOptimizationObjectives_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))             # <<<<<<<<<<<<<<
*
* def createFlowRouting( S ,  G ,  sourceNode ,  destNode ,  maxflowLit ):
*/
__pyx_t_1 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 617, __pyx_L1_error)
clearOptimizationObjectives(((void *)__pyx_t_1));

/* "monosat/monosat_p.pyx":613
*     _bv_xor_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvaID), (<int>bvbID), (<int>bvResultID))
*
* def clearOptimizationObjectives( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: void clearOptimizationObjectives(void* S)"""
*
*/

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

/* "monosat/monosat_p.pyx":619
*     _clearOptimizationObjectives_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))
*
* def createFlowRouting( S ,  G ,  sourceNode ,  destNode ,  maxflowLit ):             # <<<<<<<<<<<<<<
*     """Cython signature: void* createFlowRouting(void* S, void* G, int sourceNode, int destNode, int maxflowLit)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_73createFlowRouting(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_72createFlowRouting[] = "Cython signature: void* createFlowRouting(void* S, void* G, int sourceNode, int destNode, int maxflowLit)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_73createFlowRouting = {"createFlowRouting", (PyCFunction)__pyx_pw_7monosat_9monosat_p_73createFlowRouting, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_72createFlowRouting};
static PyObject *__pyx_pw_7monosat_9monosat_p_73createFlowRouting(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_G = 0;
PyObject *__pyx_v_sourceNode = 0;
PyObject *__pyx_v_destNode = 0;
PyObject *__pyx_v_maxflowLit = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("createFlowRouting (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_G,&__pyx_n_s_sourceNode,&__pyx_n_s_destNode,&__pyx_n_s_maxflowLit,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_S)) != 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_G)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("createFlowRouting", 1, 5, 5, 1); __PYX_ERR(0, 619, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sourceNode)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("createFlowRouting", 1, 5, 5, 2); __PYX_ERR(0, 619, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_destNode)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("createFlowRouting", 1, 5, 5, 3); __PYX_ERR(0, 619, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_maxflowLit)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("createFlowRouting", 1, 5, 5, 4); __PYX_ERR(0, 619, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "createFlowRouting") < 0)) __PYX_ERR(0, 619, __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_S = values[0];
__pyx_v_G = values[1];
__pyx_v_sourceNode = values[2];
__pyx_v_destNode = values[3];
__pyx_v_maxflowLit = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("createFlowRouting", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 619, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.createFlowRouting", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_72createFlowRouting(__pyx_self, __pyx_v_S, __pyx_v_G, __pyx_v_sourceNode, __pyx_v_destNode, __pyx_v_maxflowLit);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_72createFlowRouting(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_sourceNode, PyObject *__pyx_v_destNode, PyObject *__pyx_v_maxflowLit) {
void *__pyx_v__r;
PyObject *__pyx_v_py_result = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
int __pyx_t_8;
PyObject *__pyx_t_9 = NULL;
__Pyx_RefNannySetupContext("createFlowRouting", 0);

/* "monosat/monosat_p.pyx":623
*
*
*     assert isinstance(sourceNode, (int, long)), 'arg sourceNode wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(destNode, (int, long)), 'arg destNode wrong type'
*     assert isinstance(maxflowLit, (int, long)), 'arg maxflowLit wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_sourceNode);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_sourceNode);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_sourceNode_wrong_type);
 __PYX_ERR(0, 623, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":624
*
*     assert isinstance(sourceNode, (int, long)), 'arg sourceNode wrong type'
*     assert isinstance(destNode, (int, long)), 'arg destNode wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(maxflowLit, (int, long)), 'arg maxflowLit wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_destNode);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_destNode);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_destNode_wrong_type);
 __PYX_ERR(0, 624, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":625
*     assert isinstance(sourceNode, (int, long)), 'arg sourceNode wrong type'
*     assert isinstance(destNode, (int, long)), 'arg destNode wrong type'
*     assert isinstance(maxflowLit, (int, long)), 'arg maxflowLit wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_maxflowLit);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L7_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_maxflowLit);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_maxflowLit_wrong_type);
 __PYX_ERR(0, 625, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":631
*
*
*     cdef void* _r = _createFlowRouting_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>sourceNode), (<int>destNode), (<int>maxflowLit))             # <<<<<<<<<<<<<<
*     py_result =   pycapsule.PyCapsule_New(_r, NULL, NULL)
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 631, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_G, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 631, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_sourceNode); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 631, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_destNode); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 631, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_maxflowLit); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 631, __pyx_L1_error)
__pyx_v__r = createFlowRouting(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7), ((int)__pyx_t_8));

/* "monosat/monosat_p.pyx":632
*
*     cdef void* _r = _createFlowRouting_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>sourceNode), (<int>destNode), (<int>maxflowLit))
*     py_result =   pycapsule.PyCapsule_New(_r, NULL, NULL)             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_t_9 = PyCapsule_New(__pyx_v__r, NULL, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 632, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__pyx_v_py_result = __pyx_t_9;
__pyx_t_9 = 0;

/* "monosat/monosat_p.pyx":633
*     cdef void* _r = _createFlowRouting_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>sourceNode), (<int>destNode), (<int>maxflowLit))
*     py_result =   pycapsule.PyCapsule_New(_r, NULL, NULL)
*     return py_result             # <<<<<<<<<<<<<<
*
* def deleteSolver( S ):
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_v_py_result);
__pyx_r = __pyx_v_py_result;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":619
*     _clearOptimizationObjectives_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))
*
* def createFlowRouting( S ,  G ,  sourceNode ,  destNode ,  maxflowLit ):             # <<<<<<<<<<<<<<
*     """Cython signature: void* createFlowRouting(void* S, void* G, int sourceNode, int destNode, int maxflowLit)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_9);
__Pyx_AddTraceback("monosat.monosat_p.createFlowRouting", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_py_result);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":635
*     return py_result
*
* def deleteSolver( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: void deleteSolver(void* S)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_75deleteSolver(PyObject *__pyx_self, PyObject *__pyx_v_S); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_74deleteSolver[] = "Cython signature: void deleteSolver(void* S)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_75deleteSolver = {"deleteSolver", (PyCFunction)__pyx_pw_7monosat_9monosat_p_75deleteSolver, METH_O, __pyx_doc_7monosat_9monosat_p_74deleteSolver};
static PyObject *__pyx_pw_7monosat_9monosat_p_75deleteSolver(PyObject *__pyx_self, PyObject *__pyx_v_S) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("deleteSolver (wrapper)", 0);
__pyx_r = __pyx_pf_7monosat_9monosat_p_74deleteSolver(__pyx_self, ((PyObject *)__pyx_v_S));

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

static PyObject *__pyx_pf_7monosat_9monosat_p_74deleteSolver(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
void *__pyx_t_1;
__Pyx_RefNannySetupContext("deleteSolver", 0);

/* "monosat/monosat_p.pyx":639
*
*
*     _deleteSolver_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))             # <<<<<<<<<<<<<<
*
* def disablePreprocessing( S ):
*/
__pyx_t_1 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 639, __pyx_L1_error)
deleteSolver(((void *)__pyx_t_1));

/* "monosat/monosat_p.pyx":635
*     return py_result
*
* def deleteSolver( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: void deleteSolver(void* S)"""
*
*/

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

/* "monosat/monosat_p.pyx":641
*     _deleteSolver_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))
*
* def disablePreprocessing( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: void disablePreprocessing(void* S)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_77disablePreprocessing(PyObject *__pyx_self, PyObject *__pyx_v_S); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_76disablePreprocessing[] = "Cython signature: void disablePreprocessing(void* S)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_77disablePreprocessing = {"disablePreprocessing", (PyCFunction)__pyx_pw_7monosat_9monosat_p_77disablePreprocessing, METH_O, __pyx_doc_7monosat_9monosat_p_76disablePreprocessing};
static PyObject *__pyx_pw_7monosat_9monosat_p_77disablePreprocessing(PyObject *__pyx_self, PyObject *__pyx_v_S) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("disablePreprocessing (wrapper)", 0);
__pyx_r = __pyx_pf_7monosat_9monosat_p_76disablePreprocessing(__pyx_self, ((PyObject *)__pyx_v_S));

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

static PyObject *__pyx_pf_7monosat_9monosat_p_76disablePreprocessing(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
void *__pyx_t_1;
__Pyx_RefNannySetupContext("disablePreprocessing", 0);

/* "monosat/monosat_p.pyx":645
*
*
*     _disablePreprocessing_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))             # <<<<<<<<<<<<<<
*
* def disallowLiteralSimplification( S ,  lit ):
*/
__pyx_t_1 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 645, __pyx_L1_error)
disablePreprocessing(((void *)__pyx_t_1));

/* "monosat/monosat_p.pyx":641
*     _deleteSolver_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))
*
* def disablePreprocessing( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: void disablePreprocessing(void* S)"""
*
*/

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

/* "monosat/monosat_p.pyx":647
*     _disablePreprocessing_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))
*
* def disallowLiteralSimplification( S ,  lit ):             # <<<<<<<<<<<<<<
*     """Cython signature: bint disallowLiteralSimplification(void* S, int lit)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_79disallowLiteralSimplification(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_78disallowLiteralSimplification[] = "Cython signature: bint disallowLiteralSimplification(void* S, int lit)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_79disallowLiteralSimplification = {"disallowLiteralSimplification", (PyCFunction)__pyx_pw_7monosat_9monosat_p_79disallowLiteralSimplification, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_78disallowLiteralSimplification};
static PyObject *__pyx_pw_7monosat_9monosat_p_79disallowLiteralSimplification(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_lit = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("disallowLiteralSimplification (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_lit,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_S)) != 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_lit)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("disallowLiteralSimplification", 1, 2, 2, 1); __PYX_ERR(0, 647, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "disallowLiteralSimplification") < 0)) __PYX_ERR(0, 647, __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_S = values[0];
__pyx_v_lit = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("disallowLiteralSimplification", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 647, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.disallowLiteralSimplification", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_78disallowLiteralSimplification(__pyx_self, __pyx_v_S, __pyx_v_lit);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_78disallowLiteralSimplification(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_lit) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
int __pyx_t_5;
PyObject *__pyx_t_6 = NULL;
__Pyx_RefNannySetupContext("disallowLiteralSimplification", 0);

/* "monosat/monosat_p.pyx":650
*     """Cython signature: bint disallowLiteralSimplification(void* S, int lit)"""
*
*     assert isinstance(lit, (int, long)), 'arg lit wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_lit);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_lit);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_lit_wrong_type);
 __PYX_ERR(0, 650, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":653
*
*
*     cdef bint _r = _disallowLiteralSimplification_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>lit))             # <<<<<<<<<<<<<<
*     py_result = <bint>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 653, __pyx_L1_error)
__pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_lit); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 653, __pyx_L1_error)
__pyx_v__r = disallowLiteralSimplification(((void *)__pyx_t_4), ((int)__pyx_t_5));

/* "monosat/monosat_p.pyx":654
*
*     cdef bint _r = _disallowLiteralSimplification_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>lit))
*     py_result = <bint>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = (__pyx_v__r != 0);

/* "monosat/monosat_p.pyx":655
*     cdef bint _r = _disallowLiteralSimplification_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>lit))
*     py_result = <bint>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def flushPB( S ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_py_result); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 655, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_r = __pyx_t_6;
__pyx_t_6 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":647
*     _disablePreprocessing_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))
*
* def disallowLiteralSimplification( S ,  lit ):             # <<<<<<<<<<<<<<
*     """Cython signature: bint disallowLiteralSimplification(void* S, int lit)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_6);
__Pyx_AddTraceback("monosat.monosat_p.disallowLiteralSimplification", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":657
*     return py_result
*
* def flushPB( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: void flushPB(void* S)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_81flushPB(PyObject *__pyx_self, PyObject *__pyx_v_S); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_80flushPB[] = "Cython signature: void flushPB(void* S)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_81flushPB = {"flushPB", (PyCFunction)__pyx_pw_7monosat_9monosat_p_81flushPB, METH_O, __pyx_doc_7monosat_9monosat_p_80flushPB};
static PyObject *__pyx_pw_7monosat_9monosat_p_81flushPB(PyObject *__pyx_self, PyObject *__pyx_v_S) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("flushPB (wrapper)", 0);
__pyx_r = __pyx_pf_7monosat_9monosat_p_80flushPB(__pyx_self, ((PyObject *)__pyx_v_S));

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

static PyObject *__pyx_pf_7monosat_9monosat_p_80flushPB(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
void *__pyx_t_1;
__Pyx_RefNannySetupContext("flushPB", 0);

/* "monosat/monosat_p.pyx":661
*
*
*     _flushPB_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))             # <<<<<<<<<<<<<<
*
*
*/
__pyx_t_1 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 661, __pyx_L1_error)
flushPB(((void *)__pyx_t_1));

/* "monosat/monosat_p.pyx":657
*     return py_result
*
* def flushPB( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: void flushPB(void* S)"""
*
*/

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

/* "monosat/monosat_p.pyx":664
*
*
* def getConflictClause( S ,  store_clause ,  max_store_size ):             # <<<<<<<<<<<<<<
*     """Cython signature: int getConflictClause(void* S, int* store_clause, int max_store_size)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_83getConflictClause(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_82getConflictClause[] = "Cython signature: int getConflictClause(void* S, int* store_clause, int max_store_size)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_83getConflictClause = {"getConflictClause", (PyCFunction)__pyx_pw_7monosat_9monosat_p_83getConflictClause, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_82getConflictClause};
static PyObject *__pyx_pw_7monosat_9monosat_p_83getConflictClause(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_store_clause = 0;
PyObject *__pyx_v_max_store_size = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("getConflictClause (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_store_clause,&__pyx_n_s_max_store_size,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_S)) != 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_store_clause)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("getConflictClause", 1, 3, 3, 1); __PYX_ERR(0, 664, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_max_store_size)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("getConflictClause", 1, 3, 3, 2); __PYX_ERR(0, 664, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getConflictClause") < 0)) __PYX_ERR(0, 664, __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_S = values[0];
__pyx_v_store_clause = values[1];
__pyx_v_max_store_size = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("getConflictClause", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 664, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.getConflictClause", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_82getConflictClause(__pyx_self, __pyx_v_S, __pyx_v_store_clause, __pyx_v_max_store_size);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_82getConflictClause(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_store_clause, PyObject *__pyx_v_max_store_size) {
arrayobject *__pyx_v_a = 0;
int __pyx_v__r;
int __pyx_v_py_result;
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;
void *__pyx_t_6;
int __pyx_t_7;
__Pyx_RefNannySetupContext("getConflictClause", 0);

/* "monosat/monosat_p.pyx":667
*     """Cython signature: int getConflictClause(void* S, int* store_clause, int max_store_size)"""
*
*     assert isinstance(store_clause, list), 'arg store_clause wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(max_store_size, (int, long)), 'arg max_store_size wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_1 = PyList_Check(__pyx_v_store_clause);
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_store_clause_wrong_type);
 __PYX_ERR(0, 667, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":668
*
*     assert isinstance(store_clause, list), 'arg store_clause wrong type'
*     assert isinstance(max_store_size, (int, long)), 'arg max_store_size wrong type'             # <<<<<<<<<<<<<<
*
*     cdef array.array a =  array.array('i', store_clause)
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_max_store_size);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_max_store_size);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_max_store_size_wrong_type);
 __PYX_ERR(0, 668, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":670
*     assert isinstance(max_store_size, (int, long)), 'arg max_store_size wrong type'
*
*     cdef array.array a =  array.array('i', store_clause)             # <<<<<<<<<<<<<<
*
*     cdef int _r = _getConflictClause_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)),(<int*>a.data.as_ints), (<int>max_store_size))
*/
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 670, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_n_s_i);
__Pyx_GIVEREF(__pyx_n_s_i);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_i);
__Pyx_INCREF(__pyx_v_store_clause);
__Pyx_GIVEREF(__pyx_v_store_clause);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_store_clause);
__pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 670, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_a = ((arrayobject *)__pyx_t_5);
__pyx_t_5 = 0;

/* "monosat/monosat_p.pyx":672
*     cdef array.array a =  array.array('i', store_clause)
*
*     cdef int _r = _getConflictClause_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)),(<int*>a.data.as_ints), (<int>max_store_size))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_6 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_6 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 672, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_max_store_size); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 672, __pyx_L1_error)
__pyx_v__r = getConflictClause(((void *)__pyx_t_6), ((int *)__pyx_v_a->data.as_ints), ((int)__pyx_t_7));

/* "monosat/monosat_p.pyx":673
*
*     cdef int _r = _getConflictClause_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)),(<int*>a.data.as_ints), (<int>max_store_size))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":674
*     cdef int _r = _getConflictClause_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)),(<int*>a.data.as_ints), (<int>max_store_size))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def minimizeUnsatCore( S ,  assumptions ,  n_lits ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 674, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_r = __pyx_t_5;
__pyx_t_5 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":664
*
*
* def getConflictClause( S ,  store_clause ,  max_store_size ):             # <<<<<<<<<<<<<<
*     """Cython signature: int getConflictClause(void* S, int* store_clause, int max_store_size)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_AddTraceback("monosat.monosat_p.getConflictClause", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_a);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":676
*     return py_result
*
* def minimizeUnsatCore( S ,  assumptions ,  n_lits ):             # <<<<<<<<<<<<<<
*     """Cython signature: int minimizeUnsatCore(void* S, int* assumptions, int n_lits)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_85minimizeUnsatCore(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_84minimizeUnsatCore[] = "Cython signature: int minimizeUnsatCore(void* S, int* assumptions, int n_lits)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_85minimizeUnsatCore = {"minimizeUnsatCore", (PyCFunction)__pyx_pw_7monosat_9monosat_p_85minimizeUnsatCore, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_84minimizeUnsatCore};
static PyObject *__pyx_pw_7monosat_9monosat_p_85minimizeUnsatCore(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_assumptions = 0;
PyObject *__pyx_v_n_lits = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("minimizeUnsatCore (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_assumptions,&__pyx_n_s_n_lits,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_S)) != 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_assumptions)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("minimizeUnsatCore", 1, 3, 3, 1); __PYX_ERR(0, 676, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n_lits)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("minimizeUnsatCore", 1, 3, 3, 2); __PYX_ERR(0, 676, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "minimizeUnsatCore") < 0)) __PYX_ERR(0, 676, __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_S = values[0];
__pyx_v_assumptions = values[1];
__pyx_v_n_lits = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("minimizeUnsatCore", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 676, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.minimizeUnsatCore", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_84minimizeUnsatCore(__pyx_self, __pyx_v_S, __pyx_v_assumptions, __pyx_v_n_lits);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_84minimizeUnsatCore(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_assumptions, PyObject *__pyx_v_n_lits) {
arrayobject *__pyx_v_a = 0;
int __pyx_v__r;
int __pyx_v_py_result;
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;
void *__pyx_t_6;
int __pyx_t_7;
__Pyx_RefNannySetupContext("minimizeUnsatCore", 0);

/* "monosat/monosat_p.pyx":679
*     """Cython signature: int minimizeUnsatCore(void* S, int* assumptions, int n_lits)"""
*
*     assert isinstance(assumptions, list), 'arg assumptions wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(n_lits, (int, long)), 'arg n_lits wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_1 = PyList_Check(__pyx_v_assumptions);
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_assumptions_wrong_type);
 __PYX_ERR(0, 679, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":680
*
*     assert isinstance(assumptions, list), 'arg assumptions wrong type'
*     assert isinstance(n_lits, (int, long)), 'arg n_lits wrong type'             # <<<<<<<<<<<<<<
*
*     cdef array.array a =  array.array('i', assumptions)
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_n_lits);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_n_lits);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_n_lits_wrong_type);
 __PYX_ERR(0, 680, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":682
*     assert isinstance(n_lits, (int, long)), 'arg n_lits wrong type'
*
*     cdef array.array a =  array.array('i', assumptions)             # <<<<<<<<<<<<<<
*
*     cdef int _r = _minimizeUnsatCore_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)),(<int*>a.data.as_ints), (<int>n_lits))
*/
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 682, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_n_s_i);
__Pyx_GIVEREF(__pyx_n_s_i);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_i);
__Pyx_INCREF(__pyx_v_assumptions);
__Pyx_GIVEREF(__pyx_v_assumptions);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_assumptions);
__pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 682, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_a = ((arrayobject *)__pyx_t_5);
__pyx_t_5 = 0;

/* "monosat/monosat_p.pyx":684
*     cdef array.array a =  array.array('i', assumptions)
*
*     cdef int _r = _minimizeUnsatCore_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)),(<int*>a.data.as_ints), (<int>n_lits))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_6 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_6 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 684, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_n_lits); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 684, __pyx_L1_error)
__pyx_v__r = minimizeUnsatCore(((void *)__pyx_t_6), ((int *)__pyx_v_a->data.as_ints), ((int)__pyx_t_7));

/* "monosat/monosat_p.pyx":685
*
*     cdef int _r = _minimizeUnsatCore_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)),(<int*>a.data.as_ints), (<int>n_lits))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":686
*     cdef int _r = _minimizeUnsatCore_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)),(<int*>a.data.as_ints), (<int>n_lits))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def minimizeConflictClause( S ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 686, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_r = __pyx_t_5;
__pyx_t_5 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":676
*     return py_result
*
* def minimizeUnsatCore( S ,  assumptions ,  n_lits ):             # <<<<<<<<<<<<<<
*     """Cython signature: int minimizeUnsatCore(void* S, int* assumptions, int n_lits)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_AddTraceback("monosat.monosat_p.minimizeUnsatCore", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_a);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":688
*     return py_result
*
* def minimizeConflictClause( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: int minimizeConflictClause(void* S)"""
*     _minimizeConflictClause_monosat(<void*>pycapsule.PyCapsule_GetPointer(S,NULL));
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_87minimizeConflictClause(PyObject *__pyx_self, PyObject *__pyx_v_S); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_86minimizeConflictClause[] = "Cython signature: int minimizeConflictClause(void* S)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_87minimizeConflictClause = {"minimizeConflictClause", (PyCFunction)__pyx_pw_7monosat_9monosat_p_87minimizeConflictClause, METH_O, __pyx_doc_7monosat_9monosat_p_86minimizeConflictClause};
static PyObject *__pyx_pw_7monosat_9monosat_p_87minimizeConflictClause(PyObject *__pyx_self, PyObject *__pyx_v_S) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("minimizeConflictClause (wrapper)", 0);
__pyx_r = __pyx_pf_7monosat_9monosat_p_86minimizeConflictClause(__pyx_self, ((PyObject *)__pyx_v_S));

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

static PyObject *__pyx_pf_7monosat_9monosat_p_86minimizeConflictClause(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
void *__pyx_t_1;
__Pyx_RefNannySetupContext("minimizeConflictClause", 0);

/* "monosat/monosat_p.pyx":690
* def minimizeConflictClause( S ):
*     """Cython signature: int minimizeConflictClause(void* S)"""
*     _minimizeConflictClause_monosat(<void*>pycapsule.PyCapsule_GetPointer(S,NULL));             # <<<<<<<<<<<<<<
*
* def getDecisionPolarity( S ,  v ):
*/
__pyx_t_1 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 690, __pyx_L1_error)
minimizeConflictClause(((void *)__pyx_t_1));

/* "monosat/monosat_p.pyx":688
*     return py_result
*
* def minimizeConflictClause( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: int minimizeConflictClause(void* S)"""
*     _minimizeConflictClause_monosat(<void*>pycapsule.PyCapsule_GetPointer(S,NULL));
*/

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

/* "monosat/monosat_p.pyx":692
*     _minimizeConflictClause_monosat(<void*>pycapsule.PyCapsule_GetPointer(S,NULL));
*
* def getDecisionPolarity( S ,  v ):             # <<<<<<<<<<<<<<
*     """Cython signature: bint getDecisionPolarity(void* S, int v)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_89getDecisionPolarity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_88getDecisionPolarity[] = "Cython signature: bint getDecisionPolarity(void* S, int v)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_89getDecisionPolarity = {"getDecisionPolarity", (PyCFunction)__pyx_pw_7monosat_9monosat_p_89getDecisionPolarity, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_88getDecisionPolarity};
static PyObject *__pyx_pw_7monosat_9monosat_p_89getDecisionPolarity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_v = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("getDecisionPolarity (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_v,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_S)) != 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_v)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("getDecisionPolarity", 1, 2, 2, 1); __PYX_ERR(0, 692, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getDecisionPolarity") < 0)) __PYX_ERR(0, 692, __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_S = values[0];
__pyx_v_v = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("getDecisionPolarity", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 692, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.getDecisionPolarity", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_88getDecisionPolarity(__pyx_self, __pyx_v_S, __pyx_v_v);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_88getDecisionPolarity(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_v) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
int __pyx_t_5;
PyObject *__pyx_t_6 = NULL;
__Pyx_RefNannySetupContext("getDecisionPolarity", 0);

/* "monosat/monosat_p.pyx":695
*     """Cython signature: bint getDecisionPolarity(void* S, int v)"""
*
*     assert isinstance(v, (int, long)), 'arg v wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_v);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_v);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_v_wrong_type);
 __PYX_ERR(0, 695, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":698
*
*
*     cdef bint _r = _getDecisionPolarity_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>v))             # <<<<<<<<<<<<<<
*     py_result = <bint>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 698, __pyx_L1_error)
__pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_v); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 698, __pyx_L1_error)
__pyx_v__r = getDecisionPolarity(((void *)__pyx_t_4), ((int)__pyx_t_5));

/* "monosat/monosat_p.pyx":699
*
*     cdef bint _r = _getDecisionPolarity_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>v))
*     py_result = <bint>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = (__pyx_v__r != 0);

/* "monosat/monosat_p.pyx":700
*     cdef bint _r = _getDecisionPolarity_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>v))
*     py_result = <bint>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def getDecisionPriority( S ,  var ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_py_result); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 700, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_r = __pyx_t_6;
__pyx_t_6 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":692
*     _minimizeConflictClause_monosat(<void*>pycapsule.PyCapsule_GetPointer(S,NULL));
*
* def getDecisionPolarity( S ,  v ):             # <<<<<<<<<<<<<<
*     """Cython signature: bint getDecisionPolarity(void* S, int v)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_6);
__Pyx_AddTraceback("monosat.monosat_p.getDecisionPolarity", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":702
*     return py_result
*
* def getDecisionPriority( S ,  var ):             # <<<<<<<<<<<<<<
*     """Cython signature: int getDecisionPriority(void* S, int var)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_91getDecisionPriority(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_90getDecisionPriority[] = "Cython signature: int getDecisionPriority(void* S, int var)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_91getDecisionPriority = {"getDecisionPriority", (PyCFunction)__pyx_pw_7monosat_9monosat_p_91getDecisionPriority, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_90getDecisionPriority};
static PyObject *__pyx_pw_7monosat_9monosat_p_91getDecisionPriority(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_var = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("getDecisionPriority (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_var,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_S)) != 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_var)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("getDecisionPriority", 1, 2, 2, 1); __PYX_ERR(0, 702, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getDecisionPriority") < 0)) __PYX_ERR(0, 702, __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_S = values[0];
__pyx_v_var = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("getDecisionPriority", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 702, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.getDecisionPriority", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_90getDecisionPriority(__pyx_self, __pyx_v_S, __pyx_v_var);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_90getDecisionPriority(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_var) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
int __pyx_t_5;
PyObject *__pyx_t_6 = NULL;
__Pyx_RefNannySetupContext("getDecisionPriority", 0);

/* "monosat/monosat_p.pyx":705
*     """Cython signature: int getDecisionPriority(void* S, int var)"""
*
*     assert isinstance(var, (int, long)), 'arg var wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_var);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_var);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_var_wrong_type);
 __PYX_ERR(0, 705, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":708
*
*
*     cdef int _r = _getDecisionPriority_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>var))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 708, __pyx_L1_error)
__pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_var); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 708, __pyx_L1_error)
__pyx_v__r = getDecisionPriority(((void *)__pyx_t_4), ((int)__pyx_t_5));

/* "monosat/monosat_p.pyx":709
*
*     cdef int _r = _getDecisionPriority_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>var))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":710
*     cdef int _r = _getDecisionPriority_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>var))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def getModel_AcyclicEdgeFlow( S ,  G ,  maxflow_literal ,  edgeLit ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 710, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_r = __pyx_t_6;
__pyx_t_6 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":702
*     return py_result
*
* def getDecisionPriority( S ,  var ):             # <<<<<<<<<<<<<<
*     """Cython signature: int getDecisionPriority(void* S, int var)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_6);
__Pyx_AddTraceback("monosat.monosat_p.getDecisionPriority", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":712
*     return py_result
*
* def getModel_AcyclicEdgeFlow( S ,  G ,  maxflow_literal ,  edgeLit ):             # <<<<<<<<<<<<<<
*     """Cython signature: int64_t getModel_AcyclicEdgeFlow(void* S, void* G, int maxflow_literal, int edgeLit)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_93getModel_AcyclicEdgeFlow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_92getModel_AcyclicEdgeFlow[] = "Cython signature: int64_t getModel_AcyclicEdgeFlow(void* S, void* G, int maxflow_literal, int edgeLit)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_93getModel_AcyclicEdgeFlow = {"getModel_AcyclicEdgeFlow", (PyCFunction)__pyx_pw_7monosat_9monosat_p_93getModel_AcyclicEdgeFlow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_92getModel_AcyclicEdgeFlow};
static PyObject *__pyx_pw_7monosat_9monosat_p_93getModel_AcyclicEdgeFlow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_G = 0;
PyObject *__pyx_v_maxflow_literal = 0;
PyObject *__pyx_v_edgeLit = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("getModel_AcyclicEdgeFlow (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_G,&__pyx_n_s_maxflow_literal,&__pyx_n_s_edgeLit,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_S)) != 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_G)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("getModel_AcyclicEdgeFlow", 1, 4, 4, 1); __PYX_ERR(0, 712, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_maxflow_literal)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("getModel_AcyclicEdgeFlow", 1, 4, 4, 2); __PYX_ERR(0, 712, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_edgeLit)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("getModel_AcyclicEdgeFlow", 1, 4, 4, 3); __PYX_ERR(0, 712, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getModel_AcyclicEdgeFlow") < 0)) __PYX_ERR(0, 712, __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_S = values[0];
__pyx_v_G = values[1];
__pyx_v_maxflow_literal = values[2];
__pyx_v_edgeLit = values[3];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("getModel_AcyclicEdgeFlow", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 712, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.getModel_AcyclicEdgeFlow", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_92getModel_AcyclicEdgeFlow(__pyx_self, __pyx_v_S, __pyx_v_G, __pyx_v_maxflow_literal, __pyx_v_edgeLit);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_92getModel_AcyclicEdgeFlow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_maxflow_literal, PyObject *__pyx_v_edgeLit) {
int64_t __pyx_v__r;
int64_t __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("getModel_AcyclicEdgeFlow", 0);

/* "monosat/monosat_p.pyx":716
*
*
*     assert isinstance(maxflow_literal, (int, long)), 'arg maxflow_literal wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(edgeLit, (int, long)), 'arg edgeLit wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_maxflow_literal);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_maxflow_literal);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_maxflow_literal_wrong_type);
 __PYX_ERR(0, 716, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":717
*
*     assert isinstance(maxflow_literal, (int, long)), 'arg maxflow_literal wrong type'
*     assert isinstance(edgeLit, (int, long)), 'arg edgeLit wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_edgeLit);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_edgeLit);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_edgeLit_wrong_type);
 __PYX_ERR(0, 717, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":722
*
*
*     cdef int64_t _r = _getModel_AcyclicEdgeFlow_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>maxflow_literal), (<int>edgeLit))             # <<<<<<<<<<<<<<
*     py_result = <int64_t>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_G, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_maxflow_literal); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_edgeLit); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L1_error)
__pyx_v__r = getModel_AcyclicEdgeFlow(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7));

/* "monosat/monosat_p.pyx":723
*
*     cdef int64_t _r = _getModel_AcyclicEdgeFlow_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>maxflow_literal), (<int>edgeLit))
*     py_result = <int64_t>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int64_t)__pyx_v__r);

/* "monosat/monosat_p.pyx":724
*     cdef int64_t _r = _getModel_AcyclicEdgeFlow_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>maxflow_literal), (<int>edgeLit))
*     py_result = <int64_t>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def getModel_BV( S ,  bv ,  bvID ,  getMaximumValue ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_8 = __Pyx_PyInt_From_int64_t(__pyx_v_py_result); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 724, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__pyx_r = __pyx_t_8;
__pyx_t_8 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":712
*     return py_result
*
* def getModel_AcyclicEdgeFlow( S ,  G ,  maxflow_literal ,  edgeLit ):             # <<<<<<<<<<<<<<
*     """Cython signature: int64_t getModel_AcyclicEdgeFlow(void* S, void* G, int maxflow_literal, int edgeLit)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_8);
__Pyx_AddTraceback("monosat.monosat_p.getModel_AcyclicEdgeFlow", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":726
*     return py_result
*
* def getModel_BV( S ,  bv ,  bvID ,  getMaximumValue ):             # <<<<<<<<<<<<<<
*     """Cython signature: int64_t getModel_BV(void* S, void* bv, int bvID, bint getMaximumValue)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_95getModel_BV(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_94getModel_BV[] = "Cython signature: int64_t getModel_BV(void* S, void* bv, int bvID, bint getMaximumValue)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_95getModel_BV = {"getModel_BV", (PyCFunction)__pyx_pw_7monosat_9monosat_p_95getModel_BV, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_94getModel_BV};
static PyObject *__pyx_pw_7monosat_9monosat_p_95getModel_BV(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_bv = 0;
PyObject *__pyx_v_bvID = 0;
PyObject *__pyx_v_getMaximumValue = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("getModel_BV (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_bv,&__pyx_n_s_bvID,&__pyx_n_s_getMaximumValue,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_S)) != 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_bv)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("getModel_BV", 1, 4, 4, 1); __PYX_ERR(0, 726, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("getModel_BV", 1, 4, 4, 2); __PYX_ERR(0, 726, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_getMaximumValue)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("getModel_BV", 1, 4, 4, 3); __PYX_ERR(0, 726, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getModel_BV") < 0)) __PYX_ERR(0, 726, __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_S = values[0];
__pyx_v_bv = values[1];
__pyx_v_bvID = values[2];
__pyx_v_getMaximumValue = values[3];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("getModel_BV", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 726, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.getModel_BV", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_94getModel_BV(__pyx_self, __pyx_v_S, __pyx_v_bv, __pyx_v_bvID, __pyx_v_getMaximumValue);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_94getModel_BV(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvID, PyObject *__pyx_v_getMaximumValue) {
int64_t __pyx_v__r;
int64_t __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
PyObject *__pyx_t_7 = NULL;
__Pyx_RefNannySetupContext("getModel_BV", 0);

/* "monosat/monosat_p.pyx":731
*
*
*     assert isinstance(getMaximumValue, (int, long)), 'arg getMaximumValue wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_getMaximumValue);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_getMaximumValue);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_getMaximumValue_wrong_type);
 __PYX_ERR(0, 731, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":736
*
*
*     cdef int64_t _r = _getModel_BV_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID), (<bint>getMaximumValue))             # <<<<<<<<<<<<<<
*     py_result = <int64_t>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 736, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_bv, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 736, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_bvID); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 736, __pyx_L1_error)
__pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_getMaximumValue); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 736, __pyx_L1_error)
__pyx_v__r = getModel_BV(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), __pyx_t_1);

/* "monosat/monosat_p.pyx":737
*
*     cdef int64_t _r = _getModel_BV_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID), (<bint>getMaximumValue))
*     py_result = <int64_t>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int64_t)__pyx_v__r);

/* "monosat/monosat_p.pyx":738
*     cdef int64_t _r = _getModel_BV_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID), (<bint>getMaximumValue))
*     py_result = <int64_t>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def getModel_EdgeFlow( S ,  G ,  maxflow_literal ,  edgeLit ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_7 = __Pyx_PyInt_From_int64_t(__pyx_v_py_result); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 738, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_r = __pyx_t_7;
__pyx_t_7 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":726
*     return py_result
*
* def getModel_BV( S ,  bv ,  bvID ,  getMaximumValue ):             # <<<<<<<<<<<<<<
*     """Cython signature: int64_t getModel_BV(void* S, void* bv, int bvID, bint getMaximumValue)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_7);
__Pyx_AddTraceback("monosat.monosat_p.getModel_BV", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":740
*     return py_result
*
* def getModel_EdgeFlow( S ,  G ,  maxflow_literal ,  edgeLit ):             # <<<<<<<<<<<<<<
*     """Cython signature: int64_t getModel_EdgeFlow(void* S, void* G, int maxflow_literal, int edgeLit)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_97getModel_EdgeFlow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_96getModel_EdgeFlow[] = "Cython signature: int64_t getModel_EdgeFlow(void* S, void* G, int maxflow_literal, int edgeLit)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_97getModel_EdgeFlow = {"getModel_EdgeFlow", (PyCFunction)__pyx_pw_7monosat_9monosat_p_97getModel_EdgeFlow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_96getModel_EdgeFlow};
static PyObject *__pyx_pw_7monosat_9monosat_p_97getModel_EdgeFlow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_G = 0;
PyObject *__pyx_v_maxflow_literal = 0;
PyObject *__pyx_v_edgeLit = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("getModel_EdgeFlow (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_G,&__pyx_n_s_maxflow_literal,&__pyx_n_s_edgeLit,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_S)) != 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_G)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("getModel_EdgeFlow", 1, 4, 4, 1); __PYX_ERR(0, 740, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_maxflow_literal)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("getModel_EdgeFlow", 1, 4, 4, 2); __PYX_ERR(0, 740, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_edgeLit)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("getModel_EdgeFlow", 1, 4, 4, 3); __PYX_ERR(0, 740, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getModel_EdgeFlow") < 0)) __PYX_ERR(0, 740, __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_S = values[0];
__pyx_v_G = values[1];
__pyx_v_maxflow_literal = values[2];
__pyx_v_edgeLit = values[3];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("getModel_EdgeFlow", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 740, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.getModel_EdgeFlow", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_96getModel_EdgeFlow(__pyx_self, __pyx_v_S, __pyx_v_G, __pyx_v_maxflow_literal, __pyx_v_edgeLit);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_96getModel_EdgeFlow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_maxflow_literal, PyObject *__pyx_v_edgeLit) {
int64_t __pyx_v__r;
int64_t __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("getModel_EdgeFlow", 0);

/* "monosat/monosat_p.pyx":744
*
*
*     assert isinstance(maxflow_literal, (int, long)), 'arg maxflow_literal wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(edgeLit, (int, long)), 'arg edgeLit wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_maxflow_literal);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_maxflow_literal);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_maxflow_literal_wrong_type);
 __PYX_ERR(0, 744, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":745
*
*     assert isinstance(maxflow_literal, (int, long)), 'arg maxflow_literal wrong type'
*     assert isinstance(edgeLit, (int, long)), 'arg edgeLit wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_edgeLit);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_edgeLit);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_edgeLit_wrong_type);
 __PYX_ERR(0, 745, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":750
*
*
*     cdef int64_t _r = _getModel_EdgeFlow_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>maxflow_literal), (<int>edgeLit))             # <<<<<<<<<<<<<<
*     py_result = <int64_t>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 750, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_G, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 750, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_maxflow_literal); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 750, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_edgeLit); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 750, __pyx_L1_error)
__pyx_v__r = getModel_EdgeFlow(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7));

/* "monosat/monosat_p.pyx":751
*
*     cdef int64_t _r = _getModel_EdgeFlow_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>maxflow_literal), (<int>edgeLit))
*     py_result = <int64_t>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int64_t)__pyx_v__r);

/* "monosat/monosat_p.pyx":752
*     cdef int64_t _r = _getModel_EdgeFlow_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>maxflow_literal), (<int>edgeLit))
*     py_result = <int64_t>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def getModel_Literal( S ,  lit ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_8 = __Pyx_PyInt_From_int64_t(__pyx_v_py_result); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 752, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__pyx_r = __pyx_t_8;
__pyx_t_8 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":740
*     return py_result
*
* def getModel_EdgeFlow( S ,  G ,  maxflow_literal ,  edgeLit ):             # <<<<<<<<<<<<<<
*     """Cython signature: int64_t getModel_EdgeFlow(void* S, void* G, int maxflow_literal, int edgeLit)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_8);
__Pyx_AddTraceback("monosat.monosat_p.getModel_EdgeFlow", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":754
*     return py_result
*
* def getModel_Literal( S ,  lit ):             # <<<<<<<<<<<<<<
*     """Cython signature: int getModel_Literal(void* S, int lit)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_99getModel_Literal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_98getModel_Literal[] = "Cython signature: int getModel_Literal(void* S, int lit)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_99getModel_Literal = {"getModel_Literal", (PyCFunction)__pyx_pw_7monosat_9monosat_p_99getModel_Literal, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_98getModel_Literal};
static PyObject *__pyx_pw_7monosat_9monosat_p_99getModel_Literal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_lit = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("getModel_Literal (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_lit,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_S)) != 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_lit)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("getModel_Literal", 1, 2, 2, 1); __PYX_ERR(0, 754, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getModel_Literal") < 0)) __PYX_ERR(0, 754, __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_S = values[0];
__pyx_v_lit = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("getModel_Literal", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 754, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.getModel_Literal", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_98getModel_Literal(__pyx_self, __pyx_v_S, __pyx_v_lit);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_98getModel_Literal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_lit) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
int __pyx_t_5;
PyObject *__pyx_t_6 = NULL;
__Pyx_RefNannySetupContext("getModel_Literal", 0);

/* "monosat/monosat_p.pyx":757
*     """Cython signature: int getModel_Literal(void* S, int lit)"""
*
*     assert isinstance(lit, (int, long)), 'arg lit wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_lit);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_lit);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_lit_wrong_type);
 __PYX_ERR(0, 757, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":760
*
*
*     cdef int _r = _getModel_Literal_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>lit))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 760, __pyx_L1_error)
__pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_lit); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 760, __pyx_L1_error)
__pyx_v__r = getModel_Literal(((void *)__pyx_t_4), ((int)__pyx_t_5));

/* "monosat/monosat_p.pyx":761
*
*     cdef int _r = _getModel_Literal_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>lit))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":762
*     cdef int _r = _getModel_Literal_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>lit))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def getModel_MaxFlow( S ,  G ,  maxflow_literal ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 762, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_r = __pyx_t_6;
__pyx_t_6 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":754
*     return py_result
*
* def getModel_Literal( S ,  lit ):             # <<<<<<<<<<<<<<
*     """Cython signature: int getModel_Literal(void* S, int lit)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_6);
__Pyx_AddTraceback("monosat.monosat_p.getModel_Literal", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":764
*     return py_result
*
* def getModel_MaxFlow( S ,  G ,  maxflow_literal ):             # <<<<<<<<<<<<<<
*     """Cython signature: int64_t getModel_MaxFlow(void* S, void* G, int maxflow_literal)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_101getModel_MaxFlow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_100getModel_MaxFlow[] = "Cython signature: int64_t getModel_MaxFlow(void* S, void* G, int maxflow_literal)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_101getModel_MaxFlow = {"getModel_MaxFlow", (PyCFunction)__pyx_pw_7monosat_9monosat_p_101getModel_MaxFlow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_100getModel_MaxFlow};
static PyObject *__pyx_pw_7monosat_9monosat_p_101getModel_MaxFlow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_G = 0;
PyObject *__pyx_v_maxflow_literal = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("getModel_MaxFlow (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_G,&__pyx_n_s_maxflow_literal,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_S)) != 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_G)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("getModel_MaxFlow", 1, 3, 3, 1); __PYX_ERR(0, 764, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_maxflow_literal)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("getModel_MaxFlow", 1, 3, 3, 2); __PYX_ERR(0, 764, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getModel_MaxFlow") < 0)) __PYX_ERR(0, 764, __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_S = values[0];
__pyx_v_G = values[1];
__pyx_v_maxflow_literal = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("getModel_MaxFlow", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 764, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.getModel_MaxFlow", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_100getModel_MaxFlow(__pyx_self, __pyx_v_S, __pyx_v_G, __pyx_v_maxflow_literal);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_100getModel_MaxFlow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_maxflow_literal) {
int64_t __pyx_v__r;
int64_t __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
PyObject *__pyx_t_7 = NULL;
__Pyx_RefNannySetupContext("getModel_MaxFlow", 0);

/* "monosat/monosat_p.pyx":768
*
*
*     assert isinstance(maxflow_literal, (int, long)), 'arg maxflow_literal wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_maxflow_literal);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_maxflow_literal);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_maxflow_literal_wrong_type);
 __PYX_ERR(0, 768, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":772
*
*
*     cdef int64_t _r = _getModel_MaxFlow_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>maxflow_literal))             # <<<<<<<<<<<<<<
*     py_result = <int64_t>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 772, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_G, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 772, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_maxflow_literal); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 772, __pyx_L1_error)
__pyx_v__r = getModel_MaxFlow(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6));

/* "monosat/monosat_p.pyx":773
*
*     cdef int64_t _r = _getModel_MaxFlow_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>maxflow_literal))
*     py_result = <int64_t>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int64_t)__pyx_v__r);

/* "monosat/monosat_p.pyx":774
*     cdef int64_t _r = _getModel_MaxFlow_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>maxflow_literal))
*     py_result = <int64_t>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def getModel_MinimumSpanningTreeWeight( S ,  G ,  spanning_tree_literal ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_7 = __Pyx_PyInt_From_int64_t(__pyx_v_py_result); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 774, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_r = __pyx_t_7;
__pyx_t_7 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":764
*     return py_result
*
* def getModel_MaxFlow( S ,  G ,  maxflow_literal ):             # <<<<<<<<<<<<<<
*     """Cython signature: int64_t getModel_MaxFlow(void* S, void* G, int maxflow_literal)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_7);
__Pyx_AddTraceback("monosat.monosat_p.getModel_MaxFlow", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":776
*     return py_result
*
* def getModel_MinimumSpanningTreeWeight( S ,  G ,  spanning_tree_literal ):             # <<<<<<<<<<<<<<
*     """Cython signature: int64_t getModel_MinimumSpanningTreeWeight(void* S, void* G, int spanning_tree_literal)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_103getModel_MinimumSpanningTreeWeight(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_102getModel_MinimumSpanningTreeWeight[] = "Cython signature: int64_t getModel_MinimumSpanningTreeWeight(void* S, void* G, int spanning_tree_literal)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_103getModel_MinimumSpanningTreeWeight = {"getModel_MinimumSpanningTreeWeight", (PyCFunction)__pyx_pw_7monosat_9monosat_p_103getModel_MinimumSpanningTreeWeight, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_102getModel_MinimumSpanningTreeWeight};
static PyObject *__pyx_pw_7monosat_9monosat_p_103getModel_MinimumSpanningTreeWeight(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_G = 0;
PyObject *__pyx_v_spanning_tree_literal = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("getModel_MinimumSpanningTreeWeight (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_G,&__pyx_n_s_spanning_tree_literal,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_S)) != 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_G)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("getModel_MinimumSpanningTreeWeight", 1, 3, 3, 1); __PYX_ERR(0, 776, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_spanning_tree_literal)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("getModel_MinimumSpanningTreeWeight", 1, 3, 3, 2); __PYX_ERR(0, 776, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getModel_MinimumSpanningTreeWeight") < 0)) __PYX_ERR(0, 776, __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_S = values[0];
__pyx_v_G = values[1];
__pyx_v_spanning_tree_literal = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("getModel_MinimumSpanningTreeWeight", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 776, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.getModel_MinimumSpanningTreeWeight", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_102getModel_MinimumSpanningTreeWeight(__pyx_self, __pyx_v_S, __pyx_v_G, __pyx_v_spanning_tree_literal);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_102getModel_MinimumSpanningTreeWeight(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_spanning_tree_literal) {
int64_t __pyx_v__r;
int64_t __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
PyObject *__pyx_t_7 = NULL;
__Pyx_RefNannySetupContext("getModel_MinimumSpanningTreeWeight", 0);

/* "monosat/monosat_p.pyx":780
*
*
*     assert isinstance(spanning_tree_literal, (int, long)), 'arg spanning_tree_literal wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_spanning_tree_literal);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_spanning_tree_literal);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_spanning_tree_literal_wrong);
 __PYX_ERR(0, 780, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":784
*
*
*     cdef int64_t _r = _getModel_MinimumSpanningTreeWeight_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>spanning_tree_literal))             # <<<<<<<<<<<<<<
*     py_result = <int64_t>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 784, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_G, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 784, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_spanning_tree_literal); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 784, __pyx_L1_error)
__pyx_v__r = getModel_MinimumSpanningTreeWeight(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6));

/* "monosat/monosat_p.pyx":785
*
*     cdef int64_t _r = _getModel_MinimumSpanningTreeWeight_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>spanning_tree_literal))
*     py_result = <int64_t>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int64_t)__pyx_v__r);

/* "monosat/monosat_p.pyx":786
*     cdef int64_t _r = _getModel_MinimumSpanningTreeWeight_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>spanning_tree_literal))
*     py_result = <int64_t>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def getModel_Path_EdgeLits( S ,  G ,  reach_or_distance_literal ,  store_length ,  store ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_7 = __Pyx_PyInt_From_int64_t(__pyx_v_py_result); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 786, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_r = __pyx_t_7;
__pyx_t_7 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":776
*     return py_result
*
* def getModel_MinimumSpanningTreeWeight( S ,  G ,  spanning_tree_literal ):             # <<<<<<<<<<<<<<
*     """Cython signature: int64_t getModel_MinimumSpanningTreeWeight(void* S, void* G, int spanning_tree_literal)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_7);
__Pyx_AddTraceback("monosat.monosat_p.getModel_MinimumSpanningTreeWeight", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":788
*     return py_result
*
* def getModel_Path_EdgeLits( S ,  G ,  reach_or_distance_literal ,  store_length ,  store ):             # <<<<<<<<<<<<<<
*     """Cython signature: int getModel_Path_EdgeLits(void* S, void* G, int reach_or_distance_literal, int store_length, int* store)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_105getModel_Path_EdgeLits(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_104getModel_Path_EdgeLits[] = "Cython signature: int getModel_Path_EdgeLits(void* S, void* G, int reach_or_distance_literal, int store_length, int* store)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_105getModel_Path_EdgeLits = {"getModel_Path_EdgeLits", (PyCFunction)__pyx_pw_7monosat_9monosat_p_105getModel_Path_EdgeLits, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_104getModel_Path_EdgeLits};
static PyObject *__pyx_pw_7monosat_9monosat_p_105getModel_Path_EdgeLits(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_G = 0;
PyObject *__pyx_v_reach_or_distance_literal = 0;
PyObject *__pyx_v_store_length = 0;
PyObject *__pyx_v_store = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("getModel_Path_EdgeLits (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_G,&__pyx_n_s_reach_or_distance_literal,&__pyx_n_s_store_length,&__pyx_n_s_store,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_S)) != 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_G)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("getModel_Path_EdgeLits", 1, 5, 5, 1); __PYX_ERR(0, 788, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reach_or_distance_literal)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("getModel_Path_EdgeLits", 1, 5, 5, 2); __PYX_ERR(0, 788, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_store_length)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("getModel_Path_EdgeLits", 1, 5, 5, 3); __PYX_ERR(0, 788, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_store)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("getModel_Path_EdgeLits", 1, 5, 5, 4); __PYX_ERR(0, 788, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getModel_Path_EdgeLits") < 0)) __PYX_ERR(0, 788, __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_S = values[0];
__pyx_v_G = values[1];
__pyx_v_reach_or_distance_literal = values[2];
__pyx_v_store_length = values[3];
__pyx_v_store = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("getModel_Path_EdgeLits", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 788, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.getModel_Path_EdgeLits", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_104getModel_Path_EdgeLits(__pyx_self, __pyx_v_S, __pyx_v_G, __pyx_v_reach_or_distance_literal, __pyx_v_store_length, __pyx_v_store);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_104getModel_Path_EdgeLits(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_reach_or_distance_literal, PyObject *__pyx_v_store_length, PyObject *__pyx_v_store) {
PyObject *__pyx_v_initializer = NULL;
arrayobject *__pyx_v_a = 0;
int __pyx_v__r;
PyObject *__pyx_v_lit = NULL;
int __pyx_v_py_result;
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;
Py_ssize_t __pyx_t_6;
void *__pyx_t_7;
void *__pyx_t_8;
int __pyx_t_9;
int __pyx_t_10;
PyObject *__pyx_t_11 = NULL;
PyObject *(*__pyx_t_12)(PyObject *);
int __pyx_t_13;
__Pyx_RefNannySetupContext("getModel_Path_EdgeLits", 0);

/* "monosat/monosat_p.pyx":792
*
*
*     assert isinstance(reach_or_distance_literal, (int, long)), 'arg reach_or_distance_literal wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(store_length,(int,long)), 'arg store_length wrong type'
*     assert isinstance(store, list), 'arg store wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_reach_or_distance_literal);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_reach_or_distance_literal);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_reach_or_distance_literal_wr);
 __PYX_ERR(0, 792, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":793
*
*     assert isinstance(reach_or_distance_literal, (int, long)), 'arg reach_or_distance_literal wrong type'
*     assert isinstance(store_length,(int,long)), 'arg store_length wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(store, list), 'arg store wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_store_length);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_store_length);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_store_length_wrong_type);
 __PYX_ERR(0, 793, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":794
*     assert isinstance(reach_or_distance_literal, (int, long)), 'arg reach_or_distance_literal wrong type'
*     assert isinstance(store_length,(int,long)), 'arg store_length wrong type'
*     assert isinstance(store, list), 'arg store wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_1 = PyList_Check(__pyx_v_store);
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_store_wrong_type);
 __PYX_ERR(0, 794, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":797
*
*
*     initializer = list(range(store_length))             # <<<<<<<<<<<<<<
*     assert(len(initializer)==store_length)
*     cdef array.array a =  array.array('i', initializer) #is there a better way to initialize an array.array to length n?
*/
__pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_store_length); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 797, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = PySequence_List(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 797, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_initializer = ((PyObject*)__pyx_t_5);
__pyx_t_5 = 0;

/* "monosat/monosat_p.pyx":798
*
*     initializer = list(range(store_length))
*     assert(len(initializer)==store_length)             # <<<<<<<<<<<<<<
*     cdef array.array a =  array.array('i', initializer) #is there a better way to initialize an array.array to length n?
*     cdef int _r = _getModel_Path_EdgeLits_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>reach_or_distance_literal), (<int>store_length), (<int*>a.data.as_ints))
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_6 = PyList_GET_SIZE(__pyx_v_initializer); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 798, __pyx_L1_error)
__pyx_t_5 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 798, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_v_store_length, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 798, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 798, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (unlikely(!__pyx_t_1)) {
 PyErr_SetNone(PyExc_AssertionError);
 __PYX_ERR(0, 798, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":799
*     initializer = list(range(store_length))
*     assert(len(initializer)==store_length)
*     cdef array.array a =  array.array('i', initializer) #is there a better way to initialize an array.array to length n?             # <<<<<<<<<<<<<<
*     cdef int _r = _getModel_Path_EdgeLits_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>reach_or_distance_literal), (<int>store_length), (<int*>a.data.as_ints))
*     store.clear()
*/
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 799, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_n_s_i);
__Pyx_GIVEREF(__pyx_n_s_i);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_i);
__Pyx_INCREF(__pyx_v_initializer);
__Pyx_GIVEREF(__pyx_v_initializer);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_initializer);
__pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 799, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_a = ((arrayobject *)__pyx_t_5);
__pyx_t_5 = 0;

/* "monosat/monosat_p.pyx":800
*     assert(len(initializer)==store_length)
*     cdef array.array a =  array.array('i', initializer) #is there a better way to initialize an array.array to length n?
*     cdef int _r = _getModel_Path_EdgeLits_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>reach_or_distance_literal), (<int>store_length), (<int*>a.data.as_ints))             # <<<<<<<<<<<<<<
*     store.clear()
*     for lit in a:
*/
__pyx_t_7 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_7 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 800, __pyx_L1_error)
__pyx_t_8 = PyCapsule_GetPointer(__pyx_v_G, NULL); if (unlikely(__pyx_t_8 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 800, __pyx_L1_error)
__pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_reach_or_distance_literal); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 800, __pyx_L1_error)
__pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_store_length); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 800, __pyx_L1_error)
__pyx_v__r = getModel_Path_EdgeLits(((void *)__pyx_t_7), ((void *)__pyx_t_8), ((int)__pyx_t_9), ((int)__pyx_t_10), ((int *)__pyx_v_a->data.as_ints));

/* "monosat/monosat_p.pyx":801
*     cdef array.array a =  array.array('i', initializer) #is there a better way to initialize an array.array to length n?
*     cdef int _r = _getModel_Path_EdgeLits_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>reach_or_distance_literal), (<int>store_length), (<int*>a.data.as_ints))
*     store.clear()             # <<<<<<<<<<<<<<
*     for lit in a:
*         store.append(lit)
*/
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_store, __pyx_n_s_clear); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 801, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_11 = NULL;
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_11)) {
 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
 __Pyx_INCREF(__pyx_t_11);
 __Pyx_INCREF(function);
 __Pyx_DECREF_SET(__pyx_t_4, function);
}
}
if (__pyx_t_11) {
__pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 801, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
} else {
__pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 801, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

/* "monosat/monosat_p.pyx":802
*     cdef int _r = _getModel_Path_EdgeLits_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>reach_or_distance_literal), (<int>store_length), (<int*>a.data.as_ints))
*     store.clear()
*     for lit in a:             # <<<<<<<<<<<<<<
*         store.append(lit)
*     assert(len(store)==store_length)
*/
if (likely(PyList_CheckExact(((PyObject *)__pyx_v_a))) || PyTuple_CheckExact(((PyObject *)__pyx_v_a))) {
__pyx_t_5 = ((PyObject *)__pyx_v_a); __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
__pyx_t_12 = NULL;
} else {
__pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(((PyObject *)__pyx_v_a)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 802, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_12 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 802, __pyx_L1_error)
}
for (;;) {
if (likely(!__pyx_t_12)) {
 if (likely(PyList_CheckExact(__pyx_t_5))) {
   if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 802, __pyx_L1_error)
#else
   __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 802, __pyx_L1_error)
   __Pyx_GOTREF(__pyx_t_4);
#endif
 } else {
   if (__pyx_t_6 >= 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_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 802, __pyx_L1_error)
#else
   __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 802, __pyx_L1_error)
   __Pyx_GOTREF(__pyx_t_4);
#endif
 }
} else {
 __pyx_t_4 = __pyx_t_12(__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, 802, __pyx_L1_error)
   }
   break;
 }
 __Pyx_GOTREF(__pyx_t_4);
}
__Pyx_XDECREF_SET(__pyx_v_lit, __pyx_t_4);
__pyx_t_4 = 0;

/* "monosat/monosat_p.pyx":803
*     store.clear()
*     for lit in a:
*         store.append(lit)             # <<<<<<<<<<<<<<
*     assert(len(store)==store_length)
*     py_result = <int>_r
*/
__pyx_t_13 = __Pyx_PyObject_Append(__pyx_v_store, __pyx_v_lit); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 803, __pyx_L1_error)

/* "monosat/monosat_p.pyx":802
*     cdef int _r = _getModel_Path_EdgeLits_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>reach_or_distance_literal), (<int>store_length), (<int*>a.data.as_ints))
*     store.clear()
*     for lit in a:             # <<<<<<<<<<<<<<
*         store.append(lit)
*     assert(len(store)==store_length)
*/
}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

/* "monosat/monosat_p.pyx":804
*     for lit in a:
*         store.append(lit)
*     assert(len(store)==store_length)             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_6 = PyObject_Length(__pyx_v_store); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 804, __pyx_L1_error)
__pyx_t_5 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 804, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_v_store_length, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 804, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 804, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (unlikely(!__pyx_t_1)) {
 PyErr_SetNone(PyExc_AssertionError);
 __PYX_ERR(0, 804, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":805
*         store.append(lit)
*     assert(len(store)==store_length)
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":806
*     assert(len(store)==store_length)
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def getModel_Path_EdgeLits_Length( S ,  G ,  reach_or_distance_literal ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 806, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_r = __pyx_t_4;
__pyx_t_4 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":788
*     return py_result
*
* def getModel_Path_EdgeLits( S ,  G ,  reach_or_distance_literal ,  store_length ,  store ):             # <<<<<<<<<<<<<<
*     """Cython signature: int getModel_Path_EdgeLits(void* S, void* G, int reach_or_distance_literal, int store_length, int* store)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_11);
__Pyx_AddTraceback("monosat.monosat_p.getModel_Path_EdgeLits", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_initializer);
__Pyx_XDECREF((PyObject *)__pyx_v_a);
__Pyx_XDECREF(__pyx_v_lit);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":808
*     return py_result
*
* def getModel_Path_EdgeLits_Length( S ,  G ,  reach_or_distance_literal ):             # <<<<<<<<<<<<<<
*     """Cython signature: int getModel_Path_EdgeLits_Length(void* S, void* G, int reach_or_distance_literal)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_107getModel_Path_EdgeLits_Length(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_106getModel_Path_EdgeLits_Length[] = "Cython signature: int getModel_Path_EdgeLits_Length(void* S, void* G, int reach_or_distance_literal)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_107getModel_Path_EdgeLits_Length = {"getModel_Path_EdgeLits_Length", (PyCFunction)__pyx_pw_7monosat_9monosat_p_107getModel_Path_EdgeLits_Length, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_106getModel_Path_EdgeLits_Length};
static PyObject *__pyx_pw_7monosat_9monosat_p_107getModel_Path_EdgeLits_Length(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_G = 0;
PyObject *__pyx_v_reach_or_distance_literal = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("getModel_Path_EdgeLits_Length (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_G,&__pyx_n_s_reach_or_distance_literal,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_S)) != 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_G)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("getModel_Path_EdgeLits_Length", 1, 3, 3, 1); __PYX_ERR(0, 808, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reach_or_distance_literal)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("getModel_Path_EdgeLits_Length", 1, 3, 3, 2); __PYX_ERR(0, 808, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getModel_Path_EdgeLits_Length") < 0)) __PYX_ERR(0, 808, __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_S = values[0];
__pyx_v_G = values[1];
__pyx_v_reach_or_distance_literal = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("getModel_Path_EdgeLits_Length", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 808, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.getModel_Path_EdgeLits_Length", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_106getModel_Path_EdgeLits_Length(__pyx_self, __pyx_v_S, __pyx_v_G, __pyx_v_reach_or_distance_literal);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_106getModel_Path_EdgeLits_Length(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_reach_or_distance_literal) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
PyObject *__pyx_t_7 = NULL;
__Pyx_RefNannySetupContext("getModel_Path_EdgeLits_Length", 0);

/* "monosat/monosat_p.pyx":812
*
*
*     assert isinstance(reach_or_distance_literal, (int, long)), 'arg reach_or_distance_literal wrong type'             # <<<<<<<<<<<<<<
*     cdef int _r = _getModel_Path_EdgeLits_Length_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>reach_or_distance_literal))
*     py_result = <int>_r
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_reach_or_distance_literal);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_reach_or_distance_literal);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_reach_or_distance_literal_wr);
 __PYX_ERR(0, 812, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":813
*
*     assert isinstance(reach_or_distance_literal, (int, long)), 'arg reach_or_distance_literal wrong type'
*     cdef int _r = _getModel_Path_EdgeLits_Length_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>reach_or_distance_literal))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 813, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_G, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 813, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_reach_or_distance_literal); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 813, __pyx_L1_error)
__pyx_v__r = getModel_Path_EdgeLits_Length(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6));

/* "monosat/monosat_p.pyx":814
*     assert isinstance(reach_or_distance_literal, (int, long)), 'arg reach_or_distance_literal wrong type'
*     cdef int _r = _getModel_Path_EdgeLits_Length_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>reach_or_distance_literal))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":815
*     cdef int _r = _getModel_Path_EdgeLits_Length_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>reach_or_distance_literal))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def getModel_Path_Nodes( S ,  G ,  reach_or_distance_literal ,  store_length ,  store ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 815, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_r = __pyx_t_7;
__pyx_t_7 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":808
*     return py_result
*
* def getModel_Path_EdgeLits_Length( S ,  G ,  reach_or_distance_literal ):             # <<<<<<<<<<<<<<
*     """Cython signature: int getModel_Path_EdgeLits_Length(void* S, void* G, int reach_or_distance_literal)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_7);
__Pyx_AddTraceback("monosat.monosat_p.getModel_Path_EdgeLits_Length", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":817
*     return py_result
*
* def getModel_Path_Nodes( S ,  G ,  reach_or_distance_literal ,  store_length ,  store ):             # <<<<<<<<<<<<<<
*     """Cython signature: int getModel_Path_Nodes(void* S, void* G, int reach_or_distance_literal, int store_length, int* store)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_109getModel_Path_Nodes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_108getModel_Path_Nodes[] = "Cython signature: int getModel_Path_Nodes(void* S, void* G, int reach_or_distance_literal, int store_length, int* store)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_109getModel_Path_Nodes = {"getModel_Path_Nodes", (PyCFunction)__pyx_pw_7monosat_9monosat_p_109getModel_Path_Nodes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_108getModel_Path_Nodes};
static PyObject *__pyx_pw_7monosat_9monosat_p_109getModel_Path_Nodes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_G = 0;
PyObject *__pyx_v_reach_or_distance_literal = 0;
PyObject *__pyx_v_store_length = 0;
PyObject *__pyx_v_store = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("getModel_Path_Nodes (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_G,&__pyx_n_s_reach_or_distance_literal,&__pyx_n_s_store_length,&__pyx_n_s_store,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_S)) != 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_G)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("getModel_Path_Nodes", 1, 5, 5, 1); __PYX_ERR(0, 817, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reach_or_distance_literal)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("getModel_Path_Nodes", 1, 5, 5, 2); __PYX_ERR(0, 817, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_store_length)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("getModel_Path_Nodes", 1, 5, 5, 3); __PYX_ERR(0, 817, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_store)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("getModel_Path_Nodes", 1, 5, 5, 4); __PYX_ERR(0, 817, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getModel_Path_Nodes") < 0)) __PYX_ERR(0, 817, __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_S = values[0];
__pyx_v_G = values[1];
__pyx_v_reach_or_distance_literal = values[2];
__pyx_v_store_length = values[3];
__pyx_v_store = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("getModel_Path_Nodes", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 817, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.getModel_Path_Nodes", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_108getModel_Path_Nodes(__pyx_self, __pyx_v_S, __pyx_v_G, __pyx_v_reach_or_distance_literal, __pyx_v_store_length, __pyx_v_store);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_108getModel_Path_Nodes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_reach_or_distance_literal, PyObject *__pyx_v_store_length, PyObject *__pyx_v_store) {
PyObject *__pyx_v_initializer = NULL;
arrayobject *__pyx_v_a = 0;
int __pyx_v__r;
PyObject *__pyx_v_node = NULL;
int __pyx_v_py_result;
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;
Py_ssize_t __pyx_t_6;
void *__pyx_t_7;
void *__pyx_t_8;
int __pyx_t_9;
int __pyx_t_10;
PyObject *__pyx_t_11 = NULL;
PyObject *(*__pyx_t_12)(PyObject *);
int __pyx_t_13;
__Pyx_RefNannySetupContext("getModel_Path_Nodes", 0);

/* "monosat/monosat_p.pyx":821
*
*
*     assert isinstance(reach_or_distance_literal, (int, long)), 'arg reach_or_distance_literal wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(store_length, (int,long)), 'arg store_length wrong type'
*     assert isinstance(store, list), 'arg store wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_reach_or_distance_literal);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_reach_or_distance_literal);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_reach_or_distance_literal_wr);
 __PYX_ERR(0, 821, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":822
*
*     assert isinstance(reach_or_distance_literal, (int, long)), 'arg reach_or_distance_literal wrong type'
*     assert isinstance(store_length, (int,long)), 'arg store_length wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(store, list), 'arg store wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_store_length);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_store_length);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_store_length_wrong_type);
 __PYX_ERR(0, 822, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":823
*     assert isinstance(reach_or_distance_literal, (int, long)), 'arg reach_or_distance_literal wrong type'
*     assert isinstance(store_length, (int,long)), 'arg store_length wrong type'
*     assert isinstance(store, list), 'arg store wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_1 = PyList_Check(__pyx_v_store);
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_store_wrong_type);
 __PYX_ERR(0, 823, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":826
*
*
*     initializer = list(range(store_length))             # <<<<<<<<<<<<<<
*     assert(len(initializer)==store_length)
*     cdef array.array a =  array.array('i', initializer) #is there a better way to initialize an array.array to length n?
*/
__pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_store_length); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 826, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = PySequence_List(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 826, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_initializer = ((PyObject*)__pyx_t_5);
__pyx_t_5 = 0;

/* "monosat/monosat_p.pyx":827
*
*     initializer = list(range(store_length))
*     assert(len(initializer)==store_length)             # <<<<<<<<<<<<<<
*     cdef array.array a =  array.array('i', initializer) #is there a better way to initialize an array.array to length n?
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_6 = PyList_GET_SIZE(__pyx_v_initializer); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 827, __pyx_L1_error)
__pyx_t_5 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 827, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_v_store_length, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 827, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 827, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (unlikely(!__pyx_t_1)) {
 PyErr_SetNone(PyExc_AssertionError);
 __PYX_ERR(0, 827, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":828
*     initializer = list(range(store_length))
*     assert(len(initializer)==store_length)
*     cdef array.array a =  array.array('i', initializer) #is there a better way to initialize an array.array to length n?             # <<<<<<<<<<<<<<
*
*     cdef int _r = _getModel_Path_Nodes_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>reach_or_distance_literal), (<int>store_length),(<int*>a.data.as_ints))
*/
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 828, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_n_s_i);
__Pyx_GIVEREF(__pyx_n_s_i);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_i);
__Pyx_INCREF(__pyx_v_initializer);
__Pyx_GIVEREF(__pyx_v_initializer);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_initializer);
__pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 828, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_a = ((arrayobject *)__pyx_t_5);
__pyx_t_5 = 0;

/* "monosat/monosat_p.pyx":830
*     cdef array.array a =  array.array('i', initializer) #is there a better way to initialize an array.array to length n?
*
*     cdef int _r = _getModel_Path_Nodes_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>reach_or_distance_literal), (<int>store_length),(<int*>a.data.as_ints))             # <<<<<<<<<<<<<<
*     store.clear()
*     for node in a:
*/
__pyx_t_7 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_7 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 830, __pyx_L1_error)
__pyx_t_8 = PyCapsule_GetPointer(__pyx_v_G, NULL); if (unlikely(__pyx_t_8 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 830, __pyx_L1_error)
__pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_reach_or_distance_literal); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 830, __pyx_L1_error)
__pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_store_length); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 830, __pyx_L1_error)
__pyx_v__r = getModel_Path_Nodes(((void *)__pyx_t_7), ((void *)__pyx_t_8), ((int)__pyx_t_9), ((int)__pyx_t_10), ((int *)__pyx_v_a->data.as_ints));

/* "monosat/monosat_p.pyx":831
*
*     cdef int _r = _getModel_Path_Nodes_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>reach_or_distance_literal), (<int>store_length),(<int*>a.data.as_ints))
*     store.clear()             # <<<<<<<<<<<<<<
*     for node in a:
*         store.append(node)
*/
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_store, __pyx_n_s_clear); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 831, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_11 = NULL;
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_11)) {
 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
 __Pyx_INCREF(__pyx_t_11);
 __Pyx_INCREF(function);
 __Pyx_DECREF_SET(__pyx_t_4, function);
}
}
if (__pyx_t_11) {
__pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 831, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
} else {
__pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 831, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

/* "monosat/monosat_p.pyx":832
*     cdef int _r = _getModel_Path_Nodes_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>reach_or_distance_literal), (<int>store_length),(<int*>a.data.as_ints))
*     store.clear()
*     for node in a:             # <<<<<<<<<<<<<<
*         store.append(node)
*     assert(len(store)==store_length)
*/
if (likely(PyList_CheckExact(((PyObject *)__pyx_v_a))) || PyTuple_CheckExact(((PyObject *)__pyx_v_a))) {
__pyx_t_5 = ((PyObject *)__pyx_v_a); __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
__pyx_t_12 = NULL;
} else {
__pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(((PyObject *)__pyx_v_a)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 832, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_12 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 832, __pyx_L1_error)
}
for (;;) {
if (likely(!__pyx_t_12)) {
 if (likely(PyList_CheckExact(__pyx_t_5))) {
   if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 832, __pyx_L1_error)
#else
   __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 832, __pyx_L1_error)
   __Pyx_GOTREF(__pyx_t_4);
#endif
 } else {
   if (__pyx_t_6 >= 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_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 832, __pyx_L1_error)
#else
   __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 832, __pyx_L1_error)
   __Pyx_GOTREF(__pyx_t_4);
#endif
 }
} else {
 __pyx_t_4 = __pyx_t_12(__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, 832, __pyx_L1_error)
   }
   break;
 }
 __Pyx_GOTREF(__pyx_t_4);
}
__Pyx_XDECREF_SET(__pyx_v_node, __pyx_t_4);
__pyx_t_4 = 0;

/* "monosat/monosat_p.pyx":833
*     store.clear()
*     for node in a:
*         store.append(node)             # <<<<<<<<<<<<<<
*     assert(len(store)==store_length)
*     py_result = <int>_r
*/
__pyx_t_13 = __Pyx_PyObject_Append(__pyx_v_store, __pyx_v_node); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 833, __pyx_L1_error)

/* "monosat/monosat_p.pyx":832
*     cdef int _r = _getModel_Path_Nodes_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>reach_or_distance_literal), (<int>store_length),(<int*>a.data.as_ints))
*     store.clear()
*     for node in a:             # <<<<<<<<<<<<<<
*         store.append(node)
*     assert(len(store)==store_length)
*/
}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

/* "monosat/monosat_p.pyx":834
*     for node in a:
*         store.append(node)
*     assert(len(store)==store_length)             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_6 = PyObject_Length(__pyx_v_store); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 834, __pyx_L1_error)
__pyx_t_5 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 834, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_v_store_length, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 834, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 834, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (unlikely(!__pyx_t_1)) {
 PyErr_SetNone(PyExc_AssertionError);
 __PYX_ERR(0, 834, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":835
*         store.append(node)
*     assert(len(store)==store_length)
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":836
*     assert(len(store)==store_length)
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def getModel_Path_Nodes_Length( S ,  G ,  reach_or_distance_literal ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 836, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_r = __pyx_t_4;
__pyx_t_4 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":817
*     return py_result
*
* def getModel_Path_Nodes( S ,  G ,  reach_or_distance_literal ,  store_length ,  store ):             # <<<<<<<<<<<<<<
*     """Cython signature: int getModel_Path_Nodes(void* S, void* G, int reach_or_distance_literal, int store_length, int* store)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_11);
__Pyx_AddTraceback("monosat.monosat_p.getModel_Path_Nodes", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_initializer);
__Pyx_XDECREF((PyObject *)__pyx_v_a);
__Pyx_XDECREF(__pyx_v_node);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":838
*     return py_result
*
* def getModel_Path_Nodes_Length( S ,  G ,  reach_or_distance_literal ):             # <<<<<<<<<<<<<<
*     """Cython signature: int getModel_Path_Nodes_Length(void* S, void* G, int reach_or_distance_literal)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_111getModel_Path_Nodes_Length(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_110getModel_Path_Nodes_Length[] = "Cython signature: int getModel_Path_Nodes_Length(void* S, void* G, int reach_or_distance_literal)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_111getModel_Path_Nodes_Length = {"getModel_Path_Nodes_Length", (PyCFunction)__pyx_pw_7monosat_9monosat_p_111getModel_Path_Nodes_Length, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_110getModel_Path_Nodes_Length};
static PyObject *__pyx_pw_7monosat_9monosat_p_111getModel_Path_Nodes_Length(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_G = 0;
PyObject *__pyx_v_reach_or_distance_literal = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("getModel_Path_Nodes_Length (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_G,&__pyx_n_s_reach_or_distance_literal,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_S)) != 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_G)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("getModel_Path_Nodes_Length", 1, 3, 3, 1); __PYX_ERR(0, 838, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reach_or_distance_literal)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("getModel_Path_Nodes_Length", 1, 3, 3, 2); __PYX_ERR(0, 838, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getModel_Path_Nodes_Length") < 0)) __PYX_ERR(0, 838, __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_S = values[0];
__pyx_v_G = values[1];
__pyx_v_reach_or_distance_literal = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("getModel_Path_Nodes_Length", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 838, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.getModel_Path_Nodes_Length", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_110getModel_Path_Nodes_Length(__pyx_self, __pyx_v_S, __pyx_v_G, __pyx_v_reach_or_distance_literal);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_110getModel_Path_Nodes_Length(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_reach_or_distance_literal) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
PyObject *__pyx_t_7 = NULL;
__Pyx_RefNannySetupContext("getModel_Path_Nodes_Length", 0);

/* "monosat/monosat_p.pyx":842
*
*
*     assert isinstance(reach_or_distance_literal, (int, long)), 'arg reach_or_distance_literal wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_reach_or_distance_literal);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_reach_or_distance_literal);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_reach_or_distance_literal_wr);
 __PYX_ERR(0, 842, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":846
*
*
*     cdef int _r = _getModel_Path_Nodes_Length_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>reach_or_distance_literal))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 846, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_G, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 846, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_reach_or_distance_literal); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 846, __pyx_L1_error)
__pyx_v__r = getModel_Path_Nodes_Length(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6));

/* "monosat/monosat_p.pyx":847
*
*     cdef int _r = _getModel_Path_Nodes_Length_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>reach_or_distance_literal))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":848
*     cdef int _r = _getModel_Path_Nodes_Length_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>reach_or_distance_literal))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def getVersion():
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 848, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_r = __pyx_t_7;
__pyx_t_7 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":838
*     return py_result
*
* def getModel_Path_Nodes_Length( S ,  G ,  reach_or_distance_literal ):             # <<<<<<<<<<<<<<
*     """Cython signature: int getModel_Path_Nodes_Length(void* S, void* G, int reach_or_distance_literal)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_7);
__Pyx_AddTraceback("monosat.monosat_p.getModel_Path_Nodes_Length", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":850
*     return py_result
*
* def getVersion():             # <<<<<<<<<<<<<<
*     """Cython signature: char * getVersion()"""
*     cdef char  * _r = <char *>_getVersion_monosat()
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_113getVersion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_112getVersion[] = "Cython signature: char * getVersion()";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_113getVersion = {"getVersion", (PyCFunction)__pyx_pw_7monosat_9monosat_p_113getVersion, METH_NOARGS, __pyx_doc_7monosat_9monosat_p_112getVersion};
static PyObject *__pyx_pw_7monosat_9monosat_p_113getVersion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("getVersion (wrapper)", 0);
__pyx_r = __pyx_pf_7monosat_9monosat_p_112getVersion(__pyx_self);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_112getVersion(CYTHON_UNUSED PyObject *__pyx_self) {
char *__pyx_v__r;
char *__pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("getVersion", 0);

/* "monosat/monosat_p.pyx":852
* def getVersion():
*     """Cython signature: char * getVersion()"""
*     cdef char  * _r = <char *>_getVersion_monosat()             # <<<<<<<<<<<<<<
*     py_result = <char *>(_r)
*     return py_result
*/
__pyx_v__r = ((char *)getVersion());

/* "monosat/monosat_p.pyx":853
*     """Cython signature: char * getVersion()"""
*     cdef char  * _r = <char *>_getVersion_monosat()
*     py_result = <char *>(_r)             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((char *)__pyx_v__r);

/* "monosat/monosat_p.pyx":854
*     cdef char  * _r = <char *>_getVersion_monosat()
*     py_result = <char *>(_r)
*     return py_result             # <<<<<<<<<<<<<<
*
* def graph_setAssignEdgesToWeight( S ,  G ,  weight ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 854, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":850
*     return py_result
*
* def getVersion():             # <<<<<<<<<<<<<<
*     """Cython signature: char * getVersion()"""
*     cdef char  * _r = <char *>_getVersion_monosat()
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("monosat.monosat_p.getVersion", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":856
*     return py_result
*
* def graph_setAssignEdgesToWeight( S ,  G ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: void graph_setAssignEdgesToWeight(void* S, void* G, int64_t weight)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_115graph_setAssignEdgesToWeight(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_114graph_setAssignEdgesToWeight[] = "Cython signature: void graph_setAssignEdgesToWeight(void* S, void* G, int64_t weight)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_115graph_setAssignEdgesToWeight = {"graph_setAssignEdgesToWeight", (PyCFunction)__pyx_pw_7monosat_9monosat_p_115graph_setAssignEdgesToWeight, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_114graph_setAssignEdgesToWeight};
static PyObject *__pyx_pw_7monosat_9monosat_p_115graph_setAssignEdgesToWeight(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_G = 0;
PyObject *__pyx_v_weight = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("graph_setAssignEdgesToWeight (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_G,&__pyx_n_s_weight,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_S)) != 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_G)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("graph_setAssignEdgesToWeight", 1, 3, 3, 1); __PYX_ERR(0, 856, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weight)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("graph_setAssignEdgesToWeight", 1, 3, 3, 2); __PYX_ERR(0, 856, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "graph_setAssignEdgesToWeight") < 0)) __PYX_ERR(0, 856, __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_S = values[0];
__pyx_v_G = values[1];
__pyx_v_weight = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("graph_setAssignEdgesToWeight", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 856, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.graph_setAssignEdgesToWeight", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_114graph_setAssignEdgesToWeight(__pyx_self, __pyx_v_S, __pyx_v_G, __pyx_v_weight);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_114graph_setAssignEdgesToWeight(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_weight) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int64_t __pyx_t_6;
__Pyx_RefNannySetupContext("graph_setAssignEdgesToWeight", 0);

/* "monosat/monosat_p.pyx":860
*
*
*     assert isinstance(weight, (int, long)), 'arg weight wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_weight);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_weight);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_weight_wrong_type);
 __PYX_ERR(0, 860, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":864
*
*
*     _graph_setAssignEdgesToWeight_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int64_t>weight))             # <<<<<<<<<<<<<<
*
* def initBVTheory( S ):
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 864, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_G, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 864, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int64_t(__pyx_v_weight); if (unlikely((__pyx_t_6 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 864, __pyx_L1_error)
graph_setAssignEdgesToWeight(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int64_t)__pyx_t_6));

/* "monosat/monosat_p.pyx":856
*     return py_result
*
* def graph_setAssignEdgesToWeight( S ,  G ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: void graph_setAssignEdgesToWeight(void* S, void* G, int64_t weight)"""
*
*/

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

/* "monosat/monosat_p.pyx":866
*     _graph_setAssignEdgesToWeight_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int64_t>weight))
*
* def initBVTheory( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: void* initBVTheory(void* S)"""
*     #
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_117initBVTheory(PyObject *__pyx_self, PyObject *__pyx_v_S); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_116initBVTheory[] = "Cython signature: void* initBVTheory(void* S)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_117initBVTheory = {"initBVTheory", (PyCFunction)__pyx_pw_7monosat_9monosat_p_117initBVTheory, METH_O, __pyx_doc_7monosat_9monosat_p_116initBVTheory};
static PyObject *__pyx_pw_7monosat_9monosat_p_117initBVTheory(PyObject *__pyx_self, PyObject *__pyx_v_S) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("initBVTheory (wrapper)", 0);
__pyx_r = __pyx_pf_7monosat_9monosat_p_116initBVTheory(__pyx_self, ((PyObject *)__pyx_v_S));

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

static PyObject *__pyx_pf_7monosat_9monosat_p_116initBVTheory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S) {
void *__pyx_v__r;
PyObject *__pyx_v_py_result = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
void *__pyx_t_1;
PyObject *__pyx_t_2 = NULL;
__Pyx_RefNannySetupContext("initBVTheory", 0);

/* "monosat/monosat_p.pyx":873
*
*
*     cdef void* _r = _initBVTheory_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))             # <<<<<<<<<<<<<<
*     py_result =   pycapsule.PyCapsule_New(_r, NULL, NULL)
*     return py_result
*/
__pyx_t_1 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L1_error)
__pyx_v__r = initBVTheory(((void *)__pyx_t_1));

/* "monosat/monosat_p.pyx":874
*
*     cdef void* _r = _initBVTheory_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))
*     py_result =   pycapsule.PyCapsule_New(_r, NULL, NULL)             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_t_2 = PyCapsule_New(__pyx_v__r, NULL, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 874, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_v_py_result = __pyx_t_2;
__pyx_t_2 = 0;

/* "monosat/monosat_p.pyx":875
*     cdef void* _r = _initBVTheory_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))
*     py_result =   pycapsule.PyCapsule_New(_r, NULL, NULL)
*     return py_result             # <<<<<<<<<<<<<<
*
*
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_v_py_result);
__pyx_r = __pyx_v_py_result;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":866
*     _graph_setAssignEdgesToWeight_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int64_t>weight))
*
* def initBVTheory( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: void* initBVTheory(void* S)"""
*     #
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("monosat.monosat_p.initBVTheory", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_py_result);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":878
*
*
* def isDecisionVar( S ,  var ):             # <<<<<<<<<<<<<<
*     """Cython signature: bint isDecisionVar(void* S, int var)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_119isDecisionVar(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_118isDecisionVar[] = "Cython signature: bint isDecisionVar(void* S, int var)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_119isDecisionVar = {"isDecisionVar", (PyCFunction)__pyx_pw_7monosat_9monosat_p_119isDecisionVar, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_118isDecisionVar};
static PyObject *__pyx_pw_7monosat_9monosat_p_119isDecisionVar(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_var = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("isDecisionVar (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_var,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_S)) != 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_var)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("isDecisionVar", 1, 2, 2, 1); __PYX_ERR(0, 878, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "isDecisionVar") < 0)) __PYX_ERR(0, 878, __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_S = values[0];
__pyx_v_var = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("isDecisionVar", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 878, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.isDecisionVar", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_118isDecisionVar(__pyx_self, __pyx_v_S, __pyx_v_var);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_118isDecisionVar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_var) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
int __pyx_t_5;
PyObject *__pyx_t_6 = NULL;
__Pyx_RefNannySetupContext("isDecisionVar", 0);

/* "monosat/monosat_p.pyx":881
*     """Cython signature: bint isDecisionVar(void* S, int var)"""
*
*     assert isinstance(var, (int, long)), 'arg var wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_var);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_var);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_var_wrong_type);
 __PYX_ERR(0, 881, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":884
*
*
*     cdef bint _r = _isDecisionVar_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>var))             # <<<<<<<<<<<<<<
*     py_result = <bint>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 884, __pyx_L1_error)
__pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_var); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 884, __pyx_L1_error)
__pyx_v__r = isDecisionVar(((void *)__pyx_t_4), ((int)__pyx_t_5));

/* "monosat/monosat_p.pyx":885
*
*     cdef bint _r = _isDecisionVar_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>var))
*     py_result = <bint>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = (__pyx_v__r != 0);

/* "monosat/monosat_p.pyx":886
*     cdef bint _r = _isDecisionVar_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>var))
*     py_result = <bint>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def lastSolutionWasOptimal( S ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_py_result); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 886, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_r = __pyx_t_6;
__pyx_t_6 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":878
*
*
* def isDecisionVar( S ,  var ):             # <<<<<<<<<<<<<<
*     """Cython signature: bint isDecisionVar(void* S, int var)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_6);
__Pyx_AddTraceback("monosat.monosat_p.isDecisionVar", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":888
*     return py_result
*
* def lastSolutionWasOptimal( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: bint lastSolutionWasOptimal(void* S)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_121lastSolutionWasOptimal(PyObject *__pyx_self, PyObject *__pyx_v_S); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_120lastSolutionWasOptimal[] = "Cython signature: bint lastSolutionWasOptimal(void* S)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_121lastSolutionWasOptimal = {"lastSolutionWasOptimal", (PyCFunction)__pyx_pw_7monosat_9monosat_p_121lastSolutionWasOptimal, METH_O, __pyx_doc_7monosat_9monosat_p_120lastSolutionWasOptimal};
static PyObject *__pyx_pw_7monosat_9monosat_p_121lastSolutionWasOptimal(PyObject *__pyx_self, PyObject *__pyx_v_S) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("lastSolutionWasOptimal (wrapper)", 0);
__pyx_r = __pyx_pf_7monosat_9monosat_p_120lastSolutionWasOptimal(__pyx_self, ((PyObject *)__pyx_v_S));

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

static PyObject *__pyx_pf_7monosat_9monosat_p_120lastSolutionWasOptimal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
void *__pyx_t_1;
PyObject *__pyx_t_2 = NULL;
__Pyx_RefNannySetupContext("lastSolutionWasOptimal", 0);

/* "monosat/monosat_p.pyx":892
*
*
*     cdef bint _r = _lastSolutionWasOptimal_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))             # <<<<<<<<<<<<<<
*     py_result = <bint>_r
*     return py_result
*/
__pyx_t_1 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 892, __pyx_L1_error)
__pyx_v__r = lastSolutionWasOptimal(((void *)__pyx_t_1));

/* "monosat/monosat_p.pyx":893
*
*     cdef bint _r = _lastSolutionWasOptimal_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))
*     py_result = <bint>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = (__pyx_v__r != 0);

/* "monosat/monosat_p.pyx":894
*     cdef bint _r = _lastSolutionWasOptimal_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))
*     py_result = <bint>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def maximizeBV( S ,  bv ,  bvID ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 894, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":888
*     return py_result
*
* def lastSolutionWasOptimal( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: bint lastSolutionWasOptimal(void* S)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("monosat.monosat_p.lastSolutionWasOptimal", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":896
*     return py_result
*
* def maximizeBV( S ,  bv ,  bvID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void maximizeBV(void* S, void* bv, int bvID)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_123maximizeBV(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_122maximizeBV[] = "Cython signature: void maximizeBV(void* S, void* bv, int bvID)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_123maximizeBV = {"maximizeBV", (PyCFunction)__pyx_pw_7monosat_9monosat_p_123maximizeBV, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_122maximizeBV};
static PyObject *__pyx_pw_7monosat_9monosat_p_123maximizeBV(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_bv = 0;
PyObject *__pyx_v_bvID = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("maximizeBV (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_bv,&__pyx_n_s_bvID,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_S)) != 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_bv)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("maximizeBV", 1, 3, 3, 1); __PYX_ERR(0, 896, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("maximizeBV", 1, 3, 3, 2); __PYX_ERR(0, 896, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "maximizeBV") < 0)) __PYX_ERR(0, 896, __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_S = values[0];
__pyx_v_bv = values[1];
__pyx_v_bvID = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("maximizeBV", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 896, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.maximizeBV", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_122maximizeBV(__pyx_self, __pyx_v_S, __pyx_v_bv, __pyx_v_bvID);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_122maximizeBV(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvID) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
void *__pyx_t_1;
void *__pyx_t_2;
int __pyx_t_3;
__Pyx_RefNannySetupContext("maximizeBV", 0);

/* "monosat/monosat_p.pyx":900
*
*
*     _maximizeBV_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID))             # <<<<<<<<<<<<<<
*
* def maximizeLits( S ,  lits ,  n_lits ):
*/
__pyx_t_1 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 900, __pyx_L1_error)
__pyx_t_2 = PyCapsule_GetPointer(__pyx_v_bv, NULL); if (unlikely(__pyx_t_2 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 900, __pyx_L1_error)
__pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_bvID); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 900, __pyx_L1_error)
maximizeBV(((void *)__pyx_t_1), ((void *)__pyx_t_2), ((int)__pyx_t_3));

/* "monosat/monosat_p.pyx":896
*     return py_result
*
* def maximizeBV( S ,  bv ,  bvID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void maximizeBV(void* S, void* bv, int bvID)"""
*
*/

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

/* "monosat/monosat_p.pyx":902
*     _maximizeBV_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID))
*
* def maximizeLits( S ,  lits ,  n_lits ):             # <<<<<<<<<<<<<<
*     """Cython signature: void maximizeLits(void* S, int* lits, int n_lits)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_125maximizeLits(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_124maximizeLits[] = "Cython signature: void maximizeLits(void* S, int* lits, int n_lits)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_125maximizeLits = {"maximizeLits", (PyCFunction)__pyx_pw_7monosat_9monosat_p_125maximizeLits, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_124maximizeLits};
static PyObject *__pyx_pw_7monosat_9monosat_p_125maximizeLits(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_lits = 0;
PyObject *__pyx_v_n_lits = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("maximizeLits (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_lits,&__pyx_n_s_n_lits,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_S)) != 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_lits)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("maximizeLits", 1, 3, 3, 1); __PYX_ERR(0, 902, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n_lits)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("maximizeLits", 1, 3, 3, 2); __PYX_ERR(0, 902, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "maximizeLits") < 0)) __PYX_ERR(0, 902, __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_S = values[0];
__pyx_v_lits = values[1];
__pyx_v_n_lits = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("maximizeLits", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 902, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.maximizeLits", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_124maximizeLits(__pyx_self, __pyx_v_S, __pyx_v_lits, __pyx_v_n_lits);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_124maximizeLits(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_lits, PyObject *__pyx_v_n_lits) {
arrayobject *__pyx_v_a = 0;
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;
void *__pyx_t_6;
int __pyx_t_7;
__Pyx_RefNannySetupContext("maximizeLits", 0);

/* "monosat/monosat_p.pyx":905
*     """Cython signature: void maximizeLits(void* S, int* lits, int n_lits)"""
*
*     assert isinstance(lits, list), 'arg lits wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(n_lits, (int, long)), 'arg n_lits wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_1 = PyList_Check(__pyx_v_lits);
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_lits_wrong_type);
 __PYX_ERR(0, 905, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":906
*
*     assert isinstance(lits, list), 'arg lits wrong type'
*     assert isinstance(n_lits, (int, long)), 'arg n_lits wrong type'             # <<<<<<<<<<<<<<
*
*     cdef array.array a =  array.array('i', lits)
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_n_lits);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_n_lits);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_n_lits_wrong_type);
 __PYX_ERR(0, 906, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":908
*     assert isinstance(n_lits, (int, long)), 'arg n_lits wrong type'
*
*     cdef array.array a =  array.array('i', lits)             # <<<<<<<<<<<<<<
*
*     _maximizeLits_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int*>a.data.as_ints), (<int>n_lits))
*/
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 908, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_n_s_i);
__Pyx_GIVEREF(__pyx_n_s_i);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_i);
__Pyx_INCREF(__pyx_v_lits);
__Pyx_GIVEREF(__pyx_v_lits);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_lits);
__pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 908, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_a = ((arrayobject *)__pyx_t_5);
__pyx_t_5 = 0;

/* "monosat/monosat_p.pyx":910
*     cdef array.array a =  array.array('i', lits)
*
*     _maximizeLits_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int*>a.data.as_ints), (<int>n_lits))             # <<<<<<<<<<<<<<
*
* def maximizeWeightedLits( S ,  lits ,  weights ,  n_lits ):
*/
__pyx_t_6 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_6 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 910, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_n_lits); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 910, __pyx_L1_error)
maximizeLits(((void *)__pyx_t_6), ((int *)__pyx_v_a->data.as_ints), ((int)__pyx_t_7));

/* "monosat/monosat_p.pyx":902
*     _maximizeBV_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID))
*
* def maximizeLits( S ,  lits ,  n_lits ):             # <<<<<<<<<<<<<<
*     """Cython signature: void maximizeLits(void* S, int* lits, int n_lits)"""
*
*/

/* 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_AddTraceback("monosat.monosat_p.maximizeLits", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_a);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":912
*     _maximizeLits_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int*>a.data.as_ints), (<int>n_lits))
*
* def maximizeWeightedLits( S ,  lits ,  weights ,  n_lits ):             # <<<<<<<<<<<<<<
*     """Cython signature: void maximizeWeightedLits(void* S, int* lits, int* weights, int n_lits)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_127maximizeWeightedLits(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_126maximizeWeightedLits[] = "Cython signature: void maximizeWeightedLits(void* S, int* lits, int* weights, int n_lits)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_127maximizeWeightedLits = {"maximizeWeightedLits", (PyCFunction)__pyx_pw_7monosat_9monosat_p_127maximizeWeightedLits, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_126maximizeWeightedLits};
static PyObject *__pyx_pw_7monosat_9monosat_p_127maximizeWeightedLits(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_lits = 0;
PyObject *__pyx_v_weights = 0;
PyObject *__pyx_v_n_lits = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("maximizeWeightedLits (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_lits,&__pyx_n_s_weights,&__pyx_n_s_n_lits,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_S)) != 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_lits)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("maximizeWeightedLits", 1, 4, 4, 1); __PYX_ERR(0, 912, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weights)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("maximizeWeightedLits", 1, 4, 4, 2); __PYX_ERR(0, 912, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n_lits)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("maximizeWeightedLits", 1, 4, 4, 3); __PYX_ERR(0, 912, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "maximizeWeightedLits") < 0)) __PYX_ERR(0, 912, __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_S = values[0];
__pyx_v_lits = values[1];
__pyx_v_weights = values[2];
__pyx_v_n_lits = values[3];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("maximizeWeightedLits", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 912, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.maximizeWeightedLits", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_126maximizeWeightedLits(__pyx_self, __pyx_v_S, __pyx_v_lits, __pyx_v_weights, __pyx_v_n_lits);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_126maximizeWeightedLits(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_lits, PyObject *__pyx_v_weights, PyObject *__pyx_v_n_lits) {
arrayobject *__pyx_v_a = 0;
arrayobject *__pyx_v_b = 0;
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;
void *__pyx_t_6;
int __pyx_t_7;
__Pyx_RefNannySetupContext("maximizeWeightedLits", 0);

/* "monosat/monosat_p.pyx":915
*     """Cython signature: void maximizeWeightedLits(void* S, int* lits, int* weights, int n_lits)"""
*
*     assert isinstance(lits, list), 'arg lits wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(weights, (int, long)), 'arg weights wrong type'
*     assert isinstance(n_lits, (int, long)), 'arg n_lits wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_1 = PyList_Check(__pyx_v_lits);
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_lits_wrong_type);
 __PYX_ERR(0, 915, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":916
*
*     assert isinstance(lits, list), 'arg lits wrong type'
*     assert isinstance(weights, (int, long)), 'arg weights wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(n_lits, (int, long)), 'arg n_lits wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_weights);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_weights);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_weights_wrong_type);
 __PYX_ERR(0, 916, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":917
*     assert isinstance(lits, list), 'arg lits wrong type'
*     assert isinstance(weights, (int, long)), 'arg weights wrong type'
*     assert isinstance(n_lits, (int, long)), 'arg n_lits wrong type'             # <<<<<<<<<<<<<<
*
*     cdef array.array a =  array.array('i', lits)
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_n_lits);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_n_lits);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_n_lits_wrong_type);
 __PYX_ERR(0, 917, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":919
*     assert isinstance(n_lits, (int, long)), 'arg n_lits wrong type'
*
*     cdef array.array a =  array.array('i', lits)             # <<<<<<<<<<<<<<
*     cdef array.array b =  array.array('i', weights)
*
*/
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 919, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_n_s_i);
__Pyx_GIVEREF(__pyx_n_s_i);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_i);
__Pyx_INCREF(__pyx_v_lits);
__Pyx_GIVEREF(__pyx_v_lits);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_lits);
__pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 919, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_a = ((arrayobject *)__pyx_t_5);
__pyx_t_5 = 0;

/* "monosat/monosat_p.pyx":920
*
*     cdef array.array a =  array.array('i', lits)
*     cdef array.array b =  array.array('i', weights)             # <<<<<<<<<<<<<<
*
*     _maximizeWeightedLits_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int*>a.data.as_ints), (<int*>b.data.as_ints), (<int>n_lits))
*/
__pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 920, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_INCREF(__pyx_n_s_i);
__Pyx_GIVEREF(__pyx_n_s_i);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_i);
__Pyx_INCREF(__pyx_v_weights);
__Pyx_GIVEREF(__pyx_v_weights);
PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_weights);
__pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 920, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_v_b = ((arrayobject *)__pyx_t_4);
__pyx_t_4 = 0;

/* "monosat/monosat_p.pyx":922
*     cdef array.array b =  array.array('i', weights)
*
*     _maximizeWeightedLits_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int*>a.data.as_ints), (<int*>b.data.as_ints), (<int>n_lits))             # <<<<<<<<<<<<<<
*
* def maximumFlow_geq( S ,  G ,  source ,  sink ,  weight ):
*/
__pyx_t_6 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_6 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 922, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_n_lits); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 922, __pyx_L1_error)
maximizeWeightedLits(((void *)__pyx_t_6), ((int *)__pyx_v_a->data.as_ints), ((int *)__pyx_v_b->data.as_ints), ((int)__pyx_t_7));

/* "monosat/monosat_p.pyx":912
*     _maximizeLits_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int*>a.data.as_ints), (<int>n_lits))
*
* def maximizeWeightedLits( S ,  lits ,  weights ,  n_lits ):             # <<<<<<<<<<<<<<
*     """Cython signature: void maximizeWeightedLits(void* S, int* lits, int* weights, int n_lits)"""
*
*/

/* 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_AddTraceback("monosat.monosat_p.maximizeWeightedLits", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_a);
__Pyx_XDECREF((PyObject *)__pyx_v_b);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":924
*     _maximizeWeightedLits_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int*>a.data.as_ints), (<int*>b.data.as_ints), (<int>n_lits))
*
* def maximumFlow_geq( S ,  G ,  source ,  sink ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int maximumFlow_geq(void* S, void* G, int source, int sink, int64_t weight)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_129maximumFlow_geq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_128maximumFlow_geq[] = "Cython signature: int maximumFlow_geq(void* S, void* G, int source, int sink, int64_t weight)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_129maximumFlow_geq = {"maximumFlow_geq", (PyCFunction)__pyx_pw_7monosat_9monosat_p_129maximumFlow_geq, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_128maximumFlow_geq};
static PyObject *__pyx_pw_7monosat_9monosat_p_129maximumFlow_geq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_G = 0;
PyObject *__pyx_v_source = 0;
PyObject *__pyx_v_sink = 0;
PyObject *__pyx_v_weight = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("maximumFlow_geq (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_G,&__pyx_n_s_source,&__pyx_n_s_sink,&__pyx_n_s_weight,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_S)) != 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_G)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("maximumFlow_geq", 1, 5, 5, 1); __PYX_ERR(0, 924, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("maximumFlow_geq", 1, 5, 5, 2); __PYX_ERR(0, 924, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sink)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("maximumFlow_geq", 1, 5, 5, 3); __PYX_ERR(0, 924, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weight)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("maximumFlow_geq", 1, 5, 5, 4); __PYX_ERR(0, 924, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "maximumFlow_geq") < 0)) __PYX_ERR(0, 924, __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_S = values[0];
__pyx_v_G = values[1];
__pyx_v_source = values[2];
__pyx_v_sink = values[3];
__pyx_v_weight = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("maximumFlow_geq", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 924, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.maximumFlow_geq", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_128maximumFlow_geq(__pyx_self, __pyx_v_S, __pyx_v_G, __pyx_v_source, __pyx_v_sink, __pyx_v_weight);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_128maximumFlow_geq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_source, PyObject *__pyx_v_sink, PyObject *__pyx_v_weight) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
int64_t __pyx_t_8;
PyObject *__pyx_t_9 = NULL;
__Pyx_RefNannySetupContext("maximumFlow_geq", 0);

/* "monosat/monosat_p.pyx":928
*
*
*     assert isinstance(source, (int, long)), 'arg source wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(sink, (int, long)), 'arg sink wrong type'
*     assert isinstance(weight, (int, long)), 'arg weight wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_source);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_source);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_source_wrong_type);
 __PYX_ERR(0, 928, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":929
*
*     assert isinstance(source, (int, long)), 'arg source wrong type'
*     assert isinstance(sink, (int, long)), 'arg sink wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(weight, (int, long)), 'arg weight wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_sink);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_sink);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_sink_wrong_type);
 __PYX_ERR(0, 929, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":930
*     assert isinstance(source, (int, long)), 'arg source wrong type'
*     assert isinstance(sink, (int, long)), 'arg sink wrong type'
*     assert isinstance(weight, (int, long)), 'arg weight wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_weight);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L7_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_weight);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_weight_wrong_type);
 __PYX_ERR(0, 930, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":936
*
*
*     cdef int _r = _maximumFlow_geq_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>source), (<int>sink), (<int64_t>weight))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 936, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_G, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 936, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_source); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 936, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_sink); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 936, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int64_t(__pyx_v_weight); if (unlikely((__pyx_t_8 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 936, __pyx_L1_error)
__pyx_v__r = maximumFlow_geq(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7), ((int64_t)__pyx_t_8));

/* "monosat/monosat_p.pyx":937
*
*     cdef int _r = _maximumFlow_geq_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>source), (<int>sink), (<int64_t>weight))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":938
*     cdef int _r = _maximumFlow_geq_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>source), (<int>sink), (<int64_t>weight))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def maximumFlow_geq_bv( S ,  G ,  source ,  sink ,  bvID ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 938, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__pyx_r = __pyx_t_9;
__pyx_t_9 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":924
*     _maximizeWeightedLits_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int*>a.data.as_ints), (<int*>b.data.as_ints), (<int>n_lits))
*
* def maximumFlow_geq( S ,  G ,  source ,  sink ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int maximumFlow_geq(void* S, void* G, int source, int sink, int64_t weight)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_9);
__Pyx_AddTraceback("monosat.monosat_p.maximumFlow_geq", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":940
*     return py_result
*
* def maximumFlow_geq_bv( S ,  G ,  source ,  sink ,  bvID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int maximumFlow_geq_bv(void* S, void* G, int source, int sink, int bvID)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_131maximumFlow_geq_bv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_130maximumFlow_geq_bv[] = "Cython signature: int maximumFlow_geq_bv(void* S, void* G, int source, int sink, int bvID)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_131maximumFlow_geq_bv = {"maximumFlow_geq_bv", (PyCFunction)__pyx_pw_7monosat_9monosat_p_131maximumFlow_geq_bv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_130maximumFlow_geq_bv};
static PyObject *__pyx_pw_7monosat_9monosat_p_131maximumFlow_geq_bv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_G = 0;
PyObject *__pyx_v_source = 0;
PyObject *__pyx_v_sink = 0;
PyObject *__pyx_v_bvID = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("maximumFlow_geq_bv (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_G,&__pyx_n_s_source,&__pyx_n_s_sink,&__pyx_n_s_bvID,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_S)) != 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_G)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("maximumFlow_geq_bv", 1, 5, 5, 1); __PYX_ERR(0, 940, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("maximumFlow_geq_bv", 1, 5, 5, 2); __PYX_ERR(0, 940, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sink)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("maximumFlow_geq_bv", 1, 5, 5, 3); __PYX_ERR(0, 940, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("maximumFlow_geq_bv", 1, 5, 5, 4); __PYX_ERR(0, 940, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "maximumFlow_geq_bv") < 0)) __PYX_ERR(0, 940, __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_S = values[0];
__pyx_v_G = values[1];
__pyx_v_source = values[2];
__pyx_v_sink = values[3];
__pyx_v_bvID = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("maximumFlow_geq_bv", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 940, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.maximumFlow_geq_bv", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_130maximumFlow_geq_bv(__pyx_self, __pyx_v_S, __pyx_v_G, __pyx_v_source, __pyx_v_sink, __pyx_v_bvID);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_130maximumFlow_geq_bv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_source, PyObject *__pyx_v_sink, PyObject *__pyx_v_bvID) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
int __pyx_t_8;
PyObject *__pyx_t_9 = NULL;
__Pyx_RefNannySetupContext("maximumFlow_geq_bv", 0);

/* "monosat/monosat_p.pyx":944
*
*
*     assert isinstance(source, (int, long)), 'arg source wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(sink, (int, long)), 'arg sink wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_source);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_source);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_source_wrong_type);
 __PYX_ERR(0, 944, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":945
*
*     assert isinstance(source, (int, long)), 'arg source wrong type'
*     assert isinstance(sink, (int, long)), 'arg sink wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_sink);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_sink);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_sink_wrong_type);
 __PYX_ERR(0, 945, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":952
*
*
*     cdef int _r = _maximumFlow_geq_bv_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>source), (<int>sink), (<int>bvID))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 952, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_G, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 952, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_source); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 952, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_sink); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 952, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_bvID); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 952, __pyx_L1_error)
__pyx_v__r = maximumFlow_geq_bv(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7), ((int)__pyx_t_8));

/* "monosat/monosat_p.pyx":953
*
*     cdef int _r = _maximumFlow_geq_bv_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>source), (<int>sink), (<int>bvID))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":954
*     cdef int _r = _maximumFlow_geq_bv_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>source), (<int>sink), (<int>bvID))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def maximumFlow_gt( S ,  G ,  source ,  sink ,  weight ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 954, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__pyx_r = __pyx_t_9;
__pyx_t_9 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":940
*     return py_result
*
* def maximumFlow_geq_bv( S ,  G ,  source ,  sink ,  bvID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int maximumFlow_geq_bv(void* S, void* G, int source, int sink, int bvID)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_9);
__Pyx_AddTraceback("monosat.monosat_p.maximumFlow_geq_bv", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":956
*     return py_result
*
* def maximumFlow_gt( S ,  G ,  source ,  sink ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int maximumFlow_gt(void* S, void* G, int source, int sink, int64_t weight)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_133maximumFlow_gt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_132maximumFlow_gt[] = "Cython signature: int maximumFlow_gt(void* S, void* G, int source, int sink, int64_t weight)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_133maximumFlow_gt = {"maximumFlow_gt", (PyCFunction)__pyx_pw_7monosat_9monosat_p_133maximumFlow_gt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_132maximumFlow_gt};
static PyObject *__pyx_pw_7monosat_9monosat_p_133maximumFlow_gt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_G = 0;
PyObject *__pyx_v_source = 0;
PyObject *__pyx_v_sink = 0;
PyObject *__pyx_v_weight = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("maximumFlow_gt (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_G,&__pyx_n_s_source,&__pyx_n_s_sink,&__pyx_n_s_weight,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_S)) != 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_G)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("maximumFlow_gt", 1, 5, 5, 1); __PYX_ERR(0, 956, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("maximumFlow_gt", 1, 5, 5, 2); __PYX_ERR(0, 956, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sink)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("maximumFlow_gt", 1, 5, 5, 3); __PYX_ERR(0, 956, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weight)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("maximumFlow_gt", 1, 5, 5, 4); __PYX_ERR(0, 956, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "maximumFlow_gt") < 0)) __PYX_ERR(0, 956, __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_S = values[0];
__pyx_v_G = values[1];
__pyx_v_source = values[2];
__pyx_v_sink = values[3];
__pyx_v_weight = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("maximumFlow_gt", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 956, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.maximumFlow_gt", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_132maximumFlow_gt(__pyx_self, __pyx_v_S, __pyx_v_G, __pyx_v_source, __pyx_v_sink, __pyx_v_weight);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_132maximumFlow_gt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_source, PyObject *__pyx_v_sink, PyObject *__pyx_v_weight) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
int64_t __pyx_t_8;
PyObject *__pyx_t_9 = NULL;
__Pyx_RefNannySetupContext("maximumFlow_gt", 0);

/* "monosat/monosat_p.pyx":960
*
*
*     assert isinstance(source, (int, long)), 'arg source wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(sink, (int, long)), 'arg sink wrong type'
*     assert isinstance(weight, (int, long)), 'arg weight wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_source);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_source);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_source_wrong_type);
 __PYX_ERR(0, 960, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":961
*
*     assert isinstance(source, (int, long)), 'arg source wrong type'
*     assert isinstance(sink, (int, long)), 'arg sink wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(weight, (int, long)), 'arg weight wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_sink);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_sink);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_sink_wrong_type);
 __PYX_ERR(0, 961, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":962
*     assert isinstance(source, (int, long)), 'arg source wrong type'
*     assert isinstance(sink, (int, long)), 'arg sink wrong type'
*     assert isinstance(weight, (int, long)), 'arg weight wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_weight);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L7_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_weight);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_weight_wrong_type);
 __PYX_ERR(0, 962, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":968
*
*
*     cdef int _r = _maximumFlow_gt_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>source), (<int>sink), (<int64_t>weight))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 968, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_G, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 968, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_source); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 968, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_sink); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 968, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int64_t(__pyx_v_weight); if (unlikely((__pyx_t_8 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 968, __pyx_L1_error)
__pyx_v__r = maximumFlow_gt(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7), ((int64_t)__pyx_t_8));

/* "monosat/monosat_p.pyx":969
*
*     cdef int _r = _maximumFlow_gt_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>source), (<int>sink), (<int64_t>weight))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":970
*     cdef int _r = _maximumFlow_gt_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>source), (<int>sink), (<int64_t>weight))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def maximumFlow_gt_bv( S ,  G ,  source ,  sink ,  bvID ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 970, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__pyx_r = __pyx_t_9;
__pyx_t_9 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":956
*     return py_result
*
* def maximumFlow_gt( S ,  G ,  source ,  sink ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int maximumFlow_gt(void* S, void* G, int source, int sink, int64_t weight)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_9);
__Pyx_AddTraceback("monosat.monosat_p.maximumFlow_gt", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":972
*     return py_result
*
* def maximumFlow_gt_bv( S ,  G ,  source ,  sink ,  bvID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int maximumFlow_gt_bv(void* S, void* G, int source, int sink, int bvID)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_135maximumFlow_gt_bv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_134maximumFlow_gt_bv[] = "Cython signature: int maximumFlow_gt_bv(void* S, void* G, int source, int sink, int bvID)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_135maximumFlow_gt_bv = {"maximumFlow_gt_bv", (PyCFunction)__pyx_pw_7monosat_9monosat_p_135maximumFlow_gt_bv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_134maximumFlow_gt_bv};
static PyObject *__pyx_pw_7monosat_9monosat_p_135maximumFlow_gt_bv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_G = 0;
PyObject *__pyx_v_source = 0;
PyObject *__pyx_v_sink = 0;
PyObject *__pyx_v_bvID = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("maximumFlow_gt_bv (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_G,&__pyx_n_s_source,&__pyx_n_s_sink,&__pyx_n_s_bvID,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_S)) != 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_G)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("maximumFlow_gt_bv", 1, 5, 5, 1); __PYX_ERR(0, 972, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("maximumFlow_gt_bv", 1, 5, 5, 2); __PYX_ERR(0, 972, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sink)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("maximumFlow_gt_bv", 1, 5, 5, 3); __PYX_ERR(0, 972, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("maximumFlow_gt_bv", 1, 5, 5, 4); __PYX_ERR(0, 972, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "maximumFlow_gt_bv") < 0)) __PYX_ERR(0, 972, __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_S = values[0];
__pyx_v_G = values[1];
__pyx_v_source = values[2];
__pyx_v_sink = values[3];
__pyx_v_bvID = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("maximumFlow_gt_bv", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 972, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.maximumFlow_gt_bv", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_134maximumFlow_gt_bv(__pyx_self, __pyx_v_S, __pyx_v_G, __pyx_v_source, __pyx_v_sink, __pyx_v_bvID);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_134maximumFlow_gt_bv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_source, PyObject *__pyx_v_sink, PyObject *__pyx_v_bvID) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
int __pyx_t_8;
PyObject *__pyx_t_9 = NULL;
__Pyx_RefNannySetupContext("maximumFlow_gt_bv", 0);

/* "monosat/monosat_p.pyx":976
*
*
*     assert isinstance(source, (int, long)), 'arg source wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(sink, (int, long)), 'arg sink wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_source);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_source);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_source_wrong_type);
 __PYX_ERR(0, 976, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":977
*
*     assert isinstance(source, (int, long)), 'arg source wrong type'
*     assert isinstance(sink, (int, long)), 'arg sink wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_sink);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_sink);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_sink_wrong_type);
 __PYX_ERR(0, 977, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":984
*
*
*     cdef int _r = _maximumFlow_gt_bv_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>source), (<int>sink), (<int>bvID))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 984, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_G, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 984, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_source); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 984, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_sink); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 984, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_bvID); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 984, __pyx_L1_error)
__pyx_v__r = maximumFlow_gt_bv(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7), ((int)__pyx_t_8));

/* "monosat/monosat_p.pyx":985
*
*     cdef int _r = _maximumFlow_gt_bv_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>source), (<int>sink), (<int>bvID))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":986
*     cdef int _r = _maximumFlow_gt_bv_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>source), (<int>sink), (<int>bvID))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def minimizeBV( S ,  bv ,  bvID ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 986, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__pyx_r = __pyx_t_9;
__pyx_t_9 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":972
*     return py_result
*
* def maximumFlow_gt_bv( S ,  G ,  source ,  sink ,  bvID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int maximumFlow_gt_bv(void* S, void* G, int source, int sink, int bvID)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_9);
__Pyx_AddTraceback("monosat.monosat_p.maximumFlow_gt_bv", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":988
*     return py_result
*
* def minimizeBV( S ,  bv ,  bvID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void minimizeBV(void* S, void* bv, int bvID)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_137minimizeBV(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_136minimizeBV[] = "Cython signature: void minimizeBV(void* S, void* bv, int bvID)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_137minimizeBV = {"minimizeBV", (PyCFunction)__pyx_pw_7monosat_9monosat_p_137minimizeBV, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_136minimizeBV};
static PyObject *__pyx_pw_7monosat_9monosat_p_137minimizeBV(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_bv = 0;
PyObject *__pyx_v_bvID = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("minimizeBV (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_bv,&__pyx_n_s_bvID,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_S)) != 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_bv)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("minimizeBV", 1, 3, 3, 1); __PYX_ERR(0, 988, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("minimizeBV", 1, 3, 3, 2); __PYX_ERR(0, 988, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "minimizeBV") < 0)) __PYX_ERR(0, 988, __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_S = values[0];
__pyx_v_bv = values[1];
__pyx_v_bvID = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("minimizeBV", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 988, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.minimizeBV", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_136minimizeBV(__pyx_self, __pyx_v_S, __pyx_v_bv, __pyx_v_bvID);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_136minimizeBV(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvID) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
void *__pyx_t_1;
void *__pyx_t_2;
int __pyx_t_3;
__Pyx_RefNannySetupContext("minimizeBV", 0);

/* "monosat/monosat_p.pyx":996
*
*
*     _minimizeBV_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID))             # <<<<<<<<<<<<<<
*
* def minimizeLits( S ,  lits ,  n_lits ):
*/
__pyx_t_1 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 996, __pyx_L1_error)
__pyx_t_2 = PyCapsule_GetPointer(__pyx_v_bv, NULL); if (unlikely(__pyx_t_2 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 996, __pyx_L1_error)
__pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_bvID); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 996, __pyx_L1_error)
minimizeBV(((void *)__pyx_t_1), ((void *)__pyx_t_2), ((int)__pyx_t_3));

/* "monosat/monosat_p.pyx":988
*     return py_result
*
* def minimizeBV( S ,  bv ,  bvID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void minimizeBV(void* S, void* bv, int bvID)"""
*
*/

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

/* "monosat/monosat_p.pyx":998
*     _minimizeBV_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID))
*
* def minimizeLits( S ,  lits ,  n_lits ):             # <<<<<<<<<<<<<<
*     """Cython signature: void minimizeLits(void* S, int* lits, int n_lits)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_139minimizeLits(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_138minimizeLits[] = "Cython signature: void minimizeLits(void* S, int* lits, int n_lits)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_139minimizeLits = {"minimizeLits", (PyCFunction)__pyx_pw_7monosat_9monosat_p_139minimizeLits, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_138minimizeLits};
static PyObject *__pyx_pw_7monosat_9monosat_p_139minimizeLits(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_lits = 0;
PyObject *__pyx_v_n_lits = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("minimizeLits (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_lits,&__pyx_n_s_n_lits,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_S)) != 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_lits)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("minimizeLits", 1, 3, 3, 1); __PYX_ERR(0, 998, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n_lits)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("minimizeLits", 1, 3, 3, 2); __PYX_ERR(0, 998, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "minimizeLits") < 0)) __PYX_ERR(0, 998, __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_S = values[0];
__pyx_v_lits = values[1];
__pyx_v_n_lits = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("minimizeLits", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 998, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.minimizeLits", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_138minimizeLits(__pyx_self, __pyx_v_S, __pyx_v_lits, __pyx_v_n_lits);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_138minimizeLits(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_lits, PyObject *__pyx_v_n_lits) {
arrayobject *__pyx_v_a = 0;
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;
void *__pyx_t_6;
int __pyx_t_7;
__Pyx_RefNannySetupContext("minimizeLits", 0);

/* "monosat/monosat_p.pyx":1001
*     """Cython signature: void minimizeLits(void* S, int* lits, int n_lits)"""
*
*     assert isinstance(lits, list), 'arg lits wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(n_lits, (int, long)), 'arg n_lits wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_1 = PyList_Check(__pyx_v_lits);
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_lits_wrong_type);
 __PYX_ERR(0, 1001, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1002
*
*     assert isinstance(lits, list), 'arg lits wrong type'
*     assert isinstance(n_lits, (int, long)), 'arg n_lits wrong type'             # <<<<<<<<<<<<<<
*
*     cdef array.array a =  array.array('i', lits)
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_n_lits);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_n_lits);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_n_lits_wrong_type);
 __PYX_ERR(0, 1002, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1004
*     assert isinstance(n_lits, (int, long)), 'arg n_lits wrong type'
*
*     cdef array.array a =  array.array('i', lits)             # <<<<<<<<<<<<<<
*
*
*/
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1004, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_n_s_i);
__Pyx_GIVEREF(__pyx_n_s_i);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_i);
__Pyx_INCREF(__pyx_v_lits);
__Pyx_GIVEREF(__pyx_v_lits);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_lits);
__pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1004, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_a = ((arrayobject *)__pyx_t_5);
__pyx_t_5 = 0;

/* "monosat/monosat_p.pyx":1007
*
*
*     _minimizeLits_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int*>a.data.as_ints), (<int>n_lits))             # <<<<<<<<<<<<<<
*
* def minimizeWeightedLits( S ,  lits ,  weights ,  n_lits ):
*/
__pyx_t_6 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_6 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1007, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_n_lits); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1007, __pyx_L1_error)
minimizeLits(((void *)__pyx_t_6), ((int *)__pyx_v_a->data.as_ints), ((int)__pyx_t_7));

/* "monosat/monosat_p.pyx":998
*     _minimizeBV_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID))
*
* def minimizeLits( S ,  lits ,  n_lits ):             # <<<<<<<<<<<<<<
*     """Cython signature: void minimizeLits(void* S, int* lits, int n_lits)"""
*
*/

/* 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_AddTraceback("monosat.monosat_p.minimizeLits", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_a);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1009
*     _minimizeLits_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int*>a.data.as_ints), (<int>n_lits))
*
* def minimizeWeightedLits( S ,  lits ,  weights ,  n_lits ):             # <<<<<<<<<<<<<<
*     """Cython signature: void minimizeWeightedLits(void* S, int* lits, int* weights, int n_lits)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_141minimizeWeightedLits(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_140minimizeWeightedLits[] = "Cython signature: void minimizeWeightedLits(void* S, int* lits, int* weights, int n_lits)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_141minimizeWeightedLits = {"minimizeWeightedLits", (PyCFunction)__pyx_pw_7monosat_9monosat_p_141minimizeWeightedLits, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_140minimizeWeightedLits};
static PyObject *__pyx_pw_7monosat_9monosat_p_141minimizeWeightedLits(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_lits = 0;
PyObject *__pyx_v_weights = 0;
PyObject *__pyx_v_n_lits = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("minimizeWeightedLits (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_lits,&__pyx_n_s_weights,&__pyx_n_s_n_lits,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_S)) != 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_lits)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("minimizeWeightedLits", 1, 4, 4, 1); __PYX_ERR(0, 1009, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weights)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("minimizeWeightedLits", 1, 4, 4, 2); __PYX_ERR(0, 1009, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n_lits)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("minimizeWeightedLits", 1, 4, 4, 3); __PYX_ERR(0, 1009, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "minimizeWeightedLits") < 0)) __PYX_ERR(0, 1009, __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_S = values[0];
__pyx_v_lits = values[1];
__pyx_v_weights = values[2];
__pyx_v_n_lits = values[3];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("minimizeWeightedLits", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1009, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.minimizeWeightedLits", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_140minimizeWeightedLits(__pyx_self, __pyx_v_S, __pyx_v_lits, __pyx_v_weights, __pyx_v_n_lits);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_140minimizeWeightedLits(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_lits, PyObject *__pyx_v_weights, PyObject *__pyx_v_n_lits) {
arrayobject *__pyx_v_a = 0;
arrayobject *__pyx_v_b = 0;
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;
void *__pyx_t_6;
int __pyx_t_7;
__Pyx_RefNannySetupContext("minimizeWeightedLits", 0);

/* "monosat/monosat_p.pyx":1012
*     """Cython signature: void minimizeWeightedLits(void* S, int* lits, int* weights, int n_lits)"""
*
*     assert isinstance(lits, list), 'arg lits wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(weights, (int, long)), 'arg weights wrong type'
*     assert isinstance(n_lits, (int, long)), 'arg n_lits wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_1 = PyList_Check(__pyx_v_lits);
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_lits_wrong_type);
 __PYX_ERR(0, 1012, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1013
*
*     assert isinstance(lits, list), 'arg lits wrong type'
*     assert isinstance(weights, (int, long)), 'arg weights wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(n_lits, (int, long)), 'arg n_lits wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_weights);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_weights);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_weights_wrong_type);
 __PYX_ERR(0, 1013, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1014
*     assert isinstance(lits, list), 'arg lits wrong type'
*     assert isinstance(weights, (int, long)), 'arg weights wrong type'
*     assert isinstance(n_lits, (int, long)), 'arg n_lits wrong type'             # <<<<<<<<<<<<<<
*
*     cdef array.array a =  array.array('i', lits)
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_n_lits);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_n_lits);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_n_lits_wrong_type);
 __PYX_ERR(0, 1014, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1016
*     assert isinstance(n_lits, (int, long)), 'arg n_lits wrong type'
*
*     cdef array.array a =  array.array('i', lits)             # <<<<<<<<<<<<<<
*     cdef array.array b =  array.array('i', weights)
*
*/
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1016, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_n_s_i);
__Pyx_GIVEREF(__pyx_n_s_i);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_i);
__Pyx_INCREF(__pyx_v_lits);
__Pyx_GIVEREF(__pyx_v_lits);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_lits);
__pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1016, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_a = ((arrayobject *)__pyx_t_5);
__pyx_t_5 = 0;

/* "monosat/monosat_p.pyx":1017
*
*     cdef array.array a =  array.array('i', lits)
*     cdef array.array b =  array.array('i', weights)             # <<<<<<<<<<<<<<
*
*
*/
__pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1017, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_INCREF(__pyx_n_s_i);
__Pyx_GIVEREF(__pyx_n_s_i);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_i);
__Pyx_INCREF(__pyx_v_weights);
__Pyx_GIVEREF(__pyx_v_weights);
PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_weights);
__pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1017, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_v_b = ((arrayobject *)__pyx_t_4);
__pyx_t_4 = 0;

/* "monosat/monosat_p.pyx":1020
*
*
*     _minimizeWeightedLits_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int*>a.data.as_ints), (<int*>b.data.as_ints), (<int>n_lits))             # <<<<<<<<<<<<<<
*
* def minimumSpanningTree_leq( S ,  G ,  weight ):
*/
__pyx_t_6 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_6 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1020, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_n_lits); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1020, __pyx_L1_error)
minimizeWeightedLits(((void *)__pyx_t_6), ((int *)__pyx_v_a->data.as_ints), ((int *)__pyx_v_b->data.as_ints), ((int)__pyx_t_7));

/* "monosat/monosat_p.pyx":1009
*     _minimizeLits_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int*>a.data.as_ints), (<int>n_lits))
*
* def minimizeWeightedLits( S ,  lits ,  weights ,  n_lits ):             # <<<<<<<<<<<<<<
*     """Cython signature: void minimizeWeightedLits(void* S, int* lits, int* weights, int n_lits)"""
*
*/

/* 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_AddTraceback("monosat.monosat_p.minimizeWeightedLits", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_a);
__Pyx_XDECREF((PyObject *)__pyx_v_b);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1022
*     _minimizeWeightedLits_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int*>a.data.as_ints), (<int*>b.data.as_ints), (<int>n_lits))
*
* def minimumSpanningTree_leq( S ,  G ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int minimumSpanningTree_leq(void* S, void* G, int64_t weight)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_143minimumSpanningTree_leq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_142minimumSpanningTree_leq[] = "Cython signature: int minimumSpanningTree_leq(void* S, void* G, int64_t weight)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_143minimumSpanningTree_leq = {"minimumSpanningTree_leq", (PyCFunction)__pyx_pw_7monosat_9monosat_p_143minimumSpanningTree_leq, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_142minimumSpanningTree_leq};
static PyObject *__pyx_pw_7monosat_9monosat_p_143minimumSpanningTree_leq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_G = 0;
PyObject *__pyx_v_weight = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("minimumSpanningTree_leq (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_G,&__pyx_n_s_weight,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_S)) != 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_G)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("minimumSpanningTree_leq", 1, 3, 3, 1); __PYX_ERR(0, 1022, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weight)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("minimumSpanningTree_leq", 1, 3, 3, 2); __PYX_ERR(0, 1022, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "minimumSpanningTree_leq") < 0)) __PYX_ERR(0, 1022, __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_S = values[0];
__pyx_v_G = values[1];
__pyx_v_weight = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("minimumSpanningTree_leq", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1022, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.minimumSpanningTree_leq", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_142minimumSpanningTree_leq(__pyx_self, __pyx_v_S, __pyx_v_G, __pyx_v_weight);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_142minimumSpanningTree_leq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_weight) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int64_t __pyx_t_6;
PyObject *__pyx_t_7 = NULL;
__Pyx_RefNannySetupContext("minimumSpanningTree_leq", 0);

/* "monosat/monosat_p.pyx":1026
*
*
*     assert isinstance(weight, (int, long)), 'arg weight wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_weight);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_weight);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_weight_wrong_type);
 __PYX_ERR(0, 1026, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1030
*
*
*     cdef int _r = _minimumSpanningTree_leq_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int64_t>weight))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1030, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_G, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1030, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int64_t(__pyx_v_weight); if (unlikely((__pyx_t_6 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1030, __pyx_L1_error)
__pyx_v__r = minimumSpanningTree_leq(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int64_t)__pyx_t_6));

/* "monosat/monosat_p.pyx":1031
*
*     cdef int _r = _minimumSpanningTree_leq_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int64_t>weight))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":1032
*     cdef int _r = _minimumSpanningTree_leq_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int64_t>weight))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def minimumSpanningTree_lt( S ,  G ,  weight ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1032, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_r = __pyx_t_7;
__pyx_t_7 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1022
*     _minimizeWeightedLits_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int*>a.data.as_ints), (<int*>b.data.as_ints), (<int>n_lits))
*
* def minimumSpanningTree_leq( S ,  G ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int minimumSpanningTree_leq(void* S, void* G, int64_t weight)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_7);
__Pyx_AddTraceback("monosat.monosat_p.minimumSpanningTree_leq", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1034
*     return py_result
*
* def minimumSpanningTree_lt( S ,  G ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int minimumSpanningTree_lt(void* S, void* G, int64_t weight)"""
*     assert isinstance(weight, (int, long)), 'arg weight wrong type'
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_145minimumSpanningTree_lt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_144minimumSpanningTree_lt[] = "Cython signature: int minimumSpanningTree_lt(void* S, void* G, int64_t weight)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_145minimumSpanningTree_lt = {"minimumSpanningTree_lt", (PyCFunction)__pyx_pw_7monosat_9monosat_p_145minimumSpanningTree_lt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_144minimumSpanningTree_lt};
static PyObject *__pyx_pw_7monosat_9monosat_p_145minimumSpanningTree_lt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_G = 0;
PyObject *__pyx_v_weight = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("minimumSpanningTree_lt (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_G,&__pyx_n_s_weight,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_S)) != 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_G)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("minimumSpanningTree_lt", 1, 3, 3, 1); __PYX_ERR(0, 1034, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weight)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("minimumSpanningTree_lt", 1, 3, 3, 2); __PYX_ERR(0, 1034, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "minimumSpanningTree_lt") < 0)) __PYX_ERR(0, 1034, __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_S = values[0];
__pyx_v_G = values[1];
__pyx_v_weight = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("minimumSpanningTree_lt", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1034, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.minimumSpanningTree_lt", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_144minimumSpanningTree_lt(__pyx_self, __pyx_v_S, __pyx_v_G, __pyx_v_weight);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_144minimumSpanningTree_lt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_weight) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int64_t __pyx_t_6;
PyObject *__pyx_t_7 = NULL;
__Pyx_RefNannySetupContext("minimumSpanningTree_lt", 0);

/* "monosat/monosat_p.pyx":1036
* def minimumSpanningTree_lt( S ,  G ,  weight ):
*     """Cython signature: int minimumSpanningTree_lt(void* S, void* G, int64_t weight)"""
*     assert isinstance(weight, (int, long)), 'arg weight wrong type'             # <<<<<<<<<<<<<<
*
*     cdef int _r = _minimumSpanningTree_lt_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int64_t>weight))
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_weight);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_weight);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_weight_wrong_type);
 __PYX_ERR(0, 1036, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1038
*     assert isinstance(weight, (int, long)), 'arg weight wrong type'
*
*     cdef int _r = _minimumSpanningTree_lt_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int64_t>weight))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1038, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_G, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1038, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int64_t(__pyx_v_weight); if (unlikely((__pyx_t_6 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1038, __pyx_L1_error)
__pyx_v__r = minimumSpanningTree_lt(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int64_t)__pyx_t_6));

/* "monosat/monosat_p.pyx":1039
*
*     cdef int _r = _minimumSpanningTree_lt_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int64_t>weight))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":1040
*     cdef int _r = _minimumSpanningTree_lt_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int64_t>weight))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def nBitvectors( S ,  bv ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1040, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_r = __pyx_t_7;
__pyx_t_7 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1034
*     return py_result
*
* def minimumSpanningTree_lt( S ,  G ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int minimumSpanningTree_lt(void* S, void* G, int64_t weight)"""
*     assert isinstance(weight, (int, long)), 'arg weight wrong type'
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_7);
__Pyx_AddTraceback("monosat.monosat_p.minimumSpanningTree_lt", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1042
*     return py_result
*
* def nBitvectors( S ,  bv ):             # <<<<<<<<<<<<<<
*     """Cython signature: int nBitvectors(void* S, void* bv)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_147nBitvectors(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_146nBitvectors[] = "Cython signature: int nBitvectors(void* S, void* bv)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_147nBitvectors = {"nBitvectors", (PyCFunction)__pyx_pw_7monosat_9monosat_p_147nBitvectors, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_146nBitvectors};
static PyObject *__pyx_pw_7monosat_9monosat_p_147nBitvectors(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_bv = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("nBitvectors (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_bv,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_S)) != 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_bv)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("nBitvectors", 1, 2, 2, 1); __PYX_ERR(0, 1042, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "nBitvectors") < 0)) __PYX_ERR(0, 1042, __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_S = values[0];
__pyx_v_bv = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("nBitvectors", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1042, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.nBitvectors", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_146nBitvectors(__pyx_self, __pyx_v_S, __pyx_v_bv);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_146nBitvectors(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
void *__pyx_t_1;
void *__pyx_t_2;
PyObject *__pyx_t_3 = NULL;
__Pyx_RefNannySetupContext("nBitvectors", 0);

/* "monosat/monosat_p.pyx":1048
*
*
*     cdef int _r = _nBitvectors_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_1 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1048, __pyx_L1_error)
__pyx_t_2 = PyCapsule_GetPointer(__pyx_v_bv, NULL); if (unlikely(__pyx_t_2 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1048, __pyx_L1_error)
__pyx_v__r = nBitvectors(((void *)__pyx_t_1), ((void *)__pyx_t_2));

/* "monosat/monosat_p.pyx":1049
*
*     cdef int _r = _nBitvectors_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":1050
*     cdef int _r = _nBitvectors_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def nClauses( S ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1050, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1042
*     return py_result
*
* def nBitvectors( S ,  bv ):             # <<<<<<<<<<<<<<
*     """Cython signature: int nBitvectors(void* S, void* bv)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("monosat.monosat_p.nBitvectors", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1052
*     return py_result
*
* def nClauses( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: int nClauses(void* S)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_149nClauses(PyObject *__pyx_self, PyObject *__pyx_v_S); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_148nClauses[] = "Cython signature: int nClauses(void* S)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_149nClauses = {"nClauses", (PyCFunction)__pyx_pw_7monosat_9monosat_p_149nClauses, METH_O, __pyx_doc_7monosat_9monosat_p_148nClauses};
static PyObject *__pyx_pw_7monosat_9monosat_p_149nClauses(PyObject *__pyx_self, PyObject *__pyx_v_S) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("nClauses (wrapper)", 0);
__pyx_r = __pyx_pf_7monosat_9monosat_p_148nClauses(__pyx_self, ((PyObject *)__pyx_v_S));

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

static PyObject *__pyx_pf_7monosat_9monosat_p_148nClauses(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
void *__pyx_t_1;
PyObject *__pyx_t_2 = NULL;
__Pyx_RefNannySetupContext("nClauses", 0);

/* "monosat/monosat_p.pyx":1056
*
*
*     cdef int _r = _nClauses_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_1 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1056, __pyx_L1_error)
__pyx_v__r = nClauses(((void *)__pyx_t_1));

/* "monosat/monosat_p.pyx":1057
*
*     cdef int _r = _nClauses_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":1058
*     cdef int _r = _nClauses_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def nEdges( S ,  G ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1058, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1052
*     return py_result
*
* def nClauses( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: int nClauses(void* S)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("monosat.monosat_p.nClauses", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1060
*     return py_result
*
* def nEdges( S ,  G ):             # <<<<<<<<<<<<<<
*     """Cython signature: int nEdges(void* S, void* G)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_151nEdges(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_150nEdges[] = "Cython signature: int nEdges(void* S, void* G)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_151nEdges = {"nEdges", (PyCFunction)__pyx_pw_7monosat_9monosat_p_151nEdges, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_150nEdges};
static PyObject *__pyx_pw_7monosat_9monosat_p_151nEdges(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_G = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("nEdges (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_G,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_S)) != 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_G)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("nEdges", 1, 2, 2, 1); __PYX_ERR(0, 1060, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "nEdges") < 0)) __PYX_ERR(0, 1060, __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_S = values[0];
__pyx_v_G = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("nEdges", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1060, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.nEdges", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_150nEdges(__pyx_self, __pyx_v_S, __pyx_v_G);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_150nEdges(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
void *__pyx_t_1;
void *__pyx_t_2;
PyObject *__pyx_t_3 = NULL;
__Pyx_RefNannySetupContext("nEdges", 0);

/* "monosat/monosat_p.pyx":1066
*
*
*     cdef int _r = _nEdges_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_1 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1066, __pyx_L1_error)
__pyx_t_2 = PyCapsule_GetPointer(__pyx_v_G, NULL); if (unlikely(__pyx_t_2 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1066, __pyx_L1_error)
__pyx_v__r = nEdges(((void *)__pyx_t_1), ((void *)__pyx_t_2));

/* "monosat/monosat_p.pyx":1067
*
*     cdef int _r = _nEdges_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":1068
*     cdef int _r = _nEdges_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def nNodes( S ,  G ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1068, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1060
*     return py_result
*
* def nEdges( S ,  G ):             # <<<<<<<<<<<<<<
*     """Cython signature: int nEdges(void* S, void* G)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("monosat.monosat_p.nEdges", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1070
*     return py_result
*
* def nNodes( S ,  G ):             # <<<<<<<<<<<<<<
*     """Cython signature: int nNodes(void* S, void* G)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_153nNodes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_152nNodes[] = "Cython signature: int nNodes(void* S, void* G)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_153nNodes = {"nNodes", (PyCFunction)__pyx_pw_7monosat_9monosat_p_153nNodes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_152nNodes};
static PyObject *__pyx_pw_7monosat_9monosat_p_153nNodes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_G = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("nNodes (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_G,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_S)) != 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_G)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("nNodes", 1, 2, 2, 1); __PYX_ERR(0, 1070, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "nNodes") < 0)) __PYX_ERR(0, 1070, __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_S = values[0];
__pyx_v_G = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("nNodes", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1070, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.nNodes", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_152nNodes(__pyx_self, __pyx_v_S, __pyx_v_G);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_152nNodes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
void *__pyx_t_1;
void *__pyx_t_2;
PyObject *__pyx_t_3 = NULL;
__Pyx_RefNannySetupContext("nNodes", 0);

/* "monosat/monosat_p.pyx":1076
*
*
*     cdef int _r = _nNodes_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_1 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1076, __pyx_L1_error)
__pyx_t_2 = PyCapsule_GetPointer(__pyx_v_G, NULL); if (unlikely(__pyx_t_2 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1076, __pyx_L1_error)
__pyx_v__r = nNodes(((void *)__pyx_t_1), ((void *)__pyx_t_2));

/* "monosat/monosat_p.pyx":1077
*
*     cdef int _r = _nNodes_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":1078
*     cdef int _r = _nNodes_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def nVars( S ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1078, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1070
*     return py_result
*
* def nNodes( S ,  G ):             # <<<<<<<<<<<<<<
*     """Cython signature: int nNodes(void* S, void* G)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("monosat.monosat_p.nNodes", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1080
*     return py_result
*
* def nVars( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: int nVars(void* S)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_155nVars(PyObject *__pyx_self, PyObject *__pyx_v_S); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_154nVars[] = "Cython signature: int nVars(void* S)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_155nVars = {"nVars", (PyCFunction)__pyx_pw_7monosat_9monosat_p_155nVars, METH_O, __pyx_doc_7monosat_9monosat_p_154nVars};
static PyObject *__pyx_pw_7monosat_9monosat_p_155nVars(PyObject *__pyx_self, PyObject *__pyx_v_S) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("nVars (wrapper)", 0);
__pyx_r = __pyx_pf_7monosat_9monosat_p_154nVars(__pyx_self, ((PyObject *)__pyx_v_S));

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

static PyObject *__pyx_pf_7monosat_9monosat_p_154nVars(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
void *__pyx_t_1;
PyObject *__pyx_t_2 = NULL;
__Pyx_RefNannySetupContext("nVars", 0);

/* "monosat/monosat_p.pyx":1084
*
*
*     cdef int _r = _nVars_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_1 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1084, __pyx_L1_error)
__pyx_v__r = nVars(((void *)__pyx_t_1));

/* "monosat/monosat_p.pyx":1085
*
*     cdef int _r = _nVars_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":1086
*     cdef int _r = _nVars_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def newBVComparison_bv_geq( S ,  bv ,  bvID ,  compareID ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1086, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1080
*     return py_result
*
* def nVars( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: int nVars(void* S)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("monosat.monosat_p.nVars", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1088
*     return py_result
*
* def newBVComparison_bv_geq( S ,  bv ,  bvID ,  compareID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBVComparison_bv_geq(void* S, void* bv, int bvID, int compareID)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_157newBVComparison_bv_geq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_156newBVComparison_bv_geq[] = "Cython signature: int newBVComparison_bv_geq(void* S, void* bv, int bvID, int compareID)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_157newBVComparison_bv_geq = {"newBVComparison_bv_geq", (PyCFunction)__pyx_pw_7monosat_9monosat_p_157newBVComparison_bv_geq, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_156newBVComparison_bv_geq};
static PyObject *__pyx_pw_7monosat_9monosat_p_157newBVComparison_bv_geq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_bv = 0;
PyObject *__pyx_v_bvID = 0;
PyObject *__pyx_v_compareID = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("newBVComparison_bv_geq (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_bv,&__pyx_n_s_bvID,&__pyx_n_s_compareID,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_S)) != 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_bv)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newBVComparison_bv_geq", 1, 4, 4, 1); __PYX_ERR(0, 1088, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newBVComparison_bv_geq", 1, 4, 4, 2); __PYX_ERR(0, 1088, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_compareID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newBVComparison_bv_geq", 1, 4, 4, 3); __PYX_ERR(0, 1088, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "newBVComparison_bv_geq") < 0)) __PYX_ERR(0, 1088, __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_S = values[0];
__pyx_v_bv = values[1];
__pyx_v_bvID = values[2];
__pyx_v_compareID = values[3];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("newBVComparison_bv_geq", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1088, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.newBVComparison_bv_geq", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_156newBVComparison_bv_geq(__pyx_self, __pyx_v_S, __pyx_v_bv, __pyx_v_bvID, __pyx_v_compareID);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_156newBVComparison_bv_geq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvID, PyObject *__pyx_v_compareID) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("newBVComparison_bv_geq", 0);

/* "monosat/monosat_p.pyx":1093
*
*
*     assert isinstance(compareID, (int, long)), 'arg compareID wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_compareID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_compareID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_compareID_wrong_type);
 __PYX_ERR(0, 1093, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1098
*
*
*     cdef int _r = _newBVComparison_bv_geq_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID), (<int>compareID))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1098, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_bv, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1098, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_bvID); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1098, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_compareID); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1098, __pyx_L1_error)
__pyx_v__r = newBVComparison_bv_geq(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7));

/* "monosat/monosat_p.pyx":1099
*
*     cdef int _r = _newBVComparison_bv_geq_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID), (<int>compareID))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":1100
*     cdef int _r = _newBVComparison_bv_geq_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID), (<int>compareID))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def newBVComparison_bv_gt( S ,  bv ,  bvID ,  compareID ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1100, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__pyx_r = __pyx_t_8;
__pyx_t_8 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1088
*     return py_result
*
* def newBVComparison_bv_geq( S ,  bv ,  bvID ,  compareID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBVComparison_bv_geq(void* S, void* bv, int bvID, int compareID)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_8);
__Pyx_AddTraceback("monosat.monosat_p.newBVComparison_bv_geq", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1102
*     return py_result
*
* def newBVComparison_bv_gt( S ,  bv ,  bvID ,  compareID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBVComparison_bv_gt(void* S, void* bv, int bvID, int compareID)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_159newBVComparison_bv_gt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_158newBVComparison_bv_gt[] = "Cython signature: int newBVComparison_bv_gt(void* S, void* bv, int bvID, int compareID)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_159newBVComparison_bv_gt = {"newBVComparison_bv_gt", (PyCFunction)__pyx_pw_7monosat_9monosat_p_159newBVComparison_bv_gt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_158newBVComparison_bv_gt};
static PyObject *__pyx_pw_7monosat_9monosat_p_159newBVComparison_bv_gt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_bv = 0;
PyObject *__pyx_v_bvID = 0;
PyObject *__pyx_v_compareID = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("newBVComparison_bv_gt (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_bv,&__pyx_n_s_bvID,&__pyx_n_s_compareID,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_S)) != 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_bv)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newBVComparison_bv_gt", 1, 4, 4, 1); __PYX_ERR(0, 1102, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newBVComparison_bv_gt", 1, 4, 4, 2); __PYX_ERR(0, 1102, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_compareID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newBVComparison_bv_gt", 1, 4, 4, 3); __PYX_ERR(0, 1102, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "newBVComparison_bv_gt") < 0)) __PYX_ERR(0, 1102, __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_S = values[0];
__pyx_v_bv = values[1];
__pyx_v_bvID = values[2];
__pyx_v_compareID = values[3];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("newBVComparison_bv_gt", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1102, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.newBVComparison_bv_gt", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_158newBVComparison_bv_gt(__pyx_self, __pyx_v_S, __pyx_v_bv, __pyx_v_bvID, __pyx_v_compareID);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_158newBVComparison_bv_gt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvID, PyObject *__pyx_v_compareID) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("newBVComparison_bv_gt", 0);

/* "monosat/monosat_p.pyx":1107
*
*
*     assert isinstance(compareID, (int, long)), 'arg compareID wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_compareID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_compareID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_compareID_wrong_type);
 __PYX_ERR(0, 1107, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1112
*
*
*     cdef int _r = _newBVComparison_bv_gt_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID), (<int>compareID))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1112, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_bv, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1112, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_bvID); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1112, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_compareID); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1112, __pyx_L1_error)
__pyx_v__r = newBVComparison_bv_gt(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7));

/* "monosat/monosat_p.pyx":1113
*
*     cdef int _r = _newBVComparison_bv_gt_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID), (<int>compareID))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":1114
*     cdef int _r = _newBVComparison_bv_gt_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID), (<int>compareID))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def newBVComparison_bv_leq( S ,  bv ,  bvID ,  compareID ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1114, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__pyx_r = __pyx_t_8;
__pyx_t_8 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1102
*     return py_result
*
* def newBVComparison_bv_gt( S ,  bv ,  bvID ,  compareID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBVComparison_bv_gt(void* S, void* bv, int bvID, int compareID)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_8);
__Pyx_AddTraceback("monosat.monosat_p.newBVComparison_bv_gt", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1116
*     return py_result
*
* def newBVComparison_bv_leq( S ,  bv ,  bvID ,  compareID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBVComparison_bv_leq(void* S, void* bv, int bvID, int compareID)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_161newBVComparison_bv_leq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_160newBVComparison_bv_leq[] = "Cython signature: int newBVComparison_bv_leq(void* S, void* bv, int bvID, int compareID)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_161newBVComparison_bv_leq = {"newBVComparison_bv_leq", (PyCFunction)__pyx_pw_7monosat_9monosat_p_161newBVComparison_bv_leq, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_160newBVComparison_bv_leq};
static PyObject *__pyx_pw_7monosat_9monosat_p_161newBVComparison_bv_leq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_bv = 0;
PyObject *__pyx_v_bvID = 0;
PyObject *__pyx_v_compareID = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("newBVComparison_bv_leq (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_bv,&__pyx_n_s_bvID,&__pyx_n_s_compareID,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_S)) != 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_bv)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newBVComparison_bv_leq", 1, 4, 4, 1); __PYX_ERR(0, 1116, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newBVComparison_bv_leq", 1, 4, 4, 2); __PYX_ERR(0, 1116, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_compareID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newBVComparison_bv_leq", 1, 4, 4, 3); __PYX_ERR(0, 1116, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "newBVComparison_bv_leq") < 0)) __PYX_ERR(0, 1116, __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_S = values[0];
__pyx_v_bv = values[1];
__pyx_v_bvID = values[2];
__pyx_v_compareID = values[3];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("newBVComparison_bv_leq", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1116, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.newBVComparison_bv_leq", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_160newBVComparison_bv_leq(__pyx_self, __pyx_v_S, __pyx_v_bv, __pyx_v_bvID, __pyx_v_compareID);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_160newBVComparison_bv_leq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvID, PyObject *__pyx_v_compareID) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("newBVComparison_bv_leq", 0);

/* "monosat/monosat_p.pyx":1121
*
*
*     assert isinstance(compareID, (int, long)), 'arg compareID wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_compareID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_compareID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_compareID_wrong_type);
 __PYX_ERR(0, 1121, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1126
*
*
*     cdef int _r = _newBVComparison_bv_leq_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID), (<int>compareID))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1126, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_bv, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1126, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_bvID); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1126, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_compareID); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1126, __pyx_L1_error)
__pyx_v__r = newBVComparison_bv_leq(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7));

/* "monosat/monosat_p.pyx":1127
*
*     cdef int _r = _newBVComparison_bv_leq_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID), (<int>compareID))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":1128
*     cdef int _r = _newBVComparison_bv_leq_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID), (<int>compareID))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def newBVComparison_bv_lt( S ,  bv ,  bvID ,  compareID ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1128, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__pyx_r = __pyx_t_8;
__pyx_t_8 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1116
*     return py_result
*
* def newBVComparison_bv_leq( S ,  bv ,  bvID ,  compareID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBVComparison_bv_leq(void* S, void* bv, int bvID, int compareID)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_8);
__Pyx_AddTraceback("monosat.monosat_p.newBVComparison_bv_leq", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1130
*     return py_result
*
* def newBVComparison_bv_lt( S ,  bv ,  bvID ,  compareID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBVComparison_bv_lt(void* S, void* bv, int bvID, int compareID)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_163newBVComparison_bv_lt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_162newBVComparison_bv_lt[] = "Cython signature: int newBVComparison_bv_lt(void* S, void* bv, int bvID, int compareID)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_163newBVComparison_bv_lt = {"newBVComparison_bv_lt", (PyCFunction)__pyx_pw_7monosat_9monosat_p_163newBVComparison_bv_lt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_162newBVComparison_bv_lt};
static PyObject *__pyx_pw_7monosat_9monosat_p_163newBVComparison_bv_lt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_bv = 0;
PyObject *__pyx_v_bvID = 0;
PyObject *__pyx_v_compareID = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("newBVComparison_bv_lt (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_bv,&__pyx_n_s_bvID,&__pyx_n_s_compareID,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_S)) != 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_bv)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newBVComparison_bv_lt", 1, 4, 4, 1); __PYX_ERR(0, 1130, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newBVComparison_bv_lt", 1, 4, 4, 2); __PYX_ERR(0, 1130, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_compareID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newBVComparison_bv_lt", 1, 4, 4, 3); __PYX_ERR(0, 1130, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "newBVComparison_bv_lt") < 0)) __PYX_ERR(0, 1130, __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_S = values[0];
__pyx_v_bv = values[1];
__pyx_v_bvID = values[2];
__pyx_v_compareID = values[3];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("newBVComparison_bv_lt", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1130, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.newBVComparison_bv_lt", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_162newBVComparison_bv_lt(__pyx_self, __pyx_v_S, __pyx_v_bv, __pyx_v_bvID, __pyx_v_compareID);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_162newBVComparison_bv_lt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvID, PyObject *__pyx_v_compareID) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("newBVComparison_bv_lt", 0);

/* "monosat/monosat_p.pyx":1135
*
*
*     assert isinstance(compareID, (int, long)), 'arg compareID wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_compareID);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_compareID);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_compareID_wrong_type);
 __PYX_ERR(0, 1135, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1140
*
*
*     cdef int _r = _newBVComparison_bv_lt_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID), (<int>compareID))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1140, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_bv, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1140, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_bvID); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1140, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_compareID); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1140, __pyx_L1_error)
__pyx_v__r = newBVComparison_bv_lt(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7));

/* "monosat/monosat_p.pyx":1141
*
*     cdef int _r = _newBVComparison_bv_lt_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID), (<int>compareID))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":1142
*     cdef int _r = _newBVComparison_bv_lt_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID), (<int>compareID))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def newBVComparison_const_geq( S ,  bv ,  bvID ,  weight ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1142, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__pyx_r = __pyx_t_8;
__pyx_t_8 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1130
*     return py_result
*
* def newBVComparison_bv_lt( S ,  bv ,  bvID ,  compareID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBVComparison_bv_lt(void* S, void* bv, int bvID, int compareID)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_8);
__Pyx_AddTraceback("monosat.monosat_p.newBVComparison_bv_lt", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1144
*     return py_result
*
* def newBVComparison_const_geq( S ,  bv ,  bvID ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBVComparison_const_geq(void* S, void* bv, int bvID, int64_t weight)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_165newBVComparison_const_geq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_164newBVComparison_const_geq[] = "Cython signature: int newBVComparison_const_geq(void* S, void* bv, int bvID, int64_t weight)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_165newBVComparison_const_geq = {"newBVComparison_const_geq", (PyCFunction)__pyx_pw_7monosat_9monosat_p_165newBVComparison_const_geq, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_164newBVComparison_const_geq};
static PyObject *__pyx_pw_7monosat_9monosat_p_165newBVComparison_const_geq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_bv = 0;
PyObject *__pyx_v_bvID = 0;
PyObject *__pyx_v_weight = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("newBVComparison_const_geq (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_bv,&__pyx_n_s_bvID,&__pyx_n_s_weight,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_S)) != 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_bv)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newBVComparison_const_geq", 1, 4, 4, 1); __PYX_ERR(0, 1144, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newBVComparison_const_geq", 1, 4, 4, 2); __PYX_ERR(0, 1144, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weight)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newBVComparison_const_geq", 1, 4, 4, 3); __PYX_ERR(0, 1144, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "newBVComparison_const_geq") < 0)) __PYX_ERR(0, 1144, __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_S = values[0];
__pyx_v_bv = values[1];
__pyx_v_bvID = values[2];
__pyx_v_weight = values[3];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("newBVComparison_const_geq", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1144, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.newBVComparison_const_geq", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_164newBVComparison_const_geq(__pyx_self, __pyx_v_S, __pyx_v_bv, __pyx_v_bvID, __pyx_v_weight);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_164newBVComparison_const_geq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvID, PyObject *__pyx_v_weight) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int64_t __pyx_t_7;
PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("newBVComparison_const_geq", 0);

/* "monosat/monosat_p.pyx":1149
*
*
*     assert isinstance(weight, (int, long)), 'arg weight wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_weight);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_weight);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_weight_wrong_type);
 __PYX_ERR(0, 1149, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1154
*
*
*     cdef int _r = _newBVComparison_const_geq_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID), (<int64_t>weight))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1154, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_bv, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1154, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_bvID); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1154, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int64_t(__pyx_v_weight); if (unlikely((__pyx_t_7 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1154, __pyx_L1_error)
__pyx_v__r = newBVComparison_const_geq(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int64_t)__pyx_t_7));

/* "monosat/monosat_p.pyx":1155
*
*     cdef int _r = _newBVComparison_const_geq_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID), (<int64_t>weight))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":1156
*     cdef int _r = _newBVComparison_const_geq_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID), (<int64_t>weight))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def newBVComparison_const_gt( S ,  bv ,  bvID ,  weight ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1156, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__pyx_r = __pyx_t_8;
__pyx_t_8 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1144
*     return py_result
*
* def newBVComparison_const_geq( S ,  bv ,  bvID ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBVComparison_const_geq(void* S, void* bv, int bvID, int64_t weight)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_8);
__Pyx_AddTraceback("monosat.monosat_p.newBVComparison_const_geq", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1158
*     return py_result
*
* def newBVComparison_const_gt( S ,  bv ,  bvID ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBVComparison_const_gt(void* S, void* bv, int bvID, int64_t weight)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_167newBVComparison_const_gt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_166newBVComparison_const_gt[] = "Cython signature: int newBVComparison_const_gt(void* S, void* bv, int bvID, int64_t weight)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_167newBVComparison_const_gt = {"newBVComparison_const_gt", (PyCFunction)__pyx_pw_7monosat_9monosat_p_167newBVComparison_const_gt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_166newBVComparison_const_gt};
static PyObject *__pyx_pw_7monosat_9monosat_p_167newBVComparison_const_gt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_bv = 0;
PyObject *__pyx_v_bvID = 0;
PyObject *__pyx_v_weight = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("newBVComparison_const_gt (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_bv,&__pyx_n_s_bvID,&__pyx_n_s_weight,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_S)) != 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_bv)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newBVComparison_const_gt", 1, 4, 4, 1); __PYX_ERR(0, 1158, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newBVComparison_const_gt", 1, 4, 4, 2); __PYX_ERR(0, 1158, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weight)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newBVComparison_const_gt", 1, 4, 4, 3); __PYX_ERR(0, 1158, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "newBVComparison_const_gt") < 0)) __PYX_ERR(0, 1158, __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_S = values[0];
__pyx_v_bv = values[1];
__pyx_v_bvID = values[2];
__pyx_v_weight = values[3];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("newBVComparison_const_gt", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1158, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.newBVComparison_const_gt", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_166newBVComparison_const_gt(__pyx_self, __pyx_v_S, __pyx_v_bv, __pyx_v_bvID, __pyx_v_weight);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_166newBVComparison_const_gt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvID, PyObject *__pyx_v_weight) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int64_t __pyx_t_7;
PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("newBVComparison_const_gt", 0);

/* "monosat/monosat_p.pyx":1163
*
*
*     assert isinstance(weight, (int, long)), 'arg weight wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_weight);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_weight);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_weight_wrong_type);
 __PYX_ERR(0, 1163, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1168
*
*
*     cdef int _r = _newBVComparison_const_gt_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID), (<int64_t>weight))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1168, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_bv, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1168, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_bvID); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1168, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int64_t(__pyx_v_weight); if (unlikely((__pyx_t_7 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1168, __pyx_L1_error)
__pyx_v__r = newBVComparison_const_gt(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int64_t)__pyx_t_7));

/* "monosat/monosat_p.pyx":1169
*
*     cdef int _r = _newBVComparison_const_gt_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID), (<int64_t>weight))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":1170
*     cdef int _r = _newBVComparison_const_gt_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID), (<int64_t>weight))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def newBVComparison_const_leq( S ,  bv ,  bvID ,  weight ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1170, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__pyx_r = __pyx_t_8;
__pyx_t_8 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1158
*     return py_result
*
* def newBVComparison_const_gt( S ,  bv ,  bvID ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBVComparison_const_gt(void* S, void* bv, int bvID, int64_t weight)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_8);
__Pyx_AddTraceback("monosat.monosat_p.newBVComparison_const_gt", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1172
*     return py_result
*
* def newBVComparison_const_leq( S ,  bv ,  bvID ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBVComparison_const_leq(void* S, void* bv, int bvID, int64_t weight)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_169newBVComparison_const_leq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_168newBVComparison_const_leq[] = "Cython signature: int newBVComparison_const_leq(void* S, void* bv, int bvID, int64_t weight)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_169newBVComparison_const_leq = {"newBVComparison_const_leq", (PyCFunction)__pyx_pw_7monosat_9monosat_p_169newBVComparison_const_leq, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_168newBVComparison_const_leq};
static PyObject *__pyx_pw_7monosat_9monosat_p_169newBVComparison_const_leq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_bv = 0;
PyObject *__pyx_v_bvID = 0;
PyObject *__pyx_v_weight = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("newBVComparison_const_leq (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_bv,&__pyx_n_s_bvID,&__pyx_n_s_weight,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_S)) != 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_bv)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newBVComparison_const_leq", 1, 4, 4, 1); __PYX_ERR(0, 1172, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newBVComparison_const_leq", 1, 4, 4, 2); __PYX_ERR(0, 1172, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weight)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newBVComparison_const_leq", 1, 4, 4, 3); __PYX_ERR(0, 1172, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "newBVComparison_const_leq") < 0)) __PYX_ERR(0, 1172, __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_S = values[0];
__pyx_v_bv = values[1];
__pyx_v_bvID = values[2];
__pyx_v_weight = values[3];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("newBVComparison_const_leq", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1172, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.newBVComparison_const_leq", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_168newBVComparison_const_leq(__pyx_self, __pyx_v_S, __pyx_v_bv, __pyx_v_bvID, __pyx_v_weight);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_168newBVComparison_const_leq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvID, PyObject *__pyx_v_weight) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int64_t __pyx_t_7;
PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("newBVComparison_const_leq", 0);

/* "monosat/monosat_p.pyx":1177
*
*
*     assert isinstance(weight, (int, long)), 'arg weight wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_weight);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_weight);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_weight_wrong_type);
 __PYX_ERR(0, 1177, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1182
*
*
*     cdef int _r = _newBVComparison_const_leq_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID), (<int64_t>weight))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1182, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_bv, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1182, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_bvID); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1182, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int64_t(__pyx_v_weight); if (unlikely((__pyx_t_7 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1182, __pyx_L1_error)
__pyx_v__r = newBVComparison_const_leq(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int64_t)__pyx_t_7));

/* "monosat/monosat_p.pyx":1183
*
*     cdef int _r = _newBVComparison_const_leq_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID), (<int64_t>weight))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":1184
*     cdef int _r = _newBVComparison_const_leq_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID), (<int64_t>weight))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def newBVComparison_const_lt( S ,  bv ,  bvID ,  weight ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1184, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__pyx_r = __pyx_t_8;
__pyx_t_8 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1172
*     return py_result
*
* def newBVComparison_const_leq( S ,  bv ,  bvID ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBVComparison_const_leq(void* S, void* bv, int bvID, int64_t weight)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_8);
__Pyx_AddTraceback("monosat.monosat_p.newBVComparison_const_leq", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1186
*     return py_result
*
* def newBVComparison_const_lt( S ,  bv ,  bvID ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBVComparison_const_lt(void* S, void* bv, int bvID, int64_t weight)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_171newBVComparison_const_lt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_170newBVComparison_const_lt[] = "Cython signature: int newBVComparison_const_lt(void* S, void* bv, int bvID, int64_t weight)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_171newBVComparison_const_lt = {"newBVComparison_const_lt", (PyCFunction)__pyx_pw_7monosat_9monosat_p_171newBVComparison_const_lt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_170newBVComparison_const_lt};
static PyObject *__pyx_pw_7monosat_9monosat_p_171newBVComparison_const_lt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_bv = 0;
PyObject *__pyx_v_bvID = 0;
PyObject *__pyx_v_weight = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("newBVComparison_const_lt (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_bv,&__pyx_n_s_bvID,&__pyx_n_s_weight,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_S)) != 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_bv)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newBVComparison_const_lt", 1, 4, 4, 1); __PYX_ERR(0, 1186, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newBVComparison_const_lt", 1, 4, 4, 2); __PYX_ERR(0, 1186, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weight)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newBVComparison_const_lt", 1, 4, 4, 3); __PYX_ERR(0, 1186, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "newBVComparison_const_lt") < 0)) __PYX_ERR(0, 1186, __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_S = values[0];
__pyx_v_bv = values[1];
__pyx_v_bvID = values[2];
__pyx_v_weight = values[3];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("newBVComparison_const_lt", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1186, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.newBVComparison_const_lt", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_170newBVComparison_const_lt(__pyx_self, __pyx_v_S, __pyx_v_bv, __pyx_v_bvID, __pyx_v_weight);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_170newBVComparison_const_lt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvID, PyObject *__pyx_v_weight) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int64_t __pyx_t_7;
PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("newBVComparison_const_lt", 0);

/* "monosat/monosat_p.pyx":1191
*
*
*     assert isinstance(weight, (int, long)), 'arg weight wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_weight);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_weight);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_weight_wrong_type);
 __PYX_ERR(0, 1191, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1196
*
*
*     cdef int _r = _newBVComparison_const_lt_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID), (<int64_t>weight))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1196, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_bv, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1196, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_bvID); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1196, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int64_t(__pyx_v_weight); if (unlikely((__pyx_t_7 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1196, __pyx_L1_error)
__pyx_v__r = newBVComparison_const_lt(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int64_t)__pyx_t_7));

/* "monosat/monosat_p.pyx":1197
*
*     cdef int _r = _newBVComparison_const_lt_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID), (<int64_t>weight))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":1198
*     cdef int _r = _newBVComparison_const_lt_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID), (<int64_t>weight))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def newBitvector( S ,  bv ,  bits ,  n_bits ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1198, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__pyx_r = __pyx_t_8;
__pyx_t_8 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1186
*     return py_result
*
* def newBVComparison_const_lt( S ,  bv ,  bvID ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBVComparison_const_lt(void* S, void* bv, int bvID, int64_t weight)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_8);
__Pyx_AddTraceback("monosat.monosat_p.newBVComparison_const_lt", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1200
*     return py_result
*
* def newBitvector( S ,  bv ,  bits ,  n_bits ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBitvector(void* S, void* bv, int* bits, int n_bits)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_173newBitvector(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_172newBitvector[] = "Cython signature: int newBitvector(void* S, void* bv, int* bits, int n_bits)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_173newBitvector = {"newBitvector", (PyCFunction)__pyx_pw_7monosat_9monosat_p_173newBitvector, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_172newBitvector};
static PyObject *__pyx_pw_7monosat_9monosat_p_173newBitvector(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_bv = 0;
PyObject *__pyx_v_bits = 0;
PyObject *__pyx_v_n_bits = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("newBitvector (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_bv,&__pyx_n_s_bits,&__pyx_n_s_n_bits,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_S)) != 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_bv)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newBitvector", 1, 4, 4, 1); __PYX_ERR(0, 1200, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bits)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newBitvector", 1, 4, 4, 2); __PYX_ERR(0, 1200, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n_bits)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newBitvector", 1, 4, 4, 3); __PYX_ERR(0, 1200, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "newBitvector") < 0)) __PYX_ERR(0, 1200, __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_S = values[0];
__pyx_v_bv = values[1];
__pyx_v_bits = values[2];
__pyx_v_n_bits = values[3];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("newBitvector", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1200, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.newBitvector", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_172newBitvector(__pyx_self, __pyx_v_S, __pyx_v_bv, __pyx_v_bits, __pyx_v_n_bits);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_172newBitvector(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bits, PyObject *__pyx_v_n_bits) {
arrayobject *__pyx_v_a = 0;
int __pyx_v__r;
int __pyx_v_py_result;
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;
void *__pyx_t_6;
void *__pyx_t_7;
int __pyx_t_8;
__Pyx_RefNannySetupContext("newBitvector", 0);

/* "monosat/monosat_p.pyx":1204
*
*
*     assert isinstance(bits, list), 'arg bits wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(n_bits, (int, long)), 'arg n_bits wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_1 = PyList_Check(__pyx_v_bits);
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_bits_wrong_type);
 __PYX_ERR(0, 1204, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1205
*
*     assert isinstance(bits, list), 'arg bits wrong type'
*     assert isinstance(n_bits, (int, long)), 'arg n_bits wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_n_bits);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_n_bits);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_n_bits_wrong_type);
 __PYX_ERR(0, 1205, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1208
*
*
*     cdef array.array a =  array.array('i', bits)             # <<<<<<<<<<<<<<
*
*     cdef int _r = _newBitvector_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int*>a.data.as_ints), (<int>n_bits))
*/
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1208, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_n_s_i);
__Pyx_GIVEREF(__pyx_n_s_i);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_i);
__Pyx_INCREF(__pyx_v_bits);
__Pyx_GIVEREF(__pyx_v_bits);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_bits);
__pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1208, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_a = ((arrayobject *)__pyx_t_5);
__pyx_t_5 = 0;

/* "monosat/monosat_p.pyx":1210
*     cdef array.array a =  array.array('i', bits)
*
*     cdef int _r = _newBitvector_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int*>a.data.as_ints), (<int>n_bits))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_6 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_6 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1210, __pyx_L1_error)
__pyx_t_7 = PyCapsule_GetPointer(__pyx_v_bv, NULL); if (unlikely(__pyx_t_7 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1210, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_n_bits); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1210, __pyx_L1_error)
__pyx_v__r = newBitvector(((void *)__pyx_t_6), ((void *)__pyx_t_7), ((int *)__pyx_v_a->data.as_ints), ((int)__pyx_t_8));

/* "monosat/monosat_p.pyx":1211
*
*     cdef int _r = _newBitvector_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int*>a.data.as_ints), (<int>n_bits))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":1212
*     cdef int _r = _newBitvector_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int*>a.data.as_ints), (<int>n_bits))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def newBitvector_anon( S ,  bv ,  bvWidth ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1212, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_r = __pyx_t_5;
__pyx_t_5 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1200
*     return py_result
*
* def newBitvector( S ,  bv ,  bits ,  n_bits ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBitvector(void* S, void* bv, int* bits, int n_bits)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_AddTraceback("monosat.monosat_p.newBitvector", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_a);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1214
*     return py_result
*
* def newBitvector_anon( S ,  bv ,  bvWidth ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBitvector_anon(void* S, void* bv, int bvWidth)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_175newBitvector_anon(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_174newBitvector_anon[] = "Cython signature: int newBitvector_anon(void* S, void* bv, int bvWidth)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_175newBitvector_anon = {"newBitvector_anon", (PyCFunction)__pyx_pw_7monosat_9monosat_p_175newBitvector_anon, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_174newBitvector_anon};
static PyObject *__pyx_pw_7monosat_9monosat_p_175newBitvector_anon(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_bv = 0;
PyObject *__pyx_v_bvWidth = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("newBitvector_anon (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_bv,&__pyx_n_s_bvWidth,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_S)) != 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_bv)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newBitvector_anon", 1, 3, 3, 1); __PYX_ERR(0, 1214, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvWidth)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newBitvector_anon", 1, 3, 3, 2); __PYX_ERR(0, 1214, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "newBitvector_anon") < 0)) __PYX_ERR(0, 1214, __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_S = values[0];
__pyx_v_bv = values[1];
__pyx_v_bvWidth = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("newBitvector_anon", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1214, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.newBitvector_anon", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_174newBitvector_anon(__pyx_self, __pyx_v_S, __pyx_v_bv, __pyx_v_bvWidth);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_174newBitvector_anon(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvWidth) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
PyObject *__pyx_t_7 = NULL;
__Pyx_RefNannySetupContext("newBitvector_anon", 0);

/* "monosat/monosat_p.pyx":1218
*
*
*     assert isinstance(bvWidth, (int, long)), 'arg bvWidth wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_bvWidth);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_bvWidth);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_bvWidth_wrong_type);
 __PYX_ERR(0, 1218, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1222
*
*
*     cdef int _r = _newBitvector_anon_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvWidth))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1222, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_bv, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1222, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_bvWidth); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1222, __pyx_L1_error)
__pyx_v__r = newBitvector_anon(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6));

/* "monosat/monosat_p.pyx":1223
*
*     cdef int _r = _newBitvector_anon_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvWidth))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":1224
*     cdef int _r = _newBitvector_anon_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvWidth))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def newBitvector_const( S ,  bv ,  bvWidth ,  constval ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1224, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_r = __pyx_t_7;
__pyx_t_7 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1214
*     return py_result
*
* def newBitvector_anon( S ,  bv ,  bvWidth ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBitvector_anon(void* S, void* bv, int bvWidth)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_7);
__Pyx_AddTraceback("monosat.monosat_p.newBitvector_anon", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1226
*     return py_result
*
* def newBitvector_const( S ,  bv ,  bvWidth ,  constval ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBitvector_const(void* S, void* bv, int bvWidth, int64_t constval)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_177newBitvector_const(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_176newBitvector_const[] = "Cython signature: int newBitvector_const(void* S, void* bv, int bvWidth, int64_t constval)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_177newBitvector_const = {"newBitvector_const", (PyCFunction)__pyx_pw_7monosat_9monosat_p_177newBitvector_const, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_176newBitvector_const};
static PyObject *__pyx_pw_7monosat_9monosat_p_177newBitvector_const(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_bv = 0;
PyObject *__pyx_v_bvWidth = 0;
PyObject *__pyx_v_constval = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("newBitvector_const (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_bv,&__pyx_n_s_bvWidth,&__pyx_n_s_constval,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_S)) != 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_bv)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newBitvector_const", 1, 4, 4, 1); __PYX_ERR(0, 1226, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvWidth)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newBitvector_const", 1, 4, 4, 2); __PYX_ERR(0, 1226, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_constval)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newBitvector_const", 1, 4, 4, 3); __PYX_ERR(0, 1226, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "newBitvector_const") < 0)) __PYX_ERR(0, 1226, __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_S = values[0];
__pyx_v_bv = values[1];
__pyx_v_bvWidth = values[2];
__pyx_v_constval = values[3];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("newBitvector_const", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1226, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.newBitvector_const", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_176newBitvector_const(__pyx_self, __pyx_v_S, __pyx_v_bv, __pyx_v_bvWidth, __pyx_v_constval);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_176newBitvector_const(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_bv, PyObject *__pyx_v_bvWidth, PyObject *__pyx_v_constval) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int64_t __pyx_t_7;
PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("newBitvector_const", 0);

/* "monosat/monosat_p.pyx":1230
*
*
*     assert isinstance(bvWidth, (int, long)), 'arg bvWidth wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(constval, (int, long)), 'arg constval wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_bvWidth);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_bvWidth);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_bvWidth_wrong_type);
 __PYX_ERR(0, 1230, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1231
*
*     assert isinstance(bvWidth, (int, long)), 'arg bvWidth wrong type'
*     assert isinstance(constval, (int, long)), 'arg constval wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_constval);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_constval);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_constval_wrong_type);
 __PYX_ERR(0, 1231, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1236
*
*
*     cdef int _r = _newBitvector_const_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvWidth), (<int64_t>constval))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1236, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_bv, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1236, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_bvWidth); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1236, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int64_t(__pyx_v_constval); if (unlikely((__pyx_t_7 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1236, __pyx_L1_error)
__pyx_v__r = newBitvector_const(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int64_t)__pyx_t_7));

/* "monosat/monosat_p.pyx":1237
*
*     cdef int _r = _newBitvector_const_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvWidth), (<int64_t>constval))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":1238
*     cdef int _r = _newBitvector_const_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvWidth), (<int64_t>constval))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def newEdge( S ,  G ,  _from ,  to ,  weight ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1238, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__pyx_r = __pyx_t_8;
__pyx_t_8 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1226
*     return py_result
*
* def newBitvector_const( S ,  bv ,  bvWidth ,  constval ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBitvector_const(void* S, void* bv, int bvWidth, int64_t constval)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_8);
__Pyx_AddTraceback("monosat.monosat_p.newBitvector_const", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1240
*     return py_result
*
* def newEdge( S ,  G ,  _from ,  to ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newEdge(void* S, void* G, int _from, int to, int64_t weight)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_179newEdge(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_178newEdge[] = "Cython signature: int newEdge(void* S, void* G, int _from, int to, int64_t weight)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_179newEdge = {"newEdge", (PyCFunction)__pyx_pw_7monosat_9monosat_p_179newEdge, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_178newEdge};
static PyObject *__pyx_pw_7monosat_9monosat_p_179newEdge(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_G = 0;
PyObject *__pyx_v__from = 0;
PyObject *__pyx_v_to = 0;
PyObject *__pyx_v_weight = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("newEdge (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_G,&__pyx_n_s_from,&__pyx_n_s_to,&__pyx_n_s_weight,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_S)) != 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_G)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newEdge", 1, 5, 5, 1); __PYX_ERR(0, 1240, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_from)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newEdge", 1, 5, 5, 2); __PYX_ERR(0, 1240, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_to)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newEdge", 1, 5, 5, 3); __PYX_ERR(0, 1240, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weight)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newEdge", 1, 5, 5, 4); __PYX_ERR(0, 1240, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "newEdge") < 0)) __PYX_ERR(0, 1240, __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_S = values[0];
__pyx_v_G = values[1];
__pyx_v__from = values[2];
__pyx_v_to = values[3];
__pyx_v_weight = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("newEdge", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1240, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.newEdge", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_178newEdge(__pyx_self, __pyx_v_S, __pyx_v_G, __pyx_v__from, __pyx_v_to, __pyx_v_weight);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_178newEdge(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v__from, PyObject *__pyx_v_to, PyObject *__pyx_v_weight) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
int64_t __pyx_t_8;
PyObject *__pyx_t_9 = NULL;
__Pyx_RefNannySetupContext("newEdge", 0);

/* "monosat/monosat_p.pyx":1244
*
*
*     assert isinstance(_from, (int, long)), 'arg _from wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(to, (int, long)), 'arg to wrong type'
*     assert isinstance(weight, (int, long)), 'arg weight wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v__from);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v__from);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg__from_wrong_type);
 __PYX_ERR(0, 1244, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1245
*
*     assert isinstance(_from, (int, long)), 'arg _from wrong type'
*     assert isinstance(to, (int, long)), 'arg to wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(weight, (int, long)), 'arg weight wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_to);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_to);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_to_wrong_type);
 __PYX_ERR(0, 1245, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1246
*     assert isinstance(_from, (int, long)), 'arg _from wrong type'
*     assert isinstance(to, (int, long)), 'arg to wrong type'
*     assert isinstance(weight, (int, long)), 'arg weight wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_weight);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L7_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_weight);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_weight_wrong_type);
 __PYX_ERR(0, 1246, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1252
*
*
*     cdef int _r = _newEdge_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to), (<int64_t>weight))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1252, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_G, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1252, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v__from); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1252, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_to); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1252, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int64_t(__pyx_v_weight); if (unlikely((__pyx_t_8 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1252, __pyx_L1_error)
__pyx_v__r = newEdge(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7), ((int64_t)__pyx_t_8));

/* "monosat/monosat_p.pyx":1253
*
*     cdef int _r = _newEdge_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to), (<int64_t>weight))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":1254
*     cdef int _r = _newEdge_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to), (<int64_t>weight))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def newEdgeSet( S ,  G ,  edges ,  n_edges ,  enforceEdgeAssignment ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1254, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__pyx_r = __pyx_t_9;
__pyx_t_9 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1240
*     return py_result
*
* def newEdge( S ,  G ,  _from ,  to ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newEdge(void* S, void* G, int _from, int to, int64_t weight)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_9);
__Pyx_AddTraceback("monosat.monosat_p.newEdge", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1256
*     return py_result
*
* def newEdgeSet( S ,  G ,  edges ,  n_edges ,  enforceEdgeAssignment ):             # <<<<<<<<<<<<<<
*     """Cython signature: void newEdgeSet(void* S, void* G, int* edges, int n_edges, bint enforceEdgeAssignment)"""
*     cdef array.array a =  array.array('i', edges)
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_181newEdgeSet(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_180newEdgeSet[] = "Cython signature: void newEdgeSet(void* S, void* G, int* edges, int n_edges, bint enforceEdgeAssignment)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_181newEdgeSet = {"newEdgeSet", (PyCFunction)__pyx_pw_7monosat_9monosat_p_181newEdgeSet, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_180newEdgeSet};
static PyObject *__pyx_pw_7monosat_9monosat_p_181newEdgeSet(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_G = 0;
PyObject *__pyx_v_edges = 0;
PyObject *__pyx_v_n_edges = 0;
PyObject *__pyx_v_enforceEdgeAssignment = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("newEdgeSet (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_G,&__pyx_n_s_edges,&__pyx_n_s_n_edges,&__pyx_n_s_enforceEdgeAssignment,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_S)) != 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_G)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newEdgeSet", 1, 5, 5, 1); __PYX_ERR(0, 1256, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_edges)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newEdgeSet", 1, 5, 5, 2); __PYX_ERR(0, 1256, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n_edges)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newEdgeSet", 1, 5, 5, 3); __PYX_ERR(0, 1256, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_enforceEdgeAssignment)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newEdgeSet", 1, 5, 5, 4); __PYX_ERR(0, 1256, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "newEdgeSet") < 0)) __PYX_ERR(0, 1256, __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_S = values[0];
__pyx_v_G = values[1];
__pyx_v_edges = values[2];
__pyx_v_n_edges = values[3];
__pyx_v_enforceEdgeAssignment = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("newEdgeSet", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1256, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.newEdgeSet", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_180newEdgeSet(__pyx_self, __pyx_v_S, __pyx_v_G, __pyx_v_edges, __pyx_v_n_edges, __pyx_v_enforceEdgeAssignment);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_180newEdgeSet(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_edges, PyObject *__pyx_v_n_edges, PyObject *__pyx_v_enforceEdgeAssignment) {
arrayobject *__pyx_v_a = 0;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
void *__pyx_t_3;
void *__pyx_t_4;
int __pyx_t_5;
int __pyx_t_6;
__Pyx_RefNannySetupContext("newEdgeSet", 0);

/* "monosat/monosat_p.pyx":1258
* def newEdgeSet( S ,  G ,  edges ,  n_edges ,  enforceEdgeAssignment ):
*     """Cython signature: void newEdgeSet(void* S, void* G, int* edges, int n_edges, bint enforceEdgeAssignment)"""
*     cdef array.array a =  array.array('i', edges)             # <<<<<<<<<<<<<<
*     _newEdgeSet_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int*>a.data.as_ints), (<int>n_edges), (<bint>enforceEdgeAssignment))
*
*/
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1258, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_n_s_i);
__Pyx_GIVEREF(__pyx_n_s_i);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_i);
__Pyx_INCREF(__pyx_v_edges);
__Pyx_GIVEREF(__pyx_v_edges);
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_edges);
__pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1258, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_a = ((arrayobject *)__pyx_t_2);
__pyx_t_2 = 0;

/* "monosat/monosat_p.pyx":1259
*     """Cython signature: void newEdgeSet(void* S, void* G, int* edges, int n_edges, bint enforceEdgeAssignment)"""
*     cdef array.array a =  array.array('i', edges)
*     _newEdgeSet_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int*>a.data.as_ints), (<int>n_edges), (<bint>enforceEdgeAssignment))             # <<<<<<<<<<<<<<
*
* def newEdge_bv( S ,  G ,  _from ,  to ,  bvID ):
*/
__pyx_t_3 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_3 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1259, __pyx_L1_error)
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_G, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1259, __pyx_L1_error)
__pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_n_edges); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1259, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_enforceEdgeAssignment); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1259, __pyx_L1_error)
newEdgeSet(((void *)__pyx_t_3), ((void *)__pyx_t_4), ((int *)__pyx_v_a->data.as_ints), ((int)__pyx_t_5), __pyx_t_6);

/* "monosat/monosat_p.pyx":1256
*     return py_result
*
* def newEdgeSet( S ,  G ,  edges ,  n_edges ,  enforceEdgeAssignment ):             # <<<<<<<<<<<<<<
*     """Cython signature: void newEdgeSet(void* S, void* G, int* edges, int n_edges, bint enforceEdgeAssignment)"""
*     cdef array.array a =  array.array('i', edges)
*/

/* 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("monosat.monosat_p.newEdgeSet", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_a);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1261
*     _newEdgeSet_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int*>a.data.as_ints), (<int>n_edges), (<bint>enforceEdgeAssignment))
*
* def newEdge_bv( S ,  G ,  _from ,  to ,  bvID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newEdge_bv(void* S, void* G, int _from, int to, int bvID)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_183newEdge_bv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_182newEdge_bv[] = "Cython signature: int newEdge_bv(void* S, void* G, int _from, int to, int bvID)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_183newEdge_bv = {"newEdge_bv", (PyCFunction)__pyx_pw_7monosat_9monosat_p_183newEdge_bv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_182newEdge_bv};
static PyObject *__pyx_pw_7monosat_9monosat_p_183newEdge_bv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_G = 0;
PyObject *__pyx_v__from = 0;
PyObject *__pyx_v_to = 0;
PyObject *__pyx_v_bvID = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("newEdge_bv (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_G,&__pyx_n_s_from,&__pyx_n_s_to,&__pyx_n_s_bvID,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_S)) != 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_G)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newEdge_bv", 1, 5, 5, 1); __PYX_ERR(0, 1261, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_from)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newEdge_bv", 1, 5, 5, 2); __PYX_ERR(0, 1261, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_to)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newEdge_bv", 1, 5, 5, 3); __PYX_ERR(0, 1261, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newEdge_bv", 1, 5, 5, 4); __PYX_ERR(0, 1261, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "newEdge_bv") < 0)) __PYX_ERR(0, 1261, __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_S = values[0];
__pyx_v_G = values[1];
__pyx_v__from = values[2];
__pyx_v_to = values[3];
__pyx_v_bvID = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("newEdge_bv", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1261, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.newEdge_bv", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_182newEdge_bv(__pyx_self, __pyx_v_S, __pyx_v_G, __pyx_v__from, __pyx_v_to, __pyx_v_bvID);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_182newEdge_bv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v__from, PyObject *__pyx_v_to, PyObject *__pyx_v_bvID) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
int __pyx_t_8;
PyObject *__pyx_t_9 = NULL;
__Pyx_RefNannySetupContext("newEdge_bv", 0);

/* "monosat/monosat_p.pyx":1265
*
*
*     assert isinstance(_from, (int, long)), 'arg _from wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(to, (int, long)), 'arg to wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v__from);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v__from);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg__from_wrong_type);
 __PYX_ERR(0, 1265, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1266
*
*     assert isinstance(_from, (int, long)), 'arg _from wrong type'
*     assert isinstance(to, (int, long)), 'arg to wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_to);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_to);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_to_wrong_type);
 __PYX_ERR(0, 1266, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1273
*
*
*     cdef int _r = _newEdge_bv_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to), (<int>bvID))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1273, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_G, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1273, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v__from); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1273, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_to); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1273, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_bvID); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1273, __pyx_L1_error)
__pyx_v__r = newEdge_bv(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7), ((int)__pyx_t_8));

/* "monosat/monosat_p.pyx":1274
*
*     cdef int _r = _newEdge_bv_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to), (<int>bvID))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":1275
*     cdef int _r = _newEdge_bv_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to), (<int>bvID))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def newEdge_double( S ,  G ,  _from ,  to , double weight ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1275, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__pyx_r = __pyx_t_9;
__pyx_t_9 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1261
*     _newEdgeSet_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int*>a.data.as_ints), (<int>n_edges), (<bint>enforceEdgeAssignment))
*
* def newEdge_bv( S ,  G ,  _from ,  to ,  bvID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newEdge_bv(void* S, void* G, int _from, int to, int bvID)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_9);
__Pyx_AddTraceback("monosat.monosat_p.newEdge_bv", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1277
*     return py_result
*
* def newEdge_double( S ,  G ,  _from ,  to , double weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newEdge_double(void* S, void* G, int _from, int to, double weight)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_185newEdge_double(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_184newEdge_double[] = "Cython signature: int newEdge_double(void* S, void* G, int _from, int to, double weight)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_185newEdge_double = {"newEdge_double", (PyCFunction)__pyx_pw_7monosat_9monosat_p_185newEdge_double, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_184newEdge_double};
static PyObject *__pyx_pw_7monosat_9monosat_p_185newEdge_double(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_G = 0;
PyObject *__pyx_v__from = 0;
PyObject *__pyx_v_to = 0;
double __pyx_v_weight;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("newEdge_double (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_G,&__pyx_n_s_from,&__pyx_n_s_to,&__pyx_n_s_weight,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_S)) != 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_G)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newEdge_double", 1, 5, 5, 1); __PYX_ERR(0, 1277, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_from)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newEdge_double", 1, 5, 5, 2); __PYX_ERR(0, 1277, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_to)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newEdge_double", 1, 5, 5, 3); __PYX_ERR(0, 1277, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weight)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newEdge_double", 1, 5, 5, 4); __PYX_ERR(0, 1277, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "newEdge_double") < 0)) __PYX_ERR(0, 1277, __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_S = values[0];
__pyx_v_G = values[1];
__pyx_v__from = values[2];
__pyx_v_to = values[3];
__pyx_v_weight = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_weight == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1277, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("newEdge_double", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1277, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.newEdge_double", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_184newEdge_double(__pyx_self, __pyx_v_S, __pyx_v_G, __pyx_v__from, __pyx_v_to, __pyx_v_weight);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_184newEdge_double(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v__from, PyObject *__pyx_v_to, double __pyx_v_weight) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
PyObject *__pyx_t_4 = NULL;
void *__pyx_t_5;
void *__pyx_t_6;
int __pyx_t_7;
int __pyx_t_8;
__Pyx_RefNannySetupContext("newEdge_double", 0);

/* "monosat/monosat_p.pyx":1281
*
*
*     assert isinstance(_from, (int, long)), 'arg _from wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(to, (int, long)), 'arg to wrong type'
*     assert isinstance(weight, float), 'arg weight wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v__from);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v__from);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg__from_wrong_type);
 __PYX_ERR(0, 1281, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1282
*
*     assert isinstance(_from, (int, long)), 'arg _from wrong type'
*     assert isinstance(to, (int, long)), 'arg to wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(weight, float), 'arg weight wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_to);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_to);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_to_wrong_type);
 __PYX_ERR(0, 1282, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1283
*     assert isinstance(_from, (int, long)), 'arg _from wrong type'
*     assert isinstance(to, (int, long)), 'arg to wrong type'
*     assert isinstance(weight, float), 'arg weight wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_4 = PyFloat_FromDouble(__pyx_v_weight); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1283, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_1 = PyFloat_Check(__pyx_t_4);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_weight_wrong_type);
 __PYX_ERR(0, 1283, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1289
*
*
*     cdef int _r = _newEdge_double_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to), (<double>weight))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1289, __pyx_L1_error)
__pyx_t_6 = PyCapsule_GetPointer(__pyx_v_G, NULL); if (unlikely(__pyx_t_6 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1289, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v__from); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1289, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_to); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1289, __pyx_L1_error)
__pyx_v__r = newEdge_double(((void *)__pyx_t_5), ((void *)__pyx_t_6), ((int)__pyx_t_7), ((int)__pyx_t_8), ((double)__pyx_v_weight));

/* "monosat/monosat_p.pyx":1290
*
*     cdef int _r = _newEdge_double_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to), (<double>weight))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":1291
*     cdef int _r = _newEdge_double_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to), (<double>weight))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
*
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1291, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_r = __pyx_t_4;
__pyx_t_4 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1277
*     return py_result
*
* def newEdge_double( S ,  G ,  _from ,  to , double weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newEdge_double(void* S, void* G, int _from, int to, double weight)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_4);
__Pyx_AddTraceback("monosat.monosat_p.newEdge_double", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1294
*
*
* def newGraph( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: void* newGraph(void* S)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_187newGraph(PyObject *__pyx_self, PyObject *__pyx_v_S); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_186newGraph[] = "Cython signature: void* newGraph(void* S)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_187newGraph = {"newGraph", (PyCFunction)__pyx_pw_7monosat_9monosat_p_187newGraph, METH_O, __pyx_doc_7monosat_9monosat_p_186newGraph};
static PyObject *__pyx_pw_7monosat_9monosat_p_187newGraph(PyObject *__pyx_self, PyObject *__pyx_v_S) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("newGraph (wrapper)", 0);
__pyx_r = __pyx_pf_7monosat_9monosat_p_186newGraph(__pyx_self, ((PyObject *)__pyx_v_S));

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

static PyObject *__pyx_pf_7monosat_9monosat_p_186newGraph(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S) {
void *__pyx_v__r;
PyObject *__pyx_v_py_result = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
void *__pyx_t_1;
PyObject *__pyx_t_2 = NULL;
__Pyx_RefNannySetupContext("newGraph", 0);

/* "monosat/monosat_p.pyx":1298
*
*
*     cdef void* _r = _newGraph_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))             # <<<<<<<<<<<<<<
*     py_result =   pycapsule.PyCapsule_New(_r, NULL, NULL)
*     return py_result
*/
__pyx_t_1 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1298, __pyx_L1_error)
__pyx_v__r = newGraph(((void *)__pyx_t_1));

/* "monosat/monosat_p.pyx":1299
*
*     cdef void* _r = _newGraph_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))
*     py_result =   pycapsule.PyCapsule_New(_r, NULL, NULL)             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_t_2 = PyCapsule_New(__pyx_v__r, NULL, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1299, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_v_py_result = __pyx_t_2;
__pyx_t_2 = 0;

/* "monosat/monosat_p.pyx":1300
*     cdef void* _r = _newGraph_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))
*     py_result =   pycapsule.PyCapsule_New(_r, NULL, NULL)
*     return py_result             # <<<<<<<<<<<<<<
*
* def newNode( S ,  G ):
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_v_py_result);
__pyx_r = __pyx_v_py_result;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1294
*
*
* def newGraph( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: void* newGraph(void* S)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("monosat.monosat_p.newGraph", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_py_result);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1302
*     return py_result
*
* def newNode( S ,  G ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newNode(void* S, void* G)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_189newNode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_188newNode[] = "Cython signature: int newNode(void* S, void* G)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_189newNode = {"newNode", (PyCFunction)__pyx_pw_7monosat_9monosat_p_189newNode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_188newNode};
static PyObject *__pyx_pw_7monosat_9monosat_p_189newNode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_G = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("newNode (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_G,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_S)) != 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_G)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("newNode", 1, 2, 2, 1); __PYX_ERR(0, 1302, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "newNode") < 0)) __PYX_ERR(0, 1302, __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_S = values[0];
__pyx_v_G = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("newNode", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1302, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.newNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_188newNode(__pyx_self, __pyx_v_S, __pyx_v_G);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_188newNode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
void *__pyx_t_1;
void *__pyx_t_2;
PyObject *__pyx_t_3 = NULL;
__Pyx_RefNannySetupContext("newNode", 0);

/* "monosat/monosat_p.pyx":1308
*
*
*     cdef int _r = _newNode_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_1 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1308, __pyx_L1_error)
__pyx_t_2 = PyCapsule_GetPointer(__pyx_v_G, NULL); if (unlikely(__pyx_t_2 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1308, __pyx_L1_error)
__pyx_v__r = newNode(((void *)__pyx_t_1), ((void *)__pyx_t_2));

/* "monosat/monosat_p.pyx":1309
*
*     cdef int _r = _newNode_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":1310
*     cdef int _r = _newNode_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def newSolver():
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1310, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1302
*     return py_result
*
* def newNode( S ,  G ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newNode(void* S, void* G)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("monosat.monosat_p.newNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1312
*     return py_result
*
* def newSolver():             # <<<<<<<<<<<<<<
*     """Cython signature: void* newSolver()"""
*     cdef void* _r = _newSolver_monosat()
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_191newSolver(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_190newSolver[] = "Cython signature: void* newSolver()";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_191newSolver = {"newSolver", (PyCFunction)__pyx_pw_7monosat_9monosat_p_191newSolver, METH_NOARGS, __pyx_doc_7monosat_9monosat_p_190newSolver};
static PyObject *__pyx_pw_7monosat_9monosat_p_191newSolver(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("newSolver (wrapper)", 0);
__pyx_r = __pyx_pf_7monosat_9monosat_p_190newSolver(__pyx_self);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_190newSolver(CYTHON_UNUSED PyObject *__pyx_self) {
void *__pyx_v__r;
PyObject *__pyx_v_py_result = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
PyObject *__pyx_t_2 = NULL;
__Pyx_RefNannySetupContext("newSolver", 0);

/* "monosat/monosat_p.pyx":1314
* def newSolver():
*     """Cython signature: void* newSolver()"""
*     cdef void* _r = _newSolver_monosat()             # <<<<<<<<<<<<<<
*     if _r is NULL:
*         raise MemoryError()
*/
__pyx_v__r = newSolver();

/* "monosat/monosat_p.pyx":1315
*     """Cython signature: void* newSolver()"""
*     cdef void* _r = _newSolver_monosat()
*     if _r is NULL:             # <<<<<<<<<<<<<<
*         raise MemoryError()
*     py_result =   pycapsule.PyCapsule_New(_r, NULL, NULL)
*/
__pyx_t_1 = ((__pyx_v__r == NULL) != 0);
if (unlikely(__pyx_t_1)) {

/* "monosat/monosat_p.pyx":1316
*     cdef void* _r = _newSolver_monosat()
*     if _r is NULL:
*         raise MemoryError()             # <<<<<<<<<<<<<<
*     py_result =   pycapsule.PyCapsule_New(_r, NULL, NULL)
*     return py_result
*/
PyErr_NoMemory(); __PYX_ERR(0, 1316, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1315
*     """Cython signature: void* newSolver()"""
*     cdef void* _r = _newSolver_monosat()
*     if _r is NULL:             # <<<<<<<<<<<<<<
*         raise MemoryError()
*     py_result =   pycapsule.PyCapsule_New(_r, NULL, NULL)
*/
}

/* "monosat/monosat_p.pyx":1317
*     if _r is NULL:
*         raise MemoryError()
*     py_result =   pycapsule.PyCapsule_New(_r, NULL, NULL)             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_t_2 = PyCapsule_New(__pyx_v__r, NULL, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1317, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_v_py_result = __pyx_t_2;
__pyx_t_2 = 0;

/* "monosat/monosat_p.pyx":1318
*         raise MemoryError()
*     py_result =   pycapsule.PyCapsule_New(_r, NULL, NULL)
*     return py_result             # <<<<<<<<<<<<<<
*
* def newSolver_arg(bytes argv ):
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_v_py_result);
__pyx_r = __pyx_v_py_result;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1312
*     return py_result
*
* def newSolver():             # <<<<<<<<<<<<<<
*     """Cython signature: void* newSolver()"""
*     cdef void* _r = _newSolver_monosat()
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("monosat.monosat_p.newSolver", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_py_result);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1320
*     return py_result
*
* def newSolver_arg(bytes argv ):             # <<<<<<<<<<<<<<
*     """Cython signature: void* newSolver_arg(char * argv)"""
*     assert isinstance(argv, bytes), 'arg argv wrong type'
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_193newSolver_arg(PyObject *__pyx_self, PyObject *__pyx_v_argv); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_192newSolver_arg[] = "Cython signature: void* newSolver_arg(char * argv)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_193newSolver_arg = {"newSolver_arg", (PyCFunction)__pyx_pw_7monosat_9monosat_p_193newSolver_arg, METH_O, __pyx_doc_7monosat_9monosat_p_192newSolver_arg};
static PyObject *__pyx_pw_7monosat_9monosat_p_193newSolver_arg(PyObject *__pyx_self, PyObject *__pyx_v_argv) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("newSolver_arg (wrapper)", 0);
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_argv), (&PyBytes_Type), 1, "argv", 1))) __PYX_ERR(0, 1320, __pyx_L1_error)
__pyx_r = __pyx_pf_7monosat_9monosat_p_192newSolver_arg(__pyx_self, ((PyObject*)__pyx_v_argv));

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

static PyObject *__pyx_pf_7monosat_9monosat_p_192newSolver_arg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_argv) {
void *__pyx_v__r;
PyObject *__pyx_v_py_result = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
char *__pyx_t_2;
PyObject *__pyx_t_3 = NULL;
__Pyx_RefNannySetupContext("newSolver_arg", 0);

/* "monosat/monosat_p.pyx":1322
* def newSolver_arg(bytes argv ):
*     """Cython signature: void* newSolver_arg(char * argv)"""
*     assert isinstance(argv, bytes), 'arg argv wrong type'             # <<<<<<<<<<<<<<
*
*     cdef void* _r = _newSolver_arg_monosat((<char *>argv))
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_1 = PyBytes_Check(__pyx_v_argv);
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_argv_wrong_type);
 __PYX_ERR(0, 1322, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1324
*     assert isinstance(argv, bytes), 'arg argv wrong type'
*
*     cdef void* _r = _newSolver_arg_monosat((<char *>argv))             # <<<<<<<<<<<<<<
*     #print "{0:x}".format(<uintptr_t>(_r))
*     if _r is NULL:
*/
if (unlikely(__pyx_v_argv == Py_None)) {
PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
__PYX_ERR(0, 1324, __pyx_L1_error)
}
__pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_argv); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 1324, __pyx_L1_error)
__pyx_v__r = newSolver_arg(((char *)__pyx_t_2));

/* "monosat/monosat_p.pyx":1326
*     cdef void* _r = _newSolver_arg_monosat((<char *>argv))
*     #print "{0:x}".format(<uintptr_t>(_r))
*     if _r is NULL:             # <<<<<<<<<<<<<<
*         raise MemoryError()
*     py_result =   pycapsule.PyCapsule_New(_r, NULL, NULL)
*/
__pyx_t_1 = ((__pyx_v__r == NULL) != 0);
if (unlikely(__pyx_t_1)) {

/* "monosat/monosat_p.pyx":1327
*     #print "{0:x}".format(<uintptr_t>(_r))
*     if _r is NULL:
*         raise MemoryError()             # <<<<<<<<<<<<<<
*     py_result =   pycapsule.PyCapsule_New(_r, NULL, NULL)
*
*/
PyErr_NoMemory(); __PYX_ERR(0, 1327, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1326
*     cdef void* _r = _newSolver_arg_monosat((<char *>argv))
*     #print "{0:x}".format(<uintptr_t>(_r))
*     if _r is NULL:             # <<<<<<<<<<<<<<
*         raise MemoryError()
*     py_result =   pycapsule.PyCapsule_New(_r, NULL, NULL)
*/
}

/* "monosat/monosat_p.pyx":1328
*     if _r is NULL:
*         raise MemoryError()
*     py_result =   pycapsule.PyCapsule_New(_r, NULL, NULL)             # <<<<<<<<<<<<<<
*
*     return py_result
*/
__pyx_t_3 = PyCapsule_New(__pyx_v__r, NULL, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1328, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_v_py_result = __pyx_t_3;
__pyx_t_3 = 0;

/* "monosat/monosat_p.pyx":1330
*     py_result =   pycapsule.PyCapsule_New(_r, NULL, NULL)
*
*     return py_result             # <<<<<<<<<<<<<<
*
*
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_v_py_result);
__pyx_r = __pyx_v_py_result;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1320
*     return py_result
*
* def newSolver_arg(bytes argv ):             # <<<<<<<<<<<<<<
*     """Cython signature: void* newSolver_arg(char * argv)"""
*     assert isinstance(argv, bytes), 'arg argv wrong type'
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("monosat.monosat_p.newSolver_arg", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_py_result);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1333
*
*
* def newVar( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newVar(void* S)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_195newVar(PyObject *__pyx_self, PyObject *__pyx_v_S); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_194newVar[] = "Cython signature: int newVar(void* S)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_195newVar = {"newVar", (PyCFunction)__pyx_pw_7monosat_9monosat_p_195newVar, METH_O, __pyx_doc_7monosat_9monosat_p_194newVar};
static PyObject *__pyx_pw_7monosat_9monosat_p_195newVar(PyObject *__pyx_self, PyObject *__pyx_v_S) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("newVar (wrapper)", 0);
__pyx_r = __pyx_pf_7monosat_9monosat_p_194newVar(__pyx_self, ((PyObject *)__pyx_v_S));

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

static PyObject *__pyx_pf_7monosat_9monosat_p_194newVar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
void *__pyx_t_1;
PyObject *__pyx_t_2 = NULL;
__Pyx_RefNannySetupContext("newVar", 0);

/* "monosat/monosat_p.pyx":1337
*
*
*     cdef int _r = _newVar_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_1 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1337, __pyx_L1_error)
__pyx_v__r = newVar(((void *)__pyx_t_1));

/* "monosat/monosat_p.pyx":1338
*
*     cdef int _r = _newVar_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":1339
*     cdef int _r = _newVar_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def reaches( S ,  G ,  _from ,  to ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1339, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1333
*
*
* def newVar( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newVar(void* S)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("monosat.monosat_p.newVar", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1341
*     return py_result
*
* def reaches( S ,  G ,  _from ,  to ):             # <<<<<<<<<<<<<<
*     """Cython signature: int reaches(void* S, void* G, int _from, int to)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_197reaches(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_196reaches[] = "Cython signature: int reaches(void* S, void* G, int _from, int to)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_197reaches = {"reaches", (PyCFunction)__pyx_pw_7monosat_9monosat_p_197reaches, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_196reaches};
static PyObject *__pyx_pw_7monosat_9monosat_p_197reaches(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_G = 0;
PyObject *__pyx_v__from = 0;
PyObject *__pyx_v_to = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("reaches (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_G,&__pyx_n_s_from,&__pyx_n_s_to,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_S)) != 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_G)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("reaches", 1, 4, 4, 1); __PYX_ERR(0, 1341, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_from)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("reaches", 1, 4, 4, 2); __PYX_ERR(0, 1341, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_to)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("reaches", 1, 4, 4, 3); __PYX_ERR(0, 1341, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reaches") < 0)) __PYX_ERR(0, 1341, __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_S = values[0];
__pyx_v_G = values[1];
__pyx_v__from = values[2];
__pyx_v_to = values[3];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("reaches", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1341, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.reaches", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_196reaches(__pyx_self, __pyx_v_S, __pyx_v_G, __pyx_v__from, __pyx_v_to);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_196reaches(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v__from, PyObject *__pyx_v_to) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("reaches", 0);

/* "monosat/monosat_p.pyx":1345
*
*
*     assert isinstance(_from, (int, long)), 'arg _from wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(to, (int, long)), 'arg to wrong type'
*     cdef int _r = _reaches_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to))
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v__from);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v__from);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg__from_wrong_type);
 __PYX_ERR(0, 1345, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1346
*
*     assert isinstance(_from, (int, long)), 'arg _from wrong type'
*     assert isinstance(to, (int, long)), 'arg to wrong type'             # <<<<<<<<<<<<<<
*     cdef int _r = _reaches_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to))
*     py_result = <int>_r
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_to);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_to);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_to_wrong_type);
 __PYX_ERR(0, 1346, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1347
*     assert isinstance(_from, (int, long)), 'arg _from wrong type'
*     assert isinstance(to, (int, long)), 'arg to wrong type'
*     cdef int _r = _reaches_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1347, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_G, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1347, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v__from); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1347, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_to); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1347, __pyx_L1_error)
__pyx_v__r = reaches(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7));

/* "monosat/monosat_p.pyx":1348
*     assert isinstance(to, (int, long)), 'arg to wrong type'
*     cdef int _r = _reaches_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":1349
*     cdef int _r = _reaches_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def reachesBackward( S ,  G ,  _from ,  to ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1349, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__pyx_r = __pyx_t_8;
__pyx_t_8 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1341
*     return py_result
*
* def reaches( S ,  G ,  _from ,  to ):             # <<<<<<<<<<<<<<
*     """Cython signature: int reaches(void* S, void* G, int _from, int to)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_8);
__Pyx_AddTraceback("monosat.monosat_p.reaches", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1351
*     return py_result
*
* def reachesBackward( S ,  G ,  _from ,  to ):             # <<<<<<<<<<<<<<
*     """Cython signature: int reaches(void* S, void* G, int _from, int to)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_199reachesBackward(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_198reachesBackward[] = "Cython signature: int reaches(void* S, void* G, int _from, int to)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_199reachesBackward = {"reachesBackward", (PyCFunction)__pyx_pw_7monosat_9monosat_p_199reachesBackward, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_198reachesBackward};
static PyObject *__pyx_pw_7monosat_9monosat_p_199reachesBackward(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_G = 0;
PyObject *__pyx_v__from = 0;
PyObject *__pyx_v_to = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("reachesBackward (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_G,&__pyx_n_s_from,&__pyx_n_s_to,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_S)) != 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_G)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("reachesBackward", 1, 4, 4, 1); __PYX_ERR(0, 1351, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_from)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("reachesBackward", 1, 4, 4, 2); __PYX_ERR(0, 1351, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_to)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("reachesBackward", 1, 4, 4, 3); __PYX_ERR(0, 1351, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reachesBackward") < 0)) __PYX_ERR(0, 1351, __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_S = values[0];
__pyx_v_G = values[1];
__pyx_v__from = values[2];
__pyx_v_to = values[3];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("reachesBackward", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1351, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.reachesBackward", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_198reachesBackward(__pyx_self, __pyx_v_S, __pyx_v_G, __pyx_v__from, __pyx_v_to);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_198reachesBackward(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v__from, PyObject *__pyx_v_to) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("reachesBackward", 0);

/* "monosat/monosat_p.pyx":1355
*
*
*     assert isinstance(_from, (int, long)), 'arg _from wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(to, (int, long)), 'arg to wrong type'
*     cdef int _r = _reachesBackward_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to))
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v__from);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v__from);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg__from_wrong_type);
 __PYX_ERR(0, 1355, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1356
*
*     assert isinstance(_from, (int, long)), 'arg _from wrong type'
*     assert isinstance(to, (int, long)), 'arg to wrong type'             # <<<<<<<<<<<<<<
*     cdef int _r = _reachesBackward_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to))
*     py_result = <int>_r
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_to);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_to);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_to_wrong_type);
 __PYX_ERR(0, 1356, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1357
*     assert isinstance(_from, (int, long)), 'arg _from wrong type'
*     assert isinstance(to, (int, long)), 'arg to wrong type'
*     cdef int _r = _reachesBackward_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1357, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_G, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1357, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v__from); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1357, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_to); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1357, __pyx_L1_error)
__pyx_v__r = reachesBackward(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7));

/* "monosat/monosat_p.pyx":1358
*     assert isinstance(to, (int, long)), 'arg to wrong type'
*     cdef int _r = _reachesBackward_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":1359
*     cdef int _r = _reachesBackward_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
*
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1359, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__pyx_r = __pyx_t_8;
__pyx_t_8 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1351
*     return py_result
*
* def reachesBackward( S ,  G ,  _from ,  to ):             # <<<<<<<<<<<<<<
*     """Cython signature: int reaches(void* S, void* G, int _from, int to)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_8);
__Pyx_AddTraceback("monosat.monosat_p.reachesBackward", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1362
*
*
* def onPath( S ,  G , nodeOnPath, _from ,  to ):             # <<<<<<<<<<<<<<
*     """Cython signature: int reaches(void* S, void* G, int nodeOnPath,int _from, int to)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_201onPath(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_200onPath[] = "Cython signature: int reaches(void* S, void* G, int nodeOnPath,int _from, int to)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_201onPath = {"onPath", (PyCFunction)__pyx_pw_7monosat_9monosat_p_201onPath, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_200onPath};
static PyObject *__pyx_pw_7monosat_9monosat_p_201onPath(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_G = 0;
PyObject *__pyx_v_nodeOnPath = 0;
PyObject *__pyx_v__from = 0;
PyObject *__pyx_v_to = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("onPath (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_G,&__pyx_n_s_nodeOnPath,&__pyx_n_s_from,&__pyx_n_s_to,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_S)) != 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_G)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("onPath", 1, 5, 5, 1); __PYX_ERR(0, 1362, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeOnPath)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("onPath", 1, 5, 5, 2); __PYX_ERR(0, 1362, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_from)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("onPath", 1, 5, 5, 3); __PYX_ERR(0, 1362, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_to)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("onPath", 1, 5, 5, 4); __PYX_ERR(0, 1362, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "onPath") < 0)) __PYX_ERR(0, 1362, __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_S = values[0];
__pyx_v_G = values[1];
__pyx_v_nodeOnPath = values[2];
__pyx_v__from = values[3];
__pyx_v_to = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("onPath", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1362, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.onPath", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_200onPath(__pyx_self, __pyx_v_S, __pyx_v_G, __pyx_v_nodeOnPath, __pyx_v__from, __pyx_v_to);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_200onPath(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v_nodeOnPath, PyObject *__pyx_v__from, PyObject *__pyx_v_to) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
int __pyx_t_8;
PyObject *__pyx_t_9 = NULL;
__Pyx_RefNannySetupContext("onPath", 0);

/* "monosat/monosat_p.pyx":1366
*
*
*     assert isinstance(_from, (int, long)), 'arg _from wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(to, (int, long)), 'arg to wrong type'
*     assert isinstance(nodeOnPath, (int, long)), 'arg to wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v__from);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v__from);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg__from_wrong_type);
 __PYX_ERR(0, 1366, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1367
*
*     assert isinstance(_from, (int, long)), 'arg _from wrong type'
*     assert isinstance(to, (int, long)), 'arg to wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(nodeOnPath, (int, long)), 'arg to wrong type'
*     cdef int _r = _onPath_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>nodeOnPath), (<int>_from), (<int>to))
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_to);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_to);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_to_wrong_type);
 __PYX_ERR(0, 1367, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1368
*     assert isinstance(_from, (int, long)), 'arg _from wrong type'
*     assert isinstance(to, (int, long)), 'arg to wrong type'
*     assert isinstance(nodeOnPath, (int, long)), 'arg to wrong type'             # <<<<<<<<<<<<<<
*     cdef int _r = _onPath_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>nodeOnPath), (<int>_from), (<int>to))
*     py_result = <int>_r
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_nodeOnPath);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L7_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_nodeOnPath);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_to_wrong_type);
 __PYX_ERR(0, 1368, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1369
*     assert isinstance(to, (int, long)), 'arg to wrong type'
*     assert isinstance(nodeOnPath, (int, long)), 'arg to wrong type'
*     cdef int _r = _onPath_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>nodeOnPath), (<int>_from), (<int>to))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1369, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_G, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1369, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_nodeOnPath); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1369, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v__from); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1369, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_to); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1369, __pyx_L1_error)
__pyx_v__r = onPath(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7), ((int)__pyx_t_8));

/* "monosat/monosat_p.pyx":1370
*     assert isinstance(nodeOnPath, (int, long)), 'arg to wrong type'
*     cdef int _r = _onPath_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>nodeOnPath), (<int>_from), (<int>to))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":1371
*     cdef int _r = _onPath_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>nodeOnPath), (<int>_from), (<int>to))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def readGNF( S , bytes filename ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1371, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__pyx_r = __pyx_t_9;
__pyx_t_9 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1362
*
*
* def onPath( S ,  G , nodeOnPath, _from ,  to ):             # <<<<<<<<<<<<<<
*     """Cython signature: int reaches(void* S, void* G, int nodeOnPath,int _from, int to)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_9);
__Pyx_AddTraceback("monosat.monosat_p.onPath", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1373
*     return py_result
*
* def readGNF( S , bytes filename ):             # <<<<<<<<<<<<<<
*     """Cython signature: void readGNF(void* S, char * filename)"""
*     assert isinstance(filename, bytes), 'arg filename wrong type'
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_203readGNF(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_202readGNF[] = "Cython signature: void readGNF(void* S, char * filename)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_203readGNF = {"readGNF", (PyCFunction)__pyx_pw_7monosat_9monosat_p_203readGNF, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_202readGNF};
static PyObject *__pyx_pw_7monosat_9monosat_p_203readGNF(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_filename = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("readGNF (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_filename,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_S)) != 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_filename)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("readGNF", 1, 2, 2, 1); __PYX_ERR(0, 1373, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "readGNF") < 0)) __PYX_ERR(0, 1373, __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_S = values[0];
__pyx_v_filename = ((PyObject*)values[1]);
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("readGNF", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1373, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.readGNF", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filename), (&PyBytes_Type), 1, "filename", 1))) __PYX_ERR(0, 1373, __pyx_L1_error)
__pyx_r = __pyx_pf_7monosat_9monosat_p_202readGNF(__pyx_self, __pyx_v_S, __pyx_v_filename);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_202readGNF(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_filename) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
void *__pyx_t_2;
char *__pyx_t_3;
__Pyx_RefNannySetupContext("readGNF", 0);

/* "monosat/monosat_p.pyx":1375
* def readGNF( S , bytes filename ):
*     """Cython signature: void readGNF(void* S, char * filename)"""
*     assert isinstance(filename, bytes), 'arg filename wrong type'             # <<<<<<<<<<<<<<
*     _readGNF_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<char *>filename))
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_1 = PyBytes_Check(__pyx_v_filename);
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_filename_wrong_type);
 __PYX_ERR(0, 1375, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1376
*     """Cython signature: void readGNF(void* S, char * filename)"""
*     assert isinstance(filename, bytes), 'arg filename wrong type'
*     _readGNF_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<char *>filename))             # <<<<<<<<<<<<<<
*
* def loadGNF( S , bytes filename ):
*/
__pyx_t_2 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_2 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1376, __pyx_L1_error)
if (unlikely(__pyx_v_filename == Py_None)) {
PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
__PYX_ERR(0, 1376, __pyx_L1_error)
}
__pyx_t_3 = __Pyx_PyBytes_AsWritableString(__pyx_v_filename); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 1376, __pyx_L1_error)
readGNF(((void *)__pyx_t_2), ((char *)__pyx_t_3));

/* "monosat/monosat_p.pyx":1373
*     return py_result
*
* def readGNF( S , bytes filename ):             # <<<<<<<<<<<<<<
*     """Cython signature: void readGNF(void* S, char * filename)"""
*     assert isinstance(filename, bytes), 'arg filename wrong type'
*/

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

/* "monosat/monosat_p.pyx":1378
*     _readGNF_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<char *>filename))
*
* def loadGNF( S , bytes filename ):             # <<<<<<<<<<<<<<
*     """Cython signature: void loadGNF(void* S, char * filename)"""
*     assert isinstance(filename, bytes), 'arg filename wrong type'
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_205loadGNF(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_204loadGNF[] = "Cython signature: void loadGNF(void* S, char * filename)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_205loadGNF = {"loadGNF", (PyCFunction)__pyx_pw_7monosat_9monosat_p_205loadGNF, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_204loadGNF};
static PyObject *__pyx_pw_7monosat_9monosat_p_205loadGNF(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_filename = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("loadGNF (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_filename,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_S)) != 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_filename)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("loadGNF", 1, 2, 2, 1); __PYX_ERR(0, 1378, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "loadGNF") < 0)) __PYX_ERR(0, 1378, __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_S = values[0];
__pyx_v_filename = ((PyObject*)values[1]);
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("loadGNF", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1378, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.loadGNF", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filename), (&PyBytes_Type), 1, "filename", 1))) __PYX_ERR(0, 1378, __pyx_L1_error)
__pyx_r = __pyx_pf_7monosat_9monosat_p_204loadGNF(__pyx_self, __pyx_v_S, __pyx_v_filename);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_204loadGNF(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_filename) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
void *__pyx_t_2;
char *__pyx_t_3;
__Pyx_RefNannySetupContext("loadGNF", 0);

/* "monosat/monosat_p.pyx":1380
* def loadGNF( S , bytes filename ):
*     """Cython signature: void loadGNF(void* S, char * filename)"""
*     assert isinstance(filename, bytes), 'arg filename wrong type'             # <<<<<<<<<<<<<<
*     _loadGNF_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<char *>filename))
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_1 = PyBytes_Check(__pyx_v_filename);
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_filename_wrong_type);
 __PYX_ERR(0, 1380, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1381
*     """Cython signature: void loadGNF(void* S, char * filename)"""
*     assert isinstance(filename, bytes), 'arg filename wrong type'
*     _loadGNF_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<char *>filename))             # <<<<<<<<<<<<<<
*
* def setConflictLimit( S ,  num_conflicts ):
*/
__pyx_t_2 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_2 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1381, __pyx_L1_error)
if (unlikely(__pyx_v_filename == Py_None)) {
PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
__PYX_ERR(0, 1381, __pyx_L1_error)
}
__pyx_t_3 = __Pyx_PyBytes_AsWritableString(__pyx_v_filename); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 1381, __pyx_L1_error)
loadGNF(((void *)__pyx_t_2), ((char *)__pyx_t_3));

/* "monosat/monosat_p.pyx":1378
*     _readGNF_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<char *>filename))
*
* def loadGNF( S , bytes filename ):             # <<<<<<<<<<<<<<
*     """Cython signature: void loadGNF(void* S, char * filename)"""
*     assert isinstance(filename, bytes), 'arg filename wrong type'
*/

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

/* "monosat/monosat_p.pyx":1383
*     _loadGNF_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<char *>filename))
*
* def setConflictLimit( S ,  num_conflicts ):             # <<<<<<<<<<<<<<
*     """Cython signature: void setConflictLimit(void* S, int num_conflicts)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_207setConflictLimit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_206setConflictLimit[] = "Cython signature: void setConflictLimit(void* S, int num_conflicts)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_207setConflictLimit = {"setConflictLimit", (PyCFunction)__pyx_pw_7monosat_9monosat_p_207setConflictLimit, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_206setConflictLimit};
static PyObject *__pyx_pw_7monosat_9monosat_p_207setConflictLimit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_num_conflicts = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("setConflictLimit (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_num_conflicts,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_S)) != 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_num_conflicts)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("setConflictLimit", 1, 2, 2, 1); __PYX_ERR(0, 1383, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setConflictLimit") < 0)) __PYX_ERR(0, 1383, __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_S = values[0];
__pyx_v_num_conflicts = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("setConflictLimit", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1383, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.setConflictLimit", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_206setConflictLimit(__pyx_self, __pyx_v_S, __pyx_v_num_conflicts);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_206setConflictLimit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_num_conflicts) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
int __pyx_t_5;
__Pyx_RefNannySetupContext("setConflictLimit", 0);

/* "monosat/monosat_p.pyx":1386
*     """Cython signature: void setConflictLimit(void* S, int num_conflicts)"""
*
*     assert isinstance(num_conflicts, (int, long)), 'arg num_conflicts wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_num_conflicts);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_num_conflicts);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_num_conflicts_wrong_type);
 __PYX_ERR(0, 1386, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1389
*
*
*     _setConflictLimit_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>num_conflicts))             # <<<<<<<<<<<<<<
*
* def setDecisionPolarity( S ,  v ,  b ):
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1389, __pyx_L1_error)
__pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_num_conflicts); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1389, __pyx_L1_error)
setConflictLimit(((void *)__pyx_t_4), ((int)__pyx_t_5));

/* "monosat/monosat_p.pyx":1383
*     _loadGNF_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<char *>filename))
*
* def setConflictLimit( S ,  num_conflicts ):             # <<<<<<<<<<<<<<
*     """Cython signature: void setConflictLimit(void* S, int num_conflicts)"""
*
*/

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

/* "monosat/monosat_p.pyx":1391
*     _setConflictLimit_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>num_conflicts))
*
* def setDecisionPolarity( S ,  v ,  b ):             # <<<<<<<<<<<<<<
*     """Cython signature: void setDecisionPolarity(void* S, int v, bint b)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_209setDecisionPolarity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_208setDecisionPolarity[] = "Cython signature: void setDecisionPolarity(void* S, int v, bint b)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_209setDecisionPolarity = {"setDecisionPolarity", (PyCFunction)__pyx_pw_7monosat_9monosat_p_209setDecisionPolarity, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_208setDecisionPolarity};
static PyObject *__pyx_pw_7monosat_9monosat_p_209setDecisionPolarity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_v = 0;
PyObject *__pyx_v_b = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("setDecisionPolarity (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_v,&__pyx_n_s_b,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_S)) != 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_v)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("setDecisionPolarity", 1, 3, 3, 1); __PYX_ERR(0, 1391, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("setDecisionPolarity", 1, 3, 3, 2); __PYX_ERR(0, 1391, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setDecisionPolarity") < 0)) __PYX_ERR(0, 1391, __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_S = values[0];
__pyx_v_v = values[1];
__pyx_v_b = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("setDecisionPolarity", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1391, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.setDecisionPolarity", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_208setDecisionPolarity(__pyx_self, __pyx_v_S, __pyx_v_v, __pyx_v_b);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_208setDecisionPolarity(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_v, PyObject *__pyx_v_b) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
int __pyx_t_5;
__Pyx_RefNannySetupContext("setDecisionPolarity", 0);

/* "monosat/monosat_p.pyx":1394
*     """Cython signature: void setDecisionPolarity(void* S, int v, bint b)"""
*
*     assert isinstance(v, (int, long)), 'arg v wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(b, (int, long)), 'arg b wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_v);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_v);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_v_wrong_type);
 __PYX_ERR(0, 1394, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1395
*
*     assert isinstance(v, (int, long)), 'arg v wrong type'
*     assert isinstance(b, (int, long)), 'arg b wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_b);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_b);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_b_wrong_type);
 __PYX_ERR(0, 1395, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1399
*
*
*     _setDecisionPolarity_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>v), (<bint>b))             # <<<<<<<<<<<<<<
*
* def setDecisionPriority( S ,  var ,  priority ):
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1399, __pyx_L1_error)
__pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_v); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1399, __pyx_L1_error)
__pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_b); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1399, __pyx_L1_error)
setDecisionPolarity(((void *)__pyx_t_4), ((int)__pyx_t_5), __pyx_t_1);

/* "monosat/monosat_p.pyx":1391
*     _setConflictLimit_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>num_conflicts))
*
* def setDecisionPolarity( S ,  v ,  b ):             # <<<<<<<<<<<<<<
*     """Cython signature: void setDecisionPolarity(void* S, int v, bint b)"""
*
*/

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

/* "monosat/monosat_p.pyx":1401
*     _setDecisionPolarity_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>v), (<bint>b))
*
* def setDecisionPriority( S ,  var ,  priority ):             # <<<<<<<<<<<<<<
*     """Cython signature: void setDecisionPriority(void* S, int var, int priority)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_211setDecisionPriority(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_210setDecisionPriority[] = "Cython signature: void setDecisionPriority(void* S, int var, int priority)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_211setDecisionPriority = {"setDecisionPriority", (PyCFunction)__pyx_pw_7monosat_9monosat_p_211setDecisionPriority, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_210setDecisionPriority};
static PyObject *__pyx_pw_7monosat_9monosat_p_211setDecisionPriority(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_var = 0;
PyObject *__pyx_v_priority = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("setDecisionPriority (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_var,&__pyx_n_s_priority,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_S)) != 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_var)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("setDecisionPriority", 1, 3, 3, 1); __PYX_ERR(0, 1401, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_priority)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("setDecisionPriority", 1, 3, 3, 2); __PYX_ERR(0, 1401, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setDecisionPriority") < 0)) __PYX_ERR(0, 1401, __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_S = values[0];
__pyx_v_var = values[1];
__pyx_v_priority = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("setDecisionPriority", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1401, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.setDecisionPriority", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_210setDecisionPriority(__pyx_self, __pyx_v_S, __pyx_v_var, __pyx_v_priority);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_210setDecisionPriority(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_var, PyObject *__pyx_v_priority) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
int __pyx_t_5;
int __pyx_t_6;
__Pyx_RefNannySetupContext("setDecisionPriority", 0);

/* "monosat/monosat_p.pyx":1404
*     """Cython signature: void setDecisionPriority(void* S, int var, int priority)"""
*
*     assert isinstance(var, (int, long)), 'arg var wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(priority, (int, long)), 'arg priority wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_var);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_var);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_var_wrong_type);
 __PYX_ERR(0, 1404, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1405
*
*     assert isinstance(var, (int, long)), 'arg var wrong type'
*     assert isinstance(priority, (int, long)), 'arg priority wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_priority);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_priority);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_priority_wrong_type);
 __PYX_ERR(0, 1405, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1409
*
*
*     _setDecisionPriority_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>var), (<int>priority))             # <<<<<<<<<<<<<<
*
* def setDecisionVar( S ,  var ,  decidable ):
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1409, __pyx_L1_error)
__pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_var); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1409, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_priority); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1409, __pyx_L1_error)
setDecisionPriority(((void *)__pyx_t_4), ((int)__pyx_t_5), ((int)__pyx_t_6));

/* "monosat/monosat_p.pyx":1401
*     _setDecisionPolarity_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>v), (<bint>b))
*
* def setDecisionPriority( S ,  var ,  priority ):             # <<<<<<<<<<<<<<
*     """Cython signature: void setDecisionPriority(void* S, int var, int priority)"""
*
*/

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

/* "monosat/monosat_p.pyx":1411
*     _setDecisionPriority_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>var), (<int>priority))
*
* def setDecisionVar( S ,  var ,  decidable ):             # <<<<<<<<<<<<<<
*     """Cython signature: void setDecisionVar(void* S, int var, bint decidable)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_213setDecisionVar(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_212setDecisionVar[] = "Cython signature: void setDecisionVar(void* S, int var, bint decidable)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_213setDecisionVar = {"setDecisionVar", (PyCFunction)__pyx_pw_7monosat_9monosat_p_213setDecisionVar, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_212setDecisionVar};
static PyObject *__pyx_pw_7monosat_9monosat_p_213setDecisionVar(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_var = 0;
PyObject *__pyx_v_decidable = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("setDecisionVar (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_var,&__pyx_n_s_decidable,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_S)) != 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_var)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("setDecisionVar", 1, 3, 3, 1); __PYX_ERR(0, 1411, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_decidable)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("setDecisionVar", 1, 3, 3, 2); __PYX_ERR(0, 1411, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setDecisionVar") < 0)) __PYX_ERR(0, 1411, __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_S = values[0];
__pyx_v_var = values[1];
__pyx_v_decidable = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("setDecisionVar", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1411, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.setDecisionVar", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_212setDecisionVar(__pyx_self, __pyx_v_S, __pyx_v_var, __pyx_v_decidable);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_212setDecisionVar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_var, PyObject *__pyx_v_decidable) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
int __pyx_t_5;
__Pyx_RefNannySetupContext("setDecisionVar", 0);

/* "monosat/monosat_p.pyx":1414
*     """Cython signature: void setDecisionVar(void* S, int var, bint decidable)"""
*
*     assert isinstance(var, (int, long)), 'arg var wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(decidable, (int, long)), 'arg decidable wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_var);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_var);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_var_wrong_type);
 __PYX_ERR(0, 1414, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1415
*
*     assert isinstance(var, (int, long)), 'arg var wrong type'
*     assert isinstance(decidable, (int, long)), 'arg decidable wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_decidable);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_decidable);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_decidable_wrong_type);
 __PYX_ERR(0, 1415, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1419
*
*
*     _setDecisionVar_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>var), (<bint>decidable))             # <<<<<<<<<<<<<<
*
* def setOutputFile( S , bytes output ):
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1419, __pyx_L1_error)
__pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_var); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1419, __pyx_L1_error)
__pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_decidable); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1419, __pyx_L1_error)
setDecisionVar(((void *)__pyx_t_4), ((int)__pyx_t_5), __pyx_t_1);

/* "monosat/monosat_p.pyx":1411
*     _setDecisionPriority_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>var), (<int>priority))
*
* def setDecisionVar( S ,  var ,  decidable ):             # <<<<<<<<<<<<<<
*     """Cython signature: void setDecisionVar(void* S, int var, bint decidable)"""
*
*/

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

/* "monosat/monosat_p.pyx":1421
*     _setDecisionVar_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>var), (<bint>decidable))
*
* def setOutputFile( S , bytes output ):             # <<<<<<<<<<<<<<
*     """Cython signature: void setOutputFile(void* S, char * output)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_215setOutputFile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_214setOutputFile[] = "Cython signature: void setOutputFile(void* S, char * output)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_215setOutputFile = {"setOutputFile", (PyCFunction)__pyx_pw_7monosat_9monosat_p_215setOutputFile, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_214setOutputFile};
static PyObject *__pyx_pw_7monosat_9monosat_p_215setOutputFile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_output = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("setOutputFile (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_output,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_S)) != 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_output)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("setOutputFile", 1, 2, 2, 1); __PYX_ERR(0, 1421, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setOutputFile") < 0)) __PYX_ERR(0, 1421, __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_S = values[0];
__pyx_v_output = ((PyObject*)values[1]);
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("setOutputFile", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1421, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.setOutputFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_output), (&PyBytes_Type), 1, "output", 1))) __PYX_ERR(0, 1421, __pyx_L1_error)
__pyx_r = __pyx_pf_7monosat_9monosat_p_214setOutputFile(__pyx_self, __pyx_v_S, __pyx_v_output);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_214setOutputFile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_output) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
void *__pyx_t_2;
char *__pyx_t_3;
__Pyx_RefNannySetupContext("setOutputFile", 0);

/* "monosat/monosat_p.pyx":1424
*     """Cython signature: void setOutputFile(void* S, char * output)"""
*
*     assert isinstance(output, bytes), 'arg output wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_1 = PyBytes_Check(__pyx_v_output);
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_output_wrong_type);
 __PYX_ERR(0, 1424, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1427
*
*
*     _setOutputFile_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<char *>output))             # <<<<<<<<<<<<<<
*
* def setPropagationLimit( S ,  num_propagations ):
*/
__pyx_t_2 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_2 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1427, __pyx_L1_error)
if (unlikely(__pyx_v_output == Py_None)) {
PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
__PYX_ERR(0, 1427, __pyx_L1_error)
}
__pyx_t_3 = __Pyx_PyBytes_AsWritableString(__pyx_v_output); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 1427, __pyx_L1_error)
setOutputFile(((void *)__pyx_t_2), ((char *)__pyx_t_3));

/* "monosat/monosat_p.pyx":1421
*     _setDecisionVar_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>var), (<bint>decidable))
*
* def setOutputFile( S , bytes output ):             # <<<<<<<<<<<<<<
*     """Cython signature: void setOutputFile(void* S, char * output)"""
*
*/

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

/* "monosat/monosat_p.pyx":1429
*     _setOutputFile_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<char *>output))
*
* def setPropagationLimit( S ,  num_propagations ):             # <<<<<<<<<<<<<<
*     """Cython signature: void setPropagationLimit(void* S, int num_propagations)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_217setPropagationLimit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_216setPropagationLimit[] = "Cython signature: void setPropagationLimit(void* S, int num_propagations)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_217setPropagationLimit = {"setPropagationLimit", (PyCFunction)__pyx_pw_7monosat_9monosat_p_217setPropagationLimit, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_216setPropagationLimit};
static PyObject *__pyx_pw_7monosat_9monosat_p_217setPropagationLimit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_num_propagations = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("setPropagationLimit (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_num_propagations,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_S)) != 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_num_propagations)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("setPropagationLimit", 1, 2, 2, 1); __PYX_ERR(0, 1429, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setPropagationLimit") < 0)) __PYX_ERR(0, 1429, __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_S = values[0];
__pyx_v_num_propagations = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("setPropagationLimit", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1429, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.setPropagationLimit", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_216setPropagationLimit(__pyx_self, __pyx_v_S, __pyx_v_num_propagations);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_216setPropagationLimit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_num_propagations) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
int __pyx_t_5;
__Pyx_RefNannySetupContext("setPropagationLimit", 0);

/* "monosat/monosat_p.pyx":1432
*     """Cython signature: void setPropagationLimit(void* S, int num_propagations)"""
*
*     assert isinstance(num_propagations, (int, long)), 'arg num_propagations wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_num_propagations);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_num_propagations);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_num_propagations_wrong_type);
 __PYX_ERR(0, 1432, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1435
*
*
*     _setPropagationLimit_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>num_propagations))             # <<<<<<<<<<<<<<
*
* def setTimeLimit( S ,  seconds ):
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1435, __pyx_L1_error)
__pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_num_propagations); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1435, __pyx_L1_error)
setPropagationLimit(((void *)__pyx_t_4), ((int)__pyx_t_5));

/* "monosat/monosat_p.pyx":1429
*     _setOutputFile_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<char *>output))
*
* def setPropagationLimit( S ,  num_propagations ):             # <<<<<<<<<<<<<<
*     """Cython signature: void setPropagationLimit(void* S, int num_propagations)"""
*
*/

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

/* "monosat/monosat_p.pyx":1437
*     _setPropagationLimit_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>num_propagations))
*
* def setTimeLimit( S ,  seconds ):             # <<<<<<<<<<<<<<
*     """Cython signature: void setTimeLimit(void* S, int seconds)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_219setTimeLimit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_218setTimeLimit[] = "Cython signature: void setTimeLimit(void* S, int seconds)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_219setTimeLimit = {"setTimeLimit", (PyCFunction)__pyx_pw_7monosat_9monosat_p_219setTimeLimit, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_218setTimeLimit};
static PyObject *__pyx_pw_7monosat_9monosat_p_219setTimeLimit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_seconds = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("setTimeLimit (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_seconds,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_S)) != 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_seconds)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("setTimeLimit", 1, 2, 2, 1); __PYX_ERR(0, 1437, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setTimeLimit") < 0)) __PYX_ERR(0, 1437, __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_S = values[0];
__pyx_v_seconds = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("setTimeLimit", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1437, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.setTimeLimit", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_218setTimeLimit(__pyx_self, __pyx_v_S, __pyx_v_seconds);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_218setTimeLimit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_seconds) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
int __pyx_t_5;
__Pyx_RefNannySetupContext("setTimeLimit", 0);

/* "monosat/monosat_p.pyx":1440
*     """Cython signature: void setTimeLimit(void* S, int seconds)"""
*
*     assert isinstance(seconds, (int, long)), 'arg seconds wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_seconds);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_seconds);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_seconds_wrong_type);
 __PYX_ERR(0, 1440, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1443
*
*
*     _setTimeLimit_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>seconds))             # <<<<<<<<<<<<<<
*
* def shortestPathUnweighted_leq_const( S ,  G ,  _from ,  to ,  steps ):
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1443, __pyx_L1_error)
__pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_seconds); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1443, __pyx_L1_error)
setTimeLimit(((void *)__pyx_t_4), ((int)__pyx_t_5));

/* "monosat/monosat_p.pyx":1437
*     _setPropagationLimit_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>num_propagations))
*
* def setTimeLimit( S ,  seconds ):             # <<<<<<<<<<<<<<
*     """Cython signature: void setTimeLimit(void* S, int seconds)"""
*
*/

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

/* "monosat/monosat_p.pyx":1445
*     _setTimeLimit_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>seconds))
*
* def shortestPathUnweighted_leq_const( S ,  G ,  _from ,  to ,  steps ):             # <<<<<<<<<<<<<<
*     """Cython signature: int shortestPathUnweighted_leq_const(void* S, void* G, int _from, int to, int steps)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_221shortestPathUnweighted_leq_const(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_220shortestPathUnweighted_leq_const[] = "Cython signature: int shortestPathUnweighted_leq_const(void* S, void* G, int _from, int to, int steps)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_221shortestPathUnweighted_leq_const = {"shortestPathUnweighted_leq_const", (PyCFunction)__pyx_pw_7monosat_9monosat_p_221shortestPathUnweighted_leq_const, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_220shortestPathUnweighted_leq_const};
static PyObject *__pyx_pw_7monosat_9monosat_p_221shortestPathUnweighted_leq_const(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_G = 0;
PyObject *__pyx_v__from = 0;
PyObject *__pyx_v_to = 0;
PyObject *__pyx_v_steps = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("shortestPathUnweighted_leq_const (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_G,&__pyx_n_s_from,&__pyx_n_s_to,&__pyx_n_s_steps,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_S)) != 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_G)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("shortestPathUnweighted_leq_const", 1, 5, 5, 1); __PYX_ERR(0, 1445, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_from)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("shortestPathUnweighted_leq_const", 1, 5, 5, 2); __PYX_ERR(0, 1445, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_to)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("shortestPathUnweighted_leq_const", 1, 5, 5, 3); __PYX_ERR(0, 1445, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_steps)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("shortestPathUnweighted_leq_const", 1, 5, 5, 4); __PYX_ERR(0, 1445, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "shortestPathUnweighted_leq_const") < 0)) __PYX_ERR(0, 1445, __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_S = values[0];
__pyx_v_G = values[1];
__pyx_v__from = values[2];
__pyx_v_to = values[3];
__pyx_v_steps = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("shortestPathUnweighted_leq_const", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1445, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.shortestPathUnweighted_leq_const", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_220shortestPathUnweighted_leq_const(__pyx_self, __pyx_v_S, __pyx_v_G, __pyx_v__from, __pyx_v_to, __pyx_v_steps);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_220shortestPathUnweighted_leq_const(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v__from, PyObject *__pyx_v_to, PyObject *__pyx_v_steps) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
int __pyx_t_8;
PyObject *__pyx_t_9 = NULL;
__Pyx_RefNannySetupContext("shortestPathUnweighted_leq_const", 0);

/* "monosat/monosat_p.pyx":1449
*
*
*     assert isinstance(_from, (int, long)), 'arg _from wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(to, (int, long)), 'arg to wrong type'
*     assert isinstance(steps, (int, long)), 'arg steps wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v__from);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v__from);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg__from_wrong_type);
 __PYX_ERR(0, 1449, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1450
*
*     assert isinstance(_from, (int, long)), 'arg _from wrong type'
*     assert isinstance(to, (int, long)), 'arg to wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(steps, (int, long)), 'arg steps wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_to);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_to);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_to_wrong_type);
 __PYX_ERR(0, 1450, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1451
*     assert isinstance(_from, (int, long)), 'arg _from wrong type'
*     assert isinstance(to, (int, long)), 'arg to wrong type'
*     assert isinstance(steps, (int, long)), 'arg steps wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_steps);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L7_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_steps);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_steps_wrong_type);
 __PYX_ERR(0, 1451, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1457
*
*
*     cdef int _r = _shortestPathUnweighted_leq_const_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to), (<int>steps))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1457, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_G, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1457, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v__from); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1457, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_to); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1457, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_steps); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1457, __pyx_L1_error)
__pyx_v__r = shortestPathUnweighted_leq_const(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7), ((int)__pyx_t_8));

/* "monosat/monosat_p.pyx":1458
*
*     cdef int _r = _shortestPathUnweighted_leq_const_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to), (<int>steps))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":1459
*     cdef int _r = _shortestPathUnweighted_leq_const_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to), (<int>steps))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def shortestPathUnweighted_lt_const( S ,  G ,  _from ,  to ,  steps ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1459, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__pyx_r = __pyx_t_9;
__pyx_t_9 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1445
*     _setTimeLimit_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>seconds))
*
* def shortestPathUnweighted_leq_const( S ,  G ,  _from ,  to ,  steps ):             # <<<<<<<<<<<<<<
*     """Cython signature: int shortestPathUnweighted_leq_const(void* S, void* G, int _from, int to, int steps)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_9);
__Pyx_AddTraceback("monosat.monosat_p.shortestPathUnweighted_leq_const", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1461
*     return py_result
*
* def shortestPathUnweighted_lt_const( S ,  G ,  _from ,  to ,  steps ):             # <<<<<<<<<<<<<<
*     """Cython signature: int shortestPathUnweighted_lt_const(void* S, void* G, int _from, int to, int steps)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_223shortestPathUnweighted_lt_const(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_222shortestPathUnweighted_lt_const[] = "Cython signature: int shortestPathUnweighted_lt_const(void* S, void* G, int _from, int to, int steps)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_223shortestPathUnweighted_lt_const = {"shortestPathUnweighted_lt_const", (PyCFunction)__pyx_pw_7monosat_9monosat_p_223shortestPathUnweighted_lt_const, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_222shortestPathUnweighted_lt_const};
static PyObject *__pyx_pw_7monosat_9monosat_p_223shortestPathUnweighted_lt_const(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_G = 0;
PyObject *__pyx_v__from = 0;
PyObject *__pyx_v_to = 0;
PyObject *__pyx_v_steps = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("shortestPathUnweighted_lt_const (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_G,&__pyx_n_s_from,&__pyx_n_s_to,&__pyx_n_s_steps,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_S)) != 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_G)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("shortestPathUnweighted_lt_const", 1, 5, 5, 1); __PYX_ERR(0, 1461, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_from)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("shortestPathUnweighted_lt_const", 1, 5, 5, 2); __PYX_ERR(0, 1461, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_to)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("shortestPathUnweighted_lt_const", 1, 5, 5, 3); __PYX_ERR(0, 1461, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_steps)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("shortestPathUnweighted_lt_const", 1, 5, 5, 4); __PYX_ERR(0, 1461, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "shortestPathUnweighted_lt_const") < 0)) __PYX_ERR(0, 1461, __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_S = values[0];
__pyx_v_G = values[1];
__pyx_v__from = values[2];
__pyx_v_to = values[3];
__pyx_v_steps = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("shortestPathUnweighted_lt_const", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1461, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.shortestPathUnweighted_lt_const", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_222shortestPathUnweighted_lt_const(__pyx_self, __pyx_v_S, __pyx_v_G, __pyx_v__from, __pyx_v_to, __pyx_v_steps);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_222shortestPathUnweighted_lt_const(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v__from, PyObject *__pyx_v_to, PyObject *__pyx_v_steps) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
int __pyx_t_8;
PyObject *__pyx_t_9 = NULL;
__Pyx_RefNannySetupContext("shortestPathUnweighted_lt_const", 0);

/* "monosat/monosat_p.pyx":1465
*
*
*     assert isinstance(_from, (int, long)), 'arg _from wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(to, (int, long)), 'arg to wrong type'
*     assert isinstance(steps, (int, long)), 'arg steps wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v__from);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v__from);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg__from_wrong_type);
 __PYX_ERR(0, 1465, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1466
*
*     assert isinstance(_from, (int, long)), 'arg _from wrong type'
*     assert isinstance(to, (int, long)), 'arg to wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(steps, (int, long)), 'arg steps wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_to);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_to);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_to_wrong_type);
 __PYX_ERR(0, 1466, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1467
*     assert isinstance(_from, (int, long)), 'arg _from wrong type'
*     assert isinstance(to, (int, long)), 'arg to wrong type'
*     assert isinstance(steps, (int, long)), 'arg steps wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_steps);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L7_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_steps);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_steps_wrong_type);
 __PYX_ERR(0, 1467, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1473
*
*
*     cdef int _r = _shortestPathUnweighted_lt_const_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to), (<int>steps))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1473, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_G, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1473, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v__from); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1473, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_to); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1473, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_steps); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1473, __pyx_L1_error)
__pyx_v__r = shortestPathUnweighted_lt_const(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7), ((int)__pyx_t_8));

/* "monosat/monosat_p.pyx":1474
*
*     cdef int _r = _shortestPathUnweighted_lt_const_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to), (<int>steps))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":1475
*     cdef int _r = _shortestPathUnweighted_lt_const_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to), (<int>steps))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def shortestPath_leq_bv( S ,  G ,  _from ,  to ,  bvID ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1475, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__pyx_r = __pyx_t_9;
__pyx_t_9 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1461
*     return py_result
*
* def shortestPathUnweighted_lt_const( S ,  G ,  _from ,  to ,  steps ):             # <<<<<<<<<<<<<<
*     """Cython signature: int shortestPathUnweighted_lt_const(void* S, void* G, int _from, int to, int steps)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_9);
__Pyx_AddTraceback("monosat.monosat_p.shortestPathUnweighted_lt_const", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1477
*     return py_result
*
* def shortestPath_leq_bv( S ,  G ,  _from ,  to ,  bvID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int shortestPath_leq_bv(void* S, void* G, int _from, int to, int bvID)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_225shortestPath_leq_bv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_224shortestPath_leq_bv[] = "Cython signature: int shortestPath_leq_bv(void* S, void* G, int _from, int to, int bvID)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_225shortestPath_leq_bv = {"shortestPath_leq_bv", (PyCFunction)__pyx_pw_7monosat_9monosat_p_225shortestPath_leq_bv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_224shortestPath_leq_bv};
static PyObject *__pyx_pw_7monosat_9monosat_p_225shortestPath_leq_bv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_G = 0;
PyObject *__pyx_v__from = 0;
PyObject *__pyx_v_to = 0;
PyObject *__pyx_v_bvID = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("shortestPath_leq_bv (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_G,&__pyx_n_s_from,&__pyx_n_s_to,&__pyx_n_s_bvID,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_S)) != 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_G)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("shortestPath_leq_bv", 1, 5, 5, 1); __PYX_ERR(0, 1477, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_from)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("shortestPath_leq_bv", 1, 5, 5, 2); __PYX_ERR(0, 1477, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_to)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("shortestPath_leq_bv", 1, 5, 5, 3); __PYX_ERR(0, 1477, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("shortestPath_leq_bv", 1, 5, 5, 4); __PYX_ERR(0, 1477, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "shortestPath_leq_bv") < 0)) __PYX_ERR(0, 1477, __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_S = values[0];
__pyx_v_G = values[1];
__pyx_v__from = values[2];
__pyx_v_to = values[3];
__pyx_v_bvID = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("shortestPath_leq_bv", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1477, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.shortestPath_leq_bv", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_224shortestPath_leq_bv(__pyx_self, __pyx_v_S, __pyx_v_G, __pyx_v__from, __pyx_v_to, __pyx_v_bvID);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_224shortestPath_leq_bv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v__from, PyObject *__pyx_v_to, PyObject *__pyx_v_bvID) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
int __pyx_t_8;
PyObject *__pyx_t_9 = NULL;
__Pyx_RefNannySetupContext("shortestPath_leq_bv", 0);

/* "monosat/monosat_p.pyx":1481
*
*
*     assert isinstance(_from, (int, long)), 'arg _from wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(to, (int, long)), 'arg to wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v__from);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v__from);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg__from_wrong_type);
 __PYX_ERR(0, 1481, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1482
*
*     assert isinstance(_from, (int, long)), 'arg _from wrong type'
*     assert isinstance(to, (int, long)), 'arg to wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_to);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_to);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_to_wrong_type);
 __PYX_ERR(0, 1482, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1489
*
*
*     cdef int _r = _shortestPath_leq_bv_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to), (<int>bvID))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1489, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_G, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1489, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v__from); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1489, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_to); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1489, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_bvID); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1489, __pyx_L1_error)
__pyx_v__r = shortestPath_leq_bv(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7), ((int)__pyx_t_8));

/* "monosat/monosat_p.pyx":1490
*
*     cdef int _r = _shortestPath_leq_bv_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to), (<int>bvID))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":1491
*     cdef int _r = _shortestPath_leq_bv_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to), (<int>bvID))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def shortestPath_leq_const( S ,  G ,  _from ,  to ,  dist ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1491, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__pyx_r = __pyx_t_9;
__pyx_t_9 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1477
*     return py_result
*
* def shortestPath_leq_bv( S ,  G ,  _from ,  to ,  bvID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int shortestPath_leq_bv(void* S, void* G, int _from, int to, int bvID)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_9);
__Pyx_AddTraceback("monosat.monosat_p.shortestPath_leq_bv", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1493
*     return py_result
*
* def shortestPath_leq_const( S ,  G ,  _from ,  to ,  dist ):             # <<<<<<<<<<<<<<
*     """Cython signature: int shortestPath_leq_const(void* S, void* G, int _from, int to, int64_t dist)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_227shortestPath_leq_const(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_226shortestPath_leq_const[] = "Cython signature: int shortestPath_leq_const(void* S, void* G, int _from, int to, int64_t dist)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_227shortestPath_leq_const = {"shortestPath_leq_const", (PyCFunction)__pyx_pw_7monosat_9monosat_p_227shortestPath_leq_const, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_226shortestPath_leq_const};
static PyObject *__pyx_pw_7monosat_9monosat_p_227shortestPath_leq_const(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_G = 0;
PyObject *__pyx_v__from = 0;
PyObject *__pyx_v_to = 0;
PyObject *__pyx_v_dist = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("shortestPath_leq_const (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_G,&__pyx_n_s_from,&__pyx_n_s_to,&__pyx_n_s_dist,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_S)) != 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_G)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("shortestPath_leq_const", 1, 5, 5, 1); __PYX_ERR(0, 1493, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_from)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("shortestPath_leq_const", 1, 5, 5, 2); __PYX_ERR(0, 1493, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_to)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("shortestPath_leq_const", 1, 5, 5, 3); __PYX_ERR(0, 1493, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dist)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("shortestPath_leq_const", 1, 5, 5, 4); __PYX_ERR(0, 1493, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "shortestPath_leq_const") < 0)) __PYX_ERR(0, 1493, __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_S = values[0];
__pyx_v_G = values[1];
__pyx_v__from = values[2];
__pyx_v_to = values[3];
__pyx_v_dist = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("shortestPath_leq_const", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1493, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.shortestPath_leq_const", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_226shortestPath_leq_const(__pyx_self, __pyx_v_S, __pyx_v_G, __pyx_v__from, __pyx_v_to, __pyx_v_dist);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_226shortestPath_leq_const(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v__from, PyObject *__pyx_v_to, PyObject *__pyx_v_dist) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
int64_t __pyx_t_8;
PyObject *__pyx_t_9 = NULL;
__Pyx_RefNannySetupContext("shortestPath_leq_const", 0);

/* "monosat/monosat_p.pyx":1497
*
*
*     assert isinstance(_from, (int, long)), 'arg _from wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(to, (int, long)), 'arg to wrong type'
*     assert isinstance(dist, (int, long)), 'arg dist wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v__from);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v__from);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg__from_wrong_type);
 __PYX_ERR(0, 1497, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1498
*
*     assert isinstance(_from, (int, long)), 'arg _from wrong type'
*     assert isinstance(to, (int, long)), 'arg to wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(dist, (int, long)), 'arg dist wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_to);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_to);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_to_wrong_type);
 __PYX_ERR(0, 1498, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1499
*     assert isinstance(_from, (int, long)), 'arg _from wrong type'
*     assert isinstance(to, (int, long)), 'arg to wrong type'
*     assert isinstance(dist, (int, long)), 'arg dist wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_dist);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L7_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_dist);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_dist_wrong_type);
 __PYX_ERR(0, 1499, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1505
*
*
*     cdef int _r = _shortestPath_leq_const_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to), (<int64_t>dist))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1505, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_G, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1505, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v__from); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1505, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_to); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1505, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int64_t(__pyx_v_dist); if (unlikely((__pyx_t_8 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1505, __pyx_L1_error)
__pyx_v__r = shortestPath_leq_const(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7), ((int64_t)__pyx_t_8));

/* "monosat/monosat_p.pyx":1506
*
*     cdef int _r = _shortestPath_leq_const_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to), (<int64_t>dist))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":1507
*     cdef int _r = _shortestPath_leq_const_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to), (<int64_t>dist))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def shortestPath_lt_bv( S ,  G ,  _from ,  to ,  bvID ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1507, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__pyx_r = __pyx_t_9;
__pyx_t_9 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1493
*     return py_result
*
* def shortestPath_leq_const( S ,  G ,  _from ,  to ,  dist ):             # <<<<<<<<<<<<<<
*     """Cython signature: int shortestPath_leq_const(void* S, void* G, int _from, int to, int64_t dist)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_9);
__Pyx_AddTraceback("monosat.monosat_p.shortestPath_leq_const", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1509
*     return py_result
*
* def shortestPath_lt_bv( S ,  G ,  _from ,  to ,  bvID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int shortestPath_lt_bv(void* S, void* G, int _from, int to, int bvID)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_229shortestPath_lt_bv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_228shortestPath_lt_bv[] = "Cython signature: int shortestPath_lt_bv(void* S, void* G, int _from, int to, int bvID)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_229shortestPath_lt_bv = {"shortestPath_lt_bv", (PyCFunction)__pyx_pw_7monosat_9monosat_p_229shortestPath_lt_bv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_228shortestPath_lt_bv};
static PyObject *__pyx_pw_7monosat_9monosat_p_229shortestPath_lt_bv(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_G = 0;
PyObject *__pyx_v__from = 0;
PyObject *__pyx_v_to = 0;
PyObject *__pyx_v_bvID = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("shortestPath_lt_bv (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_G,&__pyx_n_s_from,&__pyx_n_s_to,&__pyx_n_s_bvID,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_S)) != 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_G)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("shortestPath_lt_bv", 1, 5, 5, 1); __PYX_ERR(0, 1509, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_from)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("shortestPath_lt_bv", 1, 5, 5, 2); __PYX_ERR(0, 1509, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_to)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("shortestPath_lt_bv", 1, 5, 5, 3); __PYX_ERR(0, 1509, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bvID)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("shortestPath_lt_bv", 1, 5, 5, 4); __PYX_ERR(0, 1509, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "shortestPath_lt_bv") < 0)) __PYX_ERR(0, 1509, __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_S = values[0];
__pyx_v_G = values[1];
__pyx_v__from = values[2];
__pyx_v_to = values[3];
__pyx_v_bvID = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("shortestPath_lt_bv", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1509, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.shortestPath_lt_bv", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_228shortestPath_lt_bv(__pyx_self, __pyx_v_S, __pyx_v_G, __pyx_v__from, __pyx_v_to, __pyx_v_bvID);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_228shortestPath_lt_bv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v__from, PyObject *__pyx_v_to, PyObject *__pyx_v_bvID) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
int __pyx_t_8;
PyObject *__pyx_t_9 = NULL;
__Pyx_RefNannySetupContext("shortestPath_lt_bv", 0);

/* "monosat/monosat_p.pyx":1513
*
*
*     assert isinstance(_from, (int, long)), 'arg _from wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(to, (int, long)), 'arg to wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v__from);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v__from);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg__from_wrong_type);
 __PYX_ERR(0, 1513, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1514
*
*     assert isinstance(_from, (int, long)), 'arg _from wrong type'
*     assert isinstance(to, (int, long)), 'arg to wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_to);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_to);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_to_wrong_type);
 __PYX_ERR(0, 1514, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1521
*
*
*     cdef int _r = _shortestPath_lt_bv_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to), (<int>bvID))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1521, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_G, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1521, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v__from); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1521, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_to); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1521, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_bvID); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1521, __pyx_L1_error)
__pyx_v__r = shortestPath_lt_bv(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7), ((int)__pyx_t_8));

/* "monosat/monosat_p.pyx":1522
*
*     cdef int _r = _shortestPath_lt_bv_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to), (<int>bvID))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":1523
*     cdef int _r = _shortestPath_lt_bv_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to), (<int>bvID))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def shortestPath_lt_const( S ,  G ,  _from ,  to ,  dist ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1523, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__pyx_r = __pyx_t_9;
__pyx_t_9 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1509
*     return py_result
*
* def shortestPath_lt_bv( S ,  G ,  _from ,  to ,  bvID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int shortestPath_lt_bv(void* S, void* G, int _from, int to, int bvID)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_9);
__Pyx_AddTraceback("monosat.monosat_p.shortestPath_lt_bv", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1525
*     return py_result
*
* def shortestPath_lt_const( S ,  G ,  _from ,  to ,  dist ):             # <<<<<<<<<<<<<<
*     """Cython signature: int shortestPath_lt_const(void* S, void* G, int _from, int to, int64_t dist)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_231shortestPath_lt_const(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_230shortestPath_lt_const[] = "Cython signature: int shortestPath_lt_const(void* S, void* G, int _from, int to, int64_t dist)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_231shortestPath_lt_const = {"shortestPath_lt_const", (PyCFunction)__pyx_pw_7monosat_9monosat_p_231shortestPath_lt_const, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_230shortestPath_lt_const};
static PyObject *__pyx_pw_7monosat_9monosat_p_231shortestPath_lt_const(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_G = 0;
PyObject *__pyx_v__from = 0;
PyObject *__pyx_v_to = 0;
PyObject *__pyx_v_dist = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("shortestPath_lt_const (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_G,&__pyx_n_s_from,&__pyx_n_s_to,&__pyx_n_s_dist,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_S)) != 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_G)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("shortestPath_lt_const", 1, 5, 5, 1); __PYX_ERR(0, 1525, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_from)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("shortestPath_lt_const", 1, 5, 5, 2); __PYX_ERR(0, 1525, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  3:
   if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_to)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("shortestPath_lt_const", 1, 5, 5, 3); __PYX_ERR(0, 1525, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  4:
   if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dist)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("shortestPath_lt_const", 1, 5, 5, 4); __PYX_ERR(0, 1525, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "shortestPath_lt_const") < 0)) __PYX_ERR(0, 1525, __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_S = values[0];
__pyx_v_G = values[1];
__pyx_v__from = values[2];
__pyx_v_to = values[3];
__pyx_v_dist = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("shortestPath_lt_const", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1525, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.shortestPath_lt_const", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_230shortestPath_lt_const(__pyx_self, __pyx_v_S, __pyx_v_G, __pyx_v__from, __pyx_v_to, __pyx_v_dist);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_230shortestPath_lt_const(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_G, PyObject *__pyx_v__from, PyObject *__pyx_v_to, PyObject *__pyx_v_dist) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
void *__pyx_t_4;
void *__pyx_t_5;
int __pyx_t_6;
int __pyx_t_7;
int64_t __pyx_t_8;
PyObject *__pyx_t_9 = NULL;
__Pyx_RefNannySetupContext("shortestPath_lt_const", 0);

/* "monosat/monosat_p.pyx":1529
*
*
*     assert isinstance(_from, (int, long)), 'arg _from wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(to, (int, long)), 'arg to wrong type'
*     assert isinstance(dist, (int, long)), 'arg dist wrong type'
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v__from);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v__from);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg__from_wrong_type);
 __PYX_ERR(0, 1529, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1530
*
*     assert isinstance(_from, (int, long)), 'arg _from wrong type'
*     assert isinstance(to, (int, long)), 'arg to wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(dist, (int, long)), 'arg dist wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_to);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L5_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_to);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L5_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_to_wrong_type);
 __PYX_ERR(0, 1530, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1531
*     assert isinstance(_from, (int, long)), 'arg _from wrong type'
*     assert isinstance(to, (int, long)), 'arg to wrong type'
*     assert isinstance(dist, (int, long)), 'arg dist wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_dist);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L7_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_dist);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_dist_wrong_type);
 __PYX_ERR(0, 1531, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1537
*
*
*     cdef int _r = _shortestPath_lt_const_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to), (<int64_t>dist))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_4 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_4 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1537, __pyx_L1_error)
__pyx_t_5 = PyCapsule_GetPointer(__pyx_v_G, NULL); if (unlikely(__pyx_t_5 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1537, __pyx_L1_error)
__pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v__from); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1537, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_to); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1537, __pyx_L1_error)
__pyx_t_8 = __Pyx_PyInt_As_int64_t(__pyx_v_dist); if (unlikely((__pyx_t_8 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1537, __pyx_L1_error)
__pyx_v__r = shortestPath_lt_const(((void *)__pyx_t_4), ((void *)__pyx_t_5), ((int)__pyx_t_6), ((int)__pyx_t_7), ((int64_t)__pyx_t_8));

/* "monosat/monosat_p.pyx":1538
*
*     cdef int _r = _shortestPath_lt_const_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to), (<int64_t>dist))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":1539
*     cdef int _r = _shortestPath_lt_const_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int>_from), (<int>to), (<int64_t>dist))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def solve( S ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1539, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__pyx_r = __pyx_t_9;
__pyx_t_9 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1525
*     return py_result
*
* def shortestPath_lt_const( S ,  G ,  _from ,  to ,  dist ):             # <<<<<<<<<<<<<<
*     """Cython signature: int shortestPath_lt_const(void* S, void* G, int _from, int to, int64_t dist)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_9);
__Pyx_AddTraceback("monosat.monosat_p.shortestPath_lt_const", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1541
*     return py_result
*
* def solve( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: bint solve(void* S)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_233solve(PyObject *__pyx_self, PyObject *__pyx_v_S); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_232solve[] = "Cython signature: bint solve(void* S)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_233solve = {"solve", (PyCFunction)__pyx_pw_7monosat_9monosat_p_233solve, METH_O, __pyx_doc_7monosat_9monosat_p_232solve};
static PyObject *__pyx_pw_7monosat_9monosat_p_233solve(PyObject *__pyx_self, PyObject *__pyx_v_S) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("solve (wrapper)", 0);
__pyx_r = __pyx_pf_7monosat_9monosat_p_232solve(__pyx_self, ((PyObject *)__pyx_v_S));

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

static PyObject *__pyx_pf_7monosat_9monosat_p_232solve(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
void *__pyx_t_1;
PyObject *__pyx_t_2 = NULL;
__Pyx_RefNannySetupContext("solve", 0);

/* "monosat/monosat_p.pyx":1545
*
*
*     cdef bint _r = _solve_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))             # <<<<<<<<<<<<<<
*     py_result = <bint>_r
*     return py_result
*/
__pyx_t_1 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1545, __pyx_L1_error)
__pyx_v__r = solve(((void *)__pyx_t_1));

/* "monosat/monosat_p.pyx":1546
*
*     cdef bint _r = _solve_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))
*     py_result = <bint>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = (__pyx_v__r != 0);

/* "monosat/monosat_p.pyx":1547
*     cdef bint _r = _solve_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))
*     py_result = <bint>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def solveAssumptions( S ,  assumptions,  n_assumptions):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1547, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1541
*     return py_result
*
* def solve( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: bint solve(void* S)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("monosat.monosat_p.solve", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1549
*     return py_result
*
* def solveAssumptions( S ,  assumptions,  n_assumptions):             # <<<<<<<<<<<<<<
*     """Cython signature: bint solveAssumptions(void* S, int* assumptions, int n_assumptions)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_235solveAssumptions(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_234solveAssumptions[] = "Cython signature: bint solveAssumptions(void* S, int* assumptions, int n_assumptions)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_235solveAssumptions = {"solveAssumptions", (PyCFunction)__pyx_pw_7monosat_9monosat_p_235solveAssumptions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_234solveAssumptions};
static PyObject *__pyx_pw_7monosat_9monosat_p_235solveAssumptions(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_assumptions = 0;
PyObject *__pyx_v_n_assumptions = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("solveAssumptions (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_assumptions,&__pyx_n_s_n_assumptions,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_S)) != 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_assumptions)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("solveAssumptions", 1, 3, 3, 1); __PYX_ERR(0, 1549, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n_assumptions)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("solveAssumptions", 1, 3, 3, 2); __PYX_ERR(0, 1549, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "solveAssumptions") < 0)) __PYX_ERR(0, 1549, __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_S = values[0];
__pyx_v_assumptions = values[1];
__pyx_v_n_assumptions = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("solveAssumptions", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1549, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.solveAssumptions", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_234solveAssumptions(__pyx_self, __pyx_v_S, __pyx_v_assumptions, __pyx_v_n_assumptions);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_234solveAssumptions(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_assumptions, PyObject *__pyx_v_n_assumptions) {
arrayobject *__pyx_v_a = 0;
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
void *__pyx_t_3;
int __pyx_t_4;
__Pyx_RefNannySetupContext("solveAssumptions", 0);

/* "monosat/monosat_p.pyx":1553
*
*
*     cdef array.array a =  array.array('i', assumptions)             # <<<<<<<<<<<<<<
*     cdef bint _r = _solveAssumptions_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), <int*>a.data.as_ints, (<int>n_assumptions))
*     py_result = <bint>_r
*/
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1553, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_n_s_i);
__Pyx_GIVEREF(__pyx_n_s_i);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_i);
__Pyx_INCREF(__pyx_v_assumptions);
__Pyx_GIVEREF(__pyx_v_assumptions);
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_assumptions);
__pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1553, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_a = ((arrayobject *)__pyx_t_2);
__pyx_t_2 = 0;

/* "monosat/monosat_p.pyx":1554
*
*     cdef array.array a =  array.array('i', assumptions)
*     cdef bint _r = _solveAssumptions_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), <int*>a.data.as_ints, (<int>n_assumptions))             # <<<<<<<<<<<<<<
*     py_result = <bint>_r
*     return py_result
*/
__pyx_t_3 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_3 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1554, __pyx_L1_error)
__pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_n_assumptions); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1554, __pyx_L1_error)
__pyx_v__r = solveAssumptions(((void *)__pyx_t_3), ((int *)__pyx_v_a->data.as_ints), ((int)__pyx_t_4));

/* "monosat/monosat_p.pyx":1555
*     cdef array.array a =  array.array('i', assumptions)
*     cdef bint _r = _solveAssumptions_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), <int*>a.data.as_ints, (<int>n_assumptions))
*     py_result = <bint>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = (__pyx_v__r != 0);

/* "monosat/monosat_p.pyx":1556
*     cdef bint _r = _solveAssumptions_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), <int*>a.data.as_ints, (<int>n_assumptions))
*     py_result = <bint>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def solveAssumptionsLimited( S ,  assumptions ,  n_assumptions ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1556, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1549
*     return py_result
*
* def solveAssumptions( S ,  assumptions,  n_assumptions):             # <<<<<<<<<<<<<<
*     """Cython signature: bint solveAssumptions(void* S, int* assumptions, int n_assumptions)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("monosat.monosat_p.solveAssumptions", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_a);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1558
*     return py_result
*
* def solveAssumptionsLimited( S ,  assumptions ,  n_assumptions ):             # <<<<<<<<<<<<<<
*     """Cython signature: int solveAssumptionsLimited(void* S, int* assumptions, int n_assumptions)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_237solveAssumptionsLimited(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_236solveAssumptionsLimited[] = "Cython signature: int solveAssumptionsLimited(void* S, int* assumptions, int n_assumptions)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_237solveAssumptionsLimited = {"solveAssumptionsLimited", (PyCFunction)__pyx_pw_7monosat_9monosat_p_237solveAssumptionsLimited, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7monosat_9monosat_p_236solveAssumptionsLimited};
static PyObject *__pyx_pw_7monosat_9monosat_p_237solveAssumptionsLimited(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_S = 0;
PyObject *__pyx_v_assumptions = 0;
PyObject *__pyx_v_n_assumptions = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("solveAssumptionsLimited (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_S,&__pyx_n_s_assumptions,&__pyx_n_s_n_assumptions,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_S)) != 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_assumptions)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("solveAssumptionsLimited", 1, 3, 3, 1); __PYX_ERR(0, 1558, __pyx_L3_error)
   }
   CYTHON_FALLTHROUGH;
   case  2:
   if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n_assumptions)) != 0)) kw_args--;
   else {
     __Pyx_RaiseArgtupleInvalid("solveAssumptionsLimited", 1, 3, 3, 2); __PYX_ERR(0, 1558, __pyx_L3_error)
   }
 }
 if (unlikely(kw_args > 0)) {
   if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "solveAssumptionsLimited") < 0)) __PYX_ERR(0, 1558, __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_S = values[0];
__pyx_v_assumptions = values[1];
__pyx_v_n_assumptions = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("solveAssumptionsLimited", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1558, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("monosat.monosat_p.solveAssumptionsLimited", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_7monosat_9monosat_p_236solveAssumptionsLimited(__pyx_self, __pyx_v_S, __pyx_v_assumptions, __pyx_v_n_assumptions);

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

static PyObject *__pyx_pf_7monosat_9monosat_p_236solveAssumptionsLimited(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S, PyObject *__pyx_v_assumptions, PyObject *__pyx_v_n_assumptions) {
arrayobject *__pyx_v_a = 0;
int __pyx_v__r;
int __pyx_v_py_result;
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;
void *__pyx_t_6;
int __pyx_t_7;
__Pyx_RefNannySetupContext("solveAssumptionsLimited", 0);

/* "monosat/monosat_p.pyx":1561
*     """Cython signature: int solveAssumptionsLimited(void* S, int* assumptions, int n_assumptions)"""
*
*     assert isinstance(assumptions, list), 'arg assumptions wrong type'             # <<<<<<<<<<<<<<
*     assert isinstance(n_assumptions, (int, long)), 'arg n_assumptions wrong type'
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_1 = PyList_Check(__pyx_v_assumptions);
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_assumptions_wrong_type);
 __PYX_ERR(0, 1561, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1562
*
*     assert isinstance(assumptions, list), 'arg assumptions wrong type'
*     assert isinstance(n_assumptions, (int, long)), 'arg n_assumptions wrong type'             # <<<<<<<<<<<<<<
*
*
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
__pyx_t_2 = PyInt_Check(__pyx_v_n_assumptions);
__pyx_t_3 = (__pyx_t_2 != 0);
if (!__pyx_t_3) {
} else {
 __pyx_t_1 = __pyx_t_3;
 goto __pyx_L3_bool_binop_done;
}
__pyx_t_3 = PyLong_Check(__pyx_v_n_assumptions);
__pyx_t_2 = (__pyx_t_3 != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L3_bool_binop_done:;
if (unlikely(!(__pyx_t_1 != 0))) {
 PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arg_n_assumptions_wrong_type);
 __PYX_ERR(0, 1562, __pyx_L1_error)
}
}
#endif

/* "monosat/monosat_p.pyx":1565
*
*
*     cdef array.array a =  array.array('i', assumptions)             # <<<<<<<<<<<<<<
*     cdef int _r = _solveAssumptionsLimited_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int*>a.data.as_ints), (<int>n_assumptions))
*     py_result = <int>_r
*/
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1565, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_n_s_i);
__Pyx_GIVEREF(__pyx_n_s_i);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_i);
__Pyx_INCREF(__pyx_v_assumptions);
__Pyx_GIVEREF(__pyx_v_assumptions);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_assumptions);
__pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1565, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_a = ((arrayobject *)__pyx_t_5);
__pyx_t_5 = 0;

/* "monosat/monosat_p.pyx":1566
*
*     cdef array.array a =  array.array('i', assumptions)
*     cdef int _r = _solveAssumptionsLimited_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int*>a.data.as_ints), (<int>n_assumptions))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_6 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_6 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1566, __pyx_L1_error)
__pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_n_assumptions); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1566, __pyx_L1_error)
__pyx_v__r = solveAssumptionsLimited(((void *)__pyx_t_6), ((int *)__pyx_v_a->data.as_ints), ((int)__pyx_t_7));

/* "monosat/monosat_p.pyx":1567
*     cdef array.array a =  array.array('i', assumptions)
*     cdef int _r = _solveAssumptionsLimited_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int*>a.data.as_ints), (<int>n_assumptions))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":1568
*     cdef int _r = _solveAssumptionsLimited_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int*>a.data.as_ints), (<int>n_assumptions))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def solveLimited( S ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1568, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_r = __pyx_t_5;
__pyx_t_5 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1558
*     return py_result
*
* def solveAssumptionsLimited( S ,  assumptions ,  n_assumptions ):             # <<<<<<<<<<<<<<
*     """Cython signature: int solveAssumptionsLimited(void* S, int* assumptions, int n_assumptions)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_AddTraceback("monosat.monosat_p.solveAssumptionsLimited", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_a);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1570
*     return py_result
*
* def solveLimited( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: int solveLimited(void* S)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_239solveLimited(PyObject *__pyx_self, PyObject *__pyx_v_S); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_238solveLimited[] = "Cython signature: int solveLimited(void* S)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_239solveLimited = {"solveLimited", (PyCFunction)__pyx_pw_7monosat_9monosat_p_239solveLimited, METH_O, __pyx_doc_7monosat_9monosat_p_238solveLimited};
static PyObject *__pyx_pw_7monosat_9monosat_p_239solveLimited(PyObject *__pyx_self, PyObject *__pyx_v_S) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("solveLimited (wrapper)", 0);
__pyx_r = __pyx_pf_7monosat_9monosat_p_238solveLimited(__pyx_self, ((PyObject *)__pyx_v_S));

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

static PyObject *__pyx_pf_7monosat_9monosat_p_238solveLimited(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
void *__pyx_t_1;
PyObject *__pyx_t_2 = NULL;
__Pyx_RefNannySetupContext("solveLimited", 0);

/* "monosat/monosat_p.pyx":1574
*
*
*     cdef int _r = _solveLimited_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_1 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1574, __pyx_L1_error)
__pyx_v__r = solveLimited(((void *)__pyx_t_1));

/* "monosat/monosat_p.pyx":1575
*
*     cdef int _r = _solveLimited_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":1576
*     cdef int _r = _solveLimited_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*
* def true_lit( S ):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1576, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1570
*     return py_result
*
* def solveLimited( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: int solveLimited(void* S)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("monosat.monosat_p.solveLimited", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "monosat/monosat_p.pyx":1578
*     return py_result
*
* def true_lit( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: int true_lit(void* S)"""
*
*/

/* Python wrapper */
static PyObject *__pyx_pw_7monosat_9monosat_p_241true_lit(PyObject *__pyx_self, PyObject *__pyx_v_S); /*proto*/
static char __pyx_doc_7monosat_9monosat_p_240true_lit[] = "Cython signature: int true_lit(void* S)";
static PyMethodDef __pyx_mdef_7monosat_9monosat_p_241true_lit = {"true_lit", (PyCFunction)__pyx_pw_7monosat_9monosat_p_241true_lit, METH_O, __pyx_doc_7monosat_9monosat_p_240true_lit};
static PyObject *__pyx_pw_7monosat_9monosat_p_241true_lit(PyObject *__pyx_self, PyObject *__pyx_v_S) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("true_lit (wrapper)", 0);
__pyx_r = __pyx_pf_7monosat_9monosat_p_240true_lit(__pyx_self, ((PyObject *)__pyx_v_S));

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

static PyObject *__pyx_pf_7monosat_9monosat_p_240true_lit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_S) {
int __pyx_v__r;
int __pyx_v_py_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
void *__pyx_t_1;
PyObject *__pyx_t_2 = NULL;
__Pyx_RefNannySetupContext("true_lit", 0);

/* "monosat/monosat_p.pyx":1582
*
*
*     cdef int _r = _true_lit_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))             # <<<<<<<<<<<<<<
*     py_result = <int>_r
*     return py_result
*/
__pyx_t_1 = PyCapsule_GetPointer(__pyx_v_S, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 1582, __pyx_L1_error)
__pyx_v__r = true_lit(((void *)__pyx_t_1));

/* "monosat/monosat_p.pyx":1583
*
*     cdef int _r = _true_lit_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))
*     py_result = <int>_r             # <<<<<<<<<<<<<<
*     return py_result
*/
__pyx_v_py_result = ((int)__pyx_v__r);

/* "monosat/monosat_p.pyx":1584
*     cdef int _r = _true_lit_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))
*     py_result = <int>_r
*     return py_result             # <<<<<<<<<<<<<<
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1584, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;

/* "monosat/monosat_p.pyx":1578
*     return py_result
*
* def true_lit( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: int true_lit(void* S)"""
*
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("monosat.monosat_p.true_lit", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "array.pxd":93
*             __data_union data
*
*         def __getbuffer__(self, Py_buffer* info, int flags):             # <<<<<<<<<<<<<<
*             # This implementation of getbuffer is geared towards Cython
*             # requirements, and does not yet fulfill the PEP.
*/

/* Python wrapper */
static CYTHON_UNUSED int __pyx_pw_7cpython_5array_5array_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
static CYTHON_UNUSED int __pyx_pw_7cpython_5array_5array_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
__pyx_r = __pyx_pf_7cpython_5array_5array___getbuffer__(((arrayobject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));

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

static int __pyx_pf_7cpython_5array_5array___getbuffer__(arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info, CYTHON_UNUSED int __pyx_v_flags) {
PyObject *__pyx_v_item_count = NULL;
int __pyx_r;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
char *__pyx_t_2;
int __pyx_t_3;
PyObject *__pyx_t_4 = NULL;
Py_ssize_t __pyx_t_5;
int __pyx_t_6;
if (__pyx_v_info == NULL) {
PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
return -1;
}
__Pyx_RefNannySetupContext("__getbuffer__", 0);
__pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
__Pyx_GIVEREF(__pyx_v_info->obj);

/* "array.pxd":98
*             # In particular strided access is always provided regardless
*             # of flags
*             item_count = Py_SIZE(self)             # <<<<<<<<<<<<<<
*
*             info.suboffsets = NULL
*/
__pyx_t_1 = PyInt_FromSsize_t(Py_SIZE(((PyObject *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 98, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_item_count = __pyx_t_1;
__pyx_t_1 = 0;

/* "array.pxd":100
*             item_count = Py_SIZE(self)
*
*             info.suboffsets = NULL             # <<<<<<<<<<<<<<
*             info.buf = self.data.as_chars
*             info.readonly = 0
*/
__pyx_v_info->suboffsets = NULL;

/* "array.pxd":101
*
*             info.suboffsets = NULL
*             info.buf = self.data.as_chars             # <<<<<<<<<<<<<<
*             info.readonly = 0
*             info.ndim = 1
*/
__pyx_t_2 = __pyx_v_self->data.as_chars;
__pyx_v_info->buf = __pyx_t_2;

/* "array.pxd":102
*             info.suboffsets = NULL
*             info.buf = self.data.as_chars
*             info.readonly = 0             # <<<<<<<<<<<<<<
*             info.ndim = 1
*             info.itemsize = self.ob_descr.itemsize   # e.g. sizeof(float)
*/
__pyx_v_info->readonly = 0;

/* "array.pxd":103
*             info.buf = self.data.as_chars
*             info.readonly = 0
*             info.ndim = 1             # <<<<<<<<<<<<<<
*             info.itemsize = self.ob_descr.itemsize   # e.g. sizeof(float)
*             info.len = info.itemsize * item_count
*/
__pyx_v_info->ndim = 1;

/* "array.pxd":104
*             info.readonly = 0
*             info.ndim = 1
*             info.itemsize = self.ob_descr.itemsize   # e.g. sizeof(float)             # <<<<<<<<<<<<<<
*             info.len = info.itemsize * item_count
*
*/
__pyx_t_3 = __pyx_v_self->ob_descr->itemsize;
__pyx_v_info->itemsize = __pyx_t_3;

/* "array.pxd":105
*             info.ndim = 1
*             info.itemsize = self.ob_descr.itemsize   # e.g. sizeof(float)
*             info.len = info.itemsize * item_count             # <<<<<<<<<<<<<<
*
*             info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2)
*/
__pyx_t_1 = PyInt_FromSsize_t(__pyx_v_info->itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 105, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_4 = PyNumber_Multiply(__pyx_t_1, __pyx_v_item_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 105, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 105, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_info->len = __pyx_t_5;

/* "array.pxd":107
*             info.len = info.itemsize * item_count
*
*             info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2)             # <<<<<<<<<<<<<<
*             if not info.shape:
*                 raise MemoryError()
*/
__pyx_v_info->shape = ((Py_ssize_t *)PyObject_Malloc(((sizeof(Py_ssize_t)) + 2)));

/* "array.pxd":108
*
*             info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2)
*             if not info.shape:             # <<<<<<<<<<<<<<
*                 raise MemoryError()
*             info.shape[0] = item_count      # constant regardless of resizing
*/
__pyx_t_6 = ((!(__pyx_v_info->shape != 0)) != 0);
if (unlikely(__pyx_t_6)) {

/* "array.pxd":109
*             info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2)
*             if not info.shape:
*                 raise MemoryError()             # <<<<<<<<<<<<<<
*             info.shape[0] = item_count      # constant regardless of resizing
*             info.strides = &info.itemsize
*/
PyErr_NoMemory(); __PYX_ERR(1, 109, __pyx_L1_error)

/* "array.pxd":108
*
*             info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2)
*             if not info.shape:             # <<<<<<<<<<<<<<
*                 raise MemoryError()
*             info.shape[0] = item_count      # constant regardless of resizing
*/
}

/* "array.pxd":110
*             if not info.shape:
*                 raise MemoryError()
*             info.shape[0] = item_count      # constant regardless of resizing             # <<<<<<<<<<<<<<
*             info.strides = &info.itemsize
*
*/
__pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_item_count); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 110, __pyx_L1_error)
(__pyx_v_info->shape[0]) = __pyx_t_5;

/* "array.pxd":111
*                 raise MemoryError()
*             info.shape[0] = item_count      # constant regardless of resizing
*             info.strides = &info.itemsize             # <<<<<<<<<<<<<<
*
*             info.format = <char*> (info.shape + 1)
*/
__pyx_v_info->strides = (&__pyx_v_info->itemsize);

/* "array.pxd":113
*             info.strides = &info.itemsize
*
*             info.format = <char*> (info.shape + 1)             # <<<<<<<<<<<<<<
*             info.format[0] = self.ob_descr.typecode
*             info.format[1] = 0
*/
__pyx_v_info->format = ((char *)(__pyx_v_info->shape + 1));

/* "array.pxd":114
*
*             info.format = <char*> (info.shape + 1)
*             info.format[0] = self.ob_descr.typecode             # <<<<<<<<<<<<<<
*             info.format[1] = 0
*             info.obj = self
*/
__pyx_t_3 = __pyx_v_self->ob_descr->typecode;
(__pyx_v_info->format[0]) = __pyx_t_3;

/* "array.pxd":115
*             info.format = <char*> (info.shape + 1)
*             info.format[0] = self.ob_descr.typecode
*             info.format[1] = 0             # <<<<<<<<<<<<<<
*             info.obj = self
*
*/
(__pyx_v_info->format[1]) = 0;

/* "array.pxd":116
*             info.format[0] = self.ob_descr.typecode
*             info.format[1] = 0
*             info.obj = self             # <<<<<<<<<<<<<<
*
*         def __releasebuffer__(self, Py_buffer* info):
*/
__Pyx_INCREF(((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
__Pyx_GOTREF(__pyx_v_info->obj);
__Pyx_DECREF(__pyx_v_info->obj);
__pyx_v_info->obj = ((PyObject *)__pyx_v_self);

/* "array.pxd":93
*             __data_union data
*
*         def __getbuffer__(self, Py_buffer* info, int flags):             # <<<<<<<<<<<<<<
*             # This implementation of getbuffer is geared towards Cython
*             # requirements, and does not yet fulfill the PEP.
*/

/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_AddTraceback("cpython.array.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
if (__pyx_v_info->obj != NULL) {
__Pyx_GOTREF(__pyx_v_info->obj);
__Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
}
goto __pyx_L2;
__pyx_L0:;
if (__pyx_v_info->obj == Py_None) {
__Pyx_GOTREF(__pyx_v_info->obj);
__Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
}
__pyx_L2:;
__Pyx_XDECREF(__pyx_v_item_count);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "array.pxd":118
*             info.obj = self
*
*         def __releasebuffer__(self, Py_buffer* info):             # <<<<<<<<<<<<<<
*             PyObject_Free(info.shape)
*
*/

/* Python wrapper */
static CYTHON_UNUSED void __pyx_pw_7cpython_5array_5array_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
static CYTHON_UNUSED void __pyx_pw_7cpython_5array_5array_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
__pyx_pf_7cpython_5array_5array_2__releasebuffer__(((arrayobject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info));

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

static void __pyx_pf_7cpython_5array_5array_2__releasebuffer__(CYTHON_UNUSED arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__releasebuffer__", 0);

/* "array.pxd":119
*
*         def __releasebuffer__(self, Py_buffer* info):
*             PyObject_Free(info.shape)             # <<<<<<<<<<<<<<
*
*     array newarrayobject(PyTypeObject* type, Py_ssize_t size, arraydescr *descr)
*/
PyObject_Free(__pyx_v_info->shape);

/* "array.pxd":118
*             info.obj = self
*
*         def __releasebuffer__(self, Py_buffer* info):             # <<<<<<<<<<<<<<
*             PyObject_Free(info.shape)
*
*/

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

/* "array.pxd":130
*
*
* cdef inline array clone(array template, Py_ssize_t length, bint zero):             # <<<<<<<<<<<<<<
*     """ fast creation of a new array, given a template array.
*     type will be same as template.
*/

static CYTHON_INLINE arrayobject *__pyx_f_7cpython_5array_clone(arrayobject *__pyx_v_template, Py_ssize_t __pyx_v_length, int __pyx_v_zero) {
arrayobject *__pyx_v_op = NULL;
arrayobject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_t_2;
int __pyx_t_3;
int __pyx_t_4;
__Pyx_RefNannySetupContext("clone", 0);

/* "array.pxd":134
*     type will be same as template.
*     if zero is true, new array will be initialized with zeroes."""
*     op = newarrayobject(Py_TYPE(template), length, template.ob_descr)             # <<<<<<<<<<<<<<
*     if zero and op is not None:
*         memset(op.data.as_chars, 0, length * op.ob_descr.itemsize)
*/
__pyx_t_1 = ((PyObject *)newarrayobject(Py_TYPE(((PyObject *)__pyx_v_template)), __pyx_v_length, __pyx_v_template->ob_descr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 134, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_op = ((arrayobject *)__pyx_t_1);
__pyx_t_1 = 0;

/* "array.pxd":135
*     if zero is true, new array will be initialized with zeroes."""
*     op = newarrayobject(Py_TYPE(template), length, template.ob_descr)
*     if zero and op is not None:             # <<<<<<<<<<<<<<
*         memset(op.data.as_chars, 0, length * op.ob_descr.itemsize)
*     return op
*/
__pyx_t_3 = (__pyx_v_zero != 0);
if (__pyx_t_3) {
} else {
__pyx_t_2 = __pyx_t_3;
goto __pyx_L4_bool_binop_done;
}
__pyx_t_3 = (((PyObject *)__pyx_v_op) != Py_None);
__pyx_t_4 = (__pyx_t_3 != 0);
__pyx_t_2 = __pyx_t_4;
__pyx_L4_bool_binop_done:;
if (__pyx_t_2) {

/* "array.pxd":136
*     op = newarrayobject(Py_TYPE(template), length, template.ob_descr)
*     if zero and op is not None:
*         memset(op.data.as_chars, 0, length * op.ob_descr.itemsize)             # <<<<<<<<<<<<<<
*     return op
*
*/
(void)(memset(__pyx_v_op->data.as_chars, 0, (__pyx_v_length * __pyx_v_op->ob_descr->itemsize)));

/* "array.pxd":135
*     if zero is true, new array will be initialized with zeroes."""
*     op = newarrayobject(Py_TYPE(template), length, template.ob_descr)
*     if zero and op is not None:             # <<<<<<<<<<<<<<
*         memset(op.data.as_chars, 0, length * op.ob_descr.itemsize)
*     return op
*/
}

/* "array.pxd":137
*     if zero and op is not None:
*         memset(op.data.as_chars, 0, length * op.ob_descr.itemsize)
*     return op             # <<<<<<<<<<<<<<
*
* cdef inline array copy(array self):
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
__Pyx_INCREF(((PyObject *)__pyx_v_op));
__pyx_r = __pyx_v_op;
goto __pyx_L0;

/* "array.pxd":130
*
*
* cdef inline array clone(array template, Py_ssize_t length, bint zero):             # <<<<<<<<<<<<<<
*     """ fast creation of a new array, given a template array.
*     type will be same as template.
*/

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

/* "array.pxd":139
*     return op
*
* cdef inline array copy(array self):             # <<<<<<<<<<<<<<
*     """ make a copy of an array. """
*     op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr)
*/

static CYTHON_INLINE arrayobject *__pyx_f_7cpython_5array_copy(arrayobject *__pyx_v_self) {
arrayobject *__pyx_v_op = NULL;
arrayobject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("copy", 0);

/* "array.pxd":141
* cdef inline array copy(array self):
*     """ make a copy of an array. """
*     op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr)             # <<<<<<<<<<<<<<
*     memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize)
*     return op
*/
__pyx_t_1 = ((PyObject *)newarrayobject(Py_TYPE(((PyObject *)__pyx_v_self)), Py_SIZE(((PyObject *)__pyx_v_self)), __pyx_v_self->ob_descr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 141, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_op = ((arrayobject *)__pyx_t_1);
__pyx_t_1 = 0;

/* "array.pxd":142
*     """ make a copy of an array. """
*     op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr)
*     memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize)             # <<<<<<<<<<<<<<
*     return op
*
*/
(void)(memcpy(__pyx_v_op->data.as_chars, __pyx_v_self->data.as_chars, (Py_SIZE(((PyObject *)__pyx_v_op)) * __pyx_v_op->ob_descr->itemsize)));

/* "array.pxd":143
*     op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr)
*     memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize)
*     return op             # <<<<<<<<<<<<<<
*
* cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1:
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
__Pyx_INCREF(((PyObject *)__pyx_v_op));
__pyx_r = __pyx_v_op;
goto __pyx_L0;

/* "array.pxd":139
*     return op
*
* cdef inline array copy(array self):             # <<<<<<<<<<<<<<
*     """ make a copy of an array. """
*     op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr)
*/

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

/* "array.pxd":145
*     return op
*
* cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1:             # <<<<<<<<<<<<<<
*     """ efficient appending of new stuff of same type
*     (e.g. of same array type)
*/

static CYTHON_INLINE int __pyx_f_7cpython_5array_extend_buffer(arrayobject *__pyx_v_self, char *__pyx_v_stuff, Py_ssize_t __pyx_v_n) {
Py_ssize_t __pyx_v_itemsize;
Py_ssize_t __pyx_v_origsize;
int __pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
__Pyx_RefNannySetupContext("extend_buffer", 0);

/* "array.pxd":149
*     (e.g. of same array type)
*     n: number of elements (not number of bytes!) """
*     cdef Py_ssize_t itemsize = self.ob_descr.itemsize             # <<<<<<<<<<<<<<
*     cdef Py_ssize_t origsize = Py_SIZE(self)
*     resize_smart(self, origsize + n)
*/
__pyx_t_1 = __pyx_v_self->ob_descr->itemsize;
__pyx_v_itemsize = __pyx_t_1;

/* "array.pxd":150
*     n: number of elements (not number of bytes!) """
*     cdef Py_ssize_t itemsize = self.ob_descr.itemsize
*     cdef Py_ssize_t origsize = Py_SIZE(self)             # <<<<<<<<<<<<<<
*     resize_smart(self, origsize + n)
*     memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize)
*/
__pyx_v_origsize = Py_SIZE(((PyObject *)__pyx_v_self));

/* "array.pxd":151
*     cdef Py_ssize_t itemsize = self.ob_descr.itemsize
*     cdef Py_ssize_t origsize = Py_SIZE(self)
*     resize_smart(self, origsize + n)             # <<<<<<<<<<<<<<
*     memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize)
*     return 0
*/
__pyx_t_1 = resize_smart(__pyx_v_self, (__pyx_v_origsize + __pyx_v_n)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 151, __pyx_L1_error)

/* "array.pxd":152
*     cdef Py_ssize_t origsize = Py_SIZE(self)
*     resize_smart(self, origsize + n)
*     memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize)             # <<<<<<<<<<<<<<
*     return 0
*
*/
(void)(memcpy((__pyx_v_self->data.as_chars + (__pyx_v_origsize * __pyx_v_itemsize)), __pyx_v_stuff, (__pyx_v_n * __pyx_v_itemsize)));

/* "array.pxd":153
*     resize_smart(self, origsize + n)
*     memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize)
*     return 0             # <<<<<<<<<<<<<<
*
* cdef inline int extend(array self, array other) except -1:
*/
__pyx_r = 0;
goto __pyx_L0;

/* "array.pxd":145
*     return op
*
* cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1:             # <<<<<<<<<<<<<<
*     """ efficient appending of new stuff of same type
*     (e.g. of same array type)
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_AddTraceback("cpython.array.extend_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "array.pxd":155
*     return 0
*
* cdef inline int extend(array self, array other) except -1:             # <<<<<<<<<<<<<<
*     """ extend array with data from another array; types must match. """
*     if self.ob_descr.typecode != other.ob_descr.typecode:
*/

static CYTHON_INLINE int __pyx_f_7cpython_5array_extend(arrayobject *__pyx_v_self, arrayobject *__pyx_v_other) {
int __pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
__Pyx_RefNannySetupContext("extend", 0);

/* "array.pxd":157
* cdef inline int extend(array self, array other) except -1:
*     """ extend array with data from another array; types must match. """
*     if self.ob_descr.typecode != other.ob_descr.typecode:             # <<<<<<<<<<<<<<
*         PyErr_BadArgument()
*     return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
*/
__pyx_t_1 = ((__pyx_v_self->ob_descr->typecode != __pyx_v_other->ob_descr->typecode) != 0);
if (__pyx_t_1) {

/* "array.pxd":158
*     """ extend array with data from another array; types must match. """
*     if self.ob_descr.typecode != other.ob_descr.typecode:
*         PyErr_BadArgument()             # <<<<<<<<<<<<<<
*     return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
*
*/
__pyx_t_2 = PyErr_BadArgument(); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 158, __pyx_L1_error)

/* "array.pxd":157
* cdef inline int extend(array self, array other) except -1:
*     """ extend array with data from another array; types must match. """
*     if self.ob_descr.typecode != other.ob_descr.typecode:             # <<<<<<<<<<<<<<
*         PyErr_BadArgument()
*     return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
*/
}

/* "array.pxd":159
*     if self.ob_descr.typecode != other.ob_descr.typecode:
*         PyErr_BadArgument()
*     return extend_buffer(self, other.data.as_chars, Py_SIZE(other))             # <<<<<<<<<<<<<<
*
* cdef inline void zero(array self):
*/
__pyx_t_2 = __pyx_f_7cpython_5array_extend_buffer(__pyx_v_self, __pyx_v_other->data.as_chars, Py_SIZE(((PyObject *)__pyx_v_other))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 159, __pyx_L1_error)
__pyx_r = __pyx_t_2;
goto __pyx_L0;

/* "array.pxd":155
*     return 0
*
* cdef inline int extend(array self, array other) except -1:             # <<<<<<<<<<<<<<
*     """ extend array with data from another array; types must match. """
*     if self.ob_descr.typecode != other.ob_descr.typecode:
*/

/* function exit code */
__pyx_L1_error:;
__Pyx_AddTraceback("cpython.array.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}

/* "array.pxd":161
*     return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
*
* cdef inline void zero(array self):             # <<<<<<<<<<<<<<
*     """ set all elements of array to zero. """
*     memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize)
*/

static CYTHON_INLINE void __pyx_f_7cpython_5array_zero(arrayobject *__pyx_v_self) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("zero", 0);

/* "array.pxd":163
* cdef inline void zero(array self):
*     """ set all elements of array to zero. """
*     memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize)             # <<<<<<<<<<<<<<
*/
(void)(memset(__pyx_v_self->data.as_chars, 0, (Py_SIZE(((PyObject *)__pyx_v_self)) * __pyx_v_self->ob_descr->itemsize)));

/* "array.pxd":161
*     return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
*
* cdef inline void zero(array self):             # <<<<<<<<<<<<<<
*     """ set all elements of array to zero. """
*     memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize)
*/

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

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_monosat_p(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
{Py_mod_create, (void*)__pyx_pymod_create},
{Py_mod_exec, (void*)__pyx_pymod_exec_monosat_p},
{0, NULL}
};
#endif

static struct PyModuleDef __pyx_moduledef = {
PyModuleDef_HEAD_INIT,
"monosat_p",
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

static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_n_s_G, __pyx_k_G, sizeof(__pyx_k_G), 0, 0, 1, 1},
{&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
{&__pyx_n_s_S, __pyx_k_S, sizeof(__pyx_k_S), 0, 0, 1, 1},
{&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1},
{&__pyx_n_s_aID, __pyx_k_aID, sizeof(__pyx_k_aID), 0, 0, 1, 1},
{&__pyx_n_s_acyclic_directed, __pyx_k_acyclic_directed, sizeof(__pyx_k_acyclic_directed), 0, 0, 1, 1},
{&__pyx_n_s_acyclic_undirected, __pyx_k_acyclic_undirected, sizeof(__pyx_k_acyclic_undirected), 0, 0, 1, 1},
{&__pyx_n_s_addBinaryClause, __pyx_k_addBinaryClause, sizeof(__pyx_k_addBinaryClause), 0, 0, 1, 1},
{&__pyx_n_s_addBinaryClauses, __pyx_k_addBinaryClauses, sizeof(__pyx_k_addBinaryClauses), 0, 0, 1, 1},
{&__pyx_n_s_addClause, __pyx_k_addClause, sizeof(__pyx_k_addClause), 0, 0, 1, 1},
{&__pyx_n_s_addRoutingNet, __pyx_k_addRoutingNet, sizeof(__pyx_k_addRoutingNet), 0, 0, 1, 1},
{&__pyx_n_s_addTertiaryClause, __pyx_k_addTertiaryClause, sizeof(__pyx_k_addTertiaryClause), 0, 0, 1, 1},
{&__pyx_n_s_addUnitClause, __pyx_k_addUnitClause, sizeof(__pyx_k_addUnitClause), 0, 0, 1, 1},
{&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
{&__pyx_kp_s_arg__from_wrong_type, __pyx_k_arg__from_wrong_type, sizeof(__pyx_k_arg__from_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_aID_wrong_type, __pyx_k_arg_aID_wrong_type, sizeof(__pyx_k_arg_aID_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_args_wrong_type, __pyx_k_arg_args_wrong_type, sizeof(__pyx_k_arg_args_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_argv_wrong_type, __pyx_k_arg_argv_wrong_type, sizeof(__pyx_k_arg_argv_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_assumptions_wrong_type, __pyx_k_arg_assumptions_wrong_type, sizeof(__pyx_k_arg_assumptions_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_bID_wrong_type, __pyx_k_arg_bID_wrong_type, sizeof(__pyx_k_arg_bID_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_b_wrong_type, __pyx_k_arg_b_wrong_type, sizeof(__pyx_k_arg_b_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_bits_wrong_type, __pyx_k_arg_bits_wrong_type, sizeof(__pyx_k_arg_bits_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_bvElseID_wrong_type, __pyx_k_arg_bvElseID_wrong_type, sizeof(__pyx_k_arg_bvElseID_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_bvID1_wrong_type, __pyx_k_arg_bvID1_wrong_type, sizeof(__pyx_k_arg_bvID1_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_bvID2_wrong_type, __pyx_k_arg_bvID2_wrong_type, sizeof(__pyx_k_arg_bvID2_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_bvResultID_wrong_type, __pyx_k_arg_bvResultID_wrong_type, sizeof(__pyx_k_arg_bvResultID_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_bvThenID_wrong_type, __pyx_k_arg_bvThenID_wrong_type, sizeof(__pyx_k_arg_bvThenID_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_bvWidth_wrong_type, __pyx_k_arg_bvWidth_wrong_type, sizeof(__pyx_k_arg_bvWidth_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_bvaID_wrong_type, __pyx_k_arg_bvaID_wrong_type, sizeof(__pyx_k_arg_bvaID_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_bvbID_wrong_type, __pyx_k_arg_bvbID_wrong_type, sizeof(__pyx_k_arg_bvbID_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_coefficients_wrong_type, __pyx_k_arg_coefficients_wrong_type, sizeof(__pyx_k_arg_coefficients_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_compareID_wrong_type, __pyx_k_arg_compareID_wrong_type, sizeof(__pyx_k_arg_compareID_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_condition_lit_wrong_type, __pyx_k_arg_condition_lit_wrong_type, sizeof(__pyx_k_arg_condition_lit_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_constval_wrong_type, __pyx_k_arg_constval_wrong_type, sizeof(__pyx_k_arg_constval_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_decidable_wrong_type, __pyx_k_arg_decidable_wrong_type, sizeof(__pyx_k_arg_decidable_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_destNode_wrong_type, __pyx_k_arg_destNode_wrong_type, sizeof(__pyx_k_arg_destNode_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_disabledEdge_wrong_type, __pyx_k_arg_disabledEdge_wrong_type, sizeof(__pyx_k_arg_disabledEdge_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_dist_wrong_type, __pyx_k_arg_dist_wrong_type, sizeof(__pyx_k_arg_dist_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_edgeLit_wrong_type, __pyx_k_arg_edgeLit_wrong_type, sizeof(__pyx_k_arg_edgeLit_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_edge_lits_wrong_type, __pyx_k_arg_edge_lits_wrong_type, sizeof(__pyx_k_arg_edge_lits_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_filename_wrong_type, __pyx_k_arg_filename_wrong_type, sizeof(__pyx_k_arg_filename_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_getMaximumValue_wrong_type, __pyx_k_arg_getMaximumValue_wrong_type, sizeof(__pyx_k_arg_getMaximumValue_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_lit1_wrong_type, __pyx_k_arg_lit1_wrong_type, sizeof(__pyx_k_arg_lit1_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_lit2_wrong_type, __pyx_k_arg_lit2_wrong_type, sizeof(__pyx_k_arg_lit2_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_lit3_wrong_type, __pyx_k_arg_lit3_wrong_type, sizeof(__pyx_k_arg_lit3_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_lit_wrong_type, __pyx_k_arg_lit_wrong_type, sizeof(__pyx_k_arg_lit_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_literals_wrong_type, __pyx_k_arg_literals_wrong_type, sizeof(__pyx_k_arg_literals_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_lits_wrong_type, __pyx_k_arg_lits_wrong_type, sizeof(__pyx_k_arg_lits_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_lower_wrong_type, __pyx_k_arg_lower_wrong_type, sizeof(__pyx_k_arg_lower_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_max_store_size_wrong_type, __pyx_k_arg_max_store_size_wrong_type, sizeof(__pyx_k_arg_max_store_size_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_maxflowLit_wrong_type, __pyx_k_arg_maxflowLit_wrong_type, sizeof(__pyx_k_arg_maxflowLit_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_maxflow_literal_wrong_type, __pyx_k_arg_maxflow_literal_wrong_type, sizeof(__pyx_k_arg_maxflow_literal_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_n_args_wrong_type, __pyx_k_arg_n_args_wrong_type, sizeof(__pyx_k_arg_n_args_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_n_assumptions_wrong_type, __pyx_k_arg_n_assumptions_wrong_type, sizeof(__pyx_k_arg_n_assumptions_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_n_bits_wrong_type, __pyx_k_arg_n_bits_wrong_type, sizeof(__pyx_k_arg_n_bits_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_n_lits_wrong_type, __pyx_k_arg_n_lits_wrong_type, sizeof(__pyx_k_arg_n_lits_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_n_members_wrong_type, __pyx_k_arg_n_members_wrong_type, sizeof(__pyx_k_arg_n_members_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_n_vars_wrong_type, __pyx_k_arg_n_vars_wrong_type, sizeof(__pyx_k_arg_n_vars_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_num_conflicts_wrong_type, __pyx_k_arg_num_conflicts_wrong_type, sizeof(__pyx_k_arg_num_conflicts_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_num_propagations_wrong_type, __pyx_k_arg_num_propagations_wrong_type, sizeof(__pyx_k_arg_num_propagations_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_output_wrong_type, __pyx_k_arg_output_wrong_type, sizeof(__pyx_k_arg_output_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_priority_wrong_type, __pyx_k_arg_priority_wrong_type, sizeof(__pyx_k_arg_priority_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_reach_lits_wrong_type, __pyx_k_arg_reach_lits_wrong_type, sizeof(__pyx_k_arg_reach_lits_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_reach_or_distance_literal_wr, __pyx_k_arg_reach_or_distance_literal_wr, sizeof(__pyx_k_arg_reach_or_distance_literal_wr), 0, 0, 1, 0},
{&__pyx_kp_s_arg_resultID_wrong_type, __pyx_k_arg_resultID_wrong_type, sizeof(__pyx_k_arg_resultID_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_rhs_wrong_type, __pyx_k_arg_rhs_wrong_type, sizeof(__pyx_k_arg_rhs_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_router_wrong_type, __pyx_k_arg_router_wrong_type, sizeof(__pyx_k_arg_router_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_seconds_wrong_type, __pyx_k_arg_seconds_wrong_type, sizeof(__pyx_k_arg_seconds_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_sink_wrong_type, __pyx_k_arg_sink_wrong_type, sizeof(__pyx_k_arg_sink_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_sourceNode_wrong_type, __pyx_k_arg_sourceNode_wrong_type, sizeof(__pyx_k_arg_sourceNode_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_source_wrong_type, __pyx_k_arg_source_wrong_type, sizeof(__pyx_k_arg_source_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_spanning_tree_literal_wrong, __pyx_k_arg_spanning_tree_literal_wrong, sizeof(__pyx_k_arg_spanning_tree_literal_wrong), 0, 0, 1, 0},
{&__pyx_kp_s_arg_steps_wrong_type, __pyx_k_arg_steps_wrong_type, sizeof(__pyx_k_arg_steps_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_store_clause_wrong_type, __pyx_k_arg_store_clause_wrong_type, sizeof(__pyx_k_arg_store_clause_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_store_length_wrong_type, __pyx_k_arg_store_length_wrong_type, sizeof(__pyx_k_arg_store_length_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_store_wrong_type, __pyx_k_arg_store_wrong_type, sizeof(__pyx_k_arg_store_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_to_wrong_type, __pyx_k_arg_to_wrong_type, sizeof(__pyx_k_arg_to_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_upper_wrong_type, __pyx_k_arg_upper_wrong_type, sizeof(__pyx_k_arg_upper_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_v_wrong_type, __pyx_k_arg_v_wrong_type, sizeof(__pyx_k_arg_v_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_var_wrong_type, __pyx_k_arg_var_wrong_type, sizeof(__pyx_k_arg_var_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_vars_wrong_type, __pyx_k_arg_vars_wrong_type, sizeof(__pyx_k_arg_vars_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_weight_wrong_type, __pyx_k_arg_weight_wrong_type, sizeof(__pyx_k_arg_weight_wrong_type), 0, 0, 1, 0},
{&__pyx_kp_s_arg_weights_wrong_type, __pyx_k_arg_weights_wrong_type, sizeof(__pyx_k_arg_weights_wrong_type), 0, 0, 1, 0},
{&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
{&__pyx_n_s_argv, __pyx_k_argv, sizeof(__pyx_k_argv), 0, 0, 1, 1},
{&__pyx_n_s_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 0, 1, 1},
{&__pyx_n_s_assertPB_eq, __pyx_k_assertPB_eq, sizeof(__pyx_k_assertPB_eq), 0, 0, 1, 1},
{&__pyx_n_s_assertPB_geq, __pyx_k_assertPB_geq, sizeof(__pyx_k_assertPB_geq), 0, 0, 1, 1},
{&__pyx_n_s_assertPB_gt, __pyx_k_assertPB_gt, sizeof(__pyx_k_assertPB_gt), 0, 0, 1, 1},
{&__pyx_n_s_assertPB_leq, __pyx_k_assertPB_leq, sizeof(__pyx_k_assertPB_leq), 0, 0, 1, 1},
{&__pyx_n_s_assertPB_lt, __pyx_k_assertPB_lt, sizeof(__pyx_k_assertPB_lt), 0, 0, 1, 1},
{&__pyx_n_s_assumptions, __pyx_k_assumptions, sizeof(__pyx_k_assumptions), 0, 0, 1, 1},
{&__pyx_n_s_at_most_one, __pyx_k_at_most_one, sizeof(__pyx_k_at_most_one), 0, 0, 1, 1},
{&__pyx_n_s_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 0, 1, 1},
{&__pyx_n_s_bID, __pyx_k_bID, sizeof(__pyx_k_bID), 0, 0, 1, 1},
{&__pyx_n_s_backtrack, __pyx_k_backtrack, sizeof(__pyx_k_backtrack), 0, 0, 1, 1},
{&__pyx_n_s_bits, __pyx_k_bits, sizeof(__pyx_k_bits), 0, 0, 1, 1},
{&__pyx_n_s_bv, __pyx_k_bv, sizeof(__pyx_k_bv), 0, 0, 1, 1},
{&__pyx_n_s_bvElseID, __pyx_k_bvElseID, sizeof(__pyx_k_bvElseID), 0, 0, 1, 1},
{&__pyx_n_s_bvID, __pyx_k_bvID, sizeof(__pyx_k_bvID), 0, 0, 1, 1},
{&__pyx_n_s_bvID1, __pyx_k_bvID1, sizeof(__pyx_k_bvID1), 0, 0, 1, 1},
{&__pyx_n_s_bvID2, __pyx_k_bvID2, sizeof(__pyx_k_bvID2), 0, 0, 1, 1},
{&__pyx_n_s_bvResultID, __pyx_k_bvResultID, sizeof(__pyx_k_bvResultID), 0, 0, 1, 1},
{&__pyx_n_s_bvThenID, __pyx_k_bvThenID, sizeof(__pyx_k_bvThenID), 0, 0, 1, 1},
{&__pyx_n_s_bvWidth, __pyx_k_bvWidth, sizeof(__pyx_k_bvWidth), 0, 0, 1, 1},
{&__pyx_n_s_bv_addition, __pyx_k_bv_addition, sizeof(__pyx_k_bv_addition), 0, 0, 1, 1},
{&__pyx_n_s_bv_and, __pyx_k_bv_and, sizeof(__pyx_k_bv_and), 0, 0, 1, 1},
{&__pyx_n_s_bv_bitblast, __pyx_k_bv_bitblast, sizeof(__pyx_k_bv_bitblast), 0, 0, 1, 1},
{&__pyx_n_s_bv_concat, __pyx_k_bv_concat, sizeof(__pyx_k_bv_concat), 0, 0, 1, 1},
{&__pyx_n_s_bv_divide, __pyx_k_bv_divide, sizeof(__pyx_k_bv_divide), 0, 0, 1, 1},
{&__pyx_n_s_bv_ite, __pyx_k_bv_ite, sizeof(__pyx_k_bv_ite), 0, 0, 1, 1},
{&__pyx_n_s_bv_max, __pyx_k_bv_max, sizeof(__pyx_k_bv_max), 0, 0, 1, 1},
{&__pyx_n_s_bv_min, __pyx_k_bv_min, sizeof(__pyx_k_bv_min), 0, 0, 1, 1},
{&__pyx_n_s_bv_multiply, __pyx_k_bv_multiply, sizeof(__pyx_k_bv_multiply), 0, 0, 1, 1},
{&__pyx_n_s_bv_nand, __pyx_k_bv_nand, sizeof(__pyx_k_bv_nand), 0, 0, 1, 1},
{&__pyx_n_s_bv_nor, __pyx_k_bv_nor, sizeof(__pyx_k_bv_nor), 0, 0, 1, 1},
{&__pyx_n_s_bv_not, __pyx_k_bv_not, sizeof(__pyx_k_bv_not), 0, 0, 1, 1},
{&__pyx_n_s_bv_or, __pyx_k_bv_or, sizeof(__pyx_k_bv_or), 0, 0, 1, 1},
{&__pyx_n_s_bv_popcount, __pyx_k_bv_popcount, sizeof(__pyx_k_bv_popcount), 0, 0, 1, 1},
{&__pyx_n_s_bv_slice, __pyx_k_bv_slice, sizeof(__pyx_k_bv_slice), 0, 0, 1, 1},
{&__pyx_n_s_bv_subtraction, __pyx_k_bv_subtraction, sizeof(__pyx_k_bv_subtraction), 0, 0, 1, 1},
{&__pyx_n_s_bv_unary, __pyx_k_bv_unary, sizeof(__pyx_k_bv_unary), 0, 0, 1, 1},
{&__pyx_n_s_bv_width, __pyx_k_bv_width, sizeof(__pyx_k_bv_width), 0, 0, 1, 1},
{&__pyx_n_s_bv_xnor, __pyx_k_bv_xnor, sizeof(__pyx_k_bv_xnor), 0, 0, 1, 1},
{&__pyx_n_s_bv_xor, __pyx_k_bv_xor, sizeof(__pyx_k_bv_xor), 0, 0, 1, 1},
{&__pyx_n_s_bvaID, __pyx_k_bvaID, sizeof(__pyx_k_bvaID), 0, 0, 1, 1},
{&__pyx_n_s_bvbID, __pyx_k_bvbID, sizeof(__pyx_k_bvbID), 0, 0, 1, 1},
{&__pyx_n_s_clear, __pyx_k_clear, sizeof(__pyx_k_clear), 0, 0, 1, 1},
{&__pyx_n_s_clearOptimizationObjectives, __pyx_k_clearOptimizationObjectives, sizeof(__pyx_k_clearOptimizationObjectives), 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_coefficients, __pyx_k_coefficients, sizeof(__pyx_k_coefficients), 0, 0, 1, 1},
{&__pyx_n_s_compareID, __pyx_k_compareID, sizeof(__pyx_k_compareID), 0, 0, 1, 1},
{&__pyx_n_s_condition_lit, __pyx_k_condition_lit, sizeof(__pyx_k_condition_lit), 0, 0, 1, 1},
{&__pyx_n_s_constval, __pyx_k_constval, sizeof(__pyx_k_constval), 0, 0, 1, 1},
{&__pyx_n_s_createFlowRouting, __pyx_k_createFlowRouting, sizeof(__pyx_k_createFlowRouting), 0, 0, 1, 1},
{&__pyx_n_s_decidable, __pyx_k_decidable, sizeof(__pyx_k_decidable), 0, 0, 1, 1},
{&__pyx_n_s_deleteSolver, __pyx_k_deleteSolver, sizeof(__pyx_k_deleteSolver), 0, 0, 1, 1},
{&__pyx_n_s_destNode, __pyx_k_destNode, sizeof(__pyx_k_destNode), 0, 0, 1, 1},
{&__pyx_n_s_disablePreprocessing, __pyx_k_disablePreprocessing, sizeof(__pyx_k_disablePreprocessing), 0, 0, 1, 1},
{&__pyx_n_s_disabledEdge, __pyx_k_disabledEdge, sizeof(__pyx_k_disabledEdge), 0, 0, 1, 1},
{&__pyx_n_s_disallowLiteralSimplification, __pyx_k_disallowLiteralSimplification, sizeof(__pyx_k_disallowLiteralSimplification), 0, 0, 1, 1},
{&__pyx_n_s_dist, __pyx_k_dist, sizeof(__pyx_k_dist), 0, 0, 1, 1},
{&__pyx_n_s_edgeLit, __pyx_k_edgeLit, sizeof(__pyx_k_edgeLit), 0, 0, 1, 1},
{&__pyx_n_s_edge_lits, __pyx_k_edge_lits, sizeof(__pyx_k_edge_lits), 0, 0, 1, 1},
{&__pyx_n_s_edges, __pyx_k_edges, sizeof(__pyx_k_edges), 0, 0, 1, 1},
{&__pyx_n_s_enforceEdgeAssignment, __pyx_k_enforceEdgeAssignment, sizeof(__pyx_k_enforceEdgeAssignment), 0, 0, 1, 1},
{&__pyx_n_s_filename, __pyx_k_filename, sizeof(__pyx_k_filename), 0, 0, 1, 1},
{&__pyx_n_s_first_args, __pyx_k_first_args, sizeof(__pyx_k_first_args), 0, 0, 1, 1},
{&__pyx_n_s_flushPB, __pyx_k_flushPB, sizeof(__pyx_k_flushPB), 0, 0, 1, 1},
{&__pyx_n_s_from, __pyx_k_from, sizeof(__pyx_k_from), 0, 0, 1, 1},
{&__pyx_n_s_getConflictClause, __pyx_k_getConflictClause, sizeof(__pyx_k_getConflictClause), 0, 0, 1, 1},
{&__pyx_n_s_getDecisionPolarity, __pyx_k_getDecisionPolarity, sizeof(__pyx_k_getDecisionPolarity), 0, 0, 1, 1},
{&__pyx_n_s_getDecisionPriority, __pyx_k_getDecisionPriority, sizeof(__pyx_k_getDecisionPriority), 0, 0, 1, 1},
{&__pyx_n_s_getMaximumValue, __pyx_k_getMaximumValue, sizeof(__pyx_k_getMaximumValue), 0, 0, 1, 1},
{&__pyx_n_s_getModel_AcyclicEdgeFlow, __pyx_k_getModel_AcyclicEdgeFlow, sizeof(__pyx_k_getModel_AcyclicEdgeFlow), 0, 0, 1, 1},
{&__pyx_n_s_getModel_BV, __pyx_k_getModel_BV, sizeof(__pyx_k_getModel_BV), 0, 0, 1, 1},
{&__pyx_n_s_getModel_EdgeFlow, __pyx_k_getModel_EdgeFlow, sizeof(__pyx_k_getModel_EdgeFlow), 0, 0, 1, 1},
{&__pyx_n_s_getModel_Literal, __pyx_k_getModel_Literal, sizeof(__pyx_k_getModel_Literal), 0, 0, 1, 1},
{&__pyx_n_s_getModel_MaxFlow, __pyx_k_getModel_MaxFlow, sizeof(__pyx_k_getModel_MaxFlow), 0, 0, 1, 1},
{&__pyx_n_s_getModel_MinimumSpanningTreeWeig, __pyx_k_getModel_MinimumSpanningTreeWeig, sizeof(__pyx_k_getModel_MinimumSpanningTreeWeig), 0, 0, 1, 1},
{&__pyx_n_s_getModel_Path_EdgeLits, __pyx_k_getModel_Path_EdgeLits, sizeof(__pyx_k_getModel_Path_EdgeLits), 0, 0, 1, 1},
{&__pyx_n_s_getModel_Path_EdgeLits_Length, __pyx_k_getModel_Path_EdgeLits_Length, sizeof(__pyx_k_getModel_Path_EdgeLits_Length), 0, 0, 1, 1},
{&__pyx_n_s_getModel_Path_Nodes, __pyx_k_getModel_Path_Nodes, sizeof(__pyx_k_getModel_Path_Nodes), 0, 0, 1, 1},
{&__pyx_n_s_getModel_Path_Nodes_Length, __pyx_k_getModel_Path_Nodes_Length, sizeof(__pyx_k_getModel_Path_Nodes_Length), 0, 0, 1, 1},
{&__pyx_n_s_getVersion, __pyx_k_getVersion, sizeof(__pyx_k_getVersion), 0, 0, 1, 1},
{&__pyx_n_s_graph_setAssignEdgesToWeight, __pyx_k_graph_setAssignEdgesToWeight, sizeof(__pyx_k_graph_setAssignEdgesToWeight), 0, 0, 1, 1},
{&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
{&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
{&__pyx_n_s_initBVTheory, __pyx_k_initBVTheory, sizeof(__pyx_k_initBVTheory), 0, 0, 1, 1},
{&__pyx_n_s_initializer, __pyx_k_initializer, sizeof(__pyx_k_initializer), 0, 0, 1, 1},
{&__pyx_n_s_isDecisionVar, __pyx_k_isDecisionVar, sizeof(__pyx_k_isDecisionVar), 0, 0, 1, 1},
{&__pyx_n_s_lastSolutionWasOptimal, __pyx_k_lastSolutionWasOptimal, sizeof(__pyx_k_lastSolutionWasOptimal), 0, 0, 1, 1},
{&__pyx_n_s_lit, __pyx_k_lit, sizeof(__pyx_k_lit), 0, 0, 1, 1},
{&__pyx_n_s_lit1, __pyx_k_lit1, sizeof(__pyx_k_lit1), 0, 0, 1, 1},
{&__pyx_n_s_lit2, __pyx_k_lit2, sizeof(__pyx_k_lit2), 0, 0, 1, 1},
{&__pyx_n_s_lit3, __pyx_k_lit3, sizeof(__pyx_k_lit3), 0, 0, 1, 1},
{&__pyx_n_s_literals, __pyx_k_literals, sizeof(__pyx_k_literals), 0, 0, 1, 1},
{&__pyx_n_s_lits, __pyx_k_lits, sizeof(__pyx_k_lits), 0, 0, 1, 1},
{&__pyx_n_s_loadGNF, __pyx_k_loadGNF, sizeof(__pyx_k_loadGNF), 0, 0, 1, 1},
{&__pyx_n_s_lower, __pyx_k_lower, sizeof(__pyx_k_lower), 0, 0, 1, 1},
{&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
{&__pyx_n_s_max_store_size, __pyx_k_max_store_size, sizeof(__pyx_k_max_store_size), 0, 0, 1, 1},
{&__pyx_n_s_maxflowLit, __pyx_k_maxflowLit, sizeof(__pyx_k_maxflowLit), 0, 0, 1, 1},
{&__pyx_n_s_maxflow_literal, __pyx_k_maxflow_literal, sizeof(__pyx_k_maxflow_literal), 0, 0, 1, 1},
{&__pyx_n_s_maximizeBV, __pyx_k_maximizeBV, sizeof(__pyx_k_maximizeBV), 0, 0, 1, 1},
{&__pyx_n_s_maximizeLits, __pyx_k_maximizeLits, sizeof(__pyx_k_maximizeLits), 0, 0, 1, 1},
{&__pyx_n_s_maximizeWeightedLits, __pyx_k_maximizeWeightedLits, sizeof(__pyx_k_maximizeWeightedLits), 0, 0, 1, 1},
{&__pyx_n_s_maximumFlow_geq, __pyx_k_maximumFlow_geq, sizeof(__pyx_k_maximumFlow_geq), 0, 0, 1, 1},
{&__pyx_n_s_maximumFlow_geq_bv, __pyx_k_maximumFlow_geq_bv, sizeof(__pyx_k_maximumFlow_geq_bv), 0, 0, 1, 1},
{&__pyx_n_s_maximumFlow_gt, __pyx_k_maximumFlow_gt, sizeof(__pyx_k_maximumFlow_gt), 0, 0, 1, 1},
{&__pyx_n_s_maximumFlow_gt_bv, __pyx_k_maximumFlow_gt_bv, sizeof(__pyx_k_maximumFlow_gt_bv), 0, 0, 1, 1},
{&__pyx_n_s_minimizeBV, __pyx_k_minimizeBV, sizeof(__pyx_k_minimizeBV), 0, 0, 1, 1},
{&__pyx_n_s_minimizeConflictClause, __pyx_k_minimizeConflictClause, sizeof(__pyx_k_minimizeConflictClause), 0, 0, 1, 1},
{&__pyx_n_s_minimizeLits, __pyx_k_minimizeLits, sizeof(__pyx_k_minimizeLits), 0, 0, 1, 1},
{&__pyx_n_s_minimizeUnsatCore, __pyx_k_minimizeUnsatCore, sizeof(__pyx_k_minimizeUnsatCore), 0, 0, 1, 1},
{&__pyx_n_s_minimizeWeightedLits, __pyx_k_minimizeWeightedLits, sizeof(__pyx_k_minimizeWeightedLits), 0, 0, 1, 1},
{&__pyx_n_s_minimumSpanningTree_leq, __pyx_k_minimumSpanningTree_leq, sizeof(__pyx_k_minimumSpanningTree_leq), 0, 0, 1, 1},
{&__pyx_n_s_minimumSpanningTree_lt, __pyx_k_minimumSpanningTree_lt, sizeof(__pyx_k_minimumSpanningTree_lt), 0, 0, 1, 1},
{&__pyx_n_s_monosat_monosat_p, __pyx_k_monosat_monosat_p, sizeof(__pyx_k_monosat_monosat_p), 0, 0, 1, 1},
{&__pyx_kp_s_monosat_monosat_p_pyx, __pyx_k_monosat_monosat_p_pyx, sizeof(__pyx_k_monosat_monosat_p_pyx), 0, 0, 1, 0},
{&__pyx_n_s_nBitvectors, __pyx_k_nBitvectors, sizeof(__pyx_k_nBitvectors), 0, 0, 1, 1},
{&__pyx_n_s_nClauses, __pyx_k_nClauses, sizeof(__pyx_k_nClauses), 0, 0, 1, 1},
{&__pyx_n_s_nEdges, __pyx_k_nEdges, sizeof(__pyx_k_nEdges), 0, 0, 1, 1},
{&__pyx_n_s_nNodes, __pyx_k_nNodes, sizeof(__pyx_k_nNodes), 0, 0, 1, 1},
{&__pyx_n_s_nVars, __pyx_k_nVars, sizeof(__pyx_k_nVars), 0, 0, 1, 1},
{&__pyx_n_s_n_args, __pyx_k_n_args, sizeof(__pyx_k_n_args), 0, 0, 1, 1},
{&__pyx_n_s_n_assumptions, __pyx_k_n_assumptions, sizeof(__pyx_k_n_assumptions), 0, 0, 1, 1},
{&__pyx_n_s_n_bits, __pyx_k_n_bits, sizeof(__pyx_k_n_bits), 0, 0, 1, 1},
{&__pyx_n_s_n_edges, __pyx_k_n_edges, sizeof(__pyx_k_n_edges), 0, 0, 1, 1},
{&__pyx_n_s_n_lits, __pyx_k_n_lits, sizeof(__pyx_k_n_lits), 0, 0, 1, 1},
{&__pyx_n_s_n_members, __pyx_k_n_members, sizeof(__pyx_k_n_members), 0, 0, 1, 1},
{&__pyx_n_s_n_pairs, __pyx_k_n_pairs, sizeof(__pyx_k_n_pairs), 0, 0, 1, 1},
{&__pyx_n_s_n_vars, __pyx_k_n_vars, sizeof(__pyx_k_n_vars), 0, 0, 1, 1},
{&__pyx_n_s_newBVComparison_bv_geq, __pyx_k_newBVComparison_bv_geq, sizeof(__pyx_k_newBVComparison_bv_geq), 0, 0, 1, 1},
{&__pyx_n_s_newBVComparison_bv_gt, __pyx_k_newBVComparison_bv_gt, sizeof(__pyx_k_newBVComparison_bv_gt), 0, 0, 1, 1},
{&__pyx_n_s_newBVComparison_bv_leq, __pyx_k_newBVComparison_bv_leq, sizeof(__pyx_k_newBVComparison_bv_leq), 0, 0, 1, 1},
{&__pyx_n_s_newBVComparison_bv_lt, __pyx_k_newBVComparison_bv_lt, sizeof(__pyx_k_newBVComparison_bv_lt), 0, 0, 1, 1},
{&__pyx_n_s_newBVComparison_const_geq, __pyx_k_newBVComparison_const_geq, sizeof(__pyx_k_newBVComparison_const_geq), 0, 0, 1, 1},
{&__pyx_n_s_newBVComparison_const_gt, __pyx_k_newBVComparison_const_gt, sizeof(__pyx_k_newBVComparison_const_gt), 0, 0, 1, 1},
{&__pyx_n_s_newBVComparison_const_leq, __pyx_k_newBVComparison_const_leq, sizeof(__pyx_k_newBVComparison_const_leq), 0, 0, 1, 1},
{&__pyx_n_s_newBVComparison_const_lt, __pyx_k_newBVComparison_const_lt, sizeof(__pyx_k_newBVComparison_const_lt), 0, 0, 1, 1},
{&__pyx_n_s_newBitvector, __pyx_k_newBitvector, sizeof(__pyx_k_newBitvector), 0, 0, 1, 1},
{&__pyx_n_s_newBitvector_anon, __pyx_k_newBitvector_anon, sizeof(__pyx_k_newBitvector_anon), 0, 0, 1, 1},
{&__pyx_n_s_newBitvector_const, __pyx_k_newBitvector_const, sizeof(__pyx_k_newBitvector_const), 0, 0, 1, 1},
{&__pyx_n_s_newEdge, __pyx_k_newEdge, sizeof(__pyx_k_newEdge), 0, 0, 1, 1},
{&__pyx_n_s_newEdgeSet, __pyx_k_newEdgeSet, sizeof(__pyx_k_newEdgeSet), 0, 0, 1, 1},
{&__pyx_n_s_newEdge_bv, __pyx_k_newEdge_bv, sizeof(__pyx_k_newEdge_bv), 0, 0, 1, 1},
{&__pyx_n_s_newEdge_double, __pyx_k_newEdge_double, sizeof(__pyx_k_newEdge_double), 0, 0, 1, 1},
{&__pyx_n_s_newGraph, __pyx_k_newGraph, sizeof(__pyx_k_newGraph), 0, 0, 1, 1},
{&__pyx_n_s_newNode, __pyx_k_newNode, sizeof(__pyx_k_newNode), 0, 0, 1, 1},
{&__pyx_n_s_newSolver, __pyx_k_newSolver, sizeof(__pyx_k_newSolver), 0, 0, 1, 1},
{&__pyx_n_s_newSolver_arg, __pyx_k_newSolver_arg, sizeof(__pyx_k_newSolver_arg), 0, 0, 1, 1},
{&__pyx_n_s_newVar, __pyx_k_newVar, sizeof(__pyx_k_newVar), 0, 0, 1, 1},
{&__pyx_n_s_node, __pyx_k_node, sizeof(__pyx_k_node), 0, 0, 1, 1},
{&__pyx_n_s_nodeOnPath, __pyx_k_nodeOnPath, sizeof(__pyx_k_nodeOnPath), 0, 0, 1, 1},
{&__pyx_n_s_num_conflicts, __pyx_k_num_conflicts, sizeof(__pyx_k_num_conflicts), 0, 0, 1, 1},
{&__pyx_n_s_num_propagations, __pyx_k_num_propagations, sizeof(__pyx_k_num_propagations), 0, 0, 1, 1},
{&__pyx_n_s_onPath, __pyx_k_onPath, sizeof(__pyx_k_onPath), 0, 0, 1, 1},
{&__pyx_n_s_output, __pyx_k_output, sizeof(__pyx_k_output), 0, 0, 1, 1},
{&__pyx_n_s_priority, __pyx_k_priority, sizeof(__pyx_k_priority), 0, 0, 1, 1},
{&__pyx_n_s_py_result, __pyx_k_py_result, sizeof(__pyx_k_py_result), 0, 0, 1, 1},
{&__pyx_n_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 1},
{&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
{&__pyx_n_s_reach_lits, __pyx_k_reach_lits, sizeof(__pyx_k_reach_lits), 0, 0, 1, 1},
{&__pyx_n_s_reach_or_distance_literal, __pyx_k_reach_or_distance_literal, sizeof(__pyx_k_reach_or_distance_literal), 0, 0, 1, 1},
{&__pyx_n_s_reaches, __pyx_k_reaches, sizeof(__pyx_k_reaches), 0, 0, 1, 1},
{&__pyx_n_s_reachesBackward, __pyx_k_reachesBackward, sizeof(__pyx_k_reachesBackward), 0, 0, 1, 1},
{&__pyx_n_s_readGNF, __pyx_k_readGNF, sizeof(__pyx_k_readGNF), 0, 0, 1, 1},
{&__pyx_n_s_resultID, __pyx_k_resultID, sizeof(__pyx_k_resultID), 0, 0, 1, 1},
{&__pyx_n_s_rhs, __pyx_k_rhs, sizeof(__pyx_k_rhs), 0, 0, 1, 1},
{&__pyx_n_s_router, __pyx_k_router, sizeof(__pyx_k_router), 0, 0, 1, 1},
{&__pyx_n_s_second_args, __pyx_k_second_args, sizeof(__pyx_k_second_args), 0, 0, 1, 1},
{&__pyx_n_s_seconds, __pyx_k_seconds, sizeof(__pyx_k_seconds), 0, 0, 1, 1},
{&__pyx_n_s_setConflictLimit, __pyx_k_setConflictLimit, sizeof(__pyx_k_setConflictLimit), 0, 0, 1, 1},
{&__pyx_n_s_setDecisionPolarity, __pyx_k_setDecisionPolarity, sizeof(__pyx_k_setDecisionPolarity), 0, 0, 1, 1},
{&__pyx_n_s_setDecisionPriority, __pyx_k_setDecisionPriority, sizeof(__pyx_k_setDecisionPriority), 0, 0, 1, 1},
{&__pyx_n_s_setDecisionVar, __pyx_k_setDecisionVar, sizeof(__pyx_k_setDecisionVar), 0, 0, 1, 1},
{&__pyx_n_s_setOutputFile, __pyx_k_setOutputFile, sizeof(__pyx_k_setOutputFile), 0, 0, 1, 1},
{&__pyx_n_s_setPropagationLimit, __pyx_k_setPropagationLimit, sizeof(__pyx_k_setPropagationLimit), 0, 0, 1, 1},
{&__pyx_n_s_setTimeLimit, __pyx_k_setTimeLimit, sizeof(__pyx_k_setTimeLimit), 0, 0, 1, 1},
{&__pyx_n_s_shortestPathUnweighted_leq_const, __pyx_k_shortestPathUnweighted_leq_const, sizeof(__pyx_k_shortestPathUnweighted_leq_const), 0, 0, 1, 1},
{&__pyx_n_s_shortestPathUnweighted_lt_const, __pyx_k_shortestPathUnweighted_lt_const, sizeof(__pyx_k_shortestPathUnweighted_lt_const), 0, 0, 1, 1},
{&__pyx_n_s_shortestPath_leq_bv, __pyx_k_shortestPath_leq_bv, sizeof(__pyx_k_shortestPath_leq_bv), 0, 0, 1, 1},
{&__pyx_n_s_shortestPath_leq_const, __pyx_k_shortestPath_leq_const, sizeof(__pyx_k_shortestPath_leq_const), 0, 0, 1, 1},
{&__pyx_n_s_shortestPath_lt_bv, __pyx_k_shortestPath_lt_bv, sizeof(__pyx_k_shortestPath_lt_bv), 0, 0, 1, 1},
{&__pyx_n_s_shortestPath_lt_const, __pyx_k_shortestPath_lt_const, sizeof(__pyx_k_shortestPath_lt_const), 0, 0, 1, 1},
{&__pyx_n_s_sink, __pyx_k_sink, sizeof(__pyx_k_sink), 0, 0, 1, 1},
{&__pyx_n_s_solve, __pyx_k_solve, sizeof(__pyx_k_solve), 0, 0, 1, 1},
{&__pyx_n_s_solveAssumptions, __pyx_k_solveAssumptions, sizeof(__pyx_k_solveAssumptions), 0, 0, 1, 1},
{&__pyx_n_s_solveAssumptionsLimited, __pyx_k_solveAssumptionsLimited, sizeof(__pyx_k_solveAssumptionsLimited), 0, 0, 1, 1},
{&__pyx_n_s_solveLimited, __pyx_k_solveLimited, sizeof(__pyx_k_solveLimited), 0, 0, 1, 1},
{&__pyx_n_s_source, __pyx_k_source, sizeof(__pyx_k_source), 0, 0, 1, 1},
{&__pyx_n_s_sourceNode, __pyx_k_sourceNode, sizeof(__pyx_k_sourceNode), 0, 0, 1, 1},
{&__pyx_n_s_spanning_tree_literal, __pyx_k_spanning_tree_literal, sizeof(__pyx_k_spanning_tree_literal), 0, 0, 1, 1},
{&__pyx_n_s_steps, __pyx_k_steps, sizeof(__pyx_k_steps), 0, 0, 1, 1},
{&__pyx_n_s_store, __pyx_k_store, sizeof(__pyx_k_store), 0, 0, 1, 1},
{&__pyx_n_s_store_clause, __pyx_k_store_clause, sizeof(__pyx_k_store_clause), 0, 0, 1, 1},
{&__pyx_n_s_store_length, __pyx_k_store_length, sizeof(__pyx_k_store_length), 0, 0, 1, 1},
{&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
{&__pyx_n_s_to, __pyx_k_to, sizeof(__pyx_k_to), 0, 0, 1, 1},
{&__pyx_n_s_true_lit, __pyx_k_true_lit, sizeof(__pyx_k_true_lit), 0, 0, 1, 1},
{&__pyx_n_s_upper, __pyx_k_upper, sizeof(__pyx_k_upper), 0, 0, 1, 1},
{&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1},
{&__pyx_n_s_var, __pyx_k_var, sizeof(__pyx_k_var), 0, 0, 1, 1},
{&__pyx_n_s_vars, __pyx_k_vars, sizeof(__pyx_k_vars), 0, 0, 1, 1},
{&__pyx_n_s_weight, __pyx_k_weight, sizeof(__pyx_k_weight), 0, 0, 1, 1},
{&__pyx_n_s_weights, __pyx_k_weights, sizeof(__pyx_k_weights), 0, 0, 1, 1},
{0, 0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
__pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 797, __pyx_L1_error)
__pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(0, 1316, __pyx_L1_error)
return 0;
__pyx_L1_error:;
return -1;
}

static int __Pyx_InitCachedConstants(void) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

/* "monosat/monosat_p.pyx":151
*
*
* def acyclic_directed( S ,  G ):             # <<<<<<<<<<<<<<
*     """Cython signature: int acyclic_directed(void* S, void* G)"""
*
*/
__pyx_tuple_ = PyTuple_Pack(4, __pyx_n_s_S, __pyx_n_s_G, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 151, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple_);
__Pyx_GIVEREF(__pyx_tuple_);
__pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 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_monosat_monosat_p_pyx, __pyx_n_s_acyclic_directed, 151, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 151, __pyx_L1_error)

/* "monosat/monosat_p.pyx":161
*     return py_result
*
* def acyclic_undirected( S ,  G ):             # <<<<<<<<<<<<<<
*     """Cython signature: int acyclic_undirected(void* S, void* G)"""
*
*/
__pyx_tuple__3 = PyTuple_Pack(4, __pyx_n_s_S, __pyx_n_s_G, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 161, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__3);
__Pyx_GIVEREF(__pyx_tuple__3);
__pyx_codeobj__4 = (PyObject*)__Pyx_PyCode_New(2, 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_monosat_monosat_p_pyx, __pyx_n_s_acyclic_undirected, 161, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__4)) __PYX_ERR(0, 161, __pyx_L1_error)

/* "monosat/monosat_p.pyx":171
*     return py_result
*
* def addBinaryClause( S ,  lit1 ,  lit2 ):             # <<<<<<<<<<<<<<
*     """Cython signature: bint addBinaryClause(void* S, int lit1, int lit2)"""
*
*/
__pyx_tuple__5 = PyTuple_Pack(5, __pyx_n_s_S, __pyx_n_s_lit1, __pyx_n_s_lit2, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 171, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__5);
__Pyx_GIVEREF(__pyx_tuple__5);
__pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 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_monosat_monosat_p_pyx, __pyx_n_s_addBinaryClause, 171, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 171, __pyx_L1_error)

/* "monosat/monosat_p.pyx":183
*     return py_result
*
* def addBinaryClauses( S ,  first_args ,  second_args ,  n_pairs ):             # <<<<<<<<<<<<<<
*     """Cython signature: void addBinaryClauses(void* S, int* first_args, int* second_args, int n_pairs)"""
*
*/
__pyx_tuple__7 = PyTuple_Pack(6, __pyx_n_s_S, __pyx_n_s_first_args, __pyx_n_s_second_args, __pyx_n_s_n_pairs, __pyx_n_s_a, __pyx_n_s_b); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 183, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__7);
__Pyx_GIVEREF(__pyx_tuple__7);
__pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 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_monosat_monosat_p_pyx, __pyx_n_s_addBinaryClauses, 183, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 183, __pyx_L1_error)

/* "monosat/monosat_p.pyx":192
*     _addBinaryClauses_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int*>a.data.as_ints),(<int*>b.data.as_ints), (<int>n_pairs))
*
* def addClause( S ,  lits ,  n_lits ):             # <<<<<<<<<<<<<<
*     """Cython signature: bint addClause(void* S, int* lits, int n_lits)"""
*
*/
__pyx_tuple__9 = PyTuple_Pack(6, __pyx_n_s_S, __pyx_n_s_lits, __pyx_n_s_n_lits, __pyx_n_s_a, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 192, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__9);
__Pyx_GIVEREF(__pyx_tuple__9);
__pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__9, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_addClause, 192, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 192, __pyx_L1_error)

/* "monosat/monosat_p.pyx":204
*     return py_result
*
* def addRoutingNet( S ,  G ,  router ,  disabledEdge ,  n_members ,  edge_lits ,  reach_lits ):             # <<<<<<<<<<<<<<
*     """Cython signature: void addRoutingNet(void* S, void* G, void* router, int disabledEdge, int n_members, int* edge_lits, int* reach_lits)"""
*
*/
__pyx_tuple__11 = PyTuple_Pack(9, __pyx_n_s_S, __pyx_n_s_G, __pyx_n_s_router, __pyx_n_s_disabledEdge, __pyx_n_s_n_members, __pyx_n_s_edge_lits, __pyx_n_s_reach_lits, __pyx_n_s_a, __pyx_n_s_b); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 204, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__11);
__Pyx_GIVEREF(__pyx_tuple__11);
__pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(7, 0, 9, 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_monosat_monosat_p_pyx, __pyx_n_s_addRoutingNet, 204, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 204, __pyx_L1_error)

/* "monosat/monosat_p.pyx":219
*     _addRoutingNet_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<void*>router), (<int>disabledEdge), (<int>n_members), (<int*>a.data.as_ints), (<int*>b.data.as_ints))
*
* def addTertiaryClause( S ,  lit1 ,  lit2 ,  lit3 ):             # <<<<<<<<<<<<<<
*     """Cython signature: bint addTertiaryClause(void* S, int lit1, int lit2, int lit3)"""
*
*/
__pyx_tuple__13 = PyTuple_Pack(6, __pyx_n_s_S, __pyx_n_s_lit1, __pyx_n_s_lit2, __pyx_n_s_lit3, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 219, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__13);
__Pyx_GIVEREF(__pyx_tuple__13);
__pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__13, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_addTertiaryClause, 219, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 219, __pyx_L1_error)

/* "monosat/monosat_p.pyx":233
*     return py_result
*
* def addUnitClause( S ,  lit ):             # <<<<<<<<<<<<<<
*     """Cython signature: bint addUnitClause(void* S, int lit)"""
*
*/
__pyx_tuple__15 = PyTuple_Pack(4, __pyx_n_s_S, __pyx_n_s_lit, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 233, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__15);
__Pyx_GIVEREF(__pyx_tuple__15);
__pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_addUnitClause, 233, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 233, __pyx_L1_error)

/* "monosat/monosat_p.pyx":243
*     return py_result
*
* def assertPB_eq( S ,  rhs ,  n_args ,  literals ,  coefficients ):             # <<<<<<<<<<<<<<
*     """Cython signature: void assertPB_eq(void* S, int rhs, int n_args, int* literals, int* coefficients)"""
*
*/
__pyx_tuple__17 = PyTuple_Pack(7, __pyx_n_s_S, __pyx_n_s_rhs, __pyx_n_s_n_args, __pyx_n_s_literals, __pyx_n_s_coefficients, __pyx_n_s_a, __pyx_n_s_b); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 243, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__17);
__Pyx_GIVEREF(__pyx_tuple__17);
__pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__17, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_assertPB_eq, 243, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(0, 243, __pyx_L1_error)

/* "monosat/monosat_p.pyx":258
*     _assertPB_eq_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>rhs), (<int>n_args), (<int*>a.data.as_ints), (<int*>b.data.as_ints))
*
* def assertPB_geq( S ,  rhs ,  n_args ,  literals ,  coefficients ):             # <<<<<<<<<<<<<<
*     """Cython signature: void assertPB_geq(void* S, int rhs, int n_args, int* literals, int* coefficients)"""
*
*/
__pyx_tuple__19 = PyTuple_Pack(7, __pyx_n_s_S, __pyx_n_s_rhs, __pyx_n_s_n_args, __pyx_n_s_literals, __pyx_n_s_coefficients, __pyx_n_s_a, __pyx_n_s_b); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 258, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__19);
__Pyx_GIVEREF(__pyx_tuple__19);
__pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_assertPB_geq, 258, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 258, __pyx_L1_error)

/* "monosat/monosat_p.pyx":273
*     _assertPB_geq_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>rhs), (<int>n_args), (<int*>a.data.as_ints), (<int*>b.data.as_ints))
*
* def assertPB_gt( S ,  rhs ,  n_args ,  literals ,  coefficients ):             # <<<<<<<<<<<<<<
*     """Cython signature: void assertPB_gt(void* S, int rhs, int n_args, int* literals, int* coefficients)"""
*
*/
__pyx_tuple__21 = PyTuple_Pack(7, __pyx_n_s_S, __pyx_n_s_rhs, __pyx_n_s_n_args, __pyx_n_s_literals, __pyx_n_s_coefficients, __pyx_n_s_a, __pyx_n_s_b); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 273, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__21);
__Pyx_GIVEREF(__pyx_tuple__21);
__pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_assertPB_gt, 273, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 273, __pyx_L1_error)

/* "monosat/monosat_p.pyx":289
*     _assertPB_gt_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>rhs), (<int>n_args), (<int*>a.data.as_ints), (<int*>b.data.as_ints))
*
* def assertPB_leq( S ,  rhs ,  n_args ,  literals ,  coefficients ):             # <<<<<<<<<<<<<<
*     """Cython signature: void assertPB_leq(void* S, int rhs, int n_args, int* literals, int* coefficients)"""
*
*/
__pyx_tuple__23 = PyTuple_Pack(7, __pyx_n_s_S, __pyx_n_s_rhs, __pyx_n_s_n_args, __pyx_n_s_literals, __pyx_n_s_coefficients, __pyx_n_s_a, __pyx_n_s_b); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 289, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__23);
__Pyx_GIVEREF(__pyx_tuple__23);
__pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_assertPB_leq, 289, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 289, __pyx_L1_error)

/* "monosat/monosat_p.pyx":305
*     _assertPB_leq_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>rhs), (<int>n_args),  (<int*>a.data.as_ints), (<int*>b.data.as_ints))
*
* def assertPB_lt( S ,  rhs ,  n_args ,  literals ,  coefficients ):             # <<<<<<<<<<<<<<
*     """Cython signature: void assertPB_lt(void* S, int rhs, int n_args, int* literals, int* coefficients)"""
*
*/
__pyx_tuple__25 = PyTuple_Pack(7, __pyx_n_s_S, __pyx_n_s_rhs, __pyx_n_s_n_args, __pyx_n_s_literals, __pyx_n_s_coefficients, __pyx_n_s_a, __pyx_n_s_b); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 305, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__25);
__Pyx_GIVEREF(__pyx_tuple__25);
__pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 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_monosat_monosat_p_pyx, __pyx_n_s_assertPB_lt, 305, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 305, __pyx_L1_error)

/* "monosat/monosat_p.pyx":321
*     _assertPB_lt_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>rhs), (<int>n_args), (<int*>a.data.as_ints), (<int*>b.data.as_ints))
*
* def at_most_one( S ,  vars ,  n_vars ):             # <<<<<<<<<<<<<<
*     """Cython signature: void at_most_one(void* S, int* vars, int n_vars)"""
*
*/
__pyx_tuple__27 = PyTuple_Pack(4, __pyx_n_s_S, __pyx_n_s_vars, __pyx_n_s_n_vars, __pyx_n_s_a); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 321, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__27);
__Pyx_GIVEREF(__pyx_tuple__27);
__pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_at_most_one, 321, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 321, __pyx_L1_error)

/* "monosat/monosat_p.pyx":331
*     _at_most_one_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)),  (<int*>a.data.as_ints), (<int>n_vars))
*
* def backtrack( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: void backtrack(void* S)"""
*
*/
__pyx_tuple__29 = PyTuple_Pack(1, __pyx_n_s_S); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 331, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__29);
__Pyx_GIVEREF(__pyx_tuple__29);
__pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_backtrack, 331, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 331, __pyx_L1_error)

/* "monosat/monosat_p.pyx":337
*     _backtrack_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))
*
* def bv_addition( S ,  bv ,  bvID1 ,  bvID2 ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_addition(void* S, void* bv, int bvID1, int bvID2, int resultID)"""
*
*/
__pyx_tuple__31 = PyTuple_Pack(5, __pyx_n_s_S, __pyx_n_s_bv, __pyx_n_s_bvID1, __pyx_n_s_bvID2, __pyx_n_s_resultID); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 337, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__31);
__Pyx_GIVEREF(__pyx_tuple__31);
__pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_bv_addition, 337, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(0, 337, __pyx_L1_error)

/* "monosat/monosat_p.pyx":351
*     _bv_addition_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID1), (<int>bvID2), (<int>resultID))
*
* def bv_and( S ,  bv ,  bvaID ,  bvbID ,  bvResultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_and(void* S, void* bv, int bvaID, int bvbID, int bvResultID)"""
*
*/
__pyx_tuple__33 = PyTuple_Pack(5, __pyx_n_s_S, __pyx_n_s_bv, __pyx_n_s_bvaID, __pyx_n_s_bvbID, __pyx_n_s_bvResultID); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 351, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__33);
__Pyx_GIVEREF(__pyx_tuple__33);
__pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_bv_and, 351, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 351, __pyx_L1_error)

/* "monosat/monosat_p.pyx":365
*     _bv_and_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvaID), (<int>bvbID), (<int>bvResultID))
*
* def bv_bitblast( S ,  bv ,  bvID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_bitblast(void* S, void* bv, int bvID)"""
*
*/
__pyx_tuple__35 = PyTuple_Pack(3, __pyx_n_s_S, __pyx_n_s_bv, __pyx_n_s_bvID); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 365, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__35);
__Pyx_GIVEREF(__pyx_tuple__35);
__pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_bv_bitblast, 365, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 365, __pyx_L1_error)

/* "monosat/monosat_p.pyx":375
*     _bv_bitblast_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID))
*
* def bv_concat( S ,  bv ,  aID ,  bID ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_concat(void* S, void* bv, int aID, int bID, int resultID)"""
*
*/
__pyx_tuple__37 = PyTuple_Pack(5, __pyx_n_s_S, __pyx_n_s_bv, __pyx_n_s_aID, __pyx_n_s_bID, __pyx_n_s_resultID); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 375, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__37);
__Pyx_GIVEREF(__pyx_tuple__37);
__pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_bv_concat, 375, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 375, __pyx_L1_error)

/* "monosat/monosat_p.pyx":389
*     _bv_concat_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>aID), (<int>bID), (<int>resultID))
*
* def bv_divide( S ,  bv ,  bvID1 ,  bvID2 ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_divide(void* S, void* bv, int bvID1, int bvID2, int resultID)"""
*
*/
__pyx_tuple__39 = PyTuple_Pack(5, __pyx_n_s_S, __pyx_n_s_bv, __pyx_n_s_bvID1, __pyx_n_s_bvID2, __pyx_n_s_resultID); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 389, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__39);
__Pyx_GIVEREF(__pyx_tuple__39);
__pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_bv_divide, 389, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 389, __pyx_L1_error)

/* "monosat/monosat_p.pyx":403
*     _bv_divide_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID1), (<int>bvID2), (<int>resultID))
*
* def bv_ite( S ,  bv ,  condition_lit ,  bvThenID ,  bvElseID ,  bvResultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_ite(void* S, void* bv, int condition_lit, int bvThenID, int bvElseID, int bvResultID)"""
*
*/
__pyx_tuple__41 = PyTuple_Pack(6, __pyx_n_s_S, __pyx_n_s_bv, __pyx_n_s_condition_lit, __pyx_n_s_bvThenID, __pyx_n_s_bvElseID, __pyx_n_s_bvResultID); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 403, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__41);
__Pyx_GIVEREF(__pyx_tuple__41);
__pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_bv_ite, 403, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 403, __pyx_L1_error)

/* "monosat/monosat_p.pyx":419
*     _bv_ite_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>condition_lit), (<int>bvThenID), (<int>bvElseID), (<int>bvResultID))
*
* def bv_max( S ,  bv ,  args ,  n_args ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_max(void* S, void* bv, int* args, int n_args, int resultID)"""
*
*/
__pyx_tuple__43 = PyTuple_Pack(6, __pyx_n_s_S, __pyx_n_s_bv, __pyx_n_s_args, __pyx_n_s_n_args, __pyx_n_s_resultID, __pyx_n_s_a); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 419, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__43);
__Pyx_GIVEREF(__pyx_tuple__43);
__pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(5, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_bv_max, 419, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 419, __pyx_L1_error)

/* "monosat/monosat_p.pyx":433
*     _bv_max_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)),(<int*>a.data.as_ints), (<int>n_args), (<int>resultID))
*
* def bv_min( S ,  bv ,  args ,  n_args ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_min(void* S, void* bv, int* args, int n_args, int resultID)"""
*
*/
__pyx_tuple__45 = PyTuple_Pack(6, __pyx_n_s_S, __pyx_n_s_bv, __pyx_n_s_args, __pyx_n_s_n_args, __pyx_n_s_resultID, __pyx_n_s_a); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 433, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__45);
__Pyx_GIVEREF(__pyx_tuple__45);
__pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(5, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_bv_min, 433, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 433, __pyx_L1_error)

/* "monosat/monosat_p.pyx":447
*     _bv_min_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int*>a.data.as_ints), (<int>n_args), (<int>resultID))
*
* def bv_multiply( S ,  bv ,  bvID1 ,  bvID2 ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_multiply(void* S, void* bv, int bvID1, int bvID2, int resultID)"""
*
*/
__pyx_tuple__47 = PyTuple_Pack(5, __pyx_n_s_S, __pyx_n_s_bv, __pyx_n_s_bvID1, __pyx_n_s_bvID2, __pyx_n_s_resultID); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 447, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__47);
__Pyx_GIVEREF(__pyx_tuple__47);
__pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_bv_multiply, 447, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 447, __pyx_L1_error)

/* "monosat/monosat_p.pyx":461
*     _bv_multiply_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID1), (<int>bvID2), (<int>resultID))
*
* def bv_nand( S ,  bv ,  bvaID ,  bvbID ,  bvResultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_nand(void* S, void* bv, int bvaID, int bvbID, int bvResultID)"""
*
*/
__pyx_tuple__49 = PyTuple_Pack(5, __pyx_n_s_S, __pyx_n_s_bv, __pyx_n_s_bvaID, __pyx_n_s_bvbID, __pyx_n_s_bvResultID); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 461, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__49);
__Pyx_GIVEREF(__pyx_tuple__49);
__pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_bv_nand, 461, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 461, __pyx_L1_error)

/* "monosat/monosat_p.pyx":475
*     _bv_nand_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvaID), (<int>bvbID), (<int>bvResultID))
*
* def bv_nor( S ,  bv ,  bvaID ,  bvbID ,  bvResultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_nor(void* S, void* bv, int bvaID, int bvbID, int bvResultID)"""
*
*/
__pyx_tuple__51 = PyTuple_Pack(5, __pyx_n_s_S, __pyx_n_s_bv, __pyx_n_s_bvaID, __pyx_n_s_bvbID, __pyx_n_s_bvResultID); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 475, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__51);
__Pyx_GIVEREF(__pyx_tuple__51);
__pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_bv_nor, 475, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 475, __pyx_L1_error)

/* "monosat/monosat_p.pyx":489
*     _bv_nor_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvaID), (<int>bvbID), (<int>bvResultID))
*
* def bv_not( S ,  bv ,  bvaID ,  bvResultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_not(void* S, void* bv, int bvaID, int bvResultID)"""
*
*/
__pyx_tuple__53 = PyTuple_Pack(4, __pyx_n_s_S, __pyx_n_s_bv, __pyx_n_s_bvaID, __pyx_n_s_bvResultID); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 489, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__53);
__Pyx_GIVEREF(__pyx_tuple__53);
__pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_bv_not, 489, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 489, __pyx_L1_error)

/* "monosat/monosat_p.pyx":501
*     _bv_not_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvaID), (<int>bvResultID))
*
* def bv_or( S ,  bv ,  bvaID ,  bvbID ,  bvResultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_or(void* S, void* bv, int bvaID, int bvbID, int bvResultID)"""
*
*/
__pyx_tuple__55 = PyTuple_Pack(5, __pyx_n_s_S, __pyx_n_s_bv, __pyx_n_s_bvaID, __pyx_n_s_bvbID, __pyx_n_s_bvResultID); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 501, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__55);
__Pyx_GIVEREF(__pyx_tuple__55);
__pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 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_monosat_monosat_p_pyx, __pyx_n_s_bv_or, 501, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 501, __pyx_L1_error)

/* "monosat/monosat_p.pyx":515
*     _bv_or_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvaID), (<int>bvbID), (<int>bvResultID))
*
* def bv_popcount( S ,  bv ,  args ,  n_args ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_popcount(void* S, void* bv, int* args, int n_args, int resultID)"""
*
*/
__pyx_tuple__57 = PyTuple_Pack(6, __pyx_n_s_S, __pyx_n_s_bv, __pyx_n_s_args, __pyx_n_s_n_args, __pyx_n_s_resultID, __pyx_n_s_a); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 515, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__57);
__Pyx_GIVEREF(__pyx_tuple__57);
__pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(5, 0, 6, 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_monosat_monosat_p_pyx, __pyx_n_s_bv_popcount, 515, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 515, __pyx_L1_error)

/* "monosat/monosat_p.pyx":529
*     _bv_popcount_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)),(<int*>a.data.as_ints), (<int>n_args), (<int>resultID))
*
* def bv_slice( S ,  bv ,  aID ,  lower ,  upper ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_slice(void* S, void* bv, int aID, int lower, int upper, int resultID)"""
*
*/
__pyx_tuple__59 = PyTuple_Pack(6, __pyx_n_s_S, __pyx_n_s_bv, __pyx_n_s_aID, __pyx_n_s_lower, __pyx_n_s_upper, __pyx_n_s_resultID); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 529, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__59);
__Pyx_GIVEREF(__pyx_tuple__59);
__pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(6, 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_monosat_monosat_p_pyx, __pyx_n_s_bv_slice, 529, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 529, __pyx_L1_error)

/* "monosat/monosat_p.pyx":545
*     _bv_slice_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>aID), (<int>lower), (<int>upper), (<int>resultID))
*
* def bv_subtraction( S ,  bv ,  bvID1 ,  bvID2 ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_subtraction(void* S, void* bv, int bvID1, int bvID2, int resultID)"""
*
*/
__pyx_tuple__61 = PyTuple_Pack(5, __pyx_n_s_S, __pyx_n_s_bv, __pyx_n_s_bvID1, __pyx_n_s_bvID2, __pyx_n_s_resultID); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 545, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__61);
__Pyx_GIVEREF(__pyx_tuple__61);
__pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 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_monosat_monosat_p_pyx, __pyx_n_s_bv_subtraction, 545, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 545, __pyx_L1_error)

/* "monosat/monosat_p.pyx":559
*     _bv_subtraction_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID1), (<int>bvID2), (<int>resultID))
*
* def bv_unary( S ,  bv ,  args ,  n_args ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_unary(void* S, void* bv, int* args, int n_args, int resultID)"""
*
*/
__pyx_tuple__63 = PyTuple_Pack(6, __pyx_n_s_S, __pyx_n_s_bv, __pyx_n_s_args, __pyx_n_s_n_args, __pyx_n_s_resultID, __pyx_n_s_a); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 559, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__63);
__Pyx_GIVEREF(__pyx_tuple__63);
__pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(5, 0, 6, 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_monosat_monosat_p_pyx, __pyx_n_s_bv_unary, 559, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 559, __pyx_L1_error)

/* "monosat/monosat_p.pyx":573
*     _bv_unary_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int*>a.data.as_ints), (<int>n_args), (<int>resultID))
*
* def bv_width( S ,  bv ,  bvID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int bv_width(void* S, void* bv, int bvID)"""
*
*/
__pyx_tuple__65 = PyTuple_Pack(5, __pyx_n_s_S, __pyx_n_s_bv, __pyx_n_s_bvID, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 573, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__65);
__Pyx_GIVEREF(__pyx_tuple__65);
__pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 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_monosat_monosat_p_pyx, __pyx_n_s_bv_width, 573, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(0, 573, __pyx_L1_error)

/* "monosat/monosat_p.pyx":585
*     return py_result
*
* def bv_xnor( S ,  bv ,  bvaID ,  bvbID ,  bvResultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_xnor(void* S, void* bv, int bvaID, int bvbID, int bvResultID)"""
*
*/
__pyx_tuple__67 = PyTuple_Pack(5, __pyx_n_s_S, __pyx_n_s_bv, __pyx_n_s_bvaID, __pyx_n_s_bvbID, __pyx_n_s_bvResultID); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 585, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__67);
__Pyx_GIVEREF(__pyx_tuple__67);
__pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(5, 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_monosat_monosat_p_pyx, __pyx_n_s_bv_xnor, 585, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(0, 585, __pyx_L1_error)

/* "monosat/monosat_p.pyx":599
*     _bv_xnor_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvaID), (<int>bvbID), (<int>bvResultID))
*
* def bv_xor( S ,  bv ,  bvaID ,  bvbID ,  bvResultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_xor(void* S, void* bv, int bvaID, int bvbID, int bvResultID)"""
*
*/
__pyx_tuple__69 = PyTuple_Pack(5, __pyx_n_s_S, __pyx_n_s_bv, __pyx_n_s_bvaID, __pyx_n_s_bvbID, __pyx_n_s_bvResultID); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 599, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__69);
__Pyx_GIVEREF(__pyx_tuple__69);
__pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 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_monosat_monosat_p_pyx, __pyx_n_s_bv_xor, 599, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(0, 599, __pyx_L1_error)

/* "monosat/monosat_p.pyx":613
*     _bv_xor_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvaID), (<int>bvbID), (<int>bvResultID))
*
* def clearOptimizationObjectives( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: void clearOptimizationObjectives(void* S)"""
*
*/
__pyx_tuple__71 = PyTuple_Pack(1, __pyx_n_s_S); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 613, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__71);
__Pyx_GIVEREF(__pyx_tuple__71);
__pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_monosat_monosat_p_pyx, __pyx_n_s_clearOptimizationObjectives, 613, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(0, 613, __pyx_L1_error)

/* "monosat/monosat_p.pyx":619
*     _clearOptimizationObjectives_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))
*
* def createFlowRouting( S ,  G ,  sourceNode ,  destNode ,  maxflowLit ):             # <<<<<<<<<<<<<<
*     """Cython signature: void* createFlowRouting(void* S, void* G, int sourceNode, int destNode, int maxflowLit)"""
*
*/
__pyx_tuple__73 = PyTuple_Pack(7, __pyx_n_s_S, __pyx_n_s_G, __pyx_n_s_sourceNode, __pyx_n_s_destNode, __pyx_n_s_maxflowLit, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 619, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__73);
__Pyx_GIVEREF(__pyx_tuple__73);
__pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 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_monosat_monosat_p_pyx, __pyx_n_s_createFlowRouting, 619, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(0, 619, __pyx_L1_error)

/* "monosat/monosat_p.pyx":635
*     return py_result
*
* def deleteSolver( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: void deleteSolver(void* S)"""
*
*/
__pyx_tuple__75 = PyTuple_Pack(1, __pyx_n_s_S); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 635, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__75);
__Pyx_GIVEREF(__pyx_tuple__75);
__pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_monosat_monosat_p_pyx, __pyx_n_s_deleteSolver, 635, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(0, 635, __pyx_L1_error)

/* "monosat/monosat_p.pyx":641
*     _deleteSolver_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))
*
* def disablePreprocessing( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: void disablePreprocessing(void* S)"""
*
*/
__pyx_tuple__77 = PyTuple_Pack(1, __pyx_n_s_S); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 641, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__77);
__Pyx_GIVEREF(__pyx_tuple__77);
__pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_monosat_monosat_p_pyx, __pyx_n_s_disablePreprocessing, 641, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(0, 641, __pyx_L1_error)

/* "monosat/monosat_p.pyx":647
*     _disablePreprocessing_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))
*
* def disallowLiteralSimplification( S ,  lit ):             # <<<<<<<<<<<<<<
*     """Cython signature: bint disallowLiteralSimplification(void* S, int lit)"""
*
*/
__pyx_tuple__79 = PyTuple_Pack(4, __pyx_n_s_S, __pyx_n_s_lit, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 647, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__79);
__Pyx_GIVEREF(__pyx_tuple__79);
__pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 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_monosat_monosat_p_pyx, __pyx_n_s_disallowLiteralSimplification, 647, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 647, __pyx_L1_error)

/* "monosat/monosat_p.pyx":657
*     return py_result
*
* def flushPB( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: void flushPB(void* S)"""
*
*/
__pyx_tuple__81 = PyTuple_Pack(1, __pyx_n_s_S); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 657, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__81);
__Pyx_GIVEREF(__pyx_tuple__81);
__pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_monosat_monosat_p_pyx, __pyx_n_s_flushPB, 657, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 657, __pyx_L1_error)

/* "monosat/monosat_p.pyx":664
*
*
* def getConflictClause( S ,  store_clause ,  max_store_size ):             # <<<<<<<<<<<<<<
*     """Cython signature: int getConflictClause(void* S, int* store_clause, int max_store_size)"""
*
*/
__pyx_tuple__83 = PyTuple_Pack(6, __pyx_n_s_S, __pyx_n_s_store_clause, __pyx_n_s_max_store_size, __pyx_n_s_a, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 664, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__83);
__Pyx_GIVEREF(__pyx_tuple__83);
__pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 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_monosat_monosat_p_pyx, __pyx_n_s_getConflictClause, 664, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(0, 664, __pyx_L1_error)

/* "monosat/monosat_p.pyx":676
*     return py_result
*
* def minimizeUnsatCore( S ,  assumptions ,  n_lits ):             # <<<<<<<<<<<<<<
*     """Cython signature: int minimizeUnsatCore(void* S, int* assumptions, int n_lits)"""
*
*/
__pyx_tuple__85 = PyTuple_Pack(6, __pyx_n_s_S, __pyx_n_s_assumptions, __pyx_n_s_n_lits, __pyx_n_s_a, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 676, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__85);
__Pyx_GIVEREF(__pyx_tuple__85);
__pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 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_monosat_monosat_p_pyx, __pyx_n_s_minimizeUnsatCore, 676, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(0, 676, __pyx_L1_error)

/* "monosat/monosat_p.pyx":688
*     return py_result
*
* def minimizeConflictClause( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: int minimizeConflictClause(void* S)"""
*     _minimizeConflictClause_monosat(<void*>pycapsule.PyCapsule_GetPointer(S,NULL));
*/
__pyx_tuple__87 = PyTuple_Pack(1, __pyx_n_s_S); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 688, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__87);
__Pyx_GIVEREF(__pyx_tuple__87);
__pyx_codeobj__88 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_monosat_monosat_p_pyx, __pyx_n_s_minimizeConflictClause, 688, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__88)) __PYX_ERR(0, 688, __pyx_L1_error)

/* "monosat/monosat_p.pyx":692
*     _minimizeConflictClause_monosat(<void*>pycapsule.PyCapsule_GetPointer(S,NULL));
*
* def getDecisionPolarity( S ,  v ):             # <<<<<<<<<<<<<<
*     """Cython signature: bint getDecisionPolarity(void* S, int v)"""
*
*/
__pyx_tuple__89 = PyTuple_Pack(4, __pyx_n_s_S, __pyx_n_s_v, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 692, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__89);
__Pyx_GIVEREF(__pyx_tuple__89);
__pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 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_monosat_monosat_p_pyx, __pyx_n_s_getDecisionPolarity, 692, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(0, 692, __pyx_L1_error)

/* "monosat/monosat_p.pyx":702
*     return py_result
*
* def getDecisionPriority( S ,  var ):             # <<<<<<<<<<<<<<
*     """Cython signature: int getDecisionPriority(void* S, int var)"""
*
*/
__pyx_tuple__91 = PyTuple_Pack(4, __pyx_n_s_S, __pyx_n_s_var, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 702, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__91);
__Pyx_GIVEREF(__pyx_tuple__91);
__pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 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_monosat_monosat_p_pyx, __pyx_n_s_getDecisionPriority, 702, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) __PYX_ERR(0, 702, __pyx_L1_error)

/* "monosat/monosat_p.pyx":712
*     return py_result
*
* def getModel_AcyclicEdgeFlow( S ,  G ,  maxflow_literal ,  edgeLit ):             # <<<<<<<<<<<<<<
*     """Cython signature: int64_t getModel_AcyclicEdgeFlow(void* S, void* G, int maxflow_literal, int edgeLit)"""
*
*/
__pyx_tuple__93 = PyTuple_Pack(6, __pyx_n_s_S, __pyx_n_s_G, __pyx_n_s_maxflow_literal, __pyx_n_s_edgeLit, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 712, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__93);
__Pyx_GIVEREF(__pyx_tuple__93);
__pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 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_monosat_monosat_p_pyx, __pyx_n_s_getModel_AcyclicEdgeFlow, 712, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) __PYX_ERR(0, 712, __pyx_L1_error)

/* "monosat/monosat_p.pyx":726
*     return py_result
*
* def getModel_BV( S ,  bv ,  bvID ,  getMaximumValue ):             # <<<<<<<<<<<<<<
*     """Cython signature: int64_t getModel_BV(void* S, void* bv, int bvID, bint getMaximumValue)"""
*
*/
__pyx_tuple__95 = PyTuple_Pack(6, __pyx_n_s_S, __pyx_n_s_bv, __pyx_n_s_bvID, __pyx_n_s_getMaximumValue, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 726, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__95);
__Pyx_GIVEREF(__pyx_tuple__95);
__pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 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_monosat_monosat_p_pyx, __pyx_n_s_getModel_BV, 726, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(0, 726, __pyx_L1_error)

/* "monosat/monosat_p.pyx":740
*     return py_result
*
* def getModel_EdgeFlow( S ,  G ,  maxflow_literal ,  edgeLit ):             # <<<<<<<<<<<<<<
*     """Cython signature: int64_t getModel_EdgeFlow(void* S, void* G, int maxflow_literal, int edgeLit)"""
*
*/
__pyx_tuple__97 = PyTuple_Pack(6, __pyx_n_s_S, __pyx_n_s_G, __pyx_n_s_maxflow_literal, __pyx_n_s_edgeLit, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 740, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__97);
__Pyx_GIVEREF(__pyx_tuple__97);
__pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 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_monosat_monosat_p_pyx, __pyx_n_s_getModel_EdgeFlow, 740, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__98)) __PYX_ERR(0, 740, __pyx_L1_error)

/* "monosat/monosat_p.pyx":754
*     return py_result
*
* def getModel_Literal( S ,  lit ):             # <<<<<<<<<<<<<<
*     """Cython signature: int getModel_Literal(void* S, int lit)"""
*
*/
__pyx_tuple__99 = PyTuple_Pack(4, __pyx_n_s_S, __pyx_n_s_lit, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(0, 754, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__99);
__Pyx_GIVEREF(__pyx_tuple__99);
__pyx_codeobj__100 = (PyObject*)__Pyx_PyCode_New(2, 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_monosat_monosat_p_pyx, __pyx_n_s_getModel_Literal, 754, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__100)) __PYX_ERR(0, 754, __pyx_L1_error)

/* "monosat/monosat_p.pyx":764
*     return py_result
*
* def getModel_MaxFlow( S ,  G ,  maxflow_literal ):             # <<<<<<<<<<<<<<
*     """Cython signature: int64_t getModel_MaxFlow(void* S, void* G, int maxflow_literal)"""
*
*/
__pyx_tuple__101 = PyTuple_Pack(5, __pyx_n_s_S, __pyx_n_s_G, __pyx_n_s_maxflow_literal, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 764, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__101);
__Pyx_GIVEREF(__pyx_tuple__101);
__pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__101, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_getModel_MaxFlow, 764, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(0, 764, __pyx_L1_error)

/* "monosat/monosat_p.pyx":776
*     return py_result
*
* def getModel_MinimumSpanningTreeWeight( S ,  G ,  spanning_tree_literal ):             # <<<<<<<<<<<<<<
*     """Cython signature: int64_t getModel_MinimumSpanningTreeWeight(void* S, void* G, int spanning_tree_literal)"""
*
*/
__pyx_tuple__103 = PyTuple_Pack(5, __pyx_n_s_S, __pyx_n_s_G, __pyx_n_s_spanning_tree_literal, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(0, 776, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__103);
__Pyx_GIVEREF(__pyx_tuple__103);
__pyx_codeobj__104 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 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_monosat_monosat_p_pyx, __pyx_n_s_getModel_MinimumSpanningTreeWeig, 776, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__104)) __PYX_ERR(0, 776, __pyx_L1_error)

/* "monosat/monosat_p.pyx":788
*     return py_result
*
* def getModel_Path_EdgeLits( S ,  G ,  reach_or_distance_literal ,  store_length ,  store ):             # <<<<<<<<<<<<<<
*     """Cython signature: int getModel_Path_EdgeLits(void* S, void* G, int reach_or_distance_literal, int store_length, int* store)"""
*
*/
__pyx_tuple__105 = PyTuple_Pack(10, __pyx_n_s_S, __pyx_n_s_G, __pyx_n_s_reach_or_distance_literal, __pyx_n_s_store_length, __pyx_n_s_store, __pyx_n_s_initializer, __pyx_n_s_a, __pyx_n_s_r, __pyx_n_s_lit, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(0, 788, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__105);
__Pyx_GIVEREF(__pyx_tuple__105);
__pyx_codeobj__106 = (PyObject*)__Pyx_PyCode_New(5, 0, 10, 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_monosat_monosat_p_pyx, __pyx_n_s_getModel_Path_EdgeLits, 788, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__106)) __PYX_ERR(0, 788, __pyx_L1_error)

/* "monosat/monosat_p.pyx":808
*     return py_result
*
* def getModel_Path_EdgeLits_Length( S ,  G ,  reach_or_distance_literal ):             # <<<<<<<<<<<<<<
*     """Cython signature: int getModel_Path_EdgeLits_Length(void* S, void* G, int reach_or_distance_literal)"""
*
*/
__pyx_tuple__107 = PyTuple_Pack(5, __pyx_n_s_S, __pyx_n_s_G, __pyx_n_s_reach_or_distance_literal, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(0, 808, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__107);
__Pyx_GIVEREF(__pyx_tuple__107);
__pyx_codeobj__108 = (PyObject*)__Pyx_PyCode_New(3, 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_monosat_monosat_p_pyx, __pyx_n_s_getModel_Path_EdgeLits_Length, 808, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__108)) __PYX_ERR(0, 808, __pyx_L1_error)

/* "monosat/monosat_p.pyx":817
*     return py_result
*
* def getModel_Path_Nodes( S ,  G ,  reach_or_distance_literal ,  store_length ,  store ):             # <<<<<<<<<<<<<<
*     """Cython signature: int getModel_Path_Nodes(void* S, void* G, int reach_or_distance_literal, int store_length, int* store)"""
*
*/
__pyx_tuple__109 = PyTuple_Pack(10, __pyx_n_s_S, __pyx_n_s_G, __pyx_n_s_reach_or_distance_literal, __pyx_n_s_store_length, __pyx_n_s_store, __pyx_n_s_initializer, __pyx_n_s_a, __pyx_n_s_r, __pyx_n_s_node, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(0, 817, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__109);
__Pyx_GIVEREF(__pyx_tuple__109);
__pyx_codeobj__110 = (PyObject*)__Pyx_PyCode_New(5, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__109, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_getModel_Path_Nodes, 817, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__110)) __PYX_ERR(0, 817, __pyx_L1_error)

/* "monosat/monosat_p.pyx":838
*     return py_result
*
* def getModel_Path_Nodes_Length( S ,  G ,  reach_or_distance_literal ):             # <<<<<<<<<<<<<<
*     """Cython signature: int getModel_Path_Nodes_Length(void* S, void* G, int reach_or_distance_literal)"""
*
*/
__pyx_tuple__111 = PyTuple_Pack(5, __pyx_n_s_S, __pyx_n_s_G, __pyx_n_s_reach_or_distance_literal, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(0, 838, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__111);
__Pyx_GIVEREF(__pyx_tuple__111);
__pyx_codeobj__112 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__111, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_getModel_Path_Nodes_Length, 838, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__112)) __PYX_ERR(0, 838, __pyx_L1_error)

/* "monosat/monosat_p.pyx":850
*     return py_result
*
* def getVersion():             # <<<<<<<<<<<<<<
*     """Cython signature: char * getVersion()"""
*     cdef char  * _r = <char *>_getVersion_monosat()
*/
__pyx_tuple__113 = PyTuple_Pack(2, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__113)) __PYX_ERR(0, 850, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__113);
__Pyx_GIVEREF(__pyx_tuple__113);
__pyx_codeobj__114 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__113, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_getVersion, 850, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__114)) __PYX_ERR(0, 850, __pyx_L1_error)

/* "monosat/monosat_p.pyx":856
*     return py_result
*
* def graph_setAssignEdgesToWeight( S ,  G ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: void graph_setAssignEdgesToWeight(void* S, void* G, int64_t weight)"""
*
*/
__pyx_tuple__115 = PyTuple_Pack(3, __pyx_n_s_S, __pyx_n_s_G, __pyx_n_s_weight); if (unlikely(!__pyx_tuple__115)) __PYX_ERR(0, 856, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__115);
__Pyx_GIVEREF(__pyx_tuple__115);
__pyx_codeobj__116 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 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_monosat_monosat_p_pyx, __pyx_n_s_graph_setAssignEdgesToWeight, 856, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__116)) __PYX_ERR(0, 856, __pyx_L1_error)

/* "monosat/monosat_p.pyx":866
*     _graph_setAssignEdgesToWeight_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int64_t>weight))
*
* def initBVTheory( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: void* initBVTheory(void* S)"""
*     #
*/
__pyx_tuple__117 = PyTuple_Pack(3, __pyx_n_s_S, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__117)) __PYX_ERR(0, 866, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__117);
__Pyx_GIVEREF(__pyx_tuple__117);
__pyx_codeobj__118 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 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_monosat_monosat_p_pyx, __pyx_n_s_initBVTheory, 866, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__118)) __PYX_ERR(0, 866, __pyx_L1_error)

/* "monosat/monosat_p.pyx":878
*
*
* def isDecisionVar( S ,  var ):             # <<<<<<<<<<<<<<
*     """Cython signature: bint isDecisionVar(void* S, int var)"""
*
*/
__pyx_tuple__119 = PyTuple_Pack(4, __pyx_n_s_S, __pyx_n_s_var, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__119)) __PYX_ERR(0, 878, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__119);
__Pyx_GIVEREF(__pyx_tuple__119);
__pyx_codeobj__120 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 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_monosat_monosat_p_pyx, __pyx_n_s_isDecisionVar, 878, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__120)) __PYX_ERR(0, 878, __pyx_L1_error)

/* "monosat/monosat_p.pyx":888
*     return py_result
*
* def lastSolutionWasOptimal( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: bint lastSolutionWasOptimal(void* S)"""
*
*/
__pyx_tuple__121 = PyTuple_Pack(3, __pyx_n_s_S, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__121)) __PYX_ERR(0, 888, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__121);
__Pyx_GIVEREF(__pyx_tuple__121);
__pyx_codeobj__122 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 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_monosat_monosat_p_pyx, __pyx_n_s_lastSolutionWasOptimal, 888, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__122)) __PYX_ERR(0, 888, __pyx_L1_error)

/* "monosat/monosat_p.pyx":896
*     return py_result
*
* def maximizeBV( S ,  bv ,  bvID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void maximizeBV(void* S, void* bv, int bvID)"""
*
*/
__pyx_tuple__123 = PyTuple_Pack(3, __pyx_n_s_S, __pyx_n_s_bv, __pyx_n_s_bvID); if (unlikely(!__pyx_tuple__123)) __PYX_ERR(0, 896, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__123);
__Pyx_GIVEREF(__pyx_tuple__123);
__pyx_codeobj__124 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 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_monosat_monosat_p_pyx, __pyx_n_s_maximizeBV, 896, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__124)) __PYX_ERR(0, 896, __pyx_L1_error)

/* "monosat/monosat_p.pyx":902
*     _maximizeBV_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID))
*
* def maximizeLits( S ,  lits ,  n_lits ):             # <<<<<<<<<<<<<<
*     """Cython signature: void maximizeLits(void* S, int* lits, int n_lits)"""
*
*/
__pyx_tuple__125 = PyTuple_Pack(4, __pyx_n_s_S, __pyx_n_s_lits, __pyx_n_s_n_lits, __pyx_n_s_a); if (unlikely(!__pyx_tuple__125)) __PYX_ERR(0, 902, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__125);
__Pyx_GIVEREF(__pyx_tuple__125);
__pyx_codeobj__126 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__125, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_maximizeLits, 902, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__126)) __PYX_ERR(0, 902, __pyx_L1_error)

/* "monosat/monosat_p.pyx":912
*     _maximizeLits_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int*>a.data.as_ints), (<int>n_lits))
*
* def maximizeWeightedLits( S ,  lits ,  weights ,  n_lits ):             # <<<<<<<<<<<<<<
*     """Cython signature: void maximizeWeightedLits(void* S, int* lits, int* weights, int n_lits)"""
*
*/
__pyx_tuple__127 = PyTuple_Pack(6, __pyx_n_s_S, __pyx_n_s_lits, __pyx_n_s_weights, __pyx_n_s_n_lits, __pyx_n_s_a, __pyx_n_s_b); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(0, 912, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__127);
__Pyx_GIVEREF(__pyx_tuple__127);
__pyx_codeobj__128 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__127, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_maximizeWeightedLits, 912, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__128)) __PYX_ERR(0, 912, __pyx_L1_error)

/* "monosat/monosat_p.pyx":924
*     _maximizeWeightedLits_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int*>a.data.as_ints), (<int*>b.data.as_ints), (<int>n_lits))
*
* def maximumFlow_geq( S ,  G ,  source ,  sink ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int maximumFlow_geq(void* S, void* G, int source, int sink, int64_t weight)"""
*
*/
__pyx_tuple__129 = PyTuple_Pack(7, __pyx_n_s_S, __pyx_n_s_G, __pyx_n_s_source, __pyx_n_s_sink, __pyx_n_s_weight, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(0, 924, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__129);
__Pyx_GIVEREF(__pyx_tuple__129);
__pyx_codeobj__130 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__129, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_maximumFlow_geq, 924, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__130)) __PYX_ERR(0, 924, __pyx_L1_error)

/* "monosat/monosat_p.pyx":940
*     return py_result
*
* def maximumFlow_geq_bv( S ,  G ,  source ,  sink ,  bvID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int maximumFlow_geq_bv(void* S, void* G, int source, int sink, int bvID)"""
*
*/
__pyx_tuple__131 = PyTuple_Pack(7, __pyx_n_s_S, __pyx_n_s_G, __pyx_n_s_source, __pyx_n_s_sink, __pyx_n_s_bvID, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__131)) __PYX_ERR(0, 940, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__131);
__Pyx_GIVEREF(__pyx_tuple__131);
__pyx_codeobj__132 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__131, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_maximumFlow_geq_bv, 940, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__132)) __PYX_ERR(0, 940, __pyx_L1_error)

/* "monosat/monosat_p.pyx":956
*     return py_result
*
* def maximumFlow_gt( S ,  G ,  source ,  sink ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int maximumFlow_gt(void* S, void* G, int source, int sink, int64_t weight)"""
*
*/
__pyx_tuple__133 = PyTuple_Pack(7, __pyx_n_s_S, __pyx_n_s_G, __pyx_n_s_source, __pyx_n_s_sink, __pyx_n_s_weight, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__133)) __PYX_ERR(0, 956, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__133);
__Pyx_GIVEREF(__pyx_tuple__133);
__pyx_codeobj__134 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__133, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_maximumFlow_gt, 956, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__134)) __PYX_ERR(0, 956, __pyx_L1_error)

/* "monosat/monosat_p.pyx":972
*     return py_result
*
* def maximumFlow_gt_bv( S ,  G ,  source ,  sink ,  bvID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int maximumFlow_gt_bv(void* S, void* G, int source, int sink, int bvID)"""
*
*/
__pyx_tuple__135 = PyTuple_Pack(7, __pyx_n_s_S, __pyx_n_s_G, __pyx_n_s_source, __pyx_n_s_sink, __pyx_n_s_bvID, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__135)) __PYX_ERR(0, 972, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__135);
__Pyx_GIVEREF(__pyx_tuple__135);
__pyx_codeobj__136 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_maximumFlow_gt_bv, 972, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__136)) __PYX_ERR(0, 972, __pyx_L1_error)

/* "monosat/monosat_p.pyx":988
*     return py_result
*
* def minimizeBV( S ,  bv ,  bvID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void minimizeBV(void* S, void* bv, int bvID)"""
*
*/
__pyx_tuple__137 = PyTuple_Pack(3, __pyx_n_s_S, __pyx_n_s_bv, __pyx_n_s_bvID); if (unlikely(!__pyx_tuple__137)) __PYX_ERR(0, 988, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__137);
__Pyx_GIVEREF(__pyx_tuple__137);
__pyx_codeobj__138 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__137, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_minimizeBV, 988, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__138)) __PYX_ERR(0, 988, __pyx_L1_error)

/* "monosat/monosat_p.pyx":998
*     _minimizeBV_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID))
*
* def minimizeLits( S ,  lits ,  n_lits ):             # <<<<<<<<<<<<<<
*     """Cython signature: void minimizeLits(void* S, int* lits, int n_lits)"""
*
*/
__pyx_tuple__139 = PyTuple_Pack(4, __pyx_n_s_S, __pyx_n_s_lits, __pyx_n_s_n_lits, __pyx_n_s_a); if (unlikely(!__pyx_tuple__139)) __PYX_ERR(0, 998, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__139);
__Pyx_GIVEREF(__pyx_tuple__139);
__pyx_codeobj__140 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__139, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_minimizeLits, 998, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__140)) __PYX_ERR(0, 998, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1009
*     _minimizeLits_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int*>a.data.as_ints), (<int>n_lits))
*
* def minimizeWeightedLits( S ,  lits ,  weights ,  n_lits ):             # <<<<<<<<<<<<<<
*     """Cython signature: void minimizeWeightedLits(void* S, int* lits, int* weights, int n_lits)"""
*
*/
__pyx_tuple__141 = PyTuple_Pack(6, __pyx_n_s_S, __pyx_n_s_lits, __pyx_n_s_weights, __pyx_n_s_n_lits, __pyx_n_s_a, __pyx_n_s_b); if (unlikely(!__pyx_tuple__141)) __PYX_ERR(0, 1009, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__141);
__Pyx_GIVEREF(__pyx_tuple__141);
__pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__141, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_minimizeWeightedLits, 1009, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) __PYX_ERR(0, 1009, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1022
*     _minimizeWeightedLits_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int*>a.data.as_ints), (<int*>b.data.as_ints), (<int>n_lits))
*
* def minimumSpanningTree_leq( S ,  G ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int minimumSpanningTree_leq(void* S, void* G, int64_t weight)"""
*
*/
__pyx_tuple__143 = PyTuple_Pack(5, __pyx_n_s_S, __pyx_n_s_G, __pyx_n_s_weight, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__143)) __PYX_ERR(0, 1022, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__143);
__Pyx_GIVEREF(__pyx_tuple__143);
__pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_minimumSpanningTree_leq, 1022, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) __PYX_ERR(0, 1022, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1034
*     return py_result
*
* def minimumSpanningTree_lt( S ,  G ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int minimumSpanningTree_lt(void* S, void* G, int64_t weight)"""
*     assert isinstance(weight, (int, long)), 'arg weight wrong type'
*/
__pyx_tuple__145 = PyTuple_Pack(5, __pyx_n_s_S, __pyx_n_s_G, __pyx_n_s_weight, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__145)) __PYX_ERR(0, 1034, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__145);
__Pyx_GIVEREF(__pyx_tuple__145);
__pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_minimumSpanningTree_lt, 1034, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) __PYX_ERR(0, 1034, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1042
*     return py_result
*
* def nBitvectors( S ,  bv ):             # <<<<<<<<<<<<<<
*     """Cython signature: int nBitvectors(void* S, void* bv)"""
*
*/
__pyx_tuple__147 = PyTuple_Pack(4, __pyx_n_s_S, __pyx_n_s_bv, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__147)) __PYX_ERR(0, 1042, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__147);
__Pyx_GIVEREF(__pyx_tuple__147);
__pyx_codeobj__148 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__147, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_nBitvectors, 1042, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) __PYX_ERR(0, 1042, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1052
*     return py_result
*
* def nClauses( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: int nClauses(void* S)"""
*
*/
__pyx_tuple__149 = PyTuple_Pack(3, __pyx_n_s_S, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__149)) __PYX_ERR(0, 1052, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__149);
__Pyx_GIVEREF(__pyx_tuple__149);
__pyx_codeobj__150 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__149, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_nClauses, 1052, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) __PYX_ERR(0, 1052, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1060
*     return py_result
*
* def nEdges( S ,  G ):             # <<<<<<<<<<<<<<
*     """Cython signature: int nEdges(void* S, void* G)"""
*
*/
__pyx_tuple__151 = PyTuple_Pack(4, __pyx_n_s_S, __pyx_n_s_G, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__151)) __PYX_ERR(0, 1060, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__151);
__Pyx_GIVEREF(__pyx_tuple__151);
__pyx_codeobj__152 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__151, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_nEdges, 1060, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__152)) __PYX_ERR(0, 1060, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1070
*     return py_result
*
* def nNodes( S ,  G ):             # <<<<<<<<<<<<<<
*     """Cython signature: int nNodes(void* S, void* G)"""
*
*/
__pyx_tuple__153 = PyTuple_Pack(4, __pyx_n_s_S, __pyx_n_s_G, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__153)) __PYX_ERR(0, 1070, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__153);
__Pyx_GIVEREF(__pyx_tuple__153);
__pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__153, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_nNodes, 1070, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) __PYX_ERR(0, 1070, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1080
*     return py_result
*
* def nVars( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: int nVars(void* S)"""
*
*/
__pyx_tuple__155 = PyTuple_Pack(3, __pyx_n_s_S, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__155)) __PYX_ERR(0, 1080, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__155);
__Pyx_GIVEREF(__pyx_tuple__155);
__pyx_codeobj__156 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__155, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_nVars, 1080, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__156)) __PYX_ERR(0, 1080, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1088
*     return py_result
*
* def newBVComparison_bv_geq( S ,  bv ,  bvID ,  compareID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBVComparison_bv_geq(void* S, void* bv, int bvID, int compareID)"""
*
*/
__pyx_tuple__157 = PyTuple_Pack(6, __pyx_n_s_S, __pyx_n_s_bv, __pyx_n_s_bvID, __pyx_n_s_compareID, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__157)) __PYX_ERR(0, 1088, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__157);
__Pyx_GIVEREF(__pyx_tuple__157);
__pyx_codeobj__158 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__157, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_newBVComparison_bv_geq, 1088, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__158)) __PYX_ERR(0, 1088, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1102
*     return py_result
*
* def newBVComparison_bv_gt( S ,  bv ,  bvID ,  compareID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBVComparison_bv_gt(void* S, void* bv, int bvID, int compareID)"""
*
*/
__pyx_tuple__159 = PyTuple_Pack(6, __pyx_n_s_S, __pyx_n_s_bv, __pyx_n_s_bvID, __pyx_n_s_compareID, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__159)) __PYX_ERR(0, 1102, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__159);
__Pyx_GIVEREF(__pyx_tuple__159);
__pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_newBVComparison_bv_gt, 1102, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) __PYX_ERR(0, 1102, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1116
*     return py_result
*
* def newBVComparison_bv_leq( S ,  bv ,  bvID ,  compareID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBVComparison_bv_leq(void* S, void* bv, int bvID, int compareID)"""
*
*/
__pyx_tuple__161 = PyTuple_Pack(6, __pyx_n_s_S, __pyx_n_s_bv, __pyx_n_s_bvID, __pyx_n_s_compareID, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__161)) __PYX_ERR(0, 1116, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__161);
__Pyx_GIVEREF(__pyx_tuple__161);
__pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__161, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_newBVComparison_bv_leq, 1116, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) __PYX_ERR(0, 1116, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1130
*     return py_result
*
* def newBVComparison_bv_lt( S ,  bv ,  bvID ,  compareID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBVComparison_bv_lt(void* S, void* bv, int bvID, int compareID)"""
*
*/
__pyx_tuple__163 = PyTuple_Pack(6, __pyx_n_s_S, __pyx_n_s_bv, __pyx_n_s_bvID, __pyx_n_s_compareID, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__163)) __PYX_ERR(0, 1130, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__163);
__Pyx_GIVEREF(__pyx_tuple__163);
__pyx_codeobj__164 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__163, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_newBVComparison_bv_lt, 1130, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__164)) __PYX_ERR(0, 1130, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1144
*     return py_result
*
* def newBVComparison_const_geq( S ,  bv ,  bvID ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBVComparison_const_geq(void* S, void* bv, int bvID, int64_t weight)"""
*
*/
__pyx_tuple__165 = PyTuple_Pack(6, __pyx_n_s_S, __pyx_n_s_bv, __pyx_n_s_bvID, __pyx_n_s_weight, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__165)) __PYX_ERR(0, 1144, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__165);
__Pyx_GIVEREF(__pyx_tuple__165);
__pyx_codeobj__166 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__165, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_newBVComparison_const_geq, 1144, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__166)) __PYX_ERR(0, 1144, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1158
*     return py_result
*
* def newBVComparison_const_gt( S ,  bv ,  bvID ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBVComparison_const_gt(void* S, void* bv, int bvID, int64_t weight)"""
*
*/
__pyx_tuple__167 = PyTuple_Pack(6, __pyx_n_s_S, __pyx_n_s_bv, __pyx_n_s_bvID, __pyx_n_s_weight, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__167)) __PYX_ERR(0, 1158, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__167);
__Pyx_GIVEREF(__pyx_tuple__167);
__pyx_codeobj__168 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__167, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_newBVComparison_const_gt, 1158, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__168)) __PYX_ERR(0, 1158, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1172
*     return py_result
*
* def newBVComparison_const_leq( S ,  bv ,  bvID ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBVComparison_const_leq(void* S, void* bv, int bvID, int64_t weight)"""
*
*/
__pyx_tuple__169 = PyTuple_Pack(6, __pyx_n_s_S, __pyx_n_s_bv, __pyx_n_s_bvID, __pyx_n_s_weight, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__169)) __PYX_ERR(0, 1172, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__169);
__Pyx_GIVEREF(__pyx_tuple__169);
__pyx_codeobj__170 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__169, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_newBVComparison_const_leq, 1172, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__170)) __PYX_ERR(0, 1172, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1186
*     return py_result
*
* def newBVComparison_const_lt( S ,  bv ,  bvID ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBVComparison_const_lt(void* S, void* bv, int bvID, int64_t weight)"""
*
*/
__pyx_tuple__171 = PyTuple_Pack(6, __pyx_n_s_S, __pyx_n_s_bv, __pyx_n_s_bvID, __pyx_n_s_weight, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__171)) __PYX_ERR(0, 1186, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__171);
__Pyx_GIVEREF(__pyx_tuple__171);
__pyx_codeobj__172 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__171, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_newBVComparison_const_lt, 1186, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__172)) __PYX_ERR(0, 1186, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1200
*     return py_result
*
* def newBitvector( S ,  bv ,  bits ,  n_bits ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBitvector(void* S, void* bv, int* bits, int n_bits)"""
*
*/
__pyx_tuple__173 = PyTuple_Pack(7, __pyx_n_s_S, __pyx_n_s_bv, __pyx_n_s_bits, __pyx_n_s_n_bits, __pyx_n_s_a, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__173)) __PYX_ERR(0, 1200, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__173);
__Pyx_GIVEREF(__pyx_tuple__173);
__pyx_codeobj__174 = (PyObject*)__Pyx_PyCode_New(4, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__173, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_newBitvector, 1200, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__174)) __PYX_ERR(0, 1200, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1214
*     return py_result
*
* def newBitvector_anon( S ,  bv ,  bvWidth ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBitvector_anon(void* S, void* bv, int bvWidth)"""
*
*/
__pyx_tuple__175 = PyTuple_Pack(5, __pyx_n_s_S, __pyx_n_s_bv, __pyx_n_s_bvWidth, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__175)) __PYX_ERR(0, 1214, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__175);
__Pyx_GIVEREF(__pyx_tuple__175);
__pyx_codeobj__176 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__175, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_newBitvector_anon, 1214, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__176)) __PYX_ERR(0, 1214, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1226
*     return py_result
*
* def newBitvector_const( S ,  bv ,  bvWidth ,  constval ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBitvector_const(void* S, void* bv, int bvWidth, int64_t constval)"""
*
*/
__pyx_tuple__177 = PyTuple_Pack(6, __pyx_n_s_S, __pyx_n_s_bv, __pyx_n_s_bvWidth, __pyx_n_s_constval, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__177)) __PYX_ERR(0, 1226, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__177);
__Pyx_GIVEREF(__pyx_tuple__177);
__pyx_codeobj__178 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__177, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_newBitvector_const, 1226, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__178)) __PYX_ERR(0, 1226, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1240
*     return py_result
*
* def newEdge( S ,  G ,  _from ,  to ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newEdge(void* S, void* G, int _from, int to, int64_t weight)"""
*
*/
__pyx_tuple__179 = PyTuple_Pack(7, __pyx_n_s_S, __pyx_n_s_G, __pyx_n_s_from, __pyx_n_s_to, __pyx_n_s_weight, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__179)) __PYX_ERR(0, 1240, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__179);
__Pyx_GIVEREF(__pyx_tuple__179);
__pyx_codeobj__180 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__179, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_newEdge, 1240, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__180)) __PYX_ERR(0, 1240, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1256
*     return py_result
*
* def newEdgeSet( S ,  G ,  edges ,  n_edges ,  enforceEdgeAssignment ):             # <<<<<<<<<<<<<<
*     """Cython signature: void newEdgeSet(void* S, void* G, int* edges, int n_edges, bint enforceEdgeAssignment)"""
*     cdef array.array a =  array.array('i', edges)
*/
__pyx_tuple__181 = PyTuple_Pack(6, __pyx_n_s_S, __pyx_n_s_G, __pyx_n_s_edges, __pyx_n_s_n_edges, __pyx_n_s_enforceEdgeAssignment, __pyx_n_s_a); if (unlikely(!__pyx_tuple__181)) __PYX_ERR(0, 1256, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__181);
__Pyx_GIVEREF(__pyx_tuple__181);
__pyx_codeobj__182 = (PyObject*)__Pyx_PyCode_New(5, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__181, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_newEdgeSet, 1256, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__182)) __PYX_ERR(0, 1256, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1261
*     _newEdgeSet_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int*>a.data.as_ints), (<int>n_edges), (<bint>enforceEdgeAssignment))
*
* def newEdge_bv( S ,  G ,  _from ,  to ,  bvID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newEdge_bv(void* S, void* G, int _from, int to, int bvID)"""
*
*/
__pyx_tuple__183 = PyTuple_Pack(7, __pyx_n_s_S, __pyx_n_s_G, __pyx_n_s_from, __pyx_n_s_to, __pyx_n_s_bvID, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__183)) __PYX_ERR(0, 1261, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__183);
__Pyx_GIVEREF(__pyx_tuple__183);
__pyx_codeobj__184 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__183, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_newEdge_bv, 1261, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__184)) __PYX_ERR(0, 1261, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1277
*     return py_result
*
* def newEdge_double( S ,  G ,  _from ,  to , double weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newEdge_double(void* S, void* G, int _from, int to, double weight)"""
*
*/
__pyx_tuple__185 = PyTuple_Pack(7, __pyx_n_s_S, __pyx_n_s_G, __pyx_n_s_from, __pyx_n_s_to, __pyx_n_s_weight, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__185)) __PYX_ERR(0, 1277, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__185);
__Pyx_GIVEREF(__pyx_tuple__185);
__pyx_codeobj__186 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__185, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_newEdge_double, 1277, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__186)) __PYX_ERR(0, 1277, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1294
*
*
* def newGraph( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: void* newGraph(void* S)"""
*
*/
__pyx_tuple__187 = PyTuple_Pack(3, __pyx_n_s_S, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__187)) __PYX_ERR(0, 1294, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__187);
__Pyx_GIVEREF(__pyx_tuple__187);
__pyx_codeobj__188 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__187, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_newGraph, 1294, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__188)) __PYX_ERR(0, 1294, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1302
*     return py_result
*
* def newNode( S ,  G ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newNode(void* S, void* G)"""
*
*/
__pyx_tuple__189 = PyTuple_Pack(4, __pyx_n_s_S, __pyx_n_s_G, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__189)) __PYX_ERR(0, 1302, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__189);
__Pyx_GIVEREF(__pyx_tuple__189);
__pyx_codeobj__190 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__189, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_newNode, 1302, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__190)) __PYX_ERR(0, 1302, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1312
*     return py_result
*
* def newSolver():             # <<<<<<<<<<<<<<
*     """Cython signature: void* newSolver()"""
*     cdef void* _r = _newSolver_monosat()
*/
__pyx_tuple__191 = PyTuple_Pack(2, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__191)) __PYX_ERR(0, 1312, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__191);
__Pyx_GIVEREF(__pyx_tuple__191);
__pyx_codeobj__192 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__191, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_newSolver, 1312, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__192)) __PYX_ERR(0, 1312, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1320
*     return py_result
*
* def newSolver_arg(bytes argv ):             # <<<<<<<<<<<<<<
*     """Cython signature: void* newSolver_arg(char * argv)"""
*     assert isinstance(argv, bytes), 'arg argv wrong type'
*/
__pyx_tuple__193 = PyTuple_Pack(3, __pyx_n_s_argv, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__193)) __PYX_ERR(0, 1320, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__193);
__Pyx_GIVEREF(__pyx_tuple__193);
__pyx_codeobj__194 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__193, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_newSolver_arg, 1320, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__194)) __PYX_ERR(0, 1320, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1333
*
*
* def newVar( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newVar(void* S)"""
*
*/
__pyx_tuple__195 = PyTuple_Pack(3, __pyx_n_s_S, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__195)) __PYX_ERR(0, 1333, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__195);
__Pyx_GIVEREF(__pyx_tuple__195);
__pyx_codeobj__196 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__195, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_newVar, 1333, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__196)) __PYX_ERR(0, 1333, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1341
*     return py_result
*
* def reaches( S ,  G ,  _from ,  to ):             # <<<<<<<<<<<<<<
*     """Cython signature: int reaches(void* S, void* G, int _from, int to)"""
*
*/
__pyx_tuple__197 = PyTuple_Pack(6, __pyx_n_s_S, __pyx_n_s_G, __pyx_n_s_from, __pyx_n_s_to, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__197)) __PYX_ERR(0, 1341, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__197);
__Pyx_GIVEREF(__pyx_tuple__197);
__pyx_codeobj__198 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__197, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_reaches, 1341, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__198)) __PYX_ERR(0, 1341, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1351
*     return py_result
*
* def reachesBackward( S ,  G ,  _from ,  to ):             # <<<<<<<<<<<<<<
*     """Cython signature: int reaches(void* S, void* G, int _from, int to)"""
*
*/
__pyx_tuple__199 = PyTuple_Pack(6, __pyx_n_s_S, __pyx_n_s_G, __pyx_n_s_from, __pyx_n_s_to, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__199)) __PYX_ERR(0, 1351, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__199);
__Pyx_GIVEREF(__pyx_tuple__199);
__pyx_codeobj__200 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__199, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_reachesBackward, 1351, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__200)) __PYX_ERR(0, 1351, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1362
*
*
* def onPath( S ,  G , nodeOnPath, _from ,  to ):             # <<<<<<<<<<<<<<
*     """Cython signature: int reaches(void* S, void* G, int nodeOnPath,int _from, int to)"""
*
*/
__pyx_tuple__201 = PyTuple_Pack(7, __pyx_n_s_S, __pyx_n_s_G, __pyx_n_s_nodeOnPath, __pyx_n_s_from, __pyx_n_s_to, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__201)) __PYX_ERR(0, 1362, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__201);
__Pyx_GIVEREF(__pyx_tuple__201);
__pyx_codeobj__202 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__201, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_onPath, 1362, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__202)) __PYX_ERR(0, 1362, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1373
*     return py_result
*
* def readGNF( S , bytes filename ):             # <<<<<<<<<<<<<<
*     """Cython signature: void readGNF(void* S, char * filename)"""
*     assert isinstance(filename, bytes), 'arg filename wrong type'
*/
__pyx_tuple__203 = PyTuple_Pack(2, __pyx_n_s_S, __pyx_n_s_filename); if (unlikely(!__pyx_tuple__203)) __PYX_ERR(0, 1373, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__203);
__Pyx_GIVEREF(__pyx_tuple__203);
__pyx_codeobj__204 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__203, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_readGNF, 1373, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__204)) __PYX_ERR(0, 1373, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1378
*     _readGNF_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<char *>filename))
*
* def loadGNF( S , bytes filename ):             # <<<<<<<<<<<<<<
*     """Cython signature: void loadGNF(void* S, char * filename)"""
*     assert isinstance(filename, bytes), 'arg filename wrong type'
*/
__pyx_tuple__205 = PyTuple_Pack(2, __pyx_n_s_S, __pyx_n_s_filename); if (unlikely(!__pyx_tuple__205)) __PYX_ERR(0, 1378, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__205);
__Pyx_GIVEREF(__pyx_tuple__205);
__pyx_codeobj__206 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__205, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_loadGNF, 1378, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__206)) __PYX_ERR(0, 1378, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1383
*     _loadGNF_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<char *>filename))
*
* def setConflictLimit( S ,  num_conflicts ):             # <<<<<<<<<<<<<<
*     """Cython signature: void setConflictLimit(void* S, int num_conflicts)"""
*
*/
__pyx_tuple__207 = PyTuple_Pack(2, __pyx_n_s_S, __pyx_n_s_num_conflicts); if (unlikely(!__pyx_tuple__207)) __PYX_ERR(0, 1383, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__207);
__Pyx_GIVEREF(__pyx_tuple__207);
__pyx_codeobj__208 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__207, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_setConflictLimit, 1383, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__208)) __PYX_ERR(0, 1383, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1391
*     _setConflictLimit_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>num_conflicts))
*
* def setDecisionPolarity( S ,  v ,  b ):             # <<<<<<<<<<<<<<
*     """Cython signature: void setDecisionPolarity(void* S, int v, bint b)"""
*
*/
__pyx_tuple__209 = PyTuple_Pack(3, __pyx_n_s_S, __pyx_n_s_v, __pyx_n_s_b); if (unlikely(!__pyx_tuple__209)) __PYX_ERR(0, 1391, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__209);
__Pyx_GIVEREF(__pyx_tuple__209);
__pyx_codeobj__210 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__209, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_setDecisionPolarity, 1391, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__210)) __PYX_ERR(0, 1391, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1401
*     _setDecisionPolarity_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>v), (<bint>b))
*
* def setDecisionPriority( S ,  var ,  priority ):             # <<<<<<<<<<<<<<
*     """Cython signature: void setDecisionPriority(void* S, int var, int priority)"""
*
*/
__pyx_tuple__211 = PyTuple_Pack(3, __pyx_n_s_S, __pyx_n_s_var, __pyx_n_s_priority); if (unlikely(!__pyx_tuple__211)) __PYX_ERR(0, 1401, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__211);
__Pyx_GIVEREF(__pyx_tuple__211);
__pyx_codeobj__212 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__211, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_setDecisionPriority, 1401, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__212)) __PYX_ERR(0, 1401, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1411
*     _setDecisionPriority_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>var), (<int>priority))
*
* def setDecisionVar( S ,  var ,  decidable ):             # <<<<<<<<<<<<<<
*     """Cython signature: void setDecisionVar(void* S, int var, bint decidable)"""
*
*/
__pyx_tuple__213 = PyTuple_Pack(3, __pyx_n_s_S, __pyx_n_s_var, __pyx_n_s_decidable); if (unlikely(!__pyx_tuple__213)) __PYX_ERR(0, 1411, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__213);
__Pyx_GIVEREF(__pyx_tuple__213);
__pyx_codeobj__214 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__213, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_setDecisionVar, 1411, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__214)) __PYX_ERR(0, 1411, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1421
*     _setDecisionVar_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>var), (<bint>decidable))
*
* def setOutputFile( S , bytes output ):             # <<<<<<<<<<<<<<
*     """Cython signature: void setOutputFile(void* S, char * output)"""
*
*/
__pyx_tuple__215 = PyTuple_Pack(2, __pyx_n_s_S, __pyx_n_s_output); if (unlikely(!__pyx_tuple__215)) __PYX_ERR(0, 1421, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__215);
__Pyx_GIVEREF(__pyx_tuple__215);
__pyx_codeobj__216 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__215, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_setOutputFile, 1421, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__216)) __PYX_ERR(0, 1421, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1429
*     _setOutputFile_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<char *>output))
*
* def setPropagationLimit( S ,  num_propagations ):             # <<<<<<<<<<<<<<
*     """Cython signature: void setPropagationLimit(void* S, int num_propagations)"""
*
*/
__pyx_tuple__217 = PyTuple_Pack(2, __pyx_n_s_S, __pyx_n_s_num_propagations); if (unlikely(!__pyx_tuple__217)) __PYX_ERR(0, 1429, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__217);
__Pyx_GIVEREF(__pyx_tuple__217);
__pyx_codeobj__218 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__217, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_setPropagationLimit, 1429, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__218)) __PYX_ERR(0, 1429, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1437
*     _setPropagationLimit_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>num_propagations))
*
* def setTimeLimit( S ,  seconds ):             # <<<<<<<<<<<<<<
*     """Cython signature: void setTimeLimit(void* S, int seconds)"""
*
*/
__pyx_tuple__219 = PyTuple_Pack(2, __pyx_n_s_S, __pyx_n_s_seconds); if (unlikely(!__pyx_tuple__219)) __PYX_ERR(0, 1437, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__219);
__Pyx_GIVEREF(__pyx_tuple__219);
__pyx_codeobj__220 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__219, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_setTimeLimit, 1437, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__220)) __PYX_ERR(0, 1437, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1445
*     _setTimeLimit_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>seconds))
*
* def shortestPathUnweighted_leq_const( S ,  G ,  _from ,  to ,  steps ):             # <<<<<<<<<<<<<<
*     """Cython signature: int shortestPathUnweighted_leq_const(void* S, void* G, int _from, int to, int steps)"""
*
*/
__pyx_tuple__221 = PyTuple_Pack(7, __pyx_n_s_S, __pyx_n_s_G, __pyx_n_s_from, __pyx_n_s_to, __pyx_n_s_steps, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__221)) __PYX_ERR(0, 1445, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__221);
__Pyx_GIVEREF(__pyx_tuple__221);
__pyx_codeobj__222 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__221, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_shortestPathUnweighted_leq_const, 1445, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__222)) __PYX_ERR(0, 1445, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1461
*     return py_result
*
* def shortestPathUnweighted_lt_const( S ,  G ,  _from ,  to ,  steps ):             # <<<<<<<<<<<<<<
*     """Cython signature: int shortestPathUnweighted_lt_const(void* S, void* G, int _from, int to, int steps)"""
*
*/
__pyx_tuple__223 = PyTuple_Pack(7, __pyx_n_s_S, __pyx_n_s_G, __pyx_n_s_from, __pyx_n_s_to, __pyx_n_s_steps, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__223)) __PYX_ERR(0, 1461, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__223);
__Pyx_GIVEREF(__pyx_tuple__223);
__pyx_codeobj__224 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__223, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_shortestPathUnweighted_lt_const, 1461, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__224)) __PYX_ERR(0, 1461, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1477
*     return py_result
*
* def shortestPath_leq_bv( S ,  G ,  _from ,  to ,  bvID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int shortestPath_leq_bv(void* S, void* G, int _from, int to, int bvID)"""
*
*/
__pyx_tuple__225 = PyTuple_Pack(7, __pyx_n_s_S, __pyx_n_s_G, __pyx_n_s_from, __pyx_n_s_to, __pyx_n_s_bvID, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__225)) __PYX_ERR(0, 1477, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__225);
__Pyx_GIVEREF(__pyx_tuple__225);
__pyx_codeobj__226 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__225, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_shortestPath_leq_bv, 1477, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__226)) __PYX_ERR(0, 1477, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1493
*     return py_result
*
* def shortestPath_leq_const( S ,  G ,  _from ,  to ,  dist ):             # <<<<<<<<<<<<<<
*     """Cython signature: int shortestPath_leq_const(void* S, void* G, int _from, int to, int64_t dist)"""
*
*/
__pyx_tuple__227 = PyTuple_Pack(7, __pyx_n_s_S, __pyx_n_s_G, __pyx_n_s_from, __pyx_n_s_to, __pyx_n_s_dist, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__227)) __PYX_ERR(0, 1493, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__227);
__Pyx_GIVEREF(__pyx_tuple__227);
__pyx_codeobj__228 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__227, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_shortestPath_leq_const, 1493, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__228)) __PYX_ERR(0, 1493, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1509
*     return py_result
*
* def shortestPath_lt_bv( S ,  G ,  _from ,  to ,  bvID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int shortestPath_lt_bv(void* S, void* G, int _from, int to, int bvID)"""
*
*/
__pyx_tuple__229 = PyTuple_Pack(7, __pyx_n_s_S, __pyx_n_s_G, __pyx_n_s_from, __pyx_n_s_to, __pyx_n_s_bvID, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__229)) __PYX_ERR(0, 1509, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__229);
__Pyx_GIVEREF(__pyx_tuple__229);
__pyx_codeobj__230 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__229, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_shortestPath_lt_bv, 1509, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__230)) __PYX_ERR(0, 1509, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1525
*     return py_result
*
* def shortestPath_lt_const( S ,  G ,  _from ,  to ,  dist ):             # <<<<<<<<<<<<<<
*     """Cython signature: int shortestPath_lt_const(void* S, void* G, int _from, int to, int64_t dist)"""
*
*/
__pyx_tuple__231 = PyTuple_Pack(7, __pyx_n_s_S, __pyx_n_s_G, __pyx_n_s_from, __pyx_n_s_to, __pyx_n_s_dist, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__231)) __PYX_ERR(0, 1525, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__231);
__Pyx_GIVEREF(__pyx_tuple__231);
__pyx_codeobj__232 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__231, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_shortestPath_lt_const, 1525, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__232)) __PYX_ERR(0, 1525, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1541
*     return py_result
*
* def solve( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: bint solve(void* S)"""
*
*/
__pyx_tuple__233 = PyTuple_Pack(3, __pyx_n_s_S, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__233)) __PYX_ERR(0, 1541, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__233);
__Pyx_GIVEREF(__pyx_tuple__233);
__pyx_codeobj__234 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__233, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_solve, 1541, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__234)) __PYX_ERR(0, 1541, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1549
*     return py_result
*
* def solveAssumptions( S ,  assumptions,  n_assumptions):             # <<<<<<<<<<<<<<
*     """Cython signature: bint solveAssumptions(void* S, int* assumptions, int n_assumptions)"""
*
*/
__pyx_tuple__235 = PyTuple_Pack(6, __pyx_n_s_S, __pyx_n_s_assumptions, __pyx_n_s_n_assumptions, __pyx_n_s_a, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__235)) __PYX_ERR(0, 1549, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__235);
__Pyx_GIVEREF(__pyx_tuple__235);
__pyx_codeobj__236 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__235, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_solveAssumptions, 1549, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__236)) __PYX_ERR(0, 1549, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1558
*     return py_result
*
* def solveAssumptionsLimited( S ,  assumptions ,  n_assumptions ):             # <<<<<<<<<<<<<<
*     """Cython signature: int solveAssumptionsLimited(void* S, int* assumptions, int n_assumptions)"""
*
*/
__pyx_tuple__237 = PyTuple_Pack(6, __pyx_n_s_S, __pyx_n_s_assumptions, __pyx_n_s_n_assumptions, __pyx_n_s_a, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__237)) __PYX_ERR(0, 1558, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__237);
__Pyx_GIVEREF(__pyx_tuple__237);
__pyx_codeobj__238 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__237, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_solveAssumptionsLimited, 1558, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__238)) __PYX_ERR(0, 1558, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1570
*     return py_result
*
* def solveLimited( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: int solveLimited(void* S)"""
*
*/
__pyx_tuple__239 = PyTuple_Pack(3, __pyx_n_s_S, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__239)) __PYX_ERR(0, 1570, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__239);
__Pyx_GIVEREF(__pyx_tuple__239);
__pyx_codeobj__240 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__239, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_solveLimited, 1570, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__240)) __PYX_ERR(0, 1570, __pyx_L1_error)

/* "monosat/monosat_p.pyx":1578
*     return py_result
*
* def true_lit( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: int true_lit(void* S)"""
*
*/
__pyx_tuple__241 = PyTuple_Pack(3, __pyx_n_s_S, __pyx_n_s_r, __pyx_n_s_py_result); if (unlikely(!__pyx_tuple__241)) __PYX_ERR(0, 1578, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__241);
__Pyx_GIVEREF(__pyx_tuple__241);
__pyx_codeobj__242 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_monosat_monosat_p_pyx, __pyx_n_s_true_lit, 1578, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__242)) __PYX_ERR(0, 1578, __pyx_L1_error)
__Pyx_RefNannyFinishContext();
return 0;
__pyx_L1_error:;
__Pyx_RefNannyFinishContext();
return -1;
}

static int __Pyx_InitGlobals(void) {
if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
return 0;
__pyx_L1_error:;
return -1;
}

static int __Pyx_modinit_global_init_code(void); /*proto*/
static int __Pyx_modinit_variable_export_code(void); /*proto*/
static int __Pyx_modinit_function_export_code(void); /*proto*/
static int __Pyx_modinit_type_init_code(void); /*proto*/
static int __Pyx_modinit_type_import_code(void); /*proto*/
static int __Pyx_modinit_variable_import_code(void); /*proto*/
static 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 ---*/
__Pyx_RefNannyFinishContext();
return 0;
}

static int __Pyx_modinit_type_import_code(void) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
/*--- Type import code ---*/
__pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type",
#if CYTHON_COMPILING_IN_PYPY
sizeof(PyTypeObject),
#else
sizeof(PyHeapTypeObject),
#endif
0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) __PYX_ERR(2, 9, __pyx_L1_error)
__pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), 0); if (unlikely(!__pyx_ptype_7cpython_4bool_bool)) __PYX_ERR(3, 8, __pyx_L1_error)
__pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), 0); if (unlikely(!__pyx_ptype_7cpython_7complex_complex)) __PYX_ERR(4, 15, __pyx_L1_error)
__pyx_ptype_7cpython_5array_array = __Pyx_ImportType("array", "array", sizeof(arrayobject), 0); if (unlikely(!__pyx_ptype_7cpython_5array_array)) __PYX_ERR(1, 58, __pyx_L1_error)
__Pyx_RefNannyFinishContext();
return 0;
__pyx_L1_error:;
__Pyx_RefNannyFinishContext();
return -1;
}

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
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
#define CYTHON_SMALL_CODE
#elif defined(__GNUC__)
#define CYTHON_SMALL_CODE __attribute__((optimize("Os")))
#else
#define CYTHON_SMALL_CODE
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC initmonosat_p(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initmonosat_p(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_monosat_p(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_monosat_p(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
return PyModuleDef_Init(&__pyx_moduledef);
}
static int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name) {
PyObject *value = PyObject_GetAttrString(spec, from_name);
int result = 0;
if (likely(value)) {
   result = PyDict_SetItemString(moddict, to_name, value);
   Py_DECREF(value);
} else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
   PyErr_Clear();
} else {
   result = -1;
}
return result;
}
static PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
PyObject *module = NULL, *moddict, *modname;
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__") < 0)) goto bad;
if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__") < 0)) goto bad;
if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__") < 0)) goto bad;
if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__") < 0)) goto bad;
return module;
bad:
Py_XDECREF(module);
return NULL;
}


static int __pyx_pymod_exec_monosat_p(PyObject *__pyx_pyinit_module) CYTHON_SMALL_CODE
#endif
#endif
{
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannyDeclarations
#if CYTHON_PEP489_MULTI_PHASE_INIT
if (__pyx_m && __pyx_m == __pyx_pyinit_module) return 0;
#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_monosat_p(void)", 0);
if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
__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("monosat_p", __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)
__pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
#if CYTHON_COMPILING_IN_PYPY
Py_INCREF(__pyx_b);
#endif
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_monosat__monosat_p) {
if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
}
#if PY_MAJOR_VERSION >= 3
{
PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
if (!PyDict_GetItemString(modules, "monosat.monosat_p")) {
 if (unlikely(PyDict_SetItemString(modules, "monosat.monosat_p", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
}
}
#endif
/*--- Builtin init code ---*/
if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
/*--- Constants init code ---*/
if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
/*--- Global type/function init code ---*/
(void)__Pyx_modinit_global_init_code();
(void)__Pyx_modinit_variable_export_code();
(void)__Pyx_modinit_function_export_code();
(void)__Pyx_modinit_type_init_code();
if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error;
(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

/* "monosat/monosat_p.pyx":4
* #cython: embedsignature=False
* from cpython cimport array
* import array             # <<<<<<<<<<<<<<
* cimport cpython.pycapsule as pycapsule
* from libc.stdint cimport  int64_t
*/
__pyx_t_1 = __Pyx_Import(__pyx_n_s_array, 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_array, __pyx_t_1) < 0) __PYX_ERR(0, 4, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":151
*
*
* def acyclic_directed( S ,  G ):             # <<<<<<<<<<<<<<
*     """Cython signature: int acyclic_directed(void* S, void* G)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_1acyclic_directed, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_acyclic_directed, __pyx_t_1) < 0) __PYX_ERR(0, 151, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":161
*     return py_result
*
* def acyclic_undirected( S ,  G ):             # <<<<<<<<<<<<<<
*     """Cython signature: int acyclic_undirected(void* S, void* G)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_3acyclic_undirected, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 161, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_acyclic_undirected, __pyx_t_1) < 0) __PYX_ERR(0, 161, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":171
*     return py_result
*
* def addBinaryClause( S ,  lit1 ,  lit2 ):             # <<<<<<<<<<<<<<
*     """Cython signature: bint addBinaryClause(void* S, int lit1, int lit2)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_5addBinaryClause, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_addBinaryClause, __pyx_t_1) < 0) __PYX_ERR(0, 171, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":183
*     return py_result
*
* def addBinaryClauses( S ,  first_args ,  second_args ,  n_pairs ):             # <<<<<<<<<<<<<<
*     """Cython signature: void addBinaryClauses(void* S, int* first_args, int* second_args, int n_pairs)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_7addBinaryClauses, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_addBinaryClauses, __pyx_t_1) < 0) __PYX_ERR(0, 183, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":192
*     _addBinaryClauses_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int*>a.data.as_ints),(<int*>b.data.as_ints), (<int>n_pairs))
*
* def addClause( S ,  lits ,  n_lits ):             # <<<<<<<<<<<<<<
*     """Cython signature: bint addClause(void* S, int* lits, int n_lits)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_9addClause, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_addClause, __pyx_t_1) < 0) __PYX_ERR(0, 192, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":204
*     return py_result
*
* def addRoutingNet( S ,  G ,  router ,  disabledEdge ,  n_members ,  edge_lits ,  reach_lits ):             # <<<<<<<<<<<<<<
*     """Cython signature: void addRoutingNet(void* S, void* G, void* router, int disabledEdge, int n_members, int* edge_lits, int* reach_lits)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_11addRoutingNet, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 204, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_addRoutingNet, __pyx_t_1) < 0) __PYX_ERR(0, 204, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":219
*     _addRoutingNet_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<void*>router), (<int>disabledEdge), (<int>n_members), (<int*>a.data.as_ints), (<int*>b.data.as_ints))
*
* def addTertiaryClause( S ,  lit1 ,  lit2 ,  lit3 ):             # <<<<<<<<<<<<<<
*     """Cython signature: bint addTertiaryClause(void* S, int lit1, int lit2, int lit3)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_13addTertiaryClause, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_addTertiaryClause, __pyx_t_1) < 0) __PYX_ERR(0, 219, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":233
*     return py_result
*
* def addUnitClause( S ,  lit ):             # <<<<<<<<<<<<<<
*     """Cython signature: bint addUnitClause(void* S, int lit)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_15addUnitClause, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_addUnitClause, __pyx_t_1) < 0) __PYX_ERR(0, 233, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":243
*     return py_result
*
* def assertPB_eq( S ,  rhs ,  n_args ,  literals ,  coefficients ):             # <<<<<<<<<<<<<<
*     """Cython signature: void assertPB_eq(void* S, int rhs, int n_args, int* literals, int* coefficients)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_17assertPB_eq, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_assertPB_eq, __pyx_t_1) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":258
*     _assertPB_eq_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>rhs), (<int>n_args), (<int*>a.data.as_ints), (<int*>b.data.as_ints))
*
* def assertPB_geq( S ,  rhs ,  n_args ,  literals ,  coefficients ):             # <<<<<<<<<<<<<<
*     """Cython signature: void assertPB_geq(void* S, int rhs, int n_args, int* literals, int* coefficients)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_19assertPB_geq, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_assertPB_geq, __pyx_t_1) < 0) __PYX_ERR(0, 258, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":273
*     _assertPB_geq_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>rhs), (<int>n_args), (<int*>a.data.as_ints), (<int*>b.data.as_ints))
*
* def assertPB_gt( S ,  rhs ,  n_args ,  literals ,  coefficients ):             # <<<<<<<<<<<<<<
*     """Cython signature: void assertPB_gt(void* S, int rhs, int n_args, int* literals, int* coefficients)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_21assertPB_gt, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_assertPB_gt, __pyx_t_1) < 0) __PYX_ERR(0, 273, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":289
*     _assertPB_gt_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>rhs), (<int>n_args), (<int*>a.data.as_ints), (<int*>b.data.as_ints))
*
* def assertPB_leq( S ,  rhs ,  n_args ,  literals ,  coefficients ):             # <<<<<<<<<<<<<<
*     """Cython signature: void assertPB_leq(void* S, int rhs, int n_args, int* literals, int* coefficients)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_23assertPB_leq, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 289, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_assertPB_leq, __pyx_t_1) < 0) __PYX_ERR(0, 289, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":305
*     _assertPB_leq_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>rhs), (<int>n_args),  (<int*>a.data.as_ints), (<int*>b.data.as_ints))
*
* def assertPB_lt( S ,  rhs ,  n_args ,  literals ,  coefficients ):             # <<<<<<<<<<<<<<
*     """Cython signature: void assertPB_lt(void* S, int rhs, int n_args, int* literals, int* coefficients)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_25assertPB_lt, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_assertPB_lt, __pyx_t_1) < 0) __PYX_ERR(0, 305, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":321
*     _assertPB_lt_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>rhs), (<int>n_args), (<int*>a.data.as_ints), (<int*>b.data.as_ints))
*
* def at_most_one( S ,  vars ,  n_vars ):             # <<<<<<<<<<<<<<
*     """Cython signature: void at_most_one(void* S, int* vars, int n_vars)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_27at_most_one, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_at_most_one, __pyx_t_1) < 0) __PYX_ERR(0, 321, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":331
*     _at_most_one_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)),  (<int*>a.data.as_ints), (<int>n_vars))
*
* def backtrack( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: void backtrack(void* S)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_29backtrack, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 331, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_backtrack, __pyx_t_1) < 0) __PYX_ERR(0, 331, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":337
*     _backtrack_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))
*
* def bv_addition( S ,  bv ,  bvID1 ,  bvID2 ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_addition(void* S, void* bv, int bvID1, int bvID2, int resultID)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_31bv_addition, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 337, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_bv_addition, __pyx_t_1) < 0) __PYX_ERR(0, 337, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":351
*     _bv_addition_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID1), (<int>bvID2), (<int>resultID))
*
* def bv_and( S ,  bv ,  bvaID ,  bvbID ,  bvResultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_and(void* S, void* bv, int bvaID, int bvbID, int bvResultID)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_33bv_and, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 351, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_bv_and, __pyx_t_1) < 0) __PYX_ERR(0, 351, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":365
*     _bv_and_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvaID), (<int>bvbID), (<int>bvResultID))
*
* def bv_bitblast( S ,  bv ,  bvID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_bitblast(void* S, void* bv, int bvID)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_35bv_bitblast, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 365, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_bv_bitblast, __pyx_t_1) < 0) __PYX_ERR(0, 365, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":375
*     _bv_bitblast_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID))
*
* def bv_concat( S ,  bv ,  aID ,  bID ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_concat(void* S, void* bv, int aID, int bID, int resultID)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_37bv_concat, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 375, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_bv_concat, __pyx_t_1) < 0) __PYX_ERR(0, 375, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":389
*     _bv_concat_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>aID), (<int>bID), (<int>resultID))
*
* def bv_divide( S ,  bv ,  bvID1 ,  bvID2 ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_divide(void* S, void* bv, int bvID1, int bvID2, int resultID)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_39bv_divide, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 389, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_bv_divide, __pyx_t_1) < 0) __PYX_ERR(0, 389, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":403
*     _bv_divide_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID1), (<int>bvID2), (<int>resultID))
*
* def bv_ite( S ,  bv ,  condition_lit ,  bvThenID ,  bvElseID ,  bvResultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_ite(void* S, void* bv, int condition_lit, int bvThenID, int bvElseID, int bvResultID)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_41bv_ite, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 403, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_bv_ite, __pyx_t_1) < 0) __PYX_ERR(0, 403, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":419
*     _bv_ite_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>condition_lit), (<int>bvThenID), (<int>bvElseID), (<int>bvResultID))
*
* def bv_max( S ,  bv ,  args ,  n_args ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_max(void* S, void* bv, int* args, int n_args, int resultID)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_43bv_max, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 419, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_bv_max, __pyx_t_1) < 0) __PYX_ERR(0, 419, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":433
*     _bv_max_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)),(<int*>a.data.as_ints), (<int>n_args), (<int>resultID))
*
* def bv_min( S ,  bv ,  args ,  n_args ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_min(void* S, void* bv, int* args, int n_args, int resultID)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_45bv_min, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_bv_min, __pyx_t_1) < 0) __PYX_ERR(0, 433, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":447
*     _bv_min_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int*>a.data.as_ints), (<int>n_args), (<int>resultID))
*
* def bv_multiply( S ,  bv ,  bvID1 ,  bvID2 ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_multiply(void* S, void* bv, int bvID1, int bvID2, int resultID)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_47bv_multiply, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 447, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_bv_multiply, __pyx_t_1) < 0) __PYX_ERR(0, 447, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":461
*     _bv_multiply_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID1), (<int>bvID2), (<int>resultID))
*
* def bv_nand( S ,  bv ,  bvaID ,  bvbID ,  bvResultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_nand(void* S, void* bv, int bvaID, int bvbID, int bvResultID)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_49bv_nand, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 461, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_bv_nand, __pyx_t_1) < 0) __PYX_ERR(0, 461, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":475
*     _bv_nand_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvaID), (<int>bvbID), (<int>bvResultID))
*
* def bv_nor( S ,  bv ,  bvaID ,  bvbID ,  bvResultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_nor(void* S, void* bv, int bvaID, int bvbID, int bvResultID)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_51bv_nor, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 475, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_bv_nor, __pyx_t_1) < 0) __PYX_ERR(0, 475, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":489
*     _bv_nor_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvaID), (<int>bvbID), (<int>bvResultID))
*
* def bv_not( S ,  bv ,  bvaID ,  bvResultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_not(void* S, void* bv, int bvaID, int bvResultID)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_53bv_not, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 489, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_bv_not, __pyx_t_1) < 0) __PYX_ERR(0, 489, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":501
*     _bv_not_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvaID), (<int>bvResultID))
*
* def bv_or( S ,  bv ,  bvaID ,  bvbID ,  bvResultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_or(void* S, void* bv, int bvaID, int bvbID, int bvResultID)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_55bv_or, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_bv_or, __pyx_t_1) < 0) __PYX_ERR(0, 501, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":515
*     _bv_or_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvaID), (<int>bvbID), (<int>bvResultID))
*
* def bv_popcount( S ,  bv ,  args ,  n_args ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_popcount(void* S, void* bv, int* args, int n_args, int resultID)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_57bv_popcount, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 515, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_bv_popcount, __pyx_t_1) < 0) __PYX_ERR(0, 515, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":529
*     _bv_popcount_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)),(<int*>a.data.as_ints), (<int>n_args), (<int>resultID))
*
* def bv_slice( S ,  bv ,  aID ,  lower ,  upper ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_slice(void* S, void* bv, int aID, int lower, int upper, int resultID)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_59bv_slice, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 529, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_bv_slice, __pyx_t_1) < 0) __PYX_ERR(0, 529, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":545
*     _bv_slice_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>aID), (<int>lower), (<int>upper), (<int>resultID))
*
* def bv_subtraction( S ,  bv ,  bvID1 ,  bvID2 ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_subtraction(void* S, void* bv, int bvID1, int bvID2, int resultID)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_61bv_subtraction, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_bv_subtraction, __pyx_t_1) < 0) __PYX_ERR(0, 545, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":559
*     _bv_subtraction_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID1), (<int>bvID2), (<int>resultID))
*
* def bv_unary( S ,  bv ,  args ,  n_args ,  resultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_unary(void* S, void* bv, int* args, int n_args, int resultID)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_63bv_unary, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 559, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_bv_unary, __pyx_t_1) < 0) __PYX_ERR(0, 559, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":573
*     _bv_unary_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int*>a.data.as_ints), (<int>n_args), (<int>resultID))
*
* def bv_width( S ,  bv ,  bvID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int bv_width(void* S, void* bv, int bvID)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_65bv_width, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 573, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_bv_width, __pyx_t_1) < 0) __PYX_ERR(0, 573, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":585
*     return py_result
*
* def bv_xnor( S ,  bv ,  bvaID ,  bvbID ,  bvResultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_xnor(void* S, void* bv, int bvaID, int bvbID, int bvResultID)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_67bv_xnor, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 585, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_bv_xnor, __pyx_t_1) < 0) __PYX_ERR(0, 585, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":599
*     _bv_xnor_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvaID), (<int>bvbID), (<int>bvResultID))
*
* def bv_xor( S ,  bv ,  bvaID ,  bvbID ,  bvResultID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void bv_xor(void* S, void* bv, int bvaID, int bvbID, int bvResultID)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_69bv_xor, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 599, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_bv_xor, __pyx_t_1) < 0) __PYX_ERR(0, 599, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":613
*     _bv_xor_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvaID), (<int>bvbID), (<int>bvResultID))
*
* def clearOptimizationObjectives( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: void clearOptimizationObjectives(void* S)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_71clearOptimizationObjectives, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 613, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_clearOptimizationObjectives, __pyx_t_1) < 0) __PYX_ERR(0, 613, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":619
*     _clearOptimizationObjectives_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))
*
* def createFlowRouting( S ,  G ,  sourceNode ,  destNode ,  maxflowLit ):             # <<<<<<<<<<<<<<
*     """Cython signature: void* createFlowRouting(void* S, void* G, int sourceNode, int destNode, int maxflowLit)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_73createFlowRouting, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_createFlowRouting, __pyx_t_1) < 0) __PYX_ERR(0, 619, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":635
*     return py_result
*
* def deleteSolver( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: void deleteSolver(void* S)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_75deleteSolver, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 635, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_deleteSolver, __pyx_t_1) < 0) __PYX_ERR(0, 635, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":641
*     _deleteSolver_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))
*
* def disablePreprocessing( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: void disablePreprocessing(void* S)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_77disablePreprocessing, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_disablePreprocessing, __pyx_t_1) < 0) __PYX_ERR(0, 641, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":647
*     _disablePreprocessing_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)))
*
* def disallowLiteralSimplification( S ,  lit ):             # <<<<<<<<<<<<<<
*     """Cython signature: bint disallowLiteralSimplification(void* S, int lit)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_79disallowLiteralSimplification, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 647, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_disallowLiteralSimplification, __pyx_t_1) < 0) __PYX_ERR(0, 647, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":657
*     return py_result
*
* def flushPB( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: void flushPB(void* S)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_81flushPB, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_flushPB, __pyx_t_1) < 0) __PYX_ERR(0, 657, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":664
*
*
* def getConflictClause( S ,  store_clause ,  max_store_size ):             # <<<<<<<<<<<<<<
*     """Cython signature: int getConflictClause(void* S, int* store_clause, int max_store_size)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_83getConflictClause, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 664, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_getConflictClause, __pyx_t_1) < 0) __PYX_ERR(0, 664, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":676
*     return py_result
*
* def minimizeUnsatCore( S ,  assumptions ,  n_lits ):             # <<<<<<<<<<<<<<
*     """Cython signature: int minimizeUnsatCore(void* S, int* assumptions, int n_lits)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_85minimizeUnsatCore, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 676, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_minimizeUnsatCore, __pyx_t_1) < 0) __PYX_ERR(0, 676, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":688
*     return py_result
*
* def minimizeConflictClause( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: int minimizeConflictClause(void* S)"""
*     _minimizeConflictClause_monosat(<void*>pycapsule.PyCapsule_GetPointer(S,NULL));
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_87minimizeConflictClause, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 688, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_minimizeConflictClause, __pyx_t_1) < 0) __PYX_ERR(0, 688, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":692
*     _minimizeConflictClause_monosat(<void*>pycapsule.PyCapsule_GetPointer(S,NULL));
*
* def getDecisionPolarity( S ,  v ):             # <<<<<<<<<<<<<<
*     """Cython signature: bint getDecisionPolarity(void* S, int v)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_89getDecisionPolarity, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_getDecisionPolarity, __pyx_t_1) < 0) __PYX_ERR(0, 692, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":702
*     return py_result
*
* def getDecisionPriority( S ,  var ):             # <<<<<<<<<<<<<<
*     """Cython signature: int getDecisionPriority(void* S, int var)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_91getDecisionPriority, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 702, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_getDecisionPriority, __pyx_t_1) < 0) __PYX_ERR(0, 702, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":712
*     return py_result
*
* def getModel_AcyclicEdgeFlow( S ,  G ,  maxflow_literal ,  edgeLit ):             # <<<<<<<<<<<<<<
*     """Cython signature: int64_t getModel_AcyclicEdgeFlow(void* S, void* G, int maxflow_literal, int edgeLit)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_93getModel_AcyclicEdgeFlow, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 712, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_getModel_AcyclicEdgeFlow, __pyx_t_1) < 0) __PYX_ERR(0, 712, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":726
*     return py_result
*
* def getModel_BV( S ,  bv ,  bvID ,  getMaximumValue ):             # <<<<<<<<<<<<<<
*     """Cython signature: int64_t getModel_BV(void* S, void* bv, int bvID, bint getMaximumValue)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_95getModel_BV, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 726, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_getModel_BV, __pyx_t_1) < 0) __PYX_ERR(0, 726, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":740
*     return py_result
*
* def getModel_EdgeFlow( S ,  G ,  maxflow_literal ,  edgeLit ):             # <<<<<<<<<<<<<<
*     """Cython signature: int64_t getModel_EdgeFlow(void* S, void* G, int maxflow_literal, int edgeLit)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_97getModel_EdgeFlow, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 740, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_getModel_EdgeFlow, __pyx_t_1) < 0) __PYX_ERR(0, 740, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":754
*     return py_result
*
* def getModel_Literal( S ,  lit ):             # <<<<<<<<<<<<<<
*     """Cython signature: int getModel_Literal(void* S, int lit)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_99getModel_Literal, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 754, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_getModel_Literal, __pyx_t_1) < 0) __PYX_ERR(0, 754, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":764
*     return py_result
*
* def getModel_MaxFlow( S ,  G ,  maxflow_literal ):             # <<<<<<<<<<<<<<
*     """Cython signature: int64_t getModel_MaxFlow(void* S, void* G, int maxflow_literal)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_101getModel_MaxFlow, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 764, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_getModel_MaxFlow, __pyx_t_1) < 0) __PYX_ERR(0, 764, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":776
*     return py_result
*
* def getModel_MinimumSpanningTreeWeight( S ,  G ,  spanning_tree_literal ):             # <<<<<<<<<<<<<<
*     """Cython signature: int64_t getModel_MinimumSpanningTreeWeight(void* S, void* G, int spanning_tree_literal)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_103getModel_MinimumSpanningTreeWeight, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 776, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_getModel_MinimumSpanningTreeWeig, __pyx_t_1) < 0) __PYX_ERR(0, 776, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":788
*     return py_result
*
* def getModel_Path_EdgeLits( S ,  G ,  reach_or_distance_literal ,  store_length ,  store ):             # <<<<<<<<<<<<<<
*     """Cython signature: int getModel_Path_EdgeLits(void* S, void* G, int reach_or_distance_literal, int store_length, int* store)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_105getModel_Path_EdgeLits, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 788, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_getModel_Path_EdgeLits, __pyx_t_1) < 0) __PYX_ERR(0, 788, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":808
*     return py_result
*
* def getModel_Path_EdgeLits_Length( S ,  G ,  reach_or_distance_literal ):             # <<<<<<<<<<<<<<
*     """Cython signature: int getModel_Path_EdgeLits_Length(void* S, void* G, int reach_or_distance_literal)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_107getModel_Path_EdgeLits_Length, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 808, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_getModel_Path_EdgeLits_Length, __pyx_t_1) < 0) __PYX_ERR(0, 808, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":817
*     return py_result
*
* def getModel_Path_Nodes( S ,  G ,  reach_or_distance_literal ,  store_length ,  store ):             # <<<<<<<<<<<<<<
*     """Cython signature: int getModel_Path_Nodes(void* S, void* G, int reach_or_distance_literal, int store_length, int* store)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_109getModel_Path_Nodes, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 817, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_getModel_Path_Nodes, __pyx_t_1) < 0) __PYX_ERR(0, 817, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":838
*     return py_result
*
* def getModel_Path_Nodes_Length( S ,  G ,  reach_or_distance_literal ):             # <<<<<<<<<<<<<<
*     """Cython signature: int getModel_Path_Nodes_Length(void* S, void* G, int reach_or_distance_literal)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_111getModel_Path_Nodes_Length, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 838, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_getModel_Path_Nodes_Length, __pyx_t_1) < 0) __PYX_ERR(0, 838, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":850
*     return py_result
*
* def getVersion():             # <<<<<<<<<<<<<<
*     """Cython signature: char * getVersion()"""
*     cdef char  * _r = <char *>_getVersion_monosat()
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_113getVersion, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 850, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_getVersion, __pyx_t_1) < 0) __PYX_ERR(0, 850, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":856
*     return py_result
*
* def graph_setAssignEdgesToWeight( S ,  G ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: void graph_setAssignEdgesToWeight(void* S, void* G, int64_t weight)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_115graph_setAssignEdgesToWeight, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 856, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_graph_setAssignEdgesToWeight, __pyx_t_1) < 0) __PYX_ERR(0, 856, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":866
*     _graph_setAssignEdgesToWeight_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int64_t>weight))
*
* def initBVTheory( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: void* initBVTheory(void* S)"""
*     #
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_117initBVTheory, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 866, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_initBVTheory, __pyx_t_1) < 0) __PYX_ERR(0, 866, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":878
*
*
* def isDecisionVar( S ,  var ):             # <<<<<<<<<<<<<<
*     """Cython signature: bint isDecisionVar(void* S, int var)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_119isDecisionVar, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 878, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_isDecisionVar, __pyx_t_1) < 0) __PYX_ERR(0, 878, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":888
*     return py_result
*
* def lastSolutionWasOptimal( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: bint lastSolutionWasOptimal(void* S)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_121lastSolutionWasOptimal, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 888, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_lastSolutionWasOptimal, __pyx_t_1) < 0) __PYX_ERR(0, 888, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":896
*     return py_result
*
* def maximizeBV( S ,  bv ,  bvID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void maximizeBV(void* S, void* bv, int bvID)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_123maximizeBV, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 896, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_maximizeBV, __pyx_t_1) < 0) __PYX_ERR(0, 896, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":902
*     _maximizeBV_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID))
*
* def maximizeLits( S ,  lits ,  n_lits ):             # <<<<<<<<<<<<<<
*     """Cython signature: void maximizeLits(void* S, int* lits, int n_lits)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_125maximizeLits, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 902, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_maximizeLits, __pyx_t_1) < 0) __PYX_ERR(0, 902, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":912
*     _maximizeLits_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int*>a.data.as_ints), (<int>n_lits))
*
* def maximizeWeightedLits( S ,  lits ,  weights ,  n_lits ):             # <<<<<<<<<<<<<<
*     """Cython signature: void maximizeWeightedLits(void* S, int* lits, int* weights, int n_lits)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_127maximizeWeightedLits, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 912, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_maximizeWeightedLits, __pyx_t_1) < 0) __PYX_ERR(0, 912, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":924
*     _maximizeWeightedLits_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int*>a.data.as_ints), (<int*>b.data.as_ints), (<int>n_lits))
*
* def maximumFlow_geq( S ,  G ,  source ,  sink ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int maximumFlow_geq(void* S, void* G, int source, int sink, int64_t weight)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_129maximumFlow_geq, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 924, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_maximumFlow_geq, __pyx_t_1) < 0) __PYX_ERR(0, 924, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":940
*     return py_result
*
* def maximumFlow_geq_bv( S ,  G ,  source ,  sink ,  bvID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int maximumFlow_geq_bv(void* S, void* G, int source, int sink, int bvID)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_131maximumFlow_geq_bv, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 940, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_maximumFlow_geq_bv, __pyx_t_1) < 0) __PYX_ERR(0, 940, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":956
*     return py_result
*
* def maximumFlow_gt( S ,  G ,  source ,  sink ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int maximumFlow_gt(void* S, void* G, int source, int sink, int64_t weight)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_133maximumFlow_gt, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 956, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_maximumFlow_gt, __pyx_t_1) < 0) __PYX_ERR(0, 956, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":972
*     return py_result
*
* def maximumFlow_gt_bv( S ,  G ,  source ,  sink ,  bvID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int maximumFlow_gt_bv(void* S, void* G, int source, int sink, int bvID)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_135maximumFlow_gt_bv, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 972, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_maximumFlow_gt_bv, __pyx_t_1) < 0) __PYX_ERR(0, 972, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":988
*     return py_result
*
* def minimizeBV( S ,  bv ,  bvID ):             # <<<<<<<<<<<<<<
*     """Cython signature: void minimizeBV(void* S, void* bv, int bvID)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_137minimizeBV, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 988, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_minimizeBV, __pyx_t_1) < 0) __PYX_ERR(0, 988, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":998
*     _minimizeBV_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(bv,NULL)), (<int>bvID))
*
* def minimizeLits( S ,  lits ,  n_lits ):             # <<<<<<<<<<<<<<
*     """Cython signature: void minimizeLits(void* S, int* lits, int n_lits)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_139minimizeLits, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_minimizeLits, __pyx_t_1) < 0) __PYX_ERR(0, 998, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1009
*     _minimizeLits_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int*>a.data.as_ints), (<int>n_lits))
*
* def minimizeWeightedLits( S ,  lits ,  weights ,  n_lits ):             # <<<<<<<<<<<<<<
*     """Cython signature: void minimizeWeightedLits(void* S, int* lits, int* weights, int n_lits)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_141minimizeWeightedLits, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1009, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_minimizeWeightedLits, __pyx_t_1) < 0) __PYX_ERR(0, 1009, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1022
*     _minimizeWeightedLits_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int*>a.data.as_ints), (<int*>b.data.as_ints), (<int>n_lits))
*
* def minimumSpanningTree_leq( S ,  G ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int minimumSpanningTree_leq(void* S, void* G, int64_t weight)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_143minimumSpanningTree_leq, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1022, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_minimumSpanningTree_leq, __pyx_t_1) < 0) __PYX_ERR(0, 1022, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1034
*     return py_result
*
* def minimumSpanningTree_lt( S ,  G ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int minimumSpanningTree_lt(void* S, void* G, int64_t weight)"""
*     assert isinstance(weight, (int, long)), 'arg weight wrong type'
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_145minimumSpanningTree_lt, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1034, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_minimumSpanningTree_lt, __pyx_t_1) < 0) __PYX_ERR(0, 1034, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1042
*     return py_result
*
* def nBitvectors( S ,  bv ):             # <<<<<<<<<<<<<<
*     """Cython signature: int nBitvectors(void* S, void* bv)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_147nBitvectors, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1042, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_nBitvectors, __pyx_t_1) < 0) __PYX_ERR(0, 1042, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1052
*     return py_result
*
* def nClauses( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: int nClauses(void* S)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_149nClauses, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1052, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_nClauses, __pyx_t_1) < 0) __PYX_ERR(0, 1052, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1060
*     return py_result
*
* def nEdges( S ,  G ):             # <<<<<<<<<<<<<<
*     """Cython signature: int nEdges(void* S, void* G)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_151nEdges, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1060, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_nEdges, __pyx_t_1) < 0) __PYX_ERR(0, 1060, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1070
*     return py_result
*
* def nNodes( S ,  G ):             # <<<<<<<<<<<<<<
*     """Cython signature: int nNodes(void* S, void* G)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_153nNodes, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1070, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_nNodes, __pyx_t_1) < 0) __PYX_ERR(0, 1070, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1080
*     return py_result
*
* def nVars( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: int nVars(void* S)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_155nVars, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1080, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_nVars, __pyx_t_1) < 0) __PYX_ERR(0, 1080, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1088
*     return py_result
*
* def newBVComparison_bv_geq( S ,  bv ,  bvID ,  compareID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBVComparison_bv_geq(void* S, void* bv, int bvID, int compareID)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_157newBVComparison_bv_geq, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1088, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_newBVComparison_bv_geq, __pyx_t_1) < 0) __PYX_ERR(0, 1088, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1102
*     return py_result
*
* def newBVComparison_bv_gt( S ,  bv ,  bvID ,  compareID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBVComparison_bv_gt(void* S, void* bv, int bvID, int compareID)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_159newBVComparison_bv_gt, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1102, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_newBVComparison_bv_gt, __pyx_t_1) < 0) __PYX_ERR(0, 1102, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1116
*     return py_result
*
* def newBVComparison_bv_leq( S ,  bv ,  bvID ,  compareID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBVComparison_bv_leq(void* S, void* bv, int bvID, int compareID)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_161newBVComparison_bv_leq, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1116, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_newBVComparison_bv_leq, __pyx_t_1) < 0) __PYX_ERR(0, 1116, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1130
*     return py_result
*
* def newBVComparison_bv_lt( S ,  bv ,  bvID ,  compareID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBVComparison_bv_lt(void* S, void* bv, int bvID, int compareID)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_163newBVComparison_bv_lt, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1130, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_newBVComparison_bv_lt, __pyx_t_1) < 0) __PYX_ERR(0, 1130, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1144
*     return py_result
*
* def newBVComparison_const_geq( S ,  bv ,  bvID ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBVComparison_const_geq(void* S, void* bv, int bvID, int64_t weight)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_165newBVComparison_const_geq, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1144, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_newBVComparison_const_geq, __pyx_t_1) < 0) __PYX_ERR(0, 1144, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1158
*     return py_result
*
* def newBVComparison_const_gt( S ,  bv ,  bvID ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBVComparison_const_gt(void* S, void* bv, int bvID, int64_t weight)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_167newBVComparison_const_gt, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1158, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_newBVComparison_const_gt, __pyx_t_1) < 0) __PYX_ERR(0, 1158, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1172
*     return py_result
*
* def newBVComparison_const_leq( S ,  bv ,  bvID ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBVComparison_const_leq(void* S, void* bv, int bvID, int64_t weight)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_169newBVComparison_const_leq, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1172, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_newBVComparison_const_leq, __pyx_t_1) < 0) __PYX_ERR(0, 1172, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1186
*     return py_result
*
* def newBVComparison_const_lt( S ,  bv ,  bvID ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBVComparison_const_lt(void* S, void* bv, int bvID, int64_t weight)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_171newBVComparison_const_lt, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1186, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_newBVComparison_const_lt, __pyx_t_1) < 0) __PYX_ERR(0, 1186, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1200
*     return py_result
*
* def newBitvector( S ,  bv ,  bits ,  n_bits ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBitvector(void* S, void* bv, int* bits, int n_bits)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_173newBitvector, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1200, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_newBitvector, __pyx_t_1) < 0) __PYX_ERR(0, 1200, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1214
*     return py_result
*
* def newBitvector_anon( S ,  bv ,  bvWidth ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBitvector_anon(void* S, void* bv, int bvWidth)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_175newBitvector_anon, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1214, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_newBitvector_anon, __pyx_t_1) < 0) __PYX_ERR(0, 1214, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1226
*     return py_result
*
* def newBitvector_const( S ,  bv ,  bvWidth ,  constval ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newBitvector_const(void* S, void* bv, int bvWidth, int64_t constval)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_177newBitvector_const, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1226, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_newBitvector_const, __pyx_t_1) < 0) __PYX_ERR(0, 1226, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1240
*     return py_result
*
* def newEdge( S ,  G ,  _from ,  to ,  weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newEdge(void* S, void* G, int _from, int to, int64_t weight)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_179newEdge, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1240, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_newEdge, __pyx_t_1) < 0) __PYX_ERR(0, 1240, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1256
*     return py_result
*
* def newEdgeSet( S ,  G ,  edges ,  n_edges ,  enforceEdgeAssignment ):             # <<<<<<<<<<<<<<
*     """Cython signature: void newEdgeSet(void* S, void* G, int* edges, int n_edges, bint enforceEdgeAssignment)"""
*     cdef array.array a =  array.array('i', edges)
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_181newEdgeSet, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1256, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_newEdgeSet, __pyx_t_1) < 0) __PYX_ERR(0, 1256, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1261
*     _newEdgeSet_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<void*>pycapsule.PyCapsule_GetPointer(G,NULL)), (<int*>a.data.as_ints), (<int>n_edges), (<bint>enforceEdgeAssignment))
*
* def newEdge_bv( S ,  G ,  _from ,  to ,  bvID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newEdge_bv(void* S, void* G, int _from, int to, int bvID)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_183newEdge_bv, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1261, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_newEdge_bv, __pyx_t_1) < 0) __PYX_ERR(0, 1261, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1277
*     return py_result
*
* def newEdge_double( S ,  G ,  _from ,  to , double weight ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newEdge_double(void* S, void* G, int _from, int to, double weight)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_185newEdge_double, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1277, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_newEdge_double, __pyx_t_1) < 0) __PYX_ERR(0, 1277, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1294
*
*
* def newGraph( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: void* newGraph(void* S)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_187newGraph, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1294, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_newGraph, __pyx_t_1) < 0) __PYX_ERR(0, 1294, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1302
*     return py_result
*
* def newNode( S ,  G ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newNode(void* S, void* G)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_189newNode, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1302, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_newNode, __pyx_t_1) < 0) __PYX_ERR(0, 1302, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1312
*     return py_result
*
* def newSolver():             # <<<<<<<<<<<<<<
*     """Cython signature: void* newSolver()"""
*     cdef void* _r = _newSolver_monosat()
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_191newSolver, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1312, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_newSolver, __pyx_t_1) < 0) __PYX_ERR(0, 1312, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1320
*     return py_result
*
* def newSolver_arg(bytes argv ):             # <<<<<<<<<<<<<<
*     """Cython signature: void* newSolver_arg(char * argv)"""
*     assert isinstance(argv, bytes), 'arg argv wrong type'
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_193newSolver_arg, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1320, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_newSolver_arg, __pyx_t_1) < 0) __PYX_ERR(0, 1320, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1333
*
*
* def newVar( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: int newVar(void* S)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_195newVar, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1333, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_newVar, __pyx_t_1) < 0) __PYX_ERR(0, 1333, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1341
*     return py_result
*
* def reaches( S ,  G ,  _from ,  to ):             # <<<<<<<<<<<<<<
*     """Cython signature: int reaches(void* S, void* G, int _from, int to)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_197reaches, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1341, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_reaches, __pyx_t_1) < 0) __PYX_ERR(0, 1341, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1351
*     return py_result
*
* def reachesBackward( S ,  G ,  _from ,  to ):             # <<<<<<<<<<<<<<
*     """Cython signature: int reaches(void* S, void* G, int _from, int to)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_199reachesBackward, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1351, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_reachesBackward, __pyx_t_1) < 0) __PYX_ERR(0, 1351, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1362
*
*
* def onPath( S ,  G , nodeOnPath, _from ,  to ):             # <<<<<<<<<<<<<<
*     """Cython signature: int reaches(void* S, void* G, int nodeOnPath,int _from, int to)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_201onPath, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1362, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_onPath, __pyx_t_1) < 0) __PYX_ERR(0, 1362, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1373
*     return py_result
*
* def readGNF( S , bytes filename ):             # <<<<<<<<<<<<<<
*     """Cython signature: void readGNF(void* S, char * filename)"""
*     assert isinstance(filename, bytes), 'arg filename wrong type'
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_203readGNF, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1373, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_readGNF, __pyx_t_1) < 0) __PYX_ERR(0, 1373, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1378
*     _readGNF_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<char *>filename))
*
* def loadGNF( S , bytes filename ):             # <<<<<<<<<<<<<<
*     """Cython signature: void loadGNF(void* S, char * filename)"""
*     assert isinstance(filename, bytes), 'arg filename wrong type'
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_205loadGNF, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1378, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_loadGNF, __pyx_t_1) < 0) __PYX_ERR(0, 1378, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1383
*     _loadGNF_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<char *>filename))
*
* def setConflictLimit( S ,  num_conflicts ):             # <<<<<<<<<<<<<<
*     """Cython signature: void setConflictLimit(void* S, int num_conflicts)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_207setConflictLimit, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1383, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_setConflictLimit, __pyx_t_1) < 0) __PYX_ERR(0, 1383, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1391
*     _setConflictLimit_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>num_conflicts))
*
* def setDecisionPolarity( S ,  v ,  b ):             # <<<<<<<<<<<<<<
*     """Cython signature: void setDecisionPolarity(void* S, int v, bint b)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_209setDecisionPolarity, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1391, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_setDecisionPolarity, __pyx_t_1) < 0) __PYX_ERR(0, 1391, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1401
*     _setDecisionPolarity_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>v), (<bint>b))
*
* def setDecisionPriority( S ,  var ,  priority ):             # <<<<<<<<<<<<<<
*     """Cython signature: void setDecisionPriority(void* S, int var, int priority)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_211setDecisionPriority, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1401, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_setDecisionPriority, __pyx_t_1) < 0) __PYX_ERR(0, 1401, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1411
*     _setDecisionPriority_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>var), (<int>priority))
*
* def setDecisionVar( S ,  var ,  decidable ):             # <<<<<<<<<<<<<<
*     """Cython signature: void setDecisionVar(void* S, int var, bint decidable)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_213setDecisionVar, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1411, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_setDecisionVar, __pyx_t_1) < 0) __PYX_ERR(0, 1411, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1421
*     _setDecisionVar_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>var), (<bint>decidable))
*
* def setOutputFile( S , bytes output ):             # <<<<<<<<<<<<<<
*     """Cython signature: void setOutputFile(void* S, char * output)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_215setOutputFile, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1421, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_setOutputFile, __pyx_t_1) < 0) __PYX_ERR(0, 1421, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1429
*     _setOutputFile_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<char *>output))
*
* def setPropagationLimit( S ,  num_propagations ):             # <<<<<<<<<<<<<<
*     """Cython signature: void setPropagationLimit(void* S, int num_propagations)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_217setPropagationLimit, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1429, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_setPropagationLimit, __pyx_t_1) < 0) __PYX_ERR(0, 1429, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1437
*     _setPropagationLimit_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>num_propagations))
*
* def setTimeLimit( S ,  seconds ):             # <<<<<<<<<<<<<<
*     """Cython signature: void setTimeLimit(void* S, int seconds)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_219setTimeLimit, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1437, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_setTimeLimit, __pyx_t_1) < 0) __PYX_ERR(0, 1437, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1445
*     _setTimeLimit_monosat((<void*>pycapsule.PyCapsule_GetPointer(S,NULL)), (<int>seconds))
*
* def shortestPathUnweighted_leq_const( S ,  G ,  _from ,  to ,  steps ):             # <<<<<<<<<<<<<<
*     """Cython signature: int shortestPathUnweighted_leq_const(void* S, void* G, int _from, int to, int steps)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_221shortestPathUnweighted_leq_const, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1445, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_shortestPathUnweighted_leq_const, __pyx_t_1) < 0) __PYX_ERR(0, 1445, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1461
*     return py_result
*
* def shortestPathUnweighted_lt_const( S ,  G ,  _from ,  to ,  steps ):             # <<<<<<<<<<<<<<
*     """Cython signature: int shortestPathUnweighted_lt_const(void* S, void* G, int _from, int to, int steps)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_223shortestPathUnweighted_lt_const, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1461, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_shortestPathUnweighted_lt_const, __pyx_t_1) < 0) __PYX_ERR(0, 1461, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1477
*     return py_result
*
* def shortestPath_leq_bv( S ,  G ,  _from ,  to ,  bvID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int shortestPath_leq_bv(void* S, void* G, int _from, int to, int bvID)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_225shortestPath_leq_bv, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1477, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_shortestPath_leq_bv, __pyx_t_1) < 0) __PYX_ERR(0, 1477, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1493
*     return py_result
*
* def shortestPath_leq_const( S ,  G ,  _from ,  to ,  dist ):             # <<<<<<<<<<<<<<
*     """Cython signature: int shortestPath_leq_const(void* S, void* G, int _from, int to, int64_t dist)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_227shortestPath_leq_const, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1493, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_shortestPath_leq_const, __pyx_t_1) < 0) __PYX_ERR(0, 1493, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1509
*     return py_result
*
* def shortestPath_lt_bv( S ,  G ,  _from ,  to ,  bvID ):             # <<<<<<<<<<<<<<
*     """Cython signature: int shortestPath_lt_bv(void* S, void* G, int _from, int to, int bvID)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_229shortestPath_lt_bv, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1509, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_shortestPath_lt_bv, __pyx_t_1) < 0) __PYX_ERR(0, 1509, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1525
*     return py_result
*
* def shortestPath_lt_const( S ,  G ,  _from ,  to ,  dist ):             # <<<<<<<<<<<<<<
*     """Cython signature: int shortestPath_lt_const(void* S, void* G, int _from, int to, int64_t dist)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_231shortestPath_lt_const, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1525, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_shortestPath_lt_const, __pyx_t_1) < 0) __PYX_ERR(0, 1525, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1541
*     return py_result
*
* def solve( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: bint solve(void* S)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_233solve, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1541, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_solve, __pyx_t_1) < 0) __PYX_ERR(0, 1541, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1549
*     return py_result
*
* def solveAssumptions( S ,  assumptions,  n_assumptions):             # <<<<<<<<<<<<<<
*     """Cython signature: bint solveAssumptions(void* S, int* assumptions, int n_assumptions)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_235solveAssumptions, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1549, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_solveAssumptions, __pyx_t_1) < 0) __PYX_ERR(0, 1549, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1558
*     return py_result
*
* def solveAssumptionsLimited( S ,  assumptions ,  n_assumptions ):             # <<<<<<<<<<<<<<
*     """Cython signature: int solveAssumptionsLimited(void* S, int* assumptions, int n_assumptions)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_237solveAssumptionsLimited, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1558, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_solveAssumptionsLimited, __pyx_t_1) < 0) __PYX_ERR(0, 1558, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1570
*     return py_result
*
* def solveLimited( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: int solveLimited(void* S)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_239solveLimited, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1570, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_solveLimited, __pyx_t_1) < 0) __PYX_ERR(0, 1570, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1578
*     return py_result
*
* def true_lit( S ):             # <<<<<<<<<<<<<<
*     """Cython signature: int true_lit(void* S)"""
*
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7monosat_9monosat_p_241true_lit, NULL, __pyx_n_s_monosat_monosat_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1578, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_true_lit, __pyx_t_1) < 0) __PYX_ERR(0, 1578, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "monosat/monosat_p.pyx":1
* #cython: c_string_encoding=ascii  # for cython>=0.19             # <<<<<<<<<<<<<<
* #cython: embedsignature=False
* from cpython cimport array
*/
__pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

/* "array.pxd":161
*     return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
*
* cdef inline void zero(array self):             # <<<<<<<<<<<<<<
*     """ set all elements of array to zero. """
*     memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize)
*/

/*--- Wrapped vars code ---*/

goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
if (__pyx_m) {
if (__pyx_d) {
 __Pyx_AddTraceback("init monosat.monosat_p", 0, __pyx_lineno, __pyx_filename);
}
Py_DECREF(__pyx_m); __pyx_m = 0;
} else if (!PyErr_Occurred()) {
PyErr_SetString(PyExc_ImportError, "init monosat.monosat_p");
}
__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((char *)modname);
if (!m) goto end;
p = PyObject_GetAttrString(m, (char *)"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;
}

/* 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)));
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)meth)) (self, args, nargs, NULL);
} else {
   return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs);
}
}
#endif

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL
#include "frameobject.h"
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 = f->f_localsplus;
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, int 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, nargs,
                          k, (int)nk,
                          d, (int)nd, kwdefs, closure);
#else
result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                          args, nargs,
                          k, (int)nk,
                          d, (int)nd, closure);
#endif
Py_XDECREF(kwtuple);
done:
Py_LeaveRecursiveCall();
return result;
}
#endif
#endif

/* PyObjectCallMethO */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
PyObject *self, *result;
PyCFunction cfunc;
cfunc = PyCFunction_GET_FUNCTION(func);
self = PyCFunction_GET_SELF(func);
if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
   return NULL;
result = cfunc(self, arg);
Py_LeaveRecursiveCall();
if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
   PyErr_SetString(
       PyExc_SystemError,
       "NULL result without error in PyObject_Call");
}
return result;
}
#endif

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

/* 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_TypeCheck(func, __pyx_CyFunctionType))) {
#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

/* PyObjectCallMethod1 */
static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
PyObject *result = NULL;
#if CYTHON_UNPACK_METHODS
if (likely(PyMethod_Check(method))) {
   PyObject *self = PyMethod_GET_SELF(method);
   if (likely(self)) {
       PyObject *args;
       PyObject *function = PyMethod_GET_FUNCTION(method);
#if CYTHON_FAST_PYCALL
       if (PyFunction_Check(function)) {
           PyObject *args[2] = {self, arg};
           result = __Pyx_PyFunction_FastCall(function, args, 2);
           goto done;
       }
#endif
#if CYTHON_FAST_PYCCALL
       if (__Pyx_PyFastCFunction_Check(function)) {
           PyObject *args[2] = {self, arg};
           result = __Pyx_PyCFunction_FastCall(function, args, 2);
           goto done;
       }
#endif
       args = PyTuple_New(2);
       if (unlikely(!args)) goto done;
       Py_INCREF(self);
       PyTuple_SET_ITEM(args, 0, self);
       Py_INCREF(arg);
       PyTuple_SET_ITEM(args, 1, arg);
       Py_INCREF(function);
       result = __Pyx_PyObject_Call(function, args, NULL);
       Py_DECREF(args);
       Py_DECREF(function);
       return result;
   }
}
#endif
result = __Pyx_PyObject_CallOneArg(method, arg);
goto done;
done:
return result;
}
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
PyObject *method, *result;
method = __Pyx_PyObject_GetAttrStr(obj, method_name);
if (unlikely(!method)) return NULL;
result = __Pyx__PyObject_CallMethod1(method, arg);
Py_DECREF(method);
return result;
}

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

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

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

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

/* CLineInTraceback */
#ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_line) {
PyObject *use_cline;
PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
PyObject **cython_runtime_dict;
#endif
__Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
if (likely(cython_runtime_dict)) {
 use_cline = __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 (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);
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
const int neg_one = (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);
}
}

/* 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_int64_t(int64_t value) {
const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0;
const int is_unsigned = neg_one > const_zero;
if (is_unsigned) {
   if (sizeof(int64_t) < sizeof(long)) {
       return PyInt_FromLong((long) value);
   } else if (sizeof(int64_t) <= sizeof(unsigned long)) {
       return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
   } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) {
       return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
   }
} else {
   if (sizeof(int64_t) <= sizeof(long)) {
       return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
   } else if (sizeof(int64_t) <= 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(int64_t),
                                little, !is_unsigned);
}
}

/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
const int neg_one = (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;
}

/* CIntFromPy */
static CYTHON_INLINE int64_t __Pyx_PyInt_As_int64_t(PyObject *x) {
const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0;
const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
if (likely(PyInt_Check(x))) {
   if (sizeof(int64_t) < sizeof(long)) {
       __PYX_VERIFY_RETURN_INT(int64_t, long, PyInt_AS_LONG(x))
   } else {
       long val = PyInt_AS_LONG(x);
       if (is_unsigned && unlikely(val < 0)) {
           goto raise_neg_overflow;
       }
       return (int64_t) 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 (int64_t) 0;
           case  1: __PYX_VERIFY_RETURN_INT(int64_t, digit, digits[0])
           case 2:
               if (8 * sizeof(int64_t) > 1 * PyLong_SHIFT) {
                   if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                       __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                   } else if (8 * sizeof(int64_t) >= 2 * PyLong_SHIFT) {
                       return (int64_t) (((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]));
                   }
               }
               break;
           case 3:
               if (8 * sizeof(int64_t) > 2 * PyLong_SHIFT) {
                   if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                       __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                   } else if (8 * sizeof(int64_t) >= 3 * PyLong_SHIFT) {
                       return (int64_t) (((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]));
                   }
               }
               break;
           case 4:
               if (8 * sizeof(int64_t) > 3 * PyLong_SHIFT) {
                   if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                       __PYX_VERIFY_RETURN_INT(int64_t, 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(int64_t) >= 4 * PyLong_SHIFT) {
                       return (int64_t) (((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)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 (int64_t) -1;
           if (unlikely(result == 1))
               goto raise_neg_overflow;
       }
#endif
       if (sizeof(int64_t) <= sizeof(unsigned long)) {
           __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
       } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) {
           __PYX_VERIFY_RETURN_INT_EXC(int64_t, 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 (int64_t) 0;
           case -1: __PYX_VERIFY_RETURN_INT(int64_t, sdigit, (sdigit) (-(sdigit)digits[0]))
           case  1: __PYX_VERIFY_RETURN_INT(int64_t,  digit, +digits[0])
           case -2:
               if (8 * sizeof(int64_t) - 1 > 1 * PyLong_SHIFT) {
                   if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                       __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                   } else if (8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT) {
                       return (int64_t) (((int64_t)-1)*(((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                   }
               }
               break;
           case 2:
               if (8 * sizeof(int64_t) > 1 * PyLong_SHIFT) {
                   if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                       __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                   } else if (8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT) {
                       return (int64_t) ((((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                   }
               }
               break;
           case -3:
               if (8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT) {
                   if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                       __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                   } else if (8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT) {
                       return (int64_t) (((int64_t)-1)*(((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                   }
               }
               break;
           case 3:
               if (8 * sizeof(int64_t) > 2 * PyLong_SHIFT) {
                   if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                       __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                   } else if (8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT) {
                       return (int64_t) ((((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                   }
               }
               break;
           case -4:
               if (8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT) {
                   if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                       __PYX_VERIFY_RETURN_INT(int64_t, 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(int64_t) - 1 > 4 * PyLong_SHIFT) {
                       return (int64_t) (((int64_t)-1)*(((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                   }
               }
               break;
           case 4:
               if (8 * sizeof(int64_t) > 3 * PyLong_SHIFT) {
                   if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                       __PYX_VERIFY_RETURN_INT(int64_t, 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(int64_t) - 1 > 4 * PyLong_SHIFT) {
                       return (int64_t) ((((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                   }
               }
               break;
       }
#endif
       if (sizeof(int64_t) <= sizeof(long)) {
           __PYX_VERIFY_RETURN_INT_EXC(int64_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
       } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) {
           __PYX_VERIFY_RETURN_INT_EXC(int64_t, 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
       int64_t 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 (int64_t) -1;
   }
} else {
   int64_t val;
   PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
   if (!tmp) return (int64_t) -1;
   val = __Pyx_PyInt_As_int64_t(tmp);
   Py_DECREF(tmp);
   return val;
}
raise_overflow:
PyErr_SetString(PyExc_OverflowError,
   "value too large to convert to int64_t");
return (int64_t) -1;
raise_neg_overflow:
PyErr_SetString(PyExc_OverflowError,
   "can't convert negative value to int64_t");
return (int64_t) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
const long neg_one = (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);
}
}

/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
const long neg_one = (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;
}

/* 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 CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
if (likely(err == exc_type)) return 1;
if (likely(PyExceptionClass_Check(err))) {
   return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
}
return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *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

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

/* ModuleImport */
#ifndef __PYX_HAVE_RT_ImportModule
#define __PYX_HAVE_RT_ImportModule
static PyObject *__Pyx_ImportModule(const char *name) {
PyObject *py_name = 0;
PyObject *py_module = 0;
py_name = __Pyx_PyIdentifier_FromString(name);
if (!py_name)
   goto bad;
py_module = PyImport_Import(py_name);
Py_DECREF(py_name);
return py_module;
bad:
Py_XDECREF(py_name);
return 0;
}
#endif

/* TypeImport */
#ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
size_t size, int strict)
{
PyObject *py_module = 0;
PyObject *result = 0;
PyObject *py_name = 0;
char warning[200];
Py_ssize_t basicsize;
#ifdef Py_LIMITED_API
PyObject *py_basicsize;
#endif
py_module = __Pyx_ImportModule(module_name);
if (!py_module)
   goto bad;
py_name = __Pyx_PyIdentifier_FromString(class_name);
if (!py_name)
   goto bad;
result = PyObject_GetAttr(py_module, py_name);
Py_DECREF(py_name);
py_name = 0;
Py_DECREF(py_module);
py_module = 0;
if (!result)
   goto bad;
if (!PyType_Check(result)) {
   PyErr_Format(PyExc_TypeError,
       "%.200s.%.200s is not a type object",
       module_name, class_name);
   goto bad;
}
#ifndef Py_LIMITED_API
basicsize = ((PyTypeObject *)result)->tp_basicsize;
#else
py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
if (!py_basicsize)
   goto bad;
basicsize = PyLong_AsSsize_t(py_basicsize);
Py_DECREF(py_basicsize);
py_basicsize = 0;
if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
   goto bad;
#endif
if (!strict && (size_t)basicsize > size) {
   PyOS_snprintf(warning, sizeof(warning),
       "%s.%s size changed, may indicate binary incompatibility. Expected %zd, got %zd",
       module_name, class_name, basicsize, size);
   if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
}
else if ((size_t)basicsize != size) {
   PyErr_Format(PyExc_ValueError,
       "%.200s.%.200s has the wrong size, try recompiling. Expected %zd, got %zd",
       module_name, class_name, basicsize, size);
   goto bad;
}
return (PyTypeObject *)result;
bad:
Py_XDECREF(py_module);
Py_XDECREF(result);
return NULL;
}
#endif

/* InitStrings */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
while (t->p) {
#if PY_MAJOR_VERSION < 3
   if (t->is_unicode) {
       *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
   } else if (t->intern) {
       *t->p = PyString_InternFromString(t->s);
   } else {
       *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
   }
#else
   if (t->is_unicode | t->is_str) {
       if (t->intern) {
           *t->p = PyUnicode_InternFromString(t->s);
       } else if (t->encoding) {
           *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
       } else {
           *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
       }
   } else {
       *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
   }
#endif
   if (!*t->p)
       return -1;
   if (PyObject_Hash(*t->p) == -1)
       return -1;
   ++t;
}
return 0;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
Py_ssize_t ignore;
return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#if !CYTHON_PEP393_ENABLED
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
char* defenc_c;
PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
if (!defenc) return NULL;
defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
{
   char* end = defenc_c + PyBytes_GET_SIZE(defenc);
   char* c;
   for (c = defenc_c; c < end; c++) {
       if ((unsigned char) (*c) >= 128) {
           PyUnicode_AsASCIIString(o);
           return NULL;
       }
   }
}
#endif
*length = PyBytes_GET_SIZE(defenc);
return defenc_c;
}
#else
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
if (likely(PyUnicode_IS_ASCII(o))) {
   *length = PyUnicode_GET_LENGTH(o);
   return PyUnicode_AsUTF8(o);
} else {
   PyUnicode_AsASCIIString(o);
   return NULL;
}
#else
return PyUnicode_AsUTF8AndSize(o, length);
#endif
}
#endif
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
       __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
       PyUnicode_Check(o)) {
   return __Pyx_PyUnicode_AsStringAndSize(o, length);
} else
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
if (PyByteArray_Check(o)) {
   *length = PyByteArray_GET_SIZE(o);
   return PyByteArray_AS_STRING(o);
} else
#endif
{
   char* result;
   int r = PyBytes_AsStringAndSize(o, &result, length);
   if (unlikely(r < 0)) {
       return NULL;
   } else {
       return result;
   }
}
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
int is_true = x == Py_True;
if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
else return PyObject_IsTrue(x);
}
static 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(x);
}
#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_PyInt_FromSize_t(size_t ival) {
return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
