
#include <Python.h>
#include <stddef.h>

/* this block of #ifs should be kept exactly identical between
   c/_cffi_backend.c, cffi/vengine_cpy.py, cffi/vengine_gen.py */
#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;
# else
#  include <stdint.h>
# endif
# if _MSC_VER < 1800   /* MSVC < 2013 */
   typedef unsigned char _Bool;
# endif
#else
# include <stdint.h>
# if (defined (__SVR4) && defined (__sun)) || defined(_AIX)
#  include <alloca.h>
# endif
#endif

#if PY_MAJOR_VERSION < 3
# undef PyCapsule_CheckExact
# undef PyCapsule_GetPointer
# define PyCapsule_CheckExact(capsule) (PyCObject_Check(capsule))
# define PyCapsule_GetPointer(capsule, name) \
    (PyCObject_AsVoidPtr(capsule))
#endif

#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_const(x)                                        \
    (((x) > 0) ?                                                         \
        ((unsigned long long)(x) <= (unsigned long long)LONG_MAX) ?      \
            PyInt_FromLong((long)(x)) :                                  \
            PyLong_FromUnsignedLongLong((unsigned long long)(x)) :       \
        ((long long)(x) >= (long long)LONG_MIN) ?                        \
            PyInt_FromLong((long)(x)) :                                  \
            PyLong_FromLongLong((long long)(x)))

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

#define _cffi_to_c_int(o, 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), 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                                          \
    ((PyObject *(*)(Py_ssize_t[]))_cffi_exports[12])
#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_NUM_EXPORTS 25

typedef struct _ctypedescr CTypeDescrObject;

static void *_cffi_exports[_CFFI_NUM_EXPORTS];
static PyObject *_cffi_types, *_cffi_VerificationError;

static int _cffi_setup_custom(PyObject *lib);   /* forward */

static PyObject *_cffi_setup(PyObject *self, PyObject *args)
{
    PyObject *library;
    int was_alive = (_cffi_types != NULL);
    if (!PyArg_ParseTuple(args, "OOO", &_cffi_types, &_cffi_VerificationError,
                                       &library))
        return NULL;
    Py_INCREF(_cffi_types);
    Py_INCREF(_cffi_VerificationError);
    if (_cffi_setup_custom(library) < 0)
        return NULL;
    return PyBool_FromLong(was_alive);
}

static int _cffi_init(void)
{
    PyObject *module, *c_api_object = NULL;

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

    c_api_object = PyObject_GetAttrString(module, "_C_API");
    if (c_api_object == NULL)
        goto failure;
    if (!PyCapsule_CheckExact(c_api_object)) {
        PyErr_SetNone(PyExc_ImportError);
        goto failure;
    }
    memcpy(_cffi_exports, PyCapsule_GetPointer(c_api_object, "cffi"),
           _CFFI_NUM_EXPORTS * sizeof(void *));

    Py_DECREF(module);
    Py_DECREF(c_api_object);
    return 0;

  failure:
    Py_XDECREF(module);
    Py_XDECREF(c_api_object);
    return -1;
}

#define _cffi_type(num) ((CTypeDescrObject *)PyList_GET_ITEM(_cffi_types, num))

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



    #include <libzfs.h>
    #include <sys/fs/zfs.h>
    #include <sys/types.h>
    #include <libnvpair.h>
    

static void _cffi_check__avl_node_t(avl_node_t *p)
{
  /* only to generate compile-time warnings or errors */
}
static PyObject *
_cffi_layout__avl_node_t(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; avl_node_t y; };
  static Py_ssize_t nums[] = {
    sizeof(avl_node_t),
    offsetof(struct _cffi_aligncheck, y),
    -1
  };
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check__avl_node_t(0);
}

static void _cffi_check__avl_tree_t(avl_tree_t *p)
{
  /* only to generate compile-time warnings or errors */
}
static PyObject *
_cffi_layout__avl_tree_t(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; avl_tree_t y; };
  static Py_ssize_t nums[] = {
    sizeof(avl_tree_t),
    offsetof(struct _cffi_aligncheck, y),
    -1
  };
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check__avl_tree_t(0);
}

static int _cffi_e__libzfs_errors_t(PyObject *lib)
{
  if ((EZFS_NOMEM) < 0 || (unsigned long)(EZFS_NOMEM) != 2000UL) {
    char buf[64];
    if ((EZFS_NOMEM) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_NOMEM));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_NOMEM));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_NOMEM", buf, "2000");
    return -1;
  }
  if ((EZFS_BADPROP) < 0 || (unsigned long)(EZFS_BADPROP) != 2001UL) {
    char buf[64];
    if ((EZFS_BADPROP) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_BADPROP));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_BADPROP));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_BADPROP", buf, "2001");
    return -1;
  }
  if ((EZFS_PROPREADONLY) < 0 || (unsigned long)(EZFS_PROPREADONLY) != 2002UL) {
    char buf[64];
    if ((EZFS_PROPREADONLY) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_PROPREADONLY));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_PROPREADONLY));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_PROPREADONLY", buf, "2002");
    return -1;
  }
  if ((EZFS_PROPTYPE) < 0 || (unsigned long)(EZFS_PROPTYPE) != 2003UL) {
    char buf[64];
    if ((EZFS_PROPTYPE) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_PROPTYPE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_PROPTYPE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_PROPTYPE", buf, "2003");
    return -1;
  }
  if ((EZFS_PROPNONINHERIT) < 0 || (unsigned long)(EZFS_PROPNONINHERIT) != 2004UL) {
    char buf[64];
    if ((EZFS_PROPNONINHERIT) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_PROPNONINHERIT));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_PROPNONINHERIT));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_PROPNONINHERIT", buf, "2004");
    return -1;
  }
  if ((EZFS_PROPSPACE) < 0 || (unsigned long)(EZFS_PROPSPACE) != 2005UL) {
    char buf[64];
    if ((EZFS_PROPSPACE) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_PROPSPACE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_PROPSPACE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_PROPSPACE", buf, "2005");
    return -1;
  }
  if ((EZFS_BADTYPE) < 0 || (unsigned long)(EZFS_BADTYPE) != 2006UL) {
    char buf[64];
    if ((EZFS_BADTYPE) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_BADTYPE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_BADTYPE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_BADTYPE", buf, "2006");
    return -1;
  }
  if ((EZFS_BUSY) < 0 || (unsigned long)(EZFS_BUSY) != 2007UL) {
    char buf[64];
    if ((EZFS_BUSY) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_BUSY));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_BUSY));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_BUSY", buf, "2007");
    return -1;
  }
  if ((EZFS_EXISTS) < 0 || (unsigned long)(EZFS_EXISTS) != 2008UL) {
    char buf[64];
    if ((EZFS_EXISTS) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_EXISTS));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_EXISTS));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_EXISTS", buf, "2008");
    return -1;
  }
  if ((EZFS_NOENT) < 0 || (unsigned long)(EZFS_NOENT) != 2009UL) {
    char buf[64];
    if ((EZFS_NOENT) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_NOENT));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_NOENT));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_NOENT", buf, "2009");
    return -1;
  }
  if ((EZFS_BADSTREAM) < 0 || (unsigned long)(EZFS_BADSTREAM) != 2010UL) {
    char buf[64];
    if ((EZFS_BADSTREAM) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_BADSTREAM));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_BADSTREAM));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_BADSTREAM", buf, "2010");
    return -1;
  }
  if ((EZFS_DSREADONLY) < 0 || (unsigned long)(EZFS_DSREADONLY) != 2011UL) {
    char buf[64];
    if ((EZFS_DSREADONLY) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_DSREADONLY));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_DSREADONLY));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_DSREADONLY", buf, "2011");
    return -1;
  }
  if ((EZFS_VOLTOOBIG) < 0 || (unsigned long)(EZFS_VOLTOOBIG) != 2012UL) {
    char buf[64];
    if ((EZFS_VOLTOOBIG) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_VOLTOOBIG));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_VOLTOOBIG));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_VOLTOOBIG", buf, "2012");
    return -1;
  }
  if ((EZFS_INVALIDNAME) < 0 || (unsigned long)(EZFS_INVALIDNAME) != 2013UL) {
    char buf[64];
    if ((EZFS_INVALIDNAME) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_INVALIDNAME));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_INVALIDNAME));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_INVALIDNAME", buf, "2013");
    return -1;
  }
  if ((EZFS_BADRESTORE) < 0 || (unsigned long)(EZFS_BADRESTORE) != 2014UL) {
    char buf[64];
    if ((EZFS_BADRESTORE) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_BADRESTORE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_BADRESTORE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_BADRESTORE", buf, "2014");
    return -1;
  }
  if ((EZFS_BADBACKUP) < 0 || (unsigned long)(EZFS_BADBACKUP) != 2015UL) {
    char buf[64];
    if ((EZFS_BADBACKUP) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_BADBACKUP));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_BADBACKUP));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_BADBACKUP", buf, "2015");
    return -1;
  }
  if ((EZFS_BADTARGET) < 0 || (unsigned long)(EZFS_BADTARGET) != 2016UL) {
    char buf[64];
    if ((EZFS_BADTARGET) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_BADTARGET));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_BADTARGET));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_BADTARGET", buf, "2016");
    return -1;
  }
  if ((EZFS_NODEVICE) < 0 || (unsigned long)(EZFS_NODEVICE) != 2017UL) {
    char buf[64];
    if ((EZFS_NODEVICE) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_NODEVICE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_NODEVICE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_NODEVICE", buf, "2017");
    return -1;
  }
  if ((EZFS_BADDEV) < 0 || (unsigned long)(EZFS_BADDEV) != 2018UL) {
    char buf[64];
    if ((EZFS_BADDEV) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_BADDEV));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_BADDEV));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_BADDEV", buf, "2018");
    return -1;
  }
  if ((EZFS_NOREPLICAS) < 0 || (unsigned long)(EZFS_NOREPLICAS) != 2019UL) {
    char buf[64];
    if ((EZFS_NOREPLICAS) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_NOREPLICAS));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_NOREPLICAS));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_NOREPLICAS", buf, "2019");
    return -1;
  }
  if ((EZFS_RESILVERING) < 0 || (unsigned long)(EZFS_RESILVERING) != 2020UL) {
    char buf[64];
    if ((EZFS_RESILVERING) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_RESILVERING));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_RESILVERING));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_RESILVERING", buf, "2020");
    return -1;
  }
  if ((EZFS_BADVERSION) < 0 || (unsigned long)(EZFS_BADVERSION) != 2021UL) {
    char buf[64];
    if ((EZFS_BADVERSION) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_BADVERSION));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_BADVERSION));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_BADVERSION", buf, "2021");
    return -1;
  }
  if ((EZFS_POOLUNAVAIL) < 0 || (unsigned long)(EZFS_POOLUNAVAIL) != 2022UL) {
    char buf[64];
    if ((EZFS_POOLUNAVAIL) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_POOLUNAVAIL));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_POOLUNAVAIL));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_POOLUNAVAIL", buf, "2022");
    return -1;
  }
  if ((EZFS_DEVOVERFLOW) < 0 || (unsigned long)(EZFS_DEVOVERFLOW) != 2023UL) {
    char buf[64];
    if ((EZFS_DEVOVERFLOW) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_DEVOVERFLOW));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_DEVOVERFLOW));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_DEVOVERFLOW", buf, "2023");
    return -1;
  }
  if ((EZFS_BADPATH) < 0 || (unsigned long)(EZFS_BADPATH) != 2024UL) {
    char buf[64];
    if ((EZFS_BADPATH) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_BADPATH));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_BADPATH));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_BADPATH", buf, "2024");
    return -1;
  }
  if ((EZFS_CROSSTARGET) < 0 || (unsigned long)(EZFS_CROSSTARGET) != 2025UL) {
    char buf[64];
    if ((EZFS_CROSSTARGET) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_CROSSTARGET));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_CROSSTARGET));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_CROSSTARGET", buf, "2025");
    return -1;
  }
  if ((EZFS_ZONED) < 0 || (unsigned long)(EZFS_ZONED) != 2026UL) {
    char buf[64];
    if ((EZFS_ZONED) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_ZONED));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_ZONED));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_ZONED", buf, "2026");
    return -1;
  }
  if ((EZFS_MOUNTFAILED) < 0 || (unsigned long)(EZFS_MOUNTFAILED) != 2027UL) {
    char buf[64];
    if ((EZFS_MOUNTFAILED) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_MOUNTFAILED));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_MOUNTFAILED));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_MOUNTFAILED", buf, "2027");
    return -1;
  }
  if ((EZFS_UMOUNTFAILED) < 0 || (unsigned long)(EZFS_UMOUNTFAILED) != 2028UL) {
    char buf[64];
    if ((EZFS_UMOUNTFAILED) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_UMOUNTFAILED));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_UMOUNTFAILED));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_UMOUNTFAILED", buf, "2028");
    return -1;
  }
  if ((EZFS_UNSHARENFSFAILED) < 0 || (unsigned long)(EZFS_UNSHARENFSFAILED) != 2029UL) {
    char buf[64];
    if ((EZFS_UNSHARENFSFAILED) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_UNSHARENFSFAILED));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_UNSHARENFSFAILED));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_UNSHARENFSFAILED", buf, "2029");
    return -1;
  }
  if ((EZFS_SHARENFSFAILED) < 0 || (unsigned long)(EZFS_SHARENFSFAILED) != 2030UL) {
    char buf[64];
    if ((EZFS_SHARENFSFAILED) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_SHARENFSFAILED));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_SHARENFSFAILED));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_SHARENFSFAILED", buf, "2030");
    return -1;
  }
  if ((EZFS_PERM) < 0 || (unsigned long)(EZFS_PERM) != 2031UL) {
    char buf[64];
    if ((EZFS_PERM) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_PERM));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_PERM));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_PERM", buf, "2031");
    return -1;
  }
  if ((EZFS_NOSPC) < 0 || (unsigned long)(EZFS_NOSPC) != 2032UL) {
    char buf[64];
    if ((EZFS_NOSPC) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_NOSPC));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_NOSPC));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_NOSPC", buf, "2032");
    return -1;
  }
  if ((EZFS_FAULT) < 0 || (unsigned long)(EZFS_FAULT) != 2033UL) {
    char buf[64];
    if ((EZFS_FAULT) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_FAULT));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_FAULT));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_FAULT", buf, "2033");
    return -1;
  }
  if ((EZFS_IO) < 0 || (unsigned long)(EZFS_IO) != 2034UL) {
    char buf[64];
    if ((EZFS_IO) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_IO));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_IO));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_IO", buf, "2034");
    return -1;
  }
  if ((EZFS_INTR) < 0 || (unsigned long)(EZFS_INTR) != 2035UL) {
    char buf[64];
    if ((EZFS_INTR) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_INTR));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_INTR));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_INTR", buf, "2035");
    return -1;
  }
  if ((EZFS_ISSPARE) < 0 || (unsigned long)(EZFS_ISSPARE) != 2036UL) {
    char buf[64];
    if ((EZFS_ISSPARE) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_ISSPARE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_ISSPARE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_ISSPARE", buf, "2036");
    return -1;
  }
  if ((EZFS_INVALCONFIG) < 0 || (unsigned long)(EZFS_INVALCONFIG) != 2037UL) {
    char buf[64];
    if ((EZFS_INVALCONFIG) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_INVALCONFIG));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_INVALCONFIG));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_INVALCONFIG", buf, "2037");
    return -1;
  }
  if ((EZFS_RECURSIVE) < 0 || (unsigned long)(EZFS_RECURSIVE) != 2038UL) {
    char buf[64];
    if ((EZFS_RECURSIVE) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_RECURSIVE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_RECURSIVE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_RECURSIVE", buf, "2038");
    return -1;
  }
  if ((EZFS_NOHISTORY) < 0 || (unsigned long)(EZFS_NOHISTORY) != 2039UL) {
    char buf[64];
    if ((EZFS_NOHISTORY) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_NOHISTORY));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_NOHISTORY));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_NOHISTORY", buf, "2039");
    return -1;
  }
  if ((EZFS_POOLPROPS) < 0 || (unsigned long)(EZFS_POOLPROPS) != 2040UL) {
    char buf[64];
    if ((EZFS_POOLPROPS) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_POOLPROPS));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_POOLPROPS));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_POOLPROPS", buf, "2040");
    return -1;
  }
  if ((EZFS_POOL_NOTSUP) < 0 || (unsigned long)(EZFS_POOL_NOTSUP) != 2041UL) {
    char buf[64];
    if ((EZFS_POOL_NOTSUP) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_POOL_NOTSUP));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_POOL_NOTSUP));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_POOL_NOTSUP", buf, "2041");
    return -1;
  }
  if ((EZFS_POOL_INVALARG) < 0 || (unsigned long)(EZFS_POOL_INVALARG) != 2042UL) {
    char buf[64];
    if ((EZFS_POOL_INVALARG) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_POOL_INVALARG));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_POOL_INVALARG));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_POOL_INVALARG", buf, "2042");
    return -1;
  }
  if ((EZFS_NAMETOOLONG) < 0 || (unsigned long)(EZFS_NAMETOOLONG) != 2043UL) {
    char buf[64];
    if ((EZFS_NAMETOOLONG) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_NAMETOOLONG));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_NAMETOOLONG));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_NAMETOOLONG", buf, "2043");
    return -1;
  }
  if ((EZFS_OPENFAILED) < 0 || (unsigned long)(EZFS_OPENFAILED) != 2044UL) {
    char buf[64];
    if ((EZFS_OPENFAILED) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_OPENFAILED));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_OPENFAILED));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_OPENFAILED", buf, "2044");
    return -1;
  }
  if ((EZFS_NOCAP) < 0 || (unsigned long)(EZFS_NOCAP) != 2045UL) {
    char buf[64];
    if ((EZFS_NOCAP) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_NOCAP));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_NOCAP));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_NOCAP", buf, "2045");
    return -1;
  }
  if ((EZFS_LABELFAILED) < 0 || (unsigned long)(EZFS_LABELFAILED) != 2046UL) {
    char buf[64];
    if ((EZFS_LABELFAILED) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_LABELFAILED));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_LABELFAILED));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_LABELFAILED", buf, "2046");
    return -1;
  }
  if ((EZFS_BADWHO) < 0 || (unsigned long)(EZFS_BADWHO) != 2047UL) {
    char buf[64];
    if ((EZFS_BADWHO) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_BADWHO));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_BADWHO));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_BADWHO", buf, "2047");
    return -1;
  }
  if ((EZFS_BADPERM) < 0 || (unsigned long)(EZFS_BADPERM) != 2048UL) {
    char buf[64];
    if ((EZFS_BADPERM) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_BADPERM));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_BADPERM));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_BADPERM", buf, "2048");
    return -1;
  }
  if ((EZFS_BADPERMSET) < 0 || (unsigned long)(EZFS_BADPERMSET) != 2049UL) {
    char buf[64];
    if ((EZFS_BADPERMSET) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_BADPERMSET));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_BADPERMSET));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_BADPERMSET", buf, "2049");
    return -1;
  }
  if ((EZFS_NODELEGATION) < 0 || (unsigned long)(EZFS_NODELEGATION) != 2050UL) {
    char buf[64];
    if ((EZFS_NODELEGATION) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_NODELEGATION));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_NODELEGATION));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_NODELEGATION", buf, "2050");
    return -1;
  }
  if ((EZFS_UNSHARESMBFAILED) < 0 || (unsigned long)(EZFS_UNSHARESMBFAILED) != 2051UL) {
    char buf[64];
    if ((EZFS_UNSHARESMBFAILED) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_UNSHARESMBFAILED));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_UNSHARESMBFAILED));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_UNSHARESMBFAILED", buf, "2051");
    return -1;
  }
  if ((EZFS_SHARESMBFAILED) < 0 || (unsigned long)(EZFS_SHARESMBFAILED) != 2052UL) {
    char buf[64];
    if ((EZFS_SHARESMBFAILED) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_SHARESMBFAILED));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_SHARESMBFAILED));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_SHARESMBFAILED", buf, "2052");
    return -1;
  }
  if ((EZFS_BADCACHE) < 0 || (unsigned long)(EZFS_BADCACHE) != 2053UL) {
    char buf[64];
    if ((EZFS_BADCACHE) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_BADCACHE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_BADCACHE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_BADCACHE", buf, "2053");
    return -1;
  }
  if ((EZFS_ISL2CACHE) < 0 || (unsigned long)(EZFS_ISL2CACHE) != 2054UL) {
    char buf[64];
    if ((EZFS_ISL2CACHE) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_ISL2CACHE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_ISL2CACHE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_ISL2CACHE", buf, "2054");
    return -1;
  }
  if ((EZFS_VDEVNOTSUP) < 0 || (unsigned long)(EZFS_VDEVNOTSUP) != 2055UL) {
    char buf[64];
    if ((EZFS_VDEVNOTSUP) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_VDEVNOTSUP));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_VDEVNOTSUP));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_VDEVNOTSUP", buf, "2055");
    return -1;
  }
  if ((EZFS_NOTSUP) < 0 || (unsigned long)(EZFS_NOTSUP) != 2056UL) {
    char buf[64];
    if ((EZFS_NOTSUP) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_NOTSUP));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_NOTSUP));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_NOTSUP", buf, "2056");
    return -1;
  }
  if ((EZFS_ACTIVE_SPARE) < 0 || (unsigned long)(EZFS_ACTIVE_SPARE) != 2057UL) {
    char buf[64];
    if ((EZFS_ACTIVE_SPARE) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_ACTIVE_SPARE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_ACTIVE_SPARE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_ACTIVE_SPARE", buf, "2057");
    return -1;
  }
  if ((EZFS_UNPLAYED_LOGS) < 0 || (unsigned long)(EZFS_UNPLAYED_LOGS) != 2058UL) {
    char buf[64];
    if ((EZFS_UNPLAYED_LOGS) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_UNPLAYED_LOGS));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_UNPLAYED_LOGS));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_UNPLAYED_LOGS", buf, "2058");
    return -1;
  }
  if ((EZFS_REFTAG_RELE) < 0 || (unsigned long)(EZFS_REFTAG_RELE) != 2059UL) {
    char buf[64];
    if ((EZFS_REFTAG_RELE) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_REFTAG_RELE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_REFTAG_RELE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_REFTAG_RELE", buf, "2059");
    return -1;
  }
  if ((EZFS_REFTAG_HOLD) < 0 || (unsigned long)(EZFS_REFTAG_HOLD) != 2060UL) {
    char buf[64];
    if ((EZFS_REFTAG_HOLD) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_REFTAG_HOLD));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_REFTAG_HOLD));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_REFTAG_HOLD", buf, "2060");
    return -1;
  }
  if ((EZFS_TAGTOOLONG) < 0 || (unsigned long)(EZFS_TAGTOOLONG) != 2061UL) {
    char buf[64];
    if ((EZFS_TAGTOOLONG) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_TAGTOOLONG));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_TAGTOOLONG));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_TAGTOOLONG", buf, "2061");
    return -1;
  }
  if ((EZFS_PIPEFAILED) < 0 || (unsigned long)(EZFS_PIPEFAILED) != 2062UL) {
    char buf[64];
    if ((EZFS_PIPEFAILED) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_PIPEFAILED));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_PIPEFAILED));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_PIPEFAILED", buf, "2062");
    return -1;
  }
  if ((EZFS_THREADCREATEFAILED) < 0 || (unsigned long)(EZFS_THREADCREATEFAILED) != 2063UL) {
    char buf[64];
    if ((EZFS_THREADCREATEFAILED) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_THREADCREATEFAILED));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_THREADCREATEFAILED));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_THREADCREATEFAILED", buf, "2063");
    return -1;
  }
  if ((EZFS_POSTSPLIT_ONLINE) < 0 || (unsigned long)(EZFS_POSTSPLIT_ONLINE) != 2064UL) {
    char buf[64];
    if ((EZFS_POSTSPLIT_ONLINE) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_POSTSPLIT_ONLINE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_POSTSPLIT_ONLINE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_POSTSPLIT_ONLINE", buf, "2064");
    return -1;
  }
  if ((EZFS_SCRUBBING) < 0 || (unsigned long)(EZFS_SCRUBBING) != 2065UL) {
    char buf[64];
    if ((EZFS_SCRUBBING) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_SCRUBBING));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_SCRUBBING));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_SCRUBBING", buf, "2065");
    return -1;
  }
  if ((EZFS_NO_SCRUB) < 0 || (unsigned long)(EZFS_NO_SCRUB) != 2066UL) {
    char buf[64];
    if ((EZFS_NO_SCRUB) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_NO_SCRUB));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_NO_SCRUB));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_NO_SCRUB", buf, "2066");
    return -1;
  }
  if ((EZFS_DIFF) < 0 || (unsigned long)(EZFS_DIFF) != 2067UL) {
    char buf[64];
    if ((EZFS_DIFF) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_DIFF));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_DIFF));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_DIFF", buf, "2067");
    return -1;
  }
  if ((EZFS_DIFFDATA) < 0 || (unsigned long)(EZFS_DIFFDATA) != 2068UL) {
    char buf[64];
    if ((EZFS_DIFFDATA) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_DIFFDATA));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_DIFFDATA));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_DIFFDATA", buf, "2068");
    return -1;
  }
  if ((EZFS_POOLREADONLY) < 0 || (unsigned long)(EZFS_POOLREADONLY) != 2069UL) {
    char buf[64];
    if ((EZFS_POOLREADONLY) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_POOLREADONLY));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_POOLREADONLY));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_POOLREADONLY", buf, "2069");
    return -1;
  }
  if ((EZFS_UNKNOWN) < 0 || (unsigned long)(EZFS_UNKNOWN) != 2070UL) {
    char buf[64];
    if ((EZFS_UNKNOWN) < 0)
        snprintf(buf, 63, "%ld", (long)(EZFS_UNKNOWN));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(EZFS_UNKNOWN));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "libzfs_errors_t", "EZFS_UNKNOWN", buf, "2070");
    return -1;
  }
  return 0;
}

