#define _CFFI_

/* We try to define Py_LIMITED_API before including Python.h.

   Mess: we can only define it if Py_DEBUG, Py_TRACE_REFS and
   Py_REF_DEBUG are not defined.  This is a best-effort approximation:
   we can learn about Py_DEBUG from pyconfig.h, but it is unclear if
   the same works for the other two macros.  Py_DEBUG implies them,
   but not the other way around.
*/
#ifndef _CFFI_USE_EMBEDDING
#  include <pyconfig.h>
#  if !defined(Py_DEBUG) && !defined(Py_TRACE_REFS) && !defined(Py_REF_DEBUG)
#    define Py_LIMITED_API
#  endif
#endif

#include <Python.h>
#ifdef __cplusplus
extern "C" {
#endif
#include <stddef.h>

/* This part is from file 'cffi/parse_c_type.h'.  It is copied at the
   beginning of C sources generated by CFFI's ffi.set_source(). */

typedef void *_cffi_opcode_t;

#define _CFFI_OP(opcode, arg)   (_cffi_opcode_t)(opcode | (((uintptr_t)(arg)) << 8))
#define _CFFI_GETOP(cffi_opcode)    ((unsigned char)(uintptr_t)cffi_opcode)
#define _CFFI_GETARG(cffi_opcode)   (((intptr_t)cffi_opcode) >> 8)

#define _CFFI_OP_PRIMITIVE       1
#define _CFFI_OP_POINTER         3
#define _CFFI_OP_ARRAY           5
#define _CFFI_OP_OPEN_ARRAY      7
#define _CFFI_OP_STRUCT_UNION    9
#define _CFFI_OP_ENUM           11
#define _CFFI_OP_FUNCTION       13
#define _CFFI_OP_FUNCTION_END   15
#define _CFFI_OP_NOOP           17
#define _CFFI_OP_BITFIELD       19
#define _CFFI_OP_TYPENAME       21
#define _CFFI_OP_CPYTHON_BLTN_V 23   // varargs
#define _CFFI_OP_CPYTHON_BLTN_N 25   // noargs
#define _CFFI_OP_CPYTHON_BLTN_O 27   // O  (i.e. a single arg)
#define _CFFI_OP_CONSTANT       29
#define _CFFI_OP_CONSTANT_INT   31
#define _CFFI_OP_GLOBAL_VAR     33
#define _CFFI_OP_DLOPEN_FUNC    35
#define _CFFI_OP_DLOPEN_CONST   37
#define _CFFI_OP_GLOBAL_VAR_F   39
#define _CFFI_OP_EXTERN_PYTHON  41

#define _CFFI_PRIM_VOID          0
#define _CFFI_PRIM_BOOL          1
#define _CFFI_PRIM_CHAR          2
#define _CFFI_PRIM_SCHAR         3
#define _CFFI_PRIM_UCHAR         4
#define _CFFI_PRIM_SHORT         5
#define _CFFI_PRIM_USHORT        6
#define _CFFI_PRIM_INT           7
#define _CFFI_PRIM_UINT          8
#define _CFFI_PRIM_LONG          9
#define _CFFI_PRIM_ULONG        10
#define _CFFI_PRIM_LONGLONG     11
#define _CFFI_PRIM_ULONGLONG    12
#define _CFFI_PRIM_FLOAT        13
#define _CFFI_PRIM_DOUBLE       14
#define _CFFI_PRIM_LONGDOUBLE   15

#define _CFFI_PRIM_WCHAR        16
#define _CFFI_PRIM_INT8         17
#define _CFFI_PRIM_UINT8        18
#define _CFFI_PRIM_INT16        19
#define _CFFI_PRIM_UINT16       20
#define _CFFI_PRIM_INT32        21
#define _CFFI_PRIM_UINT32       22
#define _CFFI_PRIM_INT64        23
#define _CFFI_PRIM_UINT64       24
#define _CFFI_PRIM_INTPTR       25
#define _CFFI_PRIM_UINTPTR      26
#define _CFFI_PRIM_PTRDIFF      27
#define _CFFI_PRIM_SIZE         28
#define _CFFI_PRIM_SSIZE        29
#define _CFFI_PRIM_INT_LEAST8   30
#define _CFFI_PRIM_UINT_LEAST8  31
#define _CFFI_PRIM_INT_LEAST16  32
#define _CFFI_PRIM_UINT_LEAST16 33
#define _CFFI_PRIM_INT_LEAST32  34
#define _CFFI_PRIM_UINT_LEAST32 35
#define _CFFI_PRIM_INT_LEAST64  36
#define _CFFI_PRIM_UINT_LEAST64 37
#define _CFFI_PRIM_INT_FAST8    38
#define _CFFI_PRIM_UINT_FAST8   39
#define _CFFI_PRIM_INT_FAST16   40
#define _CFFI_PRIM_UINT_FAST16  41
#define _CFFI_PRIM_INT_FAST32   42
#define _CFFI_PRIM_UINT_FAST32  43
#define _CFFI_PRIM_INT_FAST64   44
#define _CFFI_PRIM_UINT_FAST64  45
#define _CFFI_PRIM_INTMAX       46
#define _CFFI_PRIM_UINTMAX      47

#define _CFFI__NUM_PRIM         48
#define _CFFI__UNKNOWN_PRIM           (-1)
#define _CFFI__UNKNOWN_FLOAT_PRIM     (-2)
#define _CFFI__UNKNOWN_LONG_DOUBLE    (-3)

#define _CFFI__IO_FILE_STRUCT         (-1)


struct _cffi_global_s {
    const char *name;
    void *address;
    _cffi_opcode_t type_op;
    void *size_or_direct_fn;  // OP_GLOBAL_VAR: size, or 0 if unknown
                              // OP_CPYTHON_BLTN_*: addr of direct function
};

struct _cffi_getconst_s {
    unsigned long long value;
    const struct _cffi_type_context_s *ctx;
    int gindex;
};

struct _cffi_struct_union_s {
    const char *name;
    int type_index;          // -> _cffi_types, on a OP_STRUCT_UNION
    int flags;               // _CFFI_F_* flags below
    size_t size;
    int alignment;
    int first_field_index;   // -> _cffi_fields array
    int num_fields;
};
#define _CFFI_F_UNION         0x01   // is a union, not a struct
#define _CFFI_F_CHECK_FIELDS  0x02   // complain if fields are not in the
                                     // "standard layout" or if some are missing
#define _CFFI_F_PACKED        0x04   // for CHECK_FIELDS, assume a packed struct
#define _CFFI_F_EXTERNAL      0x08   // in some other ffi.include()
#define _CFFI_F_OPAQUE        0x10   // opaque

struct _cffi_field_s {
    const char *name;
    size_t field_offset;
    size_t field_size;
    _cffi_opcode_t field_type_op;
};

struct _cffi_enum_s {
    const char *name;
    int type_index;          // -> _cffi_types, on a OP_ENUM
    int type_prim;           // _CFFI_PRIM_xxx
    const char *enumerators; // comma-delimited string
};

struct _cffi_typename_s {
    const char *name;
    int type_index;   /* if opaque, points to a possibly artificial
                         OP_STRUCT which is itself opaque */
};

struct _cffi_type_context_s {
    _cffi_opcode_t *types;
    const struct _cffi_global_s *globals;
    const struct _cffi_field_s *fields;
    const struct _cffi_struct_union_s *struct_unions;
    const struct _cffi_enum_s *enums;
    const struct _cffi_typename_s *typenames;
    int num_globals;
    int num_struct_unions;
    int num_enums;
    int num_typenames;
    const char *const *includes;
    int num_types;
    int flags;      /* future extension */
};

struct _cffi_parse_info_s {
    const struct _cffi_type_context_s *ctx;
    _cffi_opcode_t *output;
    unsigned int output_size;
    size_t error_location;
    const char *error_message;
};

struct _cffi_externpy_s {
    const char *name;
    size_t size_of_result;
    void *reserved1, *reserved2;
};

#ifdef _CFFI_INTERNAL
static int parse_c_type(struct _cffi_parse_info_s *info, const char *input);
static int search_in_globals(const struct _cffi_type_context_s *ctx,
                             const char *search, size_t search_len);
static int search_in_struct_unions(const struct _cffi_type_context_s *ctx,
                                   const char *search, size_t search_len);
#endif

/* this block of #ifs should be kept exactly identical between
   c/_cffi_backend.c, cffi/vengine_cpy.py, cffi/vengine_gen.py
   and cffi/_cffi_include.h */
#if defined(_MSC_VER)
# include <malloc.h>   /* for alloca() */
# if _MSC_VER < 1600   /* MSVC < 2010 */
   typedef __int8 int8_t;
   typedef __int16 int16_t;
   typedef __int32 int32_t;
   typedef __int64 int64_t;
   typedef unsigned __int8 uint8_t;
   typedef unsigned __int16 uint16_t;
   typedef unsigned __int32 uint32_t;
   typedef unsigned __int64 uint64_t;
   typedef __int8 int_least8_t;
   typedef __int16 int_least16_t;
   typedef __int32 int_least32_t;
   typedef __int64 int_least64_t;
   typedef unsigned __int8 uint_least8_t;
   typedef unsigned __int16 uint_least16_t;
   typedef unsigned __int32 uint_least32_t;
   typedef unsigned __int64 uint_least64_t;
   typedef __int8 int_fast8_t;
   typedef __int16 int_fast16_t;
   typedef __int32 int_fast32_t;
   typedef __int64 int_fast64_t;
   typedef unsigned __int8 uint_fast8_t;
   typedef unsigned __int16 uint_fast16_t;
   typedef unsigned __int32 uint_fast32_t;
   typedef unsigned __int64 uint_fast64_t;
   typedef __int64 intmax_t;
   typedef unsigned __int64 uintmax_t;
# else
#  include <stdint.h>
# endif
# if _MSC_VER < 1800   /* MSVC < 2013 */
#  ifndef __cplusplus
    typedef unsigned char _Bool;
#  endif
# endif
#else
# include <stdint.h>
# if (defined (__SVR4) && defined (__sun)) || defined(_AIX) || defined(__hpux)
#  include <alloca.h>
# endif
#endif

#ifdef __GNUC__
# define _CFFI_UNUSED_FN  __attribute__((unused))
#else
# define _CFFI_UNUSED_FN  /* nothing */
#endif

#ifdef __cplusplus
# ifndef _Bool
   typedef bool _Bool;   /* semi-hackish: C++ has no _Bool; bool is builtin */
# endif
#endif

/**********  CPython-specific section  **********/
#ifndef PYPY_VERSION


#if PY_MAJOR_VERSION >= 3
# define PyInt_FromLong PyLong_FromLong
#endif

#define _cffi_from_c_double PyFloat_FromDouble
#define _cffi_from_c_float PyFloat_FromDouble
#define _cffi_from_c_long PyInt_FromLong
#define _cffi_from_c_ulong PyLong_FromUnsignedLong
#define _cffi_from_c_longlong PyLong_FromLongLong
#define _cffi_from_c_ulonglong PyLong_FromUnsignedLongLong

#define _cffi_to_c_double PyFloat_AsDouble
#define _cffi_to_c_float PyFloat_AsDouble

#define _cffi_from_c_int(x, type)                                        \
    (((type)-1) > 0 ? /* unsigned */                                     \
        (sizeof(type) < sizeof(long) ?                                   \
            PyInt_FromLong((long)x) :                                    \
         sizeof(type) == sizeof(long) ?                                  \
            PyLong_FromUnsignedLong((unsigned long)x) :                  \
            PyLong_FromUnsignedLongLong((unsigned long long)x)) :        \
        (sizeof(type) <= sizeof(long) ?                                  \
            PyInt_FromLong((long)x) :                                    \
            PyLong_FromLongLong((long long)x)))

#define _cffi_to_c_int(o, type)                                          \
    ((type)(                                                             \
     sizeof(type) == 1 ? (((type)-1) > 0 ? (type)_cffi_to_c_u8(o)        \
                                         : (type)_cffi_to_c_i8(o)) :     \
     sizeof(type) == 2 ? (((type)-1) > 0 ? (type)_cffi_to_c_u16(o)       \
                                         : (type)_cffi_to_c_i16(o)) :    \
     sizeof(type) == 4 ? (((type)-1) > 0 ? (type)_cffi_to_c_u32(o)       \
                                         : (type)_cffi_to_c_i32(o)) :    \
     sizeof(type) == 8 ? (((type)-1) > 0 ? (type)_cffi_to_c_u64(o)       \
                                         : (type)_cffi_to_c_i64(o)) :    \
     (Py_FatalError("unsupported size for type " #type), (type)0)))

#define _cffi_to_c_i8                                                    \
                 ((int(*)(PyObject *))_cffi_exports[1])
#define _cffi_to_c_u8                                                    \
                 ((int(*)(PyObject *))_cffi_exports[2])
#define _cffi_to_c_i16                                                   \
                 ((int(*)(PyObject *))_cffi_exports[3])
#define _cffi_to_c_u16                                                   \
                 ((int(*)(PyObject *))_cffi_exports[4])
#define _cffi_to_c_i32                                                   \
                 ((int(*)(PyObject *))_cffi_exports[5])
#define _cffi_to_c_u32                                                   \
                 ((unsigned int(*)(PyObject *))_cffi_exports[6])
#define _cffi_to_c_i64                                                   \
                 ((long long(*)(PyObject *))_cffi_exports[7])
#define _cffi_to_c_u64                                                   \
                 ((unsigned long long(*)(PyObject *))_cffi_exports[8])
#define _cffi_to_c_char                                                  \
                 ((int(*)(PyObject *))_cffi_exports[9])
#define _cffi_from_c_pointer                                             \
    ((PyObject *(*)(char *, CTypeDescrObject *))_cffi_exports[10])
#define _cffi_to_c_pointer                                               \
    ((char *(*)(PyObject *, CTypeDescrObject *))_cffi_exports[11])
#define _cffi_get_struct_layout                                          \
    not used any more
#define _cffi_restore_errno                                              \
    ((void(*)(void))_cffi_exports[13])
#define _cffi_save_errno                                                 \
    ((void(*)(void))_cffi_exports[14])
#define _cffi_from_c_char                                                \
    ((PyObject *(*)(char))_cffi_exports[15])
#define _cffi_from_c_deref                                               \
    ((PyObject *(*)(char *, CTypeDescrObject *))_cffi_exports[16])
#define _cffi_to_c                                                       \
    ((int(*)(char *, CTypeDescrObject *, PyObject *))_cffi_exports[17])
#define _cffi_from_c_struct                                              \
    ((PyObject *(*)(char *, CTypeDescrObject *))_cffi_exports[18])
#define _cffi_to_c_wchar_t                                               \
    ((wchar_t(*)(PyObject *))_cffi_exports[19])
#define _cffi_from_c_wchar_t                                             \
    ((PyObject *(*)(wchar_t))_cffi_exports[20])
#define _cffi_to_c_long_double                                           \
    ((long double(*)(PyObject *))_cffi_exports[21])
#define _cffi_to_c__Bool                                                 \
    ((_Bool(*)(PyObject *))_cffi_exports[22])
#define _cffi_prepare_pointer_call_argument                              \
    ((Py_ssize_t(*)(CTypeDescrObject *, PyObject *, char **))_cffi_exports[23])
#define _cffi_convert_array_from_object                                  \
    ((int(*)(char *, CTypeDescrObject *, PyObject *))_cffi_exports[24])
#define _CFFI_CPIDX  25
#define _cffi_call_python                                                \
    ((void(*)(struct _cffi_externpy_s *, char *))_cffi_exports[_CFFI_CPIDX])
#define _CFFI_NUM_EXPORTS 26

typedef struct _ctypedescr CTypeDescrObject;

static void *_cffi_exports[_CFFI_NUM_EXPORTS];

#define _cffi_type(index)   (                           \
    assert((((uintptr_t)_cffi_types[index]) & 1) == 0), \
    (CTypeDescrObject *)_cffi_types[index])

static PyObject *_cffi_init(const char *module_name, Py_ssize_t version,
                            const struct _cffi_type_context_s *ctx)
{
    PyObject *module, *o_arg, *new_module;
    void *raw[] = {
        (void *)module_name,
        (void *)version,
        (void *)_cffi_exports,
        (void *)ctx,
    };

    module = PyImport_ImportModule("_cffi_backend");
    if (module == NULL)
        goto failure;

    o_arg = PyLong_FromVoidPtr((void *)raw);
    if (o_arg == NULL)
        goto failure;

    new_module = PyObject_CallMethod(
        module, (char *)"_init_cffi_1_0_external_module", (char *)"O", o_arg);

    Py_DECREF(o_arg);
    Py_DECREF(module);
    return new_module;

  failure:
    Py_XDECREF(module);
    return NULL;
}

/**********  end CPython-specific section  **********/
#else
_CFFI_UNUSED_FN
static void (*_cffi_call_python_org)(struct _cffi_externpy_s *, char *);
# define _cffi_call_python  _cffi_call_python_org
#endif


#define _cffi_array_len(array)   (sizeof(array) / sizeof((array)[0]))

#define _cffi_prim_int(size, sign)                                      \
    ((size) == 1 ? ((sign) ? _CFFI_PRIM_INT8  : _CFFI_PRIM_UINT8)  :    \
     (size) == 2 ? ((sign) ? _CFFI_PRIM_INT16 : _CFFI_PRIM_UINT16) :    \
     (size) == 4 ? ((sign) ? _CFFI_PRIM_INT32 : _CFFI_PRIM_UINT32) :    \
     (size) == 8 ? ((sign) ? _CFFI_PRIM_INT64 : _CFFI_PRIM_UINT64) :    \
     _CFFI__UNKNOWN_PRIM)

#define _cffi_prim_float(size)                                          \
    ((size) == sizeof(float) ? _CFFI_PRIM_FLOAT :                       \
     (size) == sizeof(double) ? _CFFI_PRIM_DOUBLE :                     \
     (size) == sizeof(long double) ? _CFFI__UNKNOWN_LONG_DOUBLE :       \
     _CFFI__UNKNOWN_FLOAT_PRIM)

#define _cffi_check_int(got, got_nonpos, expected)      \
    ((got_nonpos) == (expected <= 0) &&                 \
     (got) == (unsigned long long)expected)

#ifdef MS_WIN32
# define _cffi_stdcall  __stdcall
#else
# define _cffi_stdcall  /* nothing */
#endif

#ifdef __cplusplus
}
#endif

/************************************************************/


#include "mpdecimal.h"

#define MPD_Float_operation MPD_Not_implemented

const char *dec_signal_string[MPD_NUM_FLAGS] = {
    "Clamped",
    "InvalidOperation",
    "DivisionByZero",
    "InvalidOperation",
    "InvalidOperation",
    "InvalidOperation",
    "Inexact",
    "InvalidOperation",
    "InvalidOperation",
    "InvalidOperation",
    "FloatOperation",
    "Overflow",
    "Rounded",
    "Subnormal",
    "Underflow",
};


/************************************************************/

static void *_cffi_types[] = {
/*  0 */ _CFFI_OP(_CFFI_OP_FUNCTION, 17), // char *()(mpd_t const *, int)
/*  1 */ _CFFI_OP(_CFFI_OP_POINTER, 197), // mpd_t const *
/*  2 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 7), // int
/*  3 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/*  4 */ _CFFI_OP(_CFFI_OP_FUNCTION, 17), // char *()(mpd_t const *, mpd_spec_t const *, mpd_context_t const *, uint32_t *)
/*  5 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
/*  6 */ _CFFI_OP(_CFFI_OP_POINTER, 196), // mpd_spec_t const *
/*  7 */ _CFFI_OP(_CFFI_OP_POINTER, 195), // mpd_context_t const *
/*  8 */ _CFFI_OP(_CFFI_OP_POINTER, 19), // uint32_t *
/*  9 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 10 */ _CFFI_OP(_CFFI_OP_FUNCTION, 39), // char const *()(mpd_t const *, mpd_context_t const *)
/* 11 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
/* 12 */ _CFFI_OP(_CFFI_OP_NOOP, 7),
/* 13 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 14 */ _CFFI_OP(_CFFI_OP_FUNCTION, 39), // char const *()(void)
/* 15 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 16 */ _CFFI_OP(_CFFI_OP_FUNCTION, 2), // int()(char *, int, uint32_t, char const * *)
/* 17 */ _CFFI_OP(_CFFI_OP_POINTER, 191), // char *
/* 18 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 7),
/* 19 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 22), // uint32_t
/* 20 */ _CFFI_OP(_CFFI_OP_POINTER, 39), // char const * *
/* 21 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 22 */ _CFFI_OP(_CFFI_OP_FUNCTION, 2), // int()(mpd_context_t *, int)
/* 23 */ _CFFI_OP(_CFFI_OP_POINTER, 195), // mpd_context_t *
/* 24 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 7),
/* 25 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 26 */ _CFFI_OP(_CFFI_OP_FUNCTION, 2), // int()(mpd_context_t *, ssize_t)
/* 27 */ _CFFI_OP(_CFFI_OP_NOOP, 23),
/* 28 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 29), // ssize_t
/* 29 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 30 */ _CFFI_OP(_CFFI_OP_FUNCTION, 2), // int()(mpd_context_t *, uint32_t)
/* 31 */ _CFFI_OP(_CFFI_OP_NOOP, 23),
/* 32 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 22),
/* 33 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 34 */ _CFFI_OP(_CFFI_OP_FUNCTION, 2), // int()(mpd_spec_t *)
/* 35 */ _CFFI_OP(_CFFI_OP_POINTER, 196), // mpd_spec_t *
/* 36 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 37 */ _CFFI_OP(_CFFI_OP_FUNCTION, 2), // int()(mpd_spec_t *, char const *, int)
/* 38 */ _CFFI_OP(_CFFI_OP_NOOP, 35),
/* 39 */ _CFFI_OP(_CFFI_OP_POINTER, 191), // char const *
/* 40 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 7),
/* 41 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 42 */ _CFFI_OP(_CFFI_OP_FUNCTION, 2), // int()(mpd_t *, mpd_t const *, mpd_t const *)
/* 43 */ _CFFI_OP(_CFFI_OP_POINTER, 197), // mpd_t *
/* 44 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
/* 45 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
/* 46 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 47 */ _CFFI_OP(_CFFI_OP_FUNCTION, 2), // int()(mpd_t *, mpd_t const *, mpd_t const *, mpd_context_t const *, uint32_t *)
/* 48 */ _CFFI_OP(_CFFI_OP_NOOP, 43),
/* 49 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
/* 50 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
/* 51 */ _CFFI_OP(_CFFI_OP_NOOP, 7),
/* 52 */ _CFFI_OP(_CFFI_OP_NOOP, 8),
/* 53 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 54 */ _CFFI_OP(_CFFI_OP_FUNCTION, 2), // int()(mpd_t *, mpd_t const *, mpd_t const *, uint32_t *)
/* 55 */ _CFFI_OP(_CFFI_OP_NOOP, 43),
/* 56 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
/* 57 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
/* 58 */ _CFFI_OP(_CFFI_OP_NOOP, 8),
/* 59 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 60 */ _CFFI_OP(_CFFI_OP_FUNCTION, 2), // int()(mpd_t *, mpd_t const *, uint32_t *)
/* 61 */ _CFFI_OP(_CFFI_OP_NOOP, 43),
/* 62 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
/* 63 */ _CFFI_OP(_CFFI_OP_NOOP, 8),
/* 64 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 65 */ _CFFI_OP(_CFFI_OP_FUNCTION, 2), // int()(mpd_t const *)
/* 66 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
/* 67 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 68 */ _CFFI_OP(_CFFI_OP_FUNCTION, 2), // int()(mpd_t const *, mpd_context_t const *)
/* 69 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
/* 70 */ _CFFI_OP(_CFFI_OP_NOOP, 7),
/* 71 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 72 */ _CFFI_OP(_CFFI_OP_FUNCTION, 2), // int()(mpd_t const *, mpd_t const *)
/* 73 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
/* 74 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
/* 75 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 76 */ _CFFI_OP(_CFFI_OP_FUNCTION, 2), // int()(mpd_t const *, mpd_t const *, uint32_t *)
/* 77 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
/* 78 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
/* 79 */ _CFFI_OP(_CFFI_OP_NOOP, 8),
/* 80 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 81 */ _CFFI_OP(_CFFI_OP_FUNCTION, 43), // mpd_t *()(mpd_t const *)
/* 82 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
/* 83 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 84 */ _CFFI_OP(_CFFI_OP_FUNCTION, 43), // mpd_t *()(void)
/* 85 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 86 */ _CFFI_OP(_CFFI_OP_FUNCTION, 88), // size_t()(uint16_t * *, size_t, uint32_t, mpd_t const *, uint32_t *)
/* 87 */ _CFFI_OP(_CFFI_OP_POINTER, 199), // uint16_t * *
/* 88 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 28), // size_t
/* 89 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 22),
/* 90 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
/* 91 */ _CFFI_OP(_CFFI_OP_NOOP, 8),
/* 92 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 93 */ _CFFI_OP(_CFFI_OP_FUNCTION, 28), // ssize_t()(mpd_context_t const *)
/* 94 */ _CFFI_OP(_CFFI_OP_NOOP, 7),
/* 95 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 96 */ _CFFI_OP(_CFFI_OP_FUNCTION, 28), // ssize_t()(mpd_t const *)
/* 97 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
/* 98 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 99 */ _CFFI_OP(_CFFI_OP_FUNCTION, 28), // ssize_t()(mpd_t const *, uint32_t *)
/* 100 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
/* 101 */ _CFFI_OP(_CFFI_OP_NOOP, 8),
/* 102 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 103 */ _CFFI_OP(_CFFI_OP_FUNCTION, 168), // uint8_t()(mpd_t const *)
/* 104 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
/* 105 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 106 */ _CFFI_OP(_CFFI_OP_FUNCTION, 201), // void()(mpd_context_t *)
/* 107 */ _CFFI_OP(_CFFI_OP_NOOP, 23),
/* 108 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 109 */ _CFFI_OP(_CFFI_OP_FUNCTION, 201), // void()(mpd_t *)
/* 110 */ _CFFI_OP(_CFFI_OP_NOOP, 43),
/* 111 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 112 */ _CFFI_OP(_CFFI_OP_FUNCTION, 201), // void()(mpd_t *, char const *, mpd_context_t const *, uint32_t *)
/* 113 */ _CFFI_OP(_CFFI_OP_NOOP, 43),
/* 114 */ _CFFI_OP(_CFFI_OP_NOOP, 39),
/* 115 */ _CFFI_OP(_CFFI_OP_NOOP, 7),
/* 116 */ _CFFI_OP(_CFFI_OP_NOOP, 8),
/* 117 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 118 */ _CFFI_OP(_CFFI_OP_FUNCTION, 201), // void()(mpd_t *, mpd_context_t const *, uint32_t *)
/* 119 */ _CFFI_OP(_CFFI_OP_NOOP, 43),
/* 120 */ _CFFI_OP(_CFFI_OP_NOOP, 7),
/* 121 */ _CFFI_OP(_CFFI_OP_NOOP, 8),
/* 122 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 123 */ _CFFI_OP(_CFFI_OP_FUNCTION, 201), // void()(mpd_t *, mpd_t *, mpd_t const *, mpd_t const *, mpd_context_t const *, uint32_t *)
/* 124 */ _CFFI_OP(_CFFI_OP_NOOP, 43),
/* 125 */ _CFFI_OP(_CFFI_OP_NOOP, 43),
/* 126 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
/* 127 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
/* 128 */ _CFFI_OP(_CFFI_OP_NOOP, 7),
/* 129 */ _CFFI_OP(_CFFI_OP_NOOP, 8),
/* 130 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 131 */ _CFFI_OP(_CFFI_OP_FUNCTION, 201), // void()(mpd_t *, mpd_t const *, mpd_context_t const *, uint32_t *)
/* 132 */ _CFFI_OP(_CFFI_OP_NOOP, 43),
/* 133 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
/* 134 */ _CFFI_OP(_CFFI_OP_NOOP, 7),
/* 135 */ _CFFI_OP(_CFFI_OP_NOOP, 8),
/* 136 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 137 */ _CFFI_OP(_CFFI_OP_FUNCTION, 201), // void()(mpd_t *, mpd_t const *, mpd_t const *, mpd_context_t const *, uint32_t *)
/* 138 */ _CFFI_OP(_CFFI_OP_NOOP, 43),
/* 139 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
/* 140 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
/* 141 */ _CFFI_OP(_CFFI_OP_NOOP, 7),
/* 142 */ _CFFI_OP(_CFFI_OP_NOOP, 8),
/* 143 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 144 */ _CFFI_OP(_CFFI_OP_FUNCTION, 201), // void()(mpd_t *, mpd_t const *, mpd_t const *, mpd_t const *, mpd_context_t const *, uint32_t *)
/* 145 */ _CFFI_OP(_CFFI_OP_NOOP, 43),
/* 146 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
/* 147 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
/* 148 */ _CFFI_OP(_CFFI_OP_NOOP, 1),
/* 149 */ _CFFI_OP(_CFFI_OP_NOOP, 7),
/* 150 */ _CFFI_OP(_CFFI_OP_NOOP, 8),
/* 151 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 152 */ _CFFI_OP(_CFFI_OP_FUNCTION, 201), // void()(mpd_t *, size_t, mpd_context_t const *, uint32_t *)
/* 153 */ _CFFI_OP(_CFFI_OP_NOOP, 43),
/* 154 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 28),
/* 155 */ _CFFI_OP(_CFFI_OP_NOOP, 7),
/* 156 */ _CFFI_OP(_CFFI_OP_NOOP, 8),
/* 157 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 158 */ _CFFI_OP(_CFFI_OP_FUNCTION, 201), // void()(mpd_t *, ssize_t, mpd_context_t const *, uint32_t *)
/* 159 */ _CFFI_OP(_CFFI_OP_NOOP, 43),
/* 160 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 29),
/* 161 */ _CFFI_OP(_CFFI_OP_NOOP, 7),
/* 162 */ _CFFI_OP(_CFFI_OP_NOOP, 8),
/* 163 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 164 */ _CFFI_OP(_CFFI_OP_FUNCTION, 201), // void()(mpd_t *, uint16_t const *, size_t, uint8_t, uint32_t, mpd_context_t const *, uint32_t *)
/* 165 */ _CFFI_OP(_CFFI_OP_NOOP, 43),
/* 166 */ _CFFI_OP(_CFFI_OP_POINTER, 200), // uint16_t const *
/* 167 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 28),
/* 168 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 18), // uint8_t
/* 169 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 22),
/* 170 */ _CFFI_OP(_CFFI_OP_NOOP, 7),
/* 171 */ _CFFI_OP(_CFFI_OP_NOOP, 8),
/* 172 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 173 */ _CFFI_OP(_CFFI_OP_FUNCTION, 201), // void()(mpd_t *, uint32_t, uint32_t *)
/* 174 */ _CFFI_OP(_CFFI_OP_NOOP, 43),
/* 175 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 22),
/* 176 */ _CFFI_OP(_CFFI_OP_NOOP, 8),
/* 177 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 178 */ _CFFI_OP(_CFFI_OP_FUNCTION, 201), // void()(mpd_t *, uint8_t)
/* 179 */ _CFFI_OP(_CFFI_OP_NOOP, 43),
/* 180 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 18),
/* 181 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 182 */ _CFFI_OP(_CFFI_OP_FUNCTION, 201), // void()(mpd_t *, uint8_t, uint8_t)
/* 183 */ _CFFI_OP(_CFFI_OP_NOOP, 43),
/* 184 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 18),
/* 185 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 18),
/* 186 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 187 */ _CFFI_OP(_CFFI_OP_FUNCTION, 201), // void()(void *)
/* 188 */ _CFFI_OP(_CFFI_OP_POINTER, 201), // void *
/* 189 */ _CFFI_OP(_CFFI_OP_FUNCTION_END, 0),
/* 190 */ _CFFI_OP(_CFFI_OP_OPEN_ARRAY, 39), // char const *[]
/* 191 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 2), // char
/* 192 */ _CFFI_OP(_CFFI_OP_ARRAY, 191), // char[5]
/* 193 */ (_cffi_opcode_t)(5),
/* 194 */ _CFFI_OP(_CFFI_OP_ENUM, 0), // enum $1
/* 195 */ _CFFI_OP(_CFFI_OP_STRUCT_UNION, 0), // mpd_context_t
/* 196 */ _CFFI_OP(_CFFI_OP_STRUCT_UNION, 1), // mpd_spec_t
/* 197 */ _CFFI_OP(_CFFI_OP_STRUCT_UNION, 2), // mpd_t
/* 198 */ _CFFI_OP(_CFFI_OP_POINTER, 88), // size_t *
/* 199 */ _CFFI_OP(_CFFI_OP_POINTER, 200), // uint16_t *
/* 200 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 20), // uint16_t
/* 201 */ _CFFI_OP(_CFFI_OP_PRIMITIVE, 0), // void
};

static int _cffi_const_MPD_ROUND_UP(unsigned long long *o)
{
  int n = (MPD_ROUND_UP) <= 0;
  *o = (unsigned long long)((MPD_ROUND_UP) | 0);  /* check that MPD_ROUND_UP is an integer */
  return n;
}

static int _cffi_const_MPD_ROUND_DOWN(unsigned long long *o)
{
  int n = (MPD_ROUND_DOWN) <= 0;
  *o = (unsigned long long)((MPD_ROUND_DOWN) | 0);  /* check that MPD_ROUND_DOWN is an integer */
  return n;
}

static int _cffi_const_MPD_ROUND_CEILING(unsigned long long *o)
{
  int n = (MPD_ROUND_CEILING) <= 0;
  *o = (unsigned long long)((MPD_ROUND_CEILING) | 0);  /* check that MPD_ROUND_CEILING is an integer */
  return n;
}

static int _cffi_const_MPD_ROUND_FLOOR(unsigned long long *o)
{
  int n = (MPD_ROUND_FLOOR) <= 0;
  *o = (unsigned long long)((MPD_ROUND_FLOOR) | 0);  /* check that MPD_ROUND_FLOOR is an integer */
  return n;
}

static int _cffi_const_MPD_ROUND_HALF_UP(unsigned long long *o)
{
  int n = (MPD_ROUND_HALF_UP) <= 0;
  *o = (unsigned long long)((MPD_ROUND_HALF_UP) | 0);  /* check that MPD_ROUND_HALF_UP is an integer */
  return n;
}

static int _cffi_const_MPD_ROUND_HALF_DOWN(unsigned long long *o)
{
  int n = (MPD_ROUND_HALF_DOWN) <= 0;
  *o = (unsigned long long)((MPD_ROUND_HALF_DOWN) | 0);  /* check that MPD_ROUND_HALF_DOWN is an integer */
  return n;
}

static int _cffi_const_MPD_ROUND_HALF_EVEN(unsigned long long *o)
{
  int n = (MPD_ROUND_HALF_EVEN) <= 0;
  *o = (unsigned long long)((MPD_ROUND_HALF_EVEN) | 0);  /* check that MPD_ROUND_HALF_EVEN is an integer */
  return n;
}

static int _cffi_const_MPD_ROUND_05UP(unsigned long long *o)
{
  int n = (MPD_ROUND_05UP) <= 0;
  *o = (unsigned long long)((MPD_ROUND_05UP) | 0);  /* check that MPD_ROUND_05UP is an integer */
  return n;
}

static int _cffi_const_MPD_ROUND_TRUNC(unsigned long long *o)
{
  int n = (MPD_ROUND_TRUNC) <= 0;
  *o = (unsigned long long)((MPD_ROUND_TRUNC) | 0);  /* check that MPD_ROUND_TRUNC is an integer */
  return n;
}

static int _cffi_const_MPD_ROUND_GUARD(unsigned long long *o)
{
  int n = (MPD_ROUND_GUARD) <= 0;
  *o = (unsigned long long)((MPD_ROUND_GUARD) | 0);  /* check that MPD_ROUND_GUARD is an integer */
  return n;
}

static ssize_t _cffi_d_mpd_adjexp(mpd_t const * x0)
{
  return mpd_adjexp(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_adjexp(PyObject *self, PyObject *arg0)
{
  mpd_t const * x0;
  Py_ssize_t datasize;
  ssize_t result;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(1), arg0) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_adjexp(x0); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, ssize_t);
}
#else
#  define _cffi_f_mpd_adjexp _cffi_d_mpd_adjexp
#endif

static char const * _cffi_d_mpd_class(mpd_t const * x0, mpd_context_t const * x1)
{
  return mpd_class(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_class(PyObject *self, PyObject *args)
{
  mpd_t const * x0;
  mpd_context_t const * x1;
  Py_ssize_t datasize;
  char const * result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_UnpackTuple(args, "mpd_class", 2, 2, &arg0, &arg1))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(1), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(7), arg1) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_class(x0, x1); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_pointer((char *)result, _cffi_type(39));
}
#else
#  define _cffi_f_mpd_class _cffi_d_mpd_class
#endif

static void _cffi_d_mpd_clear_flags(mpd_t * x0)
{
  mpd_clear_flags(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_clear_flags(PyObject *self, PyObject *arg0)
{
  mpd_t * x0;
  Py_ssize_t datasize;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_clear_flags(x0); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_clear_flags _cffi_d_mpd_clear_flags
#endif

static int _cffi_d_mpd_compare_total(mpd_t * x0, mpd_t const * x1, mpd_t const * x2)
{
  return mpd_compare_total(x0, x1, x2);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_compare_total(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_t const * x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_UnpackTuple(args, "mpd_compare_total", 3, 3, &arg0, &arg1, &arg2))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(1), arg2) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_compare_total(x0, x1, x2); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, int);
}
#else
#  define _cffi_f_mpd_compare_total _cffi_d_mpd_compare_total
#endif

static int _cffi_d_mpd_compare_total_mag(mpd_t * x0, mpd_t const * x1, mpd_t const * x2)
{
  return mpd_compare_total_mag(x0, x1, x2);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_compare_total_mag(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_t const * x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_UnpackTuple(args, "mpd_compare_total_mag", 3, 3, &arg0, &arg1, &arg2))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(1), arg2) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_compare_total_mag(x0, x1, x2); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, int);
}
#else
#  define _cffi_f_mpd_compare_total_mag _cffi_d_mpd_compare_total_mag
#endif

static void _cffi_d_mpd_del(mpd_t * x0)
{
  mpd_del(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_del(PyObject *self, PyObject *arg0)
{
  mpd_t * x0;
  Py_ssize_t datasize;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_del(x0); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_del _cffi_d_mpd_del
#endif

static ssize_t _cffi_d_mpd_etiny(mpd_context_t const * x0)
{
  return mpd_etiny(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_etiny(PyObject *self, PyObject *arg0)
{
  mpd_context_t const * x0;
  Py_ssize_t datasize;
  ssize_t result;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(7), arg0) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_etiny(x0); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, ssize_t);
}
#else
#  define _cffi_f_mpd_etiny _cffi_d_mpd_etiny
#endif

static ssize_t _cffi_d_mpd_etop(mpd_context_t const * x0)
{
  return mpd_etop(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_etop(PyObject *self, PyObject *arg0)
{
  mpd_context_t const * x0;
  Py_ssize_t datasize;
  ssize_t result;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(7), arg0) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_etop(x0); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, ssize_t);
}
#else
#  define _cffi_f_mpd_etop _cffi_d_mpd_etop
#endif

static void _cffi_d_mpd_free(void * x0)
{
  mpd_free(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_free(PyObject *self, PyObject *arg0)
{
  void * x0;
  Py_ssize_t datasize;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(188), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (void *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(188), arg0) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_free(x0); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_free _cffi_d_mpd_free
#endif

static int _cffi_d_mpd_isfinite(mpd_t const * x0)
{
  return mpd_isfinite(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_isfinite(PyObject *self, PyObject *arg0)
{
  mpd_t const * x0;
  Py_ssize_t datasize;
  int result;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(1), arg0) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_isfinite(x0); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, int);
}
#else
#  define _cffi_f_mpd_isfinite _cffi_d_mpd_isfinite
#endif

static int _cffi_d_mpd_isinfinite(mpd_t const * x0)
{
  return mpd_isinfinite(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_isinfinite(PyObject *self, PyObject *arg0)
{
  mpd_t const * x0;
  Py_ssize_t datasize;
  int result;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(1), arg0) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_isinfinite(x0); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, int);
}
#else
#  define _cffi_f_mpd_isinfinite _cffi_d_mpd_isinfinite
#endif

static int _cffi_d_mpd_isnan(mpd_t const * x0)
{
  return mpd_isnan(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_isnan(PyObject *self, PyObject *arg0)
{
  mpd_t const * x0;
  Py_ssize_t datasize;
  int result;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(1), arg0) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_isnan(x0); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, int);
}
#else
#  define _cffi_f_mpd_isnan _cffi_d_mpd_isnan
#endif

static int _cffi_d_mpd_isnegative(mpd_t const * x0)
{
  return mpd_isnegative(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_isnegative(PyObject *self, PyObject *arg0)
{
  mpd_t const * x0;
  Py_ssize_t datasize;
  int result;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(1), arg0) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_isnegative(x0); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, int);
}
#else
#  define _cffi_f_mpd_isnegative _cffi_d_mpd_isnegative
#endif

static int _cffi_d_mpd_isnormal(mpd_t const * x0, mpd_context_t const * x1)
{
  return mpd_isnormal(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_isnormal(PyObject *self, PyObject *args)
{
  mpd_t const * x0;
  mpd_context_t const * x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_UnpackTuple(args, "mpd_isnormal", 2, 2, &arg0, &arg1))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(1), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(7), arg1) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_isnormal(x0, x1); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, int);
}
#else
#  define _cffi_f_mpd_isnormal _cffi_d_mpd_isnormal
#endif

static int _cffi_d_mpd_ispositive(mpd_t const * x0)
{
  return mpd_ispositive(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_ispositive(PyObject *self, PyObject *arg0)
{
  mpd_t const * x0;
  Py_ssize_t datasize;
  int result;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(1), arg0) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_ispositive(x0); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, int);
}
#else
#  define _cffi_f_mpd_ispositive _cffi_d_mpd_ispositive
#endif

static int _cffi_d_mpd_isqnan(mpd_t const * x0)
{
  return mpd_isqnan(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_isqnan(PyObject *self, PyObject *arg0)
{
  mpd_t const * x0;
  Py_ssize_t datasize;
  int result;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(1), arg0) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_isqnan(x0); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, int);
}
#else
#  define _cffi_f_mpd_isqnan _cffi_d_mpd_isqnan
#endif

static int _cffi_d_mpd_issigned(mpd_t const * x0)
{
  return mpd_issigned(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_issigned(PyObject *self, PyObject *arg0)
{
  mpd_t const * x0;
  Py_ssize_t datasize;
  int result;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(1), arg0) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_issigned(x0); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, int);
}
#else
#  define _cffi_f_mpd_issigned _cffi_d_mpd_issigned
#endif

static int _cffi_d_mpd_issnan(mpd_t const * x0)
{
  return mpd_issnan(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_issnan(PyObject *self, PyObject *arg0)
{
  mpd_t const * x0;
  Py_ssize_t datasize;
  int result;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(1), arg0) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_issnan(x0); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, int);
}
#else
#  define _cffi_f_mpd_issnan _cffi_d_mpd_issnan
#endif

static int _cffi_d_mpd_isspecial(mpd_t const * x0)
{
  return mpd_isspecial(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_isspecial(PyObject *self, PyObject *arg0)
{
  mpd_t const * x0;
  Py_ssize_t datasize;
  int result;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(1), arg0) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_isspecial(x0); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, int);
}
#else
#  define _cffi_f_mpd_isspecial _cffi_d_mpd_isspecial
#endif

static int _cffi_d_mpd_issubnormal(mpd_t const * x0, mpd_context_t const * x1)
{
  return mpd_issubnormal(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_issubnormal(PyObject *self, PyObject *args)
{
  mpd_t const * x0;
  mpd_context_t const * x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_UnpackTuple(args, "mpd_issubnormal", 2, 2, &arg0, &arg1))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(1), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(7), arg1) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_issubnormal(x0, x1); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, int);
}
#else
#  define _cffi_f_mpd_issubnormal _cffi_d_mpd_issubnormal
#endif

static int _cffi_d_mpd_iszero(mpd_t const * x0)
{
  return mpd_iszero(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_iszero(PyObject *self, PyObject *arg0)
{
  mpd_t const * x0;
  Py_ssize_t datasize;
  int result;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(1), arg0) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_iszero(x0); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, int);
}
#else
#  define _cffi_f_mpd_iszero _cffi_d_mpd_iszero
#endif

static int _cffi_d_mpd_lsnprint_signals(char * x0, int x1, uint32_t x2, char const * * x3)
{
  return mpd_lsnprint_signals(x0, x1, x2, x3);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_lsnprint_signals(PyObject *self, PyObject *args)
{
  char * x0;
  int x1;
  uint32_t x2;
  char const * * x3;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_UnpackTuple(args, "mpd_lsnprint_signals", 4, 4, &arg0, &arg1, &arg2, &arg3))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(17), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (char *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(17), arg0) < 0)
      return NULL;
  }

  x1 = _cffi_to_c_int(arg1, int);
  if (x1 == (int)-1 && PyErr_Occurred())
    return NULL;

  x2 = _cffi_to_c_int(arg2, uint32_t);
  if (x2 == (uint32_t)-1 && PyErr_Occurred())
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(20), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (char const * *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(20), arg3) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_lsnprint_signals(x0, x1, x2, x3); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, int);
}
#else
#  define _cffi_f_mpd_lsnprint_signals _cffi_d_mpd_lsnprint_signals
#endif

static void _cffi_d_mpd_maxcontext(mpd_context_t * x0)
{
  mpd_maxcontext(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_maxcontext(PyObject *self, PyObject *arg0)
{
  mpd_context_t * x0;
  Py_ssize_t datasize;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(23), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_context_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(23), arg0) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_maxcontext(x0); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_maxcontext _cffi_d_mpd_maxcontext
#endif

static int _cffi_d_mpd_parse_fmt_str(mpd_spec_t * x0, char const * x1, int x2)
{
  return mpd_parse_fmt_str(x0, x1, x2);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_parse_fmt_str(PyObject *self, PyObject *args)
{
  mpd_spec_t * x0;
  char const * x1;
  int x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_UnpackTuple(args, "mpd_parse_fmt_str", 3, 3, &arg0, &arg1, &arg2))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(35), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_spec_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(35), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(39), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (char const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(39), arg1) < 0)
      return NULL;
  }

  x2 = _cffi_to_c_int(arg2, int);
  if (x2 == (int)-1 && PyErr_Occurred())
    return NULL;

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_parse_fmt_str(x0, x1, x2); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, int);
}
#else
#  define _cffi_f_mpd_parse_fmt_str _cffi_d_mpd_parse_fmt_str
#endif

static void _cffi_d_mpd_qabs(mpd_t * x0, mpd_t const * x1, mpd_context_t const * x2, uint32_t * x3)
{
  mpd_qabs(x0, x1, x2, x3);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qabs(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_context_t const * x2;
  uint32_t * x3;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_UnpackTuple(args, "mpd_qabs", 4, 4, &arg0, &arg1, &arg2, &arg3))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(7), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(8), arg3) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qabs(x0, x1, x2, x3); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qabs _cffi_d_mpd_qabs
#endif

static void _cffi_d_mpd_qadd(mpd_t * x0, mpd_t const * x1, mpd_t const * x2, mpd_context_t const * x3, uint32_t * x4)
{
  mpd_qadd(x0, x1, x2, x3, x4);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qadd(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_t const * x2;
  mpd_context_t const * x3;
  uint32_t * x4;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_UnpackTuple(args, "mpd_qadd", 5, 5, &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(1), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(7), arg3) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg4, (char **)&x4);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x4 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x4, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x4, _cffi_type(8), arg4) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qadd(x0, x1, x2, x3, x4); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qadd _cffi_d_mpd_qadd
#endif

static void _cffi_d_mpd_qand(mpd_t * x0, mpd_t const * x1, mpd_t const * x2, mpd_context_t const * x3, uint32_t * x4)
{
  mpd_qand(x0, x1, x2, x3, x4);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qand(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_t const * x2;
  mpd_context_t const * x3;
  uint32_t * x4;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_UnpackTuple(args, "mpd_qand", 5, 5, &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(1), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(7), arg3) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg4, (char **)&x4);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x4 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x4, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x4, _cffi_type(8), arg4) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qand(x0, x1, x2, x3, x4); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qand _cffi_d_mpd_qand
#endif

static int _cffi_d_mpd_qcmp(mpd_t const * x0, mpd_t const * x1, uint32_t * x2)
{
  return mpd_qcmp(x0, x1, x2);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qcmp(PyObject *self, PyObject *args)
{
  mpd_t const * x0;
  mpd_t const * x1;
  uint32_t * x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_UnpackTuple(args, "mpd_qcmp", 3, 3, &arg0, &arg1, &arg2))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(1), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(8), arg2) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_qcmp(x0, x1, x2); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, int);
}
#else
#  define _cffi_f_mpd_qcmp _cffi_d_mpd_qcmp
#endif

