
#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;
   typedef __int8 int_least8_t;
   typedef __int16 int_least16_t;
   typedef __int32 int_least32_t;
   typedef __int64 int_least64_t;
   typedef unsigned __int8 uint_least8_t;
   typedef unsigned __int16 uint_least16_t;
   typedef unsigned __int32 uint_least32_t;
   typedef unsigned __int64 uint_least64_t;
   typedef __int8 int_fast8_t;
   typedef __int16 int_fast16_t;
   typedef __int32 int_fast32_t;
   typedef __int64 int_fast64_t;
   typedef unsigned __int8 uint_fast8_t;
   typedef unsigned __int16 uint_fast16_t;
   typedef unsigned __int32 uint_fast32_t;
   typedef unsigned __int64 uint_fast64_t;
   typedef __int64 intmax_t;
   typedef unsigned __int64 uintmax_t;
# else
#  include <stdint.h>
# endif
# if _MSC_VER < 1800   /* MSVC < 2013 */
   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((long)x) :                                    \
         sizeof(type) == sizeof(long) ?                                  \
            PyLong_FromUnsignedLong((unsigned long)x) :                  \
            PyLong_FromUnsignedLongLong((unsigned long long)x)) :        \
        (sizeof(type) <= sizeof(long) ?                                  \
            PyInt_FromLong((long)x) :                                    \
            PyLong_FromLongLong((long long)x)))

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

#define _cffi_to_c_i8                                                    \
                 ((int(*)(PyObject *))_cffi_exports[1])
#define _cffi_to_c_u8                                                    \
                 ((int(*)(PyObject *))_cffi_exports[2])
#define _cffi_to_c_i16                                                   \
                 ((int(*)(PyObject *))_cffi_exports[3])
#define _cffi_to_c_u16                                                   \
                 ((int(*)(PyObject *))_cffi_exports[4])
#define _cffi_to_c_i32                                                   \
                 ((int(*)(PyObject *))_cffi_exports[5])
#define _cffi_to_c_u32                                                   \
                 ((unsigned int(*)(PyObject *))_cffi_exports[6])
#define _cffi_to_c_i64                                                   \
                 ((long long(*)(PyObject *))_cffi_exports[7])
#define _cffi_to_c_u64                                                   \
                 ((unsigned long long(*)(PyObject *))_cffi_exports[8])
#define _cffi_to_c_char                                                  \
                 ((int(*)(PyObject *))_cffi_exports[9])
#define _cffi_from_c_pointer                                             \
    ((PyObject *(*)(char *, CTypeDescrObject *))_cffi_exports[10])
#define _cffi_to_c_pointer                                               \
    ((char *(*)(PyObject *, CTypeDescrObject *))_cffi_exports[11])
#define _cffi_get_struct_layout                                          \
    ((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);
    (void)self; /* unused */
    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 <trousers/tss.h>

static PyObject *
_cffi_f_Tspi_ChangeAuth(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_ChangeAuthAsym(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  uint32_t x3;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

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

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Context_Close(PyObject *self, PyObject *arg0)
{
  uint32_t x0;
  uint32_t result;

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Context_CloseObject(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Context_CloseSignTransport(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  TSS_VALIDATION * x2;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Context_Connect(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint16_t * x1;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Context_Create(PyObject *self, PyObject *arg0)
{
  uint32_t * x0;
  Py_ssize_t datasize;
  uint32_t result;

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Context_CreateObject(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  uint32_t * x3;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

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

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Context_FreeMemory(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint8_t * x1;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Context_GetCapability(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  uint8_t * x3;
  uint32_t * x4;
  uint8_t * * x5;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;
  PyObject *arg5;

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

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

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

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

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

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(2), arg4, (char **)&x4);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x4 = alloca((size_t)datasize);
    memset((void *)x4, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x4, _cffi_type(2), 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((size_t)datasize);
    memset((void *)x5, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x5, _cffi_type(4), arg5) < 0)
      return NULL;
  }

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Context_GetDefaultPolicy(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t * x1;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Context_GetKeyByPublicInfo(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  uint32_t x3;
  uint8_t * x4;
  uint32_t * x5;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;
  PyObject *arg5;

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

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

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

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Context_GetKeyByUUID(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  TSS_UUID x2;
  uint32_t * x3;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

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

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

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

  if (_cffi_to_c((char *)&x2, _cffi_type(5), 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((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(2), arg3) < 0)
      return NULL;
  }

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Context_GetRegisteredKeysByUUID(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  TSS_UUID * x2;
  uint32_t * x3;
  TSS_KM_KEYINFO * * x4;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

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

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

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

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(6), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(6), 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((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(2), arg3) < 0)
      return NULL;
  }

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Context_GetRegisteredKeysByUUID2(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  TSS_UUID * x2;
  uint32_t * x3;
  TSS_KM_KEYINFO2 * * x4;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

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

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

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

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(6), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(6), 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((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(2), arg3) < 0)
      return NULL;
  }

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Context_GetTpmObject(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t * x1;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Context_LoadKeyByBlob(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  uint8_t * x3;
  uint32_t * x4;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

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

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

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Context_LoadKeyByUUID(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  TSS_UUID x2;
  uint32_t * x3;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

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

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

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

  if (_cffi_to_c((char *)&x2, _cffi_type(5), 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((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(2), arg3) < 0)
      return NULL;
  }

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Context_RegisterKey(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  TSS_UUID x3;
  uint32_t x4;
  TSS_UUID x5;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;
  PyObject *arg5;

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

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

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

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

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

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

  if (_cffi_to_c((char *)&x5, _cffi_type(5), arg5) < 0)
    return NULL;

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Context_SetTransEncryptionKey(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Context_UnregisterKey(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  TSS_UUID x2;
  uint32_t * x3;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

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

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

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

  if (_cffi_to_c((char *)&x2, _cffi_type(5), 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((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(2), arg3) < 0)
      return NULL;
  }

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Data_Bind(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  uint8_t * x3;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

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

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Data_Seal(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  uint8_t * x3;
  uint32_t x4;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

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

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

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Data_Unbind(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t * x2;
  uint8_t * * x3;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

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

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

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

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(2), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(2), 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((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(4), arg3) < 0)
      return NULL;
  }

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Data_Unseal(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t * x2;
  uint8_t * * x3;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

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

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

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

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(2), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(2), 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((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(4), arg3) < 0)
      return NULL;
  }

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_DecodeBER_TssBlob(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint8_t * x1;
  uint32_t * x2;
  uint32_t * x3;
  uint8_t * x4;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_EncodeDER_TssBlob(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint8_t * x1;
  uint32_t x2;
  uint32_t * x3;
  uint8_t * x4;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

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

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

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_GetAttribData(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  uint32_t * x3;
  uint8_t * * x4;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

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

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

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_GetAttribUint32(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  uint32_t * x3;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

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

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_GetPolicyObject(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t * x2;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Hash_GetHashValue(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t * x1;
  uint8_t * * x2;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Hash_SetHashValue(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint8_t * x2;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Hash_Sign(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t * x2;
  uint8_t * * x3;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

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

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

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

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(2), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(2), 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((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(4), arg3) < 0)
      return NULL;
  }

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Hash_TickStampBlob(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  TSS_VALIDATION * x2;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Hash_UpdateHashValue(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint8_t * x2;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Hash_VerifySignature(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  uint8_t * x3;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

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

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Key_CMKConvertMigration(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  uint32_t x3;
  uint8_t * x4;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

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

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

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Key_CMKCreateBlob(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  uint32_t * x3;
  uint8_t * * x4;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

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

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

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Key_CertifyKey(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  TSS_VALIDATION * x2;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Key_ConvertMigrationBlob(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  uint8_t * x3;
  uint32_t x4;
  uint8_t * x5;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;
  PyObject *arg5;

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

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

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

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Key_CreateKey(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Key_CreateMigrationBlob(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  uint8_t * x3;
  uint32_t * x4;
  uint8_t * * x5;
  uint32_t * x6;
  uint8_t * * x7;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;
  PyObject *arg5;
  PyObject *arg6;
  PyObject *arg7;

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

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

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

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

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

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(2), arg4, (char **)&x4);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x4 = alloca((size_t)datasize);
    memset((void *)x4, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x4, _cffi_type(2), 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((size_t)datasize);
    memset((void *)x5, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x5, _cffi_type(4), arg5) < 0)
      return NULL;
  }

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Key_GetPubKey(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t * x1;
  uint8_t * * x2;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Key_LoadKey(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Key_UnloadKey(PyObject *self, PyObject *arg0)
{
  uint32_t x0;
  uint32_t result;

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Key_WrapKey(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_NV_DefineSpace(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_NV_ReadValue(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t * x2;
  uint8_t * * x3;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

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

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

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

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(2), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(2), 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((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(4), arg3) < 0)
      return NULL;
  }

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_NV_ReleaseSpace(PyObject *self, PyObject *arg0)
{
  uint32_t x0;
  uint32_t result;

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_NV_WriteValue(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  uint8_t * x3;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

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

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_PcrComposite_GetCompositeHash(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t * x1;
  uint8_t * * x2;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_PcrComposite_GetPcrLocality(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t * x1;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_PcrComposite_GetPcrValue(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t * x2;
  uint8_t * * x3;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

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

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

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

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(2), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(2), 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((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(4), arg3) < 0)
      return NULL;
  }

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_PcrComposite_SelectPcrIndex(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_PcrComposite_SelectPcrIndexEx(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_PcrComposite_SetPcrLocality(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_PcrComposite_SetPcrValue(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  uint8_t * x3;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

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

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Policy_AssignToObject(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Policy_FlushSecret(PyObject *self, PyObject *arg0)
{
  uint32_t x0;
  uint32_t result;

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_Policy_SetSecret(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  uint8_t * x3;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

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

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_SetAttribData(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  uint32_t x3;
  uint8_t * x4;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

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

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

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_SetAttribUint32(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  uint32_t x3;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

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

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_ActivateIdentity(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  uint8_t * x3;
  uint32_t x4;
  uint8_t * x5;
  uint32_t * x6;
  uint8_t * * x7;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;
  PyObject *arg5;
  PyObject *arg6;
  PyObject *arg7;

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

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

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

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

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

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_AuthorizeMigrationTicket(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint16_t x2;
  uint32_t * x3;
  uint8_t * * x4;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

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

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

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_CMKApproveMA(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_CMKCreateTicket(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_CMKSetRestrictions(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_CertifySelfTest(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  TSS_VALIDATION * x2;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_CheckMaintenancePubKey(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  TSS_VALIDATION * x2;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_ClearOwner(PyObject *self, PyObject *args)
{
  uint32_t x0;
  int8_t x1;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_CollateIdentityRequest(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  uint32_t x3;
  uint8_t * x4;
  uint32_t x5;
  uint32_t x6;
  uint32_t * x7;
  uint8_t * * x8;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;
  PyObject *arg5;
  PyObject *arg6;
  PyObject *arg7;
  PyObject *arg8;

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

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

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

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

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

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

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_CreateEndorsementKey(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  TSS_VALIDATION * x2;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_CreateMaintenanceArchive(PyObject *self, PyObject *args)
{
  uint32_t x0;
  int8_t x1;
  uint32_t * x2;
  uint8_t * * x3;
  uint32_t * x4;
  uint8_t * * x5;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;
  PyObject *arg5;

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

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

  x1 = _cffi_to_c_int(arg1, int8_t);
  if (x1 == (int8_t)-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((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(2), 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((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(4), arg3) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(2), arg4, (char **)&x4);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x4 = alloca((size_t)datasize);
    memset((void *)x4, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x4, _cffi_type(2), 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((size_t)datasize);
    memset((void *)x5, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x5, _cffi_type(4), arg5) < 0)
      return NULL;
  }

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_CreateRevocableEndorsementKey(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  TSS_VALIDATION * x2;
  uint32_t * x3;
  uint8_t * * x4;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

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

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

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

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(0), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(0), 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((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(2), arg3) < 0)
      return NULL;
  }

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_Delegate_AddFamily(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint8_t x1;
  uint32_t * x2;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

  x1 = _cffi_to_c_int(arg1, uint8_t);
  if (x1 == (uint8_t)-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((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(2), arg2) < 0)
      return NULL;
  }

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_Delegate_CacheOwnerDelegation(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  uint32_t x3;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

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

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_Delegate_CreateDelegation(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint8_t x1;
  uint32_t x2;
  uint32_t x3;
  uint32_t x4;
  uint32_t x5;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;
  PyObject *arg5;

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

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

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

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_Delegate_GetFamily(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t * x2;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_Delegate_InvalidateFamily(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_Delegate_ReadTables(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t * x1;
  TSS_FAMILY_TABLE_ENTRY * * x2;
  uint32_t * x3;
  TSS_DELEGATION_TABLE_ENTRY * * x4;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

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

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

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(2), arg1, (char **)&x1);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x1 = alloca((size_t)datasize);
    memset((void *)x1, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x1, _cffi_type(2), 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((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(9), 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((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(2), 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((size_t)datasize);
    memset((void *)x4, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x4, _cffi_type(10), arg4) < 0)
      return NULL;
  }

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_Delegate_UpdateVerificationCount(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_Delegate_VerifyDelegation(PyObject *self, PyObject *arg0)
{
  uint32_t x0;
  uint32_t result;

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_DirRead(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t * x2;
  uint8_t * * x3;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

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

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

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

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(2), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(2), 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((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(4), arg3) < 0)
      return NULL;
  }

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_DirWrite(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  uint8_t * x3;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

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

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_GetAuditDigest(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  int8_t x2;
  uint32_t * x3;
  uint8_t * * x4;
  TPM_COUNTER_VALUE * x5;
  TSS_VALIDATION * x6;
  uint32_t * x7;
  uint32_t * * x8;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;
  PyObject *arg5;
  PyObject *arg6;
  PyObject *arg7;
  PyObject *arg8;

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

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

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

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

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

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

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_GetCapability(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  uint8_t * x3;
  uint32_t * x4;
  uint8_t * * x5;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;
  PyObject *arg5;

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

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

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

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

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

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(2), arg4, (char **)&x4);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x4 = alloca((size_t)datasize);
    memset((void *)x4, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x4, _cffi_type(2), 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((size_t)datasize);
    memset((void *)x5, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x5, _cffi_type(4), arg5) < 0)
      return NULL;
  }

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_GetCapabilitySigned(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  uint32_t x3;
  uint8_t * x4;
  TSS_VALIDATION * x5;
  uint32_t * x6;
  uint8_t * * x7;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;
  PyObject *arg5;
  PyObject *arg6;
  PyObject *arg7;

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

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

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

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

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

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_GetEvent(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  TSS_PCR_EVENT * x3;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

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

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_GetEventLog(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t * x1;
  TSS_PCR_EVENT * * x2;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_GetEvents(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  uint32_t * x3;
  TSS_PCR_EVENT * * x4;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

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

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

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_GetPubEndorsementKey(PyObject *self, PyObject *args)
{
  uint32_t x0;
  int8_t x1;
  TSS_VALIDATION * x2;
  uint32_t * x3;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

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

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

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

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(0), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(0), 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((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(2), arg3) < 0)
      return NULL;
  }

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_GetRandom(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint8_t * * x2;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_GetStatus(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  int8_t * x2;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_GetTestResult(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t * x1;
  uint8_t * * x2;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_KeyControlOwner(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  int8_t x3;
  TSS_UUID * x4;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

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

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

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_KillMaintenanceFeature(PyObject *self, PyObject *arg0)
{
  uint32_t x0;
  uint32_t result;

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_LoadMaintenancePubKey(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  TSS_VALIDATION * x2;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_OwnerGetSRKPubKey(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t * x1;
  uint8_t * * x2;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_PcrExtend(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  uint8_t * x3;
  TSS_PCR_EVENT * x4;
  uint32_t * x5;
  uint8_t * * x6;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;
  PyObject *arg5;
  PyObject *arg6;

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

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

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

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

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

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

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(2), arg5, (char **)&x5);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x5 = alloca((size_t)datasize);
    memset((void *)x5, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x5, _cffi_type(2), 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((size_t)datasize);
    memset((void *)x6, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x6, _cffi_type(4), arg6) < 0)
      return NULL;
  }

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_PcrRead(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t * x2;
  uint8_t * * x3;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

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

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

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

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(2), arg2, (char **)&x2);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x2 = alloca((size_t)datasize);
    memset((void *)x2, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x2, _cffi_type(2), 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((size_t)datasize);
    memset((void *)x3, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x3, _cffi_type(4), arg3) < 0)
      return NULL;
  }

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_PcrReset(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_Quote(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  TSS_VALIDATION * x3;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

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

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_Quote2(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  int8_t x2;
  uint32_t x3;
  TSS_VALIDATION * x4;
  uint32_t * x5;
  uint8_t * * x6;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;
  PyObject *arg5;
  PyObject *arg6;

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

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

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

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

  x3 = _cffi_to_c_int(arg3, uint32_t);
  if (x3 == (uint32_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((size_t)datasize);
    memset((void *)x4, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x4, _cffi_type(0), arg4) < 0)
      return NULL;
  }

  datasize = _cffi_prepare_pointer_call_argument(
      _cffi_type(2), arg5, (char **)&x5);
  if (datasize != 0) {
    if (datasize < 0)
      return NULL;
    x5 = alloca((size_t)datasize);
    memset((void *)x5, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x5, _cffi_type(2), 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((size_t)datasize);
    memset((void *)x6, 0, (size_t)datasize);
    if (_cffi_convert_array_from_object((char *)x6, _cffi_type(4), arg6) < 0)
      return NULL;
  }

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_ReadCounter(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t * x1;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_ReadCurrentTicks(PyObject *self, PyObject *args)
{
  uint32_t x0;
  TPM_CURRENT_TICKS * x1;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_RevokeEndorsementKey(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint8_t * x2;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_SelfTestFull(PyObject *self, PyObject *arg0)
{
  uint32_t x0;
  uint32_t result;

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_SetOperatorAuth(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_SetStatus(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  int8_t x2;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_StirRandom(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint8_t * x2;
  Py_ssize_t datasize;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static PyObject *
_cffi_f_Tspi_TPM_TakeOwnership(PyObject *self, PyObject *args)
{
  uint32_t x0;
  uint32_t x1;
  uint32_t x2;
  uint32_t result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, uint32_t);
}

static int _cffi_const_FACILITY_TSS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(FACILITY_TSS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "FACILITY_TSS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return ((void)lib,0);
}

static int _cffi_const_FACILITY_TSS_CODEPOS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(FACILITY_TSS_CODEPOS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "FACILITY_TSS_CODEPOS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_FACILITY_TSS(lib);
}

static int _cffi_const_TPM_AF_LOCALITYMODIFIER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_AF_LOCALITYMODIFIER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_AF_LOCALITYMODIFIER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_FACILITY_TSS_CODEPOS(lib);
}

static int _cffi_const_TPM_AF_POSTINITIALIZE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_AF_POSTINITIALIZE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_AF_POSTINITIALIZE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_AF_LOCALITYMODIFIER(lib);
}

static int _cffi_const_TPM_AF_TOSPRESENT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_AF_TOSPRESENT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_AF_TOSPRESENT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_AF_POSTINITIALIZE(lib);
}

static int _cffi_const_TPM_AF_TRANSPORTEXCLUSIVE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_AF_TRANSPORTEXCLUSIVE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_AF_TRANSPORTEXCLUSIVE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_AF_TOSPRESENT(lib);
}

static int _cffi_const_TPM_ALG_3DES(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_ALG_3DES);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_ALG_3DES", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_AF_TRANSPORTEXCLUSIVE(lib);
}

static int _cffi_const_TPM_ALG_AES(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_ALG_AES);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_ALG_AES", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_ALG_3DES(lib);
}

static int _cffi_const_TPM_ALG_AES128(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_ALG_AES128);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_ALG_AES128", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_ALG_AES(lib);
}

static int _cffi_const_TPM_ALG_AES192(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_ALG_AES192);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_ALG_AES192", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_ALG_AES128(lib);
}

static int _cffi_const_TPM_ALG_AES256(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_ALG_AES256);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_ALG_AES256", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_ALG_AES192(lib);
}

static int _cffi_const_TPM_ALG_DES(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_ALG_DES);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_ALG_DES", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_ALG_AES256(lib);
}

static int _cffi_const_TPM_ALG_HMAC(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_ALG_HMAC);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_ALG_HMAC", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_ALG_DES(lib);
}

static int _cffi_const_TPM_ALG_MGF1(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_ALG_MGF1);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_ALG_MGF1", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_ALG_HMAC(lib);
}

static int _cffi_const_TPM_ALG_RSA(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_ALG_RSA);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_ALG_RSA", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_ALG_MGF1(lib);
}

static int _cffi_const_TPM_ALG_SHA(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_ALG_SHA);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_ALG_SHA", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_ALG_RSA(lib);
}

static int _cffi_const_TPM_ALG_XOR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_ALG_XOR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_ALG_XOR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_ALG_SHA(lib);
}

static int _cffi_const_TPM_AUTH_ALWAYS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_AUTH_ALWAYS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_AUTH_ALWAYS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_ALG_XOR(lib);
}

static int _cffi_const_TPM_AUTH_NEVER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_AUTH_NEVER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_AUTH_NEVER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_AUTH_ALWAYS(lib);
}

static int _cffi_const_TPM_AUTH_PRIV_USE_ONLY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_AUTH_PRIV_USE_ONLY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_AUTH_PRIV_USE_ONLY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_AUTH_NEVER(lib);
}

static int _cffi_const_TPM_CAP_ALG(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_ALG);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_ALG", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_AUTH_PRIV_USE_ONLY(lib);
}

static int _cffi_const_TPM_CAP_AUTH_ENCRYPT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_AUTH_ENCRYPT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_AUTH_ENCRYPT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_ALG(lib);
}

static int _cffi_const_TPM_CAP_CHECK_LOADED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_CHECK_LOADED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_CHECK_LOADED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_AUTH_ENCRYPT(lib);
}

static int _cffi_const_TPM_CAP_DA_LOGIC(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_DA_LOGIC);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_DA_LOGIC", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_CHECK_LOADED(lib);
}

static int _cffi_const_TPM_CAP_FLAG(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_FLAG);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_FLAG", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_DA_LOGIC(lib);
}

static int _cffi_const_TPM_CAP_FLAG_PERMANENT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_FLAG_PERMANENT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_FLAG_PERMANENT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_FLAG(lib);
}

static int _cffi_const_TPM_CAP_FLAG_VOLATILE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_FLAG_VOLATILE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_FLAG_VOLATILE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_FLAG_PERMANENT(lib);
}

static int _cffi_const_TPM_CAP_HANDLE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_HANDLE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_HANDLE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_FLAG_VOLATILE(lib);
}

static int _cffi_const_TPM_CAP_KEY_HANDLE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_KEY_HANDLE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_KEY_HANDLE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_HANDLE(lib);
}

static int _cffi_const_TPM_CAP_KEY_STATUS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_KEY_STATUS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_KEY_STATUS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_KEY_HANDLE(lib);
}

static int _cffi_const_TPM_CAP_MFR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_MFR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_MFR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_KEY_STATUS(lib);
}

static int _cffi_const_TPM_CAP_NV_INDEX(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_NV_INDEX);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_NV_INDEX", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_MFR(lib);
}

static int _cffi_const_TPM_CAP_NV_LIST(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_NV_LIST);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_NV_LIST", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_NV_INDEX(lib);
}

static int _cffi_const_TPM_CAP_ORD(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_ORD);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_ORD", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_NV_LIST(lib);
}

static int _cffi_const_TPM_CAP_PID(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PID);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PID", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_ORD(lib);
}

static int _cffi_const_TPM_CAP_PROPERTY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PROPERTY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PROPERTY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PID(lib);
}

static int _cffi_const_TPM_CAP_PROP_ACTIVE_COUNTER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PROP_ACTIVE_COUNTER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PROP_ACTIVE_COUNTER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PROPERTY(lib);
}

static int _cffi_const_TPM_CAP_PROP_AUTHSESS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PROP_AUTHSESS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PROP_AUTHSESS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PROP_ACTIVE_COUNTER(lib);
}

static int _cffi_const_TPM_CAP_PROP_CMK_RESTRICTION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PROP_CMK_RESTRICTION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PROP_CMK_RESTRICTION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PROP_AUTHSESS(lib);
}

static int _cffi_const_TPM_CAP_PROP_CONTEXT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PROP_CONTEXT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PROP_CONTEXT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PROP_CMK_RESTRICTION(lib);
}

static int _cffi_const_TPM_CAP_PROP_CONTEXT_DIST(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PROP_CONTEXT_DIST);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PROP_CONTEXT_DIST", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PROP_CONTEXT(lib);
}

static int _cffi_const_TPM_CAP_PROP_COUNTERS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PROP_COUNTERS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PROP_COUNTERS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PROP_CONTEXT_DIST(lib);
}

static int _cffi_const_TPM_CAP_PROP_DAASESS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PROP_DAASESS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PROP_DAASESS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PROP_COUNTERS(lib);
}

static int _cffi_const_TPM_CAP_PROP_DAA_INTERRUPT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PROP_DAA_INTERRUPT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PROP_DAA_INTERRUPT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PROP_DAASESS(lib);
}

static int _cffi_const_TPM_CAP_PROP_DAA_MAX(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PROP_DAA_MAX);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PROP_DAA_MAX", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PROP_DAA_INTERRUPT(lib);
}

static int _cffi_const_TPM_CAP_PROP_DELEGATE_ROW(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PROP_DELEGATE_ROW);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PROP_DELEGATE_ROW", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PROP_DAA_MAX(lib);
}

static int _cffi_const_TPM_CAP_PROP_DIR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PROP_DIR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PROP_DIR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PROP_DELEGATE_ROW(lib);
}

static int _cffi_const_TPM_CAP_PROP_DURATION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PROP_DURATION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PROP_DURATION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PROP_DIR(lib);
}

static int _cffi_const_TPM_CAP_PROP_FAMILYROWS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PROP_FAMILYROWS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PROP_FAMILYROWS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PROP_DURATION(lib);
}

static int _cffi_const_TPM_CAP_PROP_INPUT_BUFFER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PROP_INPUT_BUFFER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PROP_INPUT_BUFFER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PROP_FAMILYROWS(lib);
}

static int _cffi_const_TPM_CAP_PROP_KEYS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PROP_KEYS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PROP_KEYS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PROP_INPUT_BUFFER(lib);
}

static int _cffi_const_TPM_CAP_PROP_MANUFACTURER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PROP_MANUFACTURER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PROP_MANUFACTURER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PROP_KEYS(lib);
}

static int _cffi_const_TPM_CAP_PROP_MAX_AUTHSESS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PROP_MAX_AUTHSESS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PROP_MAX_AUTHSESS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PROP_MANUFACTURER(lib);
}

static int _cffi_const_TPM_CAP_PROP_MAX_CONTEXT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PROP_MAX_CONTEXT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PROP_MAX_CONTEXT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PROP_MAX_AUTHSESS(lib);
}

static int _cffi_const_TPM_CAP_PROP_MAX_COUNTERS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PROP_MAX_COUNTERS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PROP_MAX_COUNTERS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PROP_MAX_CONTEXT(lib);
}

static int _cffi_const_TPM_CAP_PROP_MAX_DAASESS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PROP_MAX_DAASESS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PROP_MAX_DAASESS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PROP_MAX_COUNTERS(lib);
}

static int _cffi_const_TPM_CAP_PROP_MAX_KEYS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PROP_MAX_KEYS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PROP_MAX_KEYS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PROP_MAX_DAASESS(lib);
}

static int _cffi_const_TPM_CAP_PROP_MAX_SESSIONS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PROP_MAX_SESSIONS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PROP_MAX_SESSIONS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PROP_MAX_KEYS(lib);
}

static int _cffi_const_TPM_CAP_PROP_MAX_TRANSSESS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PROP_MAX_TRANSSESS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PROP_MAX_TRANSSESS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PROP_MAX_SESSIONS(lib);
}

static int _cffi_const_TPM_CAP_PROP_MIN_COUNTER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PROP_MIN_COUNTER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PROP_MIN_COUNTER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PROP_MAX_TRANSSESS(lib);
}

static int _cffi_const_TPM_CAP_PROP_NV_AVAILABLE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PROP_NV_AVAILABLE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PROP_NV_AVAILABLE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PROP_MIN_COUNTER(lib);
}

static int _cffi_const_TPM_CAP_PROP_OWNER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PROP_OWNER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PROP_OWNER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PROP_NV_AVAILABLE(lib);
}

static int _cffi_const_TPM_CAP_PROP_PCR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PROP_PCR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PROP_PCR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PROP_OWNER(lib);
}

static int _cffi_const_TPM_CAP_PROP_SESSIONS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PROP_SESSIONS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PROP_SESSIONS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PROP_PCR(lib);
}

static int _cffi_const_TPM_CAP_PROP_SESSION_DAA(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PROP_SESSION_DAA);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PROP_SESSION_DAA", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PROP_SESSIONS(lib);
}

static int _cffi_const_TPM_CAP_PROP_SLOTS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PROP_SLOTS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PROP_SLOTS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PROP_SESSION_DAA(lib);
}

static int _cffi_const_TPM_CAP_PROP_STARTUP_EFFECT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PROP_STARTUP_EFFECT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PROP_STARTUP_EFFECT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PROP_SLOTS(lib);
}

static int _cffi_const_TPM_CAP_PROP_TIS_TIMEOUT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PROP_TIS_TIMEOUT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PROP_TIS_TIMEOUT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PROP_STARTUP_EFFECT(lib);
}

static int _cffi_const_TPM_CAP_PROP_TPM_CLEAR_ORDINAL_AUDIT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PROP_TPM_CLEAR_ORDINAL_AUDIT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PROP_TPM_CLEAR_ORDINAL_AUDIT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PROP_TIS_TIMEOUT(lib);
}

static int _cffi_const_TPM_CAP_PROP_TPM_SET_ORDINAL_AUDIT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PROP_TPM_SET_ORDINAL_AUDIT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PROP_TPM_SET_ORDINAL_AUDIT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PROP_TPM_CLEAR_ORDINAL_AUDIT(lib);
}

static int _cffi_const_TPM_CAP_PROP_TRANSSESS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_PROP_TRANSSESS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_PROP_TRANSSESS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PROP_TPM_SET_ORDINAL_AUDIT(lib);
}

static int _cffi_const_TPM_CAP_SELECT_SIZE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_SELECT_SIZE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_SELECT_SIZE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_PROP_TRANSSESS(lib);
}

static int _cffi_const_TPM_CAP_SYM_MODE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_SYM_MODE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_SYM_MODE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_SELECT_SIZE(lib);
}

static int _cffi_const_TPM_CAP_TRANS_ALG(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_TRANS_ALG);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_TRANS_ALG", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_SYM_MODE(lib);
}

static int _cffi_const_TPM_CAP_TRANS_ES(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_TRANS_ES);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_TRANS_ES", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_TRANS_ALG(lib);
}

static int _cffi_const_TPM_CAP_VERSION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_VERSION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_VERSION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_TRANS_ES(lib);
}

static int _cffi_const_TPM_CAP_VERSION_VAL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CAP_VERSION_VAL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CAP_VERSION_VAL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_VERSION(lib);
}

static int _cffi_const_TPM_CMK_DELEGATE_BIND(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CMK_DELEGATE_BIND);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CMK_DELEGATE_BIND", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CAP_VERSION_VAL(lib);
}

static int _cffi_const_TPM_CMK_DELEGATE_LEGACY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CMK_DELEGATE_LEGACY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CMK_DELEGATE_LEGACY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CMK_DELEGATE_BIND(lib);
}

static int _cffi_const_TPM_CMK_DELEGATE_MIGRATE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CMK_DELEGATE_MIGRATE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CMK_DELEGATE_MIGRATE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CMK_DELEGATE_LEGACY(lib);
}

static int _cffi_const_TPM_CMK_DELEGATE_SIGNING(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CMK_DELEGATE_SIGNING);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CMK_DELEGATE_SIGNING", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CMK_DELEGATE_MIGRATE(lib);
}

static int _cffi_const_TPM_CMK_DELEGATE_STORAGE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_CMK_DELEGATE_STORAGE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_CMK_DELEGATE_STORAGE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CMK_DELEGATE_SIGNING(lib);
}

static int _cffi_const_TPM_DAA_SIZE_NE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DAA_SIZE_NE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DAA_SIZE_NE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_CMK_DELEGATE_STORAGE(lib);
}

static int _cffi_const_TPM_DAA_SIZE_NT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DAA_SIZE_NT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DAA_SIZE_NT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DAA_SIZE_NE(lib);
}

static int _cffi_const_TPM_DAA_SIZE_issuerModulus(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DAA_SIZE_issuerModulus);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DAA_SIZE_issuerModulus", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DAA_SIZE_NT(lib);
}

static int _cffi_const_TPM_DAA_SIZE_r0(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DAA_SIZE_r0);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DAA_SIZE_r0", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DAA_SIZE_issuerModulus(lib);
}

static int _cffi_const_TPM_DAA_SIZE_r1(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DAA_SIZE_r1);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DAA_SIZE_r1", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DAA_SIZE_r0(lib);
}

static int _cffi_const_TPM_DAA_SIZE_r2(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DAA_SIZE_r2);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DAA_SIZE_r2", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DAA_SIZE_r1(lib);
}

static int _cffi_const_TPM_DAA_SIZE_r3(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DAA_SIZE_r3);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DAA_SIZE_r3", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DAA_SIZE_r2(lib);
}

static int _cffi_const_TPM_DAA_SIZE_r4(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DAA_SIZE_r4);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DAA_SIZE_r4", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DAA_SIZE_r3(lib);
}

static int _cffi_const_TPM_DAA_SIZE_v0(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DAA_SIZE_v0);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DAA_SIZE_v0", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DAA_SIZE_r4(lib);
}

static int _cffi_const_TPM_DAA_SIZE_v1(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DAA_SIZE_v1);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DAA_SIZE_v1", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DAA_SIZE_v0(lib);
}

static int _cffi_const_TPM_DAA_SIZE_w(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DAA_SIZE_w);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DAA_SIZE_w", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DAA_SIZE_v1(lib);
}

static int _cffi_const_TPM_DAA_power0(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DAA_power0);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DAA_power0", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DAA_SIZE_w(lib);
}

static int _cffi_const_TPM_DAA_power1(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DAA_power1);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DAA_power1", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DAA_power0(lib);
}

static int _cffi_const_TPM_DA_ACTION_DEACTIVATE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DA_ACTION_DEACTIVATE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DA_ACTION_DEACTIVATE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DAA_power1(lib);
}

static int _cffi_const_TPM_DA_ACTION_DISABLE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DA_ACTION_DISABLE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DA_ACTION_DISABLE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DA_ACTION_DEACTIVATE(lib);
}

static int _cffi_const_TPM_DA_ACTION_FAILURE_MODE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DA_ACTION_FAILURE_MODE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DA_ACTION_FAILURE_MODE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DA_ACTION_DISABLE(lib);
}

static int _cffi_const_TPM_DA_ACTION_TIMEOUT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DA_ACTION_TIMEOUT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DA_ACTION_TIMEOUT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DA_ACTION_FAILURE_MODE(lib);
}

static int _cffi_const_TPM_DA_STATE_ACTIVE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DA_STATE_ACTIVE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DA_STATE_ACTIVE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DA_ACTION_TIMEOUT(lib);
}

static int _cffi_const_TPM_DA_STATE_INACTIVE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DA_STATE_INACTIVE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DA_STATE_INACTIVE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DA_STATE_ACTIVE(lib);
}

static int _cffi_const_TPM_DELEGATE_ActivateIdentity(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DELEGATE_ActivateIdentity);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DELEGATE_ActivateIdentity", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DA_STATE_INACTIVE(lib);
}

static int _cffi_const_TPM_DELEGATE_AuthorizeMigrationKey(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DELEGATE_AuthorizeMigrationKey);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DELEGATE_AuthorizeMigrationKey", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DELEGATE_ActivateIdentity(lib);
}

static int _cffi_const_TPM_DELEGATE_CMK_ApproveMA(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DELEGATE_CMK_ApproveMA);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DELEGATE_CMK_ApproveMA", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DELEGATE_AuthorizeMigrationKey(lib);
}

static int _cffi_const_TPM_DELEGATE_CMK_CreateTicket(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DELEGATE_CMK_CreateTicket);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DELEGATE_CMK_CreateTicket", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DELEGATE_CMK_ApproveMA(lib);
}

static int _cffi_const_TPM_DELEGATE_CreateCounter(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DELEGATE_CreateCounter);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DELEGATE_CreateCounter", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DELEGATE_CMK_CreateTicket(lib);
}

static int _cffi_const_TPM_DELEGATE_CreateMaintenanceArchive(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DELEGATE_CreateMaintenanceArchive);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DELEGATE_CreateMaintenanceArchive", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DELEGATE_CreateCounter(lib);
}

static int _cffi_const_TPM_DELEGATE_DAA_Join(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DELEGATE_DAA_Join);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DELEGATE_DAA_Join", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DELEGATE_CreateMaintenanceArchive(lib);
}

static int _cffi_const_TPM_DELEGATE_DAA_Sign(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DELEGATE_DAA_Sign);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DELEGATE_DAA_Sign", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DELEGATE_DAA_Join(lib);
}

static int _cffi_const_TPM_DELEGATE_DelegateManage(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DELEGATE_DelegateManage);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DELEGATE_DelegateManage", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DELEGATE_DAA_Sign(lib);
}

static int _cffi_const_TPM_DELEGATE_Delegate_CreateOwnerDelegation(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DELEGATE_Delegate_CreateOwnerDelegation);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DELEGATE_Delegate_CreateOwnerDelegation", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DELEGATE_DelegateManage(lib);
}

static int _cffi_const_TPM_DELEGATE_Delegate_LoadOwnerDelegation(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DELEGATE_Delegate_LoadOwnerDelegation);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DELEGATE_Delegate_LoadOwnerDelegation", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DELEGATE_Delegate_CreateOwnerDelegation(lib);
}

static int _cffi_const_TPM_DELEGATE_Delegate_UpdateVerification(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DELEGATE_Delegate_UpdateVerification);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DELEGATE_Delegate_UpdateVerification", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DELEGATE_Delegate_LoadOwnerDelegation(lib);
}

static int _cffi_const_TPM_DELEGATE_DirWriteAuth(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DELEGATE_DirWriteAuth);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DELEGATE_DirWriteAuth", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DELEGATE_Delegate_UpdateVerification(lib);
}

static int _cffi_const_TPM_DELEGATE_DisableOwnerClear(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DELEGATE_DisableOwnerClear);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DELEGATE_DisableOwnerClear", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DELEGATE_DirWriteAuth(lib);
}

static int _cffi_const_TPM_DELEGATE_DisablePubekRead(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DELEGATE_DisablePubekRead);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DELEGATE_DisablePubekRead", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DELEGATE_DisableOwnerClear(lib);
}

static int _cffi_const_TPM_DELEGATE_FieldUpgrade(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DELEGATE_FieldUpgrade);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DELEGATE_FieldUpgrade", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DELEGATE_DisablePubekRead(lib);
}

static int _cffi_const_TPM_DELEGATE_KillMaintenanceFeature(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DELEGATE_KillMaintenanceFeature);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DELEGATE_KillMaintenanceFeature", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DELEGATE_FieldUpgrade(lib);
}

static int _cffi_const_TPM_DELEGATE_LoadMaintenanceArchive(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DELEGATE_LoadMaintenanceArchive);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DELEGATE_LoadMaintenanceArchive", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DELEGATE_KillMaintenanceFeature(lib);
}

static int _cffi_const_TPM_DELEGATE_MakeIdentity(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DELEGATE_MakeIdentity);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DELEGATE_MakeIdentity", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DELEGATE_LoadMaintenanceArchive(lib);
}

static int _cffi_const_TPM_DELEGATE_NV_DefineSpace(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DELEGATE_NV_DefineSpace);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DELEGATE_NV_DefineSpace", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DELEGATE_MakeIdentity(lib);
}

static int _cffi_const_TPM_DELEGATE_NV_ReadValue(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DELEGATE_NV_ReadValue);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DELEGATE_NV_ReadValue", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DELEGATE_NV_DefineSpace(lib);
}

static int _cffi_const_TPM_DELEGATE_NV_WriteValue(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DELEGATE_NV_WriteValue);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DELEGATE_NV_WriteValue", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DELEGATE_NV_ReadValue(lib);
}

static int _cffi_const_TPM_DELEGATE_OwnerClear(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DELEGATE_OwnerClear);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DELEGATE_OwnerClear", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DELEGATE_NV_WriteValue(lib);
}

static int _cffi_const_TPM_DELEGATE_OwnerReadInternalPub(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DELEGATE_OwnerReadInternalPub);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DELEGATE_OwnerReadInternalPub", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DELEGATE_OwnerClear(lib);
}

static int _cffi_const_TPM_DELEGATE_OwnerReadPubek(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DELEGATE_OwnerReadPubek);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DELEGATE_OwnerReadPubek", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DELEGATE_OwnerReadInternalPub(lib);
}

static int _cffi_const_TPM_DELEGATE_OwnerSetDisable(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DELEGATE_OwnerSetDisable);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DELEGATE_OwnerSetDisable", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DELEGATE_OwnerReadPubek(lib);
}

static int _cffi_const_TPM_DELEGATE_ReleaseCounterOwner(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DELEGATE_ReleaseCounterOwner);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DELEGATE_ReleaseCounterOwner", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DELEGATE_OwnerSetDisable(lib);
}

static int _cffi_const_TPM_DELEGATE_ResetLockValue(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DELEGATE_ResetLockValue);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DELEGATE_ResetLockValue", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DELEGATE_ReleaseCounterOwner(lib);
}

static int _cffi_const_TPM_DELEGATE_SetCapability(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DELEGATE_SetCapability);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DELEGATE_SetCapability", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DELEGATE_ResetLockValue(lib);
}

static int _cffi_const_TPM_DELEGATE_SetOrdinalAuditStatus(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DELEGATE_SetOrdinalAuditStatus);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DELEGATE_SetOrdinalAuditStatus", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DELEGATE_SetCapability(lib);
}

static int _cffi_const_TPM_DELEGATE_SetRedirection(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DELEGATE_SetRedirection);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DELEGATE_SetRedirection", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DELEGATE_SetOrdinalAuditStatus(lib);
}

static int _cffi_const_TPM_DEL_KEY_BITS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DEL_KEY_BITS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DEL_KEY_BITS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DELEGATE_SetRedirection(lib);
}

static int _cffi_const_TPM_DEL_OWNER_BITS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_DEL_OWNER_BITS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_DEL_OWNER_BITS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DEL_KEY_BITS(lib);
}

static int _cffi_const_TPM_EK_TYPE_ACTIVATE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_EK_TYPE_ACTIVATE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_EK_TYPE_ACTIVATE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_DEL_OWNER_BITS(lib);
}

static int _cffi_const_TPM_EK_TYPE_AUTH(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_EK_TYPE_AUTH);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_EK_TYPE_AUTH", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_EK_TYPE_ACTIVATE(lib);
}

static int _cffi_const_TPM_ES_NONE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_ES_NONE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_ES_NONE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_EK_TYPE_AUTH(lib);
}

static int _cffi_const_TPM_ES_RSAESOAEP_SHA1_MGF1(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_ES_RSAESOAEP_SHA1_MGF1);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_ES_RSAESOAEP_SHA1_MGF1", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_ES_NONE(lib);
}

static int _cffi_const_TPM_ES_RSAESPKCSv15(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_ES_RSAESPKCSv15);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_ES_RSAESPKCSv15", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_ES_RSAESOAEP_SHA1_MGF1(lib);
}

static int _cffi_const_TPM_ES_SYM_CBC_PKCS5PAD(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_ES_SYM_CBC_PKCS5PAD);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_ES_SYM_CBC_PKCS5PAD", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_ES_RSAESPKCSv15(lib);
}

static int _cffi_const_TPM_ES_SYM_CNT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_ES_SYM_CNT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_ES_SYM_CNT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_ES_SYM_CBC_PKCS5PAD(lib);
}

static int _cffi_const_TPM_ES_SYM_CTR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_ES_SYM_CTR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_ES_SYM_CTR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_ES_SYM_CNT(lib);
}

static int _cffi_const_TPM_ES_SYM_OFB(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_ES_SYM_OFB);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_ES_SYM_OFB", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_ES_SYM_CTR(lib);
}

static int _cffi_const_TPM_ET_AES(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_ET_AES);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_ET_AES", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_ES_SYM_OFB(lib);
}

static int _cffi_const_TPM_ET_COUNTER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_ET_COUNTER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_ET_COUNTER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_ET_AES(lib);
}

static int _cffi_const_TPM_ET_DATA(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_ET_DATA);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_ET_DATA", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_ET_COUNTER(lib);
}

static int _cffi_const_TPM_ET_DEL_KEY_BLOB(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_ET_DEL_KEY_BLOB);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_ET_DEL_KEY_BLOB", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_ET_DATA(lib);
}

static int _cffi_const_TPM_ET_DEL_OWNER_BLOB(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_ET_DEL_OWNER_BLOB);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_ET_DEL_OWNER_BLOB", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_ET_DEL_KEY_BLOB(lib);
}

static int _cffi_const_TPM_ET_DEL_ROW(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_ET_DEL_ROW);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_ET_DEL_ROW", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_ET_DEL_OWNER_BLOB(lib);
}

static int _cffi_const_TPM_ET_KEY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_ET_KEY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_ET_KEY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_ET_DEL_ROW(lib);
}

static int _cffi_const_TPM_ET_KEYHANDLE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_ET_KEYHANDLE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_ET_KEYHANDLE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_ET_KEY(lib);
}

static int _cffi_const_TPM_ET_NV(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_ET_NV);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_ET_NV", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_ET_KEYHANDLE(lib);
}

static int _cffi_const_TPM_ET_OPERATOR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_ET_OPERATOR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_ET_OPERATOR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_ET_NV(lib);
}

static int _cffi_const_TPM_ET_OWNER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_ET_OWNER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_ET_OWNER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_ET_OPERATOR(lib);
}

static int _cffi_const_TPM_ET_RESERVED_HANDLE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_ET_RESERVED_HANDLE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_ET_RESERVED_HANDLE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_ET_OWNER(lib);
}

static int _cffi_const_TPM_ET_REVOKE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_ET_REVOKE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_ET_REVOKE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_ET_RESERVED_HANDLE(lib);
}

static int _cffi_const_TPM_ET_SRK(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_ET_SRK);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_ET_SRK", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_ET_REVOKE(lib);
}

static int _cffi_const_TPM_ET_XOR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_ET_XOR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_ET_XOR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_ET_SRK(lib);
}

static int _cffi_const_TPM_E_AREA_LOCKED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_AREA_LOCKED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_AREA_LOCKED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_ET_XOR(lib);
}

static int _cffi_const_TPM_E_AUDITFAILURE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_AUDITFAILURE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_AUDITFAILURE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_AREA_LOCKED(lib);
}

static int _cffi_const_TPM_E_AUDITFAIL_SUCCESSFUL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_AUDITFAIL_SUCCESSFUL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_AUDITFAIL_SUCCESSFUL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_AUDITFAILURE(lib);
}

static int _cffi_const_TPM_E_AUDITFAIL_UNSUCCESSFUL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_AUDITFAIL_UNSUCCESSFUL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_AUDITFAIL_UNSUCCESSFUL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_AUDITFAIL_SUCCESSFUL(lib);
}

static int _cffi_const_TPM_E_AUTH2FAIL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_AUTH2FAIL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_AUTH2FAIL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_AUDITFAIL_UNSUCCESSFUL(lib);
}

static int _cffi_const_TPM_E_AUTHFAIL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_AUTHFAIL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_AUTHFAIL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_AUTH2FAIL(lib);
}

static int _cffi_const_TPM_E_AUTH_CONFLICT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_AUTH_CONFLICT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_AUTH_CONFLICT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_AUTHFAIL(lib);
}

static int _cffi_const_TPM_E_BADCONTEXT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_BADCONTEXT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_BADCONTEXT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_AUTH_CONFLICT(lib);
}

static int _cffi_const_TPM_E_BADINDEX(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_BADINDEX);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_BADINDEX", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_BADCONTEXT(lib);
}

static int _cffi_const_TPM_E_BADTAG(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_BADTAG);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_BADTAG", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_BADINDEX(lib);
}

static int _cffi_const_TPM_E_BAD_ATTRIBUTES(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_BAD_ATTRIBUTES);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_BAD_ATTRIBUTES", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_BADTAG(lib);
}

static int _cffi_const_TPM_E_BAD_COUNTER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_BAD_COUNTER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_BAD_COUNTER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_BAD_ATTRIBUTES(lib);
}

static int _cffi_const_TPM_E_BAD_DATASIZE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_BAD_DATASIZE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_BAD_DATASIZE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_BAD_COUNTER(lib);
}

static int _cffi_const_TPM_E_BAD_DELEGATE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_BAD_DELEGATE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_BAD_DELEGATE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_BAD_DATASIZE(lib);
}

static int _cffi_const_TPM_E_BAD_HANDLE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_BAD_HANDLE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_BAD_HANDLE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_BAD_DELEGATE(lib);
}

static int _cffi_const_TPM_E_BAD_KEY_PROPERTY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_BAD_KEY_PROPERTY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_BAD_KEY_PROPERTY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_BAD_HANDLE(lib);
}

static int _cffi_const_TPM_E_BAD_LOCALITY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_BAD_LOCALITY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_BAD_LOCALITY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_BAD_KEY_PROPERTY(lib);
}

static int _cffi_const_TPM_E_BAD_MIGRATION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_BAD_MIGRATION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_BAD_MIGRATION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_BAD_LOCALITY(lib);
}

static int _cffi_const_TPM_E_BAD_MODE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_BAD_MODE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_BAD_MODE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_BAD_MIGRATION(lib);
}

static int _cffi_const_TPM_E_BAD_ORDINAL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_BAD_ORDINAL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_BAD_ORDINAL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_BAD_MODE(lib);
}

static int _cffi_const_TPM_E_BAD_PARAMETER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_BAD_PARAMETER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_BAD_PARAMETER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_BAD_ORDINAL(lib);
}

static int _cffi_const_TPM_E_BAD_PARAM_SIZE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_BAD_PARAM_SIZE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_BAD_PARAM_SIZE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_BAD_PARAMETER(lib);
}

static int _cffi_const_TPM_E_BAD_PRESENCE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_BAD_PRESENCE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_BAD_PRESENCE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_BAD_PARAM_SIZE(lib);
}

static int _cffi_const_TPM_E_BAD_SCHEME(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_BAD_SCHEME);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_BAD_SCHEME", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_BAD_PRESENCE(lib);
}

static int _cffi_const_TPM_E_BAD_SIGNATURE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_BAD_SIGNATURE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_BAD_SIGNATURE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_BAD_SCHEME(lib);
}

static int _cffi_const_TPM_E_BAD_TYPE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_BAD_TYPE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_BAD_TYPE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_BAD_SIGNATURE(lib);
}

static int _cffi_const_TPM_E_BAD_VERSION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_BAD_VERSION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_BAD_VERSION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_BAD_TYPE(lib);
}

static int _cffi_const_TPM_E_BASE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_BASE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_BASE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_BAD_VERSION(lib);
}

static int _cffi_const_TPM_E_CLEAR_DISABLED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_CLEAR_DISABLED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_CLEAR_DISABLED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_BASE(lib);
}

static int _cffi_const_TPM_E_CONTEXT_GAP(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_CONTEXT_GAP);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_CONTEXT_GAP", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_CLEAR_DISABLED(lib);
}

static int _cffi_const_TPM_E_DAA_INPUT_DATA0(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_DAA_INPUT_DATA0);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_DAA_INPUT_DATA0", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_CONTEXT_GAP(lib);
}

static int _cffi_const_TPM_E_DAA_INPUT_DATA1(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_DAA_INPUT_DATA1);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_DAA_INPUT_DATA1", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_DAA_INPUT_DATA0(lib);
}

static int _cffi_const_TPM_E_DAA_ISSUER_SETTINGS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_DAA_ISSUER_SETTINGS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_DAA_ISSUER_SETTINGS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_DAA_INPUT_DATA1(lib);
}

static int _cffi_const_TPM_E_DAA_ISSUER_VALIDITY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_DAA_ISSUER_VALIDITY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_DAA_ISSUER_VALIDITY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_DAA_ISSUER_SETTINGS(lib);
}

static int _cffi_const_TPM_E_DAA_RESOURCES(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_DAA_RESOURCES);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_DAA_RESOURCES", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_DAA_ISSUER_VALIDITY(lib);
}

static int _cffi_const_TPM_E_DAA_STAGE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_DAA_STAGE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_DAA_STAGE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_DAA_RESOURCES(lib);
}

static int _cffi_const_TPM_E_DAA_TPM_SETTINGS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_DAA_TPM_SETTINGS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_DAA_TPM_SETTINGS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_DAA_STAGE(lib);
}

static int _cffi_const_TPM_E_DAA_WRONG_W(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_DAA_WRONG_W);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_DAA_WRONG_W", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_DAA_TPM_SETTINGS(lib);
}

static int _cffi_const_TPM_E_DEACTIVATED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_DEACTIVATED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_DEACTIVATED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_DAA_WRONG_W(lib);
}

static int _cffi_const_TPM_E_DECRYPT_ERROR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_DECRYPT_ERROR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_DECRYPT_ERROR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_DEACTIVATED(lib);
}

static int _cffi_const_TPM_E_DEFEND_LOCK_RUNNING(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_DEFEND_LOCK_RUNNING);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_DEFEND_LOCK_RUNNING", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_DECRYPT_ERROR(lib);
}

static int _cffi_const_TPM_E_DELEGATE_ADMIN(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_DELEGATE_ADMIN);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_DELEGATE_ADMIN", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_DEFEND_LOCK_RUNNING(lib);
}

static int _cffi_const_TPM_E_DELEGATE_FAMILY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_DELEGATE_FAMILY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_DELEGATE_FAMILY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_DELEGATE_ADMIN(lib);
}

static int _cffi_const_TPM_E_DELEGATE_LOCK(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_DELEGATE_LOCK);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_DELEGATE_LOCK", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_DELEGATE_FAMILY(lib);
}

static int _cffi_const_TPM_E_DISABLED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_DISABLED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_DISABLED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_DELEGATE_LOCK(lib);
}

static int _cffi_const_TPM_E_DISABLED_CMD(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_DISABLED_CMD);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_DISABLED_CMD", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_DISABLED(lib);
}

static int _cffi_const_TPM_E_DOING_SELFTEST(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_DOING_SELFTEST);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_DOING_SELFTEST", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_DISABLED_CMD(lib);
}

static int _cffi_const_TPM_E_ENCRYPT_ERROR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_ENCRYPT_ERROR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_ENCRYPT_ERROR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_DOING_SELFTEST(lib);
}

static int _cffi_const_TPM_E_FAIL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_FAIL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_FAIL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_ENCRYPT_ERROR(lib);
}

static int _cffi_const_TPM_E_FAILEDSELFTEST(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_FAILEDSELFTEST);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_FAILEDSELFTEST", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_FAIL(lib);
}

static int _cffi_const_TPM_E_FAMILYCOUNT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_FAMILYCOUNT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_FAMILYCOUNT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_FAILEDSELFTEST(lib);
}

static int _cffi_const_TPM_E_INAPPROPRIATE_ENC(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_INAPPROPRIATE_ENC);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_INAPPROPRIATE_ENC", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_FAMILYCOUNT(lib);
}

static int _cffi_const_TPM_E_INAPPROPRIATE_SIG(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_INAPPROPRIATE_SIG);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_INAPPROPRIATE_SIG", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_INAPPROPRIATE_ENC(lib);
}

static int _cffi_const_TPM_E_INSTALL_DISABLED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_INSTALL_DISABLED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_INSTALL_DISABLED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_INAPPROPRIATE_SIG(lib);
}

static int _cffi_const_TPM_E_INVALID_AUTHHANDLE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_INVALID_AUTHHANDLE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_INVALID_AUTHHANDLE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_INSTALL_DISABLED(lib);
}

static int _cffi_const_TPM_E_INVALID_FAMILY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_INVALID_FAMILY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_INVALID_FAMILY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_INVALID_AUTHHANDLE(lib);
}

static int _cffi_const_TPM_E_INVALID_KEYHANDLE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_INVALID_KEYHANDLE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_INVALID_KEYHANDLE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_INVALID_FAMILY(lib);
}

static int _cffi_const_TPM_E_INVALID_KEYUSAGE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_INVALID_KEYUSAGE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_INVALID_KEYUSAGE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_INVALID_KEYHANDLE(lib);
}

static int _cffi_const_TPM_E_INVALID_PCR_INFO(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_INVALID_PCR_INFO);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_INVALID_PCR_INFO", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_INVALID_KEYUSAGE(lib);
}

static int _cffi_const_TPM_E_INVALID_POSTINIT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_INVALID_POSTINIT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_INVALID_POSTINIT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_INVALID_PCR_INFO(lib);
}

static int _cffi_const_TPM_E_INVALID_RESOURCE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_INVALID_RESOURCE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_INVALID_RESOURCE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_INVALID_POSTINIT(lib);
}

static int _cffi_const_TPM_E_INVALID_STRUCTURE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_INVALID_STRUCTURE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_INVALID_STRUCTURE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_INVALID_RESOURCE(lib);
}

static int _cffi_const_TPM_E_IOERROR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_IOERROR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_IOERROR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_INVALID_STRUCTURE(lib);
}

static int _cffi_const_TPM_E_KEYNOTFOUND(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_KEYNOTFOUND);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_KEYNOTFOUND", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_IOERROR(lib);
}

static int _cffi_const_TPM_E_KEY_NOTSUPPORTED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_KEY_NOTSUPPORTED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_KEY_NOTSUPPORTED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_KEYNOTFOUND(lib);
}

static int _cffi_const_TPM_E_KEY_OWNER_CONTROL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_KEY_OWNER_CONTROL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_KEY_OWNER_CONTROL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_KEY_NOTSUPPORTED(lib);
}

static int _cffi_const_TPM_E_MAXNVWRITES(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_MAXNVWRITES);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_MAXNVWRITES", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_KEY_OWNER_CONTROL(lib);
}

static int _cffi_const_TPM_E_MA_AUTHORITY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_MA_AUTHORITY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_MA_AUTHORITY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_MAXNVWRITES(lib);
}

static int _cffi_const_TPM_E_MA_DESTINATION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_MA_DESTINATION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_MA_DESTINATION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_MA_AUTHORITY(lib);
}

static int _cffi_const_TPM_E_MA_SOURCE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_MA_SOURCE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_MA_SOURCE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_MA_DESTINATION(lib);
}

static int _cffi_const_TPM_E_MA_TICKET_SIGNATURE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_MA_TICKET_SIGNATURE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_MA_TICKET_SIGNATURE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_MA_SOURCE(lib);
}

static int _cffi_const_TPM_E_MIGRATEFAIL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_MIGRATEFAIL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_MIGRATEFAIL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_MA_TICKET_SIGNATURE(lib);
}

static int _cffi_const_TPM_E_NEEDS_SELFTEST(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_NEEDS_SELFTEST);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_NEEDS_SELFTEST", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_MIGRATEFAIL(lib);
}

static int _cffi_const_TPM_E_NOCONTEXTSPACE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_NOCONTEXTSPACE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_NOCONTEXTSPACE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_NEEDS_SELFTEST(lib);
}

static int _cffi_const_TPM_E_NON_FATAL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_NON_FATAL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_NON_FATAL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_NOCONTEXTSPACE(lib);
}

static int _cffi_const_TPM_E_NOOPERATOR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_NOOPERATOR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_NOOPERATOR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_NON_FATAL(lib);
}

static int _cffi_const_TPM_E_NOSPACE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_NOSPACE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_NOSPACE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_NOOPERATOR(lib);
}

static int _cffi_const_TPM_E_NOSRK(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_NOSRK);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_NOSRK", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_NOSPACE(lib);
}

static int _cffi_const_TPM_E_NOTFIPS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_NOTFIPS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_NOTFIPS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_NOSRK(lib);
}

static int _cffi_const_TPM_E_NOTLOCAL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_NOTLOCAL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_NOTLOCAL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_NOTFIPS(lib);
}

static int _cffi_const_TPM_E_NOTRESETABLE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_NOTRESETABLE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_NOTRESETABLE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_NOTLOCAL(lib);
}

static int _cffi_const_TPM_E_NOTSEALED_BLOB(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_NOTSEALED_BLOB);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_NOTSEALED_BLOB", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_NOTRESETABLE(lib);
}

static int _cffi_const_TPM_E_NOT_FULLWRITE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_NOT_FULLWRITE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_NOT_FULLWRITE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_NOTSEALED_BLOB(lib);
}

static int _cffi_const_TPM_E_NO_ENDORSEMENT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_NO_ENDORSEMENT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_NO_ENDORSEMENT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_NOT_FULLWRITE(lib);
}

static int _cffi_const_TPM_E_NO_NV_PERMISSION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_NO_NV_PERMISSION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_NO_NV_PERMISSION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_NO_ENDORSEMENT(lib);
}

static int _cffi_const_TPM_E_NO_WRAP_TRANSPORT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_NO_WRAP_TRANSPORT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_NO_WRAP_TRANSPORT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_NO_NV_PERMISSION(lib);
}

static int _cffi_const_TPM_E_OWNER_CONTROL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_OWNER_CONTROL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_OWNER_CONTROL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_NO_WRAP_TRANSPORT(lib);
}

static int _cffi_const_TPM_E_OWNER_SET(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_OWNER_SET);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_OWNER_SET", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_OWNER_CONTROL(lib);
}

static int _cffi_const_TPM_E_PERMANENTEK(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_PERMANENTEK);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_PERMANENTEK", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_OWNER_SET(lib);
}

static int _cffi_const_TPM_E_PER_NOWRITE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_PER_NOWRITE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_PER_NOWRITE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_PERMANENTEK(lib);
}

static int _cffi_const_TPM_E_READ_ONLY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_READ_ONLY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_READ_ONLY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_PER_NOWRITE(lib);
}

static int _cffi_const_TPM_E_REQUIRES_SIGN(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_REQUIRES_SIGN);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_REQUIRES_SIGN", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_READ_ONLY(lib);
}

static int _cffi_const_TPM_E_RESOURCEMISSING(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_RESOURCEMISSING);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_RESOURCEMISSING", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_REQUIRES_SIGN(lib);
}

static int _cffi_const_TPM_E_RESOURCES(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_RESOURCES);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_RESOURCES", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_RESOURCEMISSING(lib);
}

static int _cffi_const_TPM_E_RETRY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_RETRY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_RETRY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_RESOURCES(lib);
}

static int _cffi_const_TPM_E_SHA_ERROR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_SHA_ERROR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_SHA_ERROR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_RETRY(lib);
}

static int _cffi_const_TPM_E_SHA_THREAD(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_SHA_THREAD);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_SHA_THREAD", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_SHA_ERROR(lib);
}

static int _cffi_const_TPM_E_SHORTRANDOM(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_SHORTRANDOM);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_SHORTRANDOM", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_SHA_THREAD(lib);
}

static int _cffi_const_TPM_E_SIZE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_SIZE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_SIZE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_SHORTRANDOM(lib);
}

static int _cffi_const_TPM_E_TOOMANYCONTEXTS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_TOOMANYCONTEXTS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_TOOMANYCONTEXTS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_SIZE(lib);
}

static int _cffi_const_TPM_E_TRANSPORT_NOTEXCLUSIVE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_TRANSPORT_NOTEXCLUSIVE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_TRANSPORT_NOTEXCLUSIVE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_TOOMANYCONTEXTS(lib);
}

static int _cffi_const_TPM_E_WRITE_LOCKED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_WRITE_LOCKED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_WRITE_LOCKED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_TRANSPORT_NOTEXCLUSIVE(lib);
}

static int _cffi_const_TPM_E_WRONGPCRVAL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_WRONGPCRVAL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_WRONGPCRVAL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_WRITE_LOCKED(lib);
}

static int _cffi_const_TPM_E_WRONG_ENTITYTYPE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_E_WRONG_ENTITYTYPE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_E_WRONG_ENTITYTYPE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_WRONGPCRVAL(lib);
}

static int _cffi_const_TPM_FAMFLAG_DELEGATE_ADMIN_LOCK(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_FAMFLAG_DELEGATE_ADMIN_LOCK);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_FAMFLAG_DELEGATE_ADMIN_LOCK", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_E_WRONG_ENTITYTYPE(lib);
}

static int _cffi_const_TPM_FAMFLAG_ENABLE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_FAMFLAG_ENABLE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_FAMFLAG_ENABLE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_FAMFLAG_DELEGATE_ADMIN_LOCK(lib);
}

static int _cffi_const_TPM_FAMILY_ADMIN(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_FAMILY_ADMIN);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_FAMILY_ADMIN", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_FAMFLAG_ENABLE(lib);
}

static int _cffi_const_TPM_FAMILY_CREATE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_FAMILY_CREATE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_FAMILY_CREATE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_FAMILY_ADMIN(lib);
}

static int _cffi_const_TPM_FAMILY_ENABLE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_FAMILY_ENABLE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_FAMILY_ENABLE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_FAMILY_CREATE(lib);
}

static int _cffi_const_TPM_FAMILY_INVALIDATE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_FAMILY_INVALIDATE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_FAMILY_INVALIDATE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_FAMILY_ENABLE(lib);
}

static int _cffi_const_TPM_FAMILY_TABLE_ENTRY_MIN(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_FAMILY_TABLE_ENTRY_MIN);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_FAMILY_TABLE_ENTRY_MIN", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_FAMILY_INVALIDATE(lib);
}

static int _cffi_const_TPM_KEYHND_OWNER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEYHND_OWNER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEYHND_OWNER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_FAMILY_TABLE_ENTRY_MIN(lib);
}

static int _cffi_const_TPM_KEYHND_SRK(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEYHND_SRK);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEYHND_SRK", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEYHND_OWNER(lib);
}

static int _cffi_const_TPM_KEY_AUTHCHANGE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_AUTHCHANGE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_AUTHCHANGE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEYHND_SRK(lib);
}

static int _cffi_const_TPM_KEY_BIND(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_BIND);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_BIND", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_AUTHCHANGE(lib);
}

static int _cffi_const_TPM_KEY_CONTROL_OWNER_EVICT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_CONTROL_OWNER_EVICT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_CONTROL_OWNER_EVICT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_BIND(lib);
}

static int _cffi_const_TPM_KEY_DELEGATE_ActivateIdentity(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_DELEGATE_ActivateIdentity);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_DELEGATE_ActivateIdentity", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_CONTROL_OWNER_EVICT(lib);
}

static int _cffi_const_TPM_KEY_DELEGATE_CMK_ConvertMigration(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_DELEGATE_CMK_ConvertMigration);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_DELEGATE_CMK_ConvertMigration", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_DELEGATE_ActivateIdentity(lib);
}

static int _cffi_const_TPM_KEY_DELEGATE_CMK_CreateBlob(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_DELEGATE_CMK_CreateBlob);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_DELEGATE_CMK_CreateBlob", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_DELEGATE_CMK_ConvertMigration(lib);
}

static int _cffi_const_TPM_KEY_DELEGATE_CMK_CreateKey(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_DELEGATE_CMK_CreateKey);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_DELEGATE_CMK_CreateKey", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_DELEGATE_CMK_CreateBlob(lib);
}

static int _cffi_const_TPM_KEY_DELEGATE_CertifyKey(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_DELEGATE_CertifyKey);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_DELEGATE_CertifyKey", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_DELEGATE_CMK_CreateKey(lib);
}

static int _cffi_const_TPM_KEY_DELEGATE_CertifyKey2(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_DELEGATE_CertifyKey2);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_DELEGATE_CertifyKey2", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_DELEGATE_CertifyKey(lib);
}

static int _cffi_const_TPM_KEY_DELEGATE_ChangeAuth(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_DELEGATE_ChangeAuth);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_DELEGATE_ChangeAuth", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_DELEGATE_CertifyKey2(lib);
}

static int _cffi_const_TPM_KEY_DELEGATE_ChangeAuthAsymFinish(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_DELEGATE_ChangeAuthAsymFinish);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_DELEGATE_ChangeAuthAsymFinish", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_DELEGATE_ChangeAuth(lib);
}

static int _cffi_const_TPM_KEY_DELEGATE_ChangeAuthAsymStart(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_DELEGATE_ChangeAuthAsymStart);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_DELEGATE_ChangeAuthAsymStart", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_DELEGATE_ChangeAuthAsymFinish(lib);
}

static int _cffi_const_TPM_KEY_DELEGATE_ConvertMigrationBlob(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_DELEGATE_ConvertMigrationBlob);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_DELEGATE_ConvertMigrationBlob", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_DELEGATE_ChangeAuthAsymStart(lib);
}

static int _cffi_const_TPM_KEY_DELEGATE_CreateKeyDelegation(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_DELEGATE_CreateKeyDelegation);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_DELEGATE_CreateKeyDelegation", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_DELEGATE_ConvertMigrationBlob(lib);
}

static int _cffi_const_TPM_KEY_DELEGATE_CreateMigrationBlob(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_DELEGATE_CreateMigrationBlob);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_DELEGATE_CreateMigrationBlob", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_DELEGATE_CreateKeyDelegation(lib);
}

static int _cffi_const_TPM_KEY_DELEGATE_CreateWrapKey(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_DELEGATE_CreateWrapKey);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_DELEGATE_CreateWrapKey", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_DELEGATE_CreateMigrationBlob(lib);
}

static int _cffi_const_TPM_KEY_DELEGATE_EstablishTransport(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_DELEGATE_EstablishTransport);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_DELEGATE_EstablishTransport", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_DELEGATE_CreateWrapKey(lib);
}

static int _cffi_const_TPM_KEY_DELEGATE_GetAuditDigestSigned(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_DELEGATE_GetAuditDigestSigned);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_DELEGATE_GetAuditDigestSigned", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_DELEGATE_EstablishTransport(lib);
}

static int _cffi_const_TPM_KEY_DELEGATE_GetPubKey(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_DELEGATE_GetPubKey);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_DELEGATE_GetPubKey", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_DELEGATE_GetAuditDigestSigned(lib);
}

static int _cffi_const_TPM_KEY_DELEGATE_LoadKey(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_DELEGATE_LoadKey);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_DELEGATE_LoadKey", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_DELEGATE_GetPubKey(lib);
}

static int _cffi_const_TPM_KEY_DELEGATE_LoadKey2(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_DELEGATE_LoadKey2);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_DELEGATE_LoadKey2", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_DELEGATE_LoadKey(lib);
}

static int _cffi_const_TPM_KEY_DELEGATE_MakeIdentity(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_DELEGATE_MakeIdentity);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_DELEGATE_MakeIdentity", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_DELEGATE_LoadKey2(lib);
}

static int _cffi_const_TPM_KEY_DELEGATE_MigrateKey(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_DELEGATE_MigrateKey);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_DELEGATE_MigrateKey", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_DELEGATE_MakeIdentity(lib);
}

static int _cffi_const_TPM_KEY_DELEGATE_Quote(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_DELEGATE_Quote);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_DELEGATE_Quote", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_DELEGATE_MigrateKey(lib);
}

static int _cffi_const_TPM_KEY_DELEGATE_Quote2(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_DELEGATE_Quote2);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_DELEGATE_Quote2", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_DELEGATE_Quote(lib);
}

static int _cffi_const_TPM_KEY_DELEGATE_ReleaseTransportSigned(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_DELEGATE_ReleaseTransportSigned);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_DELEGATE_ReleaseTransportSigned", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_DELEGATE_Quote2(lib);
}

static int _cffi_const_TPM_KEY_DELEGATE_Seal(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_DELEGATE_Seal);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_DELEGATE_Seal", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_DELEGATE_ReleaseTransportSigned(lib);
}

static int _cffi_const_TPM_KEY_DELEGATE_Sealx(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_DELEGATE_Sealx);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_DELEGATE_Sealx", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_DELEGATE_Seal(lib);
}

static int _cffi_const_TPM_KEY_DELEGATE_Sign(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_DELEGATE_Sign);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_DELEGATE_Sign", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_DELEGATE_Sealx(lib);
}

static int _cffi_const_TPM_KEY_DELEGATE_TickStampBlob(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_DELEGATE_TickStampBlob);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_DELEGATE_TickStampBlob", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_DELEGATE_Sign(lib);
}

static int _cffi_const_TPM_KEY_DELEGATE_UnBind(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_DELEGATE_UnBind);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_DELEGATE_UnBind", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_DELEGATE_TickStampBlob(lib);
}

static int _cffi_const_TPM_KEY_DELEGATE_Unseal(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_DELEGATE_Unseal);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_DELEGATE_Unseal", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_DELEGATE_UnBind(lib);
}

static int _cffi_const_TPM_KEY_IDENTITY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_IDENTITY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_IDENTITY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_DELEGATE_Unseal(lib);
}

static int _cffi_const_TPM_KEY_LEGACY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_LEGACY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_LEGACY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_IDENTITY(lib);
}

static int _cffi_const_TPM_KEY_MIGRATE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_MIGRATE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_MIGRATE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_LEGACY(lib);
}

static int _cffi_const_TPM_KEY_SIGNING(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_SIGNING);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_SIGNING", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_MIGRATE(lib);
}

static int _cffi_const_TPM_KEY_STORAGE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KEY_STORAGE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KEY_STORAGE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_SIGNING(lib);
}

static int _cffi_const_TPM_KH_ADMIN(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KH_ADMIN);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KH_ADMIN", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KEY_STORAGE(lib);
}

static int _cffi_const_TPM_KH_EK(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KH_EK);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KH_EK", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KH_ADMIN(lib);
}

static int _cffi_const_TPM_KH_OPERATOR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KH_OPERATOR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KH_OPERATOR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KH_EK(lib);
}

static int _cffi_const_TPM_KH_OWNER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KH_OWNER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KH_OWNER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KH_OPERATOR(lib);
}

static int _cffi_const_TPM_KH_REVOKE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KH_REVOKE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KH_REVOKE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KH_OWNER(lib);
}

static int _cffi_const_TPM_KH_SRK(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KH_SRK);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KH_SRK", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KH_REVOKE(lib);
}

static int _cffi_const_TPM_KH_TRANSPORT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_KH_TRANSPORT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_KH_TRANSPORT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KH_SRK(lib);
}

static int _cffi_const_TPM_LOC_FOUR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_LOC_FOUR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_LOC_FOUR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_KH_TRANSPORT(lib);
}

static int _cffi_const_TPM_LOC_ONE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_LOC_ONE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_LOC_ONE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_LOC_FOUR(lib);
}

static int _cffi_const_TPM_LOC_THREE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_LOC_THREE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_LOC_THREE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_LOC_ONE(lib);
}

static int _cffi_const_TPM_LOC_TWO(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_LOC_TWO);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_LOC_TWO", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_LOC_THREE(lib);
}

static int _cffi_const_TPM_LOC_ZERO(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_LOC_ZERO);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_LOC_ZERO", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_LOC_TWO(lib);
}

static int _cffi_const_TPM_MIGRATABLE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_MIGRATABLE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_MIGRATABLE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_LOC_ZERO(lib);
}

static int _cffi_const_TPM_MIGRATEAUTHORITY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_MIGRATEAUTHORITY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_MIGRATEAUTHORITY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_MIGRATABLE(lib);
}

static int _cffi_const_TPM_MS_MAINT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_MS_MAINT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_MS_MAINT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_MIGRATEAUTHORITY(lib);
}

static int _cffi_const_TPM_MS_MIGRATE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_MS_MIGRATE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_MS_MIGRATE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_MS_MAINT(lib);
}

static int _cffi_const_TPM_MS_RESTRICT_APPROVE_DOUBLE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_MS_RESTRICT_APPROVE_DOUBLE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_MS_RESTRICT_APPROVE_DOUBLE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_MS_MIGRATE(lib);
}

static int _cffi_const_TPM_MS_RESTRICT_MIGRATE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_MS_RESTRICT_MIGRATE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_MS_RESTRICT_MIGRATE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_MS_RESTRICT_APPROVE_DOUBLE(lib);
}

static int _cffi_const_TPM_MS_REWRAP(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_MS_REWRAP);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_MS_REWRAP", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_MS_RESTRICT_MIGRATE(lib);
}

static int _cffi_const_TPM_NUM_DELEGATE_TABLE_ENTRY_MIN(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_NUM_DELEGATE_TABLE_ENTRY_MIN);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_NUM_DELEGATE_TABLE_ENTRY_MIN", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_MS_REWRAP(lib);
}

static int _cffi_const_TPM_NV_INDEX0(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_NV_INDEX0);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_NV_INDEX0", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_NUM_DELEGATE_TABLE_ENTRY_MIN(lib);
}

static int _cffi_const_TPM_NV_INDEX_DIR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_NV_INDEX_DIR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_NV_INDEX_DIR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_NV_INDEX0(lib);
}

static int _cffi_const_TPM_NV_INDEX_EKCert(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_NV_INDEX_EKCert);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_NV_INDEX_EKCert", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_NV_INDEX_DIR(lib);
}

static int _cffi_const_TPM_NV_INDEX_GROUP_RESV_BASE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_NV_INDEX_GROUP_RESV_BASE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_NV_INDEX_GROUP_RESV_BASE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_NV_INDEX_EKCert(lib);
}

static int _cffi_const_TPM_NV_INDEX_LOCK(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_NV_INDEX_LOCK);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_NV_INDEX_LOCK", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_NV_INDEX_GROUP_RESV_BASE(lib);
}

static int _cffi_const_TPM_NV_INDEX_MOBILE_BASE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_NV_INDEX_MOBILE_BASE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_NV_INDEX_MOBILE_BASE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_NV_INDEX_LOCK(lib);
}

static int _cffi_const_TPM_NV_INDEX_PC_BASE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_NV_INDEX_PC_BASE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_NV_INDEX_PC_BASE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_NV_INDEX_MOBILE_BASE(lib);
}

static int _cffi_const_TPM_NV_INDEX_PERIPHERAL_BASE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_NV_INDEX_PERIPHERAL_BASE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_NV_INDEX_PERIPHERAL_BASE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_NV_INDEX_PC_BASE(lib);
}

static int _cffi_const_TPM_NV_INDEX_PlatformCert(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_NV_INDEX_PlatformCert);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_NV_INDEX_PlatformCert", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_NV_INDEX_PERIPHERAL_BASE(lib);
}

static int _cffi_const_TPM_NV_INDEX_Platform_CC(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_NV_INDEX_Platform_CC);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_NV_INDEX_Platform_CC", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_NV_INDEX_PlatformCert(lib);
}

static int _cffi_const_TPM_NV_INDEX_SERVER_BASE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_NV_INDEX_SERVER_BASE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_NV_INDEX_SERVER_BASE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_NV_INDEX_Platform_CC(lib);
}

static int _cffi_const_TPM_NV_INDEX_TPM_CC(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_NV_INDEX_TPM_CC);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_NV_INDEX_TPM_CC", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_NV_INDEX_SERVER_BASE(lib);
}

static int _cffi_const_TPM_NV_INDEX_TSS_BASE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_NV_INDEX_TSS_BASE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_NV_INDEX_TSS_BASE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_NV_INDEX_TPM_CC(lib);
}

static int _cffi_const_TPM_NV_PER_AUTHREAD(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_NV_PER_AUTHREAD);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_NV_PER_AUTHREAD", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_NV_INDEX_TSS_BASE(lib);
}

static int _cffi_const_TPM_NV_PER_AUTHWRITE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_NV_PER_AUTHWRITE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_NV_PER_AUTHWRITE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_NV_PER_AUTHREAD(lib);
}

static int _cffi_const_TPM_NV_PER_GLOBALLOCK(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_NV_PER_GLOBALLOCK);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_NV_PER_GLOBALLOCK", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_NV_PER_AUTHWRITE(lib);
}

static int _cffi_const_TPM_NV_PER_OWNERREAD(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_NV_PER_OWNERREAD);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_NV_PER_OWNERREAD", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_NV_PER_GLOBALLOCK(lib);
}

static int _cffi_const_TPM_NV_PER_OWNERWRITE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_NV_PER_OWNERWRITE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_NV_PER_OWNERWRITE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_NV_PER_OWNERREAD(lib);
}

static int _cffi_const_TPM_NV_PER_PPREAD(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_NV_PER_PPREAD);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_NV_PER_PPREAD", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_NV_PER_OWNERWRITE(lib);
}

static int _cffi_const_TPM_NV_PER_PPWRITE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_NV_PER_PPWRITE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_NV_PER_PPWRITE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_NV_PER_PPREAD(lib);
}

static int _cffi_const_TPM_NV_PER_READ_STCLEAR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_NV_PER_READ_STCLEAR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_NV_PER_READ_STCLEAR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_NV_PER_PPWRITE(lib);
}

static int _cffi_const_TPM_NV_PER_WRITEALL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_NV_PER_WRITEALL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_NV_PER_WRITEALL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_NV_PER_READ_STCLEAR(lib);
}

static int _cffi_const_TPM_NV_PER_WRITEDEFINE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_NV_PER_WRITEDEFINE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_NV_PER_WRITEDEFINE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_NV_PER_WRITEALL(lib);
}

static int _cffi_const_TPM_NV_PER_WRITE_STCLEAR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_NV_PER_WRITE_STCLEAR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_NV_PER_WRITE_STCLEAR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_NV_PER_WRITEDEFINE(lib);
}

static int _cffi_const_TPM_PCRIGNOREDONREAD(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PCRIGNOREDONREAD);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PCRIGNOREDONREAD", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_NV_PER_WRITE_STCLEAR(lib);
}

static int _cffi_const_TPM_PF_ALLOWMAINTENANCE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PF_ALLOWMAINTENANCE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PF_ALLOWMAINTENANCE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PCRIGNOREDONREAD(lib);
}

static int _cffi_const_TPM_PF_CEKPUSED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PF_CEKPUSED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PF_CEKPUSED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PF_ALLOWMAINTENANCE(lib);
}

static int _cffi_const_TPM_PF_DEACTIVATED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PF_DEACTIVATED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PF_DEACTIVATED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PF_CEKPUSED(lib);
}

static int _cffi_const_TPM_PF_DISABLE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PF_DISABLE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PF_DISABLE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PF_DEACTIVATED(lib);
}

static int _cffi_const_TPM_PF_DISABLEFULLDALOGICINFO(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PF_DISABLEFULLDALOGICINFO);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PF_DISABLEFULLDALOGICINFO", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PF_DISABLE(lib);
}

static int _cffi_const_TPM_PF_DISABLEOWNERCLEAR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PF_DISABLEOWNERCLEAR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PF_DISABLEOWNERCLEAR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PF_DISABLEFULLDALOGICINFO(lib);
}

static int _cffi_const_TPM_PF_ENABLEREVOKEEK(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PF_ENABLEREVOKEEK);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PF_ENABLEREVOKEEK", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PF_DISABLEOWNERCLEAR(lib);
}

static int _cffi_const_TPM_PF_FIPS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PF_FIPS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PF_FIPS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PF_ENABLEREVOKEEK(lib);
}

static int _cffi_const_TPM_PF_MAINTENANCEDONE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PF_MAINTENANCEDONE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PF_MAINTENANCEDONE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PF_FIPS(lib);
}

static int _cffi_const_TPM_PF_NV_LOCKED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PF_NV_LOCKED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PF_NV_LOCKED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PF_MAINTENANCEDONE(lib);
}

static int _cffi_const_TPM_PF_OPERATOR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PF_OPERATOR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PF_OPERATOR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PF_NV_LOCKED(lib);
}

static int _cffi_const_TPM_PF_OWNERSHIP(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PF_OWNERSHIP);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PF_OWNERSHIP", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PF_OPERATOR(lib);
}

static int _cffi_const_TPM_PF_PHYSICALPRESENCECMDENABLE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PF_PHYSICALPRESENCECMDENABLE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PF_PHYSICALPRESENCECMDENABLE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PF_OWNERSHIP(lib);
}

static int _cffi_const_TPM_PF_PHYSICALPRESENCEHWENABLE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PF_PHYSICALPRESENCEHWENABLE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PF_PHYSICALPRESENCEHWENABLE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PF_PHYSICALPRESENCECMDENABLE(lib);
}

static int _cffi_const_TPM_PF_PHYSICALPRESENCELIFETIMELOCK(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PF_PHYSICALPRESENCELIFETIMELOCK);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PF_PHYSICALPRESENCELIFETIMELOCK", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PF_PHYSICALPRESENCEHWENABLE(lib);
}

static int _cffi_const_TPM_PF_READPUBEK(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PF_READPUBEK);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PF_READPUBEK", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PF_PHYSICALPRESENCELIFETIMELOCK(lib);
}

static int _cffi_const_TPM_PF_READSRKPUB(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PF_READSRKPUB);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PF_READSRKPUB", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PF_READPUBEK(lib);
}

static int _cffi_const_TPM_PF_RESETESTABLISHMENTBIT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PF_RESETESTABLISHMENTBIT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PF_RESETESTABLISHMENTBIT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PF_READSRKPUB(lib);
}

static int _cffi_const_TPM_PF_TPMPOST(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PF_TPMPOST);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PF_TPMPOST", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PF_RESETESTABLISHMENTBIT(lib);
}

static int _cffi_const_TPM_PF_TPMPOSTLOCK(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PF_TPMPOSTLOCK);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PF_TPMPOSTLOCK", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PF_TPMPOST(lib);
}

static int _cffi_const_TPM_PHYSICAL_PRESENCE_CMD_DISABLE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PHYSICAL_PRESENCE_CMD_DISABLE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PHYSICAL_PRESENCE_CMD_DISABLE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PF_TPMPOSTLOCK(lib);
}

static int _cffi_const_TPM_PHYSICAL_PRESENCE_CMD_ENABLE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PHYSICAL_PRESENCE_CMD_ENABLE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PHYSICAL_PRESENCE_CMD_ENABLE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PHYSICAL_PRESENCE_CMD_DISABLE(lib);
}

static int _cffi_const_TPM_PHYSICAL_PRESENCE_HW_DISABLE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PHYSICAL_PRESENCE_HW_DISABLE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PHYSICAL_PRESENCE_HW_DISABLE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PHYSICAL_PRESENCE_CMD_ENABLE(lib);
}

static int _cffi_const_TPM_PHYSICAL_PRESENCE_HW_ENABLE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PHYSICAL_PRESENCE_HW_ENABLE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PHYSICAL_PRESENCE_HW_ENABLE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PHYSICAL_PRESENCE_HW_DISABLE(lib);
}

static int _cffi_const_TPM_PHYSICAL_PRESENCE_LIFETIME_LOCK(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PHYSICAL_PRESENCE_LIFETIME_LOCK);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PHYSICAL_PRESENCE_LIFETIME_LOCK", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PHYSICAL_PRESENCE_HW_ENABLE(lib);
}

static int _cffi_const_TPM_PHYSICAL_PRESENCE_LOCK(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PHYSICAL_PRESENCE_LOCK);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PHYSICAL_PRESENCE_LOCK", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PHYSICAL_PRESENCE_LIFETIME_LOCK(lib);
}

static int _cffi_const_TPM_PHYSICAL_PRESENCE_NOTPRESENT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PHYSICAL_PRESENCE_NOTPRESENT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PHYSICAL_PRESENCE_NOTPRESENT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PHYSICAL_PRESENCE_LOCK(lib);
}

static int _cffi_const_TPM_PHYSICAL_PRESENCE_PRESENT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PHYSICAL_PRESENCE_PRESENT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PHYSICAL_PRESENCE_PRESENT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PHYSICAL_PRESENCE_NOTPRESENT(lib);
}

static int _cffi_const_TPM_PID_ADCP(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PID_ADCP);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PID_ADCP", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PHYSICAL_PRESENCE_PRESENT(lib);
}

static int _cffi_const_TPM_PID_ADIP(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PID_ADIP);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PID_ADIP", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PID_ADCP(lib);
}

static int _cffi_const_TPM_PID_DSAP(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PID_DSAP);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PID_DSAP", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PID_ADIP(lib);
}

static int _cffi_const_TPM_PID_OIAP(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PID_OIAP);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PID_OIAP", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PID_DSAP(lib);
}

static int _cffi_const_TPM_PID_OSAP(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PID_OSAP);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PID_OSAP", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PID_OIAP(lib);
}

static int _cffi_const_TPM_PID_OWNER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PID_OWNER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PID_OWNER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PID_OSAP(lib);
}

static int _cffi_const_TPM_PID_TRANSPORT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PID_TRANSPORT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PID_TRANSPORT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PID_OWNER(lib);
}

static int _cffi_const_TPM_PS_Mobile_12(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PS_Mobile_12);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PS_Mobile_12", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PID_TRANSPORT(lib);
}

static int _cffi_const_TPM_PS_PC_11(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PS_PC_11);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PS_PC_11", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PS_Mobile_12(lib);
}

static int _cffi_const_TPM_PS_PC_12(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PS_PC_12);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PS_PC_12", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PS_PC_11(lib);
}

static int _cffi_const_TPM_PS_PDA_12(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PS_PDA_12);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PS_PDA_12", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PS_PC_12(lib);
}

static int _cffi_const_TPM_PS_Server_12(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PS_Server_12);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PS_Server_12", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PS_PDA_12(lib);
}

static int _cffi_const_TPM_PT_ASYM(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PT_ASYM);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PT_ASYM", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PS_Server_12(lib);
}

static int _cffi_const_TPM_PT_BIND(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PT_BIND);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PT_BIND", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PT_ASYM(lib);
}

static int _cffi_const_TPM_PT_CMK_MIGRATE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PT_CMK_MIGRATE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PT_CMK_MIGRATE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PT_BIND(lib);
}

static int _cffi_const_TPM_PT_MAINT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PT_MAINT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PT_MAINT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PT_CMK_MIGRATE(lib);
}

static int _cffi_const_TPM_PT_MIGRATE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PT_MIGRATE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PT_MIGRATE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PT_MAINT(lib);
}

static int _cffi_const_TPM_PT_MIGRATE_EXTERNAL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PT_MIGRATE_EXTERNAL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PT_MIGRATE_EXTERNAL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PT_MIGRATE(lib);
}

static int _cffi_const_TPM_PT_MIGRATE_RESTRICTED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PT_MIGRATE_RESTRICTED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PT_MIGRATE_RESTRICTED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PT_MIGRATE_EXTERNAL(lib);
}

static int _cffi_const_TPM_PT_SEAL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_PT_SEAL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_PT_SEAL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PT_MIGRATE_RESTRICTED(lib);
}

static int _cffi_const_TPM_REDIRECTION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_REDIRECTION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_REDIRECTION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_PT_SEAL(lib);
}

static int _cffi_const_TPM_REDIR_GPIO(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_REDIR_GPIO);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_REDIR_GPIO", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_REDIRECTION(lib);
}

static int _cffi_const_TPM_RT_AUTH(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_RT_AUTH);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_RT_AUTH", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_REDIR_GPIO(lib);
}

static int _cffi_const_TPM_RT_CONTEXT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_RT_CONTEXT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_RT_CONTEXT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_RT_AUTH(lib);
}

static int _cffi_const_TPM_RT_COUNTER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_RT_COUNTER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_RT_COUNTER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_RT_CONTEXT(lib);
}

static int _cffi_const_TPM_RT_DAA_TPM(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_RT_DAA_TPM);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_RT_DAA_TPM", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_RT_COUNTER(lib);
}

static int _cffi_const_TPM_RT_DAA_V0(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_RT_DAA_V0);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_RT_DAA_V0", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_RT_DAA_TPM(lib);
}

static int _cffi_const_TPM_RT_DAA_V1(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_RT_DAA_V1);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_RT_DAA_V1", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_RT_DAA_V0(lib);
}

static int _cffi_const_TPM_RT_DELEGATE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_RT_DELEGATE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_RT_DELEGATE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_RT_DAA_V1(lib);
}

static int _cffi_const_TPM_RT_HASH(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_RT_HASH);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_RT_HASH", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_RT_DELEGATE(lib);
}

static int _cffi_const_TPM_RT_KEY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_RT_KEY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_RT_KEY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_RT_HASH(lib);
}

static int _cffi_const_TPM_RT_TRANS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_RT_TRANS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_RT_TRANS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_RT_KEY(lib);
}

static int _cffi_const_TPM_SET_PERM_DATA(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_SET_PERM_DATA);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_SET_PERM_DATA", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_RT_TRANS(lib);
}

static int _cffi_const_TPM_SET_PERM_FLAGS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_SET_PERM_FLAGS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_SET_PERM_FLAGS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_SET_PERM_DATA(lib);
}

static int _cffi_const_TPM_SET_STANY_DATA(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_SET_STANY_DATA);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_SET_STANY_DATA", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_SET_PERM_FLAGS(lib);
}

static int _cffi_const_TPM_SET_STANY_FLAGS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_SET_STANY_FLAGS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_SET_STANY_FLAGS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_SET_STANY_DATA(lib);
}

static int _cffi_const_TPM_SET_STCLEAR_DATA(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_SET_STCLEAR_DATA);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_SET_STCLEAR_DATA", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_SET_STANY_FLAGS(lib);
}

static int _cffi_const_TPM_SET_STCLEAR_FLAGS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_SET_STCLEAR_FLAGS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_SET_STCLEAR_FLAGS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_SET_STCLEAR_DATA(lib);
}

static int _cffi_const_TPM_SET_VENDOR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_SET_VENDOR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_SET_VENDOR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_SET_STCLEAR_FLAGS(lib);
}

static int _cffi_const_TPM_SF_DEACTIVATED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_SF_DEACTIVATED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_SF_DEACTIVATED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_SET_VENDOR(lib);
}

static int _cffi_const_TPM_SF_DISABLEFORCECLEAR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_SF_DISABLEFORCECLEAR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_SF_DISABLEFORCECLEAR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_SF_DEACTIVATED(lib);
}

static int _cffi_const_TPM_SF_GLOBALLOCK(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_SF_GLOBALLOCK);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_SF_GLOBALLOCK", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_SF_DISABLEFORCECLEAR(lib);
}

static int _cffi_const_TPM_SF_PHYSICALPRESENCE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_SF_PHYSICALPRESENCE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_SF_PHYSICALPRESENCE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_SF_GLOBALLOCK(lib);
}

static int _cffi_const_TPM_SF_PHYSICALPRESENCELOCK(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_SF_PHYSICALPRESENCELOCK);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_SF_PHYSICALPRESENCELOCK", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_SF_PHYSICALPRESENCE(lib);
}

static int _cffi_const_TPM_SHA1BASED_NONCE_LEN(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_SHA1BASED_NONCE_LEN);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_SHA1BASED_NONCE_LEN", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_SF_PHYSICALPRESENCELOCK(lib);
}

static int _cffi_const_TPM_SHA1_160_HASH_LEN(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_SHA1_160_HASH_LEN);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_SHA1_160_HASH_LEN", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_SHA1BASED_NONCE_LEN(lib);
}

static int _cffi_const_TPM_SS_NONE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_SS_NONE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_SS_NONE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_SHA1_160_HASH_LEN(lib);
}

static int _cffi_const_TPM_SS_RSASSAPKCS1v15_DER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_SS_RSASSAPKCS1v15_DER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_SS_RSASSAPKCS1v15_DER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_SS_NONE(lib);
}

static int _cffi_const_TPM_SS_RSASSAPKCS1v15_INFO(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_SS_RSASSAPKCS1v15_INFO);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_SS_RSASSAPKCS1v15_INFO", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_SS_RSASSAPKCS1v15_DER(lib);
}

static int _cffi_const_TPM_SS_RSASSAPKCS1v15_SHA1(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_SS_RSASSAPKCS1v15_SHA1);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_SS_RSASSAPKCS1v15_SHA1", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_SS_RSASSAPKCS1v15_INFO(lib);
}

static int _cffi_const_TPM_ST_CLEAR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_ST_CLEAR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_ST_CLEAR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_SS_RSASSAPKCS1v15_SHA1(lib);
}

static int _cffi_const_TPM_ST_DEACTIVATED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_ST_DEACTIVATED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_ST_DEACTIVATED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_ST_CLEAR(lib);
}

static int _cffi_const_TPM_ST_STATE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_ST_STATE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_ST_STATE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_ST_DEACTIVATED(lib);
}

static int _cffi_const_TPM_SUCCESS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_SUCCESS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_SUCCESS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_ST_STATE(lib);
}

static int _cffi_const_TPM_SYM_MODE_CBC(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_SYM_MODE_CBC);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_SYM_MODE_CBC", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_SUCCESS(lib);
}

static int _cffi_const_TPM_SYM_MODE_CFB(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_SYM_MODE_CFB);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_SYM_MODE_CFB", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_SYM_MODE_CBC(lib);
}

static int _cffi_const_TPM_SYM_MODE_ECB(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_SYM_MODE_ECB);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_SYM_MODE_ECB", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_SYM_MODE_CFB(lib);
}

static int _cffi_const_TPM_TAG_AUDIT_EVENT_IN(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_AUDIT_EVENT_IN);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_AUDIT_EVENT_IN", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_SYM_MODE_ECB(lib);
}

static int _cffi_const_TPM_TAG_AUDIT_EVENT_OUT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_AUDIT_EVENT_OUT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_AUDIT_EVENT_OUT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_AUDIT_EVENT_IN(lib);
}

static int _cffi_const_TPM_TAG_CAP_VERSION_INFO(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_CAP_VERSION_INFO);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_CAP_VERSION_INFO", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_AUDIT_EVENT_OUT(lib);
}

static int _cffi_const_TPM_TAG_CERTIFY_INFO2(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_CERTIFY_INFO2);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_CERTIFY_INFO2", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_CAP_VERSION_INFO(lib);
}

static int _cffi_const_TPM_TAG_CMK_MA_APPROVAL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_CMK_MA_APPROVAL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_CMK_MA_APPROVAL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_CERTIFY_INFO2(lib);
}

static int _cffi_const_TPM_TAG_CMK_MIGAUTH(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_CMK_MIGAUTH);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_CMK_MIGAUTH", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_CMK_MA_APPROVAL(lib);
}

static int _cffi_const_TPM_TAG_CMK_SIGTICKET(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_CMK_SIGTICKET);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_CMK_SIGTICKET", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_CMK_MIGAUTH(lib);
}

static int _cffi_const_TPM_TAG_CONTEXTBLOB(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_CONTEXTBLOB);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_CONTEXTBLOB", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_CMK_SIGTICKET(lib);
}

static int _cffi_const_TPM_TAG_CONTEXTLIST(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_CONTEXTLIST);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_CONTEXTLIST", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_CONTEXTBLOB(lib);
}

static int _cffi_const_TPM_TAG_CONTEXTPOINTER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_CONTEXTPOINTER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_CONTEXTPOINTER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_CONTEXTLIST(lib);
}

static int _cffi_const_TPM_TAG_CONTEXT_SENSITIVE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_CONTEXT_SENSITIVE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_CONTEXT_SENSITIVE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_CONTEXTPOINTER(lib);
}

static int _cffi_const_TPM_TAG_COUNTER_VALUE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_COUNTER_VALUE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_COUNTER_VALUE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_CONTEXT_SENSITIVE(lib);
}

static int _cffi_const_TPM_TAG_CURRENT_TICKS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_CURRENT_TICKS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_CURRENT_TICKS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_COUNTER_VALUE(lib);
}

static int _cffi_const_TPM_TAG_DAA_BLOB(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_DAA_BLOB);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_DAA_BLOB", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_CURRENT_TICKS(lib);
}

static int _cffi_const_TPM_TAG_DAA_CONTEXT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_DAA_CONTEXT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_DAA_CONTEXT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_DAA_BLOB(lib);
}

static int _cffi_const_TPM_TAG_DAA_ENFORCE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_DAA_ENFORCE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_DAA_ENFORCE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_DAA_CONTEXT(lib);
}

static int _cffi_const_TPM_TAG_DAA_ISSUER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_DAA_ISSUER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_DAA_ISSUER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_DAA_ENFORCE(lib);
}

static int _cffi_const_TPM_TAG_DAA_SENSITIVE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_DAA_SENSITIVE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_DAA_SENSITIVE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_DAA_ISSUER(lib);
}

static int _cffi_const_TPM_TAG_DAA_TPM(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_DAA_TPM);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_DAA_TPM", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_DAA_SENSITIVE(lib);
}

static int _cffi_const_TPM_TAG_DA_ACTION_TYPE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_DA_ACTION_TYPE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_DA_ACTION_TYPE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_DAA_TPM(lib);
}

static int _cffi_const_TPM_TAG_DA_INFO(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_DA_INFO);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_DA_INFO", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_DA_ACTION_TYPE(lib);
}

static int _cffi_const_TPM_TAG_DA_INFO_LIMITED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_DA_INFO_LIMITED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_DA_INFO_LIMITED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_DA_INFO(lib);
}

static int _cffi_const_TPM_TAG_DELEGATE_OWNER_BLOB(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_DELEGATE_OWNER_BLOB);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_DELEGATE_OWNER_BLOB", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_DA_INFO_LIMITED(lib);
}

static int _cffi_const_TPM_TAG_DELEGATE_PUBLIC(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_DELEGATE_PUBLIC);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_DELEGATE_PUBLIC", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_DELEGATE_OWNER_BLOB(lib);
}

static int _cffi_const_TPM_TAG_DELEGATE_SENSITIVE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_DELEGATE_SENSITIVE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_DELEGATE_SENSITIVE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_DELEGATE_PUBLIC(lib);
}

static int _cffi_const_TPM_TAG_DELEGATE_TABLE_ROW(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_DELEGATE_TABLE_ROW);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_DELEGATE_TABLE_ROW", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_DELEGATE_SENSITIVE(lib);
}

static int _cffi_const_TPM_TAG_DELEGATIONS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_DELEGATIONS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_DELEGATIONS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_DELEGATE_TABLE_ROW(lib);
}

static int _cffi_const_TPM_TAG_DELG_KEY_BLOB(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_DELG_KEY_BLOB);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_DELG_KEY_BLOB", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_DELEGATIONS(lib);
}

static int _cffi_const_TPM_TAG_EK_BLOB(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_EK_BLOB);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_EK_BLOB", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_DELG_KEY_BLOB(lib);
}

static int _cffi_const_TPM_TAG_EK_BLOB_ACTIVATE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_EK_BLOB_ACTIVATE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_EK_BLOB_ACTIVATE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_EK_BLOB(lib);
}

static int _cffi_const_TPM_TAG_EK_BLOB_AUTH(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_EK_BLOB_AUTH);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_EK_BLOB_AUTH", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_EK_BLOB_ACTIVATE(lib);
}

static int _cffi_const_TPM_TAG_FAMILY_TABLE_ENTRY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_FAMILY_TABLE_ENTRY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_FAMILY_TABLE_ENTRY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_EK_BLOB_AUTH(lib);
}

static int _cffi_const_TPM_TAG_KEY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_KEY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_KEY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_FAMILY_TABLE_ENTRY(lib);
}

static int _cffi_const_TPM_TAG_KEY12(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_KEY12);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_KEY12", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_KEY(lib);
}

static int _cffi_const_TPM_TAG_NV_ATTRIBUTES(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_NV_ATTRIBUTES);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_NV_ATTRIBUTES", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_KEY12(lib);
}

static int _cffi_const_TPM_TAG_NV_DATA_PUBLIC(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_NV_DATA_PUBLIC);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_NV_DATA_PUBLIC", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_NV_ATTRIBUTES(lib);
}

static int _cffi_const_TPM_TAG_NV_DATA_SENSITIVE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_NV_DATA_SENSITIVE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_NV_DATA_SENSITIVE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_NV_DATA_PUBLIC(lib);
}

static int _cffi_const_TPM_TAG_PCR_INFO_LONG(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_PCR_INFO_LONG);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_PCR_INFO_LONG", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_NV_DATA_SENSITIVE(lib);
}

static int _cffi_const_TPM_TAG_PERMANENT_DATA(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_PERMANENT_DATA);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_PERMANENT_DATA", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_PCR_INFO_LONG(lib);
}

static int _cffi_const_TPM_TAG_PERMANENT_FLAGS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_PERMANENT_FLAGS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_PERMANENT_FLAGS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_PERMANENT_DATA(lib);
}

static int _cffi_const_TPM_TAG_PERSISTENT_DATA(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_PERSISTENT_DATA);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_PERSISTENT_DATA", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_PERMANENT_FLAGS(lib);
}

static int _cffi_const_TPM_TAG_PERSISTENT_FLAGS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_PERSISTENT_FLAGS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_PERSISTENT_FLAGS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_PERSISTENT_DATA(lib);
}

static int _cffi_const_TPM_TAG_QUOTE_INFO2(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_QUOTE_INFO2);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_QUOTE_INFO2", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_PERSISTENT_FLAGS(lib);
}

static int _cffi_const_TPM_TAG_RQU_AUTH1_COMMAND(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_RQU_AUTH1_COMMAND);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_RQU_AUTH1_COMMAND", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_QUOTE_INFO2(lib);
}

static int _cffi_const_TPM_TAG_RQU_AUTH2_COMMAND(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_RQU_AUTH2_COMMAND);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_RQU_AUTH2_COMMAND", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_RQU_AUTH1_COMMAND(lib);
}

static int _cffi_const_TPM_TAG_RQU_COMMAND(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_RQU_COMMAND);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_RQU_COMMAND", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_RQU_AUTH2_COMMAND(lib);
}

static int _cffi_const_TPM_TAG_RSP_AUTH1_COMMAND(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_RSP_AUTH1_COMMAND);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_RSP_AUTH1_COMMAND", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_RQU_COMMAND(lib);
}

static int _cffi_const_TPM_TAG_RSP_AUTH2_COMMAND(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_RSP_AUTH2_COMMAND);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_RSP_AUTH2_COMMAND", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_RSP_AUTH1_COMMAND(lib);
}

static int _cffi_const_TPM_TAG_RSP_COMMAND(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_RSP_COMMAND);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_RSP_COMMAND", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_RSP_AUTH2_COMMAND(lib);
}

static int _cffi_const_TPM_TAG_SIGNINFO(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_SIGNINFO);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_SIGNINFO", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_RSP_COMMAND(lib);
}

static int _cffi_const_TPM_TAG_STANY_DATA(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_STANY_DATA);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_STANY_DATA", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_SIGNINFO(lib);
}

static int _cffi_const_TPM_TAG_STANY_FLAGS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_STANY_FLAGS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_STANY_FLAGS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_STANY_DATA(lib);
}

static int _cffi_const_TPM_TAG_STCLEAR_DATA(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_STCLEAR_DATA);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_STCLEAR_DATA", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_STANY_FLAGS(lib);
}

static int _cffi_const_TPM_TAG_STCLEAR_FLAGS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_STCLEAR_FLAGS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_STCLEAR_FLAGS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_STCLEAR_DATA(lib);
}

static int _cffi_const_TPM_TAG_STORED_DATA12(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_STORED_DATA12);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_STORED_DATA12", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_STCLEAR_FLAGS(lib);
}

static int _cffi_const_TPM_TAG_SV_DATA(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_SV_DATA);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_SV_DATA", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_STORED_DATA12(lib);
}

static int _cffi_const_TPM_TAG_TRANSPORT_AUTH(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_TRANSPORT_AUTH);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_TRANSPORT_AUTH", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_SV_DATA(lib);
}

static int _cffi_const_TPM_TAG_TRANSPORT_INTERNAL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_TRANSPORT_INTERNAL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_TRANSPORT_INTERNAL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_TRANSPORT_AUTH(lib);
}

static int _cffi_const_TPM_TAG_TRANSPORT_LOG_IN(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_TRANSPORT_LOG_IN);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_TRANSPORT_LOG_IN", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_TRANSPORT_INTERNAL(lib);
}

static int _cffi_const_TPM_TAG_TRANSPORT_LOG_OUT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_TRANSPORT_LOG_OUT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_TRANSPORT_LOG_OUT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_TRANSPORT_LOG_IN(lib);
}

static int _cffi_const_TPM_TAG_TRANSPORT_PUBLIC(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_TRANSPORT_PUBLIC);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_TRANSPORT_PUBLIC", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_TRANSPORT_LOG_OUT(lib);
}

static int _cffi_const_TPM_TAG_VOLATILE_DATA(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_VOLATILE_DATA);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_VOLATILE_DATA", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_TRANSPORT_PUBLIC(lib);
}

static int _cffi_const_TPM_TAG_VOLATILE_FLAGS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TAG_VOLATILE_FLAGS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TAG_VOLATILE_FLAGS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_VOLATILE_DATA(lib);
}

static int _cffi_const_TPM_TRANSPORT_ENCRYPT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TRANSPORT_ENCRYPT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TRANSPORT_ENCRYPT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TAG_VOLATILE_FLAGS(lib);
}

static int _cffi_const_TPM_TRANSPORT_EXCLUSIVE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TRANSPORT_EXCLUSIVE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TRANSPORT_EXCLUSIVE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TRANSPORT_ENCRYPT(lib);
}

static int _cffi_const_TPM_TRANSPORT_LOG(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_TRANSPORT_LOG);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_TRANSPORT_LOG", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TRANSPORT_EXCLUSIVE(lib);
}

static int _cffi_const_TPM_VOLATILE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_VOLATILE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_VOLATILE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_TRANSPORT_LOG(lib);
}

static int _cffi_const_TPM_Vendor_Specific32(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_Vendor_Specific32);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_Vendor_Specific32", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_VOLATILE(lib);
}

static int _cffi_const_TPM_Vendor_Specific8(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TPM_Vendor_Specific8);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TPM_Vendor_Specific8", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_Vendor_Specific32(lib);
}

static int _cffi_const_TSS_ALG_3DES(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_ALG_3DES);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_ALG_3DES", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TPM_Vendor_Specific8(lib);
}

static int _cffi_const_TSS_ALG_AES(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_ALG_AES);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_ALG_AES", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_ALG_3DES(lib);
}

static int _cffi_const_TSS_ALG_AES128(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_ALG_AES128);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_ALG_AES128", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_ALG_AES(lib);
}

static int _cffi_const_TSS_ALG_AES192(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_ALG_AES192);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_ALG_AES192", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_ALG_AES128(lib);
}

static int _cffi_const_TSS_ALG_AES256(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_ALG_AES256);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_ALG_AES256", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_ALG_AES192(lib);
}

static int _cffi_const_TSS_ALG_DEFAULT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_ALG_DEFAULT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_ALG_DEFAULT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_ALG_AES256(lib);
}

static int _cffi_const_TSS_ALG_DEFAULT_SIZE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_ALG_DEFAULT_SIZE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_ALG_DEFAULT_SIZE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_ALG_DEFAULT(lib);
}

static int _cffi_const_TSS_ALG_DES(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_ALG_DES);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_ALG_DES", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_ALG_DEFAULT_SIZE(lib);
}

static int _cffi_const_TSS_ALG_HMAC(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_ALG_HMAC);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_ALG_HMAC", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_ALG_DES(lib);
}

static int _cffi_const_TSS_ALG_MGF1(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_ALG_MGF1);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_ALG_MGF1", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_ALG_HMAC(lib);
}

static int _cffi_const_TSS_ALG_RSA(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_ALG_RSA);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_ALG_RSA", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_ALG_MGF1(lib);
}

static int _cffi_const_TSS_ALG_SHA(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_ALG_SHA);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_ALG_SHA", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_ALG_RSA(lib);
}

static int _cffi_const_TSS_ALG_XOR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_ALG_XOR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_ALG_XOR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_ALG_SHA(lib);
}

static int _cffi_const_TSS_BLOB_STRUCT_VERSION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_BLOB_STRUCT_VERSION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_BLOB_STRUCT_VERSION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_ALG_XOR(lib);
}

static int _cffi_const_TSS_BLOB_TYPE_BOUNDDATA(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_BLOB_TYPE_BOUNDDATA);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_BLOB_TYPE_BOUNDDATA", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_BLOB_STRUCT_VERSION(lib);
}

static int _cffi_const_TSS_BLOB_TYPE_CERTIFY_INFO(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_BLOB_TYPE_CERTIFY_INFO);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_BLOB_TYPE_CERTIFY_INFO", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_BLOB_TYPE_BOUNDDATA(lib);
}

static int _cffi_const_TSS_BLOB_TYPE_CERTIFY_INFO_2(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_BLOB_TYPE_CERTIFY_INFO_2);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_BLOB_TYPE_CERTIFY_INFO_2", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_BLOB_TYPE_CERTIFY_INFO(lib);
}

static int _cffi_const_TSS_BLOB_TYPE_CMK_BYTE_STREAM(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_BLOB_TYPE_CMK_BYTE_STREAM);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_BLOB_TYPE_CMK_BYTE_STREAM", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_BLOB_TYPE_CERTIFY_INFO_2(lib);
}

static int _cffi_const_TSS_BLOB_TYPE_CMK_MIG_KEY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_BLOB_TYPE_CMK_MIG_KEY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_BLOB_TYPE_CMK_MIG_KEY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_BLOB_TYPE_CMK_BYTE_STREAM(lib);
}

static int _cffi_const_TSS_BLOB_TYPE_KEY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_BLOB_TYPE_KEY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_BLOB_TYPE_KEY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_BLOB_TYPE_CMK_MIG_KEY(lib);
}

static int _cffi_const_TSS_BLOB_TYPE_KEY_1_2(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_BLOB_TYPE_KEY_1_2);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_BLOB_TYPE_KEY_1_2", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_BLOB_TYPE_KEY(lib);
}

static int _cffi_const_TSS_BLOB_TYPE_MIGKEY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_BLOB_TYPE_MIGKEY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_BLOB_TYPE_MIGKEY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_BLOB_TYPE_KEY_1_2(lib);
}

static int _cffi_const_TSS_BLOB_TYPE_MIGTICKET(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_BLOB_TYPE_MIGTICKET);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_BLOB_TYPE_MIGTICKET", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_BLOB_TYPE_MIGKEY(lib);
}

static int _cffi_const_TSS_BLOB_TYPE_PRIVATEKEY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_BLOB_TYPE_PRIVATEKEY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_BLOB_TYPE_PRIVATEKEY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_BLOB_TYPE_MIGTICKET(lib);
}

static int _cffi_const_TSS_BLOB_TYPE_PRIVATEKEY_MOD1(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_BLOB_TYPE_PRIVATEKEY_MOD1);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_BLOB_TYPE_PRIVATEKEY_MOD1", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_BLOB_TYPE_PRIVATEKEY(lib);
}

static int _cffi_const_TSS_BLOB_TYPE_PUBKEY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_BLOB_TYPE_PUBKEY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_BLOB_TYPE_PUBKEY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_BLOB_TYPE_PRIVATEKEY_MOD1(lib);
}

static int _cffi_const_TSS_BLOB_TYPE_RANDOM_XOR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_BLOB_TYPE_RANDOM_XOR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_BLOB_TYPE_RANDOM_XOR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_BLOB_TYPE_PUBKEY(lib);
}

static int _cffi_const_TSS_BLOB_TYPE_SEALEDDATA(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_BLOB_TYPE_SEALEDDATA);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_BLOB_TYPE_SEALEDDATA", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_BLOB_TYPE_RANDOM_XOR(lib);
}

static int _cffi_const_TSS_CMK_DELEGATE_BIND(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_CMK_DELEGATE_BIND);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_CMK_DELEGATE_BIND", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_BLOB_TYPE_SEALEDDATA(lib);
}

static int _cffi_const_TSS_CMK_DELEGATE_LEGACY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_CMK_DELEGATE_LEGACY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_CMK_DELEGATE_LEGACY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_CMK_DELEGATE_BIND(lib);
}

static int _cffi_const_TSS_CMK_DELEGATE_MIGRATE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_CMK_DELEGATE_MIGRATE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_CMK_DELEGATE_MIGRATE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_CMK_DELEGATE_LEGACY(lib);
}

static int _cffi_const_TSS_CMK_DELEGATE_SIGNING(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_CMK_DELEGATE_SIGNING);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_CMK_DELEGATE_SIGNING", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_CMK_DELEGATE_MIGRATE(lib);
}

static int _cffi_const_TSS_CMK_DELEGATE_STORAGE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_CMK_DELEGATE_STORAGE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_CMK_DELEGATE_STORAGE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_CMK_DELEGATE_SIGNING(lib);
}

static int _cffi_const_TSS_CONNECTION_VERSION_1_1(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_CONNECTION_VERSION_1_1);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_CONNECTION_VERSION_1_1", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_CMK_DELEGATE_STORAGE(lib);
}

static int _cffi_const_TSS_CONNECTION_VERSION_1_2(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_CONNECTION_VERSION_1_2);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_CONNECTION_VERSION_1_2", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_CONNECTION_VERSION_1_1(lib);
}

static int _cffi_const_TSS_CUSTOM_CODEFLAG(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_CUSTOM_CODEFLAG);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_CUSTOM_CODEFLAG", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_CONNECTION_VERSION_1_2(lib);
}

static int _cffi_const_TSS_DAA_LENGTH_E(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_DAA_LENGTH_E);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_DAA_LENGTH_E", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_CUSTOM_CODEFLAG(lib);
}

static int _cffi_const_TSS_DAA_LENGTH_E_PRIME(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_DAA_LENGTH_E_PRIME);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_DAA_LENGTH_E_PRIME", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_DAA_LENGTH_E(lib);
}

static int _cffi_const_TSS_DAA_LENGTH_F(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_DAA_LENGTH_F);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_DAA_LENGTH_F", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_DAA_LENGTH_E_PRIME(lib);
}

static int _cffi_const_TSS_DAA_LENGTH_GAMMA(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_DAA_LENGTH_GAMMA);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_DAA_LENGTH_GAMMA", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_DAA_LENGTH_F(lib);
}

static int _cffi_const_TSS_DAA_LENGTH_HASH(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_DAA_LENGTH_HASH);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_DAA_LENGTH_HASH", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_DAA_LENGTH_GAMMA(lib);
}

static int _cffi_const_TSS_DAA_LENGTH_MFG1_GAMMA(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_DAA_LENGTH_MFG1_GAMMA);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_DAA_LENGTH_MFG1_GAMMA", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_DAA_LENGTH_HASH(lib);
}

static int _cffi_const_TSS_DAA_LENGTH_MGF1_AR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_DAA_LENGTH_MGF1_AR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_DAA_LENGTH_MGF1_AR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_DAA_LENGTH_MFG1_GAMMA(lib);
}

static int _cffi_const_TSS_DAA_LENGTH_N(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_DAA_LENGTH_N);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_DAA_LENGTH_N", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_DAA_LENGTH_MGF1_AR(lib);
}

static int _cffi_const_TSS_DAA_LENGTH_RHO(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_DAA_LENGTH_RHO);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_DAA_LENGTH_RHO", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_DAA_LENGTH_N(lib);
}

static int _cffi_const_TSS_DAA_LENGTH_S(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_DAA_LENGTH_S);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_DAA_LENGTH_S", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_DAA_LENGTH_RHO(lib);
}

static int _cffi_const_TSS_DAA_LENGTH_SAFETY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_DAA_LENGTH_SAFETY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_DAA_LENGTH_SAFETY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_DAA_LENGTH_S(lib);
}

static int _cffi_const_TSS_DAA_LENGTH_V(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_DAA_LENGTH_V);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_DAA_LENGTH_V", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_DAA_LENGTH_SAFETY(lib);
}

static int _cffi_const_TSS_DELEGATE_CACHEOWNERDELEGATION_OVERWRITEEXISTING(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_DELEGATE_CACHEOWNERDELEGATION_OVERWRITEEXISTING);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_DELEGATE_CACHEOWNERDELEGATION_OVERWRITEEXISTING", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_DAA_LENGTH_V(lib);
}

static int _cffi_const_TSS_DELEGATE_INCREMENTVERIFICATIONCOUNT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_DELEGATE_INCREMENTVERIFICATIONCOUNT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_DELEGATE_INCREMENTVERIFICATIONCOUNT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_DELEGATE_CACHEOWNERDELEGATION_OVERWRITEEXISTING(lib);
}

static int _cffi_const_TSS_DELEGATIONTYPE_KEY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_DELEGATIONTYPE_KEY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_DELEGATIONTYPE_KEY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_DELEGATE_INCREMENTVERIFICATIONCOUNT(lib);
}

static int _cffi_const_TSS_DELEGATIONTYPE_NONE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_DELEGATIONTYPE_NONE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_DELEGATIONTYPE_NONE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_DELEGATIONTYPE_KEY(lib);
}

static int _cffi_const_TSS_DELEGATIONTYPE_OWNER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_DELEGATIONTYPE_OWNER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_DELEGATIONTYPE_OWNER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_DELEGATIONTYPE_NONE(lib);
}

static int _cffi_const_TSS_ENCDATA_BIND(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_ENCDATA_BIND);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_ENCDATA_BIND", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_DELEGATIONTYPE_OWNER(lib);
}

static int _cffi_const_TSS_ENCDATA_LEGACY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_ENCDATA_LEGACY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_ENCDATA_LEGACY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_ENCDATA_BIND(lib);
}

static int _cffi_const_TSS_ENCDATA_SEAL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_ENCDATA_SEAL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_ENCDATA_SEAL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_ENCDATA_LEGACY(lib);
}

static int _cffi_const_TSS_ES_NONE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_ES_NONE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_ES_NONE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_ENCDATA_SEAL(lib);
}

static int _cffi_const_TSS_ES_RSAESOAEP_SHA1_MGF1(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_ES_RSAESOAEP_SHA1_MGF1);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_ES_RSAESOAEP_SHA1_MGF1", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_ES_NONE(lib);
}

static int _cffi_const_TSS_ES_RSAESPKCSV15(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_ES_RSAESPKCSV15);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_ES_RSAESPKCSV15", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_ES_RSAESOAEP_SHA1_MGF1(lib);
}

static int _cffi_const_TSS_ES_SYM_CBC_PKCS5PAD(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_ES_SYM_CBC_PKCS5PAD);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_ES_SYM_CBC_PKCS5PAD", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_ES_RSAESPKCSV15(lib);
}

static int _cffi_const_TSS_ES_SYM_CNT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_ES_SYM_CNT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_ES_SYM_CNT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_ES_SYM_CBC_PKCS5PAD(lib);
}

static int _cffi_const_TSS_ES_SYM_OFB(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_ES_SYM_OFB);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_ES_SYM_OFB", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_ES_SYM_CNT(lib);
}

static int _cffi_const_TSS_EV_ACTION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_EV_ACTION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_EV_ACTION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_ES_SYM_OFB(lib);
}

static int _cffi_const_TSS_EV_CODE_CERT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_EV_CODE_CERT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_EV_CODE_CERT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_EV_ACTION(lib);
}

static int _cffi_const_TSS_EV_CODE_NOCERT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_EV_CODE_NOCERT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_EV_CODE_NOCERT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_EV_CODE_CERT(lib);
}

static int _cffi_const_TSS_EV_NO_ACTION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_EV_NO_ACTION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_EV_NO_ACTION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_EV_CODE_NOCERT(lib);
}

static int _cffi_const_TSS_EV_PLATFORM_SPECIFIC(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_EV_PLATFORM_SPECIFIC);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_EV_PLATFORM_SPECIFIC", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_EV_NO_ACTION(lib);
}

static int _cffi_const_TSS_EV_SEPARATOR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_EV_SEPARATOR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_EV_SEPARATOR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_EV_PLATFORM_SPECIFIC(lib);
}

static int _cffi_const_TSS_EV_XML_CONFIG(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_EV_XML_CONFIG);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_EV_XML_CONFIG", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_EV_SEPARATOR(lib);
}

static int _cffi_const_TSS_E_BAD_PARAMETER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_BAD_PARAMETER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_BAD_PARAMETER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_EV_XML_CONFIG(lib);
}

static int _cffi_const_TSS_E_BASE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_BASE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_BASE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_BAD_PARAMETER(lib);
}

static int _cffi_const_TSS_E_CANCELED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_CANCELED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_CANCELED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_BASE(lib);
}

static int _cffi_const_TSS_E_COMM_FAILURE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_COMM_FAILURE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_COMM_FAILURE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_CANCELED(lib);
}

static int _cffi_const_TSS_E_CONNECTION_BROKEN(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_CONNECTION_BROKEN);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_CONNECTION_BROKEN", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_COMM_FAILURE(lib);
}

static int _cffi_const_TSS_E_CONNECTION_FAILED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_CONNECTION_FAILED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_CONNECTION_FAILED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_CONNECTION_BROKEN(lib);
}

static int _cffi_const_TSS_E_DAA_AR_DECRYPTION_ERROR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_DAA_AR_DECRYPTION_ERROR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_DAA_AR_DECRYPTION_ERROR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_CONNECTION_FAILED(lib);
}

static int _cffi_const_TSS_E_DAA_AUTHENTICATION_ERROR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_DAA_AUTHENTICATION_ERROR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_DAA_AUTHENTICATION_ERROR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_DAA_AR_DECRYPTION_ERROR(lib);
}

static int _cffi_const_TSS_E_DAA_CHALLENGE_RESPONSE_ERROR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_DAA_CHALLENGE_RESPONSE_ERROR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_DAA_CHALLENGE_RESPONSE_ERROR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_DAA_AUTHENTICATION_ERROR(lib);
}

static int _cffi_const_TSS_E_DAA_CREDENTIAL_PROOF_ERROR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_DAA_CREDENTIAL_PROOF_ERROR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_DAA_CREDENTIAL_PROOF_ERROR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_DAA_CHALLENGE_RESPONSE_ERROR(lib);
}

static int _cffi_const_TSS_E_DAA_CREDENTIAL_REQUEST_PROOF_ERROR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_DAA_CREDENTIAL_REQUEST_PROOF_ERROR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_DAA_CREDENTIAL_REQUEST_PROOF_ERROR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_DAA_CREDENTIAL_PROOF_ERROR(lib);
}

static int _cffi_const_TSS_E_DAA_ISSUER_KEY_ERROR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_DAA_ISSUER_KEY_ERROR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_DAA_ISSUER_KEY_ERROR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_DAA_CREDENTIAL_REQUEST_PROOF_ERROR(lib);
}

static int _cffi_const_TSS_E_DAA_PSEUDONYM_ERROR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_DAA_PSEUDONYM_ERROR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_DAA_PSEUDONYM_ERROR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_DAA_ISSUER_KEY_ERROR(lib);
}

static int _cffi_const_TSS_E_DELEGATION_NOTSET(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_DELEGATION_NOTSET);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_DELEGATION_NOTSET", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_DAA_PSEUDONYM_ERROR(lib);
}

static int _cffi_const_TSS_E_DELFAMILY_NOTFOUND(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_DELFAMILY_NOTFOUND);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_DELFAMILY_NOTFOUND", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_DELEGATION_NOTSET(lib);
}

static int _cffi_const_TSS_E_DELFAMILY_ROWEXISTS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_DELFAMILY_ROWEXISTS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_DELFAMILY_ROWEXISTS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_DELFAMILY_NOTFOUND(lib);
}

static int _cffi_const_TSS_E_EK_CHECKSUM(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_EK_CHECKSUM);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_EK_CHECKSUM", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_DELFAMILY_ROWEXISTS(lib);
}

static int _cffi_const_TSS_E_ENC_INVALID_LENGTH(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_ENC_INVALID_LENGTH);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_ENC_INVALID_LENGTH", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_EK_CHECKSUM(lib);
}

static int _cffi_const_TSS_E_ENC_INVALID_TYPE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_ENC_INVALID_TYPE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_ENC_INVALID_TYPE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_ENC_INVALID_LENGTH(lib);
}

static int _cffi_const_TSS_E_ENC_NO_DATA(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_ENC_NO_DATA);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_ENC_NO_DATA", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_ENC_INVALID_TYPE(lib);
}

static int _cffi_const_TSS_E_FAIL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_FAIL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_FAIL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_ENC_NO_DATA(lib);
}

static int _cffi_const_TSS_E_HASH_INVALID_ALG(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_HASH_INVALID_ALG);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_HASH_INVALID_ALG", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_FAIL(lib);
}

static int _cffi_const_TSS_E_HASH_INVALID_LENGTH(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_HASH_INVALID_LENGTH);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_HASH_INVALID_LENGTH", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_HASH_INVALID_ALG(lib);
}

static int _cffi_const_TSS_E_HASH_NO_DATA(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_HASH_NO_DATA);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_HASH_NO_DATA", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_HASH_INVALID_LENGTH(lib);
}

static int _cffi_const_TSS_E_HASH_NO_IDENTIFIER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_HASH_NO_IDENTIFIER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_HASH_NO_IDENTIFIER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_HASH_NO_DATA(lib);
}

static int _cffi_const_TSS_E_INTERNAL_ERROR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_INTERNAL_ERROR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_INTERNAL_ERROR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_HASH_NO_IDENTIFIER(lib);
}

static int _cffi_const_TSS_E_INVALID_ATTRIB_DATA(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_INVALID_ATTRIB_DATA);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_INVALID_ATTRIB_DATA", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_INTERNAL_ERROR(lib);
}

static int _cffi_const_TSS_E_INVALID_ATTRIB_FLAG(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_INVALID_ATTRIB_FLAG);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_INVALID_ATTRIB_FLAG", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_INVALID_ATTRIB_DATA(lib);
}

static int _cffi_const_TSS_E_INVALID_ATTRIB_SUBFLAG(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_INVALID_ATTRIB_SUBFLAG);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_INVALID_ATTRIB_SUBFLAG", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_INVALID_ATTRIB_FLAG(lib);
}

static int _cffi_const_TSS_E_INVALID_ENCSCHEME(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_INVALID_ENCSCHEME);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_INVALID_ENCSCHEME", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_INVALID_ATTRIB_SUBFLAG(lib);
}

static int _cffi_const_TSS_E_INVALID_HANDLE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_INVALID_HANDLE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_INVALID_HANDLE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_INVALID_ENCSCHEME(lib);
}

static int _cffi_const_TSS_E_INVALID_KEYUSAGE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_INVALID_KEYUSAGE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_INVALID_KEYUSAGE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_INVALID_HANDLE(lib);
}

static int _cffi_const_TSS_E_INVALID_OBJECT_INITFLAG(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_INVALID_OBJECT_INITFLAG);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_INVALID_OBJECT_INITFLAG", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_INVALID_KEYUSAGE(lib);
}

static int _cffi_const_TSS_E_INVALID_OBJECT_INIT_FLAG(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_INVALID_OBJECT_INIT_FLAG);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_INVALID_OBJECT_INIT_FLAG", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_INVALID_OBJECT_INITFLAG(lib);
}

static int _cffi_const_TSS_E_INVALID_OBJECT_TYPE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_INVALID_OBJECT_TYPE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_INVALID_OBJECT_TYPE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_INVALID_OBJECT_INIT_FLAG(lib);
}

static int _cffi_const_TSS_E_INVALID_OBJ_ACCESS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_INVALID_OBJ_ACCESS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_INVALID_OBJ_ACCESS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_INVALID_OBJECT_TYPE(lib);
}

static int _cffi_const_TSS_E_INVALID_RESOURCE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_INVALID_RESOURCE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_INVALID_RESOURCE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_INVALID_OBJ_ACCESS(lib);
}

static int _cffi_const_TSS_E_INVALID_SIGSCHEME(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_INVALID_SIGSCHEME);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_INVALID_SIGSCHEME", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_INVALID_RESOURCE(lib);
}

static int _cffi_const_TSS_E_KEY_ALREADY_REGISTERED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_KEY_ALREADY_REGISTERED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_KEY_ALREADY_REGISTERED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_INVALID_SIGSCHEME(lib);
}

static int _cffi_const_TSS_E_KEY_NOT_LOADED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_KEY_NOT_LOADED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_KEY_NOT_LOADED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_KEY_ALREADY_REGISTERED(lib);
}

static int _cffi_const_TSS_E_KEY_NOT_SET(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_KEY_NOT_SET);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_KEY_NOT_SET", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_KEY_NOT_LOADED(lib);
}

static int _cffi_const_TSS_E_KEY_NO_MIGRATION_POLICY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_KEY_NO_MIGRATION_POLICY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_KEY_NO_MIGRATION_POLICY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_KEY_NOT_SET(lib);
}

static int _cffi_const_TSS_E_NOTIMPL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_NOTIMPL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_NOTIMPL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_KEY_NO_MIGRATION_POLICY(lib);
}

static int _cffi_const_TSS_E_NO_ACTIVE_COUNTER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_NO_ACTIVE_COUNTER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_NO_ACTIVE_COUNTER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_NOTIMPL(lib);
}

static int _cffi_const_TSS_E_NO_CONNECTION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_NO_CONNECTION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_NO_CONNECTION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_NO_ACTIVE_COUNTER(lib);
}

static int _cffi_const_TSS_E_NO_PCRS_SET(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_NO_PCRS_SET);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_NO_PCRS_SET", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_NO_CONNECTION(lib);
}

static int _cffi_const_TSS_E_NV_AREA_EXIST(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_NV_AREA_EXIST);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_NV_AREA_EXIST", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_NO_PCRS_SET(lib);
}

static int _cffi_const_TSS_E_NV_AREA_NOT_EXIST(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_NV_AREA_NOT_EXIST);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_NV_AREA_NOT_EXIST", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_NV_AREA_EXIST(lib);
}

static int _cffi_const_TSS_E_OUTOFMEMORY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_OUTOFMEMORY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_OUTOFMEMORY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_NV_AREA_NOT_EXIST(lib);
}

static int _cffi_const_TSS_E_POLICY_NO_SECRET(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_POLICY_NO_SECRET);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_POLICY_NO_SECRET", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_OUTOFMEMORY(lib);
}

static int _cffi_const_TSS_E_PS_BAD_KEY_STATE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_PS_BAD_KEY_STATE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_PS_BAD_KEY_STATE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_POLICY_NO_SECRET(lib);
}

static int _cffi_const_TSS_E_PS_KEY_EXISTS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_PS_KEY_EXISTS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_PS_KEY_EXISTS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_PS_BAD_KEY_STATE(lib);
}

static int _cffi_const_TSS_E_PS_KEY_NOTFOUND(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_PS_KEY_NOTFOUND);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_PS_KEY_NOTFOUND", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_PS_KEY_EXISTS(lib);
}

static int _cffi_const_TSS_E_SILENT_CONTEXT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_SILENT_CONTEXT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_SILENT_CONTEXT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_PS_KEY_NOTFOUND(lib);
}

static int _cffi_const_TSS_E_TIMEOUT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_TIMEOUT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_TIMEOUT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_SILENT_CONTEXT(lib);
}

static int _cffi_const_TSS_E_TPM_UNEXPECTED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_TPM_UNEXPECTED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_TPM_UNEXPECTED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_TIMEOUT(lib);
}

static int _cffi_const_TSS_E_TPM_UNSUPPORTED_FEATURE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_TPM_UNSUPPORTED_FEATURE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_TPM_UNSUPPORTED_FEATURE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_TPM_UNEXPECTED(lib);
}

static int _cffi_const_TSS_E_TSP_AUTH2FAIL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_TSP_AUTH2FAIL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_TSP_AUTH2FAIL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_TPM_UNSUPPORTED_FEATURE(lib);
}

static int _cffi_const_TSS_E_TSP_AUTH2REQUIRED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_TSP_AUTH2REQUIRED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_TSP_AUTH2REQUIRED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_TSP_AUTH2FAIL(lib);
}

static int _cffi_const_TSS_E_TSP_AUTHFAIL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_TSP_AUTHFAIL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_TSP_AUTHFAIL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_TSP_AUTH2REQUIRED(lib);
}

static int _cffi_const_TSS_E_TSP_AUTHREQUIRED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_TSP_AUTHREQUIRED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_TSP_AUTHREQUIRED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_TSP_AUTHFAIL(lib);
}

static int _cffi_const_TSS_E_TSP_TRANS_AUTHFAIL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_TSP_TRANS_AUTHFAIL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_TSP_TRANS_AUTHFAIL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_TSP_AUTHREQUIRED(lib);
}

static int _cffi_const_TSS_E_TSP_TRANS_AUTHREQUIRED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_TSP_TRANS_AUTHREQUIRED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_TSP_TRANS_AUTHREQUIRED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_TSP_TRANS_AUTHFAIL(lib);
}

static int _cffi_const_TSS_E_TSP_TRANS_FAIL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_TSP_TRANS_FAIL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_TSP_TRANS_FAIL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_TSP_TRANS_AUTHREQUIRED(lib);
}

static int _cffi_const_TSS_E_TSP_TRANS_NOTEXCLUSIVE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_TSP_TRANS_NOTEXCLUSIVE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_TSP_TRANS_NOTEXCLUSIVE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_TSP_TRANS_FAIL(lib);
}

static int _cffi_const_TSS_E_TSP_TRANS_NO_PUBKEY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_TSP_TRANS_NO_PUBKEY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_TSP_TRANS_NO_PUBKEY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_TSP_TRANS_NOTEXCLUSIVE(lib);
}

static int _cffi_const_TSS_E_VALIDATION_FAILED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_VALIDATION_FAILED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_VALIDATION_FAILED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_TSP_TRANS_NO_PUBKEY(lib);
}

static int _cffi_const_TSS_E_VERIFICATION_FAILED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_VERIFICATION_FAILED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_VERIFICATION_FAILED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_VALIDATION_FAILED(lib);
}

static int _cffi_const_TSS_E_VERSION_MISMATCH(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_E_VERSION_MISMATCH);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_E_VERSION_MISMATCH", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_VERIFICATION_FAILED(lib);
}

static int _cffi_const_TSS_FLAG_DAA_PSEUDONYM_ENCRYPTED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_FLAG_DAA_PSEUDONYM_ENCRYPTED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_FLAG_DAA_PSEUDONYM_ENCRYPTED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_E_VERSION_MISMATCH(lib);
}

static int _cffi_const_TSS_FLAG_DAA_PSEUDONYM_PLAIN(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_FLAG_DAA_PSEUDONYM_PLAIN);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_FLAG_DAA_PSEUDONYM_PLAIN", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_FLAG_DAA_PSEUDONYM_ENCRYPTED(lib);
}

static int _cffi_const_TSS_HASH_DEFAULT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_HASH_DEFAULT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_HASH_DEFAULT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_FLAG_DAA_PSEUDONYM_PLAIN(lib);
}

static int _cffi_const_TSS_HASH_OTHER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_HASH_OTHER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_HASH_OTHER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_HASH_DEFAULT(lib);
}

static int _cffi_const_TSS_HASH_SHA1(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_HASH_SHA1);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_HASH_SHA1", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_HASH_OTHER(lib);
}

static int _cffi_const_TSS_I_BASE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_I_BASE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_I_BASE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_HASH_SHA1(lib);
}

static int _cffi_const_TSS_KEYAUTH_AUTH_ALWAYS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEYAUTH_AUTH_ALWAYS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEYAUTH_AUTH_ALWAYS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_I_BASE(lib);
}

static int _cffi_const_TSS_KEYAUTH_AUTH_NEVER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEYAUTH_AUTH_NEVER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEYAUTH_AUTH_NEVER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEYAUTH_AUTH_ALWAYS(lib);
}

static int _cffi_const_TSS_KEYAUTH_AUTH_PRIV_USE_ONLY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEYAUTH_AUTH_PRIV_USE_ONLY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEYAUTH_AUTH_PRIV_USE_ONLY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEYAUTH_AUTH_NEVER(lib);
}

static int _cffi_const_TSS_KEYFLAG_CERTIFIED_MIGRATABLE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEYFLAG_CERTIFIED_MIGRATABLE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEYFLAG_CERTIFIED_MIGRATABLE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEYAUTH_AUTH_PRIV_USE_ONLY(lib);
}

static int _cffi_const_TSS_KEYFLAG_MIGRATABLE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEYFLAG_MIGRATABLE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEYFLAG_MIGRATABLE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEYFLAG_CERTIFIED_MIGRATABLE(lib);
}

static int _cffi_const_TSS_KEYFLAG_REDIRECTION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEYFLAG_REDIRECTION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEYFLAG_REDIRECTION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEYFLAG_MIGRATABLE(lib);
}

static int _cffi_const_TSS_KEYFLAG_VOLATILEKEY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEYFLAG_VOLATILEKEY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEYFLAG_VOLATILEKEY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEYFLAG_REDIRECTION(lib);
}

static int _cffi_const_TSS_KEYUSAGE_AUTHCHANGE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEYUSAGE_AUTHCHANGE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEYUSAGE_AUTHCHANGE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEYFLAG_VOLATILEKEY(lib);
}

static int _cffi_const_TSS_KEYUSAGE_BIND(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEYUSAGE_BIND);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEYUSAGE_BIND", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEYUSAGE_AUTHCHANGE(lib);
}

static int _cffi_const_TSS_KEYUSAGE_IDENTITY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEYUSAGE_IDENTITY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEYUSAGE_IDENTITY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEYUSAGE_BIND(lib);
}

static int _cffi_const_TSS_KEYUSAGE_LEGACY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEYUSAGE_LEGACY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEYUSAGE_LEGACY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEYUSAGE_IDENTITY(lib);
}

static int _cffi_const_TSS_KEYUSAGE_MIGRATE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEYUSAGE_MIGRATE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEYUSAGE_MIGRATE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEYUSAGE_LEGACY(lib);
}

static int _cffi_const_TSS_KEYUSAGE_SIGN(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEYUSAGE_SIGN);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEYUSAGE_SIGN", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEYUSAGE_MIGRATE(lib);
}

static int _cffi_const_TSS_KEYUSAGE_STORAGE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEYUSAGE_STORAGE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEYUSAGE_STORAGE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEYUSAGE_SIGN(lib);
}

static int _cffi_const_TSS_KEY_AUTHORIZATION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_AUTHORIZATION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_AUTHORIZATION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEYUSAGE_STORAGE(lib);
}

static int _cffi_const_TSS_KEY_AUTHORIZATION_PRIV_USE_ONLY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_AUTHORIZATION_PRIV_USE_ONLY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_AUTHORIZATION_PRIV_USE_ONLY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_AUTHORIZATION(lib);
}

static int _cffi_const_TSS_KEY_CERTIFIED_MIGRATABLE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_CERTIFIED_MIGRATABLE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_CERTIFIED_MIGRATABLE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_AUTHORIZATION_PRIV_USE_ONLY(lib);
}

static int _cffi_const_TSS_KEY_EMPTY_KEY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_EMPTY_KEY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_EMPTY_KEY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_CERTIFIED_MIGRATABLE(lib);
}

static int _cffi_const_TSS_KEY_MIGRATABLE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_MIGRATABLE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_MIGRATABLE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_EMPTY_KEY(lib);
}

static int _cffi_const_TSS_KEY_NON_VOLATILE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_NON_VOLATILE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_NON_VOLATILE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_MIGRATABLE(lib);
}

static int _cffi_const_TSS_KEY_NOT_CERTIFIED_MIGRATABLE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_NOT_CERTIFIED_MIGRATABLE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_NOT_CERTIFIED_MIGRATABLE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_NON_VOLATILE(lib);
}

static int _cffi_const_TSS_KEY_NOT_MIGRATABLE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_NOT_MIGRATABLE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_NOT_MIGRATABLE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_NOT_CERTIFIED_MIGRATABLE(lib);
}

static int _cffi_const_TSS_KEY_NO_AUTHORIZATION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_NO_AUTHORIZATION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_NO_AUTHORIZATION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_NOT_MIGRATABLE(lib);
}

static int _cffi_const_TSS_KEY_SIZEVAL_1024BIT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_SIZEVAL_1024BIT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_SIZEVAL_1024BIT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_NO_AUTHORIZATION(lib);
}

static int _cffi_const_TSS_KEY_SIZEVAL_16384BIT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_SIZEVAL_16384BIT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_SIZEVAL_16384BIT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_SIZEVAL_1024BIT(lib);
}

static int _cffi_const_TSS_KEY_SIZEVAL_2048BIT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_SIZEVAL_2048BIT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_SIZEVAL_2048BIT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_SIZEVAL_16384BIT(lib);
}

static int _cffi_const_TSS_KEY_SIZEVAL_4096BIT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_SIZEVAL_4096BIT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_SIZEVAL_4096BIT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_SIZEVAL_2048BIT(lib);
}

static int _cffi_const_TSS_KEY_SIZEVAL_512BIT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_SIZEVAL_512BIT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_SIZEVAL_512BIT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_SIZEVAL_4096BIT(lib);
}

static int _cffi_const_TSS_KEY_SIZEVAL_8192BIT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_SIZEVAL_8192BIT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_SIZEVAL_8192BIT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_SIZEVAL_512BIT(lib);
}

static int _cffi_const_TSS_KEY_SIZE_1024(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_SIZE_1024);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_SIZE_1024", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_SIZEVAL_8192BIT(lib);
}

static int _cffi_const_TSS_KEY_SIZE_16384(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_SIZE_16384);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_SIZE_16384", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_SIZE_1024(lib);
}

static int _cffi_const_TSS_KEY_SIZE_2048(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_SIZE_2048);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_SIZE_2048", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_SIZE_16384(lib);
}

static int _cffi_const_TSS_KEY_SIZE_4096(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_SIZE_4096);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_SIZE_4096", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_SIZE_2048(lib);
}

static int _cffi_const_TSS_KEY_SIZE_512(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_SIZE_512);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_SIZE_512", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_SIZE_4096(lib);
}

static int _cffi_const_TSS_KEY_SIZE_8192(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_SIZE_8192);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_SIZE_8192", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_SIZE_512(lib);
}

static int _cffi_const_TSS_KEY_SIZE_BITMASK(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_SIZE_BITMASK);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_SIZE_BITMASK", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_SIZE_8192(lib);
}

static int _cffi_const_TSS_KEY_SIZE_DEFAULT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_SIZE_DEFAULT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_SIZE_DEFAULT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_SIZE_BITMASK(lib);
}

static int _cffi_const_TSS_KEY_STRUCT_BITMASK(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_STRUCT_BITMASK);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_STRUCT_BITMASK", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_SIZE_DEFAULT(lib);
}

static int _cffi_const_TSS_KEY_STRUCT_DEFAULT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_STRUCT_DEFAULT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_STRUCT_DEFAULT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_STRUCT_BITMASK(lib);
}

static int _cffi_const_TSS_KEY_STRUCT_KEY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_STRUCT_KEY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_STRUCT_KEY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_STRUCT_DEFAULT(lib);
}

static int _cffi_const_TSS_KEY_STRUCT_KEY12(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_STRUCT_KEY12);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_STRUCT_KEY12", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_STRUCT_KEY(lib);
}

static int _cffi_const_TSS_KEY_TEMPLATE_BITMASK(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_TEMPLATE_BITMASK);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_TEMPLATE_BITMASK", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_STRUCT_KEY12(lib);
}

static int _cffi_const_TSS_KEY_TSP_SRK(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_TSP_SRK);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_TSP_SRK", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_TEMPLATE_BITMASK(lib);
}

static int _cffi_const_TSS_KEY_TYPE_AUTHCHANGE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_TYPE_AUTHCHANGE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_TYPE_AUTHCHANGE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_TSP_SRK(lib);
}

static int _cffi_const_TSS_KEY_TYPE_BIND(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_TYPE_BIND);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_TYPE_BIND", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_TYPE_AUTHCHANGE(lib);
}

static int _cffi_const_TSS_KEY_TYPE_BITMASK(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_TYPE_BITMASK);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_TYPE_BITMASK", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_TYPE_BIND(lib);
}

static int _cffi_const_TSS_KEY_TYPE_DEFAULT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_TYPE_DEFAULT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_TYPE_DEFAULT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_TYPE_BITMASK(lib);
}

static int _cffi_const_TSS_KEY_TYPE_IDENTITY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_TYPE_IDENTITY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_TYPE_IDENTITY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_TYPE_DEFAULT(lib);
}

static int _cffi_const_TSS_KEY_TYPE_LEGACY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_TYPE_LEGACY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_TYPE_LEGACY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_TYPE_IDENTITY(lib);
}

static int _cffi_const_TSS_KEY_TYPE_MIGRATE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_TYPE_MIGRATE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_TYPE_MIGRATE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_TYPE_LEGACY(lib);
}

static int _cffi_const_TSS_KEY_TYPE_SIGNING(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_TYPE_SIGNING);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_TYPE_SIGNING", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_TYPE_MIGRATE(lib);
}

static int _cffi_const_TSS_KEY_TYPE_STORAGE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_TYPE_STORAGE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_TYPE_STORAGE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_TYPE_SIGNING(lib);
}

static int _cffi_const_TSS_KEY_VOLATILE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_KEY_VOLATILE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_KEY_VOLATILE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_TYPE_STORAGE(lib);
}

static int _cffi_const_TSS_LEVEL_ERROR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_LEVEL_ERROR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_LEVEL_ERROR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_KEY_VOLATILE(lib);
}

static int _cffi_const_TSS_LEVEL_INFO(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_LEVEL_INFO);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_LEVEL_INFO", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_LEVEL_ERROR(lib);
}

static int _cffi_const_TSS_LEVEL_SUCCESS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_LEVEL_SUCCESS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_LEVEL_SUCCESS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_LEVEL_INFO(lib);
}

static int _cffi_const_TSS_LEVEL_WARNING(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_LEVEL_WARNING);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_LEVEL_WARNING", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_LEVEL_SUCCESS(lib);
}

static int _cffi_const_TSS_MIGATTRIB_AUTHORITY_APPROVAL_HMAC(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_MIGATTRIB_AUTHORITY_APPROVAL_HMAC);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_MIGATTRIB_AUTHORITY_APPROVAL_HMAC", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_LEVEL_WARNING(lib);
}

static int _cffi_const_TSS_MIGATTRIB_AUTHORITY_DATA(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_MIGATTRIB_AUTHORITY_DATA);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_MIGATTRIB_AUTHORITY_DATA", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_MIGATTRIB_AUTHORITY_APPROVAL_HMAC(lib);
}

static int _cffi_const_TSS_MIGATTRIB_AUTHORITY_DIGEST(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_MIGATTRIB_AUTHORITY_DIGEST);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_MIGATTRIB_AUTHORITY_DIGEST", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_MIGATTRIB_AUTHORITY_DATA(lib);
}

static int _cffi_const_TSS_MIGATTRIB_AUTHORITY_MSALIST(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_MIGATTRIB_AUTHORITY_MSALIST);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_MIGATTRIB_AUTHORITY_MSALIST", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_MIGATTRIB_AUTHORITY_DIGEST(lib);
}

static int _cffi_const_TSS_MIGATTRIB_MIGRATIONBLOB(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_MIGATTRIB_MIGRATIONBLOB);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_MIGATTRIB_MIGRATIONBLOB", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_MIGATTRIB_AUTHORITY_MSALIST(lib);
}

static int _cffi_const_TSS_MIGATTRIB_MIGRATIONTICKET(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_MIGATTRIB_MIGRATIONTICKET);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_MIGATTRIB_MIGRATIONTICKET", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_MIGATTRIB_MIGRATIONBLOB(lib);
}

static int _cffi_const_TSS_MIGATTRIB_MIGRATION_REWRAPPED_BLOB(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_MIGATTRIB_MIGRATION_REWRAPPED_BLOB);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_MIGATTRIB_MIGRATION_REWRAPPED_BLOB", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_MIGATTRIB_MIGRATIONTICKET(lib);
}

static int _cffi_const_TSS_MIGATTRIB_MIGRATION_XOR_BLOB(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_MIGATTRIB_MIGRATION_XOR_BLOB);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_MIGATTRIB_MIGRATION_XOR_BLOB", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_MIGATTRIB_MIGRATION_REWRAPPED_BLOB(lib);
}

static int _cffi_const_TSS_MIGATTRIB_MIG_AUTHORITY_PUBKEY_BLOB(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_MIGATTRIB_MIG_AUTHORITY_PUBKEY_BLOB);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_MIGATTRIB_MIG_AUTHORITY_PUBKEY_BLOB", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_MIGATTRIB_MIGRATION_XOR_BLOB(lib);
}

static int _cffi_const_TSS_MIGATTRIB_MIG_AUTH_AUTHORITY_DIGEST(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_MIGATTRIB_MIG_AUTH_AUTHORITY_DIGEST);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_MIGATTRIB_MIG_AUTH_AUTHORITY_DIGEST", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_MIGATTRIB_MIG_AUTHORITY_PUBKEY_BLOB(lib);
}

static int _cffi_const_TSS_MIGATTRIB_MIG_AUTH_DATA(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_MIGATTRIB_MIG_AUTH_DATA);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_MIGATTRIB_MIG_AUTH_DATA", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_MIGATTRIB_MIG_AUTH_AUTHORITY_DIGEST(lib);
}

static int _cffi_const_TSS_MIGATTRIB_MIG_AUTH_DESTINATION_DIGEST(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_MIGATTRIB_MIG_AUTH_DESTINATION_DIGEST);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_MIGATTRIB_MIG_AUTH_DESTINATION_DIGEST", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_MIGATTRIB_MIG_AUTH_DATA(lib);
}

static int _cffi_const_TSS_MIGATTRIB_MIG_AUTH_SOURCE_DIGEST(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_MIGATTRIB_MIG_AUTH_SOURCE_DIGEST);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_MIGATTRIB_MIG_AUTH_SOURCE_DIGEST", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_MIGATTRIB_MIG_AUTH_DESTINATION_DIGEST(lib);
}

static int _cffi_const_TSS_MIGATTRIB_MIG_DESTINATION_PUBKEY_BLOB(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_MIGATTRIB_MIG_DESTINATION_PUBKEY_BLOB);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_MIGATTRIB_MIG_DESTINATION_PUBKEY_BLOB", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_MIGATTRIB_MIG_AUTH_SOURCE_DIGEST(lib);
}

static int _cffi_const_TSS_MIGATTRIB_MIG_MSALIST_PUBKEY_BLOB(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_MIGATTRIB_MIG_MSALIST_PUBKEY_BLOB);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_MIGATTRIB_MIG_MSALIST_PUBKEY_BLOB", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_MIGATTRIB_MIG_DESTINATION_PUBKEY_BLOB(lib);
}

static int _cffi_const_TSS_MIGATTRIB_MIG_REWRAPPED_BLOB(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_MIGATTRIB_MIG_REWRAPPED_BLOB);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_MIGATTRIB_MIG_REWRAPPED_BLOB", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_MIGATTRIB_MIG_MSALIST_PUBKEY_BLOB(lib);
}

static int _cffi_const_TSS_MIGATTRIB_MIG_SOURCE_PUBKEY_BLOB(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_MIGATTRIB_MIG_SOURCE_PUBKEY_BLOB);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_MIGATTRIB_MIG_SOURCE_PUBKEY_BLOB", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_MIGATTRIB_MIG_REWRAPPED_BLOB(lib);
}

static int _cffi_const_TSS_MIGATTRIB_MIG_XOR_BLOB(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_MIGATTRIB_MIG_XOR_BLOB);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_MIGATTRIB_MIG_XOR_BLOB", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_MIGATTRIB_MIG_SOURCE_PUBKEY_BLOB(lib);
}

static int _cffi_const_TSS_MIGATTRIB_PAYLOAD_TYPE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_MIGATTRIB_PAYLOAD_TYPE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_MIGATTRIB_PAYLOAD_TYPE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_MIGATTRIB_MIG_XOR_BLOB(lib);
}

static int _cffi_const_TSS_MIGATTRIB_PT_MIGRATE_EXTERNAL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_MIGATTRIB_PT_MIGRATE_EXTERNAL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_MIGATTRIB_PT_MIGRATE_EXTERNAL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_MIGATTRIB_PAYLOAD_TYPE(lib);
}

static int _cffi_const_TSS_MIGATTRIB_PT_MIGRATE_RESTRICTED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_MIGATTRIB_PT_MIGRATE_RESTRICTED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_MIGATTRIB_PT_MIGRATE_RESTRICTED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_MIGATTRIB_PT_MIGRATE_EXTERNAL(lib);
}

static int _cffi_const_TSS_MIGATTRIB_TICKET_DATA(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_MIGATTRIB_TICKET_DATA);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_MIGATTRIB_TICKET_DATA", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_MIGATTRIB_PT_MIGRATE_RESTRICTED(lib);
}

static int _cffi_const_TSS_MIGATTRIB_TICKET_RESTRICT_TICKET(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_MIGATTRIB_TICKET_RESTRICT_TICKET);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_MIGATTRIB_TICKET_RESTRICT_TICKET", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_MIGATTRIB_TICKET_DATA(lib);
}

static int _cffi_const_TSS_MIGATTRIB_TICKET_SIG_DIGEST(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_MIGATTRIB_TICKET_SIG_DIGEST);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_MIGATTRIB_TICKET_SIG_DIGEST", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_MIGATTRIB_TICKET_RESTRICT_TICKET(lib);
}

static int _cffi_const_TSS_MIGATTRIB_TICKET_SIG_TICKET(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_MIGATTRIB_TICKET_SIG_TICKET);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_MIGATTRIB_TICKET_SIG_TICKET", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_MIGATTRIB_TICKET_SIG_DIGEST(lib);
}

static int _cffi_const_TSS_MIGATTRIB_TICKET_SIG_VALUE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_MIGATTRIB_TICKET_SIG_VALUE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_MIGATTRIB_TICKET_SIG_VALUE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_MIGATTRIB_TICKET_SIG_TICKET(lib);
}

static int _cffi_const_TSS_MS_MAINT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_MS_MAINT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_MS_MAINT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_MIGATTRIB_TICKET_SIG_VALUE(lib);
}

static int _cffi_const_TSS_MS_MIGRATE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_MS_MIGRATE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_MS_MIGRATE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_MS_MAINT(lib);
}

static int _cffi_const_TSS_MS_RESTRICT_APPROVE_DOUBLE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_MS_RESTRICT_APPROVE_DOUBLE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_MS_RESTRICT_APPROVE_DOUBLE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_MS_MIGRATE(lib);
}

static int _cffi_const_TSS_MS_RESTRICT_MIGRATE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_MS_RESTRICT_MIGRATE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_MS_RESTRICT_MIGRATE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_MS_RESTRICT_APPROVE_DOUBLE(lib);
}

static int _cffi_const_TSS_MS_RESTRICT_MIGRATE_EXTERNAL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_MS_RESTRICT_MIGRATE_EXTERNAL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_MS_RESTRICT_MIGRATE_EXTERNAL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_MS_RESTRICT_MIGRATE(lib);
}

static int _cffi_const_TSS_MS_REWRAP(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_MS_REWRAP);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_MS_REWRAP", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_MS_RESTRICT_MIGRATE_EXTERNAL(lib);
}

static int _cffi_const_TSS_NV_DEFINED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_NV_DEFINED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_NV_DEFINED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_MS_REWRAP(lib);
}

static int _cffi_const_TSS_NV_INDEX_SESSIONS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_NV_INDEX_SESSIONS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_NV_INDEX_SESSIONS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_NV_DEFINED(lib);
}

static int _cffi_const_TSS_NV_MASK_DEFINED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_NV_MASK_DEFINED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_NV_MASK_DEFINED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_NV_INDEX_SESSIONS(lib);
}

static int _cffi_const_TSS_NV_MASK_INDEX(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_NV_MASK_INDEX);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_NV_MASK_INDEX", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_NV_MASK_DEFINED(lib);
}

static int _cffi_const_TSS_NV_MASK_PLATFORM(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_NV_MASK_PLATFORM);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_NV_MASK_PLATFORM", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_NV_MASK_INDEX(lib);
}

static int _cffi_const_TSS_NV_MASK_PURVIEW(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_NV_MASK_PURVIEW);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_NV_MASK_PURVIEW", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_NV_MASK_PLATFORM(lib);
}

static int _cffi_const_TSS_NV_MASK_RESERVED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_NV_MASK_RESERVED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_NV_MASK_RESERVED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_NV_MASK_PURVIEW(lib);
}

static int _cffi_const_TSS_NV_MASK_TPM(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_NV_MASK_TPM);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_NV_MASK_TPM", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_NV_MASK_RESERVED(lib);
}

static int _cffi_const_TSS_NV_MASK_USER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_NV_MASK_USER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_NV_MASK_USER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_NV_MASK_TPM(lib);
}

static int _cffi_const_TSS_NV_PLATFORM(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_NV_PLATFORM);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_NV_PLATFORM", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_NV_MASK_USER(lib);
}

static int _cffi_const_TSS_NV_TPM(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_NV_TPM);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_NV_TPM", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_NV_PLATFORM(lib);
}

static int _cffi_const_TSS_NV_USER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_NV_USER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_NV_USER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_NV_TPM(lib);
}

static int _cffi_const_TSS_OBJECT_TYPE_DAA_ARA_KEY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_OBJECT_TYPE_DAA_ARA_KEY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_OBJECT_TYPE_DAA_ARA_KEY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_NV_USER(lib);
}

static int _cffi_const_TSS_OBJECT_TYPE_DAA_CERTIFICATE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_OBJECT_TYPE_DAA_CERTIFICATE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_OBJECT_TYPE_DAA_CERTIFICATE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_OBJECT_TYPE_DAA_ARA_KEY(lib);
}

static int _cffi_const_TSS_OBJECT_TYPE_DAA_ISSUER_KEY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_OBJECT_TYPE_DAA_ISSUER_KEY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_OBJECT_TYPE_DAA_ISSUER_KEY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_OBJECT_TYPE_DAA_CERTIFICATE(lib);
}

static int _cffi_const_TSS_OBJECT_TYPE_DELFAMILY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_OBJECT_TYPE_DELFAMILY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_OBJECT_TYPE_DELFAMILY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_OBJECT_TYPE_DAA_ISSUER_KEY(lib);
}

static int _cffi_const_TSS_OBJECT_TYPE_ENCDATA(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_OBJECT_TYPE_ENCDATA);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_OBJECT_TYPE_ENCDATA", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_OBJECT_TYPE_DELFAMILY(lib);
}

static int _cffi_const_TSS_OBJECT_TYPE_HASH(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_OBJECT_TYPE_HASH);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_OBJECT_TYPE_HASH", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_OBJECT_TYPE_ENCDATA(lib);
}

static int _cffi_const_TSS_OBJECT_TYPE_MIGDATA(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_OBJECT_TYPE_MIGDATA);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_OBJECT_TYPE_MIGDATA", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_OBJECT_TYPE_HASH(lib);
}

static int _cffi_const_TSS_OBJECT_TYPE_NV(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_OBJECT_TYPE_NV);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_OBJECT_TYPE_NV", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_OBJECT_TYPE_MIGDATA(lib);
}

static int _cffi_const_TSS_OBJECT_TYPE_PCRS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_OBJECT_TYPE_PCRS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_OBJECT_TYPE_PCRS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_OBJECT_TYPE_NV(lib);
}

static int _cffi_const_TSS_OBJECT_TYPE_POLICY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_OBJECT_TYPE_POLICY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_OBJECT_TYPE_POLICY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_OBJECT_TYPE_PCRS(lib);
}

static int _cffi_const_TSS_OBJECT_TYPE_RSAKEY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_OBJECT_TYPE_RSAKEY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_OBJECT_TYPE_RSAKEY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_OBJECT_TYPE_POLICY(lib);
}

static int _cffi_const_TSS_PCRS_DIRECTION_CREATION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_PCRS_DIRECTION_CREATION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_PCRS_DIRECTION_CREATION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_OBJECT_TYPE_RSAKEY(lib);
}

static int _cffi_const_TSS_PCRS_DIRECTION_RELEASE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_PCRS_DIRECTION_RELEASE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_PCRS_DIRECTION_RELEASE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_PCRS_DIRECTION_CREATION(lib);
}

static int _cffi_const_TSS_PCRS_STRUCT_DEFAULT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_PCRS_STRUCT_DEFAULT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_PCRS_STRUCT_DEFAULT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_PCRS_DIRECTION_RELEASE(lib);
}

static int _cffi_const_TSS_PCRS_STRUCT_INFO(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_PCRS_STRUCT_INFO);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_PCRS_STRUCT_INFO", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_PCRS_STRUCT_DEFAULT(lib);
}

static int _cffi_const_TSS_PCRS_STRUCT_INFO_LONG(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_PCRS_STRUCT_INFO_LONG);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_PCRS_STRUCT_INFO_LONG", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_PCRS_STRUCT_INFO(lib);
}

static int _cffi_const_TSS_PCRS_STRUCT_INFO_SHORT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_PCRS_STRUCT_INFO_SHORT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_PCRS_STRUCT_INFO_SHORT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_PCRS_STRUCT_INFO_LONG(lib);
}

static int _cffi_const_TSS_POLICY_MIGRATION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_POLICY_MIGRATION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_POLICY_MIGRATION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_PCRS_STRUCT_INFO_SHORT(lib);
}

static int _cffi_const_TSS_POLICY_OPERATOR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_POLICY_OPERATOR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_POLICY_OPERATOR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_POLICY_MIGRATION(lib);
}

static int _cffi_const_TSS_POLICY_USAGE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_POLICY_USAGE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_POLICY_USAGE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_POLICY_OPERATOR(lib);
}

static int _cffi_const_TSS_PS_TYPE_SYSTEM(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_PS_TYPE_SYSTEM);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_PS_TYPE_SYSTEM", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_POLICY_USAGE(lib);
}

static int _cffi_const_TSS_PS_TYPE_USER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_PS_TYPE_USER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_PS_TYPE_USER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_PS_TYPE_SYSTEM(lib);
}

static int _cffi_const_TSS_RT_AUTH(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_RT_AUTH);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_RT_AUTH", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_PS_TYPE_USER(lib);
}

static int _cffi_const_TSS_RT_COUNTER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_RT_COUNTER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_RT_COUNTER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_RT_AUTH(lib);
}

static int _cffi_const_TSS_RT_KEY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_RT_KEY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_RT_KEY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_RT_COUNTER(lib);
}

static int _cffi_const_TSS_RT_TRANS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_RT_TRANS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_RT_TRANS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_RT_KEY(lib);
}

static int _cffi_const_TSS_SECRET_LIFETIME_ALWAYS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_SECRET_LIFETIME_ALWAYS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_SECRET_LIFETIME_ALWAYS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_RT_TRANS(lib);
}

static int _cffi_const_TSS_SECRET_LIFETIME_COUNTER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_SECRET_LIFETIME_COUNTER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_SECRET_LIFETIME_COUNTER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_SECRET_LIFETIME_ALWAYS(lib);
}

static int _cffi_const_TSS_SECRET_LIFETIME_TIMER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_SECRET_LIFETIME_TIMER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_SECRET_LIFETIME_TIMER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_SECRET_LIFETIME_COUNTER(lib);
}

static int _cffi_const_TSS_SECRET_MODE_CALLBACK(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_SECRET_MODE_CALLBACK);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_SECRET_MODE_CALLBACK", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_SECRET_LIFETIME_TIMER(lib);
}

static int _cffi_const_TSS_SECRET_MODE_NONE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_SECRET_MODE_NONE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_SECRET_MODE_NONE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_SECRET_MODE_CALLBACK(lib);
}

static int _cffi_const_TSS_SECRET_MODE_PLAIN(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_SECRET_MODE_PLAIN);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_SECRET_MODE_PLAIN", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_SECRET_MODE_NONE(lib);
}

static int _cffi_const_TSS_SECRET_MODE_POPUP(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_SECRET_MODE_POPUP);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_SECRET_MODE_POPUP", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_SECRET_MODE_PLAIN(lib);
}

static int _cffi_const_TSS_SECRET_MODE_SHA1(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_SECRET_MODE_SHA1);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_SECRET_MODE_SHA1", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_SECRET_MODE_POPUP(lib);
}

static int _cffi_const_TSS_SS_NONE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_SS_NONE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_SS_NONE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_SECRET_MODE_SHA1(lib);
}

static int _cffi_const_TSS_SS_RSASSAPKCS1V15_DER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_SS_RSASSAPKCS1V15_DER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_SS_RSASSAPKCS1V15_DER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_SS_NONE(lib);
}

static int _cffi_const_TSS_SS_RSASSAPKCS1V15_INFO(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_SS_RSASSAPKCS1V15_INFO);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_SS_RSASSAPKCS1V15_INFO", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_SS_RSASSAPKCS1V15_DER(lib);
}

static int _cffi_const_TSS_SS_RSASSAPKCS1V15_SHA1(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_SS_RSASSAPKCS1V15_SHA1);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_SS_RSASSAPKCS1V15_SHA1", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_SS_RSASSAPKCS1V15_INFO(lib);
}

static int _cffi_const_TSS_SUCCESS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_SUCCESS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_SUCCESS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_SS_RSASSAPKCS1V15_SHA1(lib);
}

static int _cffi_const_TSS_TCSCAP_ALG(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TCSCAP_ALG);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TCSCAP_ALG", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_SUCCESS(lib);
}

static int _cffi_const_TSS_TCSCAP_CACHING(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TCSCAP_CACHING);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TCSCAP_CACHING", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TCSCAP_ALG(lib);
}

static int _cffi_const_TSS_TCSCAP_MANUFACTURER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TCSCAP_MANUFACTURER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TCSCAP_MANUFACTURER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TCSCAP_CACHING(lib);
}

static int _cffi_const_TSS_TCSCAP_PERSSTORAGE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TCSCAP_PERSSTORAGE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TCSCAP_PERSSTORAGE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TCSCAP_MANUFACTURER(lib);
}

static int _cffi_const_TSS_TCSCAP_PLATFORM_CLASS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TCSCAP_PLATFORM_CLASS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TCSCAP_PLATFORM_CLASS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TCSCAP_PERSSTORAGE(lib);
}

static int _cffi_const_TSS_TCSCAP_PLATFORM_INFO(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TCSCAP_PLATFORM_INFO);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TCSCAP_PLATFORM_INFO", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TCSCAP_PLATFORM_CLASS(lib);
}

static int _cffi_const_TSS_TCSCAP_PLATFORM_TYPE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TCSCAP_PLATFORM_TYPE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TCSCAP_PLATFORM_TYPE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TCSCAP_PLATFORM_INFO(lib);
}

static int _cffi_const_TSS_TCSCAP_PLATFORM_VERSION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TCSCAP_PLATFORM_VERSION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TCSCAP_PLATFORM_VERSION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TCSCAP_PLATFORM_TYPE(lib);
}

static int _cffi_const_TSS_TCSCAP_PROP_ALL_PLATFORMS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TCSCAP_PROP_ALL_PLATFORMS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TCSCAP_PROP_ALL_PLATFORMS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TCSCAP_PLATFORM_VERSION(lib);
}

static int _cffi_const_TSS_TCSCAP_PROP_AUTHCACHE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TCSCAP_PROP_AUTHCACHE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TCSCAP_PROP_AUTHCACHE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TCSCAP_PROP_ALL_PLATFORMS(lib);
}

static int _cffi_const_TSS_TCSCAP_PROP_HOST_PLATFORM(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TCSCAP_PROP_HOST_PLATFORM);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TCSCAP_PROP_HOST_PLATFORM", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TCSCAP_PROP_AUTHCACHE(lib);
}

static int _cffi_const_TSS_TCSCAP_PROP_KEYCACHE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TCSCAP_PROP_KEYCACHE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TCSCAP_PROP_KEYCACHE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TCSCAP_PROP_HOST_PLATFORM(lib);
}

static int _cffi_const_TSS_TCSCAP_PROP_MANUFACTURER_ID(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TCSCAP_PROP_MANUFACTURER_ID);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TCSCAP_PROP_MANUFACTURER_ID", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TCSCAP_PROP_KEYCACHE(lib);
}

static int _cffi_const_TSS_TCSCAP_PROP_MANUFACTURER_STR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TCSCAP_PROP_MANUFACTURER_STR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TCSCAP_PROP_MANUFACTURER_STR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TCSCAP_PROP_MANUFACTURER_ID(lib);
}

static int _cffi_const_TSS_TCSCAP_TRANSPORT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TCSCAP_TRANSPORT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TCSCAP_TRANSPORT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TCSCAP_PROP_MANUFACTURER_STR(lib);
}

static int _cffi_const_TSS_TCSCAP_TRANS_EXCLUSIVE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TCSCAP_TRANS_EXCLUSIVE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TCSCAP_TRANS_EXCLUSIVE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TCSCAP_TRANSPORT(lib);
}

static int _cffi_const_TSS_TCSCAP_VERSION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TCSCAP_VERSION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TCSCAP_VERSION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TCSCAP_TRANS_EXCLUSIVE(lib);
}

static int _cffi_const_TSS_TPMATTRIB_EKCERT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMATTRIB_EKCERT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMATTRIB_EKCERT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TCSCAP_VERSION(lib);
}

static int _cffi_const_TSS_TPMATTRIB_PLATFORMCERT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMATTRIB_PLATFORMCERT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMATTRIB_PLATFORMCERT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMATTRIB_EKCERT(lib);
}

static int _cffi_const_TSS_TPMATTRIB_PLATFORM_CC(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMATTRIB_PLATFORM_CC);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMATTRIB_PLATFORM_CC", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMATTRIB_PLATFORMCERT(lib);
}

static int _cffi_const_TSS_TPMATTRIB_TPM_CC(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMATTRIB_TPM_CC);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMATTRIB_TPM_CC", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMATTRIB_PLATFORM_CC(lib);
}

static int _cffi_const_TSS_TPMCAP_ALG(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_ALG);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_ALG", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMATTRIB_TPM_CC(lib);
}

static int _cffi_const_TSS_TPMCAP_AUTH_ENCRYPT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_AUTH_ENCRYPT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_AUTH_ENCRYPT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_ALG(lib);
}

static int _cffi_const_TSS_TPMCAP_DA_LOGIC(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_DA_LOGIC);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_DA_LOGIC", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_AUTH_ENCRYPT(lib);
}

static int _cffi_const_TSS_TPMCAP_FLAG(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_FLAG);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_FLAG", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_DA_LOGIC(lib);
}

static int _cffi_const_TSS_TPMCAP_HANDLE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_HANDLE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_HANDLE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_FLAG(lib);
}

static int _cffi_const_TSS_TPMCAP_MFR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_MFR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_MFR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_HANDLE(lib);
}

static int _cffi_const_TSS_TPMCAP_NV_INDEX(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_NV_INDEX);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_NV_INDEX", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_MFR(lib);
}

static int _cffi_const_TSS_TPMCAP_NV_LIST(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_NV_LIST);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_NV_LIST", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_NV_INDEX(lib);
}

static int _cffi_const_TSS_TPMCAP_ORD(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_ORD);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_ORD", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_NV_LIST(lib);
}

static int _cffi_const_TSS_TPMCAP_PROPERTY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_PROPERTY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_PROPERTY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_ORD(lib);
}

static int _cffi_const_TSS_TPMCAP_PROP_ACTIVECOUNTER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_PROP_ACTIVECOUNTER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_PROP_ACTIVECOUNTER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_PROPERTY(lib);
}

static int _cffi_const_TSS_TPMCAP_PROP_AUTHSESSIONS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_PROP_AUTHSESSIONS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_PROP_AUTHSESSIONS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_PROP_ACTIVECOUNTER(lib);
}

static int _cffi_const_TSS_TPMCAP_PROP_CMKRESTRICTION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_PROP_CMKRESTRICTION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_PROP_CMKRESTRICTION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_PROP_AUTHSESSIONS(lib);
}

static int _cffi_const_TSS_TPMCAP_PROP_CONTEXTS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_PROP_CONTEXTS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_PROP_CONTEXTS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_PROP_CMKRESTRICTION(lib);
}

static int _cffi_const_TSS_TPMCAP_PROP_COUNTERS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_PROP_COUNTERS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_PROP_COUNTERS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_PROP_CONTEXTS(lib);
}

static int _cffi_const_TSS_TPMCAP_PROP_DAASESSIONS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_PROP_DAASESSIONS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_PROP_DAASESSIONS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_PROP_COUNTERS(lib);
}

static int _cffi_const_TSS_TPMCAP_PROP_DAA_INTERRUPT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_PROP_DAA_INTERRUPT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_PROP_DAA_INTERRUPT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_PROP_DAASESSIONS(lib);
}

static int _cffi_const_TSS_TPMCAP_PROP_DELEGATEROWS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_PROP_DELEGATEROWS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_PROP_DELEGATEROWS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_PROP_DAA_INTERRUPT(lib);
}

static int _cffi_const_TSS_TPMCAP_PROP_DIR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_PROP_DIR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_PROP_DIR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_PROP_DELEGATEROWS(lib);
}

static int _cffi_const_TSS_TPMCAP_PROP_DURATION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_PROP_DURATION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_PROP_DURATION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_PROP_DIR(lib);
}

static int _cffi_const_TSS_TPMCAP_PROP_FAMILYROWS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_PROP_FAMILYROWS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_PROP_FAMILYROWS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_PROP_DURATION(lib);
}

static int _cffi_const_TSS_TPMCAP_PROP_INPUTBUFFERSIZE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_PROP_INPUTBUFFERSIZE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_PROP_INPUTBUFFERSIZE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_PROP_FAMILYROWS(lib);
}

static int _cffi_const_TSS_TPMCAP_PROP_KEYS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_PROP_KEYS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_PROP_KEYS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_PROP_INPUTBUFFERSIZE(lib);
}

static int _cffi_const_TSS_TPMCAP_PROP_LOCALITIES_AVAIL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_PROP_LOCALITIES_AVAIL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_PROP_LOCALITIES_AVAIL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_PROP_KEYS(lib);
}

static int _cffi_const_TSS_TPMCAP_PROP_MANUFACTURER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_PROP_MANUFACTURER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_PROP_MANUFACTURER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_PROP_LOCALITIES_AVAIL(lib);
}

static int _cffi_const_TSS_TPMCAP_PROP_MAXAUTHSESSIONS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_PROP_MAXAUTHSESSIONS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_PROP_MAXAUTHSESSIONS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_PROP_MANUFACTURER(lib);
}

static int _cffi_const_TSS_TPMCAP_PROP_MAXCONTEXTCOUNTDIST(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_PROP_MAXCONTEXTCOUNTDIST);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_PROP_MAXCONTEXTCOUNTDIST", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_PROP_MAXAUTHSESSIONS(lib);
}

static int _cffi_const_TSS_TPMCAP_PROP_MAXCONTEXTS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_PROP_MAXCONTEXTS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_PROP_MAXCONTEXTS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_PROP_MAXCONTEXTCOUNTDIST(lib);
}

static int _cffi_const_TSS_TPMCAP_PROP_MAXCOUNTERS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_PROP_MAXCOUNTERS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_PROP_MAXCOUNTERS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_PROP_MAXCONTEXTS(lib);
}

static int _cffi_const_TSS_TPMCAP_PROP_MAXDAASESSIONS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_PROP_MAXDAASESSIONS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_PROP_MAXDAASESSIONS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_PROP_MAXCOUNTERS(lib);
}

static int _cffi_const_TSS_TPMCAP_PROP_MAXKEYS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_PROP_MAXKEYS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_PROP_MAXKEYS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_PROP_MAXDAASESSIONS(lib);
}

static int _cffi_const_TSS_TPMCAP_PROP_MAXNVAVAILABLE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_PROP_MAXNVAVAILABLE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_PROP_MAXNVAVAILABLE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_PROP_MAXKEYS(lib);
}

static int _cffi_const_TSS_TPMCAP_PROP_MAXSESSIONS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_PROP_MAXSESSIONS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_PROP_MAXSESSIONS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_PROP_MAXNVAVAILABLE(lib);
}

static int _cffi_const_TSS_TPMCAP_PROP_MAXTRANSESSIONS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_PROP_MAXTRANSESSIONS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_PROP_MAXTRANSESSIONS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_PROP_MAXSESSIONS(lib);
}

static int _cffi_const_TSS_TPMCAP_PROP_MIN_COUNTER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_PROP_MIN_COUNTER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_PROP_MIN_COUNTER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_PROP_MAXTRANSESSIONS(lib);
}

static int _cffi_const_TSS_TPMCAP_PROP_OWNER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_PROP_OWNER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_PROP_OWNER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_PROP_MIN_COUNTER(lib);
}

static int _cffi_const_TSS_TPMCAP_PROP_PCR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_PROP_PCR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_PROP_PCR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_PROP_OWNER(lib);
}

static int _cffi_const_TSS_TPMCAP_PROP_REVISION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_PROP_REVISION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_PROP_REVISION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_PROP_PCR(lib);
}

static int _cffi_const_TSS_TPMCAP_PROP_SESSIONS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_PROP_SESSIONS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_PROP_SESSIONS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_PROP_REVISION(lib);
}

static int _cffi_const_TSS_TPMCAP_PROP_SLOTS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_PROP_SLOTS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_PROP_SLOTS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_PROP_SESSIONS(lib);
}

static int _cffi_const_TSS_TPMCAP_PROP_STARTUPEFFECTS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_PROP_STARTUPEFFECTS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_PROP_STARTUPEFFECTS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_PROP_SLOTS(lib);
}

static int _cffi_const_TSS_TPMCAP_PROP_TISTIMEOUTS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_PROP_TISTIMEOUTS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_PROP_TISTIMEOUTS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_PROP_STARTUPEFFECTS(lib);
}

static int _cffi_const_TSS_TPMCAP_PROP_TRANSESSIONS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_PROP_TRANSESSIONS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_PROP_TRANSESSIONS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_PROP_TISTIMEOUTS(lib);
}

static int _cffi_const_TSS_TPMCAP_SET_PERM_FLAGS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_SET_PERM_FLAGS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_SET_PERM_FLAGS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_PROP_TRANSESSIONS(lib);
}

static int _cffi_const_TSS_TPMCAP_SET_VENDOR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_SET_VENDOR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_SET_VENDOR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_SET_PERM_FLAGS(lib);
}

static int _cffi_const_TSS_TPMCAP_SYM_MODE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_SYM_MODE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_SYM_MODE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_SET_VENDOR(lib);
}

static int _cffi_const_TSS_TPMCAP_TRANS_ES(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_TRANS_ES);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_TRANS_ES", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_SYM_MODE(lib);
}

static int _cffi_const_TSS_TPMCAP_VERSION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_VERSION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_VERSION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_TRANS_ES(lib);
}

static int _cffi_const_TSS_TPMCAP_VERSION_VAL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMCAP_VERSION_VAL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMCAP_VERSION_VAL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_VERSION(lib);
}

static int _cffi_const_TSS_TPMSTATUS_ALLOWMAINTENANCE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMSTATUS_ALLOWMAINTENANCE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMSTATUS_ALLOWMAINTENANCE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMCAP_VERSION_VAL(lib);
}

static int _cffi_const_TSS_TPMSTATUS_CEKP_USED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMSTATUS_CEKP_USED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMSTATUS_CEKP_USED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMSTATUS_ALLOWMAINTENANCE(lib);
}

static int _cffi_const_TSS_TPMSTATUS_DEACTIVATED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMSTATUS_DEACTIVATED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMSTATUS_DEACTIVATED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMSTATUS_CEKP_USED(lib);
}

static int _cffi_const_TSS_TPMSTATUS_DISABLED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMSTATUS_DISABLED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMSTATUS_DISABLED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMSTATUS_DEACTIVATED(lib);
}

static int _cffi_const_TSS_TPMSTATUS_DISABLEFORCECLEAR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMSTATUS_DISABLEFORCECLEAR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMSTATUS_DISABLEFORCECLEAR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMSTATUS_DISABLED(lib);
}

static int _cffi_const_TSS_TPMSTATUS_DISABLEOWNERCLEAR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMSTATUS_DISABLEOWNERCLEAR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMSTATUS_DISABLEOWNERCLEAR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMSTATUS_DISABLEFORCECLEAR(lib);
}

static int _cffi_const_TSS_TPMSTATUS_DISABLEPUBEKREAD(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMSTATUS_DISABLEPUBEKREAD);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMSTATUS_DISABLEPUBEKREAD", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMSTATUS_DISABLEOWNERCLEAR(lib);
}

static int _cffi_const_TSS_TPMSTATUS_DISABLEPUBSRKREAD(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMSTATUS_DISABLEPUBSRKREAD);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMSTATUS_DISABLEPUBSRKREAD", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMSTATUS_DISABLEPUBEKREAD(lib);
}

static int _cffi_const_TSS_TPMSTATUS_DISABLE_FULL_DA_LOGIC_INFO(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMSTATUS_DISABLE_FULL_DA_LOGIC_INFO);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMSTATUS_DISABLE_FULL_DA_LOGIC_INFO", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMSTATUS_DISABLEPUBSRKREAD(lib);
}

static int _cffi_const_TSS_TPMSTATUS_ENABLEREVOKEEK(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMSTATUS_ENABLEREVOKEEK);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMSTATUS_ENABLEREVOKEEK", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMSTATUS_DISABLE_FULL_DA_LOGIC_INFO(lib);
}

static int _cffi_const_TSS_TPMSTATUS_ENABLE_REVOKEEK(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMSTATUS_ENABLE_REVOKEEK);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMSTATUS_ENABLE_REVOKEEK", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMSTATUS_ENABLEREVOKEEK(lib);
}

static int _cffi_const_TSS_TPMSTATUS_FIPS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMSTATUS_FIPS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMSTATUS_FIPS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMSTATUS_ENABLE_REVOKEEK(lib);
}

static int _cffi_const_TSS_TPMSTATUS_MAINTENANCEUSED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMSTATUS_MAINTENANCEUSED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMSTATUS_MAINTENANCEUSED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMSTATUS_FIPS(lib);
}

static int _cffi_const_TSS_TPMSTATUS_NV_LOCK(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMSTATUS_NV_LOCK);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMSTATUS_NV_LOCK", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMSTATUS_MAINTENANCEUSED(lib);
}

static int _cffi_const_TSS_TPMSTATUS_OPERATORINSTALLED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMSTATUS_OPERATORINSTALLED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMSTATUS_OPERATORINSTALLED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMSTATUS_NV_LOCK(lib);
}

static int _cffi_const_TSS_TPMSTATUS_OPERATOR_INSTALLED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMSTATUS_OPERATOR_INSTALLED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMSTATUS_OPERATOR_INSTALLED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMSTATUS_OPERATORINSTALLED(lib);
}

static int _cffi_const_TSS_TPMSTATUS_OWNERSETDISABLE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMSTATUS_OWNERSETDISABLE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMSTATUS_OWNERSETDISABLE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMSTATUS_OPERATOR_INSTALLED(lib);
}

static int _cffi_const_TSS_TPMSTATUS_PHYSICALDISABLE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMSTATUS_PHYSICALDISABLE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMSTATUS_PHYSICALDISABLE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMSTATUS_OWNERSETDISABLE(lib);
}

static int _cffi_const_TSS_TPMSTATUS_PHYSICALSETDEACTIVATED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMSTATUS_PHYSICALSETDEACTIVATED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMSTATUS_PHYSICALSETDEACTIVATED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMSTATUS_PHYSICALDISABLE(lib);
}

static int _cffi_const_TSS_TPMSTATUS_PHYSPRESENCE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMSTATUS_PHYSPRESENCE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMSTATUS_PHYSPRESENCE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMSTATUS_PHYSICALSETDEACTIVATED(lib);
}

static int _cffi_const_TSS_TPMSTATUS_PHYSPRES_CMDENABLE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMSTATUS_PHYSPRES_CMDENABLE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMSTATUS_PHYSPRES_CMDENABLE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMSTATUS_PHYSPRESENCE(lib);
}

static int _cffi_const_TSS_TPMSTATUS_PHYSPRES_HWENABLE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMSTATUS_PHYSPRES_HWENABLE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMSTATUS_PHYSPRES_HWENABLE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMSTATUS_PHYSPRES_CMDENABLE(lib);
}

static int _cffi_const_TSS_TPMSTATUS_PHYSPRES_LIFETIMELOCK(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMSTATUS_PHYSPRES_LIFETIMELOCK);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMSTATUS_PHYSPRES_LIFETIMELOCK", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMSTATUS_PHYSPRES_HWENABLE(lib);
}

static int _cffi_const_TSS_TPMSTATUS_PHYSPRES_LOCK(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMSTATUS_PHYSPRES_LOCK);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMSTATUS_PHYSPRES_LOCK", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMSTATUS_PHYSPRES_LIFETIMELOCK(lib);
}

static int _cffi_const_TSS_TPMSTATUS_POSTINITIALISE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMSTATUS_POSTINITIALISE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMSTATUS_POSTINITIALISE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMSTATUS_PHYSPRES_LOCK(lib);
}

static int _cffi_const_TSS_TPMSTATUS_RESETLOCK(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMSTATUS_RESETLOCK);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMSTATUS_RESETLOCK", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMSTATUS_POSTINITIALISE(lib);
}

static int _cffi_const_TSS_TPMSTATUS_SETOWNERINSTALL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMSTATUS_SETOWNERINSTALL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMSTATUS_SETOWNERINSTALL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMSTATUS_RESETLOCK(lib);
}

static int _cffi_const_TSS_TPMSTATUS_SETTEMPDEACTIVATED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMSTATUS_SETTEMPDEACTIVATED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMSTATUS_SETTEMPDEACTIVATED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMSTATUS_SETOWNERINSTALL(lib);
}

static int _cffi_const_TSS_TPMSTATUS_TPMPOST(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMSTATUS_TPMPOST);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMSTATUS_TPMPOST", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMSTATUS_SETTEMPDEACTIVATED(lib);
}

static int _cffi_const_TSS_TPMSTATUS_TPMPOSTLOCK(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMSTATUS_TPMPOSTLOCK);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMSTATUS_TPMPOSTLOCK", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMSTATUS_TPMPOST(lib);
}

static int _cffi_const_TSS_TPMSTATUS_TPM_ESTABLISHED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TPMSTATUS_TPM_ESTABLISHED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TPMSTATUS_TPM_ESTABLISHED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMSTATUS_TPMPOSTLOCK(lib);
}

static int _cffi_const_TSS_TSPATTRIB_ALG_IDENTIFIER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_ALG_IDENTIFIER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_ALG_IDENTIFIER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TPMSTATUS_TPM_ESTABLISHED(lib);
}

static int _cffi_const_TSS_TSPATTRIB_CONTEXTTRANS_CONTROL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_CONTEXTTRANS_CONTROL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_CONTEXTTRANS_CONTROL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_ALG_IDENTIFIER(lib);
}

static int _cffi_const_TSS_TSPATTRIB_CONTEXTTRANS_MODE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_CONTEXTTRANS_MODE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_CONTEXTTRANS_MODE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_CONTEXTTRANS_CONTROL(lib);
}

static int _cffi_const_TSS_TSPATTRIB_CONTEXT_CONNECTION_VERSION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_CONTEXT_CONNECTION_VERSION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_CONTEXT_CONNECTION_VERSION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_CONTEXTTRANS_MODE(lib);
}

static int _cffi_const_TSS_TSPATTRIB_CONTEXT_MACHINE_NAME(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_CONTEXT_MACHINE_NAME);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_CONTEXT_MACHINE_NAME", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_CONTEXT_CONNECTION_VERSION(lib);
}

static int _cffi_const_TSS_TSPATTRIB_CONTEXT_NOT_SILENT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_CONTEXT_NOT_SILENT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_CONTEXT_NOT_SILENT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_CONTEXT_MACHINE_NAME(lib);
}

static int _cffi_const_TSS_TSPATTRIB_CONTEXT_SILENT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_CONTEXT_SILENT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_CONTEXT_SILENT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_CONTEXT_NOT_SILENT(lib);
}

static int _cffi_const_TSS_TSPATTRIB_CONTEXT_SILENT_MODE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_CONTEXT_SILENT_MODE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_CONTEXT_SILENT_MODE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_CONTEXT_SILENT(lib);
}

static int _cffi_const_TSS_TSPATTRIB_CONTEXT_TRANSPORT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_CONTEXT_TRANSPORT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_CONTEXT_TRANSPORT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_CONTEXT_SILENT_MODE(lib);
}

static int _cffi_const_TSS_TSPATTRIB_CONTEXT_VERSION_AUTO(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_CONTEXT_VERSION_AUTO);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_CONTEXT_VERSION_AUTO", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_CONTEXT_TRANSPORT(lib);
}

static int _cffi_const_TSS_TSPATTRIB_CONTEXT_VERSION_MODE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_CONTEXT_VERSION_MODE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_CONTEXT_VERSION_MODE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_CONTEXT_VERSION_AUTO(lib);
}

static int _cffi_const_TSS_TSPATTRIB_CONTEXT_VERSION_V1_1(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_CONTEXT_VERSION_V1_1);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_CONTEXT_VERSION_V1_1", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_CONTEXT_VERSION_MODE(lib);
}

static int _cffi_const_TSS_TSPATTRIB_CONTEXT_VERSION_V1_2(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_CONTEXT_VERSION_V1_2);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_CONTEXT_VERSION_V1_2", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_CONTEXT_VERSION_V1_1(lib);
}

static int _cffi_const_TSS_TSPATTRIB_DAAARAKEYBLOB_KEYBLOB(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_DAAARAKEYBLOB_KEYBLOB);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_DAAARAKEYBLOB_KEYBLOB", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_CONTEXT_VERSION_V1_2(lib);
}

static int _cffi_const_TSS_TSPATTRIB_DAAARAKEYBLOB_PUBLIC_KEY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_DAAARAKEYBLOB_PUBLIC_KEY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_DAAARAKEYBLOB_PUBLIC_KEY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_DAAARAKEYBLOB_KEYBLOB(lib);
}

static int _cffi_const_TSS_TSPATTRIB_DAAARAKEYBLOB_SECRET_KEY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_DAAARAKEYBLOB_SECRET_KEY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_DAAARAKEYBLOB_SECRET_KEY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_DAAARAKEYBLOB_PUBLIC_KEY(lib);
}

static int _cffi_const_TSS_TSPATTRIB_DAAARAKEY_BLOB(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_DAAARAKEY_BLOB);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_DAAARAKEY_BLOB", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_DAAARAKEYBLOB_SECRET_KEY(lib);
}

static int _cffi_const_TSS_TSPATTRIB_DAAATTRIBGAMMAS_BLOB(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_DAAATTRIBGAMMAS_BLOB);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_DAAATTRIBGAMMAS_BLOB", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_DAAARAKEY_BLOB(lib);
}

static int _cffi_const_TSS_TSPATTRIB_DAACOMMIT_COMMITMENTS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_DAACOMMIT_COMMITMENTS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_DAACOMMIT_COMMITMENTS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_DAAATTRIBGAMMAS_BLOB(lib);
}

static int _cffi_const_TSS_TSPATTRIB_DAACOMMIT_NUMBER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_DAACOMMIT_NUMBER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_DAACOMMIT_NUMBER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_DAACOMMIT_COMMITMENTS(lib);
}

static int _cffi_const_TSS_TSPATTRIB_DAACOMMIT_SELECTION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_DAACOMMIT_SELECTION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_DAACOMMIT_SELECTION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_DAACOMMIT_NUMBER(lib);
}

static int _cffi_const_TSS_TSPATTRIB_DAACRED_ATTRIB_GAMMAS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_DAACRED_ATTRIB_GAMMAS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_DAACRED_ATTRIB_GAMMAS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_DAACOMMIT_SELECTION(lib);
}

static int _cffi_const_TSS_TSPATTRIB_DAACRED_CALLBACK_SIGN(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_DAACRED_CALLBACK_SIGN);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_DAACRED_CALLBACK_SIGN", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_DAACRED_ATTRIB_GAMMAS(lib);
}

static int _cffi_const_TSS_TSPATTRIB_DAACRED_CALLBACK_VERIFYSIGNATURE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_DAACRED_CALLBACK_VERIFYSIGNATURE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_DAACRED_CALLBACK_VERIFYSIGNATURE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_DAACRED_CALLBACK_SIGN(lib);
}

static int _cffi_const_TSS_TSPATTRIB_DAACRED_COMMIT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_DAACRED_COMMIT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_DAACRED_COMMIT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_DAACRED_CALLBACK_VERIFYSIGNATURE(lib);
}

static int _cffi_const_TSS_TSPATTRIB_DAACRED_CREDENTIAL_BLOB(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_DAACRED_CREDENTIAL_BLOB);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_DAACRED_CREDENTIAL_BLOB", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_DAACRED_COMMIT(lib);
}

static int _cffi_const_TSS_TSPATTRIB_DAAISSUERKEYBLOB_KEYBLOB(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_DAAISSUERKEYBLOB_KEYBLOB);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_DAAISSUERKEYBLOB_KEYBLOB", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_DAACRED_CREDENTIAL_BLOB(lib);
}

static int _cffi_const_TSS_TSPATTRIB_DAAISSUERKEYBLOB_PROOF(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_DAAISSUERKEYBLOB_PROOF);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_DAAISSUERKEYBLOB_PROOF", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_DAAISSUERKEYBLOB_KEYBLOB(lib);
}

static int _cffi_const_TSS_TSPATTRIB_DAAISSUERKEYBLOB_PUBLIC_KEY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_DAAISSUERKEYBLOB_PUBLIC_KEY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_DAAISSUERKEYBLOB_PUBLIC_KEY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_DAAISSUERKEYBLOB_PROOF(lib);
}

static int _cffi_const_TSS_TSPATTRIB_DAAISSUERKEYBLOB_SECRET_KEY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_DAAISSUERKEYBLOB_SECRET_KEY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_DAAISSUERKEYBLOB_SECRET_KEY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_DAAISSUERKEYBLOB_PUBLIC_KEY(lib);
}

static int _cffi_const_TSS_TSPATTRIB_DAAISSUERKEYPUBKEY_NUM_ATTRIBS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_DAAISSUERKEYPUBKEY_NUM_ATTRIBS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_DAAISSUERKEYPUBKEY_NUM_ATTRIBS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_DAAISSUERKEYBLOB_SECRET_KEY(lib);
}

static int _cffi_const_TSS_TSPATTRIB_DAAISSUERKEYPUBKEY_NUM_ISSUER_ATTRIBS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_DAAISSUERKEYPUBKEY_NUM_ISSUER_ATTRIBS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_DAAISSUERKEYPUBKEY_NUM_ISSUER_ATTRIBS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_DAAISSUERKEYPUBKEY_NUM_ATTRIBS(lib);
}

static int _cffi_const_TSS_TSPATTRIB_DAAISSUERKEYPUBKEY_NUM_PLATFORM_ATTRIBS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_DAAISSUERKEYPUBKEY_NUM_PLATFORM_ATTRIBS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_DAAISSUERKEYPUBKEY_NUM_PLATFORM_ATTRIBS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_DAAISSUERKEYPUBKEY_NUM_ISSUER_ATTRIBS(lib);
}

static int _cffi_const_TSS_TSPATTRIB_DAAISSUERKEY_BLOB(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_DAAISSUERKEY_BLOB);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_DAAISSUERKEY_BLOB", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_DAAISSUERKEYPUBKEY_NUM_PLATFORM_ATTRIBS(lib);
}

static int _cffi_const_TSS_TSPATTRIB_DAAISSUERKEY_PUBKEY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_DAAISSUERKEY_PUBKEY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_DAAISSUERKEY_PUBKEY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_DAAISSUERKEY_BLOB(lib);
}

static int _cffi_const_TSS_TSPATTRIB_DELFAMILYINFO_FAMILYID(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_DELFAMILYINFO_FAMILYID);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_DELFAMILYINFO_FAMILYID", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_DAAISSUERKEY_PUBKEY(lib);
}

static int _cffi_const_TSS_TSPATTRIB_DELFAMILYINFO_LABEL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_DELFAMILYINFO_LABEL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_DELFAMILYINFO_LABEL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_DELFAMILYINFO_FAMILYID(lib);
}

static int _cffi_const_TSS_TSPATTRIB_DELFAMILYINFO_VERCOUNT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_DELFAMILYINFO_VERCOUNT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_DELFAMILYINFO_VERCOUNT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_DELFAMILYINFO_LABEL(lib);
}

static int _cffi_const_TSS_TSPATTRIB_DELFAMILYSTATE_ENABLED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_DELFAMILYSTATE_ENABLED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_DELFAMILYSTATE_ENABLED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_DELFAMILYINFO_VERCOUNT(lib);
}

static int _cffi_const_TSS_TSPATTRIB_DELFAMILYSTATE_LOCKED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_DELFAMILYSTATE_LOCKED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_DELFAMILYSTATE_LOCKED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_DELFAMILYSTATE_ENABLED(lib);
}

static int _cffi_const_TSS_TSPATTRIB_DELFAMILY_INFO(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_DELFAMILY_INFO);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_DELFAMILY_INFO", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_DELFAMILYSTATE_LOCKED(lib);
}

static int _cffi_const_TSS_TSPATTRIB_DELFAMILY_STATE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_DELFAMILY_STATE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_DELFAMILY_STATE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_DELFAMILY_INFO(lib);
}

static int _cffi_const_TSS_TSPATTRIB_DISABLE_TRANSPORT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_DISABLE_TRANSPORT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_DISABLE_TRANSPORT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_DELFAMILY_STATE(lib);
}

static int _cffi_const_TSS_TSPATTRIB_ENABLE_TRANSPORT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_ENABLE_TRANSPORT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_ENABLE_TRANSPORT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_DISABLE_TRANSPORT(lib);
}

static int _cffi_const_TSS_TSPATTRIB_ENCDATABLOB_BLOB(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_ENCDATABLOB_BLOB);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_ENCDATABLOB_BLOB", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_ENABLE_TRANSPORT(lib);
}

static int _cffi_const_TSS_TSPATTRIB_ENCDATAPCRLONG_CREATION_SELECTION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_ENCDATAPCRLONG_CREATION_SELECTION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_ENCDATAPCRLONG_CREATION_SELECTION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_ENCDATABLOB_BLOB(lib);
}

static int _cffi_const_TSS_TSPATTRIB_ENCDATAPCRLONG_DIGEST_ATCREATION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_ENCDATAPCRLONG_DIGEST_ATCREATION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_ENCDATAPCRLONG_DIGEST_ATCREATION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_ENCDATAPCRLONG_CREATION_SELECTION(lib);
}

static int _cffi_const_TSS_TSPATTRIB_ENCDATAPCRLONG_DIGEST_ATRELEASE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_ENCDATAPCRLONG_DIGEST_ATRELEASE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_ENCDATAPCRLONG_DIGEST_ATRELEASE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_ENCDATAPCRLONG_DIGEST_ATCREATION(lib);
}

static int _cffi_const_TSS_TSPATTRIB_ENCDATAPCRLONG_LOCALITY_ATCREATION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_ENCDATAPCRLONG_LOCALITY_ATCREATION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_ENCDATAPCRLONG_LOCALITY_ATCREATION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_ENCDATAPCRLONG_DIGEST_ATRELEASE(lib);
}

static int _cffi_const_TSS_TSPATTRIB_ENCDATAPCRLONG_LOCALITY_ATRELEASE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_ENCDATAPCRLONG_LOCALITY_ATRELEASE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_ENCDATAPCRLONG_LOCALITY_ATRELEASE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_ENCDATAPCRLONG_LOCALITY_ATCREATION(lib);
}

static int _cffi_const_TSS_TSPATTRIB_ENCDATAPCRLONG_RELEASE_SELECTION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_ENCDATAPCRLONG_RELEASE_SELECTION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_ENCDATAPCRLONG_RELEASE_SELECTION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_ENCDATAPCRLONG_LOCALITY_ATRELEASE(lib);
}

static int _cffi_const_TSS_TSPATTRIB_ENCDATAPCR_DIGEST_ATCREATION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_ENCDATAPCR_DIGEST_ATCREATION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_ENCDATAPCR_DIGEST_ATCREATION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_ENCDATAPCRLONG_RELEASE_SELECTION(lib);
}

static int _cffi_const_TSS_TSPATTRIB_ENCDATAPCR_DIGEST_ATRELEASE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_ENCDATAPCR_DIGEST_ATRELEASE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_ENCDATAPCR_DIGEST_ATRELEASE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_ENCDATAPCR_DIGEST_ATCREATION(lib);
}

static int _cffi_const_TSS_TSPATTRIB_ENCDATAPCR_DIGEST_RELEASE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_ENCDATAPCR_DIGEST_RELEASE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_ENCDATAPCR_DIGEST_RELEASE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_ENCDATAPCR_DIGEST_ATRELEASE(lib);
}

static int _cffi_const_TSS_TSPATTRIB_ENCDATAPCR_SELECTION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_ENCDATAPCR_SELECTION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_ENCDATAPCR_SELECTION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_ENCDATAPCR_DIGEST_RELEASE(lib);
}

static int _cffi_const_TSS_TSPATTRIB_ENCDATASEAL_NOPROTECT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_ENCDATASEAL_NOPROTECT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_ENCDATASEAL_NOPROTECT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_ENCDATAPCR_SELECTION(lib);
}

static int _cffi_const_TSS_TSPATTRIB_ENCDATASEAL_NO_PROTECT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_ENCDATASEAL_NO_PROTECT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_ENCDATASEAL_NO_PROTECT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_ENCDATASEAL_NOPROTECT(lib);
}

static int _cffi_const_TSS_TSPATTRIB_ENCDATASEAL_PROTECT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_ENCDATASEAL_PROTECT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_ENCDATASEAL_PROTECT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_ENCDATASEAL_NO_PROTECT(lib);
}

static int _cffi_const_TSS_TSPATTRIB_ENCDATASEAL_PROTECT_MODE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_ENCDATASEAL_PROTECT_MODE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_ENCDATASEAL_PROTECT_MODE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_ENCDATASEAL_PROTECT(lib);
}

static int _cffi_const_TSS_TSPATTRIB_ENCDATA_BLOB(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_ENCDATA_BLOB);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_ENCDATA_BLOB", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_ENCDATASEAL_PROTECT_MODE(lib);
}

static int _cffi_const_TSS_TSPATTRIB_ENCDATA_PCR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_ENCDATA_PCR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_ENCDATA_PCR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_ENCDATA_BLOB(lib);
}

static int _cffi_const_TSS_TSPATTRIB_ENCDATA_PCR_LONG(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_ENCDATA_PCR_LONG);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_ENCDATA_PCR_LONG", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_ENCDATA_PCR(lib);
}

static int _cffi_const_TSS_TSPATTRIB_ENCDATA_SEAL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_ENCDATA_SEAL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_ENCDATA_SEAL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_ENCDATA_PCR_LONG(lib);
}

static int _cffi_const_TSS_TSPATTRIB_HASH_IDENTIFIER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_HASH_IDENTIFIER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_HASH_IDENTIFIER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_ENCDATA_SEAL(lib);
}

static int _cffi_const_TSS_TSPATTRIB_HASH_MODE_NOT_NULL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_HASH_MODE_NOT_NULL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_HASH_MODE_NOT_NULL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_HASH_IDENTIFIER(lib);
}

static int _cffi_const_TSS_TSPATTRIB_HASH_MODE_NULL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_HASH_MODE_NULL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_HASH_MODE_NULL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_HASH_MODE_NOT_NULL(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEYBLOB_BLOB(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEYBLOB_BLOB);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEYBLOB_BLOB", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_HASH_MODE_NULL(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEYBLOB_PRIVATE_KEY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEYBLOB_PRIVATE_KEY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEYBLOB_PRIVATE_KEY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEYBLOB_BLOB(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEYBLOB_PUBLIC_KEY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEYBLOB_PUBLIC_KEY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEYBLOB_PUBLIC_KEY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEYBLOB_PRIVATE_KEY(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEYCONTROL_OWNEREVICT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEYCONTROL_OWNEREVICT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEYCONTROL_OWNEREVICT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEYBLOB_PUBLIC_KEY(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEYINFO_ALGORITHM(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEYINFO_ALGORITHM);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEYINFO_ALGORITHM", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEYCONTROL_OWNEREVICT(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEYINFO_AUTHDATAUSAGE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEYINFO_AUTHDATAUSAGE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEYINFO_AUTHDATAUSAGE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEYINFO_ALGORITHM(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEYINFO_AUTHUSAGE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEYINFO_AUTHUSAGE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEYINFO_AUTHUSAGE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEYINFO_AUTHDATAUSAGE(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEYINFO_CMK(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEYINFO_CMK);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEYINFO_CMK", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEYINFO_AUTHUSAGE(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEYINFO_CMK_MA_APPROVAL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEYINFO_CMK_MA_APPROVAL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEYINFO_CMK_MA_APPROVAL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEYINFO_CMK(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEYINFO_CMK_MA_DIGEST(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEYINFO_CMK_MA_DIGEST);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEYINFO_CMK_MA_DIGEST", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEYINFO_CMK_MA_APPROVAL(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEYINFO_ENCSCHEME(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEYINFO_ENCSCHEME);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEYINFO_ENCSCHEME", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEYINFO_CMK_MA_DIGEST(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEYINFO_KEYFLAGS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEYINFO_KEYFLAGS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEYINFO_KEYFLAGS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEYINFO_ENCSCHEME(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEYINFO_KEYSTRUCT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEYINFO_KEYSTRUCT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEYINFO_KEYSTRUCT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEYINFO_KEYFLAGS(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEYINFO_MIGRATABLE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEYINFO_MIGRATABLE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEYINFO_MIGRATABLE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEYINFO_KEYSTRUCT(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEYINFO_REDIRECTED(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEYINFO_REDIRECTED);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEYINFO_REDIRECTED", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEYINFO_MIGRATABLE(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEYINFO_RSA_EXPONENT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEYINFO_RSA_EXPONENT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEYINFO_RSA_EXPONENT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEYINFO_REDIRECTED(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEYINFO_RSA_KEYSIZE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEYINFO_RSA_KEYSIZE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEYINFO_RSA_KEYSIZE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEYINFO_RSA_EXPONENT(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEYINFO_RSA_MODULUS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEYINFO_RSA_MODULUS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEYINFO_RSA_MODULUS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEYINFO_RSA_KEYSIZE(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEYINFO_RSA_PRIMES(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEYINFO_RSA_PRIMES);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEYINFO_RSA_PRIMES", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEYINFO_RSA_MODULUS(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEYINFO_SIGSCHEME(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEYINFO_SIGSCHEME);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEYINFO_SIGSCHEME", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEYINFO_RSA_PRIMES(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEYINFO_SIZE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEYINFO_SIZE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEYINFO_SIZE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEYINFO_SIGSCHEME(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEYINFO_USAGE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEYINFO_USAGE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEYINFO_USAGE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEYINFO_SIZE(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEYINFO_VERSION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEYINFO_VERSION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEYINFO_VERSION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEYINFO_USAGE(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEYINFO_VOLATILE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEYINFO_VOLATILE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEYINFO_VOLATILE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEYINFO_VERSION(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEYPCRLONG_CREATION_SELECTION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEYPCRLONG_CREATION_SELECTION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEYPCRLONG_CREATION_SELECTION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEYINFO_VOLATILE(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEYPCRLONG_DIGEST_ATCREATION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEYPCRLONG_DIGEST_ATCREATION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEYPCRLONG_DIGEST_ATCREATION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEYPCRLONG_CREATION_SELECTION(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEYPCRLONG_DIGEST_ATRELEASE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEYPCRLONG_DIGEST_ATRELEASE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEYPCRLONG_DIGEST_ATRELEASE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEYPCRLONG_DIGEST_ATCREATION(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEYPCRLONG_LOCALITY_ATCREATION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEYPCRLONG_LOCALITY_ATCREATION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEYPCRLONG_LOCALITY_ATCREATION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEYPCRLONG_DIGEST_ATRELEASE(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEYPCRLONG_LOCALITY_ATRELEASE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEYPCRLONG_LOCALITY_ATRELEASE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEYPCRLONG_LOCALITY_ATRELEASE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEYPCRLONG_LOCALITY_ATCREATION(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEYPCRLONG_RELEASE_SELECTION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEYPCRLONG_RELEASE_SELECTION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEYPCRLONG_RELEASE_SELECTION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEYPCRLONG_LOCALITY_ATRELEASE(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEYPCR_DIGEST_ATCREATION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEYPCR_DIGEST_ATCREATION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEYPCR_DIGEST_ATCREATION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEYPCRLONG_RELEASE_SELECTION(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEYPCR_DIGEST_ATRELEASE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEYPCR_DIGEST_ATRELEASE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEYPCR_DIGEST_ATRELEASE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEYPCR_DIGEST_ATCREATION(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEYPCR_SELECTION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEYPCR_SELECTION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEYPCR_SELECTION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEYPCR_DIGEST_ATRELEASE(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEYREGISTER_NO(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEYREGISTER_NO);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEYREGISTER_NO", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEYPCR_SELECTION(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEYREGISTER_SYSTEM(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEYREGISTER_SYSTEM);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEYREGISTER_SYSTEM", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEYREGISTER_NO(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEYREGISTER_USER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEYREGISTER_USER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEYREGISTER_USER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEYREGISTER_SYSTEM(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEY_BLOB(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEY_BLOB);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEY_BLOB", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEYREGISTER_USER(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEY_CMKINFO(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEY_CMKINFO);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEY_CMKINFO", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEY_BLOB(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEY_CONTROLBIT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEY_CONTROLBIT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEY_CONTROLBIT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEY_CMKINFO(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEY_INFO(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEY_INFO);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEY_INFO", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEY_CONTROLBIT(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEY_PCR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEY_PCR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEY_PCR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEY_INFO(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEY_PCR_LONG(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEY_PCR_LONG);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEY_PCR_LONG", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEY_PCR(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEY_REGISTER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEY_REGISTER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEY_REGISTER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEY_PCR_LONG(lib);
}

static int _cffi_const_TSS_TSPATTRIB_KEY_UUID(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_KEY_UUID);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_KEY_UUID", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEY_REGISTER(lib);
}

static int _cffi_const_TSS_TSPATTRIB_NVPCR_READDIGESTATRELEASE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_NVPCR_READDIGESTATRELEASE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_NVPCR_READDIGESTATRELEASE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_KEY_UUID(lib);
}

static int _cffi_const_TSS_TSPATTRIB_NVPCR_READLOCALITYATRELEASE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_NVPCR_READLOCALITYATRELEASE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_NVPCR_READLOCALITYATRELEASE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_NVPCR_READDIGESTATRELEASE(lib);
}

static int _cffi_const_TSS_TSPATTRIB_NVPCR_READPCRSELECTION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_NVPCR_READPCRSELECTION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_NVPCR_READPCRSELECTION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_NVPCR_READLOCALITYATRELEASE(lib);
}

static int _cffi_const_TSS_TSPATTRIB_NVPCR_WRITEDIGESTATRELEASE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_NVPCR_WRITEDIGESTATRELEASE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_NVPCR_WRITEDIGESTATRELEASE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_NVPCR_READPCRSELECTION(lib);
}

static int _cffi_const_TSS_TSPATTRIB_NVPCR_WRITELOCALITYATRELEASE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_NVPCR_WRITELOCALITYATRELEASE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_NVPCR_WRITELOCALITYATRELEASE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_NVPCR_WRITEDIGESTATRELEASE(lib);
}

static int _cffi_const_TSS_TSPATTRIB_NVPCR_WRITEPCRSELECTION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_NVPCR_WRITEPCRSELECTION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_NVPCR_WRITEPCRSELECTION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_NVPCR_WRITELOCALITYATRELEASE(lib);
}

static int _cffi_const_TSS_TSPATTRIB_NVSTATE_READSTCLEAR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_NVSTATE_READSTCLEAR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_NVSTATE_READSTCLEAR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_NVPCR_WRITEPCRSELECTION(lib);
}

static int _cffi_const_TSS_TSPATTRIB_NVSTATE_WRITEDEFINE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_NVSTATE_WRITEDEFINE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_NVSTATE_WRITEDEFINE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_NVSTATE_READSTCLEAR(lib);
}

static int _cffi_const_TSS_TSPATTRIB_NVSTATE_WRITESTCLEAR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_NVSTATE_WRITESTCLEAR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_NVSTATE_WRITESTCLEAR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_NVSTATE_WRITEDEFINE(lib);
}

static int _cffi_const_TSS_TSPATTRIB_NV_DATASIZE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_NV_DATASIZE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_NV_DATASIZE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_NVSTATE_WRITESTCLEAR(lib);
}

static int _cffi_const_TSS_TSPATTRIB_NV_INDEX(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_NV_INDEX);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_NV_INDEX", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_NV_DATASIZE(lib);
}

static int _cffi_const_TSS_TSPATTRIB_NV_PCR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_NV_PCR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_NV_PCR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_NV_INDEX(lib);
}

static int _cffi_const_TSS_TSPATTRIB_NV_PERMISSIONS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_NV_PERMISSIONS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_NV_PERMISSIONS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_NV_PCR(lib);
}

static int _cffi_const_TSS_TSPATTRIB_NV_STATE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_NV_STATE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_NV_STATE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_NV_PERMISSIONS(lib);
}

static int _cffi_const_TSS_TSPATTRIB_PCRSINFO_PCRSTRUCT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_PCRSINFO_PCRSTRUCT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_PCRSINFO_PCRSTRUCT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_NV_STATE(lib);
}

static int _cffi_const_TSS_TSPATTRIB_PCRS_INFO(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_PCRS_INFO);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_PCRS_INFO", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_PCRSINFO_PCRSTRUCT(lib);
}

static int _cffi_const_TSS_TSPATTRIB_POLDELPCR_DIGESTATRELEASE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_POLDELPCR_DIGESTATRELEASE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_POLDELPCR_DIGESTATRELEASE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_PCRS_INFO(lib);
}

static int _cffi_const_TSS_TSPATTRIB_POLDELPCR_LOCALITY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_POLDELPCR_LOCALITY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_POLDELPCR_LOCALITY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_POLDELPCR_DIGESTATRELEASE(lib);
}

static int _cffi_const_TSS_TSPATTRIB_POLDELPCR_SELECTION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_POLDELPCR_SELECTION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_POLDELPCR_SELECTION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_POLDELPCR_LOCALITY(lib);
}

static int _cffi_const_TSS_TSPATTRIB_POLDEL_FAMILYID(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_POLDEL_FAMILYID);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_POLDEL_FAMILYID", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_POLDELPCR_SELECTION(lib);
}

static int _cffi_const_TSS_TSPATTRIB_POLDEL_INDEX(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_POLDEL_INDEX);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_POLDEL_INDEX", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_POLDEL_FAMILYID(lib);
}

static int _cffi_const_TSS_TSPATTRIB_POLDEL_KEYBLOB(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_POLDEL_KEYBLOB);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_POLDEL_KEYBLOB", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_POLDEL_INDEX(lib);
}

static int _cffi_const_TSS_TSPATTRIB_POLDEL_LABEL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_POLDEL_LABEL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_POLDEL_LABEL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_POLDEL_KEYBLOB(lib);
}

static int _cffi_const_TSS_TSPATTRIB_POLDEL_OWNERBLOB(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_POLDEL_OWNERBLOB);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_POLDEL_OWNERBLOB", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_POLDEL_LABEL(lib);
}

static int _cffi_const_TSS_TSPATTRIB_POLDEL_PER1(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_POLDEL_PER1);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_POLDEL_PER1", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_POLDEL_OWNERBLOB(lib);
}

static int _cffi_const_TSS_TSPATTRIB_POLDEL_PER2(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_POLDEL_PER2);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_POLDEL_PER2", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_POLDEL_PER1(lib);
}

static int _cffi_const_TSS_TSPATTRIB_POLDEL_TYPE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_POLDEL_TYPE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_POLDEL_TYPE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_POLDEL_PER2(lib);
}

static int _cffi_const_TSS_TSPATTRIB_POLDEL_VERCOUNT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_POLDEL_VERCOUNT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_POLDEL_VERCOUNT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_POLDEL_TYPE(lib);
}

static int _cffi_const_TSS_TSPATTRIB_POLICYSECRET_LIFETIME_ALWAYS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_POLICYSECRET_LIFETIME_ALWAYS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_POLICYSECRET_LIFETIME_ALWAYS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_POLDEL_VERCOUNT(lib);
}

static int _cffi_const_TSS_TSPATTRIB_POLICYSECRET_LIFETIME_COUNTER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_POLICYSECRET_LIFETIME_COUNTER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_POLICYSECRET_LIFETIME_COUNTER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_POLICYSECRET_LIFETIME_ALWAYS(lib);
}

static int _cffi_const_TSS_TSPATTRIB_POLICYSECRET_LIFETIME_TIMER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_POLICYSECRET_LIFETIME_TIMER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_POLICYSECRET_LIFETIME_TIMER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_POLICYSECRET_LIFETIME_COUNTER(lib);
}

static int _cffi_const_TSS_TSPATTRIB_POLICY_CALLBACK_CHANGEAUTHASYM(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_POLICY_CALLBACK_CHANGEAUTHASYM);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_POLICY_CALLBACK_CHANGEAUTHASYM", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_POLICYSECRET_LIFETIME_TIMER(lib);
}

static int _cffi_const_TSS_TSPATTRIB_POLICY_CALLBACK_HMAC(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_POLICY_CALLBACK_HMAC);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_POLICY_CALLBACK_HMAC", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_POLICY_CALLBACK_CHANGEAUTHASYM(lib);
}

static int _cffi_const_TSS_TSPATTRIB_POLICY_CALLBACK_SEALX_MASK(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_POLICY_CALLBACK_SEALX_MASK);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_POLICY_CALLBACK_SEALX_MASK", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_POLICY_CALLBACK_HMAC(lib);
}

static int _cffi_const_TSS_TSPATTRIB_POLICY_CALLBACK_TAKEOWNERSHIP(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_POLICY_CALLBACK_TAKEOWNERSHIP);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_POLICY_CALLBACK_TAKEOWNERSHIP", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_POLICY_CALLBACK_SEALX_MASK(lib);
}

static int _cffi_const_TSS_TSPATTRIB_POLICY_CALLBACK_XOR_ENC(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_POLICY_CALLBACK_XOR_ENC);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_POLICY_CALLBACK_XOR_ENC", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_POLICY_CALLBACK_TAKEOWNERSHIP(lib);
}

static int _cffi_const_TSS_TSPATTRIB_POLICY_DELEGATION_INFO(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_POLICY_DELEGATION_INFO);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_POLICY_DELEGATION_INFO", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_POLICY_CALLBACK_XOR_ENC(lib);
}

static int _cffi_const_TSS_TSPATTRIB_POLICY_DELEGATION_PCR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_POLICY_DELEGATION_PCR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_POLICY_DELEGATION_PCR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_POLICY_DELEGATION_INFO(lib);
}

static int _cffi_const_TSS_TSPATTRIB_POLICY_POPUPSTRING(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_POLICY_POPUPSTRING);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_POLICY_POPUPSTRING", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_POLICY_DELEGATION_PCR(lib);
}

static int _cffi_const_TSS_TSPATTRIB_POLICY_SECRET_LIFETIME(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_POLICY_SECRET_LIFETIME);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_POLICY_SECRET_LIFETIME", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_POLICY_POPUPSTRING(lib);
}

static int _cffi_const_TSS_TSPATTRIB_POLSECRET_LIFETIME_ALWAYS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_POLSECRET_LIFETIME_ALWAYS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_POLSECRET_LIFETIME_ALWAYS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_POLICY_SECRET_LIFETIME(lib);
}

static int _cffi_const_TSS_TSPATTRIB_POLSECRET_LIFETIME_COUNTER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_POLSECRET_LIFETIME_COUNTER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_POLSECRET_LIFETIME_COUNTER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_POLSECRET_LIFETIME_ALWAYS(lib);
}

static int _cffi_const_TSS_TSPATTRIB_POLSECRET_LIFETIME_TIMER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_POLSECRET_LIFETIME_TIMER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_POLSECRET_LIFETIME_TIMER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_POLSECRET_LIFETIME_COUNTER(lib);
}

static int _cffi_const_TSS_TSPATTRIB_RSAKEY_INFO(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_RSAKEY_INFO);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_RSAKEY_INFO", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_POLSECRET_LIFETIME_TIMER(lib);
}

static int _cffi_const_TSS_TSPATTRIB_SECRET_HASH_MODE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_SECRET_HASH_MODE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_SECRET_HASH_MODE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_RSAKEY_INFO(lib);
}

static int _cffi_const_TSS_TSPATTRIB_SECRET_HASH_MODE_POPUP(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_SECRET_HASH_MODE_POPUP);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_SECRET_HASH_MODE_POPUP", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_SECRET_HASH_MODE(lib);
}

static int _cffi_const_TSS_TSPATTRIB_TPM_CALLBACK_ACTIVATEIDENTITY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_TPM_CALLBACK_ACTIVATEIDENTITY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_TPM_CALLBACK_ACTIVATEIDENTITY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_SECRET_HASH_MODE_POPUP(lib);
}

static int _cffi_const_TSS_TSPATTRIB_TPM_CALLBACK_COLLATEIDENTITY(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_TPM_CALLBACK_COLLATEIDENTITY);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_TPM_CALLBACK_COLLATEIDENTITY", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_TPM_CALLBACK_ACTIVATEIDENTITY(lib);
}

static int _cffi_const_TSS_TSPATTRIB_TPM_CREDENTIAL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_TPM_CREDENTIAL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_TPM_CREDENTIAL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_TPM_CALLBACK_COLLATEIDENTITY(lib);
}

static int _cffi_const_TSS_TSPATTRIB_TPM_ORDINAL_AUDIT_STATUS(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_TPM_ORDINAL_AUDIT_STATUS);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_TPM_ORDINAL_AUDIT_STATUS", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_TPM_CREDENTIAL(lib);
}

static int _cffi_const_TSS_TSPATTRIB_TRANSPORT_AUTHENTIC_CHANNEL(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_TRANSPORT_AUTHENTIC_CHANNEL);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_TRANSPORT_AUTHENTIC_CHANNEL", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_TPM_ORDINAL_AUDIT_STATUS(lib);
}

static int _cffi_const_TSS_TSPATTRIB_TRANSPORT_DEFAULT_ENCRYPTION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_TRANSPORT_DEFAULT_ENCRYPTION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_TRANSPORT_DEFAULT_ENCRYPTION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_TRANSPORT_AUTHENTIC_CHANNEL(lib);
}

static int _cffi_const_TSS_TSPATTRIB_TRANSPORT_EXCLUSIVE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_TRANSPORT_EXCLUSIVE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_TRANSPORT_EXCLUSIVE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_TRANSPORT_DEFAULT_ENCRYPTION(lib);
}

static int _cffi_const_TSS_TSPATTRIB_TRANSPORT_NO_DEFAULT_ENCRYPTION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_TRANSPORT_NO_DEFAULT_ENCRYPTION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_TRANSPORT_NO_DEFAULT_ENCRYPTION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_TRANSPORT_EXCLUSIVE(lib);
}

static int _cffi_const_TSS_TSPATTRIB_TRANSPORT_STATIC_AUTH(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPATTRIB_TRANSPORT_STATIC_AUTH);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPATTRIB_TRANSPORT_STATIC_AUTH", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_TRANSPORT_NO_DEFAULT_ENCRYPTION(lib);
}

static int _cffi_const_TSS_TSPCAP_ALG(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPCAP_ALG);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPCAP_ALG", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPATTRIB_TRANSPORT_STATIC_AUTH(lib);
}

static int _cffi_const_TSS_TSPCAP_MANUFACTURER(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPCAP_MANUFACTURER);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPCAP_MANUFACTURER", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPCAP_ALG(lib);
}

static int _cffi_const_TSS_TSPCAP_PERSSTORAGE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPCAP_PERSSTORAGE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPCAP_PERSSTORAGE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPCAP_MANUFACTURER(lib);
}

static int _cffi_const_TSS_TSPCAP_PLATFORM_INFO(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPCAP_PLATFORM_INFO);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPCAP_PLATFORM_INFO", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPCAP_PERSSTORAGE(lib);
}

static int _cffi_const_TSS_TSPCAP_PLATFORM_TYPE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPCAP_PLATFORM_TYPE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPCAP_PLATFORM_TYPE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPCAP_PLATFORM_INFO(lib);
}

static int _cffi_const_TSS_TSPCAP_PLATFORM_VERSION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPCAP_PLATFORM_VERSION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPCAP_PLATFORM_VERSION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPCAP_PLATFORM_TYPE(lib);
}

static int _cffi_const_TSS_TSPCAP_PROP_MANUFACTURER_ID(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPCAP_PROP_MANUFACTURER_ID);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPCAP_PROP_MANUFACTURER_ID", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPCAP_PLATFORM_VERSION(lib);
}

static int _cffi_const_TSS_TSPCAP_PROP_MANUFACTURER_STR(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPCAP_PROP_MANUFACTURER_STR);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPCAP_PROP_MANUFACTURER_STR", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPCAP_PROP_MANUFACTURER_ID(lib);
}

static int _cffi_const_TSS_TSPCAP_PROP_RETURNVALUE_INFO(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPCAP_PROP_RETURNVALUE_INFO);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPCAP_PROP_RETURNVALUE_INFO", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPCAP_PROP_MANUFACTURER_STR(lib);
}

static int _cffi_const_TSS_TSPCAP_RANDOMLIMIT(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPCAP_RANDOMLIMIT);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPCAP_RANDOMLIMIT", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPCAP_PROP_RETURNVALUE_INFO(lib);
}

static int _cffi_const_TSS_TSPCAP_RETURNVALUE_INFO(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPCAP_RETURNVALUE_INFO);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPCAP_RETURNVALUE_INFO", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPCAP_RANDOMLIMIT(lib);
}

static int _cffi_const_TSS_TSPCAP_VERSION(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_TSPCAP_VERSION);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_TSPCAP_VERSION", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPCAP_RETURNVALUE_INFO(lib);
}

static int _cffi_const_TSS_W_BASE(PyObject *lib)
{
  PyObject *o;
  int res;
  o = _cffi_from_c_int_const(TSS_W_BASE);
  if (o == NULL)
    return -1;
  res = PyObject_SetAttrString(lib, "TSS_W_BASE", o);
  Py_DECREF(o);
  if (res < 0)
    return -1;
  return _cffi_const_TSS_TSPCAP_VERSION(lib);
}

static void _cffi_check_struct_tdTCS_AUTH(struct tdTCS_AUTH *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->AuthHandle) << 1);
  { TPM_NONCE *tmp = &p->NonceOdd; (void)tmp; }
  { TPM_NONCE *tmp = &p->NonceEven; (void)tmp; }
  (void)((p->fContinueAuthSession) << 1);
  { TPM_AUTHDATA *tmp = &p->HMAC; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTCS_AUTH(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTCS_AUTH y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTCS_AUTH),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTCS_AUTH, AuthHandle),
    sizeof(((struct tdTCS_AUTH *)0)->AuthHandle),
    offsetof(struct tdTCS_AUTH, NonceOdd),
    sizeof(((struct tdTCS_AUTH *)0)->NonceOdd),
    offsetof(struct tdTCS_AUTH, NonceEven),
    sizeof(((struct tdTCS_AUTH *)0)->NonceEven),
    offsetof(struct tdTCS_AUTH, fContinueAuthSession),
    sizeof(((struct tdTCS_AUTH *)0)->fContinueAuthSession),
    offsetof(struct tdTCS_AUTH, HMAC),
    sizeof(((struct tdTCS_AUTH *)0)->HMAC),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTCS_AUTH(0);
}

static void _cffi_check_struct_tdTCS_LOADKEY_INFO(struct tdTCS_LOADKEY_INFO *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TSS_UUID *tmp = &p->keyUUID; (void)tmp; }
  { TSS_UUID *tmp = &p->parentKeyUUID; (void)tmp; }
  { TPM_DIGEST *tmp = &p->paramDigest; (void)tmp; }
  { TCS_AUTH *tmp = &p->authData; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTCS_LOADKEY_INFO(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTCS_LOADKEY_INFO y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTCS_LOADKEY_INFO),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTCS_LOADKEY_INFO, keyUUID),
    sizeof(((struct tdTCS_LOADKEY_INFO *)0)->keyUUID),
    offsetof(struct tdTCS_LOADKEY_INFO, parentKeyUUID),
    sizeof(((struct tdTCS_LOADKEY_INFO *)0)->parentKeyUUID),
    offsetof(struct tdTCS_LOADKEY_INFO, paramDigest),
    sizeof(((struct tdTCS_LOADKEY_INFO *)0)->paramDigest),
    offsetof(struct tdTCS_LOADKEY_INFO, authData),
    sizeof(((struct tdTCS_LOADKEY_INFO *)0)->authData),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTCS_LOADKEY_INFO(0);
}

static void _cffi_check_struct_tdTPM_ASYM_CA_CONTENTS(struct tdTPM_ASYM_CA_CONTENTS *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TPM_SYMMETRIC_KEY *tmp = &p->sessionKey; (void)tmp; }
  { TPM_DIGEST *tmp = &p->idDigest; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_ASYM_CA_CONTENTS(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_ASYM_CA_CONTENTS y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_ASYM_CA_CONTENTS),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_ASYM_CA_CONTENTS, sessionKey),
    sizeof(((struct tdTPM_ASYM_CA_CONTENTS *)0)->sessionKey),
    offsetof(struct tdTPM_ASYM_CA_CONTENTS, idDigest),
    sizeof(((struct tdTPM_ASYM_CA_CONTENTS *)0)->idDigest),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_ASYM_CA_CONTENTS(0);
}

static void _cffi_check_struct_tdTPM_AUDIT_EVENT_IN(struct tdTPM_AUDIT_EVENT_IN *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  { TPM_DIGEST *tmp = &p->inputParms; (void)tmp; }
  { TPM_COUNTER_VALUE *tmp = &p->auditCount; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_AUDIT_EVENT_IN(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_AUDIT_EVENT_IN y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_AUDIT_EVENT_IN),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_AUDIT_EVENT_IN, tag),
    sizeof(((struct tdTPM_AUDIT_EVENT_IN *)0)->tag),
    offsetof(struct tdTPM_AUDIT_EVENT_IN, inputParms),
    sizeof(((struct tdTPM_AUDIT_EVENT_IN *)0)->inputParms),
    offsetof(struct tdTPM_AUDIT_EVENT_IN, auditCount),
    sizeof(((struct tdTPM_AUDIT_EVENT_IN *)0)->auditCount),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_AUDIT_EVENT_IN(0);
}

static void _cffi_check_struct_tdTPM_AUDIT_EVENT_OUT(struct tdTPM_AUDIT_EVENT_OUT *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  (void)((p->ordinal) << 1);
  { TPM_DIGEST *tmp = &p->outputParms; (void)tmp; }
  { TPM_COUNTER_VALUE *tmp = &p->auditCount; (void)tmp; }
  (void)((p->returnCode) << 1);
}
static PyObject *
_cffi_layout_struct_tdTPM_AUDIT_EVENT_OUT(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_AUDIT_EVENT_OUT y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_AUDIT_EVENT_OUT),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_AUDIT_EVENT_OUT, tag),
    sizeof(((struct tdTPM_AUDIT_EVENT_OUT *)0)->tag),
    offsetof(struct tdTPM_AUDIT_EVENT_OUT, ordinal),
    sizeof(((struct tdTPM_AUDIT_EVENT_OUT *)0)->ordinal),
    offsetof(struct tdTPM_AUDIT_EVENT_OUT, outputParms),
    sizeof(((struct tdTPM_AUDIT_EVENT_OUT *)0)->outputParms),
    offsetof(struct tdTPM_AUDIT_EVENT_OUT, auditCount),
    sizeof(((struct tdTPM_AUDIT_EVENT_OUT *)0)->auditCount),
    offsetof(struct tdTPM_AUDIT_EVENT_OUT, returnCode),
    sizeof(((struct tdTPM_AUDIT_EVENT_OUT *)0)->returnCode),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_AUDIT_EVENT_OUT(0);
}

static void _cffi_check_struct_tdTPM_AUTHDATA(struct tdTPM_AUTHDATA *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { uint8_t(*tmp)[20] = &p->authdata; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_AUTHDATA(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_AUTHDATA y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_AUTHDATA),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_AUTHDATA, authdata),
    sizeof(((struct tdTPM_AUTHDATA *)0)->authdata),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_AUTHDATA(0);
}

static void _cffi_check_struct_tdTPM_BOUND_DATA(struct tdTPM_BOUND_DATA *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TPM_STRUCT_VER *tmp = &p->ver; (void)tmp; }
  (void)((p->payload) << 1);
  { uint8_t * *tmp = &p->payloadData; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_BOUND_DATA(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_BOUND_DATA y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_BOUND_DATA),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_BOUND_DATA, ver),
    sizeof(((struct tdTPM_BOUND_DATA *)0)->ver),
    offsetof(struct tdTPM_BOUND_DATA, payload),
    sizeof(((struct tdTPM_BOUND_DATA *)0)->payload),
    offsetof(struct tdTPM_BOUND_DATA, payloadData),
    sizeof(((struct tdTPM_BOUND_DATA *)0)->payloadData),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_BOUND_DATA(0);
}

static void _cffi_check_struct_tdTPM_CAP_VERSION_INFO(struct tdTPM_CAP_VERSION_INFO *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  { TPM_VERSION *tmp = &p->version; (void)tmp; }
  (void)((p->specLevel) << 1);
  (void)((p->errataRev) << 1);
  { uint8_t(*tmp)[4] = &p->tpmVendorID; (void)tmp; }
  (void)((p->vendorSpecificSize) << 1);
  { uint8_t * *tmp = &p->vendorSpecific; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_CAP_VERSION_INFO(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_CAP_VERSION_INFO y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_CAP_VERSION_INFO),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_CAP_VERSION_INFO, tag),
    sizeof(((struct tdTPM_CAP_VERSION_INFO *)0)->tag),
    offsetof(struct tdTPM_CAP_VERSION_INFO, version),
    sizeof(((struct tdTPM_CAP_VERSION_INFO *)0)->version),
    offsetof(struct tdTPM_CAP_VERSION_INFO, specLevel),
    sizeof(((struct tdTPM_CAP_VERSION_INFO *)0)->specLevel),
    offsetof(struct tdTPM_CAP_VERSION_INFO, errataRev),
    sizeof(((struct tdTPM_CAP_VERSION_INFO *)0)->errataRev),
    offsetof(struct tdTPM_CAP_VERSION_INFO, tpmVendorID),
    sizeof(((struct tdTPM_CAP_VERSION_INFO *)0)->tpmVendorID),
    offsetof(struct tdTPM_CAP_VERSION_INFO, vendorSpecificSize),
    sizeof(((struct tdTPM_CAP_VERSION_INFO *)0)->vendorSpecificSize),
    offsetof(struct tdTPM_CAP_VERSION_INFO, vendorSpecific),
    sizeof(((struct tdTPM_CAP_VERSION_INFO *)0)->vendorSpecific),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_CAP_VERSION_INFO(0);
}

static void _cffi_check_struct_tdTPM_CERTIFY_INFO(struct tdTPM_CERTIFY_INFO *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TPM_STRUCT_VER *tmp = &p->version; (void)tmp; }
  (void)((p->keyUsage) << 1);
  (void)((p->keyFlags) << 1);
  (void)((p->authDataUsage) << 1);
  { TPM_KEY_PARMS *tmp = &p->algorithmParms; (void)tmp; }
  { TPM_DIGEST *tmp = &p->pubkeyDigest; (void)tmp; }
  { TPM_NONCE *tmp = &p->data; (void)tmp; }
  (void)((p->parentPCRStatus) << 1);
  (void)((p->PCRInfoSize) << 1);
  { uint8_t * *tmp = &p->PCRInfo; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_CERTIFY_INFO(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_CERTIFY_INFO y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_CERTIFY_INFO),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_CERTIFY_INFO, version),
    sizeof(((struct tdTPM_CERTIFY_INFO *)0)->version),
    offsetof(struct tdTPM_CERTIFY_INFO, keyUsage),
    sizeof(((struct tdTPM_CERTIFY_INFO *)0)->keyUsage),
    offsetof(struct tdTPM_CERTIFY_INFO, keyFlags),
    sizeof(((struct tdTPM_CERTIFY_INFO *)0)->keyFlags),
    offsetof(struct tdTPM_CERTIFY_INFO, authDataUsage),
    sizeof(((struct tdTPM_CERTIFY_INFO *)0)->authDataUsage),
    offsetof(struct tdTPM_CERTIFY_INFO, algorithmParms),
    sizeof(((struct tdTPM_CERTIFY_INFO *)0)->algorithmParms),
    offsetof(struct tdTPM_CERTIFY_INFO, pubkeyDigest),
    sizeof(((struct tdTPM_CERTIFY_INFO *)0)->pubkeyDigest),
    offsetof(struct tdTPM_CERTIFY_INFO, data),
    sizeof(((struct tdTPM_CERTIFY_INFO *)0)->data),
    offsetof(struct tdTPM_CERTIFY_INFO, parentPCRStatus),
    sizeof(((struct tdTPM_CERTIFY_INFO *)0)->parentPCRStatus),
    offsetof(struct tdTPM_CERTIFY_INFO, PCRInfoSize),
    sizeof(((struct tdTPM_CERTIFY_INFO *)0)->PCRInfoSize),
    offsetof(struct tdTPM_CERTIFY_INFO, PCRInfo),
    sizeof(((struct tdTPM_CERTIFY_INFO *)0)->PCRInfo),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_CERTIFY_INFO(0);
}

static void _cffi_check_struct_tdTPM_CERTIFY_INFO2(struct tdTPM_CERTIFY_INFO2 *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  (void)((p->fill) << 1);
  (void)((p->payloadType) << 1);
  (void)((p->keyUsage) << 1);
  (void)((p->keyFlags) << 1);
  (void)((p->authDataUsage) << 1);
  { TPM_KEY_PARMS *tmp = &p->algorithmParms; (void)tmp; }
  { TPM_DIGEST *tmp = &p->pubkeyDigest; (void)tmp; }
  { TPM_NONCE *tmp = &p->data; (void)tmp; }
  (void)((p->parentPCRStatus) << 1);
  (void)((p->PCRInfoSize) << 1);
  { uint8_t * *tmp = &p->PCRInfo; (void)tmp; }
  (void)((p->migrationAuthoritySize) << 1);
  { uint8_t * *tmp = &p->migrationAuthority; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_CERTIFY_INFO2(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_CERTIFY_INFO2 y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_CERTIFY_INFO2),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_CERTIFY_INFO2, tag),
    sizeof(((struct tdTPM_CERTIFY_INFO2 *)0)->tag),
    offsetof(struct tdTPM_CERTIFY_INFO2, fill),
    sizeof(((struct tdTPM_CERTIFY_INFO2 *)0)->fill),
    offsetof(struct tdTPM_CERTIFY_INFO2, payloadType),
    sizeof(((struct tdTPM_CERTIFY_INFO2 *)0)->payloadType),
    offsetof(struct tdTPM_CERTIFY_INFO2, keyUsage),
    sizeof(((struct tdTPM_CERTIFY_INFO2 *)0)->keyUsage),
    offsetof(struct tdTPM_CERTIFY_INFO2, keyFlags),
    sizeof(((struct tdTPM_CERTIFY_INFO2 *)0)->keyFlags),
    offsetof(struct tdTPM_CERTIFY_INFO2, authDataUsage),
    sizeof(((struct tdTPM_CERTIFY_INFO2 *)0)->authDataUsage),
    offsetof(struct tdTPM_CERTIFY_INFO2, algorithmParms),
    sizeof(((struct tdTPM_CERTIFY_INFO2 *)0)->algorithmParms),
    offsetof(struct tdTPM_CERTIFY_INFO2, pubkeyDigest),
    sizeof(((struct tdTPM_CERTIFY_INFO2 *)0)->pubkeyDigest),
    offsetof(struct tdTPM_CERTIFY_INFO2, data),
    sizeof(((struct tdTPM_CERTIFY_INFO2 *)0)->data),
    offsetof(struct tdTPM_CERTIFY_INFO2, parentPCRStatus),
    sizeof(((struct tdTPM_CERTIFY_INFO2 *)0)->parentPCRStatus),
    offsetof(struct tdTPM_CERTIFY_INFO2, PCRInfoSize),
    sizeof(((struct tdTPM_CERTIFY_INFO2 *)0)->PCRInfoSize),
    offsetof(struct tdTPM_CERTIFY_INFO2, PCRInfo),
    sizeof(((struct tdTPM_CERTIFY_INFO2 *)0)->PCRInfo),
    offsetof(struct tdTPM_CERTIFY_INFO2, migrationAuthoritySize),
    sizeof(((struct tdTPM_CERTIFY_INFO2 *)0)->migrationAuthoritySize),
    offsetof(struct tdTPM_CERTIFY_INFO2, migrationAuthority),
    sizeof(((struct tdTPM_CERTIFY_INFO2 *)0)->migrationAuthority),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_CERTIFY_INFO2(0);
}

static void _cffi_check_struct_tdTPM_CHANGEAUTH_VALIDATE(struct tdTPM_CHANGEAUTH_VALIDATE *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TPM_AUTHDATA *tmp = &p->newAuthSecret; (void)tmp; }
  { TPM_NONCE *tmp = &p->n1; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_CHANGEAUTH_VALIDATE(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_CHANGEAUTH_VALIDATE y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_CHANGEAUTH_VALIDATE),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_CHANGEAUTH_VALIDATE, newAuthSecret),
    sizeof(((struct tdTPM_CHANGEAUTH_VALIDATE *)0)->newAuthSecret),
    offsetof(struct tdTPM_CHANGEAUTH_VALIDATE, n1),
    sizeof(((struct tdTPM_CHANGEAUTH_VALIDATE *)0)->n1),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_CHANGEAUTH_VALIDATE(0);
}

static void _cffi_check_struct_tdTPM_CMK_AUTH(struct tdTPM_CMK_AUTH *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TPM_DIGEST *tmp = &p->migrationAuthorityDigest; (void)tmp; }
  { TPM_DIGEST *tmp = &p->destinationKeyDigest; (void)tmp; }
  { TPM_DIGEST *tmp = &p->sourceKeyDigest; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_CMK_AUTH(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_CMK_AUTH y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_CMK_AUTH),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_CMK_AUTH, migrationAuthorityDigest),
    sizeof(((struct tdTPM_CMK_AUTH *)0)->migrationAuthorityDigest),
    offsetof(struct tdTPM_CMK_AUTH, destinationKeyDigest),
    sizeof(((struct tdTPM_CMK_AUTH *)0)->destinationKeyDigest),
    offsetof(struct tdTPM_CMK_AUTH, sourceKeyDigest),
    sizeof(((struct tdTPM_CMK_AUTH *)0)->sourceKeyDigest),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_CMK_AUTH(0);
}

static void _cffi_check_struct_tdTPM_CMK_MA_APPROVAL(struct tdTPM_CMK_MA_APPROVAL *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  { TPM_DIGEST *tmp = &p->migrationAuthorityDigest; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_CMK_MA_APPROVAL(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_CMK_MA_APPROVAL y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_CMK_MA_APPROVAL),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_CMK_MA_APPROVAL, tag),
    sizeof(((struct tdTPM_CMK_MA_APPROVAL *)0)->tag),
    offsetof(struct tdTPM_CMK_MA_APPROVAL, migrationAuthorityDigest),
    sizeof(((struct tdTPM_CMK_MA_APPROVAL *)0)->migrationAuthorityDigest),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_CMK_MA_APPROVAL(0);
}

static void _cffi_check_struct_tdTPM_CMK_MIGAUTH(struct tdTPM_CMK_MIGAUTH *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  { TPM_DIGEST *tmp = &p->msaDigest; (void)tmp; }
  { TPM_DIGEST *tmp = &p->pubKeyDigest; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_CMK_MIGAUTH(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_CMK_MIGAUTH y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_CMK_MIGAUTH),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_CMK_MIGAUTH, tag),
    sizeof(((struct tdTPM_CMK_MIGAUTH *)0)->tag),
    offsetof(struct tdTPM_CMK_MIGAUTH, msaDigest),
    sizeof(((struct tdTPM_CMK_MIGAUTH *)0)->msaDigest),
    offsetof(struct tdTPM_CMK_MIGAUTH, pubKeyDigest),
    sizeof(((struct tdTPM_CMK_MIGAUTH *)0)->pubKeyDigest),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_CMK_MIGAUTH(0);
}

static void _cffi_check_struct_tdTPM_CMK_SIGTICKET(struct tdTPM_CMK_SIGTICKET *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  { TPM_DIGEST *tmp = &p->verKeyDigest; (void)tmp; }
  { TPM_DIGEST *tmp = &p->signedData; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_CMK_SIGTICKET(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_CMK_SIGTICKET y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_CMK_SIGTICKET),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_CMK_SIGTICKET, tag),
    sizeof(((struct tdTPM_CMK_SIGTICKET *)0)->tag),
    offsetof(struct tdTPM_CMK_SIGTICKET, verKeyDigest),
    sizeof(((struct tdTPM_CMK_SIGTICKET *)0)->verKeyDigest),
    offsetof(struct tdTPM_CMK_SIGTICKET, signedData),
    sizeof(((struct tdTPM_CMK_SIGTICKET *)0)->signedData),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_CMK_SIGTICKET(0);
}

static void _cffi_check_struct_tdTPM_CONTEXT_BLOB(struct tdTPM_CONTEXT_BLOB *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  (void)((p->resourceType) << 1);
  (void)((p->handle) << 1);
  { uint8_t(*tmp)[16] = &p->label; (void)tmp; }
  (void)((p->contextCount) << 1);
  { TPM_DIGEST *tmp = &p->integrityDigest; (void)tmp; }
  (void)((p->additionalSize) << 1);
  { uint8_t * *tmp = &p->additionalData; (void)tmp; }
  (void)((p->sensitiveSize) << 1);
  { uint8_t * *tmp = &p->sensitiveData; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_CONTEXT_BLOB(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_CONTEXT_BLOB y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_CONTEXT_BLOB),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_CONTEXT_BLOB, tag),
    sizeof(((struct tdTPM_CONTEXT_BLOB *)0)->tag),
    offsetof(struct tdTPM_CONTEXT_BLOB, resourceType),
    sizeof(((struct tdTPM_CONTEXT_BLOB *)0)->resourceType),
    offsetof(struct tdTPM_CONTEXT_BLOB, handle),
    sizeof(((struct tdTPM_CONTEXT_BLOB *)0)->handle),
    offsetof(struct tdTPM_CONTEXT_BLOB, label),
    sizeof(((struct tdTPM_CONTEXT_BLOB *)0)->label),
    offsetof(struct tdTPM_CONTEXT_BLOB, contextCount),
    sizeof(((struct tdTPM_CONTEXT_BLOB *)0)->contextCount),
    offsetof(struct tdTPM_CONTEXT_BLOB, integrityDigest),
    sizeof(((struct tdTPM_CONTEXT_BLOB *)0)->integrityDigest),
    offsetof(struct tdTPM_CONTEXT_BLOB, additionalSize),
    sizeof(((struct tdTPM_CONTEXT_BLOB *)0)->additionalSize),
    offsetof(struct tdTPM_CONTEXT_BLOB, additionalData),
    sizeof(((struct tdTPM_CONTEXT_BLOB *)0)->additionalData),
    offsetof(struct tdTPM_CONTEXT_BLOB, sensitiveSize),
    sizeof(((struct tdTPM_CONTEXT_BLOB *)0)->sensitiveSize),
    offsetof(struct tdTPM_CONTEXT_BLOB, sensitiveData),
    sizeof(((struct tdTPM_CONTEXT_BLOB *)0)->sensitiveData),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_CONTEXT_BLOB(0);
}

static void _cffi_check_struct_tdTPM_CONTEXT_SENSITIVE(struct tdTPM_CONTEXT_SENSITIVE *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  { TPM_NONCE *tmp = &p->contextNonce; (void)tmp; }
  (void)((p->internalSize) << 1);
  { uint8_t * *tmp = &p->internalData; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_CONTEXT_SENSITIVE(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_CONTEXT_SENSITIVE y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_CONTEXT_SENSITIVE),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_CONTEXT_SENSITIVE, tag),
    sizeof(((struct tdTPM_CONTEXT_SENSITIVE *)0)->tag),
    offsetof(struct tdTPM_CONTEXT_SENSITIVE, contextNonce),
    sizeof(((struct tdTPM_CONTEXT_SENSITIVE *)0)->contextNonce),
    offsetof(struct tdTPM_CONTEXT_SENSITIVE, internalSize),
    sizeof(((struct tdTPM_CONTEXT_SENSITIVE *)0)->internalSize),
    offsetof(struct tdTPM_CONTEXT_SENSITIVE, internalData),
    sizeof(((struct tdTPM_CONTEXT_SENSITIVE *)0)->internalData),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_CONTEXT_SENSITIVE(0);
}

static void _cffi_check_struct_tdTPM_COUNTER_VALUE(struct tdTPM_COUNTER_VALUE *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  { uint8_t(*tmp)[4] = &p->label; (void)tmp; }
  (void)((p->counter) << 1);
}
static PyObject *
_cffi_layout_struct_tdTPM_COUNTER_VALUE(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_COUNTER_VALUE y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_COUNTER_VALUE),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_COUNTER_VALUE, tag),
    sizeof(((struct tdTPM_COUNTER_VALUE *)0)->tag),
    offsetof(struct tdTPM_COUNTER_VALUE, label),
    sizeof(((struct tdTPM_COUNTER_VALUE *)0)->label),
    offsetof(struct tdTPM_COUNTER_VALUE, counter),
    sizeof(((struct tdTPM_COUNTER_VALUE *)0)->counter),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_COUNTER_VALUE(0);
}

static void _cffi_check_struct_tdTPM_CURRENT_TICKS(struct tdTPM_CURRENT_TICKS *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  (void)((p->currentTicks) << 1);
  (void)((p->tickRate) << 1);
  { TPM_NONCE *tmp = &p->tickNonce; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_CURRENT_TICKS(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_CURRENT_TICKS y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_CURRENT_TICKS),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_CURRENT_TICKS, tag),
    sizeof(((struct tdTPM_CURRENT_TICKS *)0)->tag),
    offsetof(struct tdTPM_CURRENT_TICKS, currentTicks),
    sizeof(((struct tdTPM_CURRENT_TICKS *)0)->currentTicks),
    offsetof(struct tdTPM_CURRENT_TICKS, tickRate),
    sizeof(((struct tdTPM_CURRENT_TICKS *)0)->tickRate),
    offsetof(struct tdTPM_CURRENT_TICKS, tickNonce),
    sizeof(((struct tdTPM_CURRENT_TICKS *)0)->tickNonce),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_CURRENT_TICKS(0);
}

static void _cffi_check_struct_tdTPM_DAA_BLOB(struct tdTPM_DAA_BLOB *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  (void)((p->resourceType) << 1);
  { uint8_t(*tmp)[16] = &p->label; (void)tmp; }
  { TPM_DIGEST *tmp = &p->blobIntegrity; (void)tmp; }
  (void)((p->additionalSize) << 1);
  { uint8_t * *tmp = &p->additionalData; (void)tmp; }
  (void)((p->sensitiveSize) << 1);
  { uint8_t * *tmp = &p->sensitiveData; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_DAA_BLOB(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_DAA_BLOB y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_DAA_BLOB),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_DAA_BLOB, tag),
    sizeof(((struct tdTPM_DAA_BLOB *)0)->tag),
    offsetof(struct tdTPM_DAA_BLOB, resourceType),
    sizeof(((struct tdTPM_DAA_BLOB *)0)->resourceType),
    offsetof(struct tdTPM_DAA_BLOB, label),
    sizeof(((struct tdTPM_DAA_BLOB *)0)->label),
    offsetof(struct tdTPM_DAA_BLOB, blobIntegrity),
    sizeof(((struct tdTPM_DAA_BLOB *)0)->blobIntegrity),
    offsetof(struct tdTPM_DAA_BLOB, additionalSize),
    sizeof(((struct tdTPM_DAA_BLOB *)0)->additionalSize),
    offsetof(struct tdTPM_DAA_BLOB, additionalData),
    sizeof(((struct tdTPM_DAA_BLOB *)0)->additionalData),
    offsetof(struct tdTPM_DAA_BLOB, sensitiveSize),
    sizeof(((struct tdTPM_DAA_BLOB *)0)->sensitiveSize),
    offsetof(struct tdTPM_DAA_BLOB, sensitiveData),
    sizeof(((struct tdTPM_DAA_BLOB *)0)->sensitiveData),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_DAA_BLOB(0);
}

static void _cffi_check_struct_tdTPM_DAA_CONTEXT(struct tdTPM_DAA_CONTEXT *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  { TPM_DIGEST *tmp = &p->DAA_digestContext; (void)tmp; }
  { TPM_DIGEST *tmp = &p->DAA_digest; (void)tmp; }
  { TPM_NONCE *tmp = &p->DAA_contextSeed; (void)tmp; }
  { uint8_t(*tmp)[256] = &p->DAA_scratch; (void)tmp; }
  (void)((p->DAA_stage) << 1);
}
static PyObject *
_cffi_layout_struct_tdTPM_DAA_CONTEXT(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_DAA_CONTEXT y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_DAA_CONTEXT),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_DAA_CONTEXT, tag),
    sizeof(((struct tdTPM_DAA_CONTEXT *)0)->tag),
    offsetof(struct tdTPM_DAA_CONTEXT, DAA_digestContext),
    sizeof(((struct tdTPM_DAA_CONTEXT *)0)->DAA_digestContext),
    offsetof(struct tdTPM_DAA_CONTEXT, DAA_digest),
    sizeof(((struct tdTPM_DAA_CONTEXT *)0)->DAA_digest),
    offsetof(struct tdTPM_DAA_CONTEXT, DAA_contextSeed),
    sizeof(((struct tdTPM_DAA_CONTEXT *)0)->DAA_contextSeed),
    offsetof(struct tdTPM_DAA_CONTEXT, DAA_scratch),
    sizeof(((struct tdTPM_DAA_CONTEXT *)0)->DAA_scratch),
    offsetof(struct tdTPM_DAA_CONTEXT, DAA_stage),
    sizeof(((struct tdTPM_DAA_CONTEXT *)0)->DAA_stage),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_DAA_CONTEXT(0);
}

static void _cffi_check_struct_tdTPM_DAA_ISSUER(struct tdTPM_DAA_ISSUER *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  { TPM_DIGEST *tmp = &p->DAA_digest_R0; (void)tmp; }
  { TPM_DIGEST *tmp = &p->DAA_digest_R1; (void)tmp; }
  { TPM_DIGEST *tmp = &p->DAA_digest_S0; (void)tmp; }
  { TPM_DIGEST *tmp = &p->DAA_digest_S1; (void)tmp; }
  { TPM_DIGEST *tmp = &p->DAA_digest_n; (void)tmp; }
  { TPM_DIGEST *tmp = &p->DAA_digest_gamma; (void)tmp; }
  { uint8_t(*tmp)[26] = &p->DAA_generic_q; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_DAA_ISSUER(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_DAA_ISSUER y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_DAA_ISSUER),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_DAA_ISSUER, tag),
    sizeof(((struct tdTPM_DAA_ISSUER *)0)->tag),
    offsetof(struct tdTPM_DAA_ISSUER, DAA_digest_R0),
    sizeof(((struct tdTPM_DAA_ISSUER *)0)->DAA_digest_R0),
    offsetof(struct tdTPM_DAA_ISSUER, DAA_digest_R1),
    sizeof(((struct tdTPM_DAA_ISSUER *)0)->DAA_digest_R1),
    offsetof(struct tdTPM_DAA_ISSUER, DAA_digest_S0),
    sizeof(((struct tdTPM_DAA_ISSUER *)0)->DAA_digest_S0),
    offsetof(struct tdTPM_DAA_ISSUER, DAA_digest_S1),
    sizeof(((struct tdTPM_DAA_ISSUER *)0)->DAA_digest_S1),
    offsetof(struct tdTPM_DAA_ISSUER, DAA_digest_n),
    sizeof(((struct tdTPM_DAA_ISSUER *)0)->DAA_digest_n),
    offsetof(struct tdTPM_DAA_ISSUER, DAA_digest_gamma),
    sizeof(((struct tdTPM_DAA_ISSUER *)0)->DAA_digest_gamma),
    offsetof(struct tdTPM_DAA_ISSUER, DAA_generic_q),
    sizeof(((struct tdTPM_DAA_ISSUER *)0)->DAA_generic_q),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_DAA_ISSUER(0);
}

static void _cffi_check_struct_tdTPM_DAA_JOINDATA(struct tdTPM_DAA_JOINDATA *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { uint8_t(*tmp)[128] = &p->DAA_join_u0; (void)tmp; }
  { uint8_t(*tmp)[138] = &p->DAA_join_u1; (void)tmp; }
  { TPM_DIGEST *tmp = &p->DAA_digest_n0; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_DAA_JOINDATA(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_DAA_JOINDATA y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_DAA_JOINDATA),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_DAA_JOINDATA, DAA_join_u0),
    sizeof(((struct tdTPM_DAA_JOINDATA *)0)->DAA_join_u0),
    offsetof(struct tdTPM_DAA_JOINDATA, DAA_join_u1),
    sizeof(((struct tdTPM_DAA_JOINDATA *)0)->DAA_join_u1),
    offsetof(struct tdTPM_DAA_JOINDATA, DAA_digest_n0),
    sizeof(((struct tdTPM_DAA_JOINDATA *)0)->DAA_digest_n0),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_DAA_JOINDATA(0);
}

static void _cffi_check_struct_tdTPM_DAA_SENSITIVE(struct tdTPM_DAA_SENSITIVE *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  (void)((p->internalSize) << 1);
  { uint8_t * *tmp = &p->internalData; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_DAA_SENSITIVE(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_DAA_SENSITIVE y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_DAA_SENSITIVE),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_DAA_SENSITIVE, tag),
    sizeof(((struct tdTPM_DAA_SENSITIVE *)0)->tag),
    offsetof(struct tdTPM_DAA_SENSITIVE, internalSize),
    sizeof(((struct tdTPM_DAA_SENSITIVE *)0)->internalSize),
    offsetof(struct tdTPM_DAA_SENSITIVE, internalData),
    sizeof(((struct tdTPM_DAA_SENSITIVE *)0)->internalData),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_DAA_SENSITIVE(0);
}

static void _cffi_check_struct_tdTPM_DAA_TPM(struct tdTPM_DAA_TPM *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  { TPM_DIGEST *tmp = &p->DAA_digestIssuer; (void)tmp; }
  { TPM_DIGEST *tmp = &p->DAA_digest_v0; (void)tmp; }
  { TPM_DIGEST *tmp = &p->DAA_digest_v1; (void)tmp; }
  { TPM_DIGEST *tmp = &p->DAA_rekey; (void)tmp; }
  (void)((p->DAA_count) << 1);
}
static PyObject *
_cffi_layout_struct_tdTPM_DAA_TPM(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_DAA_TPM y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_DAA_TPM),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_DAA_TPM, tag),
    sizeof(((struct tdTPM_DAA_TPM *)0)->tag),
    offsetof(struct tdTPM_DAA_TPM, DAA_digestIssuer),
    sizeof(((struct tdTPM_DAA_TPM *)0)->DAA_digestIssuer),
    offsetof(struct tdTPM_DAA_TPM, DAA_digest_v0),
    sizeof(((struct tdTPM_DAA_TPM *)0)->DAA_digest_v0),
    offsetof(struct tdTPM_DAA_TPM, DAA_digest_v1),
    sizeof(((struct tdTPM_DAA_TPM *)0)->DAA_digest_v1),
    offsetof(struct tdTPM_DAA_TPM, DAA_rekey),
    sizeof(((struct tdTPM_DAA_TPM *)0)->DAA_rekey),
    offsetof(struct tdTPM_DAA_TPM, DAA_count),
    sizeof(((struct tdTPM_DAA_TPM *)0)->DAA_count),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_DAA_TPM(0);
}

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

static void _cffi_check_struct_tdTPM_DA_INFO(struct tdTPM_DA_INFO *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  (void)((p->state) << 1);
  (void)((p->currentCount) << 1);
  (void)((p->threshholdCount) << 1);
  { TPM_DA_ACTION_TYPE *tmp = &p->actionAtThreshold; (void)tmp; }
  (void)((p->actionDependValue) << 1);
  (void)((p->vendorDataSize) << 1);
  { uint8_t * *tmp = &p->vendorData; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_DA_INFO(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_DA_INFO y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_DA_INFO),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_DA_INFO, tag),
    sizeof(((struct tdTPM_DA_INFO *)0)->tag),
    offsetof(struct tdTPM_DA_INFO, state),
    sizeof(((struct tdTPM_DA_INFO *)0)->state),
    offsetof(struct tdTPM_DA_INFO, currentCount),
    sizeof(((struct tdTPM_DA_INFO *)0)->currentCount),
    offsetof(struct tdTPM_DA_INFO, threshholdCount),
    sizeof(((struct tdTPM_DA_INFO *)0)->threshholdCount),
    offsetof(struct tdTPM_DA_INFO, actionAtThreshold),
    sizeof(((struct tdTPM_DA_INFO *)0)->actionAtThreshold),
    offsetof(struct tdTPM_DA_INFO, actionDependValue),
    sizeof(((struct tdTPM_DA_INFO *)0)->actionDependValue),
    offsetof(struct tdTPM_DA_INFO, vendorDataSize),
    sizeof(((struct tdTPM_DA_INFO *)0)->vendorDataSize),
    offsetof(struct tdTPM_DA_INFO, vendorData),
    sizeof(((struct tdTPM_DA_INFO *)0)->vendorData),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_DA_INFO(0);
}

static void _cffi_check_struct_tdTPM_DA_INFO_LIMITED(struct tdTPM_DA_INFO_LIMITED *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  (void)((p->state) << 1);
  { TPM_DA_ACTION_TYPE *tmp = &p->actionAtThreshold; (void)tmp; }
  (void)((p->vendorDataSize) << 1);
  { uint8_t * *tmp = &p->vendorData; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_DA_INFO_LIMITED(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_DA_INFO_LIMITED y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_DA_INFO_LIMITED),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_DA_INFO_LIMITED, tag),
    sizeof(((struct tdTPM_DA_INFO_LIMITED *)0)->tag),
    offsetof(struct tdTPM_DA_INFO_LIMITED, state),
    sizeof(((struct tdTPM_DA_INFO_LIMITED *)0)->state),
    offsetof(struct tdTPM_DA_INFO_LIMITED, actionAtThreshold),
    sizeof(((struct tdTPM_DA_INFO_LIMITED *)0)->actionAtThreshold),
    offsetof(struct tdTPM_DA_INFO_LIMITED, vendorDataSize),
    sizeof(((struct tdTPM_DA_INFO_LIMITED *)0)->vendorDataSize),
    offsetof(struct tdTPM_DA_INFO_LIMITED, vendorData),
    sizeof(((struct tdTPM_DA_INFO_LIMITED *)0)->vendorData),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_DA_INFO_LIMITED(0);
}

static void _cffi_check_struct_tdTPM_DELEGATE_KEY_BLOB(struct tdTPM_DELEGATE_KEY_BLOB *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  { TPM_DELEGATE_PUBLIC *tmp = &p->pub; (void)tmp; }
  { TPM_DIGEST *tmp = &p->integrityDigest; (void)tmp; }
  { TPM_DIGEST *tmp = &p->pubKeyDigest; (void)tmp; }
  (void)((p->additionalSize) << 1);
  { uint8_t * *tmp = &p->additionalArea; (void)tmp; }
  (void)((p->sensitiveSize) << 1);
  { uint8_t * *tmp = &p->sensitiveArea; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_DELEGATE_KEY_BLOB(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_DELEGATE_KEY_BLOB y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_DELEGATE_KEY_BLOB),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_DELEGATE_KEY_BLOB, tag),
    sizeof(((struct tdTPM_DELEGATE_KEY_BLOB *)0)->tag),
    offsetof(struct tdTPM_DELEGATE_KEY_BLOB, pub),
    sizeof(((struct tdTPM_DELEGATE_KEY_BLOB *)0)->pub),
    offsetof(struct tdTPM_DELEGATE_KEY_BLOB, integrityDigest),
    sizeof(((struct tdTPM_DELEGATE_KEY_BLOB *)0)->integrityDigest),
    offsetof(struct tdTPM_DELEGATE_KEY_BLOB, pubKeyDigest),
    sizeof(((struct tdTPM_DELEGATE_KEY_BLOB *)0)->pubKeyDigest),
    offsetof(struct tdTPM_DELEGATE_KEY_BLOB, additionalSize),
    sizeof(((struct tdTPM_DELEGATE_KEY_BLOB *)0)->additionalSize),
    offsetof(struct tdTPM_DELEGATE_KEY_BLOB, additionalArea),
    sizeof(((struct tdTPM_DELEGATE_KEY_BLOB *)0)->additionalArea),
    offsetof(struct tdTPM_DELEGATE_KEY_BLOB, sensitiveSize),
    sizeof(((struct tdTPM_DELEGATE_KEY_BLOB *)0)->sensitiveSize),
    offsetof(struct tdTPM_DELEGATE_KEY_BLOB, sensitiveArea),
    sizeof(((struct tdTPM_DELEGATE_KEY_BLOB *)0)->sensitiveArea),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_DELEGATE_KEY_BLOB(0);
}

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

static void _cffi_check_struct_tdTPM_DELEGATE_OWNER_BLOB(struct tdTPM_DELEGATE_OWNER_BLOB *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  { TPM_DELEGATE_PUBLIC *tmp = &p->pub; (void)tmp; }
  { TPM_DIGEST *tmp = &p->integrityDigest; (void)tmp; }
  (void)((p->additionalSize) << 1);
  { uint8_t * *tmp = &p->additionalArea; (void)tmp; }
  (void)((p->sensitiveSize) << 1);
  { uint8_t * *tmp = &p->sensitiveArea; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_DELEGATE_OWNER_BLOB(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_DELEGATE_OWNER_BLOB y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_DELEGATE_OWNER_BLOB),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_DELEGATE_OWNER_BLOB, tag),
    sizeof(((struct tdTPM_DELEGATE_OWNER_BLOB *)0)->tag),
    offsetof(struct tdTPM_DELEGATE_OWNER_BLOB, pub),
    sizeof(((struct tdTPM_DELEGATE_OWNER_BLOB *)0)->pub),
    offsetof(struct tdTPM_DELEGATE_OWNER_BLOB, integrityDigest),
    sizeof(((struct tdTPM_DELEGATE_OWNER_BLOB *)0)->integrityDigest),
    offsetof(struct tdTPM_DELEGATE_OWNER_BLOB, additionalSize),
    sizeof(((struct tdTPM_DELEGATE_OWNER_BLOB *)0)->additionalSize),
    offsetof(struct tdTPM_DELEGATE_OWNER_BLOB, additionalArea),
    sizeof(((struct tdTPM_DELEGATE_OWNER_BLOB *)0)->additionalArea),
    offsetof(struct tdTPM_DELEGATE_OWNER_BLOB, sensitiveSize),
    sizeof(((struct tdTPM_DELEGATE_OWNER_BLOB *)0)->sensitiveSize),
    offsetof(struct tdTPM_DELEGATE_OWNER_BLOB, sensitiveArea),
    sizeof(((struct tdTPM_DELEGATE_OWNER_BLOB *)0)->sensitiveArea),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_DELEGATE_OWNER_BLOB(0);
}

static void _cffi_check_struct_tdTPM_DELEGATE_PUBLIC(struct tdTPM_DELEGATE_PUBLIC *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  { TPM_DELEGATE_LABEL *tmp = &p->label; (void)tmp; }
  { TPM_PCR_INFO_SHORT *tmp = &p->pcrInfo; (void)tmp; }
  { TPM_DELEGATIONS *tmp = &p->permissions; (void)tmp; }
  (void)((p->familyID) << 1);
  (void)((p->verificationCount) << 1);
}
static PyObject *
_cffi_layout_struct_tdTPM_DELEGATE_PUBLIC(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_DELEGATE_PUBLIC y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_DELEGATE_PUBLIC),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_DELEGATE_PUBLIC, tag),
    sizeof(((struct tdTPM_DELEGATE_PUBLIC *)0)->tag),
    offsetof(struct tdTPM_DELEGATE_PUBLIC, label),
    sizeof(((struct tdTPM_DELEGATE_PUBLIC *)0)->label),
    offsetof(struct tdTPM_DELEGATE_PUBLIC, pcrInfo),
    sizeof(((struct tdTPM_DELEGATE_PUBLIC *)0)->pcrInfo),
    offsetof(struct tdTPM_DELEGATE_PUBLIC, permissions),
    sizeof(((struct tdTPM_DELEGATE_PUBLIC *)0)->permissions),
    offsetof(struct tdTPM_DELEGATE_PUBLIC, familyID),
    sizeof(((struct tdTPM_DELEGATE_PUBLIC *)0)->familyID),
    offsetof(struct tdTPM_DELEGATE_PUBLIC, verificationCount),
    sizeof(((struct tdTPM_DELEGATE_PUBLIC *)0)->verificationCount),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_DELEGATE_PUBLIC(0);
}

static void _cffi_check_struct_tdTPM_DELEGATE_SENSITIVE(struct tdTPM_DELEGATE_SENSITIVE *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  { TPM_AUTHDATA *tmp = &p->authValue; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_DELEGATE_SENSITIVE(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_DELEGATE_SENSITIVE y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_DELEGATE_SENSITIVE),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_DELEGATE_SENSITIVE, tag),
    sizeof(((struct tdTPM_DELEGATE_SENSITIVE *)0)->tag),
    offsetof(struct tdTPM_DELEGATE_SENSITIVE, authValue),
    sizeof(((struct tdTPM_DELEGATE_SENSITIVE *)0)->authValue),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_DELEGATE_SENSITIVE(0);
}

static void _cffi_check_struct_tdTPM_DELEGATE_TABLE_ROW(struct tdTPM_DELEGATE_TABLE_ROW *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  { TPM_DELEGATE_PUBLIC *tmp = &p->pub; (void)tmp; }
  { TPM_AUTHDATA *tmp = &p->authValue; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_DELEGATE_TABLE_ROW(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_DELEGATE_TABLE_ROW y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_DELEGATE_TABLE_ROW),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_DELEGATE_TABLE_ROW, tag),
    sizeof(((struct tdTPM_DELEGATE_TABLE_ROW *)0)->tag),
    offsetof(struct tdTPM_DELEGATE_TABLE_ROW, pub),
    sizeof(((struct tdTPM_DELEGATE_TABLE_ROW *)0)->pub),
    offsetof(struct tdTPM_DELEGATE_TABLE_ROW, authValue),
    sizeof(((struct tdTPM_DELEGATE_TABLE_ROW *)0)->authValue),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_DELEGATE_TABLE_ROW(0);
}

static void _cffi_check_struct_tdTPM_DELEGATIONS(struct tdTPM_DELEGATIONS *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  (void)((p->delegateType) << 1);
  (void)((p->per1) << 1);
  (void)((p->per2) << 1);
}
static PyObject *
_cffi_layout_struct_tdTPM_DELEGATIONS(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_DELEGATIONS y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_DELEGATIONS),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_DELEGATIONS, tag),
    sizeof(((struct tdTPM_DELEGATIONS *)0)->tag),
    offsetof(struct tdTPM_DELEGATIONS, delegateType),
    sizeof(((struct tdTPM_DELEGATIONS *)0)->delegateType),
    offsetof(struct tdTPM_DELEGATIONS, per1),
    sizeof(((struct tdTPM_DELEGATIONS *)0)->per1),
    offsetof(struct tdTPM_DELEGATIONS, per2),
    sizeof(((struct tdTPM_DELEGATIONS *)0)->per2),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_DELEGATIONS(0);
}

static void _cffi_check_struct_tdTPM_DIGEST(struct tdTPM_DIGEST *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { uint8_t(*tmp)[20] = &p->digest; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_DIGEST(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_DIGEST y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_DIGEST),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_DIGEST, digest),
    sizeof(((struct tdTPM_DIGEST *)0)->digest),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_DIGEST(0);
}

static void _cffi_check_struct_tdTPM_EK_BLOB(struct tdTPM_EK_BLOB *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  (void)((p->ekType) << 1);
  (void)((p->blobSize) << 1);
  { uint8_t * *tmp = &p->blob; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_EK_BLOB(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_EK_BLOB y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_EK_BLOB),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_EK_BLOB, tag),
    sizeof(((struct tdTPM_EK_BLOB *)0)->tag),
    offsetof(struct tdTPM_EK_BLOB, ekType),
    sizeof(((struct tdTPM_EK_BLOB *)0)->ekType),
    offsetof(struct tdTPM_EK_BLOB, blobSize),
    sizeof(((struct tdTPM_EK_BLOB *)0)->blobSize),
    offsetof(struct tdTPM_EK_BLOB, blob),
    sizeof(((struct tdTPM_EK_BLOB *)0)->blob),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_EK_BLOB(0);
}

static void _cffi_check_struct_tdTPM_EK_BLOB_ACTIVATE(struct tdTPM_EK_BLOB_ACTIVATE *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  { TPM_SYMMETRIC_KEY *tmp = &p->sessionKey; (void)tmp; }
  { TPM_DIGEST *tmp = &p->idDigest; (void)tmp; }
  { TPM_PCR_INFO_SHORT *tmp = &p->pcrInfo; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_EK_BLOB_ACTIVATE(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_EK_BLOB_ACTIVATE y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_EK_BLOB_ACTIVATE),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_EK_BLOB_ACTIVATE, tag),
    sizeof(((struct tdTPM_EK_BLOB_ACTIVATE *)0)->tag),
    offsetof(struct tdTPM_EK_BLOB_ACTIVATE, sessionKey),
    sizeof(((struct tdTPM_EK_BLOB_ACTIVATE *)0)->sessionKey),
    offsetof(struct tdTPM_EK_BLOB_ACTIVATE, idDigest),
    sizeof(((struct tdTPM_EK_BLOB_ACTIVATE *)0)->idDigest),
    offsetof(struct tdTPM_EK_BLOB_ACTIVATE, pcrInfo),
    sizeof(((struct tdTPM_EK_BLOB_ACTIVATE *)0)->pcrInfo),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_EK_BLOB_ACTIVATE(0);
}

static void _cffi_check_struct_tdTPM_EK_BLOB_AUTH(struct tdTPM_EK_BLOB_AUTH *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  { TPM_AUTHDATA *tmp = &p->authValue; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_EK_BLOB_AUTH(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_EK_BLOB_AUTH y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_EK_BLOB_AUTH),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_EK_BLOB_AUTH, tag),
    sizeof(((struct tdTPM_EK_BLOB_AUTH *)0)->tag),
    offsetof(struct tdTPM_EK_BLOB_AUTH, authValue),
    sizeof(((struct tdTPM_EK_BLOB_AUTH *)0)->authValue),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_EK_BLOB_AUTH(0);
}

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

static void _cffi_check_struct_tdTPM_FAMILY_TABLE_ENTRY(struct tdTPM_FAMILY_TABLE_ENTRY *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  { TPM_FAMILY_LABEL *tmp = &p->label; (void)tmp; }
  (void)((p->familyID) << 1);
  (void)((p->verificationCount) << 1);
  (void)((p->flags) << 1);
}
static PyObject *
_cffi_layout_struct_tdTPM_FAMILY_TABLE_ENTRY(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_FAMILY_TABLE_ENTRY y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_FAMILY_TABLE_ENTRY),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_FAMILY_TABLE_ENTRY, tag),
    sizeof(((struct tdTPM_FAMILY_TABLE_ENTRY *)0)->tag),
    offsetof(struct tdTPM_FAMILY_TABLE_ENTRY, label),
    sizeof(((struct tdTPM_FAMILY_TABLE_ENTRY *)0)->label),
    offsetof(struct tdTPM_FAMILY_TABLE_ENTRY, familyID),
    sizeof(((struct tdTPM_FAMILY_TABLE_ENTRY *)0)->familyID),
    offsetof(struct tdTPM_FAMILY_TABLE_ENTRY, verificationCount),
    sizeof(((struct tdTPM_FAMILY_TABLE_ENTRY *)0)->verificationCount),
    offsetof(struct tdTPM_FAMILY_TABLE_ENTRY, flags),
    sizeof(((struct tdTPM_FAMILY_TABLE_ENTRY *)0)->flags),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_FAMILY_TABLE_ENTRY(0);
}

static void _cffi_check_struct_tdTPM_IDENTITY_CONTENTS(struct tdTPM_IDENTITY_CONTENTS *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TPM_STRUCT_VER *tmp = &p->ver; (void)tmp; }
  (void)((p->ordinal) << 1);
  { TPM_DIGEST *tmp = &p->labelPrivCADigest; (void)tmp; }
  { TPM_PUBKEY *tmp = &p->identityPubKey; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_IDENTITY_CONTENTS(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_IDENTITY_CONTENTS y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_IDENTITY_CONTENTS),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_IDENTITY_CONTENTS, ver),
    sizeof(((struct tdTPM_IDENTITY_CONTENTS *)0)->ver),
    offsetof(struct tdTPM_IDENTITY_CONTENTS, ordinal),
    sizeof(((struct tdTPM_IDENTITY_CONTENTS *)0)->ordinal),
    offsetof(struct tdTPM_IDENTITY_CONTENTS, labelPrivCADigest),
    sizeof(((struct tdTPM_IDENTITY_CONTENTS *)0)->labelPrivCADigest),
    offsetof(struct tdTPM_IDENTITY_CONTENTS, identityPubKey),
    sizeof(((struct tdTPM_IDENTITY_CONTENTS *)0)->identityPubKey),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_IDENTITY_CONTENTS(0);
}

static void _cffi_check_struct_tdTPM_IDENTITY_PROOF(struct tdTPM_IDENTITY_PROOF *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TPM_STRUCT_VER *tmp = &p->ver; (void)tmp; }
  (void)((p->labelSize) << 1);
  (void)((p->identityBindingSize) << 1);
  (void)((p->endorsementSize) << 1);
  (void)((p->platformSize) << 1);
  (void)((p->conformanceSize) << 1);
  { TPM_PUBKEY *tmp = &p->identityKey; (void)tmp; }
  { uint8_t * *tmp = &p->labelArea; (void)tmp; }
  { uint8_t * *tmp = &p->identityBinding; (void)tmp; }
  { uint8_t * *tmp = &p->endorsementCredential; (void)tmp; }
  { uint8_t * *tmp = &p->platformCredential; (void)tmp; }
  { uint8_t * *tmp = &p->conformanceCredential; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_IDENTITY_PROOF(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_IDENTITY_PROOF y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_IDENTITY_PROOF),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_IDENTITY_PROOF, ver),
    sizeof(((struct tdTPM_IDENTITY_PROOF *)0)->ver),
    offsetof(struct tdTPM_IDENTITY_PROOF, labelSize),
    sizeof(((struct tdTPM_IDENTITY_PROOF *)0)->labelSize),
    offsetof(struct tdTPM_IDENTITY_PROOF, identityBindingSize),
    sizeof(((struct tdTPM_IDENTITY_PROOF *)0)->identityBindingSize),
    offsetof(struct tdTPM_IDENTITY_PROOF, endorsementSize),
    sizeof(((struct tdTPM_IDENTITY_PROOF *)0)->endorsementSize),
    offsetof(struct tdTPM_IDENTITY_PROOF, platformSize),
    sizeof(((struct tdTPM_IDENTITY_PROOF *)0)->platformSize),
    offsetof(struct tdTPM_IDENTITY_PROOF, conformanceSize),
    sizeof(((struct tdTPM_IDENTITY_PROOF *)0)->conformanceSize),
    offsetof(struct tdTPM_IDENTITY_PROOF, identityKey),
    sizeof(((struct tdTPM_IDENTITY_PROOF *)0)->identityKey),
    offsetof(struct tdTPM_IDENTITY_PROOF, labelArea),
    sizeof(((struct tdTPM_IDENTITY_PROOF *)0)->labelArea),
    offsetof(struct tdTPM_IDENTITY_PROOF, identityBinding),
    sizeof(((struct tdTPM_IDENTITY_PROOF *)0)->identityBinding),
    offsetof(struct tdTPM_IDENTITY_PROOF, endorsementCredential),
    sizeof(((struct tdTPM_IDENTITY_PROOF *)0)->endorsementCredential),
    offsetof(struct tdTPM_IDENTITY_PROOF, platformCredential),
    sizeof(((struct tdTPM_IDENTITY_PROOF *)0)->platformCredential),
    offsetof(struct tdTPM_IDENTITY_PROOF, conformanceCredential),
    sizeof(((struct tdTPM_IDENTITY_PROOF *)0)->conformanceCredential),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_IDENTITY_PROOF(0);
}

static void _cffi_check_struct_tdTPM_IDENTITY_REQ(struct tdTPM_IDENTITY_REQ *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->asymSize) << 1);
  (void)((p->symSize) << 1);
  { TPM_KEY_PARMS *tmp = &p->asymAlgorithm; (void)tmp; }
  { TPM_KEY_PARMS *tmp = &p->symAlgorithm; (void)tmp; }
  { uint8_t * *tmp = &p->asymBlob; (void)tmp; }
  { uint8_t * *tmp = &p->symBlob; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_IDENTITY_REQ(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_IDENTITY_REQ y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_IDENTITY_REQ),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_IDENTITY_REQ, asymSize),
    sizeof(((struct tdTPM_IDENTITY_REQ *)0)->asymSize),
    offsetof(struct tdTPM_IDENTITY_REQ, symSize),
    sizeof(((struct tdTPM_IDENTITY_REQ *)0)->symSize),
    offsetof(struct tdTPM_IDENTITY_REQ, asymAlgorithm),
    sizeof(((struct tdTPM_IDENTITY_REQ *)0)->asymAlgorithm),
    offsetof(struct tdTPM_IDENTITY_REQ, symAlgorithm),
    sizeof(((struct tdTPM_IDENTITY_REQ *)0)->symAlgorithm),
    offsetof(struct tdTPM_IDENTITY_REQ, asymBlob),
    sizeof(((struct tdTPM_IDENTITY_REQ *)0)->asymBlob),
    offsetof(struct tdTPM_IDENTITY_REQ, symBlob),
    sizeof(((struct tdTPM_IDENTITY_REQ *)0)->symBlob),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_IDENTITY_REQ(0);
}

static void _cffi_check_struct_tdTPM_KEY(struct tdTPM_KEY *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TPM_STRUCT_VER *tmp = &p->ver; (void)tmp; }
  (void)((p->keyUsage) << 1);
  (void)((p->keyFlags) << 1);
  (void)((p->authDataUsage) << 1);
  { TPM_KEY_PARMS *tmp = &p->algorithmParms; (void)tmp; }
  (void)((p->PCRInfoSize) << 1);
  { uint8_t * *tmp = &p->PCRInfo; (void)tmp; }
  { TPM_STORE_PUBKEY *tmp = &p->pubKey; (void)tmp; }
  (void)((p->encSize) << 1);
  { uint8_t * *tmp = &p->encData; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_KEY(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_KEY y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_KEY),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_KEY, ver),
    sizeof(((struct tdTPM_KEY *)0)->ver),
    offsetof(struct tdTPM_KEY, keyUsage),
    sizeof(((struct tdTPM_KEY *)0)->keyUsage),
    offsetof(struct tdTPM_KEY, keyFlags),
    sizeof(((struct tdTPM_KEY *)0)->keyFlags),
    offsetof(struct tdTPM_KEY, authDataUsage),
    sizeof(((struct tdTPM_KEY *)0)->authDataUsage),
    offsetof(struct tdTPM_KEY, algorithmParms),
    sizeof(((struct tdTPM_KEY *)0)->algorithmParms),
    offsetof(struct tdTPM_KEY, PCRInfoSize),
    sizeof(((struct tdTPM_KEY *)0)->PCRInfoSize),
    offsetof(struct tdTPM_KEY, PCRInfo),
    sizeof(((struct tdTPM_KEY *)0)->PCRInfo),
    offsetof(struct tdTPM_KEY, pubKey),
    sizeof(((struct tdTPM_KEY *)0)->pubKey),
    offsetof(struct tdTPM_KEY, encSize),
    sizeof(((struct tdTPM_KEY *)0)->encSize),
    offsetof(struct tdTPM_KEY, encData),
    sizeof(((struct tdTPM_KEY *)0)->encData),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_KEY(0);
}

static void _cffi_check_struct_tdTPM_KEY12(struct tdTPM_KEY12 *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  (void)((p->fill) << 1);
  (void)((p->keyUsage) << 1);
  (void)((p->keyFlags) << 1);
  (void)((p->authDataUsage) << 1);
  { TPM_KEY_PARMS *tmp = &p->algorithmParms; (void)tmp; }
  (void)((p->PCRInfoSize) << 1);
  { uint8_t * *tmp = &p->PCRInfo; (void)tmp; }
  { TPM_STORE_PUBKEY *tmp = &p->pubKey; (void)tmp; }
  (void)((p->encSize) << 1);
  { uint8_t * *tmp = &p->encData; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_KEY12(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_KEY12 y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_KEY12),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_KEY12, tag),
    sizeof(((struct tdTPM_KEY12 *)0)->tag),
    offsetof(struct tdTPM_KEY12, fill),
    sizeof(((struct tdTPM_KEY12 *)0)->fill),
    offsetof(struct tdTPM_KEY12, keyUsage),
    sizeof(((struct tdTPM_KEY12 *)0)->keyUsage),
    offsetof(struct tdTPM_KEY12, keyFlags),
    sizeof(((struct tdTPM_KEY12 *)0)->keyFlags),
    offsetof(struct tdTPM_KEY12, authDataUsage),
    sizeof(((struct tdTPM_KEY12 *)0)->authDataUsage),
    offsetof(struct tdTPM_KEY12, algorithmParms),
    sizeof(((struct tdTPM_KEY12 *)0)->algorithmParms),
    offsetof(struct tdTPM_KEY12, PCRInfoSize),
    sizeof(((struct tdTPM_KEY12 *)0)->PCRInfoSize),
    offsetof(struct tdTPM_KEY12, PCRInfo),
    sizeof(((struct tdTPM_KEY12 *)0)->PCRInfo),
    offsetof(struct tdTPM_KEY12, pubKey),
    sizeof(((struct tdTPM_KEY12 *)0)->pubKey),
    offsetof(struct tdTPM_KEY12, encSize),
    sizeof(((struct tdTPM_KEY12 *)0)->encSize),
    offsetof(struct tdTPM_KEY12, encData),
    sizeof(((struct tdTPM_KEY12 *)0)->encData),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_KEY12(0);
}

static void _cffi_check_struct_tdTPM_KEY_HANDLE_LIST(struct tdTPM_KEY_HANDLE_LIST *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->loaded) << 1);
  { uint32_t * *tmp = &p->handle; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_KEY_HANDLE_LIST(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_KEY_HANDLE_LIST y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_KEY_HANDLE_LIST),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_KEY_HANDLE_LIST, loaded),
    sizeof(((struct tdTPM_KEY_HANDLE_LIST *)0)->loaded),
    offsetof(struct tdTPM_KEY_HANDLE_LIST, handle),
    sizeof(((struct tdTPM_KEY_HANDLE_LIST *)0)->handle),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_KEY_HANDLE_LIST(0);
}

static void _cffi_check_struct_tdTPM_KEY_PARMS(struct tdTPM_KEY_PARMS *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->algorithmID) << 1);
  (void)((p->encScheme) << 1);
  (void)((p->sigScheme) << 1);
  (void)((p->parmSize) << 1);
  { uint8_t * *tmp = &p->parms; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_KEY_PARMS(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_KEY_PARMS y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_KEY_PARMS),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_KEY_PARMS, algorithmID),
    sizeof(((struct tdTPM_KEY_PARMS *)0)->algorithmID),
    offsetof(struct tdTPM_KEY_PARMS, encScheme),
    sizeof(((struct tdTPM_KEY_PARMS *)0)->encScheme),
    offsetof(struct tdTPM_KEY_PARMS, sigScheme),
    sizeof(((struct tdTPM_KEY_PARMS *)0)->sigScheme),
    offsetof(struct tdTPM_KEY_PARMS, parmSize),
    sizeof(((struct tdTPM_KEY_PARMS *)0)->parmSize),
    offsetof(struct tdTPM_KEY_PARMS, parms),
    sizeof(((struct tdTPM_KEY_PARMS *)0)->parms),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_KEY_PARMS(0);
}

static void _cffi_check_struct_tdTPM_MIGRATE_ASYMKEY(struct tdTPM_MIGRATE_ASYMKEY *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->payload) << 1);
  { TPM_AUTHDATA *tmp = &p->usageAuth; (void)tmp; }
  { TPM_DIGEST *tmp = &p->pubDataDigest; (void)tmp; }
  (void)((p->partPrivKeyLen) << 1);
  { uint8_t * *tmp = &p->partPrivKey; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_MIGRATE_ASYMKEY(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_MIGRATE_ASYMKEY y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_MIGRATE_ASYMKEY),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_MIGRATE_ASYMKEY, payload),
    sizeof(((struct tdTPM_MIGRATE_ASYMKEY *)0)->payload),
    offsetof(struct tdTPM_MIGRATE_ASYMKEY, usageAuth),
    sizeof(((struct tdTPM_MIGRATE_ASYMKEY *)0)->usageAuth),
    offsetof(struct tdTPM_MIGRATE_ASYMKEY, pubDataDigest),
    sizeof(((struct tdTPM_MIGRATE_ASYMKEY *)0)->pubDataDigest),
    offsetof(struct tdTPM_MIGRATE_ASYMKEY, partPrivKeyLen),
    sizeof(((struct tdTPM_MIGRATE_ASYMKEY *)0)->partPrivKeyLen),
    offsetof(struct tdTPM_MIGRATE_ASYMKEY, partPrivKey),
    sizeof(((struct tdTPM_MIGRATE_ASYMKEY *)0)->partPrivKey),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_MIGRATE_ASYMKEY(0);
}

static void _cffi_check_struct_tdTPM_MIGRATIONKEYAUTH(struct tdTPM_MIGRATIONKEYAUTH *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TPM_PUBKEY *tmp = &p->migrationKey; (void)tmp; }
  (void)((p->migrationScheme) << 1);
  { TPM_DIGEST *tmp = &p->digest; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_MIGRATIONKEYAUTH(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_MIGRATIONKEYAUTH y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_MIGRATIONKEYAUTH),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_MIGRATIONKEYAUTH, migrationKey),
    sizeof(((struct tdTPM_MIGRATIONKEYAUTH *)0)->migrationKey),
    offsetof(struct tdTPM_MIGRATIONKEYAUTH, migrationScheme),
    sizeof(((struct tdTPM_MIGRATIONKEYAUTH *)0)->migrationScheme),
    offsetof(struct tdTPM_MIGRATIONKEYAUTH, digest),
    sizeof(((struct tdTPM_MIGRATIONKEYAUTH *)0)->digest),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_MIGRATIONKEYAUTH(0);
}

static void _cffi_check_struct_tdTPM_MSA_COMPOSITE(struct tdTPM_MSA_COMPOSITE *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->MSAlist) << 1);
  { TPM_DIGEST * *tmp = &p->migAuthDigest; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_MSA_COMPOSITE(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_MSA_COMPOSITE y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_MSA_COMPOSITE),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_MSA_COMPOSITE, MSAlist),
    sizeof(((struct tdTPM_MSA_COMPOSITE *)0)->MSAlist),
    offsetof(struct tdTPM_MSA_COMPOSITE, migAuthDigest),
    sizeof(((struct tdTPM_MSA_COMPOSITE *)0)->migAuthDigest),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_MSA_COMPOSITE(0);
}

static void _cffi_check_struct_tdTPM_NONCE(struct tdTPM_NONCE *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { uint8_t(*tmp)[20] = &p->nonce; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_NONCE(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_NONCE y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_NONCE),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_NONCE, nonce),
    sizeof(((struct tdTPM_NONCE *)0)->nonce),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_NONCE(0);
}

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

static void _cffi_check_struct_tdTPM_NV_DATA_PUBLIC(struct tdTPM_NV_DATA_PUBLIC *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  (void)((p->nvIndex) << 1);
  { TPM_PCR_INFO_SHORT *tmp = &p->pcrInfoRead; (void)tmp; }
  { TPM_PCR_INFO_SHORT *tmp = &p->pcrInfoWrite; (void)tmp; }
  { TPM_NV_ATTRIBUTES *tmp = &p->permission; (void)tmp; }
  (void)((p->bReadSTClear) << 1);
  (void)((p->bWriteSTClear) << 1);
  (void)((p->bWriteDefine) << 1);
  (void)((p->dataSize) << 1);
}
static PyObject *
_cffi_layout_struct_tdTPM_NV_DATA_PUBLIC(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_NV_DATA_PUBLIC y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_NV_DATA_PUBLIC),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_NV_DATA_PUBLIC, tag),
    sizeof(((struct tdTPM_NV_DATA_PUBLIC *)0)->tag),
    offsetof(struct tdTPM_NV_DATA_PUBLIC, nvIndex),
    sizeof(((struct tdTPM_NV_DATA_PUBLIC *)0)->nvIndex),
    offsetof(struct tdTPM_NV_DATA_PUBLIC, pcrInfoRead),
    sizeof(((struct tdTPM_NV_DATA_PUBLIC *)0)->pcrInfoRead),
    offsetof(struct tdTPM_NV_DATA_PUBLIC, pcrInfoWrite),
    sizeof(((struct tdTPM_NV_DATA_PUBLIC *)0)->pcrInfoWrite),
    offsetof(struct tdTPM_NV_DATA_PUBLIC, permission),
    sizeof(((struct tdTPM_NV_DATA_PUBLIC *)0)->permission),
    offsetof(struct tdTPM_NV_DATA_PUBLIC, bReadSTClear),
    sizeof(((struct tdTPM_NV_DATA_PUBLIC *)0)->bReadSTClear),
    offsetof(struct tdTPM_NV_DATA_PUBLIC, bWriteSTClear),
    sizeof(((struct tdTPM_NV_DATA_PUBLIC *)0)->bWriteSTClear),
    offsetof(struct tdTPM_NV_DATA_PUBLIC, bWriteDefine),
    sizeof(((struct tdTPM_NV_DATA_PUBLIC *)0)->bWriteDefine),
    offsetof(struct tdTPM_NV_DATA_PUBLIC, dataSize),
    sizeof(((struct tdTPM_NV_DATA_PUBLIC *)0)->dataSize),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_NV_DATA_PUBLIC(0);
}

static void _cffi_check_struct_tdTPM_PCR_ATTRIBUTES(struct tdTPM_PCR_ATTRIBUTES *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->pcrReset) << 1);
  (void)((p->pcrExtendLocal) << 1);
  (void)((p->pcrResetLocal) << 1);
}
static PyObject *
_cffi_layout_struct_tdTPM_PCR_ATTRIBUTES(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_PCR_ATTRIBUTES y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_PCR_ATTRIBUTES),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_PCR_ATTRIBUTES, pcrReset),
    sizeof(((struct tdTPM_PCR_ATTRIBUTES *)0)->pcrReset),
    offsetof(struct tdTPM_PCR_ATTRIBUTES, pcrExtendLocal),
    sizeof(((struct tdTPM_PCR_ATTRIBUTES *)0)->pcrExtendLocal),
    offsetof(struct tdTPM_PCR_ATTRIBUTES, pcrResetLocal),
    sizeof(((struct tdTPM_PCR_ATTRIBUTES *)0)->pcrResetLocal),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_PCR_ATTRIBUTES(0);
}

static void _cffi_check_struct_tdTPM_PCR_COMPOSITE(struct tdTPM_PCR_COMPOSITE *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TPM_PCR_SELECTION *tmp = &p->select; (void)tmp; }
  (void)((p->valueSize) << 1);
  { TPM_DIGEST * *tmp = &p->pcrValue; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_PCR_COMPOSITE(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_PCR_COMPOSITE y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_PCR_COMPOSITE),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_PCR_COMPOSITE, select),
    sizeof(((struct tdTPM_PCR_COMPOSITE *)0)->select),
    offsetof(struct tdTPM_PCR_COMPOSITE, valueSize),
    sizeof(((struct tdTPM_PCR_COMPOSITE *)0)->valueSize),
    offsetof(struct tdTPM_PCR_COMPOSITE, pcrValue),
    sizeof(((struct tdTPM_PCR_COMPOSITE *)0)->pcrValue),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_PCR_COMPOSITE(0);
}

static void _cffi_check_struct_tdTPM_PCR_INFO(struct tdTPM_PCR_INFO *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TPM_PCR_SELECTION *tmp = &p->pcrSelection; (void)tmp; }
  { TPM_DIGEST *tmp = &p->digestAtRelease; (void)tmp; }
  { TPM_DIGEST *tmp = &p->digestAtCreation; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_PCR_INFO(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_PCR_INFO y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_PCR_INFO),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_PCR_INFO, pcrSelection),
    sizeof(((struct tdTPM_PCR_INFO *)0)->pcrSelection),
    offsetof(struct tdTPM_PCR_INFO, digestAtRelease),
    sizeof(((struct tdTPM_PCR_INFO *)0)->digestAtRelease),
    offsetof(struct tdTPM_PCR_INFO, digestAtCreation),
    sizeof(((struct tdTPM_PCR_INFO *)0)->digestAtCreation),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_PCR_INFO(0);
}

static void _cffi_check_struct_tdTPM_PCR_INFO_LONG(struct tdTPM_PCR_INFO_LONG *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  (void)((p->localityAtCreation) << 1);
  (void)((p->localityAtRelease) << 1);
  { TPM_PCR_SELECTION *tmp = &p->creationPCRSelection; (void)tmp; }
  { TPM_PCR_SELECTION *tmp = &p->releasePCRSelection; (void)tmp; }
  { TPM_DIGEST *tmp = &p->digestAtCreation; (void)tmp; }
  { TPM_DIGEST *tmp = &p->digestAtRelease; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_PCR_INFO_LONG(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_PCR_INFO_LONG y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_PCR_INFO_LONG),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_PCR_INFO_LONG, tag),
    sizeof(((struct tdTPM_PCR_INFO_LONG *)0)->tag),
    offsetof(struct tdTPM_PCR_INFO_LONG, localityAtCreation),
    sizeof(((struct tdTPM_PCR_INFO_LONG *)0)->localityAtCreation),
    offsetof(struct tdTPM_PCR_INFO_LONG, localityAtRelease),
    sizeof(((struct tdTPM_PCR_INFO_LONG *)0)->localityAtRelease),
    offsetof(struct tdTPM_PCR_INFO_LONG, creationPCRSelection),
    sizeof(((struct tdTPM_PCR_INFO_LONG *)0)->creationPCRSelection),
    offsetof(struct tdTPM_PCR_INFO_LONG, releasePCRSelection),
    sizeof(((struct tdTPM_PCR_INFO_LONG *)0)->releasePCRSelection),
    offsetof(struct tdTPM_PCR_INFO_LONG, digestAtCreation),
    sizeof(((struct tdTPM_PCR_INFO_LONG *)0)->digestAtCreation),
    offsetof(struct tdTPM_PCR_INFO_LONG, digestAtRelease),
    sizeof(((struct tdTPM_PCR_INFO_LONG *)0)->digestAtRelease),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_PCR_INFO_LONG(0);
}

static void _cffi_check_struct_tdTPM_PCR_INFO_SHORT(struct tdTPM_PCR_INFO_SHORT *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TPM_PCR_SELECTION *tmp = &p->pcrSelection; (void)tmp; }
  (void)((p->localityAtRelease) << 1);
  { TPM_DIGEST *tmp = &p->digestAtRelease; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_PCR_INFO_SHORT(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_PCR_INFO_SHORT y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_PCR_INFO_SHORT),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_PCR_INFO_SHORT, pcrSelection),
    sizeof(((struct tdTPM_PCR_INFO_SHORT *)0)->pcrSelection),
    offsetof(struct tdTPM_PCR_INFO_SHORT, localityAtRelease),
    sizeof(((struct tdTPM_PCR_INFO_SHORT *)0)->localityAtRelease),
    offsetof(struct tdTPM_PCR_INFO_SHORT, digestAtRelease),
    sizeof(((struct tdTPM_PCR_INFO_SHORT *)0)->digestAtRelease),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_PCR_INFO_SHORT(0);
}

static void _cffi_check_struct_tdTPM_PCR_SELECTION(struct tdTPM_PCR_SELECTION *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->sizeOfSelect) << 1);
  { uint8_t * *tmp = &p->pcrSelect; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_PCR_SELECTION(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_PCR_SELECTION y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_PCR_SELECTION),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_PCR_SELECTION, sizeOfSelect),
    sizeof(((struct tdTPM_PCR_SELECTION *)0)->sizeOfSelect),
    offsetof(struct tdTPM_PCR_SELECTION, pcrSelect),
    sizeof(((struct tdTPM_PCR_SELECTION *)0)->pcrSelect),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_PCR_SELECTION(0);
}

static void _cffi_check_struct_tdTPM_PERMANENT_FLAGS(struct tdTPM_PERMANENT_FLAGS *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  (void)((p->disable) << 1);
  (void)((p->ownership) << 1);
  (void)((p->deactivated) << 1);
  (void)((p->readPubek) << 1);
  (void)((p->disableOwnerClear) << 1);
  (void)((p->allowMaintenance) << 1);
  (void)((p->physicalPresenceLifetimeLock) << 1);
  (void)((p->physicalPresenceHWEnable) << 1);
  (void)((p->physicalPresenceCMDEnable) << 1);
  (void)((p->CEKPUsed) << 1);
  (void)((p->TPMpost) << 1);
  (void)((p->TPMpostLock) << 1);
  (void)((p->FIPS) << 1);
  (void)((p->Operator) << 1);
  (void)((p->enableRevokeEK) << 1);
  (void)((p->nvLocked) << 1);
  (void)((p->readSRKPub) << 1);
  (void)((p->tpmEstablished) << 1);
  (void)((p->maintenanceDone) << 1);
  (void)((p->disableFullDALogicInfo) << 1);
}
static PyObject *
_cffi_layout_struct_tdTPM_PERMANENT_FLAGS(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_PERMANENT_FLAGS y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_PERMANENT_FLAGS),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_PERMANENT_FLAGS, tag),
    sizeof(((struct tdTPM_PERMANENT_FLAGS *)0)->tag),
    offsetof(struct tdTPM_PERMANENT_FLAGS, disable),
    sizeof(((struct tdTPM_PERMANENT_FLAGS *)0)->disable),
    offsetof(struct tdTPM_PERMANENT_FLAGS, ownership),
    sizeof(((struct tdTPM_PERMANENT_FLAGS *)0)->ownership),
    offsetof(struct tdTPM_PERMANENT_FLAGS, deactivated),
    sizeof(((struct tdTPM_PERMANENT_FLAGS *)0)->deactivated),
    offsetof(struct tdTPM_PERMANENT_FLAGS, readPubek),
    sizeof(((struct tdTPM_PERMANENT_FLAGS *)0)->readPubek),
    offsetof(struct tdTPM_PERMANENT_FLAGS, disableOwnerClear),
    sizeof(((struct tdTPM_PERMANENT_FLAGS *)0)->disableOwnerClear),
    offsetof(struct tdTPM_PERMANENT_FLAGS, allowMaintenance),
    sizeof(((struct tdTPM_PERMANENT_FLAGS *)0)->allowMaintenance),
    offsetof(struct tdTPM_PERMANENT_FLAGS, physicalPresenceLifetimeLock),
    sizeof(((struct tdTPM_PERMANENT_FLAGS *)0)->physicalPresenceLifetimeLock),
    offsetof(struct tdTPM_PERMANENT_FLAGS, physicalPresenceHWEnable),
    sizeof(((struct tdTPM_PERMANENT_FLAGS *)0)->physicalPresenceHWEnable),
    offsetof(struct tdTPM_PERMANENT_FLAGS, physicalPresenceCMDEnable),
    sizeof(((struct tdTPM_PERMANENT_FLAGS *)0)->physicalPresenceCMDEnable),
    offsetof(struct tdTPM_PERMANENT_FLAGS, CEKPUsed),
    sizeof(((struct tdTPM_PERMANENT_FLAGS *)0)->CEKPUsed),
    offsetof(struct tdTPM_PERMANENT_FLAGS, TPMpost),
    sizeof(((struct tdTPM_PERMANENT_FLAGS *)0)->TPMpost),
    offsetof(struct tdTPM_PERMANENT_FLAGS, TPMpostLock),
    sizeof(((struct tdTPM_PERMANENT_FLAGS *)0)->TPMpostLock),
    offsetof(struct tdTPM_PERMANENT_FLAGS, FIPS),
    sizeof(((struct tdTPM_PERMANENT_FLAGS *)0)->FIPS),
    offsetof(struct tdTPM_PERMANENT_FLAGS, Operator),
    sizeof(((struct tdTPM_PERMANENT_FLAGS *)0)->Operator),
    offsetof(struct tdTPM_PERMANENT_FLAGS, enableRevokeEK),
    sizeof(((struct tdTPM_PERMANENT_FLAGS *)0)->enableRevokeEK),
    offsetof(struct tdTPM_PERMANENT_FLAGS, nvLocked),
    sizeof(((struct tdTPM_PERMANENT_FLAGS *)0)->nvLocked),
    offsetof(struct tdTPM_PERMANENT_FLAGS, readSRKPub),
    sizeof(((struct tdTPM_PERMANENT_FLAGS *)0)->readSRKPub),
    offsetof(struct tdTPM_PERMANENT_FLAGS, tpmEstablished),
    sizeof(((struct tdTPM_PERMANENT_FLAGS *)0)->tpmEstablished),
    offsetof(struct tdTPM_PERMANENT_FLAGS, maintenanceDone),
    sizeof(((struct tdTPM_PERMANENT_FLAGS *)0)->maintenanceDone),
    offsetof(struct tdTPM_PERMANENT_FLAGS, disableFullDALogicInfo),
    sizeof(((struct tdTPM_PERMANENT_FLAGS *)0)->disableFullDALogicInfo),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_PERMANENT_FLAGS(0);
}

static void _cffi_check_struct_tdTPM_PUBKEY(struct tdTPM_PUBKEY *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TPM_KEY_PARMS *tmp = &p->algorithmParms; (void)tmp; }
  { TPM_STORE_PUBKEY *tmp = &p->pubKey; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_PUBKEY(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_PUBKEY y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_PUBKEY),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_PUBKEY, algorithmParms),
    sizeof(((struct tdTPM_PUBKEY *)0)->algorithmParms),
    offsetof(struct tdTPM_PUBKEY, pubKey),
    sizeof(((struct tdTPM_PUBKEY *)0)->pubKey),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_PUBKEY(0);
}

static void _cffi_check_struct_tdTPM_QUOTE_INFO(struct tdTPM_QUOTE_INFO *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TPM_STRUCT_VER *tmp = &p->version; (void)tmp; }
  { uint8_t(*tmp)[4] = &p->fixed; (void)tmp; }
  { TPM_DIGEST *tmp = &p->compositeHash; (void)tmp; }
  { TPM_NONCE *tmp = &p->externalData; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_QUOTE_INFO(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_QUOTE_INFO y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_QUOTE_INFO),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_QUOTE_INFO, version),
    sizeof(((struct tdTPM_QUOTE_INFO *)0)->version),
    offsetof(struct tdTPM_QUOTE_INFO, fixed),
    sizeof(((struct tdTPM_QUOTE_INFO *)0)->fixed),
    offsetof(struct tdTPM_QUOTE_INFO, compositeHash),
    sizeof(((struct tdTPM_QUOTE_INFO *)0)->compositeHash),
    offsetof(struct tdTPM_QUOTE_INFO, externalData),
    sizeof(((struct tdTPM_QUOTE_INFO *)0)->externalData),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_QUOTE_INFO(0);
}

static void _cffi_check_struct_tdTPM_QUOTE_INFO2(struct tdTPM_QUOTE_INFO2 *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  { uint8_t(*tmp)[4] = &p->fixed; (void)tmp; }
  { TPM_NONCE *tmp = &p->externalData; (void)tmp; }
  { TPM_PCR_INFO_SHORT *tmp = &p->infoShort; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_QUOTE_INFO2(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_QUOTE_INFO2 y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_QUOTE_INFO2),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_QUOTE_INFO2, tag),
    sizeof(((struct tdTPM_QUOTE_INFO2 *)0)->tag),
    offsetof(struct tdTPM_QUOTE_INFO2, fixed),
    sizeof(((struct tdTPM_QUOTE_INFO2 *)0)->fixed),
    offsetof(struct tdTPM_QUOTE_INFO2, externalData),
    sizeof(((struct tdTPM_QUOTE_INFO2 *)0)->externalData),
    offsetof(struct tdTPM_QUOTE_INFO2, infoShort),
    sizeof(((struct tdTPM_QUOTE_INFO2 *)0)->infoShort),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_QUOTE_INFO2(0);
}

static void _cffi_check_struct_tdTPM_RSA_KEY_PARMS(struct tdTPM_RSA_KEY_PARMS *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->keyLength) << 1);
  (void)((p->numPrimes) << 1);
  (void)((p->exponentSize) << 1);
  { uint8_t * *tmp = &p->exponent; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_RSA_KEY_PARMS(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_RSA_KEY_PARMS y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_RSA_KEY_PARMS),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_RSA_KEY_PARMS, keyLength),
    sizeof(((struct tdTPM_RSA_KEY_PARMS *)0)->keyLength),
    offsetof(struct tdTPM_RSA_KEY_PARMS, numPrimes),
    sizeof(((struct tdTPM_RSA_KEY_PARMS *)0)->numPrimes),
    offsetof(struct tdTPM_RSA_KEY_PARMS, exponentSize),
    sizeof(((struct tdTPM_RSA_KEY_PARMS *)0)->exponentSize),
    offsetof(struct tdTPM_RSA_KEY_PARMS, exponent),
    sizeof(((struct tdTPM_RSA_KEY_PARMS *)0)->exponent),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_RSA_KEY_PARMS(0);
}

static void _cffi_check_struct_tdTPM_SEALED_DATA(struct tdTPM_SEALED_DATA *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->payload) << 1);
  { TPM_AUTHDATA *tmp = &p->authData; (void)tmp; }
  { TPM_NONCE *tmp = &p->tpmProof; (void)tmp; }
  { TPM_DIGEST *tmp = &p->storedDigest; (void)tmp; }
  (void)((p->dataSize) << 1);
  { uint8_t * *tmp = &p->data; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_SEALED_DATA(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_SEALED_DATA y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_SEALED_DATA),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_SEALED_DATA, payload),
    sizeof(((struct tdTPM_SEALED_DATA *)0)->payload),
    offsetof(struct tdTPM_SEALED_DATA, authData),
    sizeof(((struct tdTPM_SEALED_DATA *)0)->authData),
    offsetof(struct tdTPM_SEALED_DATA, tpmProof),
    sizeof(((struct tdTPM_SEALED_DATA *)0)->tpmProof),
    offsetof(struct tdTPM_SEALED_DATA, storedDigest),
    sizeof(((struct tdTPM_SEALED_DATA *)0)->storedDigest),
    offsetof(struct tdTPM_SEALED_DATA, dataSize),
    sizeof(((struct tdTPM_SEALED_DATA *)0)->dataSize),
    offsetof(struct tdTPM_SEALED_DATA, data),
    sizeof(((struct tdTPM_SEALED_DATA *)0)->data),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_SEALED_DATA(0);
}

static void _cffi_check_struct_tdTPM_SELECT_SIZE(struct tdTPM_SELECT_SIZE *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->major) << 1);
  (void)((p->minor) << 1);
  (void)((p->reqSize) << 1);
}
static PyObject *
_cffi_layout_struct_tdTPM_SELECT_SIZE(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_SELECT_SIZE y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_SELECT_SIZE),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_SELECT_SIZE, major),
    sizeof(((struct tdTPM_SELECT_SIZE *)0)->major),
    offsetof(struct tdTPM_SELECT_SIZE, minor),
    sizeof(((struct tdTPM_SELECT_SIZE *)0)->minor),
    offsetof(struct tdTPM_SELECT_SIZE, reqSize),
    sizeof(((struct tdTPM_SELECT_SIZE *)0)->reqSize),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_SELECT_SIZE(0);
}

static void _cffi_check_struct_tdTPM_SIGN_INFO(struct tdTPM_SIGN_INFO *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  { uint8_t(*tmp)[4] = &p->fixed; (void)tmp; }
  { TPM_NONCE *tmp = &p->replay; (void)tmp; }
  (void)((p->dataLen) << 1);
  { uint8_t * *tmp = &p->data; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_SIGN_INFO(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_SIGN_INFO y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_SIGN_INFO),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_SIGN_INFO, tag),
    sizeof(((struct tdTPM_SIGN_INFO *)0)->tag),
    offsetof(struct tdTPM_SIGN_INFO, fixed),
    sizeof(((struct tdTPM_SIGN_INFO *)0)->fixed),
    offsetof(struct tdTPM_SIGN_INFO, replay),
    sizeof(((struct tdTPM_SIGN_INFO *)0)->replay),
    offsetof(struct tdTPM_SIGN_INFO, dataLen),
    sizeof(((struct tdTPM_SIGN_INFO *)0)->dataLen),
    offsetof(struct tdTPM_SIGN_INFO, data),
    sizeof(((struct tdTPM_SIGN_INFO *)0)->data),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_SIGN_INFO(0);
}

static void _cffi_check_struct_tdTPM_STANY_FLAGS(struct tdTPM_STANY_FLAGS *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  (void)((p->postInitialise) << 1);
  (void)((p->localityModifier) << 1);
  (void)((p->transportExclusive) << 1);
  (void)((p->TOSPresent) << 1);
}
static PyObject *
_cffi_layout_struct_tdTPM_STANY_FLAGS(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_STANY_FLAGS y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_STANY_FLAGS),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_STANY_FLAGS, tag),
    sizeof(((struct tdTPM_STANY_FLAGS *)0)->tag),
    offsetof(struct tdTPM_STANY_FLAGS, postInitialise),
    sizeof(((struct tdTPM_STANY_FLAGS *)0)->postInitialise),
    offsetof(struct tdTPM_STANY_FLAGS, localityModifier),
    sizeof(((struct tdTPM_STANY_FLAGS *)0)->localityModifier),
    offsetof(struct tdTPM_STANY_FLAGS, transportExclusive),
    sizeof(((struct tdTPM_STANY_FLAGS *)0)->transportExclusive),
    offsetof(struct tdTPM_STANY_FLAGS, TOSPresent),
    sizeof(((struct tdTPM_STANY_FLAGS *)0)->TOSPresent),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_STANY_FLAGS(0);
}

static void _cffi_check_struct_tdTPM_STCLEAR_FLAGS(struct tdTPM_STCLEAR_FLAGS *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  (void)((p->deactivated) << 1);
  (void)((p->disableForceClear) << 1);
  (void)((p->physicalPresence) << 1);
  (void)((p->physicalPresenceLock) << 1);
  (void)((p->bGlobalLock) << 1);
}
static PyObject *
_cffi_layout_struct_tdTPM_STCLEAR_FLAGS(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_STCLEAR_FLAGS y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_STCLEAR_FLAGS),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_STCLEAR_FLAGS, tag),
    sizeof(((struct tdTPM_STCLEAR_FLAGS *)0)->tag),
    offsetof(struct tdTPM_STCLEAR_FLAGS, deactivated),
    sizeof(((struct tdTPM_STCLEAR_FLAGS *)0)->deactivated),
    offsetof(struct tdTPM_STCLEAR_FLAGS, disableForceClear),
    sizeof(((struct tdTPM_STCLEAR_FLAGS *)0)->disableForceClear),
    offsetof(struct tdTPM_STCLEAR_FLAGS, physicalPresence),
    sizeof(((struct tdTPM_STCLEAR_FLAGS *)0)->physicalPresence),
    offsetof(struct tdTPM_STCLEAR_FLAGS, physicalPresenceLock),
    sizeof(((struct tdTPM_STCLEAR_FLAGS *)0)->physicalPresenceLock),
    offsetof(struct tdTPM_STCLEAR_FLAGS, bGlobalLock),
    sizeof(((struct tdTPM_STCLEAR_FLAGS *)0)->bGlobalLock),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_STCLEAR_FLAGS(0);
}

static void _cffi_check_struct_tdTPM_STORED_DATA(struct tdTPM_STORED_DATA *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TPM_STRUCT_VER *tmp = &p->ver; (void)tmp; }
  (void)((p->sealInfoSize) << 1);
  { uint8_t * *tmp = &p->sealInfo; (void)tmp; }
  (void)((p->encDataSize) << 1);
  { uint8_t * *tmp = &p->encData; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_STORED_DATA(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_STORED_DATA y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_STORED_DATA),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_STORED_DATA, ver),
    sizeof(((struct tdTPM_STORED_DATA *)0)->ver),
    offsetof(struct tdTPM_STORED_DATA, sealInfoSize),
    sizeof(((struct tdTPM_STORED_DATA *)0)->sealInfoSize),
    offsetof(struct tdTPM_STORED_DATA, sealInfo),
    sizeof(((struct tdTPM_STORED_DATA *)0)->sealInfo),
    offsetof(struct tdTPM_STORED_DATA, encDataSize),
    sizeof(((struct tdTPM_STORED_DATA *)0)->encDataSize),
    offsetof(struct tdTPM_STORED_DATA, encData),
    sizeof(((struct tdTPM_STORED_DATA *)0)->encData),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_STORED_DATA(0);
}

static void _cffi_check_struct_tdTPM_STORED_DATA12(struct tdTPM_STORED_DATA12 *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  (void)((p->et) << 1);
  (void)((p->sealInfoSize) << 1);
  { uint8_t * *tmp = &p->sealInfo; (void)tmp; }
  (void)((p->encDataSize) << 1);
  { uint8_t * *tmp = &p->encData; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_STORED_DATA12(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_STORED_DATA12 y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_STORED_DATA12),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_STORED_DATA12, tag),
    sizeof(((struct tdTPM_STORED_DATA12 *)0)->tag),
    offsetof(struct tdTPM_STORED_DATA12, et),
    sizeof(((struct tdTPM_STORED_DATA12 *)0)->et),
    offsetof(struct tdTPM_STORED_DATA12, sealInfoSize),
    sizeof(((struct tdTPM_STORED_DATA12 *)0)->sealInfoSize),
    offsetof(struct tdTPM_STORED_DATA12, sealInfo),
    sizeof(((struct tdTPM_STORED_DATA12 *)0)->sealInfo),
    offsetof(struct tdTPM_STORED_DATA12, encDataSize),
    sizeof(((struct tdTPM_STORED_DATA12 *)0)->encDataSize),
    offsetof(struct tdTPM_STORED_DATA12, encData),
    sizeof(((struct tdTPM_STORED_DATA12 *)0)->encData),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_STORED_DATA12(0);
}

static void _cffi_check_struct_tdTPM_STORE_ASYMKEY(struct tdTPM_STORE_ASYMKEY *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->payload) << 1);
  { TPM_AUTHDATA *tmp = &p->usageAuth; (void)tmp; }
  { TPM_AUTHDATA *tmp = &p->migrationAuth; (void)tmp; }
  { TPM_DIGEST *tmp = &p->pubDataDigest; (void)tmp; }
  { TPM_STORE_PRIVKEY *tmp = &p->privKey; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_STORE_ASYMKEY(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_STORE_ASYMKEY y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_STORE_ASYMKEY),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_STORE_ASYMKEY, payload),
    sizeof(((struct tdTPM_STORE_ASYMKEY *)0)->payload),
    offsetof(struct tdTPM_STORE_ASYMKEY, usageAuth),
    sizeof(((struct tdTPM_STORE_ASYMKEY *)0)->usageAuth),
    offsetof(struct tdTPM_STORE_ASYMKEY, migrationAuth),
    sizeof(((struct tdTPM_STORE_ASYMKEY *)0)->migrationAuth),
    offsetof(struct tdTPM_STORE_ASYMKEY, pubDataDigest),
    sizeof(((struct tdTPM_STORE_ASYMKEY *)0)->pubDataDigest),
    offsetof(struct tdTPM_STORE_ASYMKEY, privKey),
    sizeof(((struct tdTPM_STORE_ASYMKEY *)0)->privKey),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_STORE_ASYMKEY(0);
}

static void _cffi_check_struct_tdTPM_STORE_PRIVKEY(struct tdTPM_STORE_PRIVKEY *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->keyLength) << 1);
  { uint8_t * *tmp = &p->key; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_STORE_PRIVKEY(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_STORE_PRIVKEY y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_STORE_PRIVKEY),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_STORE_PRIVKEY, keyLength),
    sizeof(((struct tdTPM_STORE_PRIVKEY *)0)->keyLength),
    offsetof(struct tdTPM_STORE_PRIVKEY, key),
    sizeof(((struct tdTPM_STORE_PRIVKEY *)0)->key),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_STORE_PRIVKEY(0);
}

static void _cffi_check_struct_tdTPM_STORE_PUBKEY(struct tdTPM_STORE_PUBKEY *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->keyLength) << 1);
  { uint8_t * *tmp = &p->key; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_STORE_PUBKEY(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_STORE_PUBKEY y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_STORE_PUBKEY),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_STORE_PUBKEY, keyLength),
    sizeof(((struct tdTPM_STORE_PUBKEY *)0)->keyLength),
    offsetof(struct tdTPM_STORE_PUBKEY, key),
    sizeof(((struct tdTPM_STORE_PUBKEY *)0)->key),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_STORE_PUBKEY(0);
}

static void _cffi_check_struct_tdTPM_STRUCT_VER(struct tdTPM_STRUCT_VER *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->major) << 1);
  (void)((p->minor) << 1);
  (void)((p->revMajor) << 1);
  (void)((p->revMinor) << 1);
}
static PyObject *
_cffi_layout_struct_tdTPM_STRUCT_VER(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_STRUCT_VER y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_STRUCT_VER),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_STRUCT_VER, major),
    sizeof(((struct tdTPM_STRUCT_VER *)0)->major),
    offsetof(struct tdTPM_STRUCT_VER, minor),
    sizeof(((struct tdTPM_STRUCT_VER *)0)->minor),
    offsetof(struct tdTPM_STRUCT_VER, revMajor),
    sizeof(((struct tdTPM_STRUCT_VER *)0)->revMajor),
    offsetof(struct tdTPM_STRUCT_VER, revMinor),
    sizeof(((struct tdTPM_STRUCT_VER *)0)->revMinor),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_STRUCT_VER(0);
}

static void _cffi_check_struct_tdTPM_SYMMETRIC_KEY(struct tdTPM_SYMMETRIC_KEY *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->algId) << 1);
  (void)((p->encScheme) << 1);
  (void)((p->size) << 1);
  { uint8_t * *tmp = &p->data; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_SYMMETRIC_KEY(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_SYMMETRIC_KEY y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_SYMMETRIC_KEY),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_SYMMETRIC_KEY, algId),
    sizeof(((struct tdTPM_SYMMETRIC_KEY *)0)->algId),
    offsetof(struct tdTPM_SYMMETRIC_KEY, encScheme),
    sizeof(((struct tdTPM_SYMMETRIC_KEY *)0)->encScheme),
    offsetof(struct tdTPM_SYMMETRIC_KEY, size),
    sizeof(((struct tdTPM_SYMMETRIC_KEY *)0)->size),
    offsetof(struct tdTPM_SYMMETRIC_KEY, data),
    sizeof(((struct tdTPM_SYMMETRIC_KEY *)0)->data),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_SYMMETRIC_KEY(0);
}

static void _cffi_check_struct_tdTPM_SYMMETRIC_KEY_PARMS(struct tdTPM_SYMMETRIC_KEY_PARMS *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->keyLength) << 1);
  (void)((p->blockSize) << 1);
  (void)((p->ivSize) << 1);
  { uint8_t * *tmp = &p->IV; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_SYMMETRIC_KEY_PARMS(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_SYMMETRIC_KEY_PARMS y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_SYMMETRIC_KEY_PARMS),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_SYMMETRIC_KEY_PARMS, keyLength),
    sizeof(((struct tdTPM_SYMMETRIC_KEY_PARMS *)0)->keyLength),
    offsetof(struct tdTPM_SYMMETRIC_KEY_PARMS, blockSize),
    sizeof(((struct tdTPM_SYMMETRIC_KEY_PARMS *)0)->blockSize),
    offsetof(struct tdTPM_SYMMETRIC_KEY_PARMS, ivSize),
    sizeof(((struct tdTPM_SYMMETRIC_KEY_PARMS *)0)->ivSize),
    offsetof(struct tdTPM_SYMMETRIC_KEY_PARMS, IV),
    sizeof(((struct tdTPM_SYMMETRIC_KEY_PARMS *)0)->IV),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_SYMMETRIC_KEY_PARMS(0);
}

static void _cffi_check_struct_tdTPM_SYM_CA_ATTESTATION(struct tdTPM_SYM_CA_ATTESTATION *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->credSize) << 1);
  { TPM_KEY_PARMS *tmp = &p->algorithm; (void)tmp; }
  { uint8_t * *tmp = &p->credential; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_SYM_CA_ATTESTATION(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_SYM_CA_ATTESTATION y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_SYM_CA_ATTESTATION),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_SYM_CA_ATTESTATION, credSize),
    sizeof(((struct tdTPM_SYM_CA_ATTESTATION *)0)->credSize),
    offsetof(struct tdTPM_SYM_CA_ATTESTATION, algorithm),
    sizeof(((struct tdTPM_SYM_CA_ATTESTATION *)0)->algorithm),
    offsetof(struct tdTPM_SYM_CA_ATTESTATION, credential),
    sizeof(((struct tdTPM_SYM_CA_ATTESTATION *)0)->credential),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_SYM_CA_ATTESTATION(0);
}

static void _cffi_check_struct_tdTPM_TRANSPORT_AUTH(struct tdTPM_TRANSPORT_AUTH *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  { TPM_AUTHDATA *tmp = &p->authData; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_TRANSPORT_AUTH(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_TRANSPORT_AUTH y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_TRANSPORT_AUTH),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_TRANSPORT_AUTH, tag),
    sizeof(((struct tdTPM_TRANSPORT_AUTH *)0)->tag),
    offsetof(struct tdTPM_TRANSPORT_AUTH, authData),
    sizeof(((struct tdTPM_TRANSPORT_AUTH *)0)->authData),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_TRANSPORT_AUTH(0);
}

static void _cffi_check_struct_tdTPM_TRANSPORT_INTERNAL(struct tdTPM_TRANSPORT_INTERNAL *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  { TPM_AUTHDATA *tmp = &p->authData; (void)tmp; }
  { TPM_TRANSPORT_PUBLIC *tmp = &p->transPublic; (void)tmp; }
  (void)((p->transHandle) << 1);
  { TPM_NONCE *tmp = &p->transNonceEven; (void)tmp; }
  { TPM_DIGEST *tmp = &p->transDigest; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_TRANSPORT_INTERNAL(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_TRANSPORT_INTERNAL y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_TRANSPORT_INTERNAL),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_TRANSPORT_INTERNAL, tag),
    sizeof(((struct tdTPM_TRANSPORT_INTERNAL *)0)->tag),
    offsetof(struct tdTPM_TRANSPORT_INTERNAL, authData),
    sizeof(((struct tdTPM_TRANSPORT_INTERNAL *)0)->authData),
    offsetof(struct tdTPM_TRANSPORT_INTERNAL, transPublic),
    sizeof(((struct tdTPM_TRANSPORT_INTERNAL *)0)->transPublic),
    offsetof(struct tdTPM_TRANSPORT_INTERNAL, transHandle),
    sizeof(((struct tdTPM_TRANSPORT_INTERNAL *)0)->transHandle),
    offsetof(struct tdTPM_TRANSPORT_INTERNAL, transNonceEven),
    sizeof(((struct tdTPM_TRANSPORT_INTERNAL *)0)->transNonceEven),
    offsetof(struct tdTPM_TRANSPORT_INTERNAL, transDigest),
    sizeof(((struct tdTPM_TRANSPORT_INTERNAL *)0)->transDigest),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_TRANSPORT_INTERNAL(0);
}

static void _cffi_check_struct_tdTPM_TRANSPORT_LOG_IN(struct tdTPM_TRANSPORT_LOG_IN *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  { TPM_DIGEST *tmp = &p->parameters; (void)tmp; }
  { TPM_DIGEST *tmp = &p->pubKeyHash; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTPM_TRANSPORT_LOG_IN(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_TRANSPORT_LOG_IN y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_TRANSPORT_LOG_IN),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_TRANSPORT_LOG_IN, tag),
    sizeof(((struct tdTPM_TRANSPORT_LOG_IN *)0)->tag),
    offsetof(struct tdTPM_TRANSPORT_LOG_IN, parameters),
    sizeof(((struct tdTPM_TRANSPORT_LOG_IN *)0)->parameters),
    offsetof(struct tdTPM_TRANSPORT_LOG_IN, pubKeyHash),
    sizeof(((struct tdTPM_TRANSPORT_LOG_IN *)0)->pubKeyHash),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_TRANSPORT_LOG_IN(0);
}

static void _cffi_check_struct_tdTPM_TRANSPORT_LOG_OUT(struct tdTPM_TRANSPORT_LOG_OUT *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  { TPM_CURRENT_TICKS *tmp = &p->currentTicks; (void)tmp; }
  { TPM_DIGEST *tmp = &p->parameters; (void)tmp; }
  (void)((p->locality) << 1);
}
static PyObject *
_cffi_layout_struct_tdTPM_TRANSPORT_LOG_OUT(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_TRANSPORT_LOG_OUT y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_TRANSPORT_LOG_OUT),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_TRANSPORT_LOG_OUT, tag),
    sizeof(((struct tdTPM_TRANSPORT_LOG_OUT *)0)->tag),
    offsetof(struct tdTPM_TRANSPORT_LOG_OUT, currentTicks),
    sizeof(((struct tdTPM_TRANSPORT_LOG_OUT *)0)->currentTicks),
    offsetof(struct tdTPM_TRANSPORT_LOG_OUT, parameters),
    sizeof(((struct tdTPM_TRANSPORT_LOG_OUT *)0)->parameters),
    offsetof(struct tdTPM_TRANSPORT_LOG_OUT, locality),
    sizeof(((struct tdTPM_TRANSPORT_LOG_OUT *)0)->locality),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_TRANSPORT_LOG_OUT(0);
}

static void _cffi_check_struct_tdTPM_TRANSPORT_PUBLIC(struct tdTPM_TRANSPORT_PUBLIC *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tag) << 1);
  (void)((p->transAttributes) << 1);
  (void)((p->algId) << 1);
  (void)((p->encScheme) << 1);
}
static PyObject *
_cffi_layout_struct_tdTPM_TRANSPORT_PUBLIC(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_TRANSPORT_PUBLIC y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_TRANSPORT_PUBLIC),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_TRANSPORT_PUBLIC, tag),
    sizeof(((struct tdTPM_TRANSPORT_PUBLIC *)0)->tag),
    offsetof(struct tdTPM_TRANSPORT_PUBLIC, transAttributes),
    sizeof(((struct tdTPM_TRANSPORT_PUBLIC *)0)->transAttributes),
    offsetof(struct tdTPM_TRANSPORT_PUBLIC, algId),
    sizeof(((struct tdTPM_TRANSPORT_PUBLIC *)0)->algId),
    offsetof(struct tdTPM_TRANSPORT_PUBLIC, encScheme),
    sizeof(((struct tdTPM_TRANSPORT_PUBLIC *)0)->encScheme),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_TRANSPORT_PUBLIC(0);
}

static void _cffi_check_struct_tdTPM_VERSION(struct tdTPM_VERSION *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->major) << 1);
  (void)((p->minor) << 1);
  (void)((p->revMajor) << 1);
  (void)((p->revMinor) << 1);
}
static PyObject *
_cffi_layout_struct_tdTPM_VERSION(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTPM_VERSION y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTPM_VERSION),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTPM_VERSION, major),
    sizeof(((struct tdTPM_VERSION *)0)->major),
    offsetof(struct tdTPM_VERSION, minor),
    sizeof(((struct tdTPM_VERSION *)0)->minor),
    offsetof(struct tdTPM_VERSION, revMajor),
    sizeof(((struct tdTPM_VERSION *)0)->revMajor),
    offsetof(struct tdTPM_VERSION, revMinor),
    sizeof(((struct tdTPM_VERSION *)0)->revMinor),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTPM_VERSION(0);
}

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

static void _cffi_check_struct_tdTSS_CALLBACK(struct tdTSS_CALLBACK *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { void * *tmp = &p->callback; (void)tmp; }
  { void * *tmp = &p->appData; (void)tmp; }
  (void)((p->alg) << 1);
}
static PyObject *
_cffi_layout_struct_tdTSS_CALLBACK(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTSS_CALLBACK y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTSS_CALLBACK),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTSS_CALLBACK, callback),
    sizeof(((struct tdTSS_CALLBACK *)0)->callback),
    offsetof(struct tdTSS_CALLBACK, appData),
    sizeof(((struct tdTSS_CALLBACK *)0)->appData),
    offsetof(struct tdTSS_CALLBACK, alg),
    sizeof(((struct tdTSS_CALLBACK *)0)->alg),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTSS_CALLBACK(0);
}

static void _cffi_check_struct_tdTSS_DAA_AR_KEY_PAIR(struct tdTSS_DAA_AR_KEY_PAIR *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TSS_VERSION *tmp = &p->versionInfo; (void)tmp; }
  { TSS_DAA_AR_SK *tmp = &p->secretKey; (void)tmp; }
  { TSS_DAA_AR_PK *tmp = &p->publicKey; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTSS_DAA_AR_KEY_PAIR(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTSS_DAA_AR_KEY_PAIR y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTSS_DAA_AR_KEY_PAIR),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTSS_DAA_AR_KEY_PAIR, versionInfo),
    sizeof(((struct tdTSS_DAA_AR_KEY_PAIR *)0)->versionInfo),
    offsetof(struct tdTSS_DAA_AR_KEY_PAIR, secretKey),
    sizeof(((struct tdTSS_DAA_AR_KEY_PAIR *)0)->secretKey),
    offsetof(struct tdTSS_DAA_AR_KEY_PAIR, publicKey),
    sizeof(((struct tdTSS_DAA_AR_KEY_PAIR *)0)->publicKey),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTSS_DAA_AR_KEY_PAIR(0);
}

static void _cffi_check_struct_tdTSS_DAA_AR_PK(struct tdTSS_DAA_AR_PK *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TSS_VERSION *tmp = &p->versionInfo; (void)tmp; }
  (void)((p->etaLength) << 1);
  { uint8_t * *tmp = &p->eta; (void)tmp; }
  (void)((p->lambda1Length) << 1);
  { uint8_t * *tmp = &p->lambda1; (void)tmp; }
  (void)((p->lambda2Length) << 1);
  { uint8_t * *tmp = &p->lambda2; (void)tmp; }
  (void)((p->lambda3Length) << 1);
  { uint8_t * *tmp = &p->lambda3; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTSS_DAA_AR_PK(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTSS_DAA_AR_PK y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTSS_DAA_AR_PK),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTSS_DAA_AR_PK, versionInfo),
    sizeof(((struct tdTSS_DAA_AR_PK *)0)->versionInfo),
    offsetof(struct tdTSS_DAA_AR_PK, etaLength),
    sizeof(((struct tdTSS_DAA_AR_PK *)0)->etaLength),
    offsetof(struct tdTSS_DAA_AR_PK, eta),
    sizeof(((struct tdTSS_DAA_AR_PK *)0)->eta),
    offsetof(struct tdTSS_DAA_AR_PK, lambda1Length),
    sizeof(((struct tdTSS_DAA_AR_PK *)0)->lambda1Length),
    offsetof(struct tdTSS_DAA_AR_PK, lambda1),
    sizeof(((struct tdTSS_DAA_AR_PK *)0)->lambda1),
    offsetof(struct tdTSS_DAA_AR_PK, lambda2Length),
    sizeof(((struct tdTSS_DAA_AR_PK *)0)->lambda2Length),
    offsetof(struct tdTSS_DAA_AR_PK, lambda2),
    sizeof(((struct tdTSS_DAA_AR_PK *)0)->lambda2),
    offsetof(struct tdTSS_DAA_AR_PK, lambda3Length),
    sizeof(((struct tdTSS_DAA_AR_PK *)0)->lambda3Length),
    offsetof(struct tdTSS_DAA_AR_PK, lambda3),
    sizeof(((struct tdTSS_DAA_AR_PK *)0)->lambda3),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTSS_DAA_AR_PK(0);
}

static void _cffi_check_struct_tdTSS_DAA_AR_SK(struct tdTSS_DAA_AR_SK *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TSS_VERSION *tmp = &p->versionInfo; (void)tmp; }
  (void)((p->x0Length) << 1);
  { uint8_t * *tmp = &p->x0; (void)tmp; }
  (void)((p->x1Length) << 1);
  { uint8_t * *tmp = &p->x1; (void)tmp; }
  (void)((p->x2Length) << 1);
  { uint8_t * *tmp = &p->x2; (void)tmp; }
  (void)((p->x3Length) << 1);
  { uint8_t * *tmp = &p->x3; (void)tmp; }
  (void)((p->x4Length) << 1);
  { uint8_t * *tmp = &p->x4; (void)tmp; }
  (void)((p->x5Length) << 1);
  { uint8_t * *tmp = &p->x5; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTSS_DAA_AR_SK(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTSS_DAA_AR_SK y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTSS_DAA_AR_SK),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTSS_DAA_AR_SK, versionInfo),
    sizeof(((struct tdTSS_DAA_AR_SK *)0)->versionInfo),
    offsetof(struct tdTSS_DAA_AR_SK, x0Length),
    sizeof(((struct tdTSS_DAA_AR_SK *)0)->x0Length),
    offsetof(struct tdTSS_DAA_AR_SK, x0),
    sizeof(((struct tdTSS_DAA_AR_SK *)0)->x0),
    offsetof(struct tdTSS_DAA_AR_SK, x1Length),
    sizeof(((struct tdTSS_DAA_AR_SK *)0)->x1Length),
    offsetof(struct tdTSS_DAA_AR_SK, x1),
    sizeof(((struct tdTSS_DAA_AR_SK *)0)->x1),
    offsetof(struct tdTSS_DAA_AR_SK, x2Length),
    sizeof(((struct tdTSS_DAA_AR_SK *)0)->x2Length),
    offsetof(struct tdTSS_DAA_AR_SK, x2),
    sizeof(((struct tdTSS_DAA_AR_SK *)0)->x2),
    offsetof(struct tdTSS_DAA_AR_SK, x3Length),
    sizeof(((struct tdTSS_DAA_AR_SK *)0)->x3Length),
    offsetof(struct tdTSS_DAA_AR_SK, x3),
    sizeof(((struct tdTSS_DAA_AR_SK *)0)->x3),
    offsetof(struct tdTSS_DAA_AR_SK, x4Length),
    sizeof(((struct tdTSS_DAA_AR_SK *)0)->x4Length),
    offsetof(struct tdTSS_DAA_AR_SK, x4),
    sizeof(((struct tdTSS_DAA_AR_SK *)0)->x4),
    offsetof(struct tdTSS_DAA_AR_SK, x5Length),
    sizeof(((struct tdTSS_DAA_AR_SK *)0)->x5Length),
    offsetof(struct tdTSS_DAA_AR_SK, x5),
    sizeof(((struct tdTSS_DAA_AR_SK *)0)->x5),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTSS_DAA_AR_SK(0);
}

static void _cffi_check_struct_tdTSS_DAA_ATTRIB_COMMIT(struct tdTSS_DAA_ATTRIB_COMMIT *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TSS_VERSION *tmp = &p->versionInfo; (void)tmp; }
  (void)((p->betaLength) << 1);
  { uint8_t * *tmp = &p->beta; (void)tmp; }
  (void)((p->sMuLength) << 1);
  { uint8_t * *tmp = &p->sMu; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTSS_DAA_ATTRIB_COMMIT(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTSS_DAA_ATTRIB_COMMIT y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTSS_DAA_ATTRIB_COMMIT),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTSS_DAA_ATTRIB_COMMIT, versionInfo),
    sizeof(((struct tdTSS_DAA_ATTRIB_COMMIT *)0)->versionInfo),
    offsetof(struct tdTSS_DAA_ATTRIB_COMMIT, betaLength),
    sizeof(((struct tdTSS_DAA_ATTRIB_COMMIT *)0)->betaLength),
    offsetof(struct tdTSS_DAA_ATTRIB_COMMIT, beta),
    sizeof(((struct tdTSS_DAA_ATTRIB_COMMIT *)0)->beta),
    offsetof(struct tdTSS_DAA_ATTRIB_COMMIT, sMuLength),
    sizeof(((struct tdTSS_DAA_ATTRIB_COMMIT *)0)->sMuLength),
    offsetof(struct tdTSS_DAA_ATTRIB_COMMIT, sMu),
    sizeof(((struct tdTSS_DAA_ATTRIB_COMMIT *)0)->sMu),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTSS_DAA_ATTRIB_COMMIT(0);
}

static void _cffi_check_struct_tdTSS_DAA_CREDENTIAL(struct tdTSS_DAA_CREDENTIAL *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TSS_VERSION *tmp = &p->versionInfo; (void)tmp; }
  (void)((p->capitalALength) << 1);
  { uint8_t * *tmp = &p->capitalA; (void)tmp; }
  (void)((p->exponentLength) << 1);
  { uint8_t * *tmp = &p->exponent; (void)tmp; }
  (void)((p->vBar0Length) << 1);
  { uint8_t * *tmp = &p->vBar0; (void)tmp; }
  (void)((p->vBar1Length) << 1);
  { uint8_t * *tmp = &p->vBar1; (void)tmp; }
  (void)((p->attributesLength) << 1);
  (void)((p->attributesLength2) << 1);
  { uint8_t * * *tmp = &p->attributes; (void)tmp; }
  { TSS_DAA_PK *tmp = &p->issuerPK; (void)tmp; }
  (void)((p->tpmSpecificEncLength) << 1);
  { uint8_t * *tmp = &p->tpmSpecificEnc; (void)tmp; }
  (void)((p->daaCounter) << 1);
}
static PyObject *
_cffi_layout_struct_tdTSS_DAA_CREDENTIAL(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTSS_DAA_CREDENTIAL y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTSS_DAA_CREDENTIAL),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTSS_DAA_CREDENTIAL, versionInfo),
    sizeof(((struct tdTSS_DAA_CREDENTIAL *)0)->versionInfo),
    offsetof(struct tdTSS_DAA_CREDENTIAL, capitalALength),
    sizeof(((struct tdTSS_DAA_CREDENTIAL *)0)->capitalALength),
    offsetof(struct tdTSS_DAA_CREDENTIAL, capitalA),
    sizeof(((struct tdTSS_DAA_CREDENTIAL *)0)->capitalA),
    offsetof(struct tdTSS_DAA_CREDENTIAL, exponentLength),
    sizeof(((struct tdTSS_DAA_CREDENTIAL *)0)->exponentLength),
    offsetof(struct tdTSS_DAA_CREDENTIAL, exponent),
    sizeof(((struct tdTSS_DAA_CREDENTIAL *)0)->exponent),
    offsetof(struct tdTSS_DAA_CREDENTIAL, vBar0Length),
    sizeof(((struct tdTSS_DAA_CREDENTIAL *)0)->vBar0Length),
    offsetof(struct tdTSS_DAA_CREDENTIAL, vBar0),
    sizeof(((struct tdTSS_DAA_CREDENTIAL *)0)->vBar0),
    offsetof(struct tdTSS_DAA_CREDENTIAL, vBar1Length),
    sizeof(((struct tdTSS_DAA_CREDENTIAL *)0)->vBar1Length),
    offsetof(struct tdTSS_DAA_CREDENTIAL, vBar1),
    sizeof(((struct tdTSS_DAA_CREDENTIAL *)0)->vBar1),
    offsetof(struct tdTSS_DAA_CREDENTIAL, attributesLength),
    sizeof(((struct tdTSS_DAA_CREDENTIAL *)0)->attributesLength),
    offsetof(struct tdTSS_DAA_CREDENTIAL, attributesLength2),
    sizeof(((struct tdTSS_DAA_CREDENTIAL *)0)->attributesLength2),
    offsetof(struct tdTSS_DAA_CREDENTIAL, attributes),
    sizeof(((struct tdTSS_DAA_CREDENTIAL *)0)->attributes),
    offsetof(struct tdTSS_DAA_CREDENTIAL, issuerPK),
    sizeof(((struct tdTSS_DAA_CREDENTIAL *)0)->issuerPK),
    offsetof(struct tdTSS_DAA_CREDENTIAL, tpmSpecificEncLength),
    sizeof(((struct tdTSS_DAA_CREDENTIAL *)0)->tpmSpecificEncLength),
    offsetof(struct tdTSS_DAA_CREDENTIAL, tpmSpecificEnc),
    sizeof(((struct tdTSS_DAA_CREDENTIAL *)0)->tpmSpecificEnc),
    offsetof(struct tdTSS_DAA_CREDENTIAL, daaCounter),
    sizeof(((struct tdTSS_DAA_CREDENTIAL *)0)->daaCounter),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTSS_DAA_CREDENTIAL(0);
}

static void _cffi_check_struct_tdTSS_DAA_CREDENTIAL_REQUEST(struct tdTSS_DAA_CREDENTIAL_REQUEST *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TSS_VERSION *tmp = &p->versionInfo; (void)tmp; }
  (void)((p->capitalULength) << 1);
  { uint8_t * *tmp = &p->capitalU; (void)tmp; }
  (void)((p->capitalNiLength) << 1);
  { uint8_t * *tmp = &p->capitalNi; (void)tmp; }
  (void)((p->authenticationProofLength) << 1);
  { uint8_t * *tmp = &p->authenticationProof; (void)tmp; }
  (void)((p->challengeLength) << 1);
  { uint8_t * *tmp = &p->challenge; (void)tmp; }
  (void)((p->nonceTpmLength) << 1);
  { uint8_t * *tmp = &p->nonceTpm; (void)tmp; }
  (void)((p->noncePlatformLength) << 1);
  { uint8_t * *tmp = &p->noncePlatform; (void)tmp; }
  (void)((p->sF0Length) << 1);
  { uint8_t * *tmp = &p->sF0; (void)tmp; }
  (void)((p->sF1Length) << 1);
  { uint8_t * *tmp = &p->sF1; (void)tmp; }
  (void)((p->sVprimeLength) << 1);
  { uint8_t * *tmp = &p->sVprime; (void)tmp; }
  (void)((p->sVtildePrimeLength) << 1);
  { uint8_t * *tmp = &p->sVtildePrime; (void)tmp; }
  (void)((p->sALength) << 1);
  (void)((p->sALength2) << 1);
  { uint8_t * * *tmp = &p->sA; (void)tmp; }
  (void)((p->attributeCommitmentsLength) << 1);
  { TSS_DAA_ATTRIB_COMMIT * *tmp = &p->attributeCommitments; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTSS_DAA_CREDENTIAL_REQUEST(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTSS_DAA_CREDENTIAL_REQUEST y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTSS_DAA_CREDENTIAL_REQUEST),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTSS_DAA_CREDENTIAL_REQUEST, versionInfo),
    sizeof(((struct tdTSS_DAA_CREDENTIAL_REQUEST *)0)->versionInfo),
    offsetof(struct tdTSS_DAA_CREDENTIAL_REQUEST, capitalULength),
    sizeof(((struct tdTSS_DAA_CREDENTIAL_REQUEST *)0)->capitalULength),
    offsetof(struct tdTSS_DAA_CREDENTIAL_REQUEST, capitalU),
    sizeof(((struct tdTSS_DAA_CREDENTIAL_REQUEST *)0)->capitalU),
    offsetof(struct tdTSS_DAA_CREDENTIAL_REQUEST, capitalNiLength),
    sizeof(((struct tdTSS_DAA_CREDENTIAL_REQUEST *)0)->capitalNiLength),
    offsetof(struct tdTSS_DAA_CREDENTIAL_REQUEST, capitalNi),
    sizeof(((struct tdTSS_DAA_CREDENTIAL_REQUEST *)0)->capitalNi),
    offsetof(struct tdTSS_DAA_CREDENTIAL_REQUEST, authenticationProofLength),
    sizeof(((struct tdTSS_DAA_CREDENTIAL_REQUEST *)0)->authenticationProofLength),
    offsetof(struct tdTSS_DAA_CREDENTIAL_REQUEST, authenticationProof),
    sizeof(((struct tdTSS_DAA_CREDENTIAL_REQUEST *)0)->authenticationProof),
    offsetof(struct tdTSS_DAA_CREDENTIAL_REQUEST, challengeLength),
    sizeof(((struct tdTSS_DAA_CREDENTIAL_REQUEST *)0)->challengeLength),
    offsetof(struct tdTSS_DAA_CREDENTIAL_REQUEST, challenge),
    sizeof(((struct tdTSS_DAA_CREDENTIAL_REQUEST *)0)->challenge),
    offsetof(struct tdTSS_DAA_CREDENTIAL_REQUEST, nonceTpmLength),
    sizeof(((struct tdTSS_DAA_CREDENTIAL_REQUEST *)0)->nonceTpmLength),
    offsetof(struct tdTSS_DAA_CREDENTIAL_REQUEST, nonceTpm),
    sizeof(((struct tdTSS_DAA_CREDENTIAL_REQUEST *)0)->nonceTpm),
    offsetof(struct tdTSS_DAA_CREDENTIAL_REQUEST, noncePlatformLength),
    sizeof(((struct tdTSS_DAA_CREDENTIAL_REQUEST *)0)->noncePlatformLength),
    offsetof(struct tdTSS_DAA_CREDENTIAL_REQUEST, noncePlatform),
    sizeof(((struct tdTSS_DAA_CREDENTIAL_REQUEST *)0)->noncePlatform),
    offsetof(struct tdTSS_DAA_CREDENTIAL_REQUEST, sF0Length),
    sizeof(((struct tdTSS_DAA_CREDENTIAL_REQUEST *)0)->sF0Length),
    offsetof(struct tdTSS_DAA_CREDENTIAL_REQUEST, sF0),
    sizeof(((struct tdTSS_DAA_CREDENTIAL_REQUEST *)0)->sF0),
    offsetof(struct tdTSS_DAA_CREDENTIAL_REQUEST, sF1Length),
    sizeof(((struct tdTSS_DAA_CREDENTIAL_REQUEST *)0)->sF1Length),
    offsetof(struct tdTSS_DAA_CREDENTIAL_REQUEST, sF1),
    sizeof(((struct tdTSS_DAA_CREDENTIAL_REQUEST *)0)->sF1),
    offsetof(struct tdTSS_DAA_CREDENTIAL_REQUEST, sVprimeLength),
    sizeof(((struct tdTSS_DAA_CREDENTIAL_REQUEST *)0)->sVprimeLength),
    offsetof(struct tdTSS_DAA_CREDENTIAL_REQUEST, sVprime),
    sizeof(((struct tdTSS_DAA_CREDENTIAL_REQUEST *)0)->sVprime),
    offsetof(struct tdTSS_DAA_CREDENTIAL_REQUEST, sVtildePrimeLength),
    sizeof(((struct tdTSS_DAA_CREDENTIAL_REQUEST *)0)->sVtildePrimeLength),
    offsetof(struct tdTSS_DAA_CREDENTIAL_REQUEST, sVtildePrime),
    sizeof(((struct tdTSS_DAA_CREDENTIAL_REQUEST *)0)->sVtildePrime),
    offsetof(struct tdTSS_DAA_CREDENTIAL_REQUEST, sALength),
    sizeof(((struct tdTSS_DAA_CREDENTIAL_REQUEST *)0)->sALength),
    offsetof(struct tdTSS_DAA_CREDENTIAL_REQUEST, sALength2),
    sizeof(((struct tdTSS_DAA_CREDENTIAL_REQUEST *)0)->sALength2),
    offsetof(struct tdTSS_DAA_CREDENTIAL_REQUEST, sA),
    sizeof(((struct tdTSS_DAA_CREDENTIAL_REQUEST *)0)->sA),
    offsetof(struct tdTSS_DAA_CREDENTIAL_REQUEST, attributeCommitmentsLength),
    sizeof(((struct tdTSS_DAA_CREDENTIAL_REQUEST *)0)->attributeCommitmentsLength),
    offsetof(struct tdTSS_DAA_CREDENTIAL_REQUEST, attributeCommitments),
    sizeof(((struct tdTSS_DAA_CREDENTIAL_REQUEST *)0)->attributeCommitments),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTSS_DAA_CREDENTIAL_REQUEST(0);
}

static void _cffi_check_struct_tdTSS_DAA_CRED_ISSUER(struct tdTSS_DAA_CRED_ISSUER *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TSS_VERSION *tmp = &p->versionInfo; (void)tmp; }
  (void)((p->capitalALength) << 1);
  { uint8_t * *tmp = &p->capitalA; (void)tmp; }
  (void)((p->eLength) << 1);
  { uint8_t * *tmp = &p->e; (void)tmp; }
  (void)((p->vPrimePrimeLength) << 1);
  { uint8_t * *tmp = &p->vPrimePrime; (void)tmp; }
  (void)((p->attributesIssuerLength) << 1);
  (void)((p->attributesIssuerLength2) << 1);
  { uint8_t * * *tmp = &p->attributesIssuer; (void)tmp; }
  (void)((p->cPrimeLength) << 1);
  { uint8_t * *tmp = &p->cPrime; (void)tmp; }
  (void)((p->sELength) << 1);
  { uint8_t * *tmp = &p->sE; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTSS_DAA_CRED_ISSUER(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTSS_DAA_CRED_ISSUER y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTSS_DAA_CRED_ISSUER),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTSS_DAA_CRED_ISSUER, versionInfo),
    sizeof(((struct tdTSS_DAA_CRED_ISSUER *)0)->versionInfo),
    offsetof(struct tdTSS_DAA_CRED_ISSUER, capitalALength),
    sizeof(((struct tdTSS_DAA_CRED_ISSUER *)0)->capitalALength),
    offsetof(struct tdTSS_DAA_CRED_ISSUER, capitalA),
    sizeof(((struct tdTSS_DAA_CRED_ISSUER *)0)->capitalA),
    offsetof(struct tdTSS_DAA_CRED_ISSUER, eLength),
    sizeof(((struct tdTSS_DAA_CRED_ISSUER *)0)->eLength),
    offsetof(struct tdTSS_DAA_CRED_ISSUER, e),
    sizeof(((struct tdTSS_DAA_CRED_ISSUER *)0)->e),
    offsetof(struct tdTSS_DAA_CRED_ISSUER, vPrimePrimeLength),
    sizeof(((struct tdTSS_DAA_CRED_ISSUER *)0)->vPrimePrimeLength),
    offsetof(struct tdTSS_DAA_CRED_ISSUER, vPrimePrime),
    sizeof(((struct tdTSS_DAA_CRED_ISSUER *)0)->vPrimePrime),
    offsetof(struct tdTSS_DAA_CRED_ISSUER, attributesIssuerLength),
    sizeof(((struct tdTSS_DAA_CRED_ISSUER *)0)->attributesIssuerLength),
    offsetof(struct tdTSS_DAA_CRED_ISSUER, attributesIssuerLength2),
    sizeof(((struct tdTSS_DAA_CRED_ISSUER *)0)->attributesIssuerLength2),
    offsetof(struct tdTSS_DAA_CRED_ISSUER, attributesIssuer),
    sizeof(((struct tdTSS_DAA_CRED_ISSUER *)0)->attributesIssuer),
    offsetof(struct tdTSS_DAA_CRED_ISSUER, cPrimeLength),
    sizeof(((struct tdTSS_DAA_CRED_ISSUER *)0)->cPrimeLength),
    offsetof(struct tdTSS_DAA_CRED_ISSUER, cPrime),
    sizeof(((struct tdTSS_DAA_CRED_ISSUER *)0)->cPrime),
    offsetof(struct tdTSS_DAA_CRED_ISSUER, sELength),
    sizeof(((struct tdTSS_DAA_CRED_ISSUER *)0)->sELength),
    offsetof(struct tdTSS_DAA_CRED_ISSUER, sE),
    sizeof(((struct tdTSS_DAA_CRED_ISSUER *)0)->sE),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTSS_DAA_CRED_ISSUER(0);
}

static void _cffi_check_struct_tdTSS_DAA_IDENTITY_PROOF(struct tdTSS_DAA_IDENTITY_PROOF *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TSS_VERSION *tmp = &p->versionInfo; (void)tmp; }
  (void)((p->endorsementLength) << 1);
  { uint8_t * *tmp = &p->endorsementCredential; (void)tmp; }
  (void)((p->platformLength) << 1);
  { uint8_t * *tmp = &p->platform; (void)tmp; }
  (void)((p->conformanceLength) << 1);
  { uint8_t * *tmp = &p->conformance; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTSS_DAA_IDENTITY_PROOF(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTSS_DAA_IDENTITY_PROOF y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTSS_DAA_IDENTITY_PROOF),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTSS_DAA_IDENTITY_PROOF, versionInfo),
    sizeof(((struct tdTSS_DAA_IDENTITY_PROOF *)0)->versionInfo),
    offsetof(struct tdTSS_DAA_IDENTITY_PROOF, endorsementLength),
    sizeof(((struct tdTSS_DAA_IDENTITY_PROOF *)0)->endorsementLength),
    offsetof(struct tdTSS_DAA_IDENTITY_PROOF, endorsementCredential),
    sizeof(((struct tdTSS_DAA_IDENTITY_PROOF *)0)->endorsementCredential),
    offsetof(struct tdTSS_DAA_IDENTITY_PROOF, platformLength),
    sizeof(((struct tdTSS_DAA_IDENTITY_PROOF *)0)->platformLength),
    offsetof(struct tdTSS_DAA_IDENTITY_PROOF, platform),
    sizeof(((struct tdTSS_DAA_IDENTITY_PROOF *)0)->platform),
    offsetof(struct tdTSS_DAA_IDENTITY_PROOF, conformanceLength),
    sizeof(((struct tdTSS_DAA_IDENTITY_PROOF *)0)->conformanceLength),
    offsetof(struct tdTSS_DAA_IDENTITY_PROOF, conformance),
    sizeof(((struct tdTSS_DAA_IDENTITY_PROOF *)0)->conformance),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTSS_DAA_IDENTITY_PROOF(0);
}

static void _cffi_check_struct_tdTSS_DAA_KEY_PAIR(struct tdTSS_DAA_KEY_PAIR *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TSS_VERSION *tmp = &p->versionInfo; (void)tmp; }
  { TSS_DAA_SK *tmp = &p->secretKey; (void)tmp; }
  { TSS_DAA_PK *tmp = &p->publicKey; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTSS_DAA_KEY_PAIR(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTSS_DAA_KEY_PAIR y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTSS_DAA_KEY_PAIR),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTSS_DAA_KEY_PAIR, versionInfo),
    sizeof(((struct tdTSS_DAA_KEY_PAIR *)0)->versionInfo),
    offsetof(struct tdTSS_DAA_KEY_PAIR, secretKey),
    sizeof(((struct tdTSS_DAA_KEY_PAIR *)0)->secretKey),
    offsetof(struct tdTSS_DAA_KEY_PAIR, publicKey),
    sizeof(((struct tdTSS_DAA_KEY_PAIR *)0)->publicKey),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTSS_DAA_KEY_PAIR(0);
}

static void _cffi_check_struct_tdTSS_DAA_PK(struct tdTSS_DAA_PK *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TSS_VERSION *tmp = &p->versionInfo; (void)tmp; }
  (void)((p->modulusLength) << 1);
  { uint8_t * *tmp = &p->modulus; (void)tmp; }
  (void)((p->capitalSLength) << 1);
  { uint8_t * *tmp = &p->capitalS; (void)tmp; }
  (void)((p->capitalZLength) << 1);
  { uint8_t * *tmp = &p->capitalZ; (void)tmp; }
  (void)((p->capitalR0Length) << 1);
  { uint8_t * *tmp = &p->capitalR0; (void)tmp; }
  (void)((p->capitalR1Length) << 1);
  { uint8_t * *tmp = &p->capitalR1; (void)tmp; }
  (void)((p->gammaLength) << 1);
  { uint8_t * *tmp = &p->gamma; (void)tmp; }
  (void)((p->capitalGammaLength) << 1);
  { uint8_t * *tmp = &p->capitalGamma; (void)tmp; }
  (void)((p->rhoLength) << 1);
  { uint8_t * *tmp = &p->rho; (void)tmp; }
  (void)((p->capitalYLength) << 1);
  (void)((p->capitalYLength2) << 1);
  { uint8_t * * *tmp = &p->capitalY; (void)tmp; }
  (void)((p->capitalYPlatformLength) << 1);
  (void)((p->issuerBaseNameLength) << 1);
  { uint8_t * *tmp = &p->issuerBaseName; (void)tmp; }
  (void)((p->numPlatformAttributes) << 1);
  (void)((p->numIssuerAttributes) << 1);
}
static PyObject *
_cffi_layout_struct_tdTSS_DAA_PK(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTSS_DAA_PK y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTSS_DAA_PK),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTSS_DAA_PK, versionInfo),
    sizeof(((struct tdTSS_DAA_PK *)0)->versionInfo),
    offsetof(struct tdTSS_DAA_PK, modulusLength),
    sizeof(((struct tdTSS_DAA_PK *)0)->modulusLength),
    offsetof(struct tdTSS_DAA_PK, modulus),
    sizeof(((struct tdTSS_DAA_PK *)0)->modulus),
    offsetof(struct tdTSS_DAA_PK, capitalSLength),
    sizeof(((struct tdTSS_DAA_PK *)0)->capitalSLength),
    offsetof(struct tdTSS_DAA_PK, capitalS),
    sizeof(((struct tdTSS_DAA_PK *)0)->capitalS),
    offsetof(struct tdTSS_DAA_PK, capitalZLength),
    sizeof(((struct tdTSS_DAA_PK *)0)->capitalZLength),
    offsetof(struct tdTSS_DAA_PK, capitalZ),
    sizeof(((struct tdTSS_DAA_PK *)0)->capitalZ),
    offsetof(struct tdTSS_DAA_PK, capitalR0Length),
    sizeof(((struct tdTSS_DAA_PK *)0)->capitalR0Length),
    offsetof(struct tdTSS_DAA_PK, capitalR0),
    sizeof(((struct tdTSS_DAA_PK *)0)->capitalR0),
    offsetof(struct tdTSS_DAA_PK, capitalR1Length),
    sizeof(((struct tdTSS_DAA_PK *)0)->capitalR1Length),
    offsetof(struct tdTSS_DAA_PK, capitalR1),
    sizeof(((struct tdTSS_DAA_PK *)0)->capitalR1),
    offsetof(struct tdTSS_DAA_PK, gammaLength),
    sizeof(((struct tdTSS_DAA_PK *)0)->gammaLength),
    offsetof(struct tdTSS_DAA_PK, gamma),
    sizeof(((struct tdTSS_DAA_PK *)0)->gamma),
    offsetof(struct tdTSS_DAA_PK, capitalGammaLength),
    sizeof(((struct tdTSS_DAA_PK *)0)->capitalGammaLength),
    offsetof(struct tdTSS_DAA_PK, capitalGamma),
    sizeof(((struct tdTSS_DAA_PK *)0)->capitalGamma),
    offsetof(struct tdTSS_DAA_PK, rhoLength),
    sizeof(((struct tdTSS_DAA_PK *)0)->rhoLength),
    offsetof(struct tdTSS_DAA_PK, rho),
    sizeof(((struct tdTSS_DAA_PK *)0)->rho),
    offsetof(struct tdTSS_DAA_PK, capitalYLength),
    sizeof(((struct tdTSS_DAA_PK *)0)->capitalYLength),
    offsetof(struct tdTSS_DAA_PK, capitalYLength2),
    sizeof(((struct tdTSS_DAA_PK *)0)->capitalYLength2),
    offsetof(struct tdTSS_DAA_PK, capitalY),
    sizeof(((struct tdTSS_DAA_PK *)0)->capitalY),
    offsetof(struct tdTSS_DAA_PK, capitalYPlatformLength),
    sizeof(((struct tdTSS_DAA_PK *)0)->capitalYPlatformLength),
    offsetof(struct tdTSS_DAA_PK, issuerBaseNameLength),
    sizeof(((struct tdTSS_DAA_PK *)0)->issuerBaseNameLength),
    offsetof(struct tdTSS_DAA_PK, issuerBaseName),
    sizeof(((struct tdTSS_DAA_PK *)0)->issuerBaseName),
    offsetof(struct tdTSS_DAA_PK, numPlatformAttributes),
    sizeof(((struct tdTSS_DAA_PK *)0)->numPlatformAttributes),
    offsetof(struct tdTSS_DAA_PK, numIssuerAttributes),
    sizeof(((struct tdTSS_DAA_PK *)0)->numIssuerAttributes),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTSS_DAA_PK(0);
}

static void _cffi_check_struct_tdTSS_DAA_PK_PROOF(struct tdTSS_DAA_PK_PROOF *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TSS_VERSION *tmp = &p->versionInfo; (void)tmp; }
  (void)((p->challengeLength) << 1);
  { uint8_t * *tmp = &p->challenge; (void)tmp; }
  (void)((p->responseLength) << 1);
  (void)((p->responseLength2) << 1);
  { uint8_t * * *tmp = &p->response; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTSS_DAA_PK_PROOF(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTSS_DAA_PK_PROOF y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTSS_DAA_PK_PROOF),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTSS_DAA_PK_PROOF, versionInfo),
    sizeof(((struct tdTSS_DAA_PK_PROOF *)0)->versionInfo),
    offsetof(struct tdTSS_DAA_PK_PROOF, challengeLength),
    sizeof(((struct tdTSS_DAA_PK_PROOF *)0)->challengeLength),
    offsetof(struct tdTSS_DAA_PK_PROOF, challenge),
    sizeof(((struct tdTSS_DAA_PK_PROOF *)0)->challenge),
    offsetof(struct tdTSS_DAA_PK_PROOF, responseLength),
    sizeof(((struct tdTSS_DAA_PK_PROOF *)0)->responseLength),
    offsetof(struct tdTSS_DAA_PK_PROOF, responseLength2),
    sizeof(((struct tdTSS_DAA_PK_PROOF *)0)->responseLength2),
    offsetof(struct tdTSS_DAA_PK_PROOF, response),
    sizeof(((struct tdTSS_DAA_PK_PROOF *)0)->response),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTSS_DAA_PK_PROOF(0);
}

static void _cffi_check_struct_tdTSS_DAA_PSEUDONYM(struct tdTSS_DAA_PSEUDONYM *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TSS_VERSION *tmp = &p->versionInfo; (void)tmp; }
  (void)((p->payloadFlag) << 1);
  (void)((p->payloadLength) << 1);
  { uint8_t * *tmp = &p->payload; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTSS_DAA_PSEUDONYM(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTSS_DAA_PSEUDONYM y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTSS_DAA_PSEUDONYM),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTSS_DAA_PSEUDONYM, versionInfo),
    sizeof(((struct tdTSS_DAA_PSEUDONYM *)0)->versionInfo),
    offsetof(struct tdTSS_DAA_PSEUDONYM, payloadFlag),
    sizeof(((struct tdTSS_DAA_PSEUDONYM *)0)->payloadFlag),
    offsetof(struct tdTSS_DAA_PSEUDONYM, payloadLength),
    sizeof(((struct tdTSS_DAA_PSEUDONYM *)0)->payloadLength),
    offsetof(struct tdTSS_DAA_PSEUDONYM, payload),
    sizeof(((struct tdTSS_DAA_PSEUDONYM *)0)->payload),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTSS_DAA_PSEUDONYM(0);
}

static void _cffi_check_struct_tdTSS_DAA_PSEUDONYM_ENCRYPTED(struct tdTSS_DAA_PSEUDONYM_ENCRYPTED *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TSS_VERSION *tmp = &p->versionInfo; (void)tmp; }
  (void)((p->delta1Length) << 1);
  { uint8_t * *tmp = &p->delta1; (void)tmp; }
  (void)((p->delta2Length) << 1);
  { uint8_t * *tmp = &p->delta2; (void)tmp; }
  (void)((p->delta3Length) << 1);
  { uint8_t * *tmp = &p->delta3; (void)tmp; }
  (void)((p->delta4Length) << 1);
  { uint8_t * *tmp = &p->delta4; (void)tmp; }
  (void)((p->sTauLength) << 1);
  { uint8_t * *tmp = &p->sTau; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTSS_DAA_PSEUDONYM_ENCRYPTED(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTSS_DAA_PSEUDONYM_ENCRYPTED y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTSS_DAA_PSEUDONYM_ENCRYPTED),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTSS_DAA_PSEUDONYM_ENCRYPTED, versionInfo),
    sizeof(((struct tdTSS_DAA_PSEUDONYM_ENCRYPTED *)0)->versionInfo),
    offsetof(struct tdTSS_DAA_PSEUDONYM_ENCRYPTED, delta1Length),
    sizeof(((struct tdTSS_DAA_PSEUDONYM_ENCRYPTED *)0)->delta1Length),
    offsetof(struct tdTSS_DAA_PSEUDONYM_ENCRYPTED, delta1),
    sizeof(((struct tdTSS_DAA_PSEUDONYM_ENCRYPTED *)0)->delta1),
    offsetof(struct tdTSS_DAA_PSEUDONYM_ENCRYPTED, delta2Length),
    sizeof(((struct tdTSS_DAA_PSEUDONYM_ENCRYPTED *)0)->delta2Length),
    offsetof(struct tdTSS_DAA_PSEUDONYM_ENCRYPTED, delta2),
    sizeof(((struct tdTSS_DAA_PSEUDONYM_ENCRYPTED *)0)->delta2),
    offsetof(struct tdTSS_DAA_PSEUDONYM_ENCRYPTED, delta3Length),
    sizeof(((struct tdTSS_DAA_PSEUDONYM_ENCRYPTED *)0)->delta3Length),
    offsetof(struct tdTSS_DAA_PSEUDONYM_ENCRYPTED, delta3),
    sizeof(((struct tdTSS_DAA_PSEUDONYM_ENCRYPTED *)0)->delta3),
    offsetof(struct tdTSS_DAA_PSEUDONYM_ENCRYPTED, delta4Length),
    sizeof(((struct tdTSS_DAA_PSEUDONYM_ENCRYPTED *)0)->delta4Length),
    offsetof(struct tdTSS_DAA_PSEUDONYM_ENCRYPTED, delta4),
    sizeof(((struct tdTSS_DAA_PSEUDONYM_ENCRYPTED *)0)->delta4),
    offsetof(struct tdTSS_DAA_PSEUDONYM_ENCRYPTED, sTauLength),
    sizeof(((struct tdTSS_DAA_PSEUDONYM_ENCRYPTED *)0)->sTauLength),
    offsetof(struct tdTSS_DAA_PSEUDONYM_ENCRYPTED, sTau),
    sizeof(((struct tdTSS_DAA_PSEUDONYM_ENCRYPTED *)0)->sTau),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTSS_DAA_PSEUDONYM_ENCRYPTED(0);
}

static void _cffi_check_struct_tdTSS_DAA_PSEUDONYM_PLAIN(struct tdTSS_DAA_PSEUDONYM_PLAIN *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TSS_VERSION *tmp = &p->versionInfo; (void)tmp; }
  (void)((p->capitalNvLength) << 1);
  { uint8_t * *tmp = &p->capitalNv; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTSS_DAA_PSEUDONYM_PLAIN(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTSS_DAA_PSEUDONYM_PLAIN y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTSS_DAA_PSEUDONYM_PLAIN),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTSS_DAA_PSEUDONYM_PLAIN, versionInfo),
    sizeof(((struct tdTSS_DAA_PSEUDONYM_PLAIN *)0)->versionInfo),
    offsetof(struct tdTSS_DAA_PSEUDONYM_PLAIN, capitalNvLength),
    sizeof(((struct tdTSS_DAA_PSEUDONYM_PLAIN *)0)->capitalNvLength),
    offsetof(struct tdTSS_DAA_PSEUDONYM_PLAIN, capitalNv),
    sizeof(((struct tdTSS_DAA_PSEUDONYM_PLAIN *)0)->capitalNv),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTSS_DAA_PSEUDONYM_PLAIN(0);
}

static void _cffi_check_struct_tdTSS_DAA_SELECTED_ATTRIB(struct tdTSS_DAA_SELECTED_ATTRIB *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TSS_VERSION *tmp = &p->versionInfo; (void)tmp; }
  (void)((p->indicesListLength) << 1);
  { int8_t * *tmp = &p->indicesList; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTSS_DAA_SELECTED_ATTRIB(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTSS_DAA_SELECTED_ATTRIB y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTSS_DAA_SELECTED_ATTRIB),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTSS_DAA_SELECTED_ATTRIB, versionInfo),
    sizeof(((struct tdTSS_DAA_SELECTED_ATTRIB *)0)->versionInfo),
    offsetof(struct tdTSS_DAA_SELECTED_ATTRIB, indicesListLength),
    sizeof(((struct tdTSS_DAA_SELECTED_ATTRIB *)0)->indicesListLength),
    offsetof(struct tdTSS_DAA_SELECTED_ATTRIB, indicesList),
    sizeof(((struct tdTSS_DAA_SELECTED_ATTRIB *)0)->indicesList),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTSS_DAA_SELECTED_ATTRIB(0);
}

static void _cffi_check_struct_tdTSS_DAA_SIGNATURE(struct tdTSS_DAA_SIGNATURE *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TSS_VERSION *tmp = &p->versionInfo; (void)tmp; }
  (void)((p->zetaLength) << 1);
  { uint8_t * *tmp = &p->zeta; (void)tmp; }
  (void)((p->capitalTLength) << 1);
  { uint8_t * *tmp = &p->capitalT; (void)tmp; }
  (void)((p->challengeLength) << 1);
  { uint8_t * *tmp = &p->challenge; (void)tmp; }
  (void)((p->nonceTpmLength) << 1);
  { uint8_t * *tmp = &p->nonceTpm; (void)tmp; }
  (void)((p->sVLength) << 1);
  { uint8_t * *tmp = &p->sV; (void)tmp; }
  (void)((p->sF0Length) << 1);
  { uint8_t * *tmp = &p->sF0; (void)tmp; }
  (void)((p->sF1Length) << 1);
  { uint8_t * *tmp = &p->sF1; (void)tmp; }
  (void)((p->sELength) << 1);
  { uint8_t * *tmp = &p->sE; (void)tmp; }
  (void)((p->sALength) << 1);
  (void)((p->sALength2) << 1);
  { uint8_t * * *tmp = &p->sA; (void)tmp; }
  (void)((p->attributeCommitmentsLength) << 1);
  { TSS_DAA_ATTRIB_COMMIT * *tmp = &p->attributeCommitments; (void)tmp; }
  { TSS_DAA_PSEUDONYM *tmp = &p->signedPseudonym; (void)tmp; }
  { TSS_DAA_SIGN_CALLBACK *tmp = &p->callbackResult; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTSS_DAA_SIGNATURE(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTSS_DAA_SIGNATURE y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTSS_DAA_SIGNATURE),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTSS_DAA_SIGNATURE, versionInfo),
    sizeof(((struct tdTSS_DAA_SIGNATURE *)0)->versionInfo),
    offsetof(struct tdTSS_DAA_SIGNATURE, zetaLength),
    sizeof(((struct tdTSS_DAA_SIGNATURE *)0)->zetaLength),
    offsetof(struct tdTSS_DAA_SIGNATURE, zeta),
    sizeof(((struct tdTSS_DAA_SIGNATURE *)0)->zeta),
    offsetof(struct tdTSS_DAA_SIGNATURE, capitalTLength),
    sizeof(((struct tdTSS_DAA_SIGNATURE *)0)->capitalTLength),
    offsetof(struct tdTSS_DAA_SIGNATURE, capitalT),
    sizeof(((struct tdTSS_DAA_SIGNATURE *)0)->capitalT),
    offsetof(struct tdTSS_DAA_SIGNATURE, challengeLength),
    sizeof(((struct tdTSS_DAA_SIGNATURE *)0)->challengeLength),
    offsetof(struct tdTSS_DAA_SIGNATURE, challenge),
    sizeof(((struct tdTSS_DAA_SIGNATURE *)0)->challenge),
    offsetof(struct tdTSS_DAA_SIGNATURE, nonceTpmLength),
    sizeof(((struct tdTSS_DAA_SIGNATURE *)0)->nonceTpmLength),
    offsetof(struct tdTSS_DAA_SIGNATURE, nonceTpm),
    sizeof(((struct tdTSS_DAA_SIGNATURE *)0)->nonceTpm),
    offsetof(struct tdTSS_DAA_SIGNATURE, sVLength),
    sizeof(((struct tdTSS_DAA_SIGNATURE *)0)->sVLength),
    offsetof(struct tdTSS_DAA_SIGNATURE, sV),
    sizeof(((struct tdTSS_DAA_SIGNATURE *)0)->sV),
    offsetof(struct tdTSS_DAA_SIGNATURE, sF0Length),
    sizeof(((struct tdTSS_DAA_SIGNATURE *)0)->sF0Length),
    offsetof(struct tdTSS_DAA_SIGNATURE, sF0),
    sizeof(((struct tdTSS_DAA_SIGNATURE *)0)->sF0),
    offsetof(struct tdTSS_DAA_SIGNATURE, sF1Length),
    sizeof(((struct tdTSS_DAA_SIGNATURE *)0)->sF1Length),
    offsetof(struct tdTSS_DAA_SIGNATURE, sF1),
    sizeof(((struct tdTSS_DAA_SIGNATURE *)0)->sF1),
    offsetof(struct tdTSS_DAA_SIGNATURE, sELength),
    sizeof(((struct tdTSS_DAA_SIGNATURE *)0)->sELength),
    offsetof(struct tdTSS_DAA_SIGNATURE, sE),
    sizeof(((struct tdTSS_DAA_SIGNATURE *)0)->sE),
    offsetof(struct tdTSS_DAA_SIGNATURE, sALength),
    sizeof(((struct tdTSS_DAA_SIGNATURE *)0)->sALength),
    offsetof(struct tdTSS_DAA_SIGNATURE, sALength2),
    sizeof(((struct tdTSS_DAA_SIGNATURE *)0)->sALength2),
    offsetof(struct tdTSS_DAA_SIGNATURE, sA),
    sizeof(((struct tdTSS_DAA_SIGNATURE *)0)->sA),
    offsetof(struct tdTSS_DAA_SIGNATURE, attributeCommitmentsLength),
    sizeof(((struct tdTSS_DAA_SIGNATURE *)0)->attributeCommitmentsLength),
    offsetof(struct tdTSS_DAA_SIGNATURE, attributeCommitments),
    sizeof(((struct tdTSS_DAA_SIGNATURE *)0)->attributeCommitments),
    offsetof(struct tdTSS_DAA_SIGNATURE, signedPseudonym),
    sizeof(((struct tdTSS_DAA_SIGNATURE *)0)->signedPseudonym),
    offsetof(struct tdTSS_DAA_SIGNATURE, callbackResult),
    sizeof(((struct tdTSS_DAA_SIGNATURE *)0)->callbackResult),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTSS_DAA_SIGNATURE(0);
}

static void _cffi_check_struct_tdTSS_DAA_SIGN_CALLBACK(struct tdTSS_DAA_SIGN_CALLBACK *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TSS_VERSION *tmp = &p->versionInfo; (void)tmp; }
  (void)((p->challenge) << 1);
  (void)((p->payloadFlag) << 1);
  (void)((p->payloadLength) << 1);
  { uint8_t * *tmp = &p->payload; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTSS_DAA_SIGN_CALLBACK(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTSS_DAA_SIGN_CALLBACK y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTSS_DAA_SIGN_CALLBACK),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTSS_DAA_SIGN_CALLBACK, versionInfo),
    sizeof(((struct tdTSS_DAA_SIGN_CALLBACK *)0)->versionInfo),
    offsetof(struct tdTSS_DAA_SIGN_CALLBACK, challenge),
    sizeof(((struct tdTSS_DAA_SIGN_CALLBACK *)0)->challenge),
    offsetof(struct tdTSS_DAA_SIGN_CALLBACK, payloadFlag),
    sizeof(((struct tdTSS_DAA_SIGN_CALLBACK *)0)->payloadFlag),
    offsetof(struct tdTSS_DAA_SIGN_CALLBACK, payloadLength),
    sizeof(((struct tdTSS_DAA_SIGN_CALLBACK *)0)->payloadLength),
    offsetof(struct tdTSS_DAA_SIGN_CALLBACK, payload),
    sizeof(((struct tdTSS_DAA_SIGN_CALLBACK *)0)->payload),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTSS_DAA_SIGN_CALLBACK(0);
}

static void _cffi_check_struct_tdTSS_DAA_SK(struct tdTSS_DAA_SK *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TSS_VERSION *tmp = &p->versionInfo; (void)tmp; }
  (void)((p->productPQprimeLength) << 1);
  { uint8_t * *tmp = &p->productPQprime; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTSS_DAA_SK(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTSS_DAA_SK y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTSS_DAA_SK),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTSS_DAA_SK, versionInfo),
    sizeof(((struct tdTSS_DAA_SK *)0)->versionInfo),
    offsetof(struct tdTSS_DAA_SK, productPQprimeLength),
    sizeof(((struct tdTSS_DAA_SK *)0)->productPQprimeLength),
    offsetof(struct tdTSS_DAA_SK, productPQprime),
    sizeof(((struct tdTSS_DAA_SK *)0)->productPQprime),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTSS_DAA_SK(0);
}

static void _cffi_check_struct_tdTSS_DELEGATION_TABLE_ENTRY(struct tdTSS_DELEGATION_TABLE_ENTRY *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->tableIndex) << 1);
  (void)((p->label) << 1);
  { TSS_PCR_INFO_SHORT *tmp = &p->pcrInfo; (void)tmp; }
  (void)((p->per1) << 1);
  (void)((p->per2) << 1);
  (void)((p->familyID) << 1);
  (void)((p->verificationCount) << 1);
}
static PyObject *
_cffi_layout_struct_tdTSS_DELEGATION_TABLE_ENTRY(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTSS_DELEGATION_TABLE_ENTRY y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTSS_DELEGATION_TABLE_ENTRY),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTSS_DELEGATION_TABLE_ENTRY, tableIndex),
    sizeof(((struct tdTSS_DELEGATION_TABLE_ENTRY *)0)->tableIndex),
    offsetof(struct tdTSS_DELEGATION_TABLE_ENTRY, label),
    sizeof(((struct tdTSS_DELEGATION_TABLE_ENTRY *)0)->label),
    offsetof(struct tdTSS_DELEGATION_TABLE_ENTRY, pcrInfo),
    sizeof(((struct tdTSS_DELEGATION_TABLE_ENTRY *)0)->pcrInfo),
    offsetof(struct tdTSS_DELEGATION_TABLE_ENTRY, per1),
    sizeof(((struct tdTSS_DELEGATION_TABLE_ENTRY *)0)->per1),
    offsetof(struct tdTSS_DELEGATION_TABLE_ENTRY, per2),
    sizeof(((struct tdTSS_DELEGATION_TABLE_ENTRY *)0)->per2),
    offsetof(struct tdTSS_DELEGATION_TABLE_ENTRY, familyID),
    sizeof(((struct tdTSS_DELEGATION_TABLE_ENTRY *)0)->familyID),
    offsetof(struct tdTSS_DELEGATION_TABLE_ENTRY, verificationCount),
    sizeof(((struct tdTSS_DELEGATION_TABLE_ENTRY *)0)->verificationCount),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTSS_DELEGATION_TABLE_ENTRY(0);
}

static void _cffi_check_struct_tdTSS_EVENT_CERT(struct tdTSS_EVENT_CERT *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TSS_VERSION *tmp = &p->versionInfo; (void)tmp; }
  (void)((p->ulCertificateHashLength) << 1);
  { uint8_t * *tmp = &p->rgbCertificateHash; (void)tmp; }
  (void)((p->ulEntityDigestLength) << 1);
  { uint8_t * *tmp = &p->rgbentityDigest; (void)tmp; }
  (void)((p->fDigestChecked) << 1);
  (void)((p->fDigestVerified) << 1);
  (void)((p->ulIssuerLength) << 1);
  { uint8_t * *tmp = &p->rgbIssuer; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTSS_EVENT_CERT(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTSS_EVENT_CERT y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTSS_EVENT_CERT),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTSS_EVENT_CERT, versionInfo),
    sizeof(((struct tdTSS_EVENT_CERT *)0)->versionInfo),
    offsetof(struct tdTSS_EVENT_CERT, ulCertificateHashLength),
    sizeof(((struct tdTSS_EVENT_CERT *)0)->ulCertificateHashLength),
    offsetof(struct tdTSS_EVENT_CERT, rgbCertificateHash),
    sizeof(((struct tdTSS_EVENT_CERT *)0)->rgbCertificateHash),
    offsetof(struct tdTSS_EVENT_CERT, ulEntityDigestLength),
    sizeof(((struct tdTSS_EVENT_CERT *)0)->ulEntityDigestLength),
    offsetof(struct tdTSS_EVENT_CERT, rgbentityDigest),
    sizeof(((struct tdTSS_EVENT_CERT *)0)->rgbentityDigest),
    offsetof(struct tdTSS_EVENT_CERT, fDigestChecked),
    sizeof(((struct tdTSS_EVENT_CERT *)0)->fDigestChecked),
    offsetof(struct tdTSS_EVENT_CERT, fDigestVerified),
    sizeof(((struct tdTSS_EVENT_CERT *)0)->fDigestVerified),
    offsetof(struct tdTSS_EVENT_CERT, ulIssuerLength),
    sizeof(((struct tdTSS_EVENT_CERT *)0)->ulIssuerLength),
    offsetof(struct tdTSS_EVENT_CERT, rgbIssuer),
    sizeof(((struct tdTSS_EVENT_CERT *)0)->rgbIssuer),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTSS_EVENT_CERT(0);
}

static void _cffi_check_struct_tdTSS_FAMILY_TABLE_ENTRY(struct tdTSS_FAMILY_TABLE_ENTRY *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->familyID) << 1);
  (void)((p->label) << 1);
  (void)((p->verificationCount) << 1);
  (void)((p->enabled) << 1);
  (void)((p->locked) << 1);
}
static PyObject *
_cffi_layout_struct_tdTSS_FAMILY_TABLE_ENTRY(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTSS_FAMILY_TABLE_ENTRY y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTSS_FAMILY_TABLE_ENTRY),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTSS_FAMILY_TABLE_ENTRY, familyID),
    sizeof(((struct tdTSS_FAMILY_TABLE_ENTRY *)0)->familyID),
    offsetof(struct tdTSS_FAMILY_TABLE_ENTRY, label),
    sizeof(((struct tdTSS_FAMILY_TABLE_ENTRY *)0)->label),
    offsetof(struct tdTSS_FAMILY_TABLE_ENTRY, verificationCount),
    sizeof(((struct tdTSS_FAMILY_TABLE_ENTRY *)0)->verificationCount),
    offsetof(struct tdTSS_FAMILY_TABLE_ENTRY, enabled),
    sizeof(((struct tdTSS_FAMILY_TABLE_ENTRY *)0)->enabled),
    offsetof(struct tdTSS_FAMILY_TABLE_ENTRY, locked),
    sizeof(((struct tdTSS_FAMILY_TABLE_ENTRY *)0)->locked),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTSS_FAMILY_TABLE_ENTRY(0);
}

static void _cffi_check_struct_tdTSS_KM_KEYINFO(struct tdTSS_KM_KEYINFO *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TSS_VERSION *tmp = &p->versionInfo; (void)tmp; }
  { TSS_UUID *tmp = &p->keyUUID; (void)tmp; }
  { TSS_UUID *tmp = &p->parentKeyUUID; (void)tmp; }
  (void)((p->bAuthDataUsage) << 1);
  (void)((p->fIsLoaded) << 1);
  (void)((p->ulVendorDataLength) << 1);
  { uint8_t * *tmp = &p->rgbVendorData; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTSS_KM_KEYINFO(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTSS_KM_KEYINFO y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTSS_KM_KEYINFO),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTSS_KM_KEYINFO, versionInfo),
    sizeof(((struct tdTSS_KM_KEYINFO *)0)->versionInfo),
    offsetof(struct tdTSS_KM_KEYINFO, keyUUID),
    sizeof(((struct tdTSS_KM_KEYINFO *)0)->keyUUID),
    offsetof(struct tdTSS_KM_KEYINFO, parentKeyUUID),
    sizeof(((struct tdTSS_KM_KEYINFO *)0)->parentKeyUUID),
    offsetof(struct tdTSS_KM_KEYINFO, bAuthDataUsage),
    sizeof(((struct tdTSS_KM_KEYINFO *)0)->bAuthDataUsage),
    offsetof(struct tdTSS_KM_KEYINFO, fIsLoaded),
    sizeof(((struct tdTSS_KM_KEYINFO *)0)->fIsLoaded),
    offsetof(struct tdTSS_KM_KEYINFO, ulVendorDataLength),
    sizeof(((struct tdTSS_KM_KEYINFO *)0)->ulVendorDataLength),
    offsetof(struct tdTSS_KM_KEYINFO, rgbVendorData),
    sizeof(((struct tdTSS_KM_KEYINFO *)0)->rgbVendorData),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTSS_KM_KEYINFO(0);
}

static void _cffi_check_struct_tdTSS_KM_KEYINFO2(struct tdTSS_KM_KEYINFO2 *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TSS_VERSION *tmp = &p->versionInfo; (void)tmp; }
  { TSS_UUID *tmp = &p->keyUUID; (void)tmp; }
  { TSS_UUID *tmp = &p->parentKeyUUID; (void)tmp; }
  (void)((p->bAuthDataUsage) << 1);
  (void)((p->persistentStorageType) << 1);
  (void)((p->persistentStorageTypeParent) << 1);
  (void)((p->fIsLoaded) << 1);
  (void)((p->ulVendorDataLength) << 1);
  { uint8_t * *tmp = &p->rgbVendorData; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTSS_KM_KEYINFO2(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTSS_KM_KEYINFO2 y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTSS_KM_KEYINFO2),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTSS_KM_KEYINFO2, versionInfo),
    sizeof(((struct tdTSS_KM_KEYINFO2 *)0)->versionInfo),
    offsetof(struct tdTSS_KM_KEYINFO2, keyUUID),
    sizeof(((struct tdTSS_KM_KEYINFO2 *)0)->keyUUID),
    offsetof(struct tdTSS_KM_KEYINFO2, parentKeyUUID),
    sizeof(((struct tdTSS_KM_KEYINFO2 *)0)->parentKeyUUID),
    offsetof(struct tdTSS_KM_KEYINFO2, bAuthDataUsage),
    sizeof(((struct tdTSS_KM_KEYINFO2 *)0)->bAuthDataUsage),
    offsetof(struct tdTSS_KM_KEYINFO2, persistentStorageType),
    sizeof(((struct tdTSS_KM_KEYINFO2 *)0)->persistentStorageType),
    offsetof(struct tdTSS_KM_KEYINFO2, persistentStorageTypeParent),
    sizeof(((struct tdTSS_KM_KEYINFO2 *)0)->persistentStorageTypeParent),
    offsetof(struct tdTSS_KM_KEYINFO2, fIsLoaded),
    sizeof(((struct tdTSS_KM_KEYINFO2 *)0)->fIsLoaded),
    offsetof(struct tdTSS_KM_KEYINFO2, ulVendorDataLength),
    sizeof(((struct tdTSS_KM_KEYINFO2 *)0)->ulVendorDataLength),
    offsetof(struct tdTSS_KM_KEYINFO2, rgbVendorData),
    sizeof(((struct tdTSS_KM_KEYINFO2 *)0)->rgbVendorData),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTSS_KM_KEYINFO2(0);
}

static void _cffi_check_struct_tdTSS_NONCE(struct tdTSS_NONCE *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { uint8_t(*tmp)[20] = &p->nonce; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTSS_NONCE(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTSS_NONCE y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTSS_NONCE),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTSS_NONCE, nonce),
    sizeof(((struct tdTSS_NONCE *)0)->nonce),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTSS_NONCE(0);
}

static void _cffi_check_struct_tdTSS_PCR_EVENT(struct tdTSS_PCR_EVENT *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TSS_VERSION *tmp = &p->versionInfo; (void)tmp; }
  (void)((p->ulPcrIndex) << 1);
  (void)((p->eventType) << 1);
  (void)((p->ulPcrValueLength) << 1);
  { uint8_t * *tmp = &p->rgbPcrValue; (void)tmp; }
  (void)((p->ulEventLength) << 1);
  { uint8_t * *tmp = &p->rgbEvent; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTSS_PCR_EVENT(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTSS_PCR_EVENT y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTSS_PCR_EVENT),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTSS_PCR_EVENT, versionInfo),
    sizeof(((struct tdTSS_PCR_EVENT *)0)->versionInfo),
    offsetof(struct tdTSS_PCR_EVENT, ulPcrIndex),
    sizeof(((struct tdTSS_PCR_EVENT *)0)->ulPcrIndex),
    offsetof(struct tdTSS_PCR_EVENT, eventType),
    sizeof(((struct tdTSS_PCR_EVENT *)0)->eventType),
    offsetof(struct tdTSS_PCR_EVENT, ulPcrValueLength),
    sizeof(((struct tdTSS_PCR_EVENT *)0)->ulPcrValueLength),
    offsetof(struct tdTSS_PCR_EVENT, rgbPcrValue),
    sizeof(((struct tdTSS_PCR_EVENT *)0)->rgbPcrValue),
    offsetof(struct tdTSS_PCR_EVENT, ulEventLength),
    sizeof(((struct tdTSS_PCR_EVENT *)0)->ulEventLength),
    offsetof(struct tdTSS_PCR_EVENT, rgbEvent),
    sizeof(((struct tdTSS_PCR_EVENT *)0)->rgbEvent),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTSS_PCR_EVENT(0);
}

static void _cffi_check_struct_tdTSS_PCR_INFO_SHORT(struct tdTSS_PCR_INFO_SHORT *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->sizeOfSelect) << 1);
  { uint8_t * *tmp = &p->selection; (void)tmp; }
  (void)((p->localityAtRelease) << 1);
  (void)((p->sizeOfDigestAtRelease) << 1);
  { uint8_t * *tmp = &p->digestAtRelease; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTSS_PCR_INFO_SHORT(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTSS_PCR_INFO_SHORT y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTSS_PCR_INFO_SHORT),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTSS_PCR_INFO_SHORT, sizeOfSelect),
    sizeof(((struct tdTSS_PCR_INFO_SHORT *)0)->sizeOfSelect),
    offsetof(struct tdTSS_PCR_INFO_SHORT, selection),
    sizeof(((struct tdTSS_PCR_INFO_SHORT *)0)->selection),
    offsetof(struct tdTSS_PCR_INFO_SHORT, localityAtRelease),
    sizeof(((struct tdTSS_PCR_INFO_SHORT *)0)->localityAtRelease),
    offsetof(struct tdTSS_PCR_INFO_SHORT, sizeOfDigestAtRelease),
    sizeof(((struct tdTSS_PCR_INFO_SHORT *)0)->sizeOfDigestAtRelease),
    offsetof(struct tdTSS_PCR_INFO_SHORT, digestAtRelease),
    sizeof(((struct tdTSS_PCR_INFO_SHORT *)0)->digestAtRelease),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTSS_PCR_INFO_SHORT(0);
}

static void _cffi_check_struct_tdTSS_PLATFORM_CLASS(struct tdTSS_PLATFORM_CLASS *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->platformClassSimpleIdentifier) << 1);
  (void)((p->platformClassURISize) << 1);
  { uint8_t * *tmp = &p->pPlatformClassURI; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTSS_PLATFORM_CLASS(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTSS_PLATFORM_CLASS y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTSS_PLATFORM_CLASS),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTSS_PLATFORM_CLASS, platformClassSimpleIdentifier),
    sizeof(((struct tdTSS_PLATFORM_CLASS *)0)->platformClassSimpleIdentifier),
    offsetof(struct tdTSS_PLATFORM_CLASS, platformClassURISize),
    sizeof(((struct tdTSS_PLATFORM_CLASS *)0)->platformClassURISize),
    offsetof(struct tdTSS_PLATFORM_CLASS, pPlatformClassURI),
    sizeof(((struct tdTSS_PLATFORM_CLASS *)0)->pPlatformClassURI),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTSS_PLATFORM_CLASS(0);
}

static void _cffi_check_struct_tdTSS_UUID(struct tdTSS_UUID *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->ulTimeLow) << 1);
  (void)((p->usTimeMid) << 1);
  (void)((p->usTimeHigh) << 1);
  (void)((p->bClockSeqHigh) << 1);
  (void)((p->bClockSeqLow) << 1);
  { uint8_t(*tmp)[6] = &p->rgbNode; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTSS_UUID(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTSS_UUID y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTSS_UUID),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTSS_UUID, ulTimeLow),
    sizeof(((struct tdTSS_UUID *)0)->ulTimeLow),
    offsetof(struct tdTSS_UUID, usTimeMid),
    sizeof(((struct tdTSS_UUID *)0)->usTimeMid),
    offsetof(struct tdTSS_UUID, usTimeHigh),
    sizeof(((struct tdTSS_UUID *)0)->usTimeHigh),
    offsetof(struct tdTSS_UUID, bClockSeqHigh),
    sizeof(((struct tdTSS_UUID *)0)->bClockSeqHigh),
    offsetof(struct tdTSS_UUID, bClockSeqLow),
    sizeof(((struct tdTSS_UUID *)0)->bClockSeqLow),
    offsetof(struct tdTSS_UUID, rgbNode),
    sizeof(((struct tdTSS_UUID *)0)->rgbNode),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTSS_UUID(0);
}

static void _cffi_check_struct_tdTSS_VALIDATION(struct tdTSS_VALIDATION *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  { TSS_VERSION *tmp = &p->versionInfo; (void)tmp; }
  (void)((p->ulExternalDataLength) << 1);
  { uint8_t * *tmp = &p->rgbExternalData; (void)tmp; }
  (void)((p->ulDataLength) << 1);
  { uint8_t * *tmp = &p->rgbData; (void)tmp; }
  (void)((p->ulValidationDataLength) << 1);
  { uint8_t * *tmp = &p->rgbValidationData; (void)tmp; }
}
static PyObject *
_cffi_layout_struct_tdTSS_VALIDATION(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTSS_VALIDATION y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTSS_VALIDATION),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTSS_VALIDATION, versionInfo),
    sizeof(((struct tdTSS_VALIDATION *)0)->versionInfo),
    offsetof(struct tdTSS_VALIDATION, ulExternalDataLength),
    sizeof(((struct tdTSS_VALIDATION *)0)->ulExternalDataLength),
    offsetof(struct tdTSS_VALIDATION, rgbExternalData),
    sizeof(((struct tdTSS_VALIDATION *)0)->rgbExternalData),
    offsetof(struct tdTSS_VALIDATION, ulDataLength),
    sizeof(((struct tdTSS_VALIDATION *)0)->ulDataLength),
    offsetof(struct tdTSS_VALIDATION, rgbData),
    sizeof(((struct tdTSS_VALIDATION *)0)->rgbData),
    offsetof(struct tdTSS_VALIDATION, ulValidationDataLength),
    sizeof(((struct tdTSS_VALIDATION *)0)->ulValidationDataLength),
    offsetof(struct tdTSS_VALIDATION, rgbValidationData),
    sizeof(((struct tdTSS_VALIDATION *)0)->rgbValidationData),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTSS_VALIDATION(0);
}

static void _cffi_check_struct_tdTSS_VERSION(struct tdTSS_VERSION *p)
{
  /* only to generate compile-time warnings or errors */
  (void)p;
  (void)((p->bMajor) << 1);
  (void)((p->bMinor) << 1);
  (void)((p->bRevMajor) << 1);
  (void)((p->bRevMinor) << 1);
}
static PyObject *
_cffi_layout_struct_tdTSS_VERSION(PyObject *self, PyObject *noarg)
{
  struct _cffi_aligncheck { char x; struct tdTSS_VERSION y; };
  static Py_ssize_t nums[] = {
    sizeof(struct tdTSS_VERSION),
    offsetof(struct _cffi_aligncheck, y),
    offsetof(struct tdTSS_VERSION, bMajor),
    sizeof(((struct tdTSS_VERSION *)0)->bMajor),
    offsetof(struct tdTSS_VERSION, bMinor),
    sizeof(((struct tdTSS_VERSION *)0)->bMinor),
    offsetof(struct tdTSS_VERSION, bRevMajor),
    sizeof(((struct tdTSS_VERSION *)0)->bRevMajor),
    offsetof(struct tdTSS_VERSION, bRevMinor),
    sizeof(((struct tdTSS_VERSION *)0)->bRevMinor),
    -1
  };
  (void)self; /* unused */
  (void)noarg; /* unused */
  return _cffi_get_struct_layout(nums);
  /* the next line is not executed, but compiled */
  _cffi_check_struct_tdTSS_VERSION(0);
}

static int _cffi_setup_custom(PyObject *lib)
{
  return _cffi_const_TSS_W_BASE(lib);
}

static PyMethodDef _cffi_methods[] = {
  {"Tspi_ChangeAuth", _cffi_f_Tspi_ChangeAuth, METH_VARARGS, NULL},
  {"Tspi_ChangeAuthAsym", _cffi_f_Tspi_ChangeAuthAsym, METH_VARARGS, NULL},
  {"Tspi_Context_Close", _cffi_f_Tspi_Context_Close, METH_O, NULL},
  {"Tspi_Context_CloseObject", _cffi_f_Tspi_Context_CloseObject, METH_VARARGS, NULL},
  {"Tspi_Context_CloseSignTransport", _cffi_f_Tspi_Context_CloseSignTransport, METH_VARARGS, NULL},
  {"Tspi_Context_Connect", _cffi_f_Tspi_Context_Connect, METH_VARARGS, NULL},
  {"Tspi_Context_Create", _cffi_f_Tspi_Context_Create, METH_O, NULL},
  {"Tspi_Context_CreateObject", _cffi_f_Tspi_Context_CreateObject, METH_VARARGS, NULL},
  {"Tspi_Context_FreeMemory", _cffi_f_Tspi_Context_FreeMemory, METH_VARARGS, NULL},
  {"Tspi_Context_GetCapability", _cffi_f_Tspi_Context_GetCapability, METH_VARARGS, NULL},
  {"Tspi_Context_GetDefaultPolicy", _cffi_f_Tspi_Context_GetDefaultPolicy, METH_VARARGS, NULL},
  {"Tspi_Context_GetKeyByPublicInfo", _cffi_f_Tspi_Context_GetKeyByPublicInfo, METH_VARARGS, NULL},
  {"Tspi_Context_GetKeyByUUID", _cffi_f_Tspi_Context_GetKeyByUUID, METH_VARARGS, NULL},
  {"Tspi_Context_GetRegisteredKeysByUUID", _cffi_f_Tspi_Context_GetRegisteredKeysByUUID, METH_VARARGS, NULL},
  {"Tspi_Context_GetRegisteredKeysByUUID2", _cffi_f_Tspi_Context_GetRegisteredKeysByUUID2, METH_VARARGS, NULL},
  {"Tspi_Context_GetTpmObject", _cffi_f_Tspi_Context_GetTpmObject, METH_VARARGS, NULL},
  {"Tspi_Context_LoadKeyByBlob", _cffi_f_Tspi_Context_LoadKeyByBlob, METH_VARARGS, NULL},
  {"Tspi_Context_LoadKeyByUUID", _cffi_f_Tspi_Context_LoadKeyByUUID, METH_VARARGS, NULL},
  {"Tspi_Context_RegisterKey", _cffi_f_Tspi_Context_RegisterKey, METH_VARARGS, NULL},
  {"Tspi_Context_SetTransEncryptionKey", _cffi_f_Tspi_Context_SetTransEncryptionKey, METH_VARARGS, NULL},
  {"Tspi_Context_UnregisterKey", _cffi_f_Tspi_Context_UnregisterKey, METH_VARARGS, NULL},
  {"Tspi_Data_Bind", _cffi_f_Tspi_Data_Bind, METH_VARARGS, NULL},
  {"Tspi_Data_Seal", _cffi_f_Tspi_Data_Seal, METH_VARARGS, NULL},
  {"Tspi_Data_Unbind", _cffi_f_Tspi_Data_Unbind, METH_VARARGS, NULL},
  {"Tspi_Data_Unseal", _cffi_f_Tspi_Data_Unseal, METH_VARARGS, NULL},
  {"Tspi_DecodeBER_TssBlob", _cffi_f_Tspi_DecodeBER_TssBlob, METH_VARARGS, NULL},
  {"Tspi_EncodeDER_TssBlob", _cffi_f_Tspi_EncodeDER_TssBlob, METH_VARARGS, NULL},
  {"Tspi_GetAttribData", _cffi_f_Tspi_GetAttribData, METH_VARARGS, NULL},
  {"Tspi_GetAttribUint32", _cffi_f_Tspi_GetAttribUint32, METH_VARARGS, NULL},
  {"Tspi_GetPolicyObject", _cffi_f_Tspi_GetPolicyObject, METH_VARARGS, NULL},
  {"Tspi_Hash_GetHashValue", _cffi_f_Tspi_Hash_GetHashValue, METH_VARARGS, NULL},
  {"Tspi_Hash_SetHashValue", _cffi_f_Tspi_Hash_SetHashValue, METH_VARARGS, NULL},
  {"Tspi_Hash_Sign", _cffi_f_Tspi_Hash_Sign, METH_VARARGS, NULL},
  {"Tspi_Hash_TickStampBlob", _cffi_f_Tspi_Hash_TickStampBlob, METH_VARARGS, NULL},
  {"Tspi_Hash_UpdateHashValue", _cffi_f_Tspi_Hash_UpdateHashValue, METH_VARARGS, NULL},
  {"Tspi_Hash_VerifySignature", _cffi_f_Tspi_Hash_VerifySignature, METH_VARARGS, NULL},
  {"Tspi_Key_CMKConvertMigration", _cffi_f_Tspi_Key_CMKConvertMigration, METH_VARARGS, NULL},
  {"Tspi_Key_CMKCreateBlob", _cffi_f_Tspi_Key_CMKCreateBlob, METH_VARARGS, NULL},
  {"Tspi_Key_CertifyKey", _cffi_f_Tspi_Key_CertifyKey, METH_VARARGS, NULL},
  {"Tspi_Key_ConvertMigrationBlob", _cffi_f_Tspi_Key_ConvertMigrationBlob, METH_VARARGS, NULL},
  {"Tspi_Key_CreateKey", _cffi_f_Tspi_Key_CreateKey, METH_VARARGS, NULL},
  {"Tspi_Key_CreateMigrationBlob", _cffi_f_Tspi_Key_CreateMigrationBlob, METH_VARARGS, NULL},
  {"Tspi_Key_GetPubKey", _cffi_f_Tspi_Key_GetPubKey, METH_VARARGS, NULL},
  {"Tspi_Key_LoadKey", _cffi_f_Tspi_Key_LoadKey, METH_VARARGS, NULL},
  {"Tspi_Key_UnloadKey", _cffi_f_Tspi_Key_UnloadKey, METH_O, NULL},
  {"Tspi_Key_WrapKey", _cffi_f_Tspi_Key_WrapKey, METH_VARARGS, NULL},
  {"Tspi_NV_DefineSpace", _cffi_f_Tspi_NV_DefineSpace, METH_VARARGS, NULL},
  {"Tspi_NV_ReadValue", _cffi_f_Tspi_NV_ReadValue, METH_VARARGS, NULL},
  {"Tspi_NV_ReleaseSpace", _cffi_f_Tspi_NV_ReleaseSpace, METH_O, NULL},
  {"Tspi_NV_WriteValue", _cffi_f_Tspi_NV_WriteValue, METH_VARARGS, NULL},
  {"Tspi_PcrComposite_GetCompositeHash", _cffi_f_Tspi_PcrComposite_GetCompositeHash, METH_VARARGS, NULL},
  {"Tspi_PcrComposite_GetPcrLocality", _cffi_f_Tspi_PcrComposite_GetPcrLocality, METH_VARARGS, NULL},
  {"Tspi_PcrComposite_GetPcrValue", _cffi_f_Tspi_PcrComposite_GetPcrValue, METH_VARARGS, NULL},
  {"Tspi_PcrComposite_SelectPcrIndex", _cffi_f_Tspi_PcrComposite_SelectPcrIndex, METH_VARARGS, NULL},
  {"Tspi_PcrComposite_SelectPcrIndexEx", _cffi_f_Tspi_PcrComposite_SelectPcrIndexEx, METH_VARARGS, NULL},
  {"Tspi_PcrComposite_SetPcrLocality", _cffi_f_Tspi_PcrComposite_SetPcrLocality, METH_VARARGS, NULL},
  {"Tspi_PcrComposite_SetPcrValue", _cffi_f_Tspi_PcrComposite_SetPcrValue, METH_VARARGS, NULL},
  {"Tspi_Policy_AssignToObject", _cffi_f_Tspi_Policy_AssignToObject, METH_VARARGS, NULL},
  {"Tspi_Policy_FlushSecret", _cffi_f_Tspi_Policy_FlushSecret, METH_O, NULL},
  {"Tspi_Policy_SetSecret", _cffi_f_Tspi_Policy_SetSecret, METH_VARARGS, NULL},
  {"Tspi_SetAttribData", _cffi_f_Tspi_SetAttribData, METH_VARARGS, NULL},
  {"Tspi_SetAttribUint32", _cffi_f_Tspi_SetAttribUint32, METH_VARARGS, NULL},
  {"Tspi_TPM_ActivateIdentity", _cffi_f_Tspi_TPM_ActivateIdentity, METH_VARARGS, NULL},
  {"Tspi_TPM_AuthorizeMigrationTicket", _cffi_f_Tspi_TPM_AuthorizeMigrationTicket, METH_VARARGS, NULL},
  {"Tspi_TPM_CMKApproveMA", _cffi_f_Tspi_TPM_CMKApproveMA, METH_VARARGS, NULL},
  {"Tspi_TPM_CMKCreateTicket", _cffi_f_Tspi_TPM_CMKCreateTicket, METH_VARARGS, NULL},
  {"Tspi_TPM_CMKSetRestrictions", _cffi_f_Tspi_TPM_CMKSetRestrictions, METH_VARARGS, NULL},
  {"Tspi_TPM_CertifySelfTest", _cffi_f_Tspi_TPM_CertifySelfTest, METH_VARARGS, NULL},
  {"Tspi_TPM_CheckMaintenancePubKey", _cffi_f_Tspi_TPM_CheckMaintenancePubKey, METH_VARARGS, NULL},
  {"Tspi_TPM_ClearOwner", _cffi_f_Tspi_TPM_ClearOwner, METH_VARARGS, NULL},
  {"Tspi_TPM_CollateIdentityRequest", _cffi_f_Tspi_TPM_CollateIdentityRequest, METH_VARARGS, NULL},
  {"Tspi_TPM_CreateEndorsementKey", _cffi_f_Tspi_TPM_CreateEndorsementKey, METH_VARARGS, NULL},
  {"Tspi_TPM_CreateMaintenanceArchive", _cffi_f_Tspi_TPM_CreateMaintenanceArchive, METH_VARARGS, NULL},
  {"Tspi_TPM_CreateRevocableEndorsementKey", _cffi_f_Tspi_TPM_CreateRevocableEndorsementKey, METH_VARARGS, NULL},
  {"Tspi_TPM_Delegate_AddFamily", _cffi_f_Tspi_TPM_Delegate_AddFamily, METH_VARARGS, NULL},
  {"Tspi_TPM_Delegate_CacheOwnerDelegation", _cffi_f_Tspi_TPM_Delegate_CacheOwnerDelegation, METH_VARARGS, NULL},
  {"Tspi_TPM_Delegate_CreateDelegation", _cffi_f_Tspi_TPM_Delegate_CreateDelegation, METH_VARARGS, NULL},
  {"Tspi_TPM_Delegate_GetFamily", _cffi_f_Tspi_TPM_Delegate_GetFamily, METH_VARARGS, NULL},
  {"Tspi_TPM_Delegate_InvalidateFamily", _cffi_f_Tspi_TPM_Delegate_InvalidateFamily, METH_VARARGS, NULL},
  {"Tspi_TPM_Delegate_ReadTables", _cffi_f_Tspi_TPM_Delegate_ReadTables, METH_VARARGS, NULL},
  {"Tspi_TPM_Delegate_UpdateVerificationCount", _cffi_f_Tspi_TPM_Delegate_UpdateVerificationCount, METH_VARARGS, NULL},
  {"Tspi_TPM_Delegate_VerifyDelegation", _cffi_f_Tspi_TPM_Delegate_VerifyDelegation, METH_O, NULL},
  {"Tspi_TPM_DirRead", _cffi_f_Tspi_TPM_DirRead, METH_VARARGS, NULL},
  {"Tspi_TPM_DirWrite", _cffi_f_Tspi_TPM_DirWrite, METH_VARARGS, NULL},
  {"Tspi_TPM_GetAuditDigest", _cffi_f_Tspi_TPM_GetAuditDigest, METH_VARARGS, NULL},
  {"Tspi_TPM_GetCapability", _cffi_f_Tspi_TPM_GetCapability, METH_VARARGS, NULL},
  {"Tspi_TPM_GetCapabilitySigned", _cffi_f_Tspi_TPM_GetCapabilitySigned, METH_VARARGS, NULL},
  {"Tspi_TPM_GetEvent", _cffi_f_Tspi_TPM_GetEvent, METH_VARARGS, NULL},
  {"Tspi_TPM_GetEventLog", _cffi_f_Tspi_TPM_GetEventLog, METH_VARARGS, NULL},
  {"Tspi_TPM_GetEvents", _cffi_f_Tspi_TPM_GetEvents, METH_VARARGS, NULL},
  {"Tspi_TPM_GetPubEndorsementKey", _cffi_f_Tspi_TPM_GetPubEndorsementKey, METH_VARARGS, NULL},
  {"Tspi_TPM_GetRandom", _cffi_f_Tspi_TPM_GetRandom, METH_VARARGS, NULL},
  {"Tspi_TPM_GetStatus", _cffi_f_Tspi_TPM_GetStatus, METH_VARARGS, NULL},
  {"Tspi_TPM_GetTestResult", _cffi_f_Tspi_TPM_GetTestResult, METH_VARARGS, NULL},
  {"Tspi_TPM_KeyControlOwner", _cffi_f_Tspi_TPM_KeyControlOwner, METH_VARARGS, NULL},
  {"Tspi_TPM_KillMaintenanceFeature", _cffi_f_Tspi_TPM_KillMaintenanceFeature, METH_O, NULL},
  {"Tspi_TPM_LoadMaintenancePubKey", _cffi_f_Tspi_TPM_LoadMaintenancePubKey, METH_VARARGS, NULL},
  {"Tspi_TPM_OwnerGetSRKPubKey", _cffi_f_Tspi_TPM_OwnerGetSRKPubKey, METH_VARARGS, NULL},
  {"Tspi_TPM_PcrExtend", _cffi_f_Tspi_TPM_PcrExtend, METH_VARARGS, NULL},
  {"Tspi_TPM_PcrRead", _cffi_f_Tspi_TPM_PcrRead, METH_VARARGS, NULL},
  {"Tspi_TPM_PcrReset", _cffi_f_Tspi_TPM_PcrReset, METH_VARARGS, NULL},
  {"Tspi_TPM_Quote", _cffi_f_Tspi_TPM_Quote, METH_VARARGS, NULL},
  {"Tspi_TPM_Quote2", _cffi_f_Tspi_TPM_Quote2, METH_VARARGS, NULL},
  {"Tspi_TPM_ReadCounter", _cffi_f_Tspi_TPM_ReadCounter, METH_VARARGS, NULL},
  {"Tspi_TPM_ReadCurrentTicks", _cffi_f_Tspi_TPM_ReadCurrentTicks, METH_VARARGS, NULL},
  {"Tspi_TPM_RevokeEndorsementKey", _cffi_f_Tspi_TPM_RevokeEndorsementKey, METH_VARARGS, NULL},
  {"Tspi_TPM_SelfTestFull", _cffi_f_Tspi_TPM_SelfTestFull, METH_O, NULL},
  {"Tspi_TPM_SetOperatorAuth", _cffi_f_Tspi_TPM_SetOperatorAuth, METH_VARARGS, NULL},
  {"Tspi_TPM_SetStatus", _cffi_f_Tspi_TPM_SetStatus, METH_VARARGS, NULL},
  {"Tspi_TPM_StirRandom", _cffi_f_Tspi_TPM_StirRandom, METH_VARARGS, NULL},
  {"Tspi_TPM_TakeOwnership", _cffi_f_Tspi_TPM_TakeOwnership, METH_VARARGS, NULL},
  {"_cffi_layout_struct_tdTCS_AUTH", _cffi_layout_struct_tdTCS_AUTH, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTCS_LOADKEY_INFO", _cffi_layout_struct_tdTCS_LOADKEY_INFO, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_ASYM_CA_CONTENTS", _cffi_layout_struct_tdTPM_ASYM_CA_CONTENTS, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_AUDIT_EVENT_IN", _cffi_layout_struct_tdTPM_AUDIT_EVENT_IN, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_AUDIT_EVENT_OUT", _cffi_layout_struct_tdTPM_AUDIT_EVENT_OUT, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_AUTHDATA", _cffi_layout_struct_tdTPM_AUTHDATA, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_BOUND_DATA", _cffi_layout_struct_tdTPM_BOUND_DATA, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_CAP_VERSION_INFO", _cffi_layout_struct_tdTPM_CAP_VERSION_INFO, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_CERTIFY_INFO", _cffi_layout_struct_tdTPM_CERTIFY_INFO, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_CERTIFY_INFO2", _cffi_layout_struct_tdTPM_CERTIFY_INFO2, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_CHANGEAUTH_VALIDATE", _cffi_layout_struct_tdTPM_CHANGEAUTH_VALIDATE, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_CMK_AUTH", _cffi_layout_struct_tdTPM_CMK_AUTH, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_CMK_MA_APPROVAL", _cffi_layout_struct_tdTPM_CMK_MA_APPROVAL, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_CMK_MIGAUTH", _cffi_layout_struct_tdTPM_CMK_MIGAUTH, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_CMK_SIGTICKET", _cffi_layout_struct_tdTPM_CMK_SIGTICKET, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_CONTEXT_BLOB", _cffi_layout_struct_tdTPM_CONTEXT_BLOB, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_CONTEXT_SENSITIVE", _cffi_layout_struct_tdTPM_CONTEXT_SENSITIVE, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_COUNTER_VALUE", _cffi_layout_struct_tdTPM_COUNTER_VALUE, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_CURRENT_TICKS", _cffi_layout_struct_tdTPM_CURRENT_TICKS, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_DAA_BLOB", _cffi_layout_struct_tdTPM_DAA_BLOB, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_DAA_CONTEXT", _cffi_layout_struct_tdTPM_DAA_CONTEXT, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_DAA_ISSUER", _cffi_layout_struct_tdTPM_DAA_ISSUER, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_DAA_JOINDATA", _cffi_layout_struct_tdTPM_DAA_JOINDATA, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_DAA_SENSITIVE", _cffi_layout_struct_tdTPM_DAA_SENSITIVE, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_DAA_TPM", _cffi_layout_struct_tdTPM_DAA_TPM, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_DA_ACTION_TYPE", _cffi_layout_struct_tdTPM_DA_ACTION_TYPE, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_DA_INFO", _cffi_layout_struct_tdTPM_DA_INFO, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_DA_INFO_LIMITED", _cffi_layout_struct_tdTPM_DA_INFO_LIMITED, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_DELEGATE_KEY_BLOB", _cffi_layout_struct_tdTPM_DELEGATE_KEY_BLOB, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_DELEGATE_LABEL", _cffi_layout_struct_tdTPM_DELEGATE_LABEL, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_DELEGATE_OWNER_BLOB", _cffi_layout_struct_tdTPM_DELEGATE_OWNER_BLOB, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_DELEGATE_PUBLIC", _cffi_layout_struct_tdTPM_DELEGATE_PUBLIC, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_DELEGATE_SENSITIVE", _cffi_layout_struct_tdTPM_DELEGATE_SENSITIVE, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_DELEGATE_TABLE_ROW", _cffi_layout_struct_tdTPM_DELEGATE_TABLE_ROW, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_DELEGATIONS", _cffi_layout_struct_tdTPM_DELEGATIONS, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_DIGEST", _cffi_layout_struct_tdTPM_DIGEST, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_EK_BLOB", _cffi_layout_struct_tdTPM_EK_BLOB, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_EK_BLOB_ACTIVATE", _cffi_layout_struct_tdTPM_EK_BLOB_ACTIVATE, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_EK_BLOB_AUTH", _cffi_layout_struct_tdTPM_EK_BLOB_AUTH, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_FAMILY_LABEL", _cffi_layout_struct_tdTPM_FAMILY_LABEL, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_FAMILY_TABLE_ENTRY", _cffi_layout_struct_tdTPM_FAMILY_TABLE_ENTRY, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_IDENTITY_CONTENTS", _cffi_layout_struct_tdTPM_IDENTITY_CONTENTS, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_IDENTITY_PROOF", _cffi_layout_struct_tdTPM_IDENTITY_PROOF, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_IDENTITY_REQ", _cffi_layout_struct_tdTPM_IDENTITY_REQ, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_KEY", _cffi_layout_struct_tdTPM_KEY, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_KEY12", _cffi_layout_struct_tdTPM_KEY12, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_KEY_HANDLE_LIST", _cffi_layout_struct_tdTPM_KEY_HANDLE_LIST, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_KEY_PARMS", _cffi_layout_struct_tdTPM_KEY_PARMS, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_MIGRATE_ASYMKEY", _cffi_layout_struct_tdTPM_MIGRATE_ASYMKEY, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_MIGRATIONKEYAUTH", _cffi_layout_struct_tdTPM_MIGRATIONKEYAUTH, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_MSA_COMPOSITE", _cffi_layout_struct_tdTPM_MSA_COMPOSITE, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_NONCE", _cffi_layout_struct_tdTPM_NONCE, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_NV_ATTRIBUTES", _cffi_layout_struct_tdTPM_NV_ATTRIBUTES, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_NV_DATA_PUBLIC", _cffi_layout_struct_tdTPM_NV_DATA_PUBLIC, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_PCR_ATTRIBUTES", _cffi_layout_struct_tdTPM_PCR_ATTRIBUTES, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_PCR_COMPOSITE", _cffi_layout_struct_tdTPM_PCR_COMPOSITE, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_PCR_INFO", _cffi_layout_struct_tdTPM_PCR_INFO, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_PCR_INFO_LONG", _cffi_layout_struct_tdTPM_PCR_INFO_LONG, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_PCR_INFO_SHORT", _cffi_layout_struct_tdTPM_PCR_INFO_SHORT, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_PCR_SELECTION", _cffi_layout_struct_tdTPM_PCR_SELECTION, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_PERMANENT_FLAGS", _cffi_layout_struct_tdTPM_PERMANENT_FLAGS, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_PUBKEY", _cffi_layout_struct_tdTPM_PUBKEY, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_QUOTE_INFO", _cffi_layout_struct_tdTPM_QUOTE_INFO, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_QUOTE_INFO2", _cffi_layout_struct_tdTPM_QUOTE_INFO2, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_RSA_KEY_PARMS", _cffi_layout_struct_tdTPM_RSA_KEY_PARMS, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_SEALED_DATA", _cffi_layout_struct_tdTPM_SEALED_DATA, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_SELECT_SIZE", _cffi_layout_struct_tdTPM_SELECT_SIZE, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_SIGN_INFO", _cffi_layout_struct_tdTPM_SIGN_INFO, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_STANY_FLAGS", _cffi_layout_struct_tdTPM_STANY_FLAGS, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_STCLEAR_FLAGS", _cffi_layout_struct_tdTPM_STCLEAR_FLAGS, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_STORED_DATA", _cffi_layout_struct_tdTPM_STORED_DATA, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_STORED_DATA12", _cffi_layout_struct_tdTPM_STORED_DATA12, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_STORE_ASYMKEY", _cffi_layout_struct_tdTPM_STORE_ASYMKEY, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_STORE_PRIVKEY", _cffi_layout_struct_tdTPM_STORE_PRIVKEY, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_STORE_PUBKEY", _cffi_layout_struct_tdTPM_STORE_PUBKEY, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_STRUCT_VER", _cffi_layout_struct_tdTPM_STRUCT_VER, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_SYMMETRIC_KEY", _cffi_layout_struct_tdTPM_SYMMETRIC_KEY, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_SYMMETRIC_KEY_PARMS", _cffi_layout_struct_tdTPM_SYMMETRIC_KEY_PARMS, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_SYM_CA_ATTESTATION", _cffi_layout_struct_tdTPM_SYM_CA_ATTESTATION, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_TRANSPORT_AUTH", _cffi_layout_struct_tdTPM_TRANSPORT_AUTH, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_TRANSPORT_INTERNAL", _cffi_layout_struct_tdTPM_TRANSPORT_INTERNAL, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_TRANSPORT_LOG_IN", _cffi_layout_struct_tdTPM_TRANSPORT_LOG_IN, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_TRANSPORT_LOG_OUT", _cffi_layout_struct_tdTPM_TRANSPORT_LOG_OUT, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_TRANSPORT_PUBLIC", _cffi_layout_struct_tdTPM_TRANSPORT_PUBLIC, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_VERSION", _cffi_layout_struct_tdTPM_VERSION, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTPM_VERSION_BYTE", _cffi_layout_struct_tdTPM_VERSION_BYTE, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTSS_CALLBACK", _cffi_layout_struct_tdTSS_CALLBACK, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTSS_DAA_AR_KEY_PAIR", _cffi_layout_struct_tdTSS_DAA_AR_KEY_PAIR, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTSS_DAA_AR_PK", _cffi_layout_struct_tdTSS_DAA_AR_PK, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTSS_DAA_AR_SK", _cffi_layout_struct_tdTSS_DAA_AR_SK, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTSS_DAA_ATTRIB_COMMIT", _cffi_layout_struct_tdTSS_DAA_ATTRIB_COMMIT, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTSS_DAA_CREDENTIAL", _cffi_layout_struct_tdTSS_DAA_CREDENTIAL, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTSS_DAA_CREDENTIAL_REQUEST", _cffi_layout_struct_tdTSS_DAA_CREDENTIAL_REQUEST, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTSS_DAA_CRED_ISSUER", _cffi_layout_struct_tdTSS_DAA_CRED_ISSUER, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTSS_DAA_IDENTITY_PROOF", _cffi_layout_struct_tdTSS_DAA_IDENTITY_PROOF, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTSS_DAA_KEY_PAIR", _cffi_layout_struct_tdTSS_DAA_KEY_PAIR, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTSS_DAA_PK", _cffi_layout_struct_tdTSS_DAA_PK, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTSS_DAA_PK_PROOF", _cffi_layout_struct_tdTSS_DAA_PK_PROOF, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTSS_DAA_PSEUDONYM", _cffi_layout_struct_tdTSS_DAA_PSEUDONYM, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTSS_DAA_PSEUDONYM_ENCRYPTED", _cffi_layout_struct_tdTSS_DAA_PSEUDONYM_ENCRYPTED, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTSS_DAA_PSEUDONYM_PLAIN", _cffi_layout_struct_tdTSS_DAA_PSEUDONYM_PLAIN, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTSS_DAA_SELECTED_ATTRIB", _cffi_layout_struct_tdTSS_DAA_SELECTED_ATTRIB, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTSS_DAA_SIGNATURE", _cffi_layout_struct_tdTSS_DAA_SIGNATURE, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTSS_DAA_SIGN_CALLBACK", _cffi_layout_struct_tdTSS_DAA_SIGN_CALLBACK, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTSS_DAA_SK", _cffi_layout_struct_tdTSS_DAA_SK, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTSS_DELEGATION_TABLE_ENTRY", _cffi_layout_struct_tdTSS_DELEGATION_TABLE_ENTRY, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTSS_EVENT_CERT", _cffi_layout_struct_tdTSS_EVENT_CERT, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTSS_FAMILY_TABLE_ENTRY", _cffi_layout_struct_tdTSS_FAMILY_TABLE_ENTRY, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTSS_KM_KEYINFO", _cffi_layout_struct_tdTSS_KM_KEYINFO, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTSS_KM_KEYINFO2", _cffi_layout_struct_tdTSS_KM_KEYINFO2, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTSS_NONCE", _cffi_layout_struct_tdTSS_NONCE, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTSS_PCR_EVENT", _cffi_layout_struct_tdTSS_PCR_EVENT, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTSS_PCR_INFO_SHORT", _cffi_layout_struct_tdTSS_PCR_INFO_SHORT, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTSS_PLATFORM_CLASS", _cffi_layout_struct_tdTSS_PLATFORM_CLASS, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTSS_UUID", _cffi_layout_struct_tdTSS_UUID, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTSS_VALIDATION", _cffi_layout_struct_tdTSS_VALIDATION, METH_NOARGS, NULL},
  {"_cffi_layout_struct_tdTSS_VERSION", _cffi_layout_struct_tdTSS_VERSION, 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__xe6c7c5f0x3d3938f1",
  NULL,
  -1,
  _cffi_methods,
  NULL, NULL, NULL, NULL
};

PyMODINIT_FUNC
PyInit__cffi__xe6c7c5f0x3d3938f1(void)
{
  PyObject *lib;
  lib = PyModule_Create(&_cffi_module_def);
  if (lib == NULL)
    return NULL;
  if (((void)lib,0) < 0 || _cffi_init() < 0) {
    Py_DECREF(lib);
    return NULL;
  }
  return lib;
}

#else

PyMODINIT_FUNC
init_cffi__xe6c7c5f0x3d3938f1(void)
{
  PyObject *lib;
  lib = Py_InitModule("_cffi__xe6c7c5f0x3d3938f1", _cffi_methods);
  if (lib == NULL)
    return;
  if (((void)lib,0) < 0 || _cffi_init() < 0)
    return;
  return;
}

#endif