static int _cffi_e__zfs_get_column_t(PyObject *lib)
{
  if ((GET_COL_NONE) < 0 || (unsigned long)(GET_COL_NONE) != 0UL) {
    char buf[64];
    if ((GET_COL_NONE) < 0)
        snprintf(buf, 63, "%ld", (long)(GET_COL_NONE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(GET_COL_NONE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_get_column_t", "GET_COL_NONE", buf, "0");
    return -1;
  }
  if ((GET_COL_NAME) < 0 || (unsigned long)(GET_COL_NAME) != 1UL) {
    char buf[64];
    if ((GET_COL_NAME) < 0)
        snprintf(buf, 63, "%ld", (long)(GET_COL_NAME));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(GET_COL_NAME));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_get_column_t", "GET_COL_NAME", buf, "1");
    return -1;
  }
  if ((GET_COL_PROPERTY) < 0 || (unsigned long)(GET_COL_PROPERTY) != 2UL) {
    char buf[64];
    if ((GET_COL_PROPERTY) < 0)
        snprintf(buf, 63, "%ld", (long)(GET_COL_PROPERTY));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(GET_COL_PROPERTY));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_get_column_t", "GET_COL_PROPERTY", buf, "2");
    return -1;
  }
  if ((GET_COL_VALUE) < 0 || (unsigned long)(GET_COL_VALUE) != 3UL) {
    char buf[64];
    if ((GET_COL_VALUE) < 0)
        snprintf(buf, 63, "%ld", (long)(GET_COL_VALUE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(GET_COL_VALUE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_get_column_t", "GET_COL_VALUE", buf, "3");
    return -1;
  }
  if ((GET_COL_RECVD) < 0 || (unsigned long)(GET_COL_RECVD) != 4UL) {
    char buf[64];
    if ((GET_COL_RECVD) < 0)
        snprintf(buf, 63, "%ld", (long)(GET_COL_RECVD));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(GET_COL_RECVD));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_get_column_t", "GET_COL_RECVD", buf, "4");
    return -1;
  }
  if ((GET_COL_SOURCE) < 0 || (unsigned long)(GET_COL_SOURCE) != 5UL) {
    char buf[64];
    if ((GET_COL_SOURCE) < 0)
        snprintf(buf, 63, "%ld", (long)(GET_COL_SOURCE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(GET_COL_SOURCE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_get_column_t", "GET_COL_SOURCE", buf, "5");
    return -1;
  }
  return _cffi_e__libzfs_errors_t(lib);
}

static int _cffi_e__zfs_prop_t(PyObject *lib)
{
  if ((ZFS_PROP_TYPE) < 0 || (unsigned long)(ZFS_PROP_TYPE) != 0UL) {
    char buf[64];
    if ((ZFS_PROP_TYPE) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_TYPE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_TYPE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_TYPE", buf, "0");
    return -1;
  }
  if ((ZFS_PROP_CREATION) < 0 || (unsigned long)(ZFS_PROP_CREATION) != 1UL) {
    char buf[64];
    if ((ZFS_PROP_CREATION) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_CREATION));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_CREATION));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_CREATION", buf, "1");
    return -1;
  }
  if ((ZFS_PROP_USED) < 0 || (unsigned long)(ZFS_PROP_USED) != 2UL) {
    char buf[64];
    if ((ZFS_PROP_USED) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_USED));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_USED));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_USED", buf, "2");
    return -1;
  }
  if ((ZFS_PROP_AVAILABLE) < 0 || (unsigned long)(ZFS_PROP_AVAILABLE) != 3UL) {
    char buf[64];
    if ((ZFS_PROP_AVAILABLE) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_AVAILABLE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_AVAILABLE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_AVAILABLE", buf, "3");
    return -1;
  }
  if ((ZFS_PROP_REFERENCED) < 0 || (unsigned long)(ZFS_PROP_REFERENCED) != 4UL) {
    char buf[64];
    if ((ZFS_PROP_REFERENCED) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_REFERENCED));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_REFERENCED));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_REFERENCED", buf, "4");
    return -1;
  }
  if ((ZFS_PROP_COMPRESSRATIO) < 0 || (unsigned long)(ZFS_PROP_COMPRESSRATIO) != 5UL) {
    char buf[64];
    if ((ZFS_PROP_COMPRESSRATIO) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_COMPRESSRATIO));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_COMPRESSRATIO));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_COMPRESSRATIO", buf, "5");
    return -1;
  }
  if ((ZFS_PROP_MOUNTED) < 0 || (unsigned long)(ZFS_PROP_MOUNTED) != 6UL) {
    char buf[64];
    if ((ZFS_PROP_MOUNTED) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_MOUNTED));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_MOUNTED));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_MOUNTED", buf, "6");
    return -1;
  }
  if ((ZFS_PROP_ORIGIN) < 0 || (unsigned long)(ZFS_PROP_ORIGIN) != 7UL) {
    char buf[64];
    if ((ZFS_PROP_ORIGIN) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_ORIGIN));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_ORIGIN));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_ORIGIN", buf, "7");
    return -1;
  }
  if ((ZFS_PROP_QUOTA) < 0 || (unsigned long)(ZFS_PROP_QUOTA) != 8UL) {
    char buf[64];
    if ((ZFS_PROP_QUOTA) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_QUOTA));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_QUOTA));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_QUOTA", buf, "8");
    return -1;
  }
  if ((ZFS_PROP_RESERVATION) < 0 || (unsigned long)(ZFS_PROP_RESERVATION) != 9UL) {
    char buf[64];
    if ((ZFS_PROP_RESERVATION) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_RESERVATION));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_RESERVATION));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_RESERVATION", buf, "9");
    return -1;
  }
  if ((ZFS_PROP_VOLSIZE) < 0 || (unsigned long)(ZFS_PROP_VOLSIZE) != 10UL) {
    char buf[64];
    if ((ZFS_PROP_VOLSIZE) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_VOLSIZE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_VOLSIZE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_VOLSIZE", buf, "10");
    return -1;
  }
  if ((ZFS_PROP_VOLBLOCKSIZE) < 0 || (unsigned long)(ZFS_PROP_VOLBLOCKSIZE) != 11UL) {
    char buf[64];
    if ((ZFS_PROP_VOLBLOCKSIZE) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_VOLBLOCKSIZE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_VOLBLOCKSIZE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_VOLBLOCKSIZE", buf, "11");
    return -1;
  }
  if ((ZFS_PROP_RECORDSIZE) < 0 || (unsigned long)(ZFS_PROP_RECORDSIZE) != 12UL) {
    char buf[64];
    if ((ZFS_PROP_RECORDSIZE) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_RECORDSIZE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_RECORDSIZE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_RECORDSIZE", buf, "12");
    return -1;
  }
  if ((ZFS_PROP_MOUNTPOINT) < 0 || (unsigned long)(ZFS_PROP_MOUNTPOINT) != 13UL) {
    char buf[64];
    if ((ZFS_PROP_MOUNTPOINT) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_MOUNTPOINT));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_MOUNTPOINT));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_MOUNTPOINT", buf, "13");
    return -1;
  }
  if ((ZFS_PROP_SHARENFS) < 0 || (unsigned long)(ZFS_PROP_SHARENFS) != 14UL) {
    char buf[64];
    if ((ZFS_PROP_SHARENFS) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_SHARENFS));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_SHARENFS));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_SHARENFS", buf, "14");
    return -1;
  }
  if ((ZFS_PROP_CHECKSUM) < 0 || (unsigned long)(ZFS_PROP_CHECKSUM) != 15UL) {
    char buf[64];
    if ((ZFS_PROP_CHECKSUM) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_CHECKSUM));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_CHECKSUM));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_CHECKSUM", buf, "15");
    return -1;
  }
  if ((ZFS_PROP_COMPRESSION) < 0 || (unsigned long)(ZFS_PROP_COMPRESSION) != 16UL) {
    char buf[64];
    if ((ZFS_PROP_COMPRESSION) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_COMPRESSION));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_COMPRESSION));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_COMPRESSION", buf, "16");
    return -1;
  }
  if ((ZFS_PROP_ATIME) < 0 || (unsigned long)(ZFS_PROP_ATIME) != 17UL) {
    char buf[64];
    if ((ZFS_PROP_ATIME) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_ATIME));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_ATIME));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_ATIME", buf, "17");
    return -1;
  }
  if ((ZFS_PROP_DEVICES) < 0 || (unsigned long)(ZFS_PROP_DEVICES) != 18UL) {
    char buf[64];
    if ((ZFS_PROP_DEVICES) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_DEVICES));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_DEVICES));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_DEVICES", buf, "18");
    return -1;
  }
  if ((ZFS_PROP_EXEC) < 0 || (unsigned long)(ZFS_PROP_EXEC) != 19UL) {
    char buf[64];
    if ((ZFS_PROP_EXEC) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_EXEC));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_EXEC));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_EXEC", buf, "19");
    return -1;
  }
  if ((ZFS_PROP_SETUID) < 0 || (unsigned long)(ZFS_PROP_SETUID) != 20UL) {
    char buf[64];
    if ((ZFS_PROP_SETUID) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_SETUID));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_SETUID));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_SETUID", buf, "20");
    return -1;
  }
  if ((ZFS_PROP_READONLY) < 0 || (unsigned long)(ZFS_PROP_READONLY) != 21UL) {
    char buf[64];
    if ((ZFS_PROP_READONLY) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_READONLY));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_READONLY));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_READONLY", buf, "21");
    return -1;
  }
  if ((ZFS_PROP_ZONED) < 0 || (unsigned long)(ZFS_PROP_ZONED) != 22UL) {
    char buf[64];
    if ((ZFS_PROP_ZONED) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_ZONED));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_ZONED));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_ZONED", buf, "22");
    return -1;
  }
  if ((ZFS_PROP_SNAPDIR) < 0 || (unsigned long)(ZFS_PROP_SNAPDIR) != 23UL) {
    char buf[64];
    if ((ZFS_PROP_SNAPDIR) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_SNAPDIR));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_SNAPDIR));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_SNAPDIR", buf, "23");
    return -1;
  }
  if ((ZFS_PROP_PRIVATE) < 0 || (unsigned long)(ZFS_PROP_PRIVATE) != 24UL) {
    char buf[64];
    if ((ZFS_PROP_PRIVATE) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_PRIVATE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_PRIVATE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_PRIVATE", buf, "24");
    return -1;
  }
  if ((ZFS_PROP_ACLINHERIT) < 0 || (unsigned long)(ZFS_PROP_ACLINHERIT) != 25UL) {
    char buf[64];
    if ((ZFS_PROP_ACLINHERIT) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_ACLINHERIT));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_ACLINHERIT));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_ACLINHERIT", buf, "25");
    return -1;
  }
  if ((ZFS_PROP_CREATETXG) < 0 || (unsigned long)(ZFS_PROP_CREATETXG) != 26UL) {
    char buf[64];
    if ((ZFS_PROP_CREATETXG) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_CREATETXG));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_CREATETXG));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_CREATETXG", buf, "26");
    return -1;
  }
  if ((ZFS_PROP_NAME) < 0 || (unsigned long)(ZFS_PROP_NAME) != 27UL) {
    char buf[64];
    if ((ZFS_PROP_NAME) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_NAME));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_NAME));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_NAME", buf, "27");
    return -1;
  }
  if ((ZFS_PROP_CANMOUNT) < 0 || (unsigned long)(ZFS_PROP_CANMOUNT) != 28UL) {
    char buf[64];
    if ((ZFS_PROP_CANMOUNT) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_CANMOUNT));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_CANMOUNT));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_CANMOUNT", buf, "28");
    return -1;
  }
  if ((ZFS_PROP_ISCSIOPTIONS) < 0 || (unsigned long)(ZFS_PROP_ISCSIOPTIONS) != 29UL) {
    char buf[64];
    if ((ZFS_PROP_ISCSIOPTIONS) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_ISCSIOPTIONS));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_ISCSIOPTIONS));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_ISCSIOPTIONS", buf, "29");
    return -1;
  }
  if ((ZFS_PROP_XATTR) < 0 || (unsigned long)(ZFS_PROP_XATTR) != 30UL) {
    char buf[64];
    if ((ZFS_PROP_XATTR) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_XATTR));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_XATTR));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_XATTR", buf, "30");
    return -1;
  }
  if ((ZFS_PROP_NUMCLONES) < 0 || (unsigned long)(ZFS_PROP_NUMCLONES) != 31UL) {
    char buf[64];
    if ((ZFS_PROP_NUMCLONES) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_NUMCLONES));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_NUMCLONES));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_NUMCLONES", buf, "31");
    return -1;
  }
  if ((ZFS_PROP_COPIES) < 0 || (unsigned long)(ZFS_PROP_COPIES) != 32UL) {
    char buf[64];
    if ((ZFS_PROP_COPIES) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_COPIES));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_COPIES));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_COPIES", buf, "32");
    return -1;
  }
  if ((ZFS_PROP_VERSION) < 0 || (unsigned long)(ZFS_PROP_VERSION) != 33UL) {
    char buf[64];
    if ((ZFS_PROP_VERSION) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_VERSION));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_VERSION));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_VERSION", buf, "33");
    return -1;
  }
  if ((ZFS_PROP_UTF8ONLY) < 0 || (unsigned long)(ZFS_PROP_UTF8ONLY) != 34UL) {
    char buf[64];
    if ((ZFS_PROP_UTF8ONLY) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_UTF8ONLY));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_UTF8ONLY));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_UTF8ONLY", buf, "34");
    return -1;
  }
  if ((ZFS_PROP_NORMALIZE) < 0 || (unsigned long)(ZFS_PROP_NORMALIZE) != 35UL) {
    char buf[64];
    if ((ZFS_PROP_NORMALIZE) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_NORMALIZE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_NORMALIZE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_NORMALIZE", buf, "35");
    return -1;
  }
  if ((ZFS_PROP_CASE) < 0 || (unsigned long)(ZFS_PROP_CASE) != 36UL) {
    char buf[64];
    if ((ZFS_PROP_CASE) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_CASE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_CASE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_CASE", buf, "36");
    return -1;
  }
  if ((ZFS_PROP_VSCAN) < 0 || (unsigned long)(ZFS_PROP_VSCAN) != 37UL) {
    char buf[64];
    if ((ZFS_PROP_VSCAN) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_VSCAN));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_VSCAN));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_VSCAN", buf, "37");
    return -1;
  }
  if ((ZFS_PROP_NBMAND) < 0 || (unsigned long)(ZFS_PROP_NBMAND) != 38UL) {
    char buf[64];
    if ((ZFS_PROP_NBMAND) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_NBMAND));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_NBMAND));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_NBMAND", buf, "38");
    return -1;
  }
  if ((ZFS_PROP_SHARESMB) < 0 || (unsigned long)(ZFS_PROP_SHARESMB) != 39UL) {
    char buf[64];
    if ((ZFS_PROP_SHARESMB) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_SHARESMB));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_SHARESMB));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_SHARESMB", buf, "39");
    return -1;
  }
  if ((ZFS_PROP_REFQUOTA) < 0 || (unsigned long)(ZFS_PROP_REFQUOTA) != 40UL) {
    char buf[64];
    if ((ZFS_PROP_REFQUOTA) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_REFQUOTA));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_REFQUOTA));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_REFQUOTA", buf, "40");
    return -1;
  }
  if ((ZFS_PROP_REFRESERVATION) < 0 || (unsigned long)(ZFS_PROP_REFRESERVATION) != 41UL) {
    char buf[64];
    if ((ZFS_PROP_REFRESERVATION) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_REFRESERVATION));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_REFRESERVATION));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_REFRESERVATION", buf, "41");
    return -1;
  }
  if ((ZFS_PROP_GUID) < 0 || (unsigned long)(ZFS_PROP_GUID) != 42UL) {
    char buf[64];
    if ((ZFS_PROP_GUID) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_GUID));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_GUID));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_GUID", buf, "42");
    return -1;
  }
  if ((ZFS_PROP_PRIMARYCACHE) < 0 || (unsigned long)(ZFS_PROP_PRIMARYCACHE) != 43UL) {
    char buf[64];
    if ((ZFS_PROP_PRIMARYCACHE) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_PRIMARYCACHE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_PRIMARYCACHE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_PRIMARYCACHE", buf, "43");
    return -1;
  }
  if ((ZFS_PROP_SECONDARYCACHE) < 0 || (unsigned long)(ZFS_PROP_SECONDARYCACHE) != 44UL) {
    char buf[64];
    if ((ZFS_PROP_SECONDARYCACHE) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_SECONDARYCACHE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_SECONDARYCACHE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_SECONDARYCACHE", buf, "44");
    return -1;
  }
  if ((ZFS_PROP_USEDSNAP) < 0 || (unsigned long)(ZFS_PROP_USEDSNAP) != 45UL) {
    char buf[64];
    if ((ZFS_PROP_USEDSNAP) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_USEDSNAP));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_USEDSNAP));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_USEDSNAP", buf, "45");
    return -1;
  }
  if ((ZFS_PROP_USEDDS) < 0 || (unsigned long)(ZFS_PROP_USEDDS) != 46UL) {
    char buf[64];
    if ((ZFS_PROP_USEDDS) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_USEDDS));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_USEDDS));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_USEDDS", buf, "46");
    return -1;
  }
  if ((ZFS_PROP_USEDCHILD) < 0 || (unsigned long)(ZFS_PROP_USEDCHILD) != 47UL) {
    char buf[64];
    if ((ZFS_PROP_USEDCHILD) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_USEDCHILD));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_USEDCHILD));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_USEDCHILD", buf, "47");
    return -1;
  }
  if ((ZFS_PROP_USEDREFRESERV) < 0 || (unsigned long)(ZFS_PROP_USEDREFRESERV) != 48UL) {
    char buf[64];
    if ((ZFS_PROP_USEDREFRESERV) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_USEDREFRESERV));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_USEDREFRESERV));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_USEDREFRESERV", buf, "48");
    return -1;
  }
  if ((ZFS_PROP_USERACCOUNTING) < 0 || (unsigned long)(ZFS_PROP_USERACCOUNTING) != 49UL) {
    char buf[64];
    if ((ZFS_PROP_USERACCOUNTING) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_USERACCOUNTING));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_USERACCOUNTING));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_USERACCOUNTING", buf, "49");
    return -1;
  }
  if ((ZFS_PROP_STMF_SHAREINFO) < 0 || (unsigned long)(ZFS_PROP_STMF_SHAREINFO) != 50UL) {
    char buf[64];
    if ((ZFS_PROP_STMF_SHAREINFO) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_STMF_SHAREINFO));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_STMF_SHAREINFO));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_STMF_SHAREINFO", buf, "50");
    return -1;
  }
  if ((ZFS_PROP_DEFER_DESTROY) < 0 || (unsigned long)(ZFS_PROP_DEFER_DESTROY) != 51UL) {
    char buf[64];
    if ((ZFS_PROP_DEFER_DESTROY) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_DEFER_DESTROY));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_DEFER_DESTROY));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_DEFER_DESTROY", buf, "51");
    return -1;
  }
  if ((ZFS_PROP_USERREFS) < 0 || (unsigned long)(ZFS_PROP_USERREFS) != 52UL) {
    char buf[64];
    if ((ZFS_PROP_USERREFS) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_USERREFS));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_USERREFS));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_USERREFS", buf, "52");
    return -1;
  }
  if ((ZFS_PROP_LOGBIAS) < 0 || (unsigned long)(ZFS_PROP_LOGBIAS) != 53UL) {
    char buf[64];
    if ((ZFS_PROP_LOGBIAS) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_LOGBIAS));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_LOGBIAS));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_LOGBIAS", buf, "53");
    return -1;
  }
  if ((ZFS_PROP_UNIQUE) < 0 || (unsigned long)(ZFS_PROP_UNIQUE) != 54UL) {
    char buf[64];
    if ((ZFS_PROP_UNIQUE) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_UNIQUE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_UNIQUE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_UNIQUE", buf, "54");
    return -1;
  }
  if ((ZFS_PROP_OBJSETID) < 0 || (unsigned long)(ZFS_PROP_OBJSETID) != 55UL) {
    char buf[64];
    if ((ZFS_PROP_OBJSETID) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_OBJSETID));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_OBJSETID));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_OBJSETID", buf, "55");
    return -1;
  }
  if ((ZFS_PROP_DEDUP) < 0 || (unsigned long)(ZFS_PROP_DEDUP) != 56UL) {
    char buf[64];
    if ((ZFS_PROP_DEDUP) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_DEDUP));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_DEDUP));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_DEDUP", buf, "56");
    return -1;
  }
  if ((ZFS_PROP_MLSLABEL) < 0 || (unsigned long)(ZFS_PROP_MLSLABEL) != 57UL) {
    char buf[64];
    if ((ZFS_PROP_MLSLABEL) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_MLSLABEL));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_MLSLABEL));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_MLSLABEL", buf, "57");
    return -1;
  }
  if ((ZFS_PROP_SYNC) < 0 || (unsigned long)(ZFS_PROP_SYNC) != 58UL) {
    char buf[64];
    if ((ZFS_PROP_SYNC) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_SYNC));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_SYNC));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_SYNC", buf, "58");
    return -1;
  }
  if ((ZFS_PROP_REFRATIO) < 0 || (unsigned long)(ZFS_PROP_REFRATIO) != 59UL) {
    char buf[64];
    if ((ZFS_PROP_REFRATIO) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_REFRATIO));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_REFRATIO));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_REFRATIO", buf, "59");
    return -1;
  }
  if ((ZFS_PROP_WRITTEN) < 0 || (unsigned long)(ZFS_PROP_WRITTEN) != 60UL) {
    char buf[64];
    if ((ZFS_PROP_WRITTEN) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_WRITTEN));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_WRITTEN));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_WRITTEN", buf, "60");
    return -1;
  }
  if ((ZFS_PROP_CLONES) < 0 || (unsigned long)(ZFS_PROP_CLONES) != 61UL) {
    char buf[64];
    if ((ZFS_PROP_CLONES) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_CLONES));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_CLONES));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_CLONES", buf, "61");
    return -1;
  }
  if ((ZFS_PROP_LOGICALUSED) < 0 || (unsigned long)(ZFS_PROP_LOGICALUSED) != 62UL) {
    char buf[64];
    if ((ZFS_PROP_LOGICALUSED) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_LOGICALUSED));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_LOGICALUSED));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_LOGICALUSED", buf, "62");
    return -1;
  }
  if ((ZFS_PROP_LOGICALREFERENCED) < 0 || (unsigned long)(ZFS_PROP_LOGICALREFERENCED) != 63UL) {
    char buf[64];
    if ((ZFS_PROP_LOGICALREFERENCED) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_LOGICALREFERENCED));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_LOGICALREFERENCED));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_LOGICALREFERENCED", buf, "63");
    return -1;
  }
  if ((ZFS_PROP_INCONSISTENT) < 0 || (unsigned long)(ZFS_PROP_INCONSISTENT) != 64UL) {
    char buf[64];
    if ((ZFS_PROP_INCONSISTENT) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_INCONSISTENT));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_INCONSISTENT));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_INCONSISTENT", buf, "64");
    return -1;
  }
  if ((ZFS_PROP_SNAPDEV) < 0 || (unsigned long)(ZFS_PROP_SNAPDEV) != 65UL) {
    char buf[64];
    if ((ZFS_PROP_SNAPDEV) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_SNAPDEV));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_SNAPDEV));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_SNAPDEV", buf, "65");
    return -1;
  }
  if ((ZFS_PROP_ACLTYPE) < 0 || (unsigned long)(ZFS_PROP_ACLTYPE) != 66UL) {
    char buf[64];
    if ((ZFS_PROP_ACLTYPE) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_ACLTYPE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_ACLTYPE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_ACLTYPE", buf, "66");
    return -1;
  }
  if ((ZFS_PROP_SELINUX_CONTEXT) < 0 || (unsigned long)(ZFS_PROP_SELINUX_CONTEXT) != 67UL) {
    char buf[64];
    if ((ZFS_PROP_SELINUX_CONTEXT) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_SELINUX_CONTEXT));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_SELINUX_CONTEXT));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_SELINUX_CONTEXT", buf, "67");
    return -1;
  }
  if ((ZFS_PROP_SELINUX_FSCONTEXT) < 0 || (unsigned long)(ZFS_PROP_SELINUX_FSCONTEXT) != 68UL) {
    char buf[64];
    if ((ZFS_PROP_SELINUX_FSCONTEXT) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_SELINUX_FSCONTEXT));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_SELINUX_FSCONTEXT));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_SELINUX_FSCONTEXT", buf, "68");
    return -1;
  }
  if ((ZFS_PROP_SELINUX_DEFCONTEXT) < 0 || (unsigned long)(ZFS_PROP_SELINUX_DEFCONTEXT) != 69UL) {
    char buf[64];
    if ((ZFS_PROP_SELINUX_DEFCONTEXT) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_SELINUX_DEFCONTEXT));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_SELINUX_DEFCONTEXT));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_SELINUX_DEFCONTEXT", buf, "69");
    return -1;
  }
  if ((ZFS_PROP_SELINUX_ROOTCONTEXT) < 0 || (unsigned long)(ZFS_PROP_SELINUX_ROOTCONTEXT) != 70UL) {
    char buf[64];
    if ((ZFS_PROP_SELINUX_ROOTCONTEXT) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_SELINUX_ROOTCONTEXT));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_SELINUX_ROOTCONTEXT));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_SELINUX_ROOTCONTEXT", buf, "70");
    return -1;
  }
  if ((ZFS_PROP_RELATIME) < 0 || (unsigned long)(ZFS_PROP_RELATIME) != 71UL) {
    char buf[64];
    if ((ZFS_PROP_RELATIME) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_RELATIME));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_RELATIME));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_PROP_RELATIME", buf, "71");
    return -1;
  }
  if ((ZFS_NUM_PROPS) < 0 || (unsigned long)(ZFS_NUM_PROPS) != 72UL) {
    char buf[64];
    if ((ZFS_NUM_PROPS) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_NUM_PROPS));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_NUM_PROPS));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_prop_t", "ZFS_NUM_PROPS", buf, "72");
    return -1;
  }
  return _cffi_e__zfs_get_column_t(lib);
}