static int _cffi_d_mpd_qcompare(mpd_t * x0, mpd_t const * x1, mpd_t const * x2, mpd_context_t const * x3, uint32_t * x4)
{
  return mpd_qcompare(x0, x1, x2, x3, x4);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qcompare(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_t const * x2;
  mpd_context_t const * x3;
  uint32_t * x4;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_UnpackTuple(args, "mpd_qcompare", 5, 5, &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(1), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(7), arg3) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg4, (char **)&x4);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x4 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x4, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x4, _cffi_type(8), arg4) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_qcompare(x0, x1, x2, x3, x4); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, int);
}
#else
#  define _cffi_f_mpd_qcompare _cffi_d_mpd_qcompare
#endif

static int _cffi_d_mpd_qcompare_signal(mpd_t * x0, mpd_t const * x1, mpd_t const * x2, mpd_context_t const * x3, uint32_t * x4)
{
  return mpd_qcompare_signal(x0, x1, x2, x3, x4);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qcompare_signal(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_t const * x2;
  mpd_context_t const * x3;
  uint32_t * x4;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_UnpackTuple(args, "mpd_qcompare_signal", 5, 5, &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(1), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(7), arg3) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg4, (char **)&x4);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x4 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x4, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x4, _cffi_type(8), arg4) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_qcompare_signal(x0, x1, x2, x3, x4); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, int);
}
#else
#  define _cffi_f_mpd_qcompare_signal _cffi_d_mpd_qcompare_signal
#endif

static int _cffi_d_mpd_qcopy(mpd_t * x0, mpd_t const * x1, uint32_t * x2)
{
  return mpd_qcopy(x0, x1, x2);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qcopy(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  uint32_t * x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_UnpackTuple(args, "mpd_qcopy", 3, 3, &arg0, &arg1, &arg2))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(8), arg2) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_qcopy(x0, x1, x2); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, int);
}
#else
#  define _cffi_f_mpd_qcopy _cffi_d_mpd_qcopy
#endif

static int _cffi_d_mpd_qcopy_abs(mpd_t * x0, mpd_t const * x1, uint32_t * x2)
{
  return mpd_qcopy_abs(x0, x1, x2);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qcopy_abs(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  uint32_t * x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_UnpackTuple(args, "mpd_qcopy_abs", 3, 3, &arg0, &arg1, &arg2))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(8), arg2) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_qcopy_abs(x0, x1, x2); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, int);
}
#else
#  define _cffi_f_mpd_qcopy_abs _cffi_d_mpd_qcopy_abs
#endif

static int _cffi_d_mpd_qcopy_negate(mpd_t * x0, mpd_t const * x1, uint32_t * x2)
{
  return mpd_qcopy_negate(x0, x1, x2);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qcopy_negate(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  uint32_t * x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_UnpackTuple(args, "mpd_qcopy_negate", 3, 3, &arg0, &arg1, &arg2))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(8), arg2) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_qcopy_negate(x0, x1, x2); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, int);
}
#else
#  define _cffi_f_mpd_qcopy_negate _cffi_d_mpd_qcopy_negate
#endif