static int _cffi_e__zfs_type_t(PyObject *lib)
{
  if ((ZFS_TYPE_FILESYSTEM) < 0 || (unsigned long)(ZFS_TYPE_FILESYSTEM) != 1UL) {
    char buf[64];
    if ((ZFS_TYPE_FILESYSTEM) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_TYPE_FILESYSTEM));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_TYPE_FILESYSTEM));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_type_t", "ZFS_TYPE_FILESYSTEM", buf, "1");
    return -1;
  }
  if ((ZFS_TYPE_SNAPSHOT) < 0 || (unsigned long)(ZFS_TYPE_SNAPSHOT) != 2UL) {
    char buf[64];
    if ((ZFS_TYPE_SNAPSHOT) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_TYPE_SNAPSHOT));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_TYPE_SNAPSHOT));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_type_t", "ZFS_TYPE_SNAPSHOT", buf, "2");
    return -1;
  }
  if ((ZFS_TYPE_VOLUME) < 0 || (unsigned long)(ZFS_TYPE_VOLUME) != 4UL) {
    char buf[64];
    if ((ZFS_TYPE_VOLUME) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_TYPE_VOLUME));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_TYPE_VOLUME));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_type_t", "ZFS_TYPE_VOLUME", buf, "4");
    return -1;
  }
  if ((ZFS_TYPE_POOL) < 0 || (unsigned long)(ZFS_TYPE_POOL) != 8UL) {
    char buf[64];
    if ((ZFS_TYPE_POOL) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_TYPE_POOL));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_TYPE_POOL));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_type_t", "ZFS_TYPE_POOL", buf, "8");
    return -1;
  }
  return _cffi_e__zfs_prop_t(lib);
}

static int _cffi_e__zfs_userquota_prop_t(PyObject *lib)
{
  if ((ZFS_PROP_USERUSED) < 0 || (unsigned long)(ZFS_PROP_USERUSED) != 0UL) {
    char buf[64];
    if ((ZFS_PROP_USERUSED) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_USERUSED));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_USERUSED));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_userquota_prop_t", "ZFS_PROP_USERUSED", buf, "0");
    return -1;
  }
  if ((ZFS_PROP_USERQUOTA) < 0 || (unsigned long)(ZFS_PROP_USERQUOTA) != 1UL) {
    char buf[64];
    if ((ZFS_PROP_USERQUOTA) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_USERQUOTA));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_USERQUOTA));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_userquota_prop_t", "ZFS_PROP_USERQUOTA", buf, "1");
    return -1;
  }
  if ((ZFS_PROP_GROUPUSED) < 0 || (unsigned long)(ZFS_PROP_GROUPUSED) != 2UL) {
    char buf[64];
    if ((ZFS_PROP_GROUPUSED) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_GROUPUSED));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_GROUPUSED));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_userquota_prop_t", "ZFS_PROP_GROUPUSED", buf, "2");
    return -1;
  }
  if ((ZFS_PROP_GROUPQUOTA) < 0 || (unsigned long)(ZFS_PROP_GROUPQUOTA) != 3UL) {
    char buf[64];
    if ((ZFS_PROP_GROUPQUOTA) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_PROP_GROUPQUOTA));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_PROP_GROUPQUOTA));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_userquota_prop_t", "ZFS_PROP_GROUPQUOTA", buf, "3");
    return -1;
  }
  if ((ZFS_NUM_USERQUOTA_PROPS) < 0 || (unsigned long)(ZFS_NUM_USERQUOTA_PROPS) != 4UL) {
    char buf[64];
    if ((ZFS_NUM_USERQUOTA_PROPS) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_NUM_USERQUOTA_PROPS));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_NUM_USERQUOTA_PROPS));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zfs_userquota_prop_t", "ZFS_NUM_USERQUOTA_PROPS", buf, "4");
    return -1;
  }
  return _cffi_e__zfs_type_t(lib);
}

static int _cffi_e__zpool_prop_t(PyObject *lib)
{
  if ((ZPOOL_PROP_NAME) < 0 || (unsigned long)(ZPOOL_PROP_NAME) != 0UL) {
    char buf[64];
    if ((ZPOOL_PROP_NAME) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_PROP_NAME));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_PROP_NAME));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_prop_t", "ZPOOL_PROP_NAME", buf, "0");
    return -1;
  }
  if ((ZPOOL_PROP_SIZE) < 0 || (unsigned long)(ZPOOL_PROP_SIZE) != 1UL) {
    char buf[64];
    if ((ZPOOL_PROP_SIZE) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_PROP_SIZE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_PROP_SIZE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_prop_t", "ZPOOL_PROP_SIZE", buf, "1");
    return -1;
  }
  if ((ZPOOL_PROP_CAPACITY) < 0 || (unsigned long)(ZPOOL_PROP_CAPACITY) != 2UL) {
    char buf[64];
    if ((ZPOOL_PROP_CAPACITY) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_PROP_CAPACITY));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_PROP_CAPACITY));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_prop_t", "ZPOOL_PROP_CAPACITY", buf, "2");
    return -1;
  }
  if ((ZPOOL_PROP_ALTROOT) < 0 || (unsigned long)(ZPOOL_PROP_ALTROOT) != 3UL) {
    char buf[64];
    if ((ZPOOL_PROP_ALTROOT) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_PROP_ALTROOT));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_PROP_ALTROOT));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_prop_t", "ZPOOL_PROP_ALTROOT", buf, "3");
    return -1;
  }
  if ((ZPOOL_PROP_HEALTH) < 0 || (unsigned long)(ZPOOL_PROP_HEALTH) != 4UL) {
    char buf[64];
    if ((ZPOOL_PROP_HEALTH) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_PROP_HEALTH));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_PROP_HEALTH));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_prop_t", "ZPOOL_PROP_HEALTH", buf, "4");
    return -1;
  }
  if ((ZPOOL_PROP_GUID) < 0 || (unsigned long)(ZPOOL_PROP_GUID) != 5UL) {
    char buf[64];
    if ((ZPOOL_PROP_GUID) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_PROP_GUID));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_PROP_GUID));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_prop_t", "ZPOOL_PROP_GUID", buf, "5");
    return -1;
  }
  if ((ZPOOL_PROP_VERSION) < 0 || (unsigned long)(ZPOOL_PROP_VERSION) != 6UL) {
    char buf[64];
    if ((ZPOOL_PROP_VERSION) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_PROP_VERSION));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_PROP_VERSION));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_prop_t", "ZPOOL_PROP_VERSION", buf, "6");
    return -1;
  }
  if ((ZPOOL_PROP_BOOTFS) < 0 || (unsigned long)(ZPOOL_PROP_BOOTFS) != 7UL) {
    char buf[64];
    if ((ZPOOL_PROP_BOOTFS) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_PROP_BOOTFS));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_PROP_BOOTFS));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_prop_t", "ZPOOL_PROP_BOOTFS", buf, "7");
    return -1;
  }
  if ((ZPOOL_PROP_DELEGATION) < 0 || (unsigned long)(ZPOOL_PROP_DELEGATION) != 8UL) {
    char buf[64];
    if ((ZPOOL_PROP_DELEGATION) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_PROP_DELEGATION));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_PROP_DELEGATION));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_prop_t", "ZPOOL_PROP_DELEGATION", buf, "8");
    return -1;
  }
  if ((ZPOOL_PROP_AUTOREPLACE) < 0 || (unsigned long)(ZPOOL_PROP_AUTOREPLACE) != 9UL) {
    char buf[64];
    if ((ZPOOL_PROP_AUTOREPLACE) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_PROP_AUTOREPLACE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_PROP_AUTOREPLACE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_prop_t", "ZPOOL_PROP_AUTOREPLACE", buf, "9");
    return -1;
  }
  if ((ZPOOL_PROP_CACHEFILE) < 0 || (unsigned long)(ZPOOL_PROP_CACHEFILE) != 10UL) {
    char buf[64];
    if ((ZPOOL_PROP_CACHEFILE) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_PROP_CACHEFILE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_PROP_CACHEFILE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_prop_t", "ZPOOL_PROP_CACHEFILE", buf, "10");
    return -1;
  }
  if ((ZPOOL_PROP_FAILUREMODE) < 0 || (unsigned long)(ZPOOL_PROP_FAILUREMODE) != 11UL) {
    char buf[64];
    if ((ZPOOL_PROP_FAILUREMODE) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_PROP_FAILUREMODE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_PROP_FAILUREMODE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_prop_t", "ZPOOL_PROP_FAILUREMODE", buf, "11");
    return -1;
  }
  if ((ZPOOL_PROP_LISTSNAPS) < 0 || (unsigned long)(ZPOOL_PROP_LISTSNAPS) != 12UL) {
    char buf[64];
    if ((ZPOOL_PROP_LISTSNAPS) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_PROP_LISTSNAPS));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_PROP_LISTSNAPS));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_prop_t", "ZPOOL_PROP_LISTSNAPS", buf, "12");
    return -1;
  }
  if ((ZPOOL_PROP_AUTOEXPAND) < 0 || (unsigned long)(ZPOOL_PROP_AUTOEXPAND) != 13UL) {
    char buf[64];
    if ((ZPOOL_PROP_AUTOEXPAND) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_PROP_AUTOEXPAND));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_PROP_AUTOEXPAND));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_prop_t", "ZPOOL_PROP_AUTOEXPAND", buf, "13");
    return -1;
  }
  if ((ZPOOL_PROP_DEDUPDITTO) < 0 || (unsigned long)(ZPOOL_PROP_DEDUPDITTO) != 14UL) {
    char buf[64];
    if ((ZPOOL_PROP_DEDUPDITTO) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_PROP_DEDUPDITTO));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_PROP_DEDUPDITTO));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_prop_t", "ZPOOL_PROP_DEDUPDITTO", buf, "14");
    return -1;
  }
  if ((ZPOOL_PROP_DEDUPRATIO) < 0 || (unsigned long)(ZPOOL_PROP_DEDUPRATIO) != 15UL) {
    char buf[64];
    if ((ZPOOL_PROP_DEDUPRATIO) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_PROP_DEDUPRATIO));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_PROP_DEDUPRATIO));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_prop_t", "ZPOOL_PROP_DEDUPRATIO", buf, "15");
    return -1;
  }
  if ((ZPOOL_PROP_FREE) < 0 || (unsigned long)(ZPOOL_PROP_FREE) != 16UL) {
    char buf[64];
    if ((ZPOOL_PROP_FREE) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_PROP_FREE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_PROP_FREE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_prop_t", "ZPOOL_PROP_FREE", buf, "16");
    return -1;
  }
  if ((ZPOOL_PROP_ALLOCATED) < 0 || (unsigned long)(ZPOOL_PROP_ALLOCATED) != 17UL) {
    char buf[64];
    if ((ZPOOL_PROP_ALLOCATED) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_PROP_ALLOCATED));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_PROP_ALLOCATED));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_prop_t", "ZPOOL_PROP_ALLOCATED", buf, "17");
    return -1;
  }
  if ((ZPOOL_PROP_READONLY) < 0 || (unsigned long)(ZPOOL_PROP_READONLY) != 18UL) {
    char buf[64];
    if ((ZPOOL_PROP_READONLY) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_PROP_READONLY));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_PROP_READONLY));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_prop_t", "ZPOOL_PROP_READONLY", buf, "18");
    return -1;
  }
  if ((ZPOOL_PROP_ASHIFT) < 0 || (unsigned long)(ZPOOL_PROP_ASHIFT) != 19UL) {
    char buf[64];
    if ((ZPOOL_PROP_ASHIFT) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_PROP_ASHIFT));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_PROP_ASHIFT));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_prop_t", "ZPOOL_PROP_ASHIFT", buf, "19");
    return -1;
  }
  if ((ZPOOL_PROP_COMMENT) < 0 || (unsigned long)(ZPOOL_PROP_COMMENT) != 20UL) {
    char buf[64];
    if ((ZPOOL_PROP_COMMENT) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_PROP_COMMENT));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_PROP_COMMENT));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_prop_t", "ZPOOL_PROP_COMMENT", buf, "20");
    return -1;
  }
  if ((ZPOOL_PROP_EXPANDSZ) < 0 || (unsigned long)(ZPOOL_PROP_EXPANDSZ) != 21UL) {
    char buf[64];
    if ((ZPOOL_PROP_EXPANDSZ) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_PROP_EXPANDSZ));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_PROP_EXPANDSZ));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_prop_t", "ZPOOL_PROP_EXPANDSZ", buf, "21");
    return -1;
  }
  if ((ZPOOL_PROP_FREEING) < 0 || (unsigned long)(ZPOOL_PROP_FREEING) != 22UL) {
    char buf[64];
    if ((ZPOOL_PROP_FREEING) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_PROP_FREEING));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_PROP_FREEING));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_prop_t", "ZPOOL_PROP_FREEING", buf, "22");
    return -1;
  }
  if ((ZPOOL_NUM_PROPS) < 0 || (unsigned long)(ZPOOL_NUM_PROPS) != 23UL) {
    char buf[64];
    if ((ZPOOL_NUM_PROPS) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_NUM_PROPS));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_NUM_PROPS));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_prop_t", "ZPOOL_NUM_PROPS", buf, "23");
    return -1;
  }
  return _cffi_e__zfs_userquota_prop_t(lib);
}