static int _cffi_d_mpd_qcopy_sign(mpd_t * x0, mpd_t const * x1, mpd_t const * x2, uint32_t * x3)
{
  return mpd_qcopy_sign(x0, x1, x2, x3);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qcopy_sign(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_t const * x2;
  uint32_t * x3;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_UnpackTuple(args, "mpd_qcopy_sign", 4, 4, &arg0, &arg1, &arg2, &arg3))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(1), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(8), arg3) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_qcopy_sign(x0, x1, x2, x3); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, int);
}
#else
#  define _cffi_f_mpd_qcopy_sign _cffi_d_mpd_qcopy_sign
#endif

static void _cffi_d_mpd_qdiv(mpd_t * x0, mpd_t const * x1, mpd_t const * x2, mpd_context_t const * x3, uint32_t * x4)
{
  mpd_qdiv(x0, x1, x2, x3, x4);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qdiv(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_t const * x2;
  mpd_context_t const * x3;
  uint32_t * x4;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_UnpackTuple(args, "mpd_qdiv", 5, 5, &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(1), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(7), arg3) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg4, (char **)&x4);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x4 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x4, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x4, _cffi_type(8), arg4) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qdiv(x0, x1, x2, x3, x4); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qdiv _cffi_d_mpd_qdiv
#endif

static void _cffi_d_mpd_qdivint(mpd_t * x0, mpd_t const * x1, mpd_t const * x2, mpd_context_t const * x3, uint32_t * x4)
{
  mpd_qdivint(x0, x1, x2, x3, x4);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qdivint(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_t const * x2;
  mpd_context_t const * x3;
  uint32_t * x4;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_UnpackTuple(args, "mpd_qdivint", 5, 5, &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(1), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(7), arg3) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg4, (char **)&x4);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x4 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x4, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x4, _cffi_type(8), arg4) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qdivint(x0, x1, x2, x3, x4); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qdivint _cffi_d_mpd_qdivint
#endif

static void _cffi_d_mpd_qdivmod(mpd_t * x0, mpd_t * x1, mpd_t const * x2, mpd_t const * x3, mpd_context_t const * x4, uint32_t * x5)
{
  mpd_qdivmod(x0, x1, x2, x3, x4, x5);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qdivmod(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t * x1;
  mpd_t const * x2;
  mpd_t const * x3;
  mpd_context_t const * x4;
  uint32_t * x5;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;
  PyObject *arg5;

  if (!PyArg_UnpackTuple(args, "mpd_qdivmod", 6, 6, &arg0, &arg1, &arg2, &arg3, &arg4, &arg5))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(43), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(1), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(1), arg3) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg4, (char **)&x4);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x4 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x4, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x4, _cffi_type(7), arg4) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg5, (char **)&x5);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x5 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x5, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x5, _cffi_type(8), arg5) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qdivmod(x0, x1, x2, x3, x4, x5); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qdivmod _cffi_d_mpd_qdivmod
#endif

static void _cffi_d_mpd_qexp(mpd_t * x0, mpd_t const * x1, mpd_context_t const * x2, uint32_t * x3)
{
  mpd_qexp(x0, x1, x2, x3);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qexp(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_context_t const * x2;
  uint32_t * x3;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_UnpackTuple(args, "mpd_qexp", 4, 4, &arg0, &arg1, &arg2, &arg3))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(7), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(8), arg3) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qexp(x0, x1, x2, x3); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qexp _cffi_d_mpd_qexp
#endif

static size_t _cffi_d_mpd_qexport_u16(uint16_t * * x0, size_t x1, uint32_t x2, mpd_t const * x3, uint32_t * x4)
{
  return mpd_qexport_u16(x0, x1, x2, x3, x4);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qexport_u16(PyObject *self, PyObject *args)
{
  uint16_t * * x0;
  size_t x1;
  uint32_t x2;
  mpd_t const * x3;
  uint32_t * x4;
  Py_ssize_t datasize;
  size_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_UnpackTuple(args, "mpd_qexport_u16", 5, 5, &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(87), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (uint16_t * *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(87), arg0) < 0)
      return NULL;
  }

  x1 = _cffi_to_c_int(arg1, size_t);
  if (x1 == (size_t)-1 && PyErr_Occurred())
    return NULL;

  x2 = _cffi_to_c_int(arg2, uint32_t);
  if (x2 == (uint32_t)-1 && PyErr_Occurred())
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(1), arg3) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg4, (char **)&x4);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x4 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x4, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x4, _cffi_type(8), arg4) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_qexport_u16(x0, x1, x2, x3, x4); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, size_t);
}
#else
#  define _cffi_f_mpd_qexport_u16 _cffi_d_mpd_qexport_u16
#endif

static void _cffi_d_mpd_qfinalize(mpd_t * x0, mpd_context_t const * x1, uint32_t * x2)
{
  mpd_qfinalize(x0, x1, x2);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qfinalize(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_context_t const * x1;
  uint32_t * x2;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_UnpackTuple(args, "mpd_qfinalize", 3, 3, &arg0, &arg1, &arg2))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(7), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(8), arg2) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qfinalize(x0, x1, x2); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qfinalize _cffi_d_mpd_qfinalize
#endif

static void _cffi_d_mpd_qfma(mpd_t * x0, mpd_t const * x1, mpd_t const * x2, mpd_t const * x3, mpd_context_t const * x4, uint32_t * x5)
{
  mpd_qfma(x0, x1, x2, x3, x4, x5);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qfma(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_t const * x2;
  mpd_t const * x3;
  mpd_context_t const * x4;
  uint32_t * x5;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;
  PyObject *arg5;

  if (!PyArg_UnpackTuple(args, "mpd_qfma", 6, 6, &arg0, &arg1, &arg2, &arg3, &arg4, &arg5))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(1), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(1), arg3) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg4, (char **)&x4);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x4 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x4, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x4, _cffi_type(7), arg4) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg5, (char **)&x5);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x5 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x5, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x5, _cffi_type(8), arg5) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qfma(x0, x1, x2, x3, x4, x5); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qfma _cffi_d_mpd_qfma
#endif

static char * _cffi_d_mpd_qformat_spec(mpd_t const * x0, mpd_spec_t const * x1, mpd_context_t const * x2, uint32_t * x3)
{
  return mpd_qformat_spec(x0, x1, x2, x3);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qformat_spec(PyObject *self, PyObject *args)
{
  mpd_t const * x0;
  mpd_spec_t const * x1;
  mpd_context_t const * x2;
  uint32_t * x3;
  Py_ssize_t datasize;
  char * result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_UnpackTuple(args, "mpd_qformat_spec", 4, 4, &arg0, &arg1, &arg2, &arg3))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(1), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(6), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_spec_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(6), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(7), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(8), arg3) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_qformat_spec(x0, x1, x2, x3); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_pointer((char *)result, _cffi_type(17));
}
#else
#  define _cffi_f_mpd_qformat_spec _cffi_d_mpd_qformat_spec
#endif

static ssize_t _cffi_d_mpd_qget_ssize(mpd_t const * x0, uint32_t * x1)
{
  return mpd_qget_ssize(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qget_ssize(PyObject *self, PyObject *args)
{
  mpd_t const * x0;
  uint32_t * x1;
  Py_ssize_t datasize;
  ssize_t result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_UnpackTuple(args, "mpd_qget_ssize", 2, 2, &arg0, &arg1))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(1), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(8), arg1) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_qget_ssize(x0, x1); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, ssize_t);
}
#else
#  define _cffi_f_mpd_qget_ssize _cffi_d_mpd_qget_ssize
#endif

static void _cffi_d_mpd_qimport_u16(mpd_t * x0, uint16_t const * x1, size_t x2, uint8_t x3, uint32_t x4, mpd_context_t const * x5, uint32_t * x6)
{
  mpd_qimport_u16(x0, x1, x2, x3, x4, x5, x6);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qimport_u16(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  uint16_t const * x1;
  size_t x2;
  uint8_t x3;
  uint32_t x4;
  mpd_context_t const * x5;
  uint32_t * x6;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;
  PyObject *arg5;
  PyObject *arg6;

  if (!PyArg_UnpackTuple(args, "mpd_qimport_u16", 7, 7, &arg0, &arg1, &arg2, &arg3, &arg4, &arg5, &arg6))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(166), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (uint16_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(166), arg1) < 0)
      return NULL;
  }

  x2 = _cffi_to_c_int(arg2, size_t);
  if (x2 == (size_t)-1 && PyErr_Occurred())
    return NULL;

  x3 = _cffi_to_c_int(arg3, uint8_t);
  if (x3 == (uint8_t)-1 && PyErr_Occurred())
    return NULL;

  x4 = _cffi_to_c_int(arg4, uint32_t);
  if (x4 == (uint32_t)-1 && PyErr_Occurred())
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg5, (char **)&x5);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x5 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x5, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x5, _cffi_type(7), arg5) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg6, (char **)&x6);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x6 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x6, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x6, _cffi_type(8), arg6) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qimport_u16(x0, x1, x2, x3, x4, x5, x6); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qimport_u16 _cffi_d_mpd_qimport_u16
#endif

static void _cffi_d_mpd_qinvert(mpd_t * x0, mpd_t const * x1, mpd_context_t const * x2, uint32_t * x3)
{
  mpd_qinvert(x0, x1, x2, x3);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qinvert(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_context_t const * x2;
  uint32_t * x3;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_UnpackTuple(args, "mpd_qinvert", 4, 4, &arg0, &arg1, &arg2, &arg3))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(7), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(8), arg3) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qinvert(x0, x1, x2, x3); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qinvert _cffi_d_mpd_qinvert
#endif

static void _cffi_d_mpd_qln(mpd_t * x0, mpd_t const * x1, mpd_context_t const * x2, uint32_t * x3)
{
  mpd_qln(x0, x1, x2, x3);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qln(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_context_t const * x2;
  uint32_t * x3;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_UnpackTuple(args, "mpd_qln", 4, 4, &arg0, &arg1, &arg2, &arg3))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(7), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(8), arg3) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qln(x0, x1, x2, x3); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qln _cffi_d_mpd_qln
#endif

static void _cffi_d_mpd_qlog10(mpd_t * x0, mpd_t const * x1, mpd_context_t const * x2, uint32_t * x3)
{
  mpd_qlog10(x0, x1, x2, x3);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qlog10(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_context_t const * x2;
  uint32_t * x3;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_UnpackTuple(args, "mpd_qlog10", 4, 4, &arg0, &arg1, &arg2, &arg3))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(7), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(8), arg3) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qlog10(x0, x1, x2, x3); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qlog10 _cffi_d_mpd_qlog10
#endif

static void _cffi_d_mpd_qlogb(mpd_t * x0, mpd_t const * x1, mpd_context_t const * x2, uint32_t * x3)
{
  mpd_qlogb(x0, x1, x2, x3);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qlogb(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_context_t const * x2;
  uint32_t * x3;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_UnpackTuple(args, "mpd_qlogb", 4, 4, &arg0, &arg1, &arg2, &arg3))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(7), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(8), arg3) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qlogb(x0, x1, x2, x3); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qlogb _cffi_d_mpd_qlogb
#endif

static void _cffi_d_mpd_qmax(mpd_t * x0, mpd_t const * x1, mpd_t const * x2, mpd_context_t const * x3, uint32_t * x4)
{
  mpd_qmax(x0, x1, x2, x3, x4);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qmax(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_t const * x2;
  mpd_context_t const * x3;
  uint32_t * x4;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_UnpackTuple(args, "mpd_qmax", 5, 5, &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(1), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(7), arg3) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg4, (char **)&x4);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x4 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x4, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x4, _cffi_type(8), arg4) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qmax(x0, x1, x2, x3, x4); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qmax _cffi_d_mpd_qmax
#endif

static void _cffi_d_mpd_qmax_mag(mpd_t * x0, mpd_t const * x1, mpd_t const * x2, mpd_context_t const * x3, uint32_t * x4)
{
  mpd_qmax_mag(x0, x1, x2, x3, x4);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qmax_mag(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_t const * x2;
  mpd_context_t const * x3;
  uint32_t * x4;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_UnpackTuple(args, "mpd_qmax_mag", 5, 5, &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(1), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(7), arg3) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg4, (char **)&x4);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x4 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x4, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x4, _cffi_type(8), arg4) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qmax_mag(x0, x1, x2, x3, x4); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qmax_mag _cffi_d_mpd_qmax_mag
#endif

static void _cffi_d_mpd_qmin(mpd_t * x0, mpd_t const * x1, mpd_t const * x2, mpd_context_t const * x3, uint32_t * x4)
{
  mpd_qmin(x0, x1, x2, x3, x4);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qmin(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_t const * x2;
  mpd_context_t const * x3;
  uint32_t * x4;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_UnpackTuple(args, "mpd_qmin", 5, 5, &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(1), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(7), arg3) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg4, (char **)&x4);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x4 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x4, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x4, _cffi_type(8), arg4) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qmin(x0, x1, x2, x3, x4); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qmin _cffi_d_mpd_qmin
#endif

static void _cffi_d_mpd_qmin_mag(mpd_t * x0, mpd_t const * x1, mpd_t const * x2, mpd_context_t const * x3, uint32_t * x4)
{
  mpd_qmin_mag(x0, x1, x2, x3, x4);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qmin_mag(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_t const * x2;
  mpd_context_t const * x3;
  uint32_t * x4;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_UnpackTuple(args, "mpd_qmin_mag", 5, 5, &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(1), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(7), arg3) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg4, (char **)&x4);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x4 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x4, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x4, _cffi_type(8), arg4) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qmin_mag(x0, x1, x2, x3, x4); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qmin_mag _cffi_d_mpd_qmin_mag
#endif

static void _cffi_d_mpd_qminus(mpd_t * x0, mpd_t const * x1, mpd_context_t const * x2, uint32_t * x3)
{
  mpd_qminus(x0, x1, x2, x3);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qminus(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_context_t const * x2;
  uint32_t * x3;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_UnpackTuple(args, "mpd_qminus", 4, 4, &arg0, &arg1, &arg2, &arg3))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(7), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(8), arg3) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qminus(x0, x1, x2, x3); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qminus _cffi_d_mpd_qminus
#endif

static void _cffi_d_mpd_qmul(mpd_t * x0, mpd_t const * x1, mpd_t const * x2, mpd_context_t const * x3, uint32_t * x4)
{
  mpd_qmul(x0, x1, x2, x3, x4);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qmul(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_t const * x2;
  mpd_context_t const * x3;
  uint32_t * x4;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_UnpackTuple(args, "mpd_qmul", 5, 5, &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(1), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(7), arg3) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg4, (char **)&x4);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x4 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x4, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x4, _cffi_type(8), arg4) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qmul(x0, x1, x2, x3, x4); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qmul _cffi_d_mpd_qmul
#endif

static mpd_t * _cffi_d_mpd_qncopy(mpd_t const * x0)
{
  return mpd_qncopy(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qncopy(PyObject *self, PyObject *arg0)
{
  mpd_t const * x0;
  Py_ssize_t datasize;
  mpd_t * result;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(1), arg0) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_qncopy(x0); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_pointer((char *)result, _cffi_type(43));
}
#else
#  define _cffi_f_mpd_qncopy _cffi_d_mpd_qncopy
#endif

static mpd_t * _cffi_d_mpd_qnew(void)
{
  return mpd_qnew();
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qnew(PyObject *self, PyObject *noarg)
{
  mpd_t * result;

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_qnew(); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_from_c_pointer((char *)result, _cffi_type(43));
}
#else
#  define _cffi_f_mpd_qnew _cffi_d_mpd_qnew
#endif

static void _cffi_d_mpd_qnext_minus(mpd_t * x0, mpd_t const * x1, mpd_context_t const * x2, uint32_t * x3)
{
  mpd_qnext_minus(x0, x1, x2, x3);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qnext_minus(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_context_t const * x2;
  uint32_t * x3;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_UnpackTuple(args, "mpd_qnext_minus", 4, 4, &arg0, &arg1, &arg2, &arg3))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(7), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(8), arg3) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qnext_minus(x0, x1, x2, x3); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qnext_minus _cffi_d_mpd_qnext_minus
#endif

static void _cffi_d_mpd_qnext_plus(mpd_t * x0, mpd_t const * x1, mpd_context_t const * x2, uint32_t * x3)
{
  mpd_qnext_plus(x0, x1, x2, x3);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qnext_plus(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_context_t const * x2;
  uint32_t * x3;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_UnpackTuple(args, "mpd_qnext_plus", 4, 4, &arg0, &arg1, &arg2, &arg3))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(7), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(8), arg3) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qnext_plus(x0, x1, x2, x3); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qnext_plus _cffi_d_mpd_qnext_plus
#endif

static void _cffi_d_mpd_qnext_toward(mpd_t * x0, mpd_t const * x1, mpd_t const * x2, mpd_context_t const * x3, uint32_t * x4)
{
  mpd_qnext_toward(x0, x1, x2, x3, x4);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qnext_toward(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_t const * x2;
  mpd_context_t const * x3;
  uint32_t * x4;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_UnpackTuple(args, "mpd_qnext_toward", 5, 5, &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(1), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(7), arg3) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg4, (char **)&x4);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x4 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x4, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x4, _cffi_type(8), arg4) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qnext_toward(x0, x1, x2, x3, x4); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qnext_toward _cffi_d_mpd_qnext_toward
#endif

static void _cffi_d_mpd_qor(mpd_t * x0, mpd_t const * x1, mpd_t const * x2, mpd_context_t const * x3, uint32_t * x4)
{
  mpd_qor(x0, x1, x2, x3, x4);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qor(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_t const * x2;
  mpd_context_t const * x3;
  uint32_t * x4;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_UnpackTuple(args, "mpd_qor", 5, 5, &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(1), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(7), arg3) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg4, (char **)&x4);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x4 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x4, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x4, _cffi_type(8), arg4) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qor(x0, x1, x2, x3, x4); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qor _cffi_d_mpd_qor
#endif

static void _cffi_d_mpd_qplus(mpd_t * x0, mpd_t const * x1, mpd_context_t const * x2, uint32_t * x3)
{
  mpd_qplus(x0, x1, x2, x3);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qplus(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_context_t const * x2;
  uint32_t * x3;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_UnpackTuple(args, "mpd_qplus", 4, 4, &arg0, &arg1, &arg2, &arg3))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(7), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(8), arg3) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qplus(x0, x1, x2, x3); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qplus _cffi_d_mpd_qplus
#endif

static void _cffi_d_mpd_qpow(mpd_t * x0, mpd_t const * x1, mpd_t const * x2, mpd_context_t const * x3, uint32_t * x4)
{
  mpd_qpow(x0, x1, x2, x3, x4);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qpow(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_t const * x2;
  mpd_context_t const * x3;
  uint32_t * x4;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_UnpackTuple(args, "mpd_qpow", 5, 5, &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(1), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(7), arg3) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg4, (char **)&x4);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x4 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x4, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x4, _cffi_type(8), arg4) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qpow(x0, x1, x2, x3, x4); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qpow _cffi_d_mpd_qpow
#endif

static void _cffi_d_mpd_qpowmod(mpd_t * x0, mpd_t const * x1, mpd_t const * x2, mpd_t const * x3, mpd_context_t const * x4, uint32_t * x5)
{
  mpd_qpowmod(x0, x1, x2, x3, x4, x5);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qpowmod(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_t const * x2;
  mpd_t const * x3;
  mpd_context_t const * x4;
  uint32_t * x5;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;
  PyObject *arg5;

  if (!PyArg_UnpackTuple(args, "mpd_qpowmod", 6, 6, &arg0, &arg1, &arg2, &arg3, &arg4, &arg5))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(1), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(1), arg3) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg4, (char **)&x4);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x4 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x4, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x4, _cffi_type(7), arg4) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg5, (char **)&x5);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x5 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x5, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x5, _cffi_type(8), arg5) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qpowmod(x0, x1, x2, x3, x4, x5); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qpowmod _cffi_d_mpd_qpowmod
#endif

static void _cffi_d_mpd_qquantize(mpd_t * x0, mpd_t const * x1, mpd_t const * x2, mpd_context_t const * x3, uint32_t * x4)
{
  mpd_qquantize(x0, x1, x2, x3, x4);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qquantize(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_t const * x2;
  mpd_context_t const * x3;
  uint32_t * x4;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_UnpackTuple(args, "mpd_qquantize", 5, 5, &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(1), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(7), arg3) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg4, (char **)&x4);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x4 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x4, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x4, _cffi_type(8), arg4) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qquantize(x0, x1, x2, x3, x4); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qquantize _cffi_d_mpd_qquantize
#endif

static void _cffi_d_mpd_qreduce(mpd_t * x0, mpd_t const * x1, mpd_context_t const * x2, uint32_t * x3)
{
  mpd_qreduce(x0, x1, x2, x3);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qreduce(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_context_t const * x2;
  uint32_t * x3;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_UnpackTuple(args, "mpd_qreduce", 4, 4, &arg0, &arg1, &arg2, &arg3))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(7), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(8), arg3) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qreduce(x0, x1, x2, x3); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qreduce _cffi_d_mpd_qreduce
#endif

static void _cffi_d_mpd_qrem(mpd_t * x0, mpd_t const * x1, mpd_t const * x2, mpd_context_t const * x3, uint32_t * x4)
{
  mpd_qrem(x0, x1, x2, x3, x4);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qrem(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_t const * x2;
  mpd_context_t const * x3;
  uint32_t * x4;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_UnpackTuple(args, "mpd_qrem", 5, 5, &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(1), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(7), arg3) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg4, (char **)&x4);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x4 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x4, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x4, _cffi_type(8), arg4) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qrem(x0, x1, x2, x3, x4); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qrem _cffi_d_mpd_qrem
#endif

static void _cffi_d_mpd_qrem_near(mpd_t * x0, mpd_t const * x1, mpd_t const * x2, mpd_context_t const * x3, uint32_t * x4)
{
  mpd_qrem_near(x0, x1, x2, x3, x4);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qrem_near(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_t const * x2;
  mpd_context_t const * x3;
  uint32_t * x4;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_UnpackTuple(args, "mpd_qrem_near", 5, 5, &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(1), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(7), arg3) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg4, (char **)&x4);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x4 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x4, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x4, _cffi_type(8), arg4) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qrem_near(x0, x1, x2, x3, x4); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qrem_near _cffi_d_mpd_qrem_near
#endif

static void _cffi_d_mpd_qrotate(mpd_t * x0, mpd_t const * x1, mpd_t const * x2, mpd_context_t const * x3, uint32_t * x4)
{
  mpd_qrotate(x0, x1, x2, x3, x4);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qrotate(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_t const * x2;
  mpd_context_t const * x3;
  uint32_t * x4;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_UnpackTuple(args, "mpd_qrotate", 5, 5, &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(1), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(7), arg3) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg4, (char **)&x4);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x4 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x4, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x4, _cffi_type(8), arg4) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qrotate(x0, x1, x2, x3, x4); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qrotate _cffi_d_mpd_qrotate
#endif

static void _cffi_d_mpd_qround_to_int(mpd_t * x0, mpd_t const * x1, mpd_context_t const * x2, uint32_t * x3)
{
  mpd_qround_to_int(x0, x1, x2, x3);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qround_to_int(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_context_t const * x2;
  uint32_t * x3;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_UnpackTuple(args, "mpd_qround_to_int", 4, 4, &arg0, &arg1, &arg2, &arg3))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(7), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(8), arg3) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qround_to_int(x0, x1, x2, x3); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qround_to_int _cffi_d_mpd_qround_to_int
#endif

static void _cffi_d_mpd_qround_to_intx(mpd_t * x0, mpd_t const * x1, mpd_context_t const * x2, uint32_t * x3)
{
  mpd_qround_to_intx(x0, x1, x2, x3);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qround_to_intx(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_context_t const * x2;
  uint32_t * x3;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_UnpackTuple(args, "mpd_qround_to_intx", 4, 4, &arg0, &arg1, &arg2, &arg3))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(7), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(8), arg3) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qround_to_intx(x0, x1, x2, x3); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qround_to_intx _cffi_d_mpd_qround_to_intx
#endif

static void _cffi_d_mpd_qscaleb(mpd_t * x0, mpd_t const * x1, mpd_t const * x2, mpd_context_t const * x3, uint32_t * x4)
{
  mpd_qscaleb(x0, x1, x2, x3, x4);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qscaleb(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_t const * x2;
  mpd_context_t const * x3;
  uint32_t * x4;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_UnpackTuple(args, "mpd_qscaleb", 5, 5, &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(1), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(7), arg3) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg4, (char **)&x4);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x4 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x4, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x4, _cffi_type(8), arg4) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qscaleb(x0, x1, x2, x3, x4); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qscaleb _cffi_d_mpd_qscaleb
#endif

static void _cffi_d_mpd_qset_ssize(mpd_t * x0, ssize_t x1, mpd_context_t const * x2, uint32_t * x3)
{
  mpd_qset_ssize(x0, x1, x2, x3);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qset_ssize(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  ssize_t x1;
  mpd_context_t const * x2;
  uint32_t * x3;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_UnpackTuple(args, "mpd_qset_ssize", 4, 4, &arg0, &arg1, &arg2, &arg3))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  x1 = _cffi_to_c_int(arg1, ssize_t);
  if (x1 == (ssize_t)-1 && PyErr_Occurred())
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(7), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(8), arg3) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qset_ssize(x0, x1, x2, x3); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qset_ssize _cffi_d_mpd_qset_ssize
#endif

static void _cffi_d_mpd_qset_string(mpd_t * x0, char const * x1, mpd_context_t const * x2, uint32_t * x3)
{
  mpd_qset_string(x0, x1, x2, x3);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qset_string(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  char const * x1;
  mpd_context_t const * x2;
  uint32_t * x3;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_UnpackTuple(args, "mpd_qset_string", 4, 4, &arg0, &arg1, &arg2, &arg3))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(39), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (char const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(39), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(7), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(8), arg3) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qset_string(x0, x1, x2, x3); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qset_string _cffi_d_mpd_qset_string
#endif

static void _cffi_d_mpd_qset_uint(mpd_t * x0, size_t x1, mpd_context_t const * x2, uint32_t * x3)
{
  mpd_qset_uint(x0, x1, x2, x3);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qset_uint(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  size_t x1;
  mpd_context_t const * x2;
  uint32_t * x3;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_UnpackTuple(args, "mpd_qset_uint", 4, 4, &arg0, &arg1, &arg2, &arg3))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  x1 = _cffi_to_c_int(arg1, size_t);
  if (x1 == (size_t)-1 && PyErr_Occurred())
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(7), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(8), arg3) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qset_uint(x0, x1, x2, x3); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qset_uint _cffi_d_mpd_qset_uint
#endif

static int _cffi_d_mpd_qsetclamp(mpd_context_t * x0, int x1)
{
  return mpd_qsetclamp(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qsetclamp(PyObject *self, PyObject *args)
{
  mpd_context_t * x0;
  int x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_UnpackTuple(args, "mpd_qsetclamp", 2, 2, &arg0, &arg1))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(23), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_context_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(23), arg0) < 0)
      return NULL;
  }

  x1 = _cffi_to_c_int(arg1, int);
  if (x1 == (int)-1 && PyErr_Occurred())
    return NULL;

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_qsetclamp(x0, x1); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, int);
}
#else
#  define _cffi_f_mpd_qsetclamp _cffi_d_mpd_qsetclamp
#endif

static int _cffi_d_mpd_qsetemax(mpd_context_t * x0, ssize_t x1)
{
  return mpd_qsetemax(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qsetemax(PyObject *self, PyObject *args)
{
  mpd_context_t * x0;
  ssize_t x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_UnpackTuple(args, "mpd_qsetemax", 2, 2, &arg0, &arg1))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(23), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_context_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(23), arg0) < 0)
      return NULL;
  }

  x1 = _cffi_to_c_int(arg1, ssize_t);
  if (x1 == (ssize_t)-1 && PyErr_Occurred())
    return NULL;

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_qsetemax(x0, x1); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, int);
}
#else
#  define _cffi_f_mpd_qsetemax _cffi_d_mpd_qsetemax
#endif

static int _cffi_d_mpd_qsetemin(mpd_context_t * x0, ssize_t x1)
{
  return mpd_qsetemin(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qsetemin(PyObject *self, PyObject *args)
{
  mpd_context_t * x0;
  ssize_t x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_UnpackTuple(args, "mpd_qsetemin", 2, 2, &arg0, &arg1))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(23), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_context_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(23), arg0) < 0)
      return NULL;
  }

  x1 = _cffi_to_c_int(arg1, ssize_t);
  if (x1 == (ssize_t)-1 && PyErr_Occurred())
    return NULL;

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_qsetemin(x0, x1); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, int);
}
#else
#  define _cffi_f_mpd_qsetemin _cffi_d_mpd_qsetemin
#endif