static int _cffi_e__zpool_status_t(PyObject *lib)
{
  if ((ZPOOL_STATUS_CORRUPT_CACHE) < 0 || (unsigned long)(ZPOOL_STATUS_CORRUPT_CACHE) != 0UL) {
    char buf[64];
    if ((ZPOOL_STATUS_CORRUPT_CACHE) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_STATUS_CORRUPT_CACHE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_STATUS_CORRUPT_CACHE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_status_t", "ZPOOL_STATUS_CORRUPT_CACHE", buf, "0");
    return -1;
  }
  if ((ZPOOL_STATUS_MISSING_DEV_R) < 0 || (unsigned long)(ZPOOL_STATUS_MISSING_DEV_R) != 1UL) {
    char buf[64];
    if ((ZPOOL_STATUS_MISSING_DEV_R) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_STATUS_MISSING_DEV_R));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_STATUS_MISSING_DEV_R));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_status_t", "ZPOOL_STATUS_MISSING_DEV_R", buf, "1");
    return -1;
  }
  if ((ZPOOL_STATUS_MISSING_DEV_NR) < 0 || (unsigned long)(ZPOOL_STATUS_MISSING_DEV_NR) != 2UL) {
    char buf[64];
    if ((ZPOOL_STATUS_MISSING_DEV_NR) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_STATUS_MISSING_DEV_NR));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_STATUS_MISSING_DEV_NR));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_status_t", "ZPOOL_STATUS_MISSING_DEV_NR", buf, "2");
    return -1;
  }
  if ((ZPOOL_STATUS_CORRUPT_LABEL_R) < 0 || (unsigned long)(ZPOOL_STATUS_CORRUPT_LABEL_R) != 3UL) {
    char buf[64];
    if ((ZPOOL_STATUS_CORRUPT_LABEL_R) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_STATUS_CORRUPT_LABEL_R));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_STATUS_CORRUPT_LABEL_R));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_status_t", "ZPOOL_STATUS_CORRUPT_LABEL_R", buf, "3");
    return -1;
  }
  if ((ZPOOL_STATUS_CORRUPT_LABEL_NR) < 0 || (unsigned long)(ZPOOL_STATUS_CORRUPT_LABEL_NR) != 4UL) {
    char buf[64];
    if ((ZPOOL_STATUS_CORRUPT_LABEL_NR) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_STATUS_CORRUPT_LABEL_NR));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_STATUS_CORRUPT_LABEL_NR));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_status_t", "ZPOOL_STATUS_CORRUPT_LABEL_NR", buf, "4");
    return -1;
  }
  if ((ZPOOL_STATUS_BAD_GUID_SUM) < 0 || (unsigned long)(ZPOOL_STATUS_BAD_GUID_SUM) != 5UL) {
    char buf[64];
    if ((ZPOOL_STATUS_BAD_GUID_SUM) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_STATUS_BAD_GUID_SUM));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_STATUS_BAD_GUID_SUM));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_status_t", "ZPOOL_STATUS_BAD_GUID_SUM", buf, "5");
    return -1;
  }
  if ((ZPOOL_STATUS_CORRUPT_POOL) < 0 || (unsigned long)(ZPOOL_STATUS_CORRUPT_POOL) != 6UL) {
    char buf[64];
    if ((ZPOOL_STATUS_CORRUPT_POOL) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_STATUS_CORRUPT_POOL));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_STATUS_CORRUPT_POOL));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_status_t", "ZPOOL_STATUS_CORRUPT_POOL", buf, "6");
    return -1;
  }
  if ((ZPOOL_STATUS_CORRUPT_DATA) < 0 || (unsigned long)(ZPOOL_STATUS_CORRUPT_DATA) != 7UL) {
    char buf[64];
    if ((ZPOOL_STATUS_CORRUPT_DATA) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_STATUS_CORRUPT_DATA));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_STATUS_CORRUPT_DATA));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_status_t", "ZPOOL_STATUS_CORRUPT_DATA", buf, "7");
    return -1;
  }
  if ((ZPOOL_STATUS_FAILING_DEV) < 0 || (unsigned long)(ZPOOL_STATUS_FAILING_DEV) != 8UL) {
    char buf[64];
    if ((ZPOOL_STATUS_FAILING_DEV) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_STATUS_FAILING_DEV));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_STATUS_FAILING_DEV));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_status_t", "ZPOOL_STATUS_FAILING_DEV", buf, "8");
    return -1;
  }
  if ((ZPOOL_STATUS_VERSION_NEWER) < 0 || (unsigned long)(ZPOOL_STATUS_VERSION_NEWER) != 9UL) {
    char buf[64];
    if ((ZPOOL_STATUS_VERSION_NEWER) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_STATUS_VERSION_NEWER));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_STATUS_VERSION_NEWER));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_status_t", "ZPOOL_STATUS_VERSION_NEWER", buf, "9");
    return -1;
  }
  if ((ZPOOL_STATUS_HOSTID_MISMATCH) < 0 || (unsigned long)(ZPOOL_STATUS_HOSTID_MISMATCH) != 10UL) {
    char buf[64];
    if ((ZPOOL_STATUS_HOSTID_MISMATCH) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_STATUS_HOSTID_MISMATCH));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_STATUS_HOSTID_MISMATCH));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_status_t", "ZPOOL_STATUS_HOSTID_MISMATCH", buf, "10");
    return -1;
  }
  if ((ZPOOL_STATUS_IO_FAILURE_WAIT) < 0 || (unsigned long)(ZPOOL_STATUS_IO_FAILURE_WAIT) != 11UL) {
    char buf[64];
    if ((ZPOOL_STATUS_IO_FAILURE_WAIT) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_STATUS_IO_FAILURE_WAIT));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_STATUS_IO_FAILURE_WAIT));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_status_t", "ZPOOL_STATUS_IO_FAILURE_WAIT", buf, "11");
    return -1;
  }
  if ((ZPOOL_STATUS_IO_FAILURE_CONTINUE) < 0 || (unsigned long)(ZPOOL_STATUS_IO_FAILURE_CONTINUE) != 12UL) {
    char buf[64];
    if ((ZPOOL_STATUS_IO_FAILURE_CONTINUE) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_STATUS_IO_FAILURE_CONTINUE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_STATUS_IO_FAILURE_CONTINUE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_status_t", "ZPOOL_STATUS_IO_FAILURE_CONTINUE", buf, "12");
    return -1;
  }
  if ((ZPOOL_STATUS_BAD_LOG) < 0 || (unsigned long)(ZPOOL_STATUS_BAD_LOG) != 13UL) {
    char buf[64];
    if ((ZPOOL_STATUS_BAD_LOG) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_STATUS_BAD_LOG));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_STATUS_BAD_LOG));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_status_t", "ZPOOL_STATUS_BAD_LOG", buf, "13");
    return -1;
  }
  if ((ZPOOL_STATUS_ERRATA) < 0 || (unsigned long)(ZPOOL_STATUS_ERRATA) != 14UL) {
    char buf[64];
    if ((ZPOOL_STATUS_ERRATA) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_STATUS_ERRATA));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_STATUS_ERRATA));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_status_t", "ZPOOL_STATUS_ERRATA", buf, "14");
    return -1;
  }
  if ((ZPOOL_STATUS_UNSUP_FEAT_READ) < 0 || (unsigned long)(ZPOOL_STATUS_UNSUP_FEAT_READ) != 15UL) {
    char buf[64];
    if ((ZPOOL_STATUS_UNSUP_FEAT_READ) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_STATUS_UNSUP_FEAT_READ));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_STATUS_UNSUP_FEAT_READ));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_status_t", "ZPOOL_STATUS_UNSUP_FEAT_READ", buf, "15");
    return -1;
  }
  if ((ZPOOL_STATUS_UNSUP_FEAT_WRITE) < 0 || (unsigned long)(ZPOOL_STATUS_UNSUP_FEAT_WRITE) != 16UL) {
    char buf[64];
    if ((ZPOOL_STATUS_UNSUP_FEAT_WRITE) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_STATUS_UNSUP_FEAT_WRITE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_STATUS_UNSUP_FEAT_WRITE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_status_t", "ZPOOL_STATUS_UNSUP_FEAT_WRITE", buf, "16");
    return -1;
  }
  if ((ZPOOL_STATUS_FAULTED_DEV_R) < 0 || (unsigned long)(ZPOOL_STATUS_FAULTED_DEV_R) != 17UL) {
    char buf[64];
    if ((ZPOOL_STATUS_FAULTED_DEV_R) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_STATUS_FAULTED_DEV_R));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_STATUS_FAULTED_DEV_R));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_status_t", "ZPOOL_STATUS_FAULTED_DEV_R", buf, "17");
    return -1;
  }
  if ((ZPOOL_STATUS_FAULTED_DEV_NR) < 0 || (unsigned long)(ZPOOL_STATUS_FAULTED_DEV_NR) != 18UL) {
    char buf[64];
    if ((ZPOOL_STATUS_FAULTED_DEV_NR) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_STATUS_FAULTED_DEV_NR));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_STATUS_FAULTED_DEV_NR));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_status_t", "ZPOOL_STATUS_FAULTED_DEV_NR", buf, "18");
    return -1;
  }
  if ((ZPOOL_STATUS_VERSION_OLDER) < 0 || (unsigned long)(ZPOOL_STATUS_VERSION_OLDER) != 19UL) {
    char buf[64];
    if ((ZPOOL_STATUS_VERSION_OLDER) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_STATUS_VERSION_OLDER));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_STATUS_VERSION_OLDER));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_status_t", "ZPOOL_STATUS_VERSION_OLDER", buf, "19");
    return -1;
  }
  if ((ZPOOL_STATUS_FEAT_DISABLED) < 0 || (unsigned long)(ZPOOL_STATUS_FEAT_DISABLED) != 20UL) {
    char buf[64];
    if ((ZPOOL_STATUS_FEAT_DISABLED) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_STATUS_FEAT_DISABLED));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_STATUS_FEAT_DISABLED));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_status_t", "ZPOOL_STATUS_FEAT_DISABLED", buf, "20");
    return -1;
  }
  if ((ZPOOL_STATUS_RESILVERING) < 0 || (unsigned long)(ZPOOL_STATUS_RESILVERING) != 21UL) {
    char buf[64];
    if ((ZPOOL_STATUS_RESILVERING) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_STATUS_RESILVERING));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_STATUS_RESILVERING));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_status_t", "ZPOOL_STATUS_RESILVERING", buf, "21");
    return -1;
  }
  if ((ZPOOL_STATUS_OFFLINE_DEV) < 0 || (unsigned long)(ZPOOL_STATUS_OFFLINE_DEV) != 22UL) {
    char buf[64];
    if ((ZPOOL_STATUS_OFFLINE_DEV) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_STATUS_OFFLINE_DEV));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_STATUS_OFFLINE_DEV));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_status_t", "ZPOOL_STATUS_OFFLINE_DEV", buf, "22");
    return -1;
  }
  if ((ZPOOL_STATUS_REMOVED_DEV) < 0 || (unsigned long)(ZPOOL_STATUS_REMOVED_DEV) != 23UL) {
    char buf[64];
    if ((ZPOOL_STATUS_REMOVED_DEV) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_STATUS_REMOVED_DEV));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_STATUS_REMOVED_DEV));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_status_t", "ZPOOL_STATUS_REMOVED_DEV", buf, "23");
    return -1;
  }
  if ((ZPOOL_STATUS_OK) < 0 || (unsigned long)(ZPOOL_STATUS_OK) != 24UL) {
    char buf[64];
    if ((ZPOOL_STATUS_OK) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPOOL_STATUS_OK));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPOOL_STATUS_OK));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zpool_status_t", "ZPOOL_STATUS_OK", buf, "24");
    return -1;
  }
  return _cffi_e__zpool_prop_t(lib);
}

static int _cffi_e__zprop_errflags_t(PyObject *lib)
{
  if ((ZPROP_ERR_NOCLEAR) < 0 || (unsigned long)(ZPROP_ERR_NOCLEAR) != 1UL) {
    char buf[64];
    if ((ZPROP_ERR_NOCLEAR) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPROP_ERR_NOCLEAR));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPROP_ERR_NOCLEAR));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zprop_errflags_t", "ZPROP_ERR_NOCLEAR", buf, "1");
    return -1;
  }
  if ((ZPROP_ERR_NORESTORE) < 0 || (unsigned long)(ZPROP_ERR_NORESTORE) != 2UL) {
    char buf[64];
    if ((ZPROP_ERR_NORESTORE) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPROP_ERR_NORESTORE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPROP_ERR_NORESTORE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zprop_errflags_t", "ZPROP_ERR_NORESTORE", buf, "2");
    return -1;
  }
  return _cffi_e__zpool_status_t(lib);
}

static int _cffi_e__zprop_source_t(PyObject *lib)
{
  if ((ZPROP_SRC_NONE) < 0 || (unsigned long)(ZPROP_SRC_NONE) != 1UL) {
    char buf[64];
    if ((ZPROP_SRC_NONE) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPROP_SRC_NONE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPROP_SRC_NONE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zprop_source_t", "ZPROP_SRC_NONE", buf, "1");
    return -1;
  }
  if ((ZPROP_SRC_DEFAULT) < 0 || (unsigned long)(ZPROP_SRC_DEFAULT) != 2UL) {
    char buf[64];
    if ((ZPROP_SRC_DEFAULT) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPROP_SRC_DEFAULT));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPROP_SRC_DEFAULT));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zprop_source_t", "ZPROP_SRC_DEFAULT", buf, "2");
    return -1;
  }
  if ((ZPROP_SRC_TEMPORARY) < 0 || (unsigned long)(ZPROP_SRC_TEMPORARY) != 4UL) {
    char buf[64];
    if ((ZPROP_SRC_TEMPORARY) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPROP_SRC_TEMPORARY));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPROP_SRC_TEMPORARY));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zprop_source_t", "ZPROP_SRC_TEMPORARY", buf, "4");
    return -1;
  }
  if ((ZPROP_SRC_LOCAL) < 0 || (unsigned long)(ZPROP_SRC_LOCAL) != 8UL) {
    char buf[64];
    if ((ZPROP_SRC_LOCAL) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPROP_SRC_LOCAL));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPROP_SRC_LOCAL));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zprop_source_t", "ZPROP_SRC_LOCAL", buf, "8");
    return -1;
  }
  if ((ZPROP_SRC_INHERITED) < 0 || (unsigned long)(ZPROP_SRC_INHERITED) != 16UL) {
    char buf[64];
    if ((ZPROP_SRC_INHERITED) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPROP_SRC_INHERITED));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPROP_SRC_INHERITED));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zprop_source_t", "ZPROP_SRC_INHERITED", buf, "16");
    return -1;
  }
  if ((ZPROP_SRC_RECEIVED) < 0 || (unsigned long)(ZPROP_SRC_RECEIVED) != 32UL) {
    char buf[64];
    if ((ZPROP_SRC_RECEIVED) < 0)
        snprintf(buf, 63, "%ld", (long)(ZPROP_SRC_RECEIVED));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZPROP_SRC_RECEIVED));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "zprop_source_t", "ZPROP_SRC_RECEIVED", buf, "32");
    return -1;
  }
  return _cffi_e__zprop_errflags_t(lib);
}

static int _cffi_e_enum_diff_flags(PyObject *lib)
{
  if ((ZFS_DIFF_PARSEABLE) < 0 || (unsigned long)(ZFS_DIFF_PARSEABLE) != 1UL) {
    char buf[64];
    if ((ZFS_DIFF_PARSEABLE) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_DIFF_PARSEABLE));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_DIFF_PARSEABLE));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "diff_flags", "ZFS_DIFF_PARSEABLE", buf, "1");
    return -1;
  }
  if ((ZFS_DIFF_TIMESTAMP) < 0 || (unsigned long)(ZFS_DIFF_TIMESTAMP) != 2UL) {
    char buf[64];
    if ((ZFS_DIFF_TIMESTAMP) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_DIFF_TIMESTAMP));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_DIFF_TIMESTAMP));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "diff_flags", "ZFS_DIFF_TIMESTAMP", buf, "2");
    return -1;
  }
  if ((ZFS_DIFF_CLASSIFY) < 0 || (unsigned long)(ZFS_DIFF_CLASSIFY) != 4UL) {
    char buf[64];
    if ((ZFS_DIFF_CLASSIFY) < 0)
        snprintf(buf, 63, "%ld", (long)(ZFS_DIFF_CLASSIFY));
    else
        snprintf(buf, 63, "%lu", (unsigned long)(ZFS_DIFF_CLASSIFY));
    PyErr_Format(_cffi_VerificationError,
                 "enum %s: %s has the real value %s, not %s",
                 "diff_flags", "ZFS_DIFF_CLASSIFY", buf, "4");
    return -1;
  }
  return _cffi_e__zprop_source_t(lib);
}

static PyObject *
_cffi_f_getprop_uint64(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  zfs_prop_t x1;
  char * * x2;
  Py_ssize_t datasize;
  uint64_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:getprop_uint64", &arg0, &arg1, &arg2))
    return NULL;

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

  if (_cffi_to_c((char *)&x1, _cffi_type(1), arg1) < 0)
    return NULL;

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

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

  return _cffi_from_c_int(result, uint64_t);
}

static PyObject *
_cffi_f_is_mounted(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  char const * x1;
  char * * x2;
  Py_ssize_t datasize;
  boolean_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:is_mounted", &arg0, &arg1, &arg2))
    return NULL;

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

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

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

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

  return _cffi_from_c_deref((char *)&result, _cffi_type(5));
}

static PyObject *
_cffi_f_libzfs_add_handle(PyObject *self, PyObject *args)
{
  get_all_cb_t * x0;
  zfs_handle_t * x1;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:libzfs_add_handle", &arg0, &arg1))
    return NULL;

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

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

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

  Py_INCREF(Py_None);
  return Py_None;
}

static PyObject *
_cffi_f_libzfs_dataset_cmp(PyObject *self, PyObject *args)
{
  void const * x0;
  void const * x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:libzfs_dataset_cmp", &arg0, &arg1))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(8), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = alloca(datasize);
    memset((void *)x0, 0, datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(8), 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 = alloca(datasize);
    memset((void *)x1, 0, datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(8), arg1) < 0)
      return NULL;
  }

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_libzfs_errno(PyObject *self, PyObject *arg0)
{
  libzfs_handle_t * x0;
  Py_ssize_t datasize;
  int result;

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_libzfs_error_action(PyObject *self, PyObject *arg0)
{
  libzfs_handle_t * x0;
  Py_ssize_t datasize;
  char const * result;

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

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

  return _cffi_from_c_pointer((char *)result, _cffi_type(4));
}

static PyObject *
_cffi_f_libzfs_error_description(PyObject *self, PyObject *arg0)
{
  libzfs_handle_t * x0;
  Py_ssize_t datasize;
  char const * result;

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

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

  return _cffi_from_c_pointer((char *)result, _cffi_type(4));
}

static PyObject *
_cffi_f_libzfs_fini(PyObject *self, PyObject *arg0)
{
  libzfs_handle_t * x0;
  Py_ssize_t datasize;

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

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

  Py_INCREF(Py_None);
  return Py_None;
}

static PyObject *
_cffi_f_libzfs_init(PyObject *self, PyObject *no_arg)
{
  libzfs_handle_t * result;

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

  return _cffi_from_c_pointer((char *)result, _cffi_type(3));
}

static PyObject *
_cffi_f_libzfs_load_module(PyObject *self, PyObject *arg0)
{
  char const * x0;
  Py_ssize_t datasize;
  int result;

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_libzfs_mnttab_add(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  char const * x1;
  char const * x2;
  char const * x3;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_ParseTuple(args, "OOOO:libzfs_mnttab_add", &arg0, &arg1, &arg2, &arg3))
    return NULL;

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

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

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

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

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

  Py_INCREF(Py_None);
  return Py_None;
}

static PyObject *
_cffi_f_libzfs_mnttab_cache(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  boolean_t x1;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:libzfs_mnttab_cache", &arg0, &arg1))
    return NULL;

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

  if (_cffi_to_c((char *)&x1, _cffi_type(5), arg1) < 0)
    return NULL;

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

  Py_INCREF(Py_None);
  return Py_None;
}

static PyObject *
_cffi_f_libzfs_mnttab_find(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  char const * x1;
  struct mnttab * x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:libzfs_mnttab_find", &arg0, &arg1, &arg2))
    return NULL;

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

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_libzfs_mnttab_fini(PyObject *self, PyObject *arg0)
{
  libzfs_handle_t * x0;
  Py_ssize_t datasize;

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

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

  Py_INCREF(Py_None);
  return Py_None;
}

static PyObject *
_cffi_f_libzfs_mnttab_init(PyObject *self, PyObject *arg0)
{
  libzfs_handle_t * x0;
  Py_ssize_t datasize;

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

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

  Py_INCREF(Py_None);
  return Py_None;
}

static PyObject *
_cffi_f_libzfs_mnttab_remove(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  char const * x1;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:libzfs_mnttab_remove", &arg0, &arg1))
    return NULL;

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

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

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

  Py_INCREF(Py_None);
  return Py_None;
}

static PyObject *
_cffi_f_libzfs_print_on_error(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  boolean_t x1;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:libzfs_print_on_error", &arg0, &arg1))
    return NULL;

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

  if (_cffi_to_c((char *)&x1, _cffi_type(5), arg1) < 0)
    return NULL;

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

  Py_INCREF(Py_None);
  return Py_None;
}

static PyObject *
_cffi_f_libzfs_run_process(PyObject *self, PyObject *args)
{
  char const * x0;
  char * * x1;
  int x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:libzfs_run_process", &arg0, &arg1, &arg2))
    return NULL;

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

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(2), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = alloca(datasize);
    memset((void *)x1, 0, datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(2), 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 = libzfs_run_process(x0, x1, x2); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_append_partition(PyObject *self, PyObject *args)
{
  char * x0;
  size_t x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zfs_append_partition", &arg0, &arg1))
    return NULL;

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_clone(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  char const * x1;
  nvlist_t * x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zfs_clone", &arg0, &arg1, &arg2))
    return NULL;

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

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_close(PyObject *self, PyObject *arg0)
{
  zfs_handle_t * x0;
  Py_ssize_t datasize;

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

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

  Py_INCREF(Py_None);
  return Py_None;
}

static PyObject *
_cffi_f_zfs_create(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  char const * x1;
  zfs_type_t x2;
  nvlist_t * x3;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_ParseTuple(args, "OOOO:zfs_create", &arg0, &arg1, &arg2, &arg3))
    return NULL;

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

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

  if (_cffi_to_c((char *)&x2, _cffi_type(12), arg2) < 0)
    return NULL;

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_create_ancestors(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  char const * x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zfs_create_ancestors", &arg0, &arg1))
    return NULL;

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_dataset_exists(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  char const * x1;
  zfs_type_t x2;
  Py_ssize_t datasize;
  boolean_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zfs_dataset_exists", &arg0, &arg1, &arg2))
    return NULL;

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

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

  if (_cffi_to_c((char *)&x2, _cffi_type(12), arg2) < 0)
    return NULL;

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

  return _cffi_from_c_deref((char *)&result, _cffi_type(5));
}

static PyObject *
_cffi_f_zfs_destroy(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  boolean_t x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zfs_destroy", &arg0, &arg1))
    return NULL;

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

  if (_cffi_to_c((char *)&x1, _cffi_type(5), arg1) < 0)
    return NULL;

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_destroy_snaps(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  char * x1;
  boolean_t x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zfs_destroy_snaps", &arg0, &arg1, &arg2))
    return NULL;

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

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

  if (_cffi_to_c((char *)&x2, _cffi_type(5), arg2) < 0)
    return NULL;

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_destroy_snaps_nvl(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  nvlist_t * x1;
  boolean_t x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zfs_destroy_snaps_nvl", &arg0, &arg1, &arg2))
    return NULL;

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

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

  if (_cffi_to_c((char *)&x2, _cffi_type(5), arg2) < 0)
    return NULL;

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_expand_proplist(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  zprop_list_t * * x1;
  boolean_t x2;
  boolean_t x3;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_ParseTuple(args, "OOOO:zfs_expand_proplist", &arg0, &arg1, &arg2, &arg3))
    return NULL;

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

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

  if (_cffi_to_c((char *)&x2, _cffi_type(5), arg2) < 0)
    return NULL;

  if (_cffi_to_c((char *)&x3, _cffi_type(5), arg3) < 0)
    return NULL;

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_get_clones_nvl(PyObject *self, PyObject *arg0)
{
  zfs_handle_t * x0;
  Py_ssize_t datasize;
  nvlist_t * result;

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

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

  return _cffi_from_c_pointer((char *)result, _cffi_type(11));
}

static PyObject *
_cffi_f_zfs_get_fsacl(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  nvlist_t * * x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zfs_get_fsacl", &arg0, &arg1))
    return NULL;

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_get_handle(PyObject *self, PyObject *arg0)
{
  zfs_handle_t * x0;
  Py_ssize_t datasize;
  libzfs_handle_t * result;

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

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

  return _cffi_from_c_pointer((char *)result, _cffi_type(3));
}

static PyObject *
_cffi_f_zfs_get_holds(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  nvlist_t * * x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zfs_get_holds", &arg0, &arg1))
    return NULL;

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_get_name(PyObject *self, PyObject *arg0)
{
  zfs_handle_t const * x0;
  Py_ssize_t datasize;
  char const * result;

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

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

  return _cffi_from_c_pointer((char *)result, _cffi_type(4));
}

static PyObject *
_cffi_f_zfs_get_pool_handle(PyObject *self, PyObject *arg0)
{
  zfs_handle_t const * x0;
  Py_ssize_t datasize;
  zpool_handle_t * result;

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

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

  return _cffi_from_c_pointer((char *)result, _cffi_type(16));
}

static PyObject *
_cffi_f_zfs_get_type(PyObject *self, PyObject *arg0)
{
  zfs_handle_t const * x0;
  Py_ssize_t datasize;
  zfs_type_t result;

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

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

  return _cffi_from_c_deref((char *)&result, _cffi_type(12));
}

static PyObject *
_cffi_f_zfs_get_user_props(PyObject *self, PyObject *arg0)
{
  zfs_handle_t * x0;
  Py_ssize_t datasize;
  nvlist_t * result;

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

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

  return _cffi_from_c_pointer((char *)result, _cffi_type(11));
}

static PyObject *
_cffi_f_zfs_handle_dup(PyObject *self, PyObject *arg0)
{
  zfs_handle_t * x0;
  Py_ssize_t datasize;
  zfs_handle_t * result;

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

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

  return _cffi_from_c_pointer((char *)result, _cffi_type(0));
}

static PyObject *
_cffi_f_zfs_hold(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  char const * x1;
  char const * x2;
  boolean_t x3;
  int x4;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_ParseTuple(args, "OOOOO:zfs_hold", &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

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

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

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

  if (_cffi_to_c((char *)&x3, _cffi_type(5), arg3) < 0)
    return NULL;

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_ioctl(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  int x1;
  struct zfs_cmd * x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zfs_ioctl", &arg0, &arg1, &arg2))
    return NULL;

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

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_is_mounted(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  char * * x1;
  Py_ssize_t datasize;
  boolean_t result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zfs_is_mounted", &arg0, &arg1))
    return NULL;

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

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

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

  return _cffi_from_c_deref((char *)&result, _cffi_type(5));
}

static PyObject *
_cffi_f_zfs_is_shared(PyObject *self, PyObject *arg0)
{
  zfs_handle_t * x0;
  Py_ssize_t datasize;
  boolean_t result;

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

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

  return _cffi_from_c_deref((char *)&result, _cffi_type(5));
}

static PyObject *
_cffi_f_zfs_is_shared_nfs(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  char * * x1;
  Py_ssize_t datasize;
  boolean_t result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zfs_is_shared_nfs", &arg0, &arg1))
    return NULL;

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

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

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

  return _cffi_from_c_deref((char *)&result, _cffi_type(5));
}

static PyObject *
_cffi_f_zfs_is_shared_smb(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  char * * x1;
  Py_ssize_t datasize;
  boolean_t result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zfs_is_shared_smb", &arg0, &arg1))
    return NULL;

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

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

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

  return _cffi_from_c_deref((char *)&result, _cffi_type(5));
}

static PyObject *
_cffi_f_zfs_iter_children(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  int(* x1)(zfs_handle_t *, void *);
  void * x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zfs_iter_children", &arg0, &arg1, &arg2))
    return NULL;

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

  x1 = (int(*)(zfs_handle_t *, void *))_cffi_to_c_pointer(arg1, _cffi_type(18));
  if (x1 == (int(*)(zfs_handle_t *, void *))NULL && PyErr_Occurred())
    return NULL;

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_iter_dependents(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  boolean_t x1;
  int(* x2)(zfs_handle_t *, void *);
  void * x3;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_ParseTuple(args, "OOOO:zfs_iter_dependents", &arg0, &arg1, &arg2, &arg3))
    return NULL;

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

  if (_cffi_to_c((char *)&x1, _cffi_type(5), arg1) < 0)
    return NULL;

  x2 = (int(*)(zfs_handle_t *, void *))_cffi_to_c_pointer(arg2, _cffi_type(18));
  if (x2 == (int(*)(zfs_handle_t *, void *))NULL && PyErr_Occurred())
    return NULL;

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_iter_filesystems(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  int(* x1)(zfs_handle_t *, void *);
  void * x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zfs_iter_filesystems", &arg0, &arg1, &arg2))
    return NULL;

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

  x1 = (int(*)(zfs_handle_t *, void *))_cffi_to_c_pointer(arg1, _cffi_type(18));
  if (x1 == (int(*)(zfs_handle_t *, void *))NULL && PyErr_Occurred())
    return NULL;

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_iter_root(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  int(* x1)(zfs_handle_t *, void *);
  void * x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zfs_iter_root", &arg0, &arg1, &arg2))
    return NULL;

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

  x1 = (int(*)(zfs_handle_t *, void *))_cffi_to_c_pointer(arg1, _cffi_type(18));
  if (x1 == (int(*)(zfs_handle_t *, void *))NULL && PyErr_Occurred())
    return NULL;

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_iter_snapshots(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  boolean_t x1;
  int(* x2)(zfs_handle_t *, void *);
  void * x3;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_ParseTuple(args, "OOOO:zfs_iter_snapshots", &arg0, &arg1, &arg2, &arg3))
    return NULL;

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

  if (_cffi_to_c((char *)&x1, _cffi_type(5), arg1) < 0)
    return NULL;

  x2 = (int(*)(zfs_handle_t *, void *))_cffi_to_c_pointer(arg2, _cffi_type(18));
  if (x2 == (int(*)(zfs_handle_t *, void *))NULL && PyErr_Occurred())
    return NULL;

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_iter_snapshots_sorted(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  int(* x1)(zfs_handle_t *, void *);
  void * x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zfs_iter_snapshots_sorted", &arg0, &arg1, &arg2))
    return NULL;

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

  x1 = (int(*)(zfs_handle_t *, void *))_cffi_to_c_pointer(arg1, _cffi_type(18));
  if (x1 == (int(*)(zfs_handle_t *, void *))NULL && PyErr_Occurred())
    return NULL;

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_iter_snapspec(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  char const * x1;
  int(* x2)(zfs_handle_t *, void *);
  void * x3;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_ParseTuple(args, "OOOO:zfs_iter_snapspec", &arg0, &arg1, &arg2, &arg3))
    return NULL;

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

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

  x2 = (int(*)(zfs_handle_t *, void *))_cffi_to_c_pointer(arg2, _cffi_type(18));
  if (x2 == (int(*)(zfs_handle_t *, void *))NULL && PyErr_Occurred())
    return NULL;

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_mount(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  char const * x1;
  int x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zfs_mount", &arg0, &arg1, &arg2))
    return NULL;

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

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(4), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = alloca(datasize);
    memset((void *)x1, 0, datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(4), 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 = zfs_mount(x0, x1, x2); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_name_to_prop(PyObject *self, PyObject *arg0)
{
  char const * x0;
  Py_ssize_t datasize;
  zfs_prop_t result;

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

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

  return _cffi_from_c_deref((char *)&result, _cffi_type(1));
}

static PyObject *
_cffi_f_zfs_name_valid(PyObject *self, PyObject *args)
{
  char const * x0;
  zfs_type_t x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zfs_name_valid", &arg0, &arg1))
    return NULL;

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

  if (_cffi_to_c((char *)&x1, _cffi_type(12), arg1) < 0)
    return NULL;

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_nicenum(PyObject *self, PyObject *args)
{
  uint64_t x0;
  char * x1;
  size_t x2;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zfs_nicenum", &arg0, &arg1, &arg2))
    return NULL;

  x0 = _cffi_to_c_int(arg0, uint64_t);
  if (x0 == (uint64_t)-1 && PyErr_Occurred())
    return NULL;

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

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

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

  Py_INCREF(Py_None);
  return Py_None;
}

static PyObject *
_cffi_f_zfs_nicestrtonum(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  char const * x1;
  uint64_t * x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zfs_nicestrtonum", &arg0, &arg1, &arg2))
    return NULL;

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

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_open(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  char const * x1;
  int x2;
  Py_ssize_t datasize;
  zfs_handle_t * result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zfs_open", &arg0, &arg1, &arg2))
    return NULL;

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

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(4), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = alloca(datasize);
    memset((void *)x1, 0, datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(4), 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 = zfs_open(x0, x1, x2); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  return _cffi_from_c_pointer((char *)result, _cffi_type(0));
}

static PyObject *
_cffi_f_zfs_path_to_zhandle(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  char * x1;
  zfs_type_t x2;
  Py_ssize_t datasize;
  zfs_handle_t * result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zfs_path_to_zhandle", &arg0, &arg1, &arg2))
    return NULL;

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

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

  if (_cffi_to_c((char *)&x2, _cffi_type(12), arg2) < 0)
    return NULL;

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

  return _cffi_from_c_pointer((char *)result, _cffi_type(0));
}

static PyObject *
_cffi_f_zfs_promote(PyObject *self, PyObject *arg0)
{
  zfs_handle_t * x0;
  Py_ssize_t datasize;
  int result;

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_prop_align_right(PyObject *self, PyObject *arg0)
{
  zfs_prop_t x0;
  boolean_t result;

  if (_cffi_to_c((char *)&x0, _cffi_type(1), arg0) < 0)
    return NULL;

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

  return _cffi_from_c_deref((char *)&result, _cffi_type(5));
}

static PyObject *
_cffi_f_zfs_prop_column_name(PyObject *self, PyObject *arg0)
{
  zfs_prop_t x0;
  char const * result;

  if (_cffi_to_c((char *)&x0, _cffi_type(1), arg0) < 0)
    return NULL;

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

  return _cffi_from_c_pointer((char *)result, _cffi_type(4));
}

static PyObject *
_cffi_f_zfs_prop_default_numeric(PyObject *self, PyObject *arg0)
{
  zfs_prop_t x0;
  uint64_t result;

  if (_cffi_to_c((char *)&x0, _cffi_type(1), arg0) < 0)
    return NULL;

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

  return _cffi_from_c_int(result, uint64_t);
}

static PyObject *
_cffi_f_zfs_prop_default_string(PyObject *self, PyObject *arg0)
{
  zfs_prop_t x0;
  char const * result;

  if (_cffi_to_c((char *)&x0, _cffi_type(1), arg0) < 0)
    return NULL;

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

  return _cffi_from_c_pointer((char *)result, _cffi_type(4));
}

static PyObject *
_cffi_f_zfs_prop_get(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  zfs_prop_t x1;
  char * x2;
  size_t x3;
  zprop_source_t * x4;
  char * x5;
  size_t x6;
  boolean_t x7;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;
  PyObject *arg5;
  PyObject *arg6;
  PyObject *arg7;

  if (!PyArg_ParseTuple(args, "OOOOOOOO:zfs_prop_get", &arg0, &arg1, &arg2, &arg3, &arg4, &arg5, &arg6, &arg7))
    return NULL;

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

  if (_cffi_to_c((char *)&x1, _cffi_type(1), arg1) < 0)
    return NULL;

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

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

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

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

  x6 = _cffi_to_c_int(arg6, size_t);
  if (x6 == (size_t)-1 && PyErr_Occurred())
    return NULL;

  if (_cffi_to_c((char *)&x7, _cffi_type(5), arg7) < 0)
    return NULL;

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = zfs_prop_get(x0, x1, x2, x3, x4, x5, x6, x7); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_prop_get_int(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  zfs_prop_t x1;
  Py_ssize_t datasize;
  uint64_t result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zfs_prop_get_int", &arg0, &arg1))
    return NULL;

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

  if (_cffi_to_c((char *)&x1, _cffi_type(1), arg1) < 0)
    return NULL;

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

  return _cffi_from_c_int(result, uint64_t);
}

static PyObject *
_cffi_f_zfs_prop_get_numeric(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  zfs_prop_t x1;
  uint64_t * x2;
  zprop_source_t * x3;
  char * x4;
  size_t x5;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;
  PyObject *arg5;

  if (!PyArg_ParseTuple(args, "OOOOOO:zfs_prop_get_numeric", &arg0, &arg1, &arg2, &arg3, &arg4, &arg5))
    return NULL;

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

  if (_cffi_to_c((char *)&x1, _cffi_type(1), arg1) < 0)
    return NULL;

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

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

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

  x5 = _cffi_to_c_int(arg5, size_t);
  if (x5 == (size_t)-1 && PyErr_Occurred())
    return NULL;

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_prop_get_recvd(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  char const * x1;
  char * x2;
  size_t x3;
  boolean_t x4;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_ParseTuple(args, "OOOOO:zfs_prop_get_recvd", &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

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

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

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

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

  if (_cffi_to_c((char *)&x4, _cffi_type(5), arg4) < 0)
    return NULL;

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_prop_get_userquota(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  char const * x1;
  char * x2;
  int x3;
  boolean_t x4;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_ParseTuple(args, "OOOOO:zfs_prop_get_userquota", &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

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

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

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

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

  if (_cffi_to_c((char *)&x4, _cffi_type(5), arg4) < 0)
    return NULL;

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_prop_get_userquota_int(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  char const * x1;
  uint64_t * x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zfs_prop_get_userquota_int", &arg0, &arg1, &arg2))
    return NULL;

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

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_prop_get_written(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  char const * x1;
  char * x2;
  int x3;
  boolean_t x4;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_ParseTuple(args, "OOOOO:zfs_prop_get_written", &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

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

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

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

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

  if (_cffi_to_c((char *)&x4, _cffi_type(5), arg4) < 0)
    return NULL;

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_prop_get_written_int(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  char const * x1;
  uint64_t * x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zfs_prop_get_written_int", &arg0, &arg1, &arg2))
    return NULL;

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

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_prop_index_to_string(PyObject *self, PyObject *args)
{
  zfs_prop_t x0;
  uint64_t x1;
  char const * * x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zfs_prop_index_to_string", &arg0, &arg1, &arg2))
    return NULL;

  if (_cffi_to_c((char *)&x0, _cffi_type(1), arg0) < 0)
    return NULL;

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_prop_inherit(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  char const * x1;
  boolean_t x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zfs_prop_inherit", &arg0, &arg1, &arg2))
    return NULL;

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

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

  if (_cffi_to_c((char *)&x2, _cffi_type(5), arg2) < 0)
    return NULL;

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_prop_inheritable(PyObject *self, PyObject *arg0)
{
  zfs_prop_t x0;
  boolean_t result;

  if (_cffi_to_c((char *)&x0, _cffi_type(1), arg0) < 0)
    return NULL;

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

  return _cffi_from_c_deref((char *)&result, _cffi_type(5));
}

static PyObject *
_cffi_f_zfs_prop_is_string(PyObject *self, PyObject *arg0)
{
  zfs_prop_t x0;
  int result;

  if (_cffi_to_c((char *)&x0, _cffi_type(1), arg0) < 0)
    return NULL;

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_prop_random_value(PyObject *self, PyObject *args)
{
  zfs_prop_t x0;
  uint64_t x1;
  uint64_t result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zfs_prop_random_value", &arg0, &arg1))
    return NULL;

  if (_cffi_to_c((char *)&x0, _cffi_type(1), arg0) < 0)
    return NULL;

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

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

  return _cffi_from_c_int(result, uint64_t);
}

static PyObject *
_cffi_f_zfs_prop_readonly(PyObject *self, PyObject *arg0)
{
  zfs_prop_t x0;
  boolean_t result;

  if (_cffi_to_c((char *)&x0, _cffi_type(1), arg0) < 0)
    return NULL;

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

  return _cffi_from_c_deref((char *)&result, _cffi_type(5));
}

static PyObject *
_cffi_f_zfs_prop_set(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  char const * x1;
  char const * x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zfs_prop_set", &arg0, &arg1, &arg2))
    return NULL;

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

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_prop_setonce(PyObject *self, PyObject *arg0)
{
  zfs_prop_t x0;
  boolean_t result;

  if (_cffi_to_c((char *)&x0, _cffi_type(1), arg0) < 0)
    return NULL;

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

  return _cffi_from_c_deref((char *)&result, _cffi_type(5));
}

static PyObject *
_cffi_f_zfs_prop_string_to_index(PyObject *self, PyObject *args)
{
  zfs_prop_t x0;
  char const * x1;
  uint64_t * x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zfs_prop_string_to_index", &arg0, &arg1, &arg2))
    return NULL;

  if (_cffi_to_c((char *)&x0, _cffi_type(1), arg0) < 0)
    return NULL;

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_prop_to_name(PyObject *self, PyObject *arg0)
{
  zfs_prop_t x0;
  char const * result;

  if (_cffi_to_c((char *)&x0, _cffi_type(1), arg0) < 0)
    return NULL;

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

  return _cffi_from_c_pointer((char *)result, _cffi_type(4));
}

static PyObject *
_cffi_f_zfs_prop_user(PyObject *self, PyObject *arg0)
{
  char const * x0;
  Py_ssize_t datasize;
  boolean_t result;

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

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

  return _cffi_from_c_deref((char *)&result, _cffi_type(5));
}

static PyObject *
_cffi_f_zfs_prop_userquota(PyObject *self, PyObject *arg0)
{
  char const * x0;
  Py_ssize_t datasize;
  boolean_t result;

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

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

  return _cffi_from_c_deref((char *)&result, _cffi_type(5));
}

static PyObject *
_cffi_f_zfs_prop_valid_for_type(PyObject *self, PyObject *args)
{
  int x0;
  zfs_type_t x1;
  boolean_t x2;
  boolean_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zfs_prop_valid_for_type", &arg0, &arg1, &arg2))
    return NULL;

  x0 = _cffi_to_c_int(arg0, int);
  if (x0 == (int)-1 && PyErr_Occurred())
    return NULL;

  if (_cffi_to_c((char *)&x1, _cffi_type(12), arg1) < 0)
    return NULL;

  if (_cffi_to_c((char *)&x2, _cffi_type(5), arg2) < 0)
    return NULL;

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

  return _cffi_from_c_deref((char *)&result, _cffi_type(5));
}

static PyObject *
_cffi_f_zfs_prop_values(PyObject *self, PyObject *arg0)
{
  zfs_prop_t x0;
  char const * result;

  if (_cffi_to_c((char *)&x0, _cffi_type(1), arg0) < 0)
    return NULL;

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

  return _cffi_from_c_pointer((char *)result, _cffi_type(4));
}

static PyObject *
_cffi_f_zfs_prop_written(PyObject *self, PyObject *arg0)
{
  char const * x0;
  Py_ssize_t datasize;
  boolean_t result;

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

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

  return _cffi_from_c_deref((char *)&result, _cffi_type(5));
}

static PyObject *
_cffi_f_zfs_prune_proplist(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  uint8_t * x1;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zfs_prune_proplist", &arg0, &arg1))
    return NULL;

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

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

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

  Py_INCREF(Py_None);
  return Py_None;
}

static PyObject *
_cffi_f_zfs_receive(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  char const * x1;
  recvflags_t * x2;
  int x3;
  avl_tree_t * x4;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_ParseTuple(args, "OOOOO:zfs_receive", &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

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

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

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

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_refresh_properties(PyObject *self, PyObject *arg0)
{
  zfs_handle_t * x0;
  Py_ssize_t datasize;

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

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

  Py_INCREF(Py_None);
  return Py_None;
}

static PyObject *
_cffi_f_zfs_release(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  char const * x1;
  char const * x2;
  boolean_t x3;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_ParseTuple(args, "OOOO:zfs_release", &arg0, &arg1, &arg2, &arg3))
    return NULL;

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

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

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

  if (_cffi_to_c((char *)&x3, _cffi_type(5), arg3) < 0)
    return NULL;

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_rename(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  char const * x1;
  boolean_t x2;
  boolean_t x3;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_ParseTuple(args, "OOOO:zfs_rename", &arg0, &arg1, &arg2, &arg3))
    return NULL;

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

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

  if (_cffi_to_c((char *)&x2, _cffi_type(5), arg2) < 0)
    return NULL;

  if (_cffi_to_c((char *)&x3, _cffi_type(5), arg3) < 0)
    return NULL;

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_resolve_shortname(PyObject *self, PyObject *args)
{
  char const * x0;
  char * x1;
  size_t x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zfs_resolve_shortname", &arg0, &arg1, &arg2))
    return NULL;

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

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_rollback(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  zfs_handle_t * x1;
  boolean_t x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zfs_rollback", &arg0, &arg1, &arg2))
    return NULL;

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

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

  if (_cffi_to_c((char *)&x2, _cffi_type(5), arg2) < 0)
    return NULL;

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_send(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  char const * x1;
  char const * x2;
  sendflags_t * x3;
  int x4;
  boolean_t(* x5)(zfs_handle_t *, void *);
  void * x6;
  nvlist_t * * x7;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;
  PyObject *arg5;
  PyObject *arg6;
  PyObject *arg7;

  if (!PyArg_ParseTuple(args, "OOOOOOOO:zfs_send", &arg0, &arg1, &arg2, &arg3, &arg4, &arg5, &arg6, &arg7))
    return NULL;

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

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

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

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

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

  x5 = (boolean_t(*)(zfs_handle_t *, void *))_cffi_to_c_pointer(arg5, _cffi_type(27));
  if (x5 == (boolean_t(*)(zfs_handle_t *, void *))NULL && PyErr_Occurred())
    return NULL;

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

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(14), arg7, (char **)&x7);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x7 = alloca(datasize);
    memset((void *)x7, 0, datasize);
    if (_cffi_convert_array_from_object((char *)x7, _cffi_type(14), arg7) < 0)
      return NULL;
  }

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = zfs_send(x0, x1, x2, x3, x4, x5, x6, x7); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_set_fsacl(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  boolean_t x1;
  nvlist_t * x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zfs_set_fsacl", &arg0, &arg1, &arg2))
    return NULL;

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

  if (_cffi_to_c((char *)&x1, _cffi_type(5), arg1) < 0)
    return NULL;

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_share(PyObject *self, PyObject *arg0)
{
  zfs_handle_t * x0;
  Py_ssize_t datasize;
  int result;

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_share_nfs(PyObject *self, PyObject *arg0)
{
  zfs_handle_t * x0;
  Py_ssize_t datasize;
  int result;

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_share_smb(PyObject *self, PyObject *arg0)
{
  zfs_handle_t * x0;
  Py_ssize_t datasize;
  int result;

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_shareall(PyObject *self, PyObject *arg0)
{
  zfs_handle_t * x0;
  Py_ssize_t datasize;
  int result;

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_show_diffs(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  int x1;
  char const * x2;
  char const * x3;
  int x4;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_ParseTuple(args, "OOOOO:zfs_show_diffs", &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

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

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

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

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_smb_acl_add(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  char * x1;
  char * x2;
  char * x3;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_ParseTuple(args, "OOOO:zfs_smb_acl_add", &arg0, &arg1, &arg2, &arg3))
    return NULL;

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

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

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_smb_acl_purge(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  char * x1;
  char * x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zfs_smb_acl_purge", &arg0, &arg1, &arg2))
    return NULL;

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

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_smb_acl_remove(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  char * x1;
  char * x2;
  char * x3;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_ParseTuple(args, "OOOO:zfs_smb_acl_remove", &arg0, &arg1, &arg2, &arg3))
    return NULL;

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

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

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_smb_acl_rename(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  char * x1;
  char * x2;
  char * x3;
  char * x4;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_ParseTuple(args, "OOOOO:zfs_smb_acl_rename", &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

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

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

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

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_snapshot(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  char const * x1;
  boolean_t x2;
  nvlist_t * x3;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_ParseTuple(args, "OOOO:zfs_snapshot", &arg0, &arg1, &arg2, &arg3))
    return NULL;

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

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

  if (_cffi_to_c((char *)&x2, _cffi_type(5), arg2) < 0)
    return NULL;

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_spa_version(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  int * x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zfs_spa_version", &arg0, &arg1))
    return NULL;

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_strcmp_pathname(PyObject *self, PyObject *args)
{
  char * x0;
  char * x1;
  int x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zfs_strcmp_pathname", &arg0, &arg1, &arg2))
    return NULL;

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

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(10), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = alloca(datasize);
    memset((void *)x1, 0, datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(10), 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 = zfs_strcmp_pathname(x0, x1, x2); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_type_to_name(PyObject *self, PyObject *arg0)
{
  zfs_type_t x0;
  char const * result;

  if (_cffi_to_c((char *)&x0, _cffi_type(12), arg0) < 0)
    return NULL;

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

  return _cffi_from_c_pointer((char *)result, _cffi_type(4));
}

static PyObject *
_cffi_f_zfs_unmount(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  char const * x1;
  int x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zfs_unmount", &arg0, &arg1, &arg2))
    return NULL;

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

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(4), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = alloca(datasize);
    memset((void *)x1, 0, datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(4), 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 = zfs_unmount(x0, x1, x2); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_unmountall(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  int x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zfs_unmountall", &arg0, &arg1))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(0), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = alloca(datasize);
    memset((void *)x0, 0, datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(0), 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 = zfs_unmountall(x0, x1); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_unshare(PyObject *self, PyObject *arg0)
{
  zfs_handle_t * x0;
  Py_ssize_t datasize;
  int result;

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_unshare_nfs(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  char const * x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zfs_unshare_nfs", &arg0, &arg1))
    return NULL;

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_unshare_smb(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  char const * x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zfs_unshare_smb", &arg0, &arg1))
    return NULL;

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_unshareall(PyObject *self, PyObject *arg0)
{
  zfs_handle_t * x0;
  Py_ssize_t datasize;
  int result;

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_unshareall_bypath(PyObject *self, PyObject *args)
{
  zfs_handle_t * x0;
  char const * x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zfs_unshareall_bypath", &arg0, &arg1))
    return NULL;

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_unshareall_nfs(PyObject *self, PyObject *arg0)
{
  zfs_handle_t * x0;
  Py_ssize_t datasize;
  int result;

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_unshareall_smb(PyObject *self, PyObject *arg0)
{
  zfs_handle_t * x0;
  Py_ssize_t datasize;
  int result;

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zfs_valid_proplist(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  zfs_type_t x1;
  nvlist_t * x2;
  uint64_t x3;
  zfs_handle_t * x4;
  char const * x5;
  Py_ssize_t datasize;
  nvlist_t * result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;
  PyObject *arg5;

  if (!PyArg_ParseTuple(args, "OOOOOO:zfs_valid_proplist", &arg0, &arg1, &arg2, &arg3, &arg4, &arg5))
    return NULL;

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

  if (_cffi_to_c((char *)&x1, _cffi_type(12), arg1) < 0)
    return NULL;

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

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

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

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

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

  return _cffi_from_c_pointer((char *)result, _cffi_type(11));
}

static PyObject *
_cffi_f_zpool_add(PyObject *self, PyObject *args)
{
  zpool_handle_t * x0;
  nvlist_t * x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zpool_add", &arg0, &arg1))
    return NULL;

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_clear(PyObject *self, PyObject *args)
{
  zpool_handle_t * x0;
  char const * x1;
  nvlist_t * x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zpool_clear", &arg0, &arg1, &arg2))
    return NULL;

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

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_clear_label(PyObject *self, PyObject *arg0)
{
  int x0;
  int result;

  x0 = _cffi_to_c_int(arg0, int);
  if (x0 == (int)-1 && PyErr_Occurred())
    return NULL;

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_close(PyObject *self, PyObject *arg0)
{
  zpool_handle_t * x0;
  Py_ssize_t datasize;

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

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

  Py_INCREF(Py_None);
  return Py_None;
}

static PyObject *
_cffi_f_zpool_create(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  char const * x1;
  nvlist_t * x2;
  nvlist_t * x3;
  nvlist_t * x4;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_ParseTuple(args, "OOOOO:zpool_create", &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

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

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

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

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_destroy(PyObject *self, PyObject *args)
{
  zpool_handle_t * x0;
  char const * x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zpool_destroy", &arg0, &arg1))
    return NULL;

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_disable_datasets(PyObject *self, PyObject *args)
{
  zpool_handle_t * x0;
  boolean_t x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zpool_disable_datasets", &arg0, &arg1))
    return NULL;

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

  if (_cffi_to_c((char *)&x1, _cffi_type(5), arg1) < 0)
    return NULL;

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_enable_datasets(PyObject *self, PyObject *args)
{
  zpool_handle_t * x0;
  char const * x1;
  int x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zpool_enable_datasets", &arg0, &arg1, &arg2))
    return NULL;

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

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(4), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = alloca(datasize);
    memset((void *)x1, 0, datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(4), 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 = zpool_enable_datasets(x0, x1, x2); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_events_clear(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  int * x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zpool_events_clear", &arg0, &arg1))
    return NULL;

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_events_next(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  nvlist_t * * x1;
  int * x2;
  int x3;
  int x4;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_ParseTuple(args, "OOOOO:zpool_events_next", &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

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

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

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

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_expand_proplist(PyObject *self, PyObject *args)
{
  zpool_handle_t * x0;
  zprop_list_t * * x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zpool_expand_proplist", &arg0, &arg1))
    return NULL;

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_explain_recover(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  char const * x1;
  int x2;
  nvlist_t * x3;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_ParseTuple(args, "OOOO:zpool_explain_recover", &arg0, &arg1, &arg2, &arg3))
    return NULL;

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

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

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

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

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

  Py_INCREF(Py_None);
  return Py_None;
}

static PyObject *
_cffi_f_zpool_export(PyObject *self, PyObject *args)
{
  zpool_handle_t * x0;
  boolean_t x1;
  char const * x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zpool_export", &arg0, &arg1, &arg2))
    return NULL;

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

  if (_cffi_to_c((char *)&x1, _cffi_type(5), arg1) < 0)
    return NULL;

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_export_force(PyObject *self, PyObject *args)
{
  zpool_handle_t * x0;
  char const * x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zpool_export_force", &arg0, &arg1))
    return NULL;

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_find_import(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  int x1;
  char * * x2;
  Py_ssize_t datasize;
  nvlist_t * result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zpool_find_import", &arg0, &arg1, &arg2))
    return NULL;

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

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

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

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

  return _cffi_from_c_pointer((char *)result, _cffi_type(11));
}

static PyObject *
_cffi_f_zpool_find_import_cached(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  char const * x1;
  char * x2;
  uint64_t x3;
  Py_ssize_t datasize;
  nvlist_t * result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_ParseTuple(args, "OOOO:zpool_find_import_cached", &arg0, &arg1, &arg2, &arg3))
    return NULL;

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

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

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

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

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

  return _cffi_from_c_pointer((char *)result, _cffi_type(11));
}

static PyObject *
_cffi_f_zpool_find_vdev(PyObject *self, PyObject *args)
{
  zpool_handle_t * x0;
  char const * x1;
  boolean_t * x2;
  boolean_t * x3;
  boolean_t * x4;
  Py_ssize_t datasize;
  nvlist_t * result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_ParseTuple(args, "OOOOO:zpool_find_vdev", &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

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

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

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

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

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

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

  return _cffi_from_c_pointer((char *)result, _cffi_type(11));
}

static PyObject *
_cffi_f_zpool_find_vdev_by_physpath(PyObject *self, PyObject *args)
{
  zpool_handle_t * x0;
  char const * x1;
  boolean_t * x2;
  boolean_t * x3;
  boolean_t * x4;
  Py_ssize_t datasize;
  nvlist_t * result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_ParseTuple(args, "OOOOO:zpool_find_vdev_by_physpath", &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

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

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

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

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

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

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

  return _cffi_from_c_pointer((char *)result, _cffi_type(11));
}

static PyObject *
_cffi_f_zpool_free_handles(PyObject *self, PyObject *arg0)
{
  libzfs_handle_t * x0;
  Py_ssize_t datasize;

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

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

  Py_INCREF(Py_None);
  return Py_None;
}

static PyObject *
_cffi_f_zpool_get_config(PyObject *self, PyObject *args)
{
  zpool_handle_t * x0;
  nvlist_t * * x1;
  Py_ssize_t datasize;
  nvlist_t * result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zpool_get_config", &arg0, &arg1))
    return NULL;

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

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

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

  return _cffi_from_c_pointer((char *)result, _cffi_type(11));
}

static PyObject *
_cffi_f_zpool_get_errlog(PyObject *self, PyObject *args)
{
  zpool_handle_t * x0;
  nvlist_t * * x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zpool_get_errlog", &arg0, &arg1))
    return NULL;

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_get_features(PyObject *self, PyObject *arg0)
{
  zpool_handle_t * x0;
  Py_ssize_t datasize;
  nvlist_t * result;

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

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

  return _cffi_from_c_pointer((char *)result, _cffi_type(11));
}

static PyObject *
_cffi_f_zpool_get_handle(PyObject *self, PyObject *arg0)
{
  zpool_handle_t * x0;
  Py_ssize_t datasize;
  libzfs_handle_t * result;

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

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

  return _cffi_from_c_pointer((char *)result, _cffi_type(3));
}

static PyObject *
_cffi_f_zpool_get_history(PyObject *self, PyObject *args)
{
  zpool_handle_t * x0;
  nvlist_t * * x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zpool_get_history", &arg0, &arg1))
    return NULL;

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_get_name(PyObject *self, PyObject *arg0)
{
  zpool_handle_t * x0;
  Py_ssize_t datasize;
  char const * result;

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

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

  return _cffi_from_c_pointer((char *)result, _cffi_type(4));
}

static PyObject *
_cffi_f_zpool_get_physpath(PyObject *self, PyObject *args)
{
  zpool_handle_t * x0;
  char * x1;
  size_t x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zpool_get_physpath", &arg0, &arg1, &arg2))
    return NULL;

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

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_get_prop(PyObject *self, PyObject *args)
{
  zpool_handle_t * x0;
  zpool_prop_t x1;
  char * x2;
  size_t x3;
  zprop_source_t * x4;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_ParseTuple(args, "OOOOO:zpool_get_prop", &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

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

  if (_cffi_to_c((char *)&x1, _cffi_type(30), arg1) < 0)
    return NULL;

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

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_get_prop_int(PyObject *self, PyObject *args)
{
  zpool_handle_t * x0;
  zpool_prop_t x1;
  zprop_source_t * x2;
  Py_ssize_t datasize;
  uint64_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zpool_get_prop_int", &arg0, &arg1, &arg2))
    return NULL;

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

  if (_cffi_to_c((char *)&x1, _cffi_type(30), arg1) < 0)
    return NULL;

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

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

  return _cffi_from_c_int(result, uint64_t);
}

static PyObject *
_cffi_f_zpool_get_state(PyObject *self, PyObject *arg0)
{
  zpool_handle_t * x0;
  Py_ssize_t datasize;
  int result;

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_get_status(PyObject *self, PyObject *args)
{
  zpool_handle_t * x0;
  char * * x1;
  zpool_errata_t * x2;
  Py_ssize_t datasize;
  zpool_status_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zpool_get_status", &arg0, &arg1, &arg2))
    return NULL;

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

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

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

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

  return _cffi_from_c_deref((char *)&result, _cffi_type(32));
}

static PyObject *
_cffi_f_zpool_history_unpack(PyObject *self, PyObject *args)
{
  char * x0;
  uint64_t x1;
  uint64_t * x2;
  nvlist_t * * * x3;
  unsigned int * x4;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_ParseTuple(args, "OOOOO:zpool_history_unpack", &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

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

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

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

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_import(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  nvlist_t * x1;
  char const * x2;
  char * x3;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_ParseTuple(args, "OOOO:zpool_import", &arg0, &arg1, &arg2, &arg3))
    return NULL;

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

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

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_import_props(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  nvlist_t * x1;
  char const * x2;
  nvlist_t * x3;
  int x4;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_ParseTuple(args, "OOOOO:zpool_import_props", &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

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

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

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

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_import_status(PyObject *self, PyObject *args)
{
  nvlist_t * x0;
  char * * x1;
  zpool_errata_t * x2;
  Py_ssize_t datasize;
  zpool_status_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zpool_import_status", &arg0, &arg1, &arg2))
    return NULL;

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

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

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

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

  return _cffi_from_c_deref((char *)&result, _cffi_type(32));
}

static PyObject *
_cffi_f_zpool_in_use(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  int x1;
  pool_state_t * x2;
  char * * x3;
  boolean_t * x4;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_ParseTuple(args, "OOOOO:zpool_in_use", &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

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

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

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

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_iter(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  int(* x1)(zpool_handle_t *, void *);
  void * x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zpool_iter", &arg0, &arg1, &arg2))
    return NULL;

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

  x1 = (int(*)(zpool_handle_t *, void *))_cffi_to_c_pointer(arg1, _cffi_type(36));
  if (x1 == (int(*)(zpool_handle_t *, void *))NULL && PyErr_Occurred())
    return NULL;

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_label_disk(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  zpool_handle_t * x1;
  char * x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zpool_label_disk", &arg0, &arg1, &arg2))
    return NULL;

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

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_label_disk_wait(PyObject *self, PyObject *args)
{
  char * x0;
  int x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zpool_label_disk_wait", &arg0, &arg1))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(10), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = alloca(datasize);
    memset((void *)x0, 0, datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(10), 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 = zpool_label_disk_wait(x0, x1); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_name_to_prop(PyObject *self, PyObject *arg0)
{
  char const * x0;
  Py_ssize_t datasize;
  zpool_prop_t result;

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

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

  return _cffi_from_c_deref((char *)&result, _cffi_type(30));
}

static PyObject *
_cffi_f_zpool_obj_to_path(PyObject *self, PyObject *args)
{
  zpool_handle_t * x0;
  uint64_t x1;
  uint64_t x2;
  char * x3;
  size_t x4;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_ParseTuple(args, "OOOOO:zpool_obj_to_path", &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

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

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

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

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

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

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

  Py_INCREF(Py_None);
  return Py_None;
}

static PyObject *
_cffi_f_zpool_open(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  char const * x1;
  Py_ssize_t datasize;
  zpool_handle_t * result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zpool_open", &arg0, &arg1))
    return NULL;

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

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

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

  return _cffi_from_c_pointer((char *)result, _cffi_type(16));
}

static PyObject *
_cffi_f_zpool_open_canfail(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  char const * x1;
  Py_ssize_t datasize;
  zpool_handle_t * result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zpool_open_canfail", &arg0, &arg1))
    return NULL;

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

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

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

  return _cffi_from_c_pointer((char *)result, _cffi_type(16));
}

static PyObject *
_cffi_f_zpool_pool_state_to_name(PyObject *self, PyObject *arg0)
{
  pool_state_t x0;
  char const * result;

  if (_cffi_to_c((char *)&x0, _cffi_type(37), arg0) < 0)
    return NULL;

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

  return _cffi_from_c_pointer((char *)result, _cffi_type(4));
}

static PyObject *
_cffi_f_zpool_print_unsup_feat(PyObject *self, PyObject *arg0)
{
  nvlist_t * x0;
  Py_ssize_t datasize;

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

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

  Py_INCREF(Py_None);
  return Py_None;
}

static PyObject *
_cffi_f_zpool_prop_align_right(PyObject *self, PyObject *arg0)
{
  zpool_prop_t x0;
  boolean_t result;

  if (_cffi_to_c((char *)&x0, _cffi_type(30), arg0) < 0)
    return NULL;

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

  return _cffi_from_c_deref((char *)&result, _cffi_type(5));
}

static PyObject *
_cffi_f_zpool_prop_column_name(PyObject *self, PyObject *arg0)
{
  zpool_prop_t x0;
  char const * result;

  if (_cffi_to_c((char *)&x0, _cffi_type(30), arg0) < 0)
    return NULL;

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

  return _cffi_from_c_pointer((char *)result, _cffi_type(4));
}

static PyObject *
_cffi_f_zpool_prop_default_numeric(PyObject *self, PyObject *arg0)
{
  zpool_prop_t x0;
  uint64_t result;

  if (_cffi_to_c((char *)&x0, _cffi_type(30), arg0) < 0)
    return NULL;

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

  return _cffi_from_c_int(result, uint64_t);
}

static PyObject *
_cffi_f_zpool_prop_default_string(PyObject *self, PyObject *arg0)
{
  zpool_prop_t x0;
  char const * result;

  if (_cffi_to_c((char *)&x0, _cffi_type(30), arg0) < 0)
    return NULL;

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

  return _cffi_from_c_pointer((char *)result, _cffi_type(4));
}

static PyObject *
_cffi_f_zpool_prop_feature(PyObject *self, PyObject *arg0)
{
  char const * x0;
  Py_ssize_t datasize;
  boolean_t result;

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

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

  return _cffi_from_c_deref((char *)&result, _cffi_type(5));
}

static PyObject *
_cffi_f_zpool_prop_get_feature(PyObject *self, PyObject *args)
{
  zpool_handle_t * x0;
  char const * x1;
  char * x2;
  size_t x3;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_ParseTuple(args, "OOOO:zpool_prop_get_feature", &arg0, &arg1, &arg2, &arg3))
    return NULL;

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

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

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_prop_index_to_string(PyObject *self, PyObject *args)
{
  zpool_prop_t x0;
  uint64_t x1;
  char const * * x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zpool_prop_index_to_string", &arg0, &arg1, &arg2))
    return NULL;

  if (_cffi_to_c((char *)&x0, _cffi_type(30), arg0) < 0)
    return NULL;

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_prop_random_value(PyObject *self, PyObject *args)
{
  zpool_prop_t x0;
  uint64_t x1;
  uint64_t result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zpool_prop_random_value", &arg0, &arg1))
    return NULL;

  if (_cffi_to_c((char *)&x0, _cffi_type(30), arg0) < 0)
    return NULL;

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

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

  return _cffi_from_c_int(result, uint64_t);
}

static PyObject *
_cffi_f_zpool_prop_readonly(PyObject *self, PyObject *arg0)
{
  zpool_prop_t x0;
  boolean_t result;

  if (_cffi_to_c((char *)&x0, _cffi_type(30), arg0) < 0)
    return NULL;

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

  return _cffi_from_c_deref((char *)&result, _cffi_type(5));
}

static PyObject *
_cffi_f_zpool_prop_string_to_index(PyObject *self, PyObject *args)
{
  zpool_prop_t x0;
  char const * x1;
  uint64_t * x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zpool_prop_string_to_index", &arg0, &arg1, &arg2))
    return NULL;

  if (_cffi_to_c((char *)&x0, _cffi_type(30), arg0) < 0)
    return NULL;

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_prop_to_name(PyObject *self, PyObject *arg0)
{
  zpool_prop_t x0;
  char const * result;

  if (_cffi_to_c((char *)&x0, _cffi_type(30), arg0) < 0)
    return NULL;

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

  return _cffi_from_c_pointer((char *)result, _cffi_type(4));
}

static PyObject *
_cffi_f_zpool_prop_unsupported(PyObject *self, PyObject *arg0)
{
  char const * x0;
  Py_ssize_t datasize;
  boolean_t result;

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

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

  return _cffi_from_c_deref((char *)&result, _cffi_type(5));
}

static PyObject *
_cffi_f_zpool_prop_values(PyObject *self, PyObject *arg0)
{
  zpool_prop_t x0;
  char const * result;

  if (_cffi_to_c((char *)&x0, _cffi_type(30), arg0) < 0)
    return NULL;

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

  return _cffi_from_c_pointer((char *)result, _cffi_type(4));
}

static PyObject *
_cffi_f_zpool_read_label(PyObject *self, PyObject *args)
{
  int x0;
  nvlist_t * * x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zpool_read_label", &arg0, &arg1))
    return NULL;

  x0 = _cffi_to_c_int(arg0, int);
  if (x0 == (int)-1 && PyErr_Occurred())
    return NULL;

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_refresh_stats(PyObject *self, PyObject *args)
{
  zpool_handle_t * x0;
  boolean_t * x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zpool_refresh_stats", &arg0, &arg1))
    return NULL;

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_reguid(PyObject *self, PyObject *arg0)
{
  zpool_handle_t * x0;
  Py_ssize_t datasize;
  int result;

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_reopen(PyObject *self, PyObject *arg0)
{
  zpool_handle_t * x0;
  Py_ssize_t datasize;
  int result;

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_scan(PyObject *self, PyObject *args)
{
  zpool_handle_t * x0;
  pool_scan_func_t x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zpool_scan", &arg0, &arg1))
    return NULL;

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

  if (_cffi_to_c((char *)&x1, _cffi_type(38), arg1) < 0)
    return NULL;

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_search_import(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  importargs_t * x1;
  Py_ssize_t datasize;
  nvlist_t * result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zpool_search_import", &arg0, &arg1))
    return NULL;

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(3), arg0, (char **)&x0);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x0 = alloca(datasize);
    memset((void *)x0, 0, datasize);
    if (_cffi_convert_array_from_object((char *)x0, _cffi_type(3), 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 = alloca(datasize);
    memset((void *)x1, 0, datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(39), arg1) < 0)
      return NULL;
  }

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

  return _cffi_from_c_pointer((char *)result, _cffi_type(11));
}

static PyObject *
_cffi_f_zpool_set_prop(PyObject *self, PyObject *args)
{
  zpool_handle_t * x0;
  char const * x1;
  char const * x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zpool_set_prop", &arg0, &arg1, &arg2))
    return NULL;

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

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_state_to_name(PyObject *self, PyObject *args)
{
  vdev_state_t x0;
  vdev_aux_t x1;
  char * result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zpool_state_to_name", &arg0, &arg1))
    return NULL;

  if (_cffi_to_c((char *)&x0, _cffi_type(40), arg0) < 0)
    return NULL;

  if (_cffi_to_c((char *)&x1, _cffi_type(41), arg1) < 0)
    return NULL;

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

  return _cffi_from_c_pointer((char *)result, _cffi_type(10));
}

static PyObject *
_cffi_f_zpool_upgrade(PyObject *self, PyObject *args)
{
  zpool_handle_t * x0;
  uint64_t x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zpool_upgrade", &arg0, &arg1))
    return NULL;

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_vdev_attach(PyObject *self, PyObject *args)
{
  zpool_handle_t * x0;
  char const * x1;
  char const * x2;
  nvlist_t * x3;
  int x4;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_ParseTuple(args, "OOOOO:zpool_vdev_attach", &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

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

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

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

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_vdev_clear(PyObject *self, PyObject *args)
{
  zpool_handle_t * x0;
  uint64_t x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zpool_vdev_clear", &arg0, &arg1))
    return NULL;

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_vdev_degrade(PyObject *self, PyObject *args)
{
  zpool_handle_t * x0;
  uint64_t x1;
  vdev_aux_t x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zpool_vdev_degrade", &arg0, &arg1, &arg2))
    return NULL;

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

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

  if (_cffi_to_c((char *)&x2, _cffi_type(41), arg2) < 0)
    return NULL;

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_vdev_detach(PyObject *self, PyObject *args)
{
  zpool_handle_t * x0;
  char const * x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zpool_vdev_detach", &arg0, &arg1))
    return NULL;

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_vdev_fault(PyObject *self, PyObject *args)
{
  zpool_handle_t * x0;
  uint64_t x1;
  vdev_aux_t x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zpool_vdev_fault", &arg0, &arg1, &arg2))
    return NULL;

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

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

  if (_cffi_to_c((char *)&x2, _cffi_type(41), arg2) < 0)
    return NULL;

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_vdev_name(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  zpool_handle_t * x1;
  nvlist_t * x2;
  boolean_t x3;
  Py_ssize_t datasize;
  char * result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_ParseTuple(args, "OOOO:zpool_vdev_name", &arg0, &arg1, &arg2, &arg3))
    return NULL;

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

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

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

  if (_cffi_to_c((char *)&x3, _cffi_type(5), arg3) < 0)
    return NULL;

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

  return _cffi_from_c_pointer((char *)result, _cffi_type(10));
}

static PyObject *
_cffi_f_zpool_vdev_offline(PyObject *self, PyObject *args)
{
  zpool_handle_t * x0;
  char const * x1;
  boolean_t x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

  if (!PyArg_ParseTuple(args, "OOO:zpool_vdev_offline", &arg0, &arg1, &arg2))
    return NULL;

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

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

  if (_cffi_to_c((char *)&x2, _cffi_type(5), arg2) < 0)
    return NULL;

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_vdev_online(PyObject *self, PyObject *args)
{
  zpool_handle_t * x0;
  char const * x1;
  int x2;
  vdev_state_t * x3;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_ParseTuple(args, "OOOO:zpool_vdev_online", &arg0, &arg1, &arg2, &arg3))
    return NULL;

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

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

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_vdev_remove(PyObject *self, PyObject *args)
{
  zpool_handle_t * x0;
  char const * x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zpool_vdev_remove", &arg0, &arg1))
    return NULL;

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

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

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zpool_vdev_split(PyObject *self, PyObject *args)
{
  zpool_handle_t * x0;
  char * x1;
  nvlist_t * * x2;
  nvlist_t * x3;
  splitflags_t x4;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_ParseTuple(args, "OOOOO:zpool_vdev_split", &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

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

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

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

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

  if (_cffi_to_c((char *)&x4, _cffi_type(43), arg4) < 0)
    return NULL;

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zprop_free_list(PyObject *self, PyObject *arg0)
{
  zprop_list_t * x0;
  Py_ssize_t datasize;

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

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

  Py_INCREF(Py_None);
  return Py_None;
}

static PyObject *
_cffi_f_zprop_get_list(PyObject *self, PyObject *args)
{
  libzfs_handle_t * x0;
  char * x1;
  zprop_list_t * * x2;
  zfs_type_t x3;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

  if (!PyArg_ParseTuple(args, "OOOO:zprop_get_list", &arg0, &arg1, &arg2, &arg3))
    return NULL;

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

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

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

  if (_cffi_to_c((char *)&x3, _cffi_type(12), arg3) < 0)
    return NULL;

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zprop_iter(PyObject *self, PyObject *args)
{
  int(* x0)(int, void *);
  void * x1;
  boolean_t x2;
  boolean_t x3;
  zfs_type_t x4;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

  if (!PyArg_ParseTuple(args, "OOOOO:zprop_iter", &arg0, &arg1, &arg2, &arg3, &arg4))
    return NULL;

  x0 = (int(*)(int, void *))_cffi_to_c_pointer(arg0, _cffi_type(45));
  if (x0 == (int(*)(int, void *))NULL && PyErr_Occurred())
    return NULL;

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

  if (_cffi_to_c((char *)&x2, _cffi_type(5), arg2) < 0)
    return NULL;

  if (_cffi_to_c((char *)&x3, _cffi_type(5), arg3) < 0)
    return NULL;

  if (_cffi_to_c((char *)&x4, _cffi_type(12), arg4) < 0)
    return NULL;

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

  return _cffi_from_c_int(result, int);
}

static PyObject *
_cffi_f_zprop_print_one_property(PyObject *self, PyObject *args)
{
  char const * x0;
  zprop_get_cbdata_t * x1;
  char const * x2;
  char const * x3;
  zprop_source_t x4;
  char const * x5;
  char const * x6;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;
  PyObject *arg5;
  PyObject *arg6;

  if (!PyArg_ParseTuple(args, "OOOOOOO:zprop_print_one_property", &arg0, &arg1, &arg2, &arg3, &arg4, &arg5, &arg6))
    return NULL;

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

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

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

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

  if (_cffi_to_c((char *)&x4, _cffi_type(47), arg4) < 0)
    return NULL;

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

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

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

  Py_INCREF(Py_None);
  return Py_None;
}

static PyObject *
_cffi_f_zvol_volsize_to_reservation(PyObject *self, PyObject *args)
{
  uint64_t x0;
  nvlist_t * x1;
  Py_ssize_t datasize;
  uint64_t result;
  PyObject *arg0;
  PyObject *arg1;

  if (!PyArg_ParseTuple(args, "OO:zvol_volsize_to_reservation", &arg0, &arg1))
    return NULL;

  x0 = _cffi_to_c_int(arg0, uint64_t);
  if (x0 == (uint64_t)-1 && PyErr_Occurred())
    return NULL;

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

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

  return _cffi_from_c_int(result, uint64_t);
}

static void _cffi_check_struct_get_all_cb(struct get_all_cb *p)
{
  /* only to generate compile-time warnings or errors */
  { zfs_handle_t * * *tmp = &p->cb_handles; (void)tmp; }
  (void)((p->cb_alloc) << 1);
  (void)((p->cb_used) << 1);
  { boolean_t *tmp = &p->cb_verbose; (void)tmp; }
  { int(* *tmp)(zfs_handle_t *, void *) = &p->cb_getone; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_get_all_cb(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct get_all_cb y; };
  static Py_ssize_t nums[] = {
    sizeof(struct get_all_cb),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct get_all_cb, cb_handles),
    sizeof(((struct get_all_cb *)0)->cb_handles),
    offsetof(struct get_all_cb, cb_alloc),
    sizeof(((struct get_all_cb *)0)->cb_alloc),
    offsetof(struct get_all_cb, cb_used),
    sizeof(((struct get_all_cb *)0)->cb_used),
    offsetof(struct get_all_cb, cb_verbose),
    sizeof(((struct get_all_cb *)0)->cb_verbose),
    offsetof(struct get_all_cb, cb_getone),
    sizeof(((struct get_all_cb *)0)->cb_getone),
    -1
  };
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_get_all_cb(0);
}

static void _cffi_check_struct_importargs(struct importargs *p)
{
  /* only to generate compile-time warnings or errors */
  { char * * *tmp = &p->path; (void)tmp; }
  (void)((p->paths) << 1);
  { char * *tmp = &p->poolname; (void)tmp; }
  (void)((p->guid) << 1);
  { char * *tmp = &p->cachefile; (void)tmp; }
  (void)((p->can_be_active) << 1);
  (void)((p->unique) << 1);
  (void)((p->exists) << 1);
}
static PyObject *
_cffi_layout_struct_importargs(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct importargs y; };
  static Py_ssize_t nums[] = {
    sizeof(struct importargs),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct importargs, path),
    sizeof(((struct importargs *)0)->path),
    offsetof(struct importargs, paths),
    sizeof(((struct importargs *)0)->paths),
    offsetof(struct importargs, poolname),
    sizeof(((struct importargs *)0)->poolname),
    offsetof(struct importargs, guid),
    sizeof(((struct importargs *)0)->guid),
    offsetof(struct importargs, cachefile),
    sizeof(((struct importargs *)0)->cachefile),
    -1
  };
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_importargs(0);
}

static void _cffi_check_struct_nv_alloc(struct nv_alloc *p)
{
  /* only to generate compile-time warnings or errors */
  { nv_alloc_ops_t const * *tmp = &p->nva_ops; (void)tmp; }
  { void * *tmp = &p->nva_arg; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_nv_alloc(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct nv_alloc y; };
  static Py_ssize_t nums[] = {
    sizeof(struct nv_alloc),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct nv_alloc, nva_ops),
    sizeof(((struct nv_alloc *)0)->nva_ops),
    offsetof(struct nv_alloc, nva_arg),
    sizeof(((struct nv_alloc *)0)->nva_arg),
    -1
  };
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_nv_alloc(0);
}

static void _cffi_check_struct_nvlist(struct nvlist *p)
{
  /* only to generate compile-time warnings or errors */
  (void)((p->nvl_version) << 1);
  (void)((p->nvl_nvflag) << 1);
  (void)((p->nvl_priv) << 1);
  (void)((p->nvl_flag) << 1);
  (void)((p->nvl_pad) << 1);
}
static PyObject *
_cffi_layout_struct_nvlist(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct nvlist y; };
  static Py_ssize_t nums[] = {
    sizeof(struct nvlist),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct nvlist, nvl_version),
    sizeof(((struct nvlist *)0)->nvl_version),
    offsetof(struct nvlist, nvl_nvflag),
    sizeof(((struct nvlist *)0)->nvl_nvflag),
    offsetof(struct nvlist, nvl_priv),
    sizeof(((struct nvlist *)0)->nvl_priv),
    offsetof(struct nvlist, nvl_flag),
    sizeof(((struct nvlist *)0)->nvl_flag),
    offsetof(struct nvlist, nvl_pad),
    sizeof(((struct nvlist *)0)->nvl_pad),
    -1
  };
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_nvlist(0);
}

static void _cffi_check_struct_nvpair(struct nvpair *p)
{
  /* only to generate compile-time warnings or errors */
  (void)((p->nvp_size) << 1);
  (void)((p->nvp_name_sz) << 1);
  (void)((p->nvp_reserve) << 1);
  (void)((p->nvp_value_elem) << 1);
  { data_type_t *tmp = &p->nvp_type; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_nvpair(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct nvpair y; };
  static Py_ssize_t nums[] = {
    sizeof(struct nvpair),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct nvpair, nvp_size),
    sizeof(((struct nvpair *)0)->nvp_size),
    offsetof(struct nvpair, nvp_name_sz),
    sizeof(((struct nvpair *)0)->nvp_name_sz),
    offsetof(struct nvpair, nvp_reserve),
    sizeof(((struct nvpair *)0)->nvp_reserve),
    offsetof(struct nvpair, nvp_value_elem),
    sizeof(((struct nvpair *)0)->nvp_value_elem),
    offsetof(struct nvpair, nvp_type),
    sizeof(((struct nvpair *)0)->nvp_type),
    -1
  };
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_nvpair(0);
}

static void _cffi_check_struct_recvflags(struct recvflags *p)
{
  /* only to generate compile-time warnings or errors */
  { boolean_t *tmp = &p->verbose; (void)tmp; }
  { boolean_t *tmp = &p->isprefix; (void)tmp; }
  { boolean_t *tmp = &p->istail; (void)tmp; }
  { boolean_t *tmp = &p->dryrun; (void)tmp; }
  { boolean_t *tmp = &p->force; (void)tmp; }
  { boolean_t *tmp = &p->canmountoff; (void)tmp; }
  { boolean_t *tmp = &p->byteswap; (void)tmp; }
  { boolean_t *tmp = &p->nomount; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_recvflags(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct recvflags y; };
  static Py_ssize_t nums[] = {
    sizeof(struct recvflags),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct recvflags, verbose),
    sizeof(((struct recvflags *)0)->verbose),
    offsetof(struct recvflags, isprefix),
    sizeof(((struct recvflags *)0)->isprefix),
    offsetof(struct recvflags, istail),
    sizeof(((struct recvflags *)0)->istail),
    offsetof(struct recvflags, dryrun),
    sizeof(((struct recvflags *)0)->dryrun),
    offsetof(struct recvflags, force),
    sizeof(((struct recvflags *)0)->force),
    offsetof(struct recvflags, canmountoff),
    sizeof(((struct recvflags *)0)->canmountoff),
    offsetof(struct recvflags, byteswap),
    sizeof(((struct recvflags *)0)->byteswap),
    offsetof(struct recvflags, nomount),
    sizeof(((struct recvflags *)0)->nomount),
    -1
  };
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_recvflags(0);
}

static void _cffi_check_struct_sendflags(struct sendflags *p)
{
  /* only to generate compile-time warnings or errors */
  { boolean_t *tmp = &p->verbose; (void)tmp; }
  { boolean_t *tmp = &p->replicate; (void)tmp; }
  { boolean_t *tmp = &p->doall; (void)tmp; }
  { boolean_t *tmp = &p->fromorigin; (void)tmp; }
  { boolean_t *tmp = &p->dedup; (void)tmp; }
  { boolean_t *tmp = &p->props; (void)tmp; }
  { boolean_t *tmp = &p->dryrun; (void)tmp; }
  { boolean_t *tmp = &p->parsable; (void)tmp; }
  { boolean_t *tmp = &p->progress; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_sendflags(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct sendflags y; };
  static Py_ssize_t nums[] = {
    sizeof(struct sendflags),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct sendflags, verbose),
    sizeof(((struct sendflags *)0)->verbose),
    offsetof(struct sendflags, replicate),
    sizeof(((struct sendflags *)0)->replicate),
    offsetof(struct sendflags, doall),
    sizeof(((struct sendflags *)0)->doall),
    offsetof(struct sendflags, fromorigin),
    sizeof(((struct sendflags *)0)->fromorigin),
    offsetof(struct sendflags, dedup),
    sizeof(((struct sendflags *)0)->dedup),
    offsetof(struct sendflags, props),
    sizeof(((struct sendflags *)0)->props),
    offsetof(struct sendflags, dryrun),
    sizeof(((struct sendflags *)0)->dryrun),
    offsetof(struct sendflags, parsable),
    sizeof(((struct sendflags *)0)->parsable),
    offsetof(struct sendflags, progress),
    sizeof(((struct sendflags *)0)->progress),
    -1
  };
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_sendflags(0);
}

static void _cffi_check_struct_splitflags(struct splitflags *p)
{
  /* only to generate compile-time warnings or errors */
  (void)((p->dryrun) << 1);
  (void)((p->import) << 1);
}
static PyObject *
_cffi_layout_struct_splitflags(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct splitflags y; };
  static Py_ssize_t nums[] = {
    sizeof(struct splitflags),
    offsetof(struct _cffi_aligncheck, y),
    -1
  };
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_splitflags(0);
}

static void _cffi_check_struct_zfs_allow(struct zfs_allow *p)
{
  /* only to generate compile-time warnings or errors */
  { zfs_allow_t * *tmp = &p->z_next; (void)tmp; }
  { char(*tmp)[] = &p->z_setpoint; (void)tmp; }
  { avl_tree_t *tmp = &p->z_sets; (void)tmp; }
  { avl_tree_t *tmp = &p->z_crperms; (void)tmp; }
  { avl_tree_t *tmp = &p->z_user; (void)tmp; }
  { avl_tree_t *tmp = &p->z_group; (void)tmp; }
  { avl_tree_t *tmp = &p->z_everyone; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_zfs_allow(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct zfs_allow y; };
  static Py_ssize_t nums[] = {
    sizeof(struct zfs_allow),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct zfs_allow, z_next),
    sizeof(((struct zfs_allow *)0)->z_next),
    offsetof(struct zfs_allow, z_setpoint),
    0,  /* char[] */
    offsetof(struct zfs_allow, z_sets),
    sizeof(((struct zfs_allow *)0)->z_sets),
    offsetof(struct zfs_allow, z_crperms),
    sizeof(((struct zfs_allow *)0)->z_crperms),
    offsetof(struct zfs_allow, z_user),
    sizeof(((struct zfs_allow *)0)->z_user),
    offsetof(struct zfs_allow, z_group),
    sizeof(((struct zfs_allow *)0)->z_group),
    offsetof(struct zfs_allow, z_everyone),
    sizeof(((struct zfs_allow *)0)->z_everyone),
    -1
  };
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_zfs_allow(0);
}

static void _cffi_check_struct_zfs_allow_node(struct zfs_allow_node *p)
{
  /* only to generate compile-time warnings or errors */
  { avl_node_t *tmp = &p->z_node; (void)tmp; }
  { char(*tmp)[] = &p->z_key; (void)tmp; }
  { avl_tree_t *tmp = &p->z_localdescend; (void)tmp; }
  { avl_tree_t *tmp = &p->z_local; (void)tmp; }
  { avl_tree_t *tmp = &p->z_descend; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_zfs_allow_node(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct zfs_allow_node y; };
  static Py_ssize_t nums[] = {
    sizeof(struct zfs_allow_node),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct zfs_allow_node, z_node),
    sizeof(((struct zfs_allow_node *)0)->z_node),
    offsetof(struct zfs_allow_node, z_key),
    0,  /* char[] */
    offsetof(struct zfs_allow_node, z_localdescend),
    sizeof(((struct zfs_allow_node *)0)->z_localdescend),
    offsetof(struct zfs_allow_node, z_local),
    sizeof(((struct zfs_allow_node *)0)->z_local),
    offsetof(struct zfs_allow_node, z_descend),
    sizeof(((struct zfs_allow_node *)0)->z_descend),
    -1
  };
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_zfs_allow_node(0);
}

static void _cffi_check_struct_zfs_perm_node(struct zfs_perm_node *p)
{
  /* only to generate compile-time warnings or errors */
  { avl_node_t *tmp = &p->z_node; (void)tmp; }
  { char(*tmp)[] = &p->z_pname; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_zfs_perm_node(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct zfs_perm_node y; };
  static Py_ssize_t nums[] = {
    sizeof(struct zfs_perm_node),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct zfs_perm_node, z_node),
    sizeof(((struct zfs_perm_node *)0)->z_node),
    offsetof(struct zfs_perm_node, z_pname),
    0,  /* char[] */
    -1
  };
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_zfs_perm_node(0);
}

static void _cffi_check_struct_zprop_get_cbdata(struct zprop_get_cbdata *p)
{
  /* only to generate compile-time warnings or errors */
  (void)((p->cb_sources) << 1);
  { zfs_get_column_t(*tmp)[5] = &p->cb_columns; (void)tmp; }
  { int(*tmp)[6] = &p->cb_colwidths; (void)tmp; }
  { boolean_t *tmp = &p->cb_scripted; (void)tmp; }
  { boolean_t *tmp = &p->cb_literal; (void)tmp; }
  { boolean_t *tmp = &p->cb_first; (void)tmp; }
  { zprop_list_t * *tmp = &p->cb_proplist; (void)tmp; }
  { zfs_type_t *tmp = &p->cb_type; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_zprop_get_cbdata(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct zprop_get_cbdata y; };
  static Py_ssize_t nums[] = {
    sizeof(struct zprop_get_cbdata),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct zprop_get_cbdata, cb_sources),
    sizeof(((struct zprop_get_cbdata *)0)->cb_sources),
    offsetof(struct zprop_get_cbdata, cb_columns),
    sizeof(((struct zprop_get_cbdata *)0)->cb_columns),
    offsetof(struct zprop_get_cbdata, cb_colwidths),
    sizeof(((struct zprop_get_cbdata *)0)->cb_colwidths),
    offsetof(struct zprop_get_cbdata, cb_scripted),
    sizeof(((struct zprop_get_cbdata *)0)->cb_scripted),
    offsetof(struct zprop_get_cbdata, cb_literal),
    sizeof(((struct zprop_get_cbdata *)0)->cb_literal),
    offsetof(struct zprop_get_cbdata, cb_first),
    sizeof(((struct zprop_get_cbdata *)0)->cb_first),
    offsetof(struct zprop_get_cbdata, cb_proplist),
    sizeof(((struct zprop_get_cbdata *)0)->cb_proplist),
    offsetof(struct zprop_get_cbdata, cb_type),
    sizeof(((struct zprop_get_cbdata *)0)->cb_type),
    -1
  };
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_zprop_get_cbdata(0);
}

static void _cffi_check_struct_zprop_list(struct zprop_list *p)
{
  /* only to generate compile-time warnings or errors */
  (void)((p->pl_prop) << 1);
  { char * *tmp = &p->pl_user_prop; (void)tmp; }
  { zprop_list_t * *tmp = &p->pl_next; (void)tmp; }
  { boolean_t *tmp = &p->pl_all; (void)tmp; }
  (void)((p->pl_width) << 1);
  (void)((p->pl_recvd_width) << 1);
  { boolean_t *tmp = &p->pl_fixed; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_zprop_list(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct zprop_list y; };
  static Py_ssize_t nums[] = {
    sizeof(struct zprop_list),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct zprop_list, pl_prop),
    sizeof(((struct zprop_list *)0)->pl_prop),
    offsetof(struct zprop_list, pl_user_prop),
    sizeof(((struct zprop_list *)0)->pl_user_prop),
    offsetof(struct zprop_list, pl_next),
    sizeof(((struct zprop_list *)0)->pl_next),
    offsetof(struct zprop_list, pl_all),
    sizeof(((struct zprop_list *)0)->pl_all),
    offsetof(struct zprop_list, pl_width),
    sizeof(((struct zprop_list *)0)->pl_width),
    offsetof(struct zprop_list, pl_recvd_width),
    sizeof(((struct zprop_list *)0)->pl_recvd_width),
    offsetof(struct zprop_list, pl_fixed),
    sizeof(((struct zprop_list *)0)->pl_fixed),
    -1
  };
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_zprop_list(0);
}

static int _cffi_setup_custom(PyObject *lib)
{
  return _cffi_e_enum_diff_flags(lib);
}

static PyMethodDef _cffi_methods[] = {
  {"_cffi_layout__avl_node_t", _cffi_layout__avl_node_t, METH_NOARGS, NULL},
  {"_cffi_layout__avl_tree_t", _cffi_layout__avl_tree_t, METH_NOARGS, NULL},
  {"getprop_uint64", _cffi_f_getprop_uint64, METH_VARARGS, NULL},
  {"is_mounted", _cffi_f_is_mounted, METH_VARARGS, NULL},
  {"libzfs_add_handle", _cffi_f_libzfs_add_handle, METH_VARARGS, NULL},
  {"libzfs_dataset_cmp", _cffi_f_libzfs_dataset_cmp, METH_VARARGS, NULL},
  {"libzfs_errno", _cffi_f_libzfs_errno, METH_O, NULL},
  {"libzfs_error_action", _cffi_f_libzfs_error_action, METH_O, NULL},
  {"libzfs_error_description", _cffi_f_libzfs_error_description, METH_O, NULL},
  {"libzfs_fini", _cffi_f_libzfs_fini, METH_O, NULL},
  {"libzfs_init", _cffi_f_libzfs_init, METH_NOARGS, NULL},
  {"libzfs_load_module", _cffi_f_libzfs_load_module, METH_O, NULL},
  {"libzfs_mnttab_add", _cffi_f_libzfs_mnttab_add, METH_VARARGS, NULL},
  {"libzfs_mnttab_cache", _cffi_f_libzfs_mnttab_cache, METH_VARARGS, NULL},
  {"libzfs_mnttab_find", _cffi_f_libzfs_mnttab_find, METH_VARARGS, NULL},
  {"libzfs_mnttab_fini", _cffi_f_libzfs_mnttab_fini, METH_O, NULL},
  {"libzfs_mnttab_init", _cffi_f_libzfs_mnttab_init, METH_O, NULL},
  {"libzfs_mnttab_remove", _cffi_f_libzfs_mnttab_remove, METH_VARARGS, NULL},
  {"libzfs_print_on_error", _cffi_f_libzfs_print_on_error, METH_VARARGS, NULL},
  {"libzfs_run_process", _cffi_f_libzfs_run_process, METH_VARARGS, NULL},
  {"zfs_append_partition", _cffi_f_zfs_append_partition, METH_VARARGS, NULL},
  {"zfs_clone", _cffi_f_zfs_clone, METH_VARARGS, NULL},
  {"zfs_close", _cffi_f_zfs_close, METH_O, NULL},
  {"zfs_create", _cffi_f_zfs_create, METH_VARARGS, NULL},
  {"zfs_create_ancestors", _cffi_f_zfs_create_ancestors, METH_VARARGS, NULL},
  {"zfs_dataset_exists", _cffi_f_zfs_dataset_exists, METH_VARARGS, NULL},
  {"zfs_destroy", _cffi_f_zfs_destroy, METH_VARARGS, NULL},
  {"zfs_destroy_snaps", _cffi_f_zfs_destroy_snaps, METH_VARARGS, NULL},
  {"zfs_destroy_snaps_nvl", _cffi_f_zfs_destroy_snaps_nvl, METH_VARARGS, NULL},
  {"zfs_expand_proplist", _cffi_f_zfs_expand_proplist, METH_VARARGS, NULL},
  {"zfs_get_clones_nvl", _cffi_f_zfs_get_clones_nvl, METH_O, NULL},
  {"zfs_get_fsacl", _cffi_f_zfs_get_fsacl, METH_VARARGS, NULL},
  {"zfs_get_handle", _cffi_f_zfs_get_handle, METH_O, NULL},
  {"zfs_get_holds", _cffi_f_zfs_get_holds, METH_VARARGS, NULL},
  {"zfs_get_name", _cffi_f_zfs_get_name, METH_O, NULL},
  {"zfs_get_pool_handle", _cffi_f_zfs_get_pool_handle, METH_O, NULL},
  {"zfs_get_type", _cffi_f_zfs_get_type, METH_O, NULL},
  {"zfs_get_user_props", _cffi_f_zfs_get_user_props, METH_O, NULL},
  {"zfs_handle_dup", _cffi_f_zfs_handle_dup, METH_O, NULL},
  {"zfs_hold", _cffi_f_zfs_hold, METH_VARARGS, NULL},
  {"zfs_ioctl", _cffi_f_zfs_ioctl, METH_VARARGS, NULL},
  {"zfs_is_mounted", _cffi_f_zfs_is_mounted, METH_VARARGS, NULL},
  {"zfs_is_shared", _cffi_f_zfs_is_shared, METH_O, NULL},
  {"zfs_is_shared_nfs", _cffi_f_zfs_is_shared_nfs, METH_VARARGS, NULL},
  {"zfs_is_shared_smb", _cffi_f_zfs_is_shared_smb, METH_VARARGS, NULL},
  {"zfs_iter_children", _cffi_f_zfs_iter_children, METH_VARARGS, NULL},
  {"zfs_iter_dependents", _cffi_f_zfs_iter_dependents, METH_VARARGS, NULL},
  {"zfs_iter_filesystems", _cffi_f_zfs_iter_filesystems, METH_VARARGS, NULL},
  {"zfs_iter_root", _cffi_f_zfs_iter_root, METH_VARARGS, NULL},
  {"zfs_iter_snapshots", _cffi_f_zfs_iter_snapshots, METH_VARARGS, NULL},
  {"zfs_iter_snapshots_sorted", _cffi_f_zfs_iter_snapshots_sorted, METH_VARARGS, NULL},
  {"zfs_iter_snapspec", _cffi_f_zfs_iter_snapspec, METH_VARARGS, NULL},
  {"zfs_mount", _cffi_f_zfs_mount, METH_VARARGS, NULL},
  {"zfs_name_to_prop", _cffi_f_zfs_name_to_prop, METH_O, NULL},
  {"zfs_name_valid", _cffi_f_zfs_name_valid, METH_VARARGS, NULL},
  {"zfs_nicenum", _cffi_f_zfs_nicenum, METH_VARARGS, NULL},
  {"zfs_nicestrtonum", _cffi_f_zfs_nicestrtonum, METH_VARARGS, NULL},
  {"zfs_open", _cffi_f_zfs_open, METH_VARARGS, NULL},
  {"zfs_path_to_zhandle", _cffi_f_zfs_path_to_zhandle, METH_VARARGS, NULL},
  {"zfs_promote", _cffi_f_zfs_promote, METH_O, NULL},
  {"zfs_prop_align_right", _cffi_f_zfs_prop_align_right, METH_O, NULL},
  {"zfs_prop_column_name", _cffi_f_zfs_prop_column_name, METH_O, NULL},
  {"zfs_prop_default_numeric", _cffi_f_zfs_prop_default_numeric, METH_O, NULL},
  {"zfs_prop_default_string", _cffi_f_zfs_prop_default_string, METH_O, NULL},
  {"zfs_prop_get", _cffi_f_zfs_prop_get, METH_VARARGS, NULL},
  {"zfs_prop_get_int", _cffi_f_zfs_prop_get_int, METH_VARARGS, NULL},
  {"zfs_prop_get_numeric", _cffi_f_zfs_prop_get_numeric, METH_VARARGS, NULL},
  {"zfs_prop_get_recvd", _cffi_f_zfs_prop_get_recvd, METH_VARARGS, NULL},
  {"zfs_prop_get_userquota", _cffi_f_zfs_prop_get_userquota, METH_VARARGS, NULL},
  {"zfs_prop_get_userquota_int", _cffi_f_zfs_prop_get_userquota_int, METH_VARARGS, NULL},
  {"zfs_prop_get_written", _cffi_f_zfs_prop_get_written, METH_VARARGS, NULL},
  {"zfs_prop_get_written_int", _cffi_f_zfs_prop_get_written_int, METH_VARARGS, NULL},
  {"zfs_prop_index_to_string", _cffi_f_zfs_prop_index_to_string, METH_VARARGS, NULL},
  {"zfs_prop_inherit", _cffi_f_zfs_prop_inherit, METH_VARARGS, NULL},
  {"zfs_prop_inheritable", _cffi_f_zfs_prop_inheritable, METH_O, NULL},
  {"zfs_prop_is_string", _cffi_f_zfs_prop_is_string, METH_O, NULL},
  {"zfs_prop_random_value", _cffi_f_zfs_prop_random_value, METH_VARARGS, NULL},
  {"zfs_prop_readonly", _cffi_f_zfs_prop_readonly, METH_O, NULL},
  {"zfs_prop_set", _cffi_f_zfs_prop_set, METH_VARARGS, NULL},
  {"zfs_prop_setonce", _cffi_f_zfs_prop_setonce, METH_O, NULL},
  {"zfs_prop_string_to_index", _cffi_f_zfs_prop_string_to_index, METH_VARARGS, NULL},
  {"zfs_prop_to_name", _cffi_f_zfs_prop_to_name, METH_O, NULL},
  {"zfs_prop_user", _cffi_f_zfs_prop_user, METH_O, NULL},
  {"zfs_prop_userquota", _cffi_f_zfs_prop_userquota, METH_O, NULL},
  {"zfs_prop_valid_for_type", _cffi_f_zfs_prop_valid_for_type, METH_VARARGS, NULL},
  {"zfs_prop_values", _cffi_f_zfs_prop_values, METH_O, NULL},
  {"zfs_prop_written", _cffi_f_zfs_prop_written, METH_O, NULL},
  {"zfs_prune_proplist", _cffi_f_zfs_prune_proplist, METH_VARARGS, NULL},
  {"zfs_receive", _cffi_f_zfs_receive, METH_VARARGS, NULL},
  {"zfs_refresh_properties", _cffi_f_zfs_refresh_properties, METH_O, NULL},
  {"zfs_release", _cffi_f_zfs_release, METH_VARARGS, NULL},
  {"zfs_rename", _cffi_f_zfs_rename, METH_VARARGS, NULL},
  {"zfs_resolve_shortname", _cffi_f_zfs_resolve_shortname, METH_VARARGS, NULL},
  {"zfs_rollback", _cffi_f_zfs_rollback, METH_VARARGS, NULL},
  {"zfs_send", _cffi_f_zfs_send, METH_VARARGS, NULL},
  {"zfs_set_fsacl", _cffi_f_zfs_set_fsacl, METH_VARARGS, NULL},
  {"zfs_share", _cffi_f_zfs_share, METH_O, NULL},
  {"zfs_share_nfs", _cffi_f_zfs_share_nfs, METH_O, NULL},
  {"zfs_share_smb", _cffi_f_zfs_share_smb, METH_O, NULL},
  {"zfs_shareall", _cffi_f_zfs_shareall, METH_O, NULL},
  {"zfs_show_diffs", _cffi_f_zfs_show_diffs, METH_VARARGS, NULL},
  {"zfs_smb_acl_add", _cffi_f_zfs_smb_acl_add, METH_VARARGS, NULL},
  {"zfs_smb_acl_purge", _cffi_f_zfs_smb_acl_purge, METH_VARARGS, NULL},
  {"zfs_smb_acl_remove", _cffi_f_zfs_smb_acl_remove, METH_VARARGS, NULL},
  {"zfs_smb_acl_rename", _cffi_f_zfs_smb_acl_rename, METH_VARARGS, NULL},
  {"zfs_snapshot", _cffi_f_zfs_snapshot, METH_VARARGS, NULL},
  {"zfs_spa_version", _cffi_f_zfs_spa_version, METH_VARARGS, NULL},
  {"zfs_strcmp_pathname", _cffi_f_zfs_strcmp_pathname, METH_VARARGS, NULL},
  {"zfs_type_to_name", _cffi_f_zfs_type_to_name, METH_O, NULL},
  {"zfs_unmount", _cffi_f_zfs_unmount, METH_VARARGS, NULL},
  {"zfs_unmountall", _cffi_f_zfs_unmountall, METH_VARARGS, NULL},
  {"zfs_unshare", _cffi_f_zfs_unshare, METH_O, NULL},
  {"zfs_unshare_nfs", _cffi_f_zfs_unshare_nfs, METH_VARARGS, NULL},
  {"zfs_unshare_smb", _cffi_f_zfs_unshare_smb, METH_VARARGS, NULL},
  {"zfs_unshareall", _cffi_f_zfs_unshareall, METH_O, NULL},
  {"zfs_unshareall_bypath", _cffi_f_zfs_unshareall_bypath, METH_VARARGS, NULL},
  {"zfs_unshareall_nfs", _cffi_f_zfs_unshareall_nfs, METH_O, NULL},
  {"zfs_unshareall_smb", _cffi_f_zfs_unshareall_smb, METH_O, NULL},
  {"zfs_valid_proplist", _cffi_f_zfs_valid_proplist, METH_VARARGS, NULL},
  {"zpool_add", _cffi_f_zpool_add, METH_VARARGS, NULL},
  {"zpool_clear", _cffi_f_zpool_clear, METH_VARARGS, NULL},
  {"zpool_clear_label", _cffi_f_zpool_clear_label, METH_O, NULL},
  {"zpool_close", _cffi_f_zpool_close, METH_O, NULL},
  {"zpool_create", _cffi_f_zpool_create, METH_VARARGS, NULL},
  {"zpool_destroy", _cffi_f_zpool_destroy, METH_VARARGS, NULL},
  {"zpool_disable_datasets", _cffi_f_zpool_disable_datasets, METH_VARARGS, NULL},
  {"zpool_enable_datasets", _cffi_f_zpool_enable_datasets, METH_VARARGS, NULL},
  {"zpool_events_clear", _cffi_f_zpool_events_clear, METH_VARARGS, NULL},
  {"zpool_events_next", _cffi_f_zpool_events_next, METH_VARARGS, NULL},
  {"zpool_expand_proplist", _cffi_f_zpool_expand_proplist, METH_VARARGS, NULL},
  {"zpool_explain_recover", _cffi_f_zpool_explain_recover, METH_VARARGS, NULL},
  {"zpool_export", _cffi_f_zpool_export, METH_VARARGS, NULL},
  {"zpool_export_force", _cffi_f_zpool_export_force, METH_VARARGS, NULL},
  {"zpool_find_import", _cffi_f_zpool_find_import, METH_VARARGS, NULL},
  {"zpool_find_import_cached", _cffi_f_zpool_find_import_cached, METH_VARARGS, NULL},
  {"zpool_find_vdev", _cffi_f_zpool_find_vdev, METH_VARARGS, NULL},
  {"zpool_find_vdev_by_physpath", _cffi_f_zpool_find_vdev_by_physpath, METH_VARARGS, NULL},
  {"zpool_free_handles", _cffi_f_zpool_free_handles, METH_O, NULL},
  {"zpool_get_config", _cffi_f_zpool_get_config, METH_VARARGS, NULL},
  {"zpool_get_errlog", _cffi_f_zpool_get_errlog, METH_VARARGS, NULL},
  {"zpool_get_features", _cffi_f_zpool_get_features, METH_O, NULL},
  {"zpool_get_handle", _cffi_f_zpool_get_handle, METH_O, NULL},
  {"zpool_get_history", _cffi_f_zpool_get_history, METH_VARARGS, NULL},
  {"zpool_get_name", _cffi_f_zpool_get_name, METH_O, NULL},
  {"zpool_get_physpath", _cffi_f_zpool_get_physpath, METH_VARARGS, NULL},
  {"zpool_get_prop", _cffi_f_zpool_get_prop, METH_VARARGS, NULL},
  {"zpool_get_prop_int", _cffi_f_zpool_get_prop_int, METH_VARARGS, NULL},
  {"zpool_get_state", _cffi_f_zpool_get_state, METH_O, NULL},
  {"zpool_get_status", _cffi_f_zpool_get_status, METH_VARARGS, NULL},
  {"zpool_history_unpack", _cffi_f_zpool_history_unpack, METH_VARARGS, NULL},
  {"zpool_import", _cffi_f_zpool_import, METH_VARARGS, NULL},
  {"zpool_import_props", _cffi_f_zpool_import_props, METH_VARARGS, NULL},
  {"zpool_import_status", _cffi_f_zpool_import_status, METH_VARARGS, NULL},
  {"zpool_in_use", _cffi_f_zpool_in_use, METH_VARARGS, NULL},
  {"zpool_iter", _cffi_f_zpool_iter, METH_VARARGS, NULL},
  {"zpool_label_disk", _cffi_f_zpool_label_disk, METH_VARARGS, NULL},
  {"zpool_label_disk_wait", _cffi_f_zpool_label_disk_wait, METH_VARARGS, NULL},
  {"zpool_name_to_prop", _cffi_f_zpool_name_to_prop, METH_O, NULL},
  {"zpool_obj_to_path", _cffi_f_zpool_obj_to_path, METH_VARARGS, NULL},
  {"zpool_open", _cffi_f_zpool_open, METH_VARARGS, NULL},
  {"zpool_open_canfail", _cffi_f_zpool_open_canfail, METH_VARARGS, NULL},
  {"zpool_pool_state_to_name", _cffi_f_zpool_pool_state_to_name, METH_O, NULL},
  {"zpool_print_unsup_feat", _cffi_f_zpool_print_unsup_feat, METH_O, NULL},
  {"zpool_prop_align_right", _cffi_f_zpool_prop_align_right, METH_O, NULL},
  {"zpool_prop_column_name", _cffi_f_zpool_prop_column_name, METH_O, NULL},
  {"zpool_prop_default_numeric", _cffi_f_zpool_prop_default_numeric, METH_O, NULL},
  {"zpool_prop_default_string", _cffi_f_zpool_prop_default_string, METH_O, NULL},
  {"zpool_prop_feature", _cffi_f_zpool_prop_feature, METH_O, NULL},
  {"zpool_prop_get_feature", _cffi_f_zpool_prop_get_feature, METH_VARARGS, NULL},
  {"zpool_prop_index_to_string", _cffi_f_zpool_prop_index_to_string, METH_VARARGS, NULL},
  {"zpool_prop_random_value", _cffi_f_zpool_prop_random_value, METH_VARARGS, NULL},
  {"zpool_prop_readonly", _cffi_f_zpool_prop_readonly, METH_O, NULL},
  {"zpool_prop_string_to_index", _cffi_f_zpool_prop_string_to_index, METH_VARARGS, NULL},
  {"zpool_prop_to_name", _cffi_f_zpool_prop_to_name, METH_O, NULL},
  {"zpool_prop_unsupported", _cffi_f_zpool_prop_unsupported, METH_O, NULL},
  {"zpool_prop_values", _cffi_f_zpool_prop_values, METH_O, NULL},
  {"zpool_read_label", _cffi_f_zpool_read_label, METH_VARARGS, NULL},
  {"zpool_refresh_stats", _cffi_f_zpool_refresh_stats, METH_VARARGS, NULL},
  {"zpool_reguid", _cffi_f_zpool_reguid, METH_O, NULL},
  {"zpool_reopen", _cffi_f_zpool_reopen, METH_O, NULL},
  {"zpool_scan", _cffi_f_zpool_scan, METH_VARARGS, NULL},
  {"zpool_search_import", _cffi_f_zpool_search_import, METH_VARARGS, NULL},
  {"zpool_set_prop", _cffi_f_zpool_set_prop, METH_VARARGS, NULL},
  {"zpool_state_to_name", _cffi_f_zpool_state_to_name, METH_VARARGS, NULL},
  {"zpool_upgrade", _cffi_f_zpool_upgrade, METH_VARARGS, NULL},
  {"zpool_vdev_attach", _cffi_f_zpool_vdev_attach, METH_VARARGS, NULL},
  {"zpool_vdev_clear", _cffi_f_zpool_vdev_clear, METH_VARARGS, NULL},
  {"zpool_vdev_degrade", _cffi_f_zpool_vdev_degrade, METH_VARARGS, NULL},
  {"zpool_vdev_detach", _cffi_f_zpool_vdev_detach, METH_VARARGS, NULL},
  {"zpool_vdev_fault", _cffi_f_zpool_vdev_fault, METH_VARARGS, NULL},
  {"zpool_vdev_name", _cffi_f_zpool_vdev_name, METH_VARARGS, NULL},
  {"zpool_vdev_offline", _cffi_f_zpool_vdev_offline, METH_VARARGS, NULL},
  {"zpool_vdev_online", _cffi_f_zpool_vdev_online, METH_VARARGS, NULL},
  {"zpool_vdev_remove", _cffi_f_zpool_vdev_remove, METH_VARARGS, NULL},
  {"zpool_vdev_split", _cffi_f_zpool_vdev_split, METH_VARARGS, NULL},
  {"zprop_free_list", _cffi_f_zprop_free_list, METH_O, NULL},
  {"zprop_get_list", _cffi_f_zprop_get_list, METH_VARARGS, NULL},
  {"zprop_iter", _cffi_f_zprop_iter, METH_VARARGS, NULL},
  {"zprop_print_one_property", _cffi_f_zprop_print_one_property, METH_VARARGS, NULL},
  {"zvol_volsize_to_reservation", _cffi_f_zvol_volsize_to_reservation, METH_VARARGS, NULL},
  {"_cffi_layout_struct_get_all_cb", _cffi_layout_struct_get_all_cb, METH_NOARGS, NULL},
  {"_cffi_layout_struct_importargs", _cffi_layout_struct_importargs, METH_NOARGS, NULL},
  {"_cffi_layout_struct_nv_alloc", _cffi_layout_struct_nv_alloc, METH_NOARGS, NULL},
  {"_cffi_layout_struct_nvlist", _cffi_layout_struct_nvlist, METH_NOARGS, NULL},
  {"_cffi_layout_struct_nvpair", _cffi_layout_struct_nvpair, METH_NOARGS, NULL},
  {"_cffi_layout_struct_recvflags", _cffi_layout_struct_recvflags, METH_NOARGS, NULL},
  {"_cffi_layout_struct_sendflags", _cffi_layout_struct_sendflags, METH_NOARGS, NULL},
  {"_cffi_layout_struct_splitflags", _cffi_layout_struct_splitflags, METH_NOARGS, NULL},
  {"_cffi_layout_struct_zfs_allow", _cffi_layout_struct_zfs_allow, METH_NOARGS, NULL},
  {"_cffi_layout_struct_zfs_allow_node", _cffi_layout_struct_zfs_allow_node, METH_NOARGS, NULL},
  {"_cffi_layout_struct_zfs_perm_node", _cffi_layout_struct_zfs_perm_node, METH_NOARGS, NULL},
  {"_cffi_layout_struct_zprop_get_cbdata", _cffi_layout_struct_zprop_get_cbdata, METH_NOARGS, NULL},
  {"_cffi_layout_struct_zprop_list", _cffi_layout_struct_zprop_list, METH_NOARGS, NULL},
  {"_cffi_setup", _cffi_setup, METH_VARARGS, NULL},
  {NULL, NULL, 0, NULL}    /* Sentinel */
};

#if PY_MAJOR_VERSION >= 3

static struct PyModuleDef _cffi_module_def = {
  PyModuleDef_HEAD_INIT,
  "_cffi__x71bfc6d1x42dbcc93",
  NULL,
  -1,
  _cffi_methods,
  NULL, NULL, NULL, NULL
};

PyMODINIT_FUNC
PyInit__cffi__x71bfc6d1x42dbcc93(void)
{
  PyObject *lib;
  lib = PyModule_Create(&_cffi_module_def);
  if (lib == NULL)
    return NULL;
  if (0 < 0 || _cffi_init() < 0) {
    Py_DECREF(lib);
    return NULL;
  }
  return lib;
}

#else

PyMODINIT_FUNC
init_cffi__x71bfc6d1x42dbcc93(void)
{
  PyObject *lib;
  lib = Py_InitModule("_cffi__x71bfc6d1x42dbcc93", _cffi_methods);
  if (lib == NULL)
    return;
  if (0 < 0 || _cffi_init() < 0)
    return;
  return;
}

#endif