static int _cffi_d_mpd_qsetprec(mpd_context_t * x0, ssize_t x1)
{
  return mpd_qsetprec(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qsetprec(PyObject *self, PyObject *args)
{
  mpd_context_t * x0;
  ssize_t x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_UnpackTuple(args, "mpd_qsetprec", 2, 2, &arg0, &arg1))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(23), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_context_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(23), arg0) < 0)
      return NULL;
  }

  x1 = _cffi_to_c_int(arg1, ssize_t);
  if (x1 == (ssize_t)-1 && PyErr_Occurred())
    return NULL;

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_qsetprec(x0, x1); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, int);
}
#else
#  define _cffi_f_mpd_qsetprec _cffi_d_mpd_qsetprec
#endif

static int _cffi_d_mpd_qsetround(mpd_context_t * x0, int x1)
{
  return mpd_qsetround(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qsetround(PyObject *self, PyObject *args)
{
  mpd_context_t * x0;
  int x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_UnpackTuple(args, "mpd_qsetround", 2, 2, &arg0, &arg1))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(23), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_context_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(23), arg0) < 0)
      return NULL;
  }

  x1 = _cffi_to_c_int(arg1, int);
  if (x1 == (int)-1 && PyErr_Occurred())
    return NULL;

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_qsetround(x0, x1); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, int);
}
#else
#  define _cffi_f_mpd_qsetround _cffi_d_mpd_qsetround
#endif

static int _cffi_d_mpd_qsetstatus(mpd_context_t * x0, uint32_t x1)
{
  return mpd_qsetstatus(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qsetstatus(PyObject *self, PyObject *args)
{
  mpd_context_t * x0;
  uint32_t x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_UnpackTuple(args, "mpd_qsetstatus", 2, 2, &arg0, &arg1))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(23), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_context_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(23), arg0) < 0)
      return NULL;
  }

  x1 = _cffi_to_c_int(arg1, uint32_t);
  if (x1 == (uint32_t)-1 && PyErr_Occurred())
    return NULL;

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_qsetstatus(x0, x1); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, int);
}
#else
#  define _cffi_f_mpd_qsetstatus _cffi_d_mpd_qsetstatus
#endif

static int _cffi_d_mpd_qsettraps(mpd_context_t * x0, uint32_t x1)
{
  return mpd_qsettraps(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qsettraps(PyObject *self, PyObject *args)
{
  mpd_context_t * x0;
  uint32_t x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_UnpackTuple(args, "mpd_qsettraps", 2, 2, &arg0, &arg1))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(23), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_context_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(23), arg0) < 0)
      return NULL;
  }

  x1 = _cffi_to_c_int(arg1, uint32_t);
  if (x1 == (uint32_t)-1 && PyErr_Occurred())
    return NULL;

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_qsettraps(x0, x1); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, int);
}
#else
#  define _cffi_f_mpd_qsettraps _cffi_d_mpd_qsettraps
#endif

static void _cffi_d_mpd_qshift(mpd_t * x0, mpd_t const * x1, mpd_t const * x2, mpd_context_t const * x3, uint32_t * x4)
{
  mpd_qshift(x0, x1, x2, x3, x4);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qshift(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_t const * x2;
  mpd_context_t const * x3;
  uint32_t * x4;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_UnpackTuple(args, "mpd_qshift", 5, 5, &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(1), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(7), arg3) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg4, (char **)&x4);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x4 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x4, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x4, _cffi_type(8), arg4) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qshift(x0, x1, x2, x3, x4); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qshift _cffi_d_mpd_qshift
#endif

static void _cffi_d_mpd_qsqrt(mpd_t * x0, mpd_t const * x1, mpd_context_t const * x2, uint32_t * x3)
{
  mpd_qsqrt(x0, x1, x2, x3);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qsqrt(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_context_t const * x2;
  uint32_t * x3;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_UnpackTuple(args, "mpd_qsqrt", 4, 4, &arg0, &arg1, &arg2, &arg3))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(7), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(8), arg3) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qsqrt(x0, x1, x2, x3); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qsqrt _cffi_d_mpd_qsqrt
#endif

static void _cffi_d_mpd_qsset_ssize(mpd_t * x0, ssize_t x1, mpd_context_t const * x2, uint32_t * x3)
{
  mpd_qsset_ssize(x0, x1, x2, x3);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qsset_ssize(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  ssize_t x1;
  mpd_context_t const * x2;
  uint32_t * x3;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_UnpackTuple(args, "mpd_qsset_ssize", 4, 4, &arg0, &arg1, &arg2, &arg3))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  x1 = _cffi_to_c_int(arg1, ssize_t);
  if (x1 == (ssize_t)-1 && PyErr_Occurred())
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(7), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(8), arg3) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qsset_ssize(x0, x1, x2, x3); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qsset_ssize _cffi_d_mpd_qsset_ssize
#endif

static void _cffi_d_mpd_qsub(mpd_t * x0, mpd_t const * x1, mpd_t const * x2, mpd_context_t const * x3, uint32_t * x4)
{
  mpd_qsub(x0, x1, x2, x3, x4);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qsub(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_t const * x2;
  mpd_context_t const * x3;
  uint32_t * x4;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_UnpackTuple(args, "mpd_qsub", 5, 5, &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(1), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(7), arg3) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg4, (char **)&x4);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x4 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x4, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x4, _cffi_type(8), arg4) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qsub(x0, x1, x2, x3, x4); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qsub _cffi_d_mpd_qsub
#endif

static void _cffi_d_mpd_qxor(mpd_t * x0, mpd_t const * x1, mpd_t const * x2, mpd_context_t const * x3, uint32_t * x4)
{
  mpd_qxor(x0, x1, x2, x3, x4);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_qxor(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  mpd_t const * x1;
  mpd_t const * x2;
  mpd_context_t const * x3;
  uint32_t * x4;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_UnpackTuple(args, "mpd_qxor", 5, 5, &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(1), arg2) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(7), arg3, (char **)&x3);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x3 = (mpd_context_t const *)alloca((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(7), arg3) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg4, (char **)&x4);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x4 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x4, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x4, _cffi_type(8), arg4) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_qxor(x0, x1, x2, x3, x4); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_qxor _cffi_d_mpd_qxor
#endif

static int _cffi_d_mpd_same_quantum(mpd_t const * x0, mpd_t const * x1)
{
  return mpd_same_quantum(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_same_quantum(PyObject *self, PyObject *args)
{
  mpd_t const * x0;
  mpd_t const * x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_UnpackTuple(args, "mpd_same_quantum", 2, 2, &arg0, &arg1))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(1), arg0) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(1), arg1) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_same_quantum(x0, x1); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, int);
}
#else
#  define _cffi_f_mpd_same_quantum _cffi_d_mpd_same_quantum
#endif

static void _cffi_d_mpd_set_positive(mpd_t * x0)
{
  mpd_set_positive(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_set_positive(PyObject *self, PyObject *arg0)
{
  mpd_t * x0;
  Py_ssize_t datasize;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_set_positive(x0); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_set_positive _cffi_d_mpd_set_positive
#endif

static void _cffi_d_mpd_set_sign(mpd_t * x0, uint8_t x1)
{
  mpd_set_sign(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_set_sign(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  uint8_t x1;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_UnpackTuple(args, "mpd_set_sign", 2, 2, &arg0, &arg1))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  x1 = _cffi_to_c_int(arg1, uint8_t);
  if (x1 == (uint8_t)-1 && PyErr_Occurred())
    return NULL;

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_set_sign(x0, x1); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_set_sign _cffi_d_mpd_set_sign
#endif

static void _cffi_d_mpd_seterror(mpd_t * x0, uint32_t x1, uint32_t * x2)
{
  mpd_seterror(x0, x1, x2);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_seterror(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  uint32_t x1;
  uint32_t * x2;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_UnpackTuple(args, "mpd_seterror", 3, 3, &arg0, &arg1, &arg2))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  x1 = _cffi_to_c_int(arg1, uint32_t);
  if (x1 == (uint32_t)-1 && PyErr_Occurred())
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = (uint32_t *)alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(8), arg2) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_seterror(x0, x1, x2); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_seterror _cffi_d_mpd_seterror
#endif

static void _cffi_d_mpd_setspecial(mpd_t * x0, uint8_t x1, uint8_t x2)
{
  mpd_setspecial(x0, x1, x2);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_setspecial(PyObject *self, PyObject *args)
{
  mpd_t * x0;
  uint8_t x1;
  uint8_t x2;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_UnpackTuple(args, "mpd_setspecial", 3, 3, &arg0, &arg1, &arg2))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(43), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(43), arg0) < 0)
      return NULL;
  }

  x1 = _cffi_to_c_int(arg1, uint8_t);
  if (x1 == (uint8_t)-1 && PyErr_Occurred())
    return NULL;

  x2 = _cffi_to_c_int(arg2, uint8_t);
  if (x2 == (uint8_t)-1 && PyErr_Occurred())
    return NULL;

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { mpd_setspecial(x0, x1, x2); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  Py_INCREF(Py_None);
  return Py_None;
}
#else
#  define _cffi_f_mpd_setspecial _cffi_d_mpd_setspecial
#endif

static uint8_t _cffi_d_mpd_sign(mpd_t const * x0)
{
  return mpd_sign(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_sign(PyObject *self, PyObject *arg0)
{
  mpd_t const * x0;
  Py_ssize_t datasize;
  uint8_t result;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(1), arg0) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_sign(x0); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint8_t);
}
#else
#  define _cffi_f_mpd_sign _cffi_d_mpd_sign
#endif

static char * _cffi_d_mpd_to_eng(mpd_t const * x0, int x1)
{
  return mpd_to_eng(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_to_eng(PyObject *self, PyObject *args)
{
  mpd_t const * x0;
  int x1;
  Py_ssize_t datasize;
  char * result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_UnpackTuple(args, "mpd_to_eng", 2, 2, &arg0, &arg1))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(1), arg0) < 0)
      return NULL;
  }

  x1 = _cffi_to_c_int(arg1, int);
  if (x1 == (int)-1 && PyErr_Occurred())
    return NULL;

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_to_eng(x0, x1); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_pointer((char *)result, _cffi_type(17));
}
#else
#  define _cffi_f_mpd_to_eng _cffi_d_mpd_to_eng
#endif

static char * _cffi_d_mpd_to_sci(mpd_t const * x0, int x1)
{
  return mpd_to_sci(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_to_sci(PyObject *self, PyObject *args)
{
  mpd_t const * x0;
  int x1;
  Py_ssize_t datasize;
  char * result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_UnpackTuple(args, "mpd_to_sci", 2, 2, &arg0, &arg1))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(1), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_t const *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(1), arg0) < 0)
      return NULL;
  }

  x1 = _cffi_to_c_int(arg1, int);
  if (x1 == (int)-1 && PyErr_Occurred())
    return NULL;

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_to_sci(x0, x1); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_pointer((char *)result, _cffi_type(17));
}
#else
#  define _cffi_f_mpd_to_sci _cffi_d_mpd_to_sci
#endif

static int _cffi_d_mpd_validate_lconv(mpd_spec_t * x0)
{
  return mpd_validate_lconv(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_validate_lconv(PyObject *self, PyObject *arg0)
{
  mpd_spec_t * x0;
  Py_ssize_t datasize;
  int result;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(35), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = (mpd_spec_t *)alloca((size_t)datasize);
    memset((void *)x0, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(35), arg0) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_validate_lconv(x0); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_int(result, int);
}
#else
#  define _cffi_f_mpd_validate_lconv _cffi_d_mpd_validate_lconv
#endif

static char const * _cffi_d_mpd_version(void)
{
  return mpd_version();
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_mpd_version(PyObject *self, PyObject *noarg)
{
  char const * result;

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = mpd_version(); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_from_c_pointer((char *)result, _cffi_type(39));
}
#else
#  define _cffi_f_mpd_version _cffi_d_mpd_version
#endif

static int _cffi_const_MPD_CONST_DATA(unsigned long long *o)
{
  int n = (MPD_CONST_DATA) <= 0;
  *o = (unsigned long long)((MPD_CONST_DATA) | 0);  /* check that MPD_CONST_DATA is an integer */
  return n;
}

static int _cffi_const_MPD_Clamped(unsigned long long *o)
{
  int n = (MPD_Clamped) <= 0;
  *o = (unsigned long long)((MPD_Clamped) | 0);  /* check that MPD_Clamped is an integer */
  return n;
}

static int _cffi_const_MPD_Conversion_syntax(unsigned long long *o)
{
  int n = (MPD_Conversion_syntax) <= 0;
  *o = (unsigned long long)((MPD_Conversion_syntax) | 0);  /* check that MPD_Conversion_syntax is an integer */
  return n;
}

static int _cffi_const_MPD_DATAFLAGS(unsigned long long *o)
{
  int n = (MPD_DATAFLAGS) <= 0;
  *o = (unsigned long long)((MPD_DATAFLAGS) | 0);  /* check that MPD_DATAFLAGS is an integer */
  return n;
}

static int _cffi_const_MPD_Division_by_zero(unsigned long long *o)
{
  int n = (MPD_Division_by_zero) <= 0;
  *o = (unsigned long long)((MPD_Division_by_zero) | 0);  /* check that MPD_Division_by_zero is an integer */
  return n;
}

static int _cffi_const_MPD_Division_impossible(unsigned long long *o)
{
  int n = (MPD_Division_impossible) <= 0;
  *o = (unsigned long long)((MPD_Division_impossible) | 0);  /* check that MPD_Division_impossible is an integer */
  return n;
}

static int _cffi_const_MPD_Division_undefined(unsigned long long *o)
{
  int n = (MPD_Division_undefined) <= 0;
  *o = (unsigned long long)((MPD_Division_undefined) | 0);  /* check that MPD_Division_undefined is an integer */
  return n;
}

static int _cffi_const_MPD_Errors(unsigned long long *o)
{
  int n = (MPD_Errors) <= 0;
  *o = (unsigned long long)((MPD_Errors) | 0);  /* check that MPD_Errors is an integer */
  return n;
}

static int _cffi_const_MPD_Float_operation(unsigned long long *o)
{
  int n = (MPD_Float_operation) <= 0;
  *o = (unsigned long long)((MPD_Float_operation) | 0);  /* check that MPD_Float_operation is an integer */
  return n;
}

static int _cffi_const_MPD_Fpu_error(unsigned long long *o)
{
  int n = (MPD_Fpu_error) <= 0;
  *o = (unsigned long long)((MPD_Fpu_error) | 0);  /* check that MPD_Fpu_error is an integer */
  return n;
}

static int _cffi_const_MPD_IEEE_Invalid_operation(unsigned long long *o)
{
  int n = (MPD_IEEE_Invalid_operation) <= 0;
  *o = (unsigned long long)((MPD_IEEE_Invalid_operation) | 0);  /* check that MPD_IEEE_Invalid_operation is an integer */
  return n;
}

static int _cffi_const_MPD_INF(unsigned long long *o)
{
  int n = (MPD_INF) <= 0;
  *o = (unsigned long long)((MPD_INF) | 0);  /* check that MPD_INF is an integer */
  return n;
}

static int _cffi_const_MPD_Inexact(unsigned long long *o)
{
  int n = (MPD_Inexact) <= 0;
  *o = (unsigned long long)((MPD_Inexact) | 0);  /* check that MPD_Inexact is an integer */
  return n;
}

static int _cffi_const_MPD_Invalid_context(unsigned long long *o)
{
  int n = (MPD_Invalid_context) <= 0;
  *o = (unsigned long long)((MPD_Invalid_context) | 0);  /* check that MPD_Invalid_context is an integer */
  return n;
}

static int _cffi_const_MPD_Invalid_operation(unsigned long long *o)
{
  int n = (MPD_Invalid_operation) <= 0;
  *o = (unsigned long long)((MPD_Invalid_operation) | 0);  /* check that MPD_Invalid_operation is an integer */
  return n;
}

static int _cffi_const_MPD_MAX_SIGNAL_LIST(unsigned long long *o)
{
  int n = (MPD_MAX_SIGNAL_LIST) <= 0;
  *o = (unsigned long long)((MPD_MAX_SIGNAL_LIST) | 0);  /* check that MPD_MAX_SIGNAL_LIST is an integer */
  return n;
}

static int _cffi_const_MPD_Malloc_error(unsigned long long *o)
{
  int n = (MPD_Malloc_error) <= 0;
  *o = (unsigned long long)((MPD_Malloc_error) | 0);  /* check that MPD_Malloc_error is an integer */
  return n;
}

static int _cffi_const_MPD_Max_status(unsigned long long *o)
{
  int n = (MPD_Max_status) <= 0;
  *o = (unsigned long long)((MPD_Max_status) | 0);  /* check that MPD_Max_status is an integer */
  return n;
}

static int _cffi_const_MPD_NAN(unsigned long long *o)
{
  int n = (MPD_NAN) <= 0;
  *o = (unsigned long long)((MPD_NAN) | 0);  /* check that MPD_NAN is an integer */
  return n;
}

static int _cffi_const_MPD_NEG(unsigned long long *o)
{
  int n = (MPD_NEG) <= 0;
  *o = (unsigned long long)((MPD_NEG) | 0);  /* check that MPD_NEG is an integer */
  return n;
}

static int _cffi_const_MPD_Not_implemented(unsigned long long *o)
{
  int n = (MPD_Not_implemented) <= 0;
  *o = (unsigned long long)((MPD_Not_implemented) | 0);  /* check that MPD_Not_implemented is an integer */
  return n;
}

static int _cffi_const_MPD_Overflow(unsigned long long *o)
{
  int n = (MPD_Overflow) <= 0;
  *o = (unsigned long long)((MPD_Overflow) | 0);  /* check that MPD_Overflow is an integer */
  return n;
}

static int _cffi_const_MPD_POS(unsigned long long *o)
{
  int n = (MPD_POS) <= 0;
  *o = (unsigned long long)((MPD_POS) | 0);  /* check that MPD_POS is an integer */
  return n;
}

static int _cffi_const_MPD_Rounded(unsigned long long *o)
{
  int n = (MPD_Rounded) <= 0;
  *o = (unsigned long long)((MPD_Rounded) | 0);  /* check that MPD_Rounded is an integer */
  return n;
}

static int _cffi_const_MPD_SHARED_DATA(unsigned long long *o)
{
  int n = (MPD_SHARED_DATA) <= 0;
  *o = (unsigned long long)((MPD_SHARED_DATA) | 0);  /* check that MPD_SHARED_DATA is an integer */
  return n;
}

static int _cffi_const_MPD_SIZE_MAX(unsigned long long *o)
{
  int n = (MPD_SIZE_MAX) <= 0;
  *o = (unsigned long long)((MPD_SIZE_MAX) | 0);  /* check that MPD_SIZE_MAX is an integer */
  return n;
}

static int _cffi_const_MPD_SNAN(unsigned long long *o)
{
  int n = (MPD_SNAN) <= 0;
  *o = (unsigned long long)((MPD_SNAN) | 0);  /* check that MPD_SNAN is an integer */
  return n;
}

static int _cffi_const_MPD_SPECIAL(unsigned long long *o)
{
  int n = (MPD_SPECIAL) <= 0;
  *o = (unsigned long long)((MPD_SPECIAL) | 0);  /* check that MPD_SPECIAL is an integer */
  return n;
}

static int _cffi_const_MPD_SSIZE_MAX(unsigned long long *o)
{
  int n = (MPD_SSIZE_MAX) <= 0;
  *o = (unsigned long long)((MPD_SSIZE_MAX) | 0);  /* check that MPD_SSIZE_MAX is an integer */
  return n;
}

static int _cffi_const_MPD_SSIZE_MIN(unsigned long long *o)
{
  int n = (MPD_SSIZE_MIN) <= 0;
  *o = (unsigned long long)((MPD_SSIZE_MIN) | 0);  /* check that MPD_SSIZE_MIN is an integer */
  return n;
}

static int _cffi_const_MPD_STATIC(unsigned long long *o)
{
  int n = (MPD_STATIC) <= 0;
  *o = (unsigned long long)((MPD_STATIC) | 0);  /* check that MPD_STATIC is an integer */
  return n;
}

static int _cffi_const_MPD_STATIC_DATA(unsigned long long *o)
{
  int n = (MPD_STATIC_DATA) <= 0;
  *o = (unsigned long long)((MPD_STATIC_DATA) | 0);  /* check that MPD_STATIC_DATA is an integer */
  return n;
}

static int _cffi_const_MPD_Subnormal(unsigned long long *o)
{
  int n = (MPD_Subnormal) <= 0;
  *o = (unsigned long long)((MPD_Subnormal) | 0);  /* check that MPD_Subnormal is an integer */
  return n;
}

static int _cffi_const_MPD_Underflow(unsigned long long *o)
{
  int n = (MPD_Underflow) <= 0;
  *o = (unsigned long long)((MPD_Underflow) | 0);  /* check that MPD_Underflow is an integer */
  return n;
}

_CFFI_UNUSED_FN
static void _cffi_checkfld__mpd_context_t(mpd_context_t *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->prec) | 0);  /* check that 'mpd_context_t.prec' is an integer */
  (void)((p->emax) | 0);  /* check that 'mpd_context_t.emax' is an integer */
  (void)((p->emin) | 0);  /* check that 'mpd_context_t.emin' is an integer */
  (void)((p->traps) | 0);  /* check that 'mpd_context_t.traps' is an integer */
  (void)((p->status) | 0);  /* check that 'mpd_context_t.status' is an integer */
  (void)((p->newtrap) | 0);  /* check that 'mpd_context_t.newtrap' is an integer */
  (void)((p->round) | 0);  /* check that 'mpd_context_t.round' is an integer */
  (void)((p->clamp) | 0);  /* check that 'mpd_context_t.clamp' is an integer */
  (void)((p->allcr) | 0);  /* check that 'mpd_context_t.allcr' is an integer */
}
struct _cffi_align__mpd_context_t { char x; mpd_context_t y; };

_CFFI_UNUSED_FN
static void _cffi_checkfld__mpd_spec_t(mpd_spec_t *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->min_width) | 0);  /* check that 'mpd_spec_t.min_width' is an integer */
  (void)((p->prec) | 0);  /* check that 'mpd_spec_t.prec' is an integer */
  { char *tmp = &p->type; (void)tmp; }
  { char *tmp = &p->align; (void)tmp; }
  { char *tmp = &p->sign; (void)tmp; }
  { char(*tmp)[5] = &p->fill; (void)tmp; }
  { char const * *tmp = &p->dot; (void)tmp; }
  { char const * *tmp = &p->sep; (void)tmp; }
  { char const * *tmp = &p->grouping; (void)tmp; }
}
struct _cffi_align__mpd_spec_t { char x; mpd_spec_t y; };

_CFFI_UNUSED_FN
static void _cffi_checkfld__mpd_t(mpd_t *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->flags) | 0);  /* check that 'mpd_t.flags' is an integer */
  (void)((p->exp) | 0);  /* check that 'mpd_t.exp' is an integer */
  (void)((p->digits) | 0);  /* check that 'mpd_t.digits' is an integer */
  (void)((p->len) | 0);  /* check that 'mpd_t.len' is an integer */
  (void)((p->alloc) | 0);  /* check that 'mpd_t.alloc' is an integer */
  { size_t * *tmp = &p->data; (void)tmp; }
}
struct _cffi_align__mpd_t { char x; mpd_t y; };

static char const * *_cffi_var_dec_signal_string(void)
{
  return (dec_signal_string);
}

static const struct _cffi_global_s _cffi_globals[] = {
  { "MPD_CONST_DATA", (void *)_cffi_const_MPD_CONST_DATA, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "MPD_Clamped", (void *)_cffi_const_MPD_Clamped, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "MPD_Conversion_syntax", (void *)_cffi_const_MPD_Conversion_syntax, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "MPD_DATAFLAGS", (void *)_cffi_const_MPD_DATAFLAGS, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "MPD_Division_by_zero", (void *)_cffi_const_MPD_Division_by_zero, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "MPD_Division_impossible", (void *)_cffi_const_MPD_Division_impossible, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "MPD_Division_undefined", (void *)_cffi_const_MPD_Division_undefined, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "MPD_Errors", (void *)_cffi_const_MPD_Errors, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "MPD_Float_operation", (void *)_cffi_const_MPD_Float_operation, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "MPD_Fpu_error", (void *)_cffi_const_MPD_Fpu_error, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "MPD_IEEE_Invalid_operation", (void *)_cffi_const_MPD_IEEE_Invalid_operation, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "MPD_INF", (void *)_cffi_const_MPD_INF, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "MPD_Inexact", (void *)_cffi_const_MPD_Inexact, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "MPD_Invalid_context", (void *)_cffi_const_MPD_Invalid_context, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "MPD_Invalid_operation", (void *)_cffi_const_MPD_Invalid_operation, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "MPD_MAX_SIGNAL_LIST", (void *)_cffi_const_MPD_MAX_SIGNAL_LIST, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "MPD_Malloc_error", (void *)_cffi_const_MPD_Malloc_error, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "MPD_Max_status", (void *)_cffi_const_MPD_Max_status, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "MPD_NAN", (void *)_cffi_const_MPD_NAN, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "MPD_NEG", (void *)_cffi_const_MPD_NEG, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "MPD_Not_implemented", (void *)_cffi_const_MPD_Not_implemented, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "MPD_Overflow", (void *)_cffi_const_MPD_Overflow, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "MPD_POS", (void *)_cffi_const_MPD_POS, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "MPD_ROUND_05UP", (void *)_cffi_const_MPD_ROUND_05UP, _CFFI_OP(_CFFI_OP_ENUM, -1), (void *)0 },
  { "MPD_ROUND_CEILING", (void *)_cffi_const_MPD_ROUND_CEILING, _CFFI_OP(_CFFI_OP_ENUM, -1), (void *)0 },
  { "MPD_ROUND_DOWN", (void *)_cffi_const_MPD_ROUND_DOWN, _CFFI_OP(_CFFI_OP_ENUM, -1), (void *)0 },
  { "MPD_ROUND_FLOOR", (void *)_cffi_const_MPD_ROUND_FLOOR, _CFFI_OP(_CFFI_OP_ENUM, -1), (void *)0 },
  { "MPD_ROUND_GUARD", (void *)_cffi_const_MPD_ROUND_GUARD, _CFFI_OP(_CFFI_OP_ENUM, -1), (void *)0 },
  { "MPD_ROUND_HALF_DOWN", (void *)_cffi_const_MPD_ROUND_HALF_DOWN, _CFFI_OP(_CFFI_OP_ENUM, -1), (void *)0 },
  { "MPD_ROUND_HALF_EVEN", (void *)_cffi_const_MPD_ROUND_HALF_EVEN, _CFFI_OP(_CFFI_OP_ENUM, -1), (void *)0 },
  { "MPD_ROUND_HALF_UP", (void *)_cffi_const_MPD_ROUND_HALF_UP, _CFFI_OP(_CFFI_OP_ENUM, -1), (void *)0 },
  { "MPD_ROUND_TRUNC", (void *)_cffi_const_MPD_ROUND_TRUNC, _CFFI_OP(_CFFI_OP_ENUM, -1), (void *)0 },
  { "MPD_ROUND_UP", (void *)_cffi_const_MPD_ROUND_UP, _CFFI_OP(_CFFI_OP_ENUM, -1), (void *)0 },
  { "MPD_Rounded", (void *)_cffi_const_MPD_Rounded, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "MPD_SHARED_DATA", (void *)_cffi_const_MPD_SHARED_DATA, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "MPD_SIZE_MAX", (void *)_cffi_const_MPD_SIZE_MAX, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "MPD_SNAN", (void *)_cffi_const_MPD_SNAN, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "MPD_SPECIAL", (void *)_cffi_const_MPD_SPECIAL, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "MPD_SSIZE_MAX", (void *)_cffi_const_MPD_SSIZE_MAX, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "MPD_SSIZE_MIN", (void *)_cffi_const_MPD_SSIZE_MIN, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "MPD_STATIC", (void *)_cffi_const_MPD_STATIC, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "MPD_STATIC_DATA", (void *)_cffi_const_MPD_STATIC_DATA, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "MPD_Subnormal", (void *)_cffi_const_MPD_Subnormal, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "MPD_Underflow", (void *)_cffi_const_MPD_Underflow, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "dec_signal_string", (void *)_cffi_var_dec_signal_string, _CFFI_OP(_CFFI_OP_GLOBAL_VAR_F, 190), (void *)0 },
  { "mpd_adjexp", (void *)_cffi_f_mpd_adjexp, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 96), (void *)_cffi_d_mpd_adjexp },
  { "mpd_class", (void *)_cffi_f_mpd_class, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 10), (void *)_cffi_d_mpd_class },
  { "mpd_clear_flags", (void *)_cffi_f_mpd_clear_flags, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 109), (void *)_cffi_d_mpd_clear_flags },
  { "mpd_compare_total", (void *)_cffi_f_mpd_compare_total, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 42), (void *)_cffi_d_mpd_compare_total },
  { "mpd_compare_total_mag", (void *)_cffi_f_mpd_compare_total_mag, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 42), (void *)_cffi_d_mpd_compare_total_mag },
  { "mpd_del", (void *)_cffi_f_mpd_del, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 109), (void *)_cffi_d_mpd_del },
  { "mpd_etiny", (void *)_cffi_f_mpd_etiny, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 93), (void *)_cffi_d_mpd_etiny },
  { "mpd_etop", (void *)_cffi_f_mpd_etop, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 93), (void *)_cffi_d_mpd_etop },
  { "mpd_free", (void *)_cffi_f_mpd_free, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 187), (void *)_cffi_d_mpd_free },
  { "mpd_isfinite", (void *)_cffi_f_mpd_isfinite, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 65), (void *)_cffi_d_mpd_isfinite },
  { "mpd_isinfinite", (void *)_cffi_f_mpd_isinfinite, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 65), (void *)_cffi_d_mpd_isinfinite },
  { "mpd_isnan", (void *)_cffi_f_mpd_isnan, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 65), (void *)_cffi_d_mpd_isnan },
  { "mpd_isnegative", (void *)_cffi_f_mpd_isnegative, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 65), (void *)_cffi_d_mpd_isnegative },
  { "mpd_isnormal", (void *)_cffi_f_mpd_isnormal, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 68), (void *)_cffi_d_mpd_isnormal },
  { "mpd_ispositive", (void *)_cffi_f_mpd_ispositive, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 65), (void *)_cffi_d_mpd_ispositive },
  { "mpd_isqnan", (void *)_cffi_f_mpd_isqnan, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 65), (void *)_cffi_d_mpd_isqnan },
  { "mpd_issigned", (void *)_cffi_f_mpd_issigned, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 65), (void *)_cffi_d_mpd_issigned },
  { "mpd_issnan", (void *)_cffi_f_mpd_issnan, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 65), (void *)_cffi_d_mpd_issnan },
  { "mpd_isspecial", (void *)_cffi_f_mpd_isspecial, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 65), (void *)_cffi_d_mpd_isspecial },
  { "mpd_issubnormal", (void *)_cffi_f_mpd_issubnormal, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 68), (void *)_cffi_d_mpd_issubnormal },
  { "mpd_iszero", (void *)_cffi_f_mpd_iszero, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 65), (void *)_cffi_d_mpd_iszero },
  { "mpd_lsnprint_signals", (void *)_cffi_f_mpd_lsnprint_signals, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 16), (void *)_cffi_d_mpd_lsnprint_signals },
  { "mpd_maxcontext", (void *)_cffi_f_mpd_maxcontext, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 106), (void *)_cffi_d_mpd_maxcontext },
  { "mpd_parse_fmt_str", (void *)_cffi_f_mpd_parse_fmt_str, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 37), (void *)_cffi_d_mpd_parse_fmt_str },
  { "mpd_qabs", (void *)_cffi_f_mpd_qabs, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 131), (void *)_cffi_d_mpd_qabs },
  { "mpd_qadd", (void *)_cffi_f_mpd_qadd, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 137), (void *)_cffi_d_mpd_qadd },
  { "mpd_qand", (void *)_cffi_f_mpd_qand, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 137), (void *)_cffi_d_mpd_qand },
  { "mpd_qcmp", (void *)_cffi_f_mpd_qcmp, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 76), (void *)_cffi_d_mpd_qcmp },
  { "mpd_qcompare", (void *)_cffi_f_mpd_qcompare, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 47), (void *)_cffi_d_mpd_qcompare },
  { "mpd_qcompare_signal", (void *)_cffi_f_mpd_qcompare_signal, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 47), (void *)_cffi_d_mpd_qcompare_signal },
  { "mpd_qcopy", (void *)_cffi_f_mpd_qcopy, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 60), (void *)_cffi_d_mpd_qcopy },
  { "mpd_qcopy_abs", (void *)_cffi_f_mpd_qcopy_abs, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 60), (void *)_cffi_d_mpd_qcopy_abs },
  { "mpd_qcopy_negate", (void *)_cffi_f_mpd_qcopy_negate, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 60), (void *)_cffi_d_mpd_qcopy_negate },
  { "mpd_qcopy_sign", (void *)_cffi_f_mpd_qcopy_sign, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 54), (void *)_cffi_d_mpd_qcopy_sign },
  { "mpd_qdiv", (void *)_cffi_f_mpd_qdiv, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 137), (void *)_cffi_d_mpd_qdiv },
  { "mpd_qdivint", (void *)_cffi_f_mpd_qdivint, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 137), (void *)_cffi_d_mpd_qdivint },
  { "mpd_qdivmod", (void *)_cffi_f_mpd_qdivmod, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 123), (void *)_cffi_d_mpd_qdivmod },
  { "mpd_qexp", (void *)_cffi_f_mpd_qexp, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 131), (void *)_cffi_d_mpd_qexp },
  { "mpd_qexport_u16", (void *)_cffi_f_mpd_qexport_u16, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 86), (void *)_cffi_d_mpd_qexport_u16 },
  { "mpd_qfinalize", (void *)_cffi_f_mpd_qfinalize, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 118), (void *)_cffi_d_mpd_qfinalize },
  { "mpd_qfma", (void *)_cffi_f_mpd_qfma, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 144), (void *)_cffi_d_mpd_qfma },
  { "mpd_qformat_spec", (void *)_cffi_f_mpd_qformat_spec, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 4), (void *)_cffi_d_mpd_qformat_spec },
  { "mpd_qget_ssize", (void *)_cffi_f_mpd_qget_ssize, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 99), (void *)_cffi_d_mpd_qget_ssize },
  { "mpd_qimport_u16", (void *)_cffi_f_mpd_qimport_u16, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 164), (void *)_cffi_d_mpd_qimport_u16 },
  { "mpd_qinvert", (void *)_cffi_f_mpd_qinvert, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 131), (void *)_cffi_d_mpd_qinvert },
  { "mpd_qln", (void *)_cffi_f_mpd_qln, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 131), (void *)_cffi_d_mpd_qln },
  { "mpd_qlog10", (void *)_cffi_f_mpd_qlog10, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 131), (void *)_cffi_d_mpd_qlog10 },
  { "mpd_qlogb", (void *)_cffi_f_mpd_qlogb, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 131), (void *)_cffi_d_mpd_qlogb },
  { "mpd_qmax", (void *)_cffi_f_mpd_qmax, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 137), (void *)_cffi_d_mpd_qmax },
  { "mpd_qmax_mag", (void *)_cffi_f_mpd_qmax_mag, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 137), (void *)_cffi_d_mpd_qmax_mag },
  { "mpd_qmin", (void *)_cffi_f_mpd_qmin, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 137), (void *)_cffi_d_mpd_qmin },
  { "mpd_qmin_mag", (void *)_cffi_f_mpd_qmin_mag, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 137), (void *)_cffi_d_mpd_qmin_mag },
  { "mpd_qminus", (void *)_cffi_f_mpd_qminus, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 131), (void *)_cffi_d_mpd_qminus },
  { "mpd_qmul", (void *)_cffi_f_mpd_qmul, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 137), (void *)_cffi_d_mpd_qmul },
  { "mpd_qncopy", (void *)_cffi_f_mpd_qncopy, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 81), (void *)_cffi_d_mpd_qncopy },
  { "mpd_qnew", (void *)_cffi_f_mpd_qnew, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_N, 84), (void *)_cffi_d_mpd_qnew },
  { "mpd_qnext_minus", (void *)_cffi_f_mpd_qnext_minus, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 131), (void *)_cffi_d_mpd_qnext_minus },
  { "mpd_qnext_plus", (void *)_cffi_f_mpd_qnext_plus, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 131), (void *)_cffi_d_mpd_qnext_plus },
  { "mpd_qnext_toward", (void *)_cffi_f_mpd_qnext_toward, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 137), (void *)_cffi_d_mpd_qnext_toward },
  { "mpd_qor", (void *)_cffi_f_mpd_qor, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 137), (void *)_cffi_d_mpd_qor },
  { "mpd_qplus", (void *)_cffi_f_mpd_qplus, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 131), (void *)_cffi_d_mpd_qplus },
  { "mpd_qpow", (void *)_cffi_f_mpd_qpow, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 137), (void *)_cffi_d_mpd_qpow },
  { "mpd_qpowmod", (void *)_cffi_f_mpd_qpowmod, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 144), (void *)_cffi_d_mpd_qpowmod },
  { "mpd_qquantize", (void *)_cffi_f_mpd_qquantize, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 137), (void *)_cffi_d_mpd_qquantize },
  { "mpd_qreduce", (void *)_cffi_f_mpd_qreduce, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 131), (void *)_cffi_d_mpd_qreduce },
  { "mpd_qrem", (void *)_cffi_f_mpd_qrem, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 137), (void *)_cffi_d_mpd_qrem },
  { "mpd_qrem_near", (void *)_cffi_f_mpd_qrem_near, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 137), (void *)_cffi_d_mpd_qrem_near },
  { "mpd_qrotate", (void *)_cffi_f_mpd_qrotate, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 137), (void *)_cffi_d_mpd_qrotate },
  { "mpd_qround_to_int", (void *)_cffi_f_mpd_qround_to_int, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 131), (void *)_cffi_d_mpd_qround_to_int },
  { "mpd_qround_to_intx", (void *)_cffi_f_mpd_qround_to_intx, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 131), (void *)_cffi_d_mpd_qround_to_intx },
  { "mpd_qscaleb", (void *)_cffi_f_mpd_qscaleb, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 137), (void *)_cffi_d_mpd_qscaleb },
  { "mpd_qset_ssize", (void *)_cffi_f_mpd_qset_ssize, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 158), (void *)_cffi_d_mpd_qset_ssize },
  { "mpd_qset_string", (void *)_cffi_f_mpd_qset_string, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 112), (void *)_cffi_d_mpd_qset_string },
  { "mpd_qset_uint", (void *)_cffi_f_mpd_qset_uint, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 152), (void *)_cffi_d_mpd_qset_uint },
  { "mpd_qsetclamp", (void *)_cffi_f_mpd_qsetclamp, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 22), (void *)_cffi_d_mpd_qsetclamp },
  { "mpd_qsetemax", (void *)_cffi_f_mpd_qsetemax, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 26), (void *)_cffi_d_mpd_qsetemax },
  { "mpd_qsetemin", (void *)_cffi_f_mpd_qsetemin, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 26), (void *)_cffi_d_mpd_qsetemin },
  { "mpd_qsetprec", (void *)_cffi_f_mpd_qsetprec, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 26), (void *)_cffi_d_mpd_qsetprec },
  { "mpd_qsetround", (void *)_cffi_f_mpd_qsetround, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 22), (void *)_cffi_d_mpd_qsetround },
  { "mpd_qsetstatus", (void *)_cffi_f_mpd_qsetstatus, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 30), (void *)_cffi_d_mpd_qsetstatus },
  { "mpd_qsettraps", (void *)_cffi_f_mpd_qsettraps, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 30), (void *)_cffi_d_mpd_qsettraps },
  { "mpd_qshift", (void *)_cffi_f_mpd_qshift, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 137), (void *)_cffi_d_mpd_qshift },
  { "mpd_qsqrt", (void *)_cffi_f_mpd_qsqrt, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 131), (void *)_cffi_d_mpd_qsqrt },
  { "mpd_qsset_ssize", (void *)_cffi_f_mpd_qsset_ssize, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 158), (void *)_cffi_d_mpd_qsset_ssize },
  { "mpd_qsub", (void *)_cffi_f_mpd_qsub, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 137), (void *)_cffi_d_mpd_qsub },
  { "mpd_qxor", (void *)_cffi_f_mpd_qxor, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 137), (void *)_cffi_d_mpd_qxor },
  { "mpd_same_quantum", (void *)_cffi_f_mpd_same_quantum, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 72), (void *)_cffi_d_mpd_same_quantum },
  { "mpd_set_positive", (void *)_cffi_f_mpd_set_positive, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 109), (void *)_cffi_d_mpd_set_positive },
  { "mpd_set_sign", (void *)_cffi_f_mpd_set_sign, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 178), (void *)_cffi_d_mpd_set_sign },
  { "mpd_seterror", (void *)_cffi_f_mpd_seterror, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 173), (void *)_cffi_d_mpd_seterror },
  { "mpd_setspecial", (void *)_cffi_f_mpd_setspecial, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 182), (void *)_cffi_d_mpd_setspecial },
  { "mpd_sign", (void *)_cffi_f_mpd_sign, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 103), (void *)_cffi_d_mpd_sign },
  { "mpd_to_eng", (void *)_cffi_f_mpd_to_eng, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 0), (void *)_cffi_d_mpd_to_eng },
  { "mpd_to_sci", (void *)_cffi_f_mpd_to_sci, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 0), (void *)_cffi_d_mpd_to_sci },
  { "mpd_validate_lconv", (void *)_cffi_f_mpd_validate_lconv, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 34), (void *)_cffi_d_mpd_validate_lconv },
  { "mpd_version", (void *)_cffi_f_mpd_version, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_N, 14), (void *)_cffi_d_mpd_version },
};

static const struct _cffi_field_s _cffi_fields[] = {
  { "prec", offsetof(mpd_context_t, prec),
            sizeof(((mpd_context_t *)0)->prec),
            _CFFI_OP(_CFFI_OP_NOOP, 28) },
  { "emax", offsetof(mpd_context_t, emax),
            sizeof(((mpd_context_t *)0)->emax),
            _CFFI_OP(_CFFI_OP_NOOP, 28) },
  { "emin", offsetof(mpd_context_t, emin),
            sizeof(((mpd_context_t *)0)->emin),
            _CFFI_OP(_CFFI_OP_NOOP, 28) },
  { "traps", offsetof(mpd_context_t, traps),
             sizeof(((mpd_context_t *)0)->traps),
             _CFFI_OP(_CFFI_OP_NOOP, 19) },
  { "status", offsetof(mpd_context_t, status),
              sizeof(((mpd_context_t *)0)->status),
              _CFFI_OP(_CFFI_OP_NOOP, 19) },
  { "newtrap", offsetof(mpd_context_t, newtrap),
               sizeof(((mpd_context_t *)0)->newtrap),
               _CFFI_OP(_CFFI_OP_NOOP, 19) },
  { "round", offsetof(mpd_context_t, round),
             sizeof(((mpd_context_t *)0)->round),
             _CFFI_OP(_CFFI_OP_NOOP, 2) },
  { "clamp", offsetof(mpd_context_t, clamp),
             sizeof(((mpd_context_t *)0)->clamp),
             _CFFI_OP(_CFFI_OP_NOOP, 2) },
  { "allcr", offsetof(mpd_context_t, allcr),
             sizeof(((mpd_context_t *)0)->allcr),
             _CFFI_OP(_CFFI_OP_NOOP, 2) },
  { "min_width", offsetof(mpd_spec_t, min_width),
                 sizeof(((mpd_spec_t *)0)->min_width),
                 _CFFI_OP(_CFFI_OP_NOOP, 28) },
  { "prec", offsetof(mpd_spec_t, prec),
            sizeof(((mpd_spec_t *)0)->prec),
            _CFFI_OP(_CFFI_OP_NOOP, 28) },
  { "type", offsetof(mpd_spec_t, type),
            sizeof(((mpd_spec_t *)0)->type),
            _CFFI_OP(_CFFI_OP_NOOP, 191) },
  { "align", offsetof(mpd_spec_t, align),
             sizeof(((mpd_spec_t *)0)->align),
             _CFFI_OP(_CFFI_OP_NOOP, 191) },
  { "sign", offsetof(mpd_spec_t, sign),
            sizeof(((mpd_spec_t *)0)->sign),
            _CFFI_OP(_CFFI_OP_NOOP, 191) },
  { "fill", offsetof(mpd_spec_t, fill),
            sizeof(((mpd_spec_t *)0)->fill),
            _CFFI_OP(_CFFI_OP_NOOP, 192) },
  { "dot", offsetof(mpd_spec_t, dot),
           sizeof(((mpd_spec_t *)0)->dot),
           _CFFI_OP(_CFFI_OP_NOOP, 39) },
  { "sep", offsetof(mpd_spec_t, sep),
           sizeof(((mpd_spec_t *)0)->sep),
           _CFFI_OP(_CFFI_OP_NOOP, 39) },
  { "grouping", offsetof(mpd_spec_t, grouping),
                sizeof(((mpd_spec_t *)0)->grouping),
                _CFFI_OP(_CFFI_OP_NOOP, 39) },
  { "flags", offsetof(mpd_t, flags),
             sizeof(((mpd_t *)0)->flags),
             _CFFI_OP(_CFFI_OP_NOOP, 168) },
  { "exp", offsetof(mpd_t, exp),
           sizeof(((mpd_t *)0)->exp),
           _CFFI_OP(_CFFI_OP_NOOP, 28) },
  { "digits", offsetof(mpd_t, digits),
              sizeof(((mpd_t *)0)->digits),
              _CFFI_OP(_CFFI_OP_NOOP, 28) },
  { "len", offsetof(mpd_t, len),
           sizeof(((mpd_t *)0)->len),
           _CFFI_OP(_CFFI_OP_NOOP, 28) },
  { "alloc", offsetof(mpd_t, alloc),
             sizeof(((mpd_t *)0)->alloc),
             _CFFI_OP(_CFFI_OP_NOOP, 28) },
  { "data", offsetof(mpd_t, data),
            sizeof(((mpd_t *)0)->data),
            _CFFI_OP(_CFFI_OP_NOOP, 198) },
};

static const struct _cffi_struct_union_s _cffi_struct_unions[] = {
  { "mpd_context_t", 195, _CFFI_F_CHECK_FIELDS,
    sizeof(mpd_context_t), offsetof(struct _cffi_align__mpd_context_t, y), 0, 9 },
  { "mpd_spec_t", 196, _CFFI_F_CHECK_FIELDS,
    sizeof(mpd_spec_t), offsetof(struct _cffi_align__mpd_spec_t, y), 9, 9 },
  { "mpd_t", 197, _CFFI_F_CHECK_FIELDS,
    sizeof(mpd_t), offsetof(struct _cffi_align__mpd_t, y), 18, 6 },
};

static const struct _cffi_enum_s _cffi_enums[] = {
  { "$1", 194, _cffi_prim_int(4, 0),
    "MPD_ROUND_UP,MPD_ROUND_DOWN,MPD_ROUND_CEILING,MPD_ROUND_FLOOR,MPD_ROUND_HALF_UP,MPD_ROUND_HALF_DOWN,MPD_ROUND_HALF_EVEN,MPD_ROUND_05UP,MPD_ROUND_TRUNC,MPD_ROUND_GUARD" },
};

static const struct _cffi_typename_s _cffi_typenames[] = {
  { "mpd_context_t", 195 },
  { "mpd_size_t", 88 },
  { "mpd_spec_t", 196 },
  { "mpd_ssize_t", 28 },
  { "mpd_t", 197 },
  { "mpd_uint_t", 88 },
};

static const struct _cffi_type_context_s _cffi_type_context = {
  _cffi_types,
  _cffi_globals,
  _cffi_fields,
  _cffi_struct_unions,
  _cffi_enums,
  _cffi_typenames,
  141,  /* num_globals */
  3,  /* num_struct_unions */
  1,  /* num_enums */
  6,  /* num_typenames */
  NULL,  /* no includes */
  202,  /* num_types */
  0,  /* flags */
};

#ifdef PYPY_VERSION
PyMODINIT_FUNC
_cffi_pypyinit__decimal_cffi(const void *p[])
{
    p[0] = (const void *)0x2601;
    p[1] = &_cffi_type_context;
}
#  ifdef _MSC_VER
     PyMODINIT_FUNC
#  if PY_MAJOR_VERSION >= 3
     PyInit__decimal_cffi(void) { return NULL; }
#  else
     init_decimal_cffi(void) { }
#  endif
#  endif
#elif PY_MAJOR_VERSION >= 3
PyMODINIT_FUNC
PyInit__decimal_cffi(void)
{
  return _cffi_init("_decimal_cffi", 0x2601, &_cffi_type_context);
}
#else
PyMODINIT_FUNC
init_decimal_cffi(void)
{
  _cffi_init("_decimal_cffi", 0x2601, &_cffi_type_context);
}
#endif
