#define _CFFI_

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

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

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

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

typedef void *_cffi_opcode_t;

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

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

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

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

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

#define _CFFI__IO_FILE_STRUCT         (-1)


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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

#define _cffi_to_c_double PyFloat_AsDouble
#define _cffi_to_c_float PyFloat_AsDouble

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

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

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

typedef struct _ctypedescr CTypeDescrObject;

static void *_cffi_exports[_CFFI_NUM_EXPORTS];

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

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

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

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

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

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

  failure:
    Py_XDECREF(module);
    return NULL;
}

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


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

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

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

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

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

#ifdef __cplusplus
}
#endif

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

#include <sqlite3.h>

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

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

static void _cffi_const_SQLITE_TRANSIENT(char *o)
{
  *(void * *)o = SQLITE_TRANSIENT;
}

static void * _cffi_d_sqlite3_aggregate_context(sqlite3_context * x0, int x1)
{
  return sqlite3_aggregate_context(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_aggregate_context(PyObject *self, PyObject *args)
{
  sqlite3_context * x0;
  int x1;
  Py_ssize_t datasize;
  void * result;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_pointer((char *)result, _cffi_type(28));
}
#else
#  define _cffi_f_sqlite3_aggregate_context _cffi_d_sqlite3_aggregate_context
#endif

static int _cffi_d_sqlite3_bind_blob(sqlite3_stmt * x0, int x1, void const * x2, int x3, void(* x4)(void *))
{
  return sqlite3_bind_blob(x0, x1, x2, x3, x4);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_bind_blob(PyObject *self, PyObject *args)
{
  sqlite3_stmt * x0;
  int x1;
  void const * x2;
  int x3;
  void(* x4)(void *);
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

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

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

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

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

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

  x4 = (void(*)(void *))_cffi_to_c_pointer(arg4, _cffi_type(68));
  if (x4 == (void(*)(void *))NULL && PyErr_Occurred())
    return NULL;

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

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

static int _cffi_d_sqlite3_bind_double(sqlite3_stmt * x0, int x1, double x2)
{
  return sqlite3_bind_double(x0, x1, x2);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_bind_double(PyObject *self, PyObject *args)
{
  sqlite3_stmt * x0;
  int x1;
  double x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

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

  x2 = (double)_cffi_to_c_double(arg2);
  if (x2 == (double)-1 && PyErr_Occurred())
    return NULL;

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

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

static int _cffi_d_sqlite3_bind_int(sqlite3_stmt * x0, int x1, int x2)
{
  return sqlite3_bind_int(x0, x1, x2);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_bind_int(PyObject *self, PyObject *args)
{
  sqlite3_stmt * x0;
  int x1;
  int x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

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

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

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

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

static int _cffi_d_sqlite3_bind_int64(sqlite3_stmt * x0, int x1, int64_t x2)
{
  return sqlite3_bind_int64(x0, x1, x2);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_bind_int64(PyObject *self, PyObject *args)
{
  sqlite3_stmt * x0;
  int x1;
  int64_t x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

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

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

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

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

static int _cffi_d_sqlite3_bind_null(sqlite3_stmt * x0, int x1)
{
  return sqlite3_bind_null(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_bind_null(PyObject *self, PyObject *args)
{
  sqlite3_stmt * x0;
  int x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

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

static int _cffi_d_sqlite3_bind_parameter_count(sqlite3_stmt * x0)
{
  return sqlite3_bind_parameter_count(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_bind_parameter_count(PyObject *self, PyObject *arg0)
{
  sqlite3_stmt * x0;
  Py_ssize_t datasize;
  int result;

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

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

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

static char const * _cffi_d_sqlite3_bind_parameter_name(sqlite3_stmt * x0, int x1)
{
  return sqlite3_bind_parameter_name(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_bind_parameter_name(PyObject *self, PyObject *args)
{
  sqlite3_stmt * x0;
  int x1;
  Py_ssize_t datasize;
  char const * result;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

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

static int _cffi_d_sqlite3_bind_text(sqlite3_stmt * x0, int x1, char const * x2, int x3, void(* x4)(void *))
{
  return sqlite3_bind_text(x0, x1, x2, x3, x4);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_bind_text(PyObject *self, PyObject *args)
{
  sqlite3_stmt * x0;
  int x1;
  char const * x2;
  int x3;
  void(* x4)(void *);
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

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

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

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

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

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

  x4 = (void(*)(void *))_cffi_to_c_pointer(arg4, _cffi_type(68));
  if (x4 == (void(*)(void *))NULL && PyErr_Occurred())
    return NULL;

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

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

static int _cffi_d_sqlite3_bind_text16(sqlite3_stmt * x0, int x1, void const * x2, int x3, void(* x4)(void *))
{
  return sqlite3_bind_text16(x0, x1, x2, x3, x4);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_bind_text16(PyObject *self, PyObject *args)
{
  sqlite3_stmt * x0;
  int x1;
  void const * x2;
  int x3;
  void(* x4)(void *);
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

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

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

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

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

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

  x4 = (void(*)(void *))_cffi_to_c_pointer(arg4, _cffi_type(68));
  if (x4 == (void(*)(void *))NULL && PyErr_Occurred())
    return NULL;

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

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

static int _cffi_d_sqlite3_bind_value(sqlite3_stmt * x0, int x1, sqlite3_value const * x2)
{
  return sqlite3_bind_value(x0, x1, x2);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_bind_value(PyObject *self, PyObject *args)
{
  sqlite3_stmt * x0;
  int x1;
  sqlite3_value const * x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

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

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

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

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

static int _cffi_d_sqlite3_bind_zeroblob(sqlite3_stmt * x0, int x1, int x2)
{
  return sqlite3_bind_zeroblob(x0, x1, x2);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_bind_zeroblob(PyObject *self, PyObject *args)
{
  sqlite3_stmt * x0;
  int x1;
  int x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

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

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

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

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

static int _cffi_d_sqlite3_busy_timeout(sqlite3 * x0, int x1)
{
  return sqlite3_busy_timeout(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_busy_timeout(PyObject *self, PyObject *args)
{
  sqlite3 * x0;
  int x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

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

static int _cffi_d_sqlite3_changes(sqlite3 * x0)
{
  return sqlite3_changes(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_changes(PyObject *self, PyObject *arg0)
{
  sqlite3 * x0;
  Py_ssize_t datasize;
  int result;

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

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

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

static int _cffi_d_sqlite3_close(sqlite3 * x0)
{
  return sqlite3_close(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_close(PyObject *self, PyObject *arg0)
{
  sqlite3 * x0;
  Py_ssize_t datasize;
  int result;

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

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

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

static void const * _cffi_d_sqlite3_column_blob(sqlite3_stmt * x0, int x1)
{
  return sqlite3_column_blob(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_column_blob(PyObject *self, PyObject *args)
{
  sqlite3_stmt * x0;
  int x1;
  Py_ssize_t datasize;
  void const * result;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_pointer((char *)result, _cffi_type(93));
}
#else
#  define _cffi_f_sqlite3_column_blob _cffi_d_sqlite3_column_blob
#endif

static int _cffi_d_sqlite3_column_bytes(sqlite3_stmt * x0, int x1)
{
  return sqlite3_column_bytes(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_column_bytes(PyObject *self, PyObject *args)
{
  sqlite3_stmt * x0;
  int x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

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

static int _cffi_d_sqlite3_column_count(sqlite3_stmt * x0)
{
  return sqlite3_column_count(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_column_count(PyObject *self, PyObject *arg0)
{
  sqlite3_stmt * x0;
  Py_ssize_t datasize;
  int result;

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

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

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

static char const * _cffi_d_sqlite3_column_decltype(sqlite3_stmt * x0, int x1)
{
  return sqlite3_column_decltype(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_column_decltype(PyObject *self, PyObject *args)
{
  sqlite3_stmt * x0;
  int x1;
  Py_ssize_t datasize;
  char const * result;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

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

static double _cffi_d_sqlite3_column_double(sqlite3_stmt * x0, int x1)
{
  return sqlite3_column_double(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_column_double(PyObject *self, PyObject *args)
{
  sqlite3_stmt * x0;
  int x1;
  Py_ssize_t datasize;
  double result;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_double(result);
}
#else
#  define _cffi_f_sqlite3_column_double _cffi_d_sqlite3_column_double
#endif

static int _cffi_d_sqlite3_column_int(sqlite3_stmt * x0, int x1)
{
  return sqlite3_column_int(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_column_int(PyObject *self, PyObject *args)
{
  sqlite3_stmt * x0;
  int x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

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

static int64_t _cffi_d_sqlite3_column_int64(sqlite3_stmt * x0, int x1)
{
  return sqlite3_column_int64(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_column_int64(PyObject *self, PyObject *args)
{
  sqlite3_stmt * x0;
  int x1;
  Py_ssize_t datasize;
  int64_t result;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, int64_t);
}
#else
#  define _cffi_f_sqlite3_column_int64 _cffi_d_sqlite3_column_int64
#endif

static char const * _cffi_d_sqlite3_column_name(sqlite3_stmt * x0, int x1)
{
  return sqlite3_column_name(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_column_name(PyObject *self, PyObject *args)
{
  sqlite3_stmt * x0;
  int x1;
  Py_ssize_t datasize;
  char const * result;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

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

static unsigned char const * _cffi_d_sqlite3_column_text(sqlite3_stmt * x0, int x1)
{
  return sqlite3_column_text(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_column_text(PyObject *self, PyObject *args)
{
  sqlite3_stmt * x0;
  int x1;
  Py_ssize_t datasize;
  unsigned char const * result;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_pointer((char *)result, _cffi_type(216));
}
#else
#  define _cffi_f_sqlite3_column_text _cffi_d_sqlite3_column_text
#endif

static void const * _cffi_d_sqlite3_column_text16(sqlite3_stmt * x0, int x1)
{
  return sqlite3_column_text16(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_column_text16(PyObject *self, PyObject *args)
{
  sqlite3_stmt * x0;
  int x1;
  Py_ssize_t datasize;
  void const * result;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

  (void)self; /* unused */
  return _cffi_from_c_pointer((char *)result, _cffi_type(93));
}
#else
#  define _cffi_f_sqlite3_column_text16 _cffi_d_sqlite3_column_text16
#endif

static int _cffi_d_sqlite3_column_type(sqlite3_stmt * x0, int x1)
{
  return sqlite3_column_type(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_column_type(PyObject *self, PyObject *args)
{
  sqlite3_stmt * x0;
  int x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

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

static int _cffi_d_sqlite3_create_collation(sqlite3 * x0, char const * x1, int x2, void * x3, int(* x4)(void *, int, void const *, int, void const *))
{
  return sqlite3_create_collation(x0, x1, x2, x3, x4);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_create_collation(PyObject *self, PyObject *args)
{
  sqlite3 * x0;
  char const * x1;
  int x2;
  void * x3;
  int(* x4)(void *, int, void const *, int, void const *);
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

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

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

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

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

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

  x4 = (int(*)(void *, int, void const *, int, void const *))_cffi_to_c_pointer(arg4, _cffi_type(45));
  if (x4 == (int(*)(void *, int, void const *, int, void const *))NULL && PyErr_Occurred())
    return NULL;

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

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

static int _cffi_d_sqlite3_create_function(sqlite3 * x0, char const * x1, int x2, int x3, void * x4, void(* x5)(sqlite3_context *, int, sqlite3_value * *), void(* x6)(sqlite3_context *, int, sqlite3_value * *), void(* x7)(sqlite3_context *))
{
  return sqlite3_create_function(x0, x1, x2, x3, x4, x5, x6, x7);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_create_function(PyObject *self, PyObject *args)
{
  sqlite3 * x0;
  char const * x1;
  int x2;
  int x3;
  void * x4;
  void(* x5)(sqlite3_context *, int, sqlite3_value * *);
  void(* x6)(sqlite3_context *, int, sqlite3_value * *);
  void(* x7)(sqlite3_context *);
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;
  PyObject *arg5;
  PyObject *arg6;
  PyObject *arg7;

  if (!PyArg_UnpackTuple(args, "sqlite3_create_function", 8, 8, &arg0, &arg1, &arg2, &arg3, &arg4, &arg5, &arg6, &arg7))
    return NULL;

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

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

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

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

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

  x5 = (void(*)(sqlite3_context *, int, sqlite3_value * *))_cffi_to_c_pointer(arg5, _cffi_type(29));
  if (x5 == (void(*)(sqlite3_context *, int, sqlite3_value * *))NULL && PyErr_Occurred())
    return NULL;

  x6 = (void(*)(sqlite3_context *, int, sqlite3_value * *))_cffi_to_c_pointer(arg6, _cffi_type(29));
  if (x6 == (void(*)(sqlite3_context *, int, sqlite3_value * *))NULL && PyErr_Occurred())
    return NULL;

  x7 = (void(*)(sqlite3_context *))_cffi_to_c_pointer(arg7, _cffi_type(31));
  if (x7 == (void(*)(sqlite3_context *))NULL && PyErr_Occurred())
    return NULL;

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

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

static int _cffi_d_sqlite3_data_count(sqlite3_stmt * x0)
{
  return sqlite3_data_count(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_data_count(PyObject *self, PyObject *arg0)
{
  sqlite3_stmt * x0;
  Py_ssize_t datasize;
  int result;

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

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

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

static int _cffi_d_sqlite3_enable_load_extension(sqlite3 * x0, int x1)
{
  return sqlite3_enable_load_extension(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_enable_load_extension(PyObject *self, PyObject *args)
{
  sqlite3 * x0;
  int x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

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

static int _cffi_d_sqlite3_errcode(sqlite3 * x0)
{
  return sqlite3_errcode(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_errcode(PyObject *self, PyObject *arg0)
{
  sqlite3 * x0;
  Py_ssize_t datasize;
  int result;

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

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

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

static char const * _cffi_d_sqlite3_errmsg(sqlite3 * x0)
{
  return sqlite3_errmsg(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_errmsg(PyObject *self, PyObject *arg0)
{
  sqlite3 * x0;
  Py_ssize_t datasize;
  char const * result;

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

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

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

static int _cffi_d_sqlite3_finalize(sqlite3_stmt * x0)
{
  return sqlite3_finalize(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_finalize(PyObject *self, PyObject *arg0)
{
  sqlite3_stmt * x0;
  Py_ssize_t datasize;
  int result;

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

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

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

static int _cffi_d_sqlite3_get_autocommit(sqlite3 * x0)
{
  return sqlite3_get_autocommit(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_get_autocommit(PyObject *self, PyObject *arg0)
{
  sqlite3 * x0;
  Py_ssize_t datasize;
  int result;

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

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

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

static int64_t _cffi_d_sqlite3_last_insert_rowid(sqlite3 * x0)
{
  return sqlite3_last_insert_rowid(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_last_insert_rowid(PyObject *self, PyObject *arg0)
{
  sqlite3 * x0;
  Py_ssize_t datasize;
  int64_t result;

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, int64_t);
}
#else
#  define _cffi_f_sqlite3_last_insert_rowid _cffi_d_sqlite3_last_insert_rowid
#endif

static char const * _cffi_d_sqlite3_libversion(void)
{
  return sqlite3_libversion();
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_libversion(PyObject *self, PyObject *noarg)
{
  char const * result;

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

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

static int _cffi_d_sqlite3_open(char const * x0, sqlite3 * * x1)
{
  return sqlite3_open(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_open(PyObject *self, PyObject *args)
{
  char const * x0;
  sqlite3 * * x1;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

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

static int _cffi_d_sqlite3_prepare(sqlite3 * x0, char const * x1, int x2, sqlite3_stmt * * x3, char const * * x4)
{
  return sqlite3_prepare(x0, x1, x2, x3, x4);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_prepare(PyObject *self, PyObject *args)
{
  sqlite3 * x0;
  char const * x1;
  int x2;
  sqlite3_stmt * * x3;
  char const * * x4;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

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

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

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

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

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

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

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

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

static int _cffi_d_sqlite3_prepare_v2(sqlite3 * x0, char const * x1, int x2, sqlite3_stmt * * x3, char const * * x4)
{
  return sqlite3_prepare_v2(x0, x1, x2, x3, x4);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_prepare_v2(PyObject *self, PyObject *args)
{
  sqlite3 * x0;
  char const * x1;
  int x2;
  sqlite3_stmt * * x3;
  char const * * x4;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;

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

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

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

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

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

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

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

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

static void _cffi_d_sqlite3_progress_handler(sqlite3 * x0, int x1, int(* x2)(void *), void * x3)
{
  sqlite3_progress_handler(x0, x1, x2, x3);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_progress_handler(PyObject *self, PyObject *args)
{
  sqlite3 * x0;
  int x1;
  int(* x2)(void *);
  void * x3;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

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

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

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

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

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

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

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

static int _cffi_d_sqlite3_reset(sqlite3_stmt * x0)
{
  return sqlite3_reset(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_reset(PyObject *self, PyObject *arg0)
{
  sqlite3_stmt * x0;
  Py_ssize_t datasize;
  int result;

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

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

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

static void _cffi_d_sqlite3_result_blob(sqlite3_context * x0, void const * x1, int x2, void(* x3)(void *))
{
  sqlite3_result_blob(x0, x1, x2, x3);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_result_blob(PyObject *self, PyObject *args)
{
  sqlite3_context * x0;
  void const * x1;
  int x2;
  void(* x3)(void *);
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

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

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

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

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

  x3 = (void(*)(void *))_cffi_to_c_pointer(arg3, _cffi_type(68));
  if (x3 == (void(*)(void *))NULL && PyErr_Occurred())
    return NULL;

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

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

static void _cffi_d_sqlite3_result_double(sqlite3_context * x0, double x1)
{
  sqlite3_result_double(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_result_double(PyObject *self, PyObject *args)
{
  sqlite3_context * x0;
  double x1;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;

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

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

  x1 = (double)_cffi_to_c_double(arg1);
  if (x1 == (double)-1 && PyErr_Occurred())
    return NULL;

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

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

static void _cffi_d_sqlite3_result_error(sqlite3_context * x0, char const * x1, int x2)
{
  sqlite3_result_error(x0, x1, x2);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_result_error(PyObject *self, PyObject *args)
{
  sqlite3_context * x0;
  char const * x1;
  int x2;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

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

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

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

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

static void _cffi_d_sqlite3_result_error16(sqlite3_context * x0, void const * x1, int x2)
{
  sqlite3_result_error16(x0, x1, x2);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_result_error16(PyObject *self, PyObject *args)
{
  sqlite3_context * x0;
  void const * x1;
  int x2;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

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

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

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

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

static void _cffi_d_sqlite3_result_error_code(sqlite3_context * x0, int x1)
{
  sqlite3_result_error_code(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_result_error_code(PyObject *self, PyObject *args)
{
  sqlite3_context * x0;
  int x1;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

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

static void _cffi_d_sqlite3_result_error_nomem(sqlite3_context * x0)
{
  sqlite3_result_error_nomem(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_result_error_nomem(PyObject *self, PyObject *arg0)
{
  sqlite3_context * x0;
  Py_ssize_t datasize;

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

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

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

static void _cffi_d_sqlite3_result_error_toobig(sqlite3_context * x0)
{
  sqlite3_result_error_toobig(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_result_error_toobig(PyObject *self, PyObject *arg0)
{
  sqlite3_context * x0;
  Py_ssize_t datasize;

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

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

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

static void _cffi_d_sqlite3_result_int(sqlite3_context * x0, int x1)
{
  sqlite3_result_int(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_result_int(PyObject *self, PyObject *args)
{
  sqlite3_context * x0;
  int x1;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

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

static void _cffi_d_sqlite3_result_int64(sqlite3_context * x0, int64_t x1)
{
  sqlite3_result_int64(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_result_int64(PyObject *self, PyObject *args)
{
  sqlite3_context * x0;
  int64_t x1;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

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

static void _cffi_d_sqlite3_result_null(sqlite3_context * x0)
{
  sqlite3_result_null(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_result_null(PyObject *self, PyObject *arg0)
{
  sqlite3_context * x0;
  Py_ssize_t datasize;

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

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

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

static void _cffi_d_sqlite3_result_text(sqlite3_context * x0, char const * x1, int x2, void(* x3)(void *))
{
  sqlite3_result_text(x0, x1, x2, x3);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_result_text(PyObject *self, PyObject *args)
{
  sqlite3_context * x0;
  char const * x1;
  int x2;
  void(* x3)(void *);
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

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

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

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

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

  x3 = (void(*)(void *))_cffi_to_c_pointer(arg3, _cffi_type(68));
  if (x3 == (void(*)(void *))NULL && PyErr_Occurred())
    return NULL;

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

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

static void _cffi_d_sqlite3_result_text16(sqlite3_context * x0, void const * x1, int x2, void(* x3)(void *))
{
  sqlite3_result_text16(x0, x1, x2, x3);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_result_text16(PyObject *self, PyObject *args)
{
  sqlite3_context * x0;
  void const * x1;
  int x2;
  void(* x3)(void *);
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

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

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

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

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

  x3 = (void(*)(void *))_cffi_to_c_pointer(arg3, _cffi_type(68));
  if (x3 == (void(*)(void *))NULL && PyErr_Occurred())
    return NULL;

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

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

static void _cffi_d_sqlite3_result_text16be(sqlite3_context * x0, void const * x1, int x2, void(* x3)(void *))
{
  sqlite3_result_text16be(x0, x1, x2, x3);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_result_text16be(PyObject *self, PyObject *args)
{
  sqlite3_context * x0;
  void const * x1;
  int x2;
  void(* x3)(void *);
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

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

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

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

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

  x3 = (void(*)(void *))_cffi_to_c_pointer(arg3, _cffi_type(68));
  if (x3 == (void(*)(void *))NULL && PyErr_Occurred())
    return NULL;

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

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

static void _cffi_d_sqlite3_result_text16le(sqlite3_context * x0, void const * x1, int x2, void(* x3)(void *))
{
  sqlite3_result_text16le(x0, x1, x2, x3);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_result_text16le(PyObject *self, PyObject *args)
{
  sqlite3_context * x0;
  void const * x1;
  int x2;
  void(* x3)(void *);
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;

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

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

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

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

  x3 = (void(*)(void *))_cffi_to_c_pointer(arg3, _cffi_type(68));
  if (x3 == (void(*)(void *))NULL && PyErr_Occurred())
    return NULL;

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

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

static void _cffi_d_sqlite3_result_value(sqlite3_context * x0, sqlite3_value * x1)
{
  sqlite3_result_value(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_result_value(PyObject *self, PyObject *args)
{
  sqlite3_context * x0;
  sqlite3_value * x1;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

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

static void _cffi_d_sqlite3_result_zeroblob(sqlite3_context * x0, int x1)
{
  sqlite3_result_zeroblob(x0, x1);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_result_zeroblob(PyObject *self, PyObject *args)
{
  sqlite3_context * x0;
  int x1;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;

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

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

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

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

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

static int _cffi_d_sqlite3_set_authorizer(sqlite3 * x0, int(* x1)(void *, int, char const *, char const *, char const *, char const *), void * x2)
{
  return sqlite3_set_authorizer(x0, x1, x2);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_set_authorizer(PyObject *self, PyObject *args)
{
  sqlite3 * x0;
  int(* x1)(void *, int, char const *, char const *, char const *, char const *);
  void * x2;
  Py_ssize_t datasize;
  int result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

  x1 = (int(*)(void *, int, char const *, char const *, char const *, char const *))_cffi_to_c_pointer(arg1, _cffi_type(49));
  if (x1 == (int(*)(void *, int, char const *, char const *, char const *, char const *))NULL && PyErr_Occurred())
    return NULL;

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

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

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

static int _cffi_d_sqlite3_step(sqlite3_stmt * x0)
{
  return sqlite3_step(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_step(PyObject *self, PyObject *arg0)
{
  sqlite3_stmt * x0;
  Py_ssize_t datasize;
  int result;

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

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

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

static int _cffi_d_sqlite3_total_changes(sqlite3 * x0)
{
  return sqlite3_total_changes(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_total_changes(PyObject *self, PyObject *arg0)
{
  sqlite3 * x0;
  Py_ssize_t datasize;
  int result;

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

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

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

static void _cffi_d_sqlite3_trace(sqlite3 * x0, void(* x1)(void *, char const *), void * x2)
{
  sqlite3_trace(x0, x1, x2);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_trace(PyObject *self, PyObject *args)
{
  sqlite3 * x0;
  void(* x1)(void *, char const *);
  void * x2;
  Py_ssize_t datasize;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;

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

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

  x1 = (void(*)(void *, char const *))_cffi_to_c_pointer(arg1, _cffi_type(154));
  if (x1 == (void(*)(void *, char const *))NULL && PyErr_Occurred())
    return NULL;

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

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

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

static void const * _cffi_d_sqlite3_value_blob(sqlite3_value * x0)
{
  return sqlite3_value_blob(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_value_blob(PyObject *self, PyObject *arg0)
{
  sqlite3_value * x0;
  Py_ssize_t datasize;
  void const * result;

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

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

  (void)self; /* unused */
  return _cffi_from_c_pointer((char *)result, _cffi_type(93));
}
#else
#  define _cffi_f_sqlite3_value_blob _cffi_d_sqlite3_value_blob
#endif

static int _cffi_d_sqlite3_value_bytes(sqlite3_value * x0)
{
  return sqlite3_value_bytes(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_value_bytes(PyObject *self, PyObject *arg0)
{
  sqlite3_value * x0;
  Py_ssize_t datasize;
  int result;

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

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

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

static int _cffi_d_sqlite3_value_bytes16(sqlite3_value * x0)
{
  return sqlite3_value_bytes16(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_value_bytes16(PyObject *self, PyObject *arg0)
{
  sqlite3_value * x0;
  Py_ssize_t datasize;
  int result;

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

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

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

static double _cffi_d_sqlite3_value_double(sqlite3_value * x0)
{
  return sqlite3_value_double(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_value_double(PyObject *self, PyObject *arg0)
{
  sqlite3_value * x0;
  Py_ssize_t datasize;
  double result;

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

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

  (void)self; /* unused */
  return _cffi_from_c_double(result);
}
#else
#  define _cffi_f_sqlite3_value_double _cffi_d_sqlite3_value_double
#endif

static int _cffi_d_sqlite3_value_int(sqlite3_value * x0)
{
  return sqlite3_value_int(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_value_int(PyObject *self, PyObject *arg0)
{
  sqlite3_value * x0;
  Py_ssize_t datasize;
  int result;

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

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

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

static int64_t _cffi_d_sqlite3_value_int64(sqlite3_value * x0)
{
  return sqlite3_value_int64(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_value_int64(PyObject *self, PyObject *arg0)
{
  sqlite3_value * x0;
  Py_ssize_t datasize;
  int64_t result;

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

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

  (void)self; /* unused */
  return _cffi_from_c_int(result, int64_t);
}
#else
#  define _cffi_f_sqlite3_value_int64 _cffi_d_sqlite3_value_int64
#endif

static int _cffi_d_sqlite3_value_numeric_type(sqlite3_value * x0)
{
  return sqlite3_value_numeric_type(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_value_numeric_type(PyObject *self, PyObject *arg0)
{
  sqlite3_value * x0;
  Py_ssize_t datasize;
  int result;

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

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

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

static unsigned char const * _cffi_d_sqlite3_value_text(sqlite3_value * x0)
{
  return sqlite3_value_text(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_value_text(PyObject *self, PyObject *arg0)
{
  sqlite3_value * x0;
  Py_ssize_t datasize;
  unsigned char const * result;

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

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

  (void)self; /* unused */
  return _cffi_from_c_pointer((char *)result, _cffi_type(216));
}
#else
#  define _cffi_f_sqlite3_value_text _cffi_d_sqlite3_value_text
#endif

static void const * _cffi_d_sqlite3_value_text16(sqlite3_value * x0)
{
  return sqlite3_value_text16(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_value_text16(PyObject *self, PyObject *arg0)
{
  sqlite3_value * x0;
  Py_ssize_t datasize;
  void const * result;

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

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

  (void)self; /* unused */
  return _cffi_from_c_pointer((char *)result, _cffi_type(93));
}
#else
#  define _cffi_f_sqlite3_value_text16 _cffi_d_sqlite3_value_text16
#endif

static void const * _cffi_d_sqlite3_value_text16be(sqlite3_value * x0)
{
  return sqlite3_value_text16be(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_value_text16be(PyObject *self, PyObject *arg0)
{
  sqlite3_value * x0;
  Py_ssize_t datasize;
  void const * result;

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

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

  (void)self; /* unused */
  return _cffi_from_c_pointer((char *)result, _cffi_type(93));
}
#else
#  define _cffi_f_sqlite3_value_text16be _cffi_d_sqlite3_value_text16be
#endif

static void const * _cffi_d_sqlite3_value_text16le(sqlite3_value * x0)
{
  return sqlite3_value_text16le(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_value_text16le(PyObject *self, PyObject *arg0)
{
  sqlite3_value * x0;
  Py_ssize_t datasize;
  void const * result;

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

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

  (void)self; /* unused */
  return _cffi_from_c_pointer((char *)result, _cffi_type(93));
}
#else
#  define _cffi_f_sqlite3_value_text16le _cffi_d_sqlite3_value_text16le
#endif

static int _cffi_d_sqlite3_value_type(sqlite3_value * x0)
{
  return sqlite3_value_type(x0);
}
#ifndef PYPY_VERSION
static PyObject *
_cffi_f_sqlite3_value_type(PyObject *self, PyObject *arg0)
{
  sqlite3_value * x0;
  Py_ssize_t datasize;
  int result;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

static const struct _cffi_global_s _cffi_globals[] = {
  { "SQLITE3_TEXT", (void *)_cffi_const_SQLITE3_TEXT, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_ABORT", (void *)_cffi_const_SQLITE_ABORT, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_ALTER_TABLE", (void *)_cffi_const_SQLITE_ALTER_TABLE, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_ANALYZE", (void *)_cffi_const_SQLITE_ANALYZE, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_ATTACH", (void *)_cffi_const_SQLITE_ATTACH, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_AUTH", (void *)_cffi_const_SQLITE_AUTH, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_BLOB", (void *)_cffi_const_SQLITE_BLOB, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_BUSY", (void *)_cffi_const_SQLITE_BUSY, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_CANTOPEN", (void *)_cffi_const_SQLITE_CANTOPEN, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_CONSTRAINT", (void *)_cffi_const_SQLITE_CONSTRAINT, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_CORRUPT", (void *)_cffi_const_SQLITE_CORRUPT, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_CREATE_INDEX", (void *)_cffi_const_SQLITE_CREATE_INDEX, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_CREATE_TABLE", (void *)_cffi_const_SQLITE_CREATE_TABLE, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_CREATE_TEMP_INDEX", (void *)_cffi_const_SQLITE_CREATE_TEMP_INDEX, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_CREATE_TEMP_TABLE", (void *)_cffi_const_SQLITE_CREATE_TEMP_TABLE, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_CREATE_TEMP_TRIGGER", (void *)_cffi_const_SQLITE_CREATE_TEMP_TRIGGER, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_CREATE_TEMP_VIEW", (void *)_cffi_const_SQLITE_CREATE_TEMP_VIEW, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_CREATE_TRIGGER", (void *)_cffi_const_SQLITE_CREATE_TRIGGER, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_CREATE_VIEW", (void *)_cffi_const_SQLITE_CREATE_VIEW, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_CREATE_VTABLE", (void *)_cffi_const_SQLITE_CREATE_VTABLE, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_DELETE", (void *)_cffi_const_SQLITE_DELETE, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_DENY", (void *)_cffi_const_SQLITE_DENY, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_DETACH", (void *)_cffi_const_SQLITE_DETACH, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_DONE", (void *)_cffi_const_SQLITE_DONE, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_DROP_INDEX", (void *)_cffi_const_SQLITE_DROP_INDEX, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_DROP_TABLE", (void *)_cffi_const_SQLITE_DROP_TABLE, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_DROP_TEMP_INDEX", (void *)_cffi_const_SQLITE_DROP_TEMP_INDEX, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_DROP_TEMP_TABLE", (void *)_cffi_const_SQLITE_DROP_TEMP_TABLE, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_DROP_TEMP_TRIGGER", (void *)_cffi_const_SQLITE_DROP_TEMP_TRIGGER, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_DROP_TEMP_VIEW", (void *)_cffi_const_SQLITE_DROP_TEMP_VIEW, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_DROP_TRIGGER", (void *)_cffi_const_SQLITE_DROP_TRIGGER, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_DROP_VIEW", (void *)_cffi_const_SQLITE_DROP_VIEW, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_DROP_VTABLE", (void *)_cffi_const_SQLITE_DROP_VTABLE, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_EMPTY", (void *)_cffi_const_SQLITE_EMPTY, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_ERROR", (void *)_cffi_const_SQLITE_ERROR, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_FLOAT", (void *)_cffi_const_SQLITE_FLOAT, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_FORMAT", (void *)_cffi_const_SQLITE_FORMAT, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_FULL", (void *)_cffi_const_SQLITE_FULL, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_FUNCTION", (void *)_cffi_const_SQLITE_FUNCTION, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_IGNORE", (void *)_cffi_const_SQLITE_IGNORE, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_INSERT", (void *)_cffi_const_SQLITE_INSERT, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_INTEGER", (void *)_cffi_const_SQLITE_INTEGER, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_INTERNAL", (void *)_cffi_const_SQLITE_INTERNAL, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_INTERRUPT", (void *)_cffi_const_SQLITE_INTERRUPT, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_IOERR", (void *)_cffi_const_SQLITE_IOERR, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_LOCKED", (void *)_cffi_const_SQLITE_LOCKED, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_MISMATCH", (void *)_cffi_const_SQLITE_MISMATCH, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_MISUSE", (void *)_cffi_const_SQLITE_MISUSE, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_NOLFS", (void *)_cffi_const_SQLITE_NOLFS, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_NOMEM", (void *)_cffi_const_SQLITE_NOMEM, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_NOTADB", (void *)_cffi_const_SQLITE_NOTADB, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_NOTFOUND", (void *)_cffi_const_SQLITE_NOTFOUND, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_NULL", (void *)_cffi_const_SQLITE_NULL, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_OK", (void *)_cffi_const_SQLITE_OK, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_PERM", (void *)_cffi_const_SQLITE_PERM, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_PRAGMA", (void *)_cffi_const_SQLITE_PRAGMA, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_PROTOCOL", (void *)_cffi_const_SQLITE_PROTOCOL, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_RANGE", (void *)_cffi_const_SQLITE_RANGE, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_READ", (void *)_cffi_const_SQLITE_READ, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_READONLY", (void *)_cffi_const_SQLITE_READONLY, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_REINDEX", (void *)_cffi_const_SQLITE_REINDEX, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_ROW", (void *)_cffi_const_SQLITE_ROW, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_SCHEMA", (void *)_cffi_const_SQLITE_SCHEMA, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_SELECT", (void *)_cffi_const_SQLITE_SELECT, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_TEXT", (void *)_cffi_const_SQLITE_TEXT, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_TOOBIG", (void *)_cffi_const_SQLITE_TOOBIG, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_TRANSACTION", (void *)_cffi_const_SQLITE_TRANSACTION, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_TRANSIENT", (void *)_cffi_const_SQLITE_TRANSIENT, _CFFI_OP(_CFFI_OP_CONSTANT, 28), (void *)0 },
  { "SQLITE_UPDATE", (void *)_cffi_const_SQLITE_UPDATE, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "SQLITE_UTF8", (void *)_cffi_const_SQLITE_UTF8, _CFFI_OP(_CFFI_OP_CONSTANT_INT, -1), (void *)0 },
  { "sqlite3_aggregate_context", (void *)_cffi_f_sqlite3_aggregate_context, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 135), (void *)_cffi_d_sqlite3_aggregate_context },
  { "sqlite3_bind_blob", (void *)_cffi_f_sqlite3_bind_blob, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 90), (void *)_cffi_d_sqlite3_bind_blob },
  { "sqlite3_bind_double", (void *)_cffi_f_sqlite3_bind_double, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 70), (void *)_cffi_d_sqlite3_bind_double },
  { "sqlite3_bind_int", (void *)_cffi_f_sqlite3_bind_int, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 75), (void *)_cffi_d_sqlite3_bind_int },
  { "sqlite3_bind_int64", (void *)_cffi_f_sqlite3_bind_int64, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 80), (void *)_cffi_d_sqlite3_bind_int64 },
  { "sqlite3_bind_null", (void *)_cffi_f_sqlite3_bind_null, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 59), (void *)_cffi_d_sqlite3_bind_null },
  { "sqlite3_bind_parameter_count", (void *)_cffi_f_sqlite3_bind_parameter_count, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 56), (void *)_cffi_d_sqlite3_bind_parameter_count },
  { "sqlite3_bind_parameter_name", (void *)_cffi_f_sqlite3_bind_parameter_name, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 3), (void *)_cffi_d_sqlite3_bind_parameter_name },
  { "sqlite3_bind_text", (void *)_cffi_f_sqlite3_bind_text, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 63), (void *)_cffi_d_sqlite3_bind_text },
  { "sqlite3_bind_text16", (void *)_cffi_f_sqlite3_bind_text16, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 90), (void *)_cffi_d_sqlite3_bind_text16 },
  { "sqlite3_bind_value", (void *)_cffi_f_sqlite3_bind_value, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 85), (void *)_cffi_d_sqlite3_bind_value },
  { "sqlite3_bind_zeroblob", (void *)_cffi_f_sqlite3_bind_zeroblob, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 75), (void *)_cffi_d_sqlite3_bind_zeroblob },
  { "sqlite3_busy_timeout", (void *)_cffi_f_sqlite3_busy_timeout, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 52), (void *)_cffi_d_sqlite3_busy_timeout },
  { "sqlite3_changes", (void *)_cffi_f_sqlite3_changes, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 20), (void *)_cffi_d_sqlite3_changes },
  { "sqlite3_close", (void *)_cffi_f_sqlite3_close, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 20), (void *)_cffi_d_sqlite3_close },
  { "sqlite3_column_blob", (void *)_cffi_f_sqlite3_column_blob, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 139), (void *)_cffi_d_sqlite3_column_blob },
  { "sqlite3_column_bytes", (void *)_cffi_f_sqlite3_column_bytes, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 59), (void *)_cffi_d_sqlite3_column_bytes },
  { "sqlite3_column_count", (void *)_cffi_f_sqlite3_column_count, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 56), (void *)_cffi_d_sqlite3_column_count },
  { "sqlite3_column_decltype", (void *)_cffi_f_sqlite3_column_decltype, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 3), (void *)_cffi_d_sqlite3_column_decltype },
  { "sqlite3_column_double", (void *)_cffi_f_sqlite3_column_double, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 9), (void *)_cffi_d_sqlite3_column_double },
  { "sqlite3_column_int", (void *)_cffi_f_sqlite3_column_int, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 59), (void *)_cffi_d_sqlite3_column_int },
  { "sqlite3_column_int64", (void *)_cffi_f_sqlite3_column_int64, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 121), (void *)_cffi_d_sqlite3_column_int64 },
  { "sqlite3_column_name", (void *)_cffi_f_sqlite3_column_name, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 3), (void *)_cffi_d_sqlite3_column_name },
  { "sqlite3_column_text", (void *)_cffi_f_sqlite3_column_text, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 128), (void *)_cffi_d_sqlite3_column_text },
  { "sqlite3_column_text16", (void *)_cffi_f_sqlite3_column_text16, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 139), (void *)_cffi_d_sqlite3_column_text16 },
  { "sqlite3_column_type", (void *)_cffi_f_sqlite3_column_type, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 59), (void *)_cffi_d_sqlite3_column_type },
  { "sqlite3_create_collation", (void *)_cffi_f_sqlite3_create_collation, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 40), (void *)_cffi_d_sqlite3_create_collation },
  { "sqlite3_create_function", (void *)_cffi_f_sqlite3_create_function, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 23), (void *)_cffi_d_sqlite3_create_function },
  { "sqlite3_data_count", (void *)_cffi_f_sqlite3_data_count, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 56), (void *)_cffi_d_sqlite3_data_count },
  { "sqlite3_enable_load_extension", (void *)_cffi_f_sqlite3_enable_load_extension, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 52), (void *)_cffi_d_sqlite3_enable_load_extension },
  { "sqlite3_errcode", (void *)_cffi_f_sqlite3_errcode, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 20), (void *)_cffi_d_sqlite3_errcode },
  { "sqlite3_errmsg", (void *)_cffi_f_sqlite3_errmsg, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 0), (void *)_cffi_d_sqlite3_errmsg },
  { "sqlite3_finalize", (void *)_cffi_f_sqlite3_finalize, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 56), (void *)_cffi_d_sqlite3_finalize },
  { "sqlite3_get_autocommit", (void *)_cffi_f_sqlite3_get_autocommit, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 20), (void *)_cffi_d_sqlite3_get_autocommit },
  { "sqlite3_last_insert_rowid", (void *)_cffi_f_sqlite3_last_insert_rowid, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 118), (void *)_cffi_d_sqlite3_last_insert_rowid },
  { "sqlite3_libversion", (void *)_cffi_f_sqlite3_libversion, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_N, 7), (void *)_cffi_d_sqlite3_libversion },
  { "sqlite3_open", (void *)_cffi_f_sqlite3_open, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 16), (void *)_cffi_d_sqlite3_open },
  { "sqlite3_prepare", (void *)_cffi_f_sqlite3_prepare, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 33), (void *)_cffi_d_sqlite3_prepare },
  { "sqlite3_prepare_v2", (void *)_cffi_f_sqlite3_prepare_v2, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 33), (void *)_cffi_d_sqlite3_prepare_v2 },
  { "sqlite3_progress_handler", (void *)_cffi_f_sqlite3_progress_handler, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 146), (void *)_cffi_d_sqlite3_progress_handler },
  { "sqlite3_reset", (void *)_cffi_f_sqlite3_reset, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 56), (void *)_cffi_d_sqlite3_reset },
  { "sqlite3_result_blob", (void *)_cffi_f_sqlite3_result_blob, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 197), (void *)_cffi_d_sqlite3_result_blob },
  { "sqlite3_result_double", (void *)_cffi_f_sqlite3_result_double, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 171), (void *)_cffi_d_sqlite3_result_double },
  { "sqlite3_result_error", (void *)_cffi_f_sqlite3_result_error, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 160), (void *)_cffi_d_sqlite3_result_error },
  { "sqlite3_result_error16", (void *)_cffi_f_sqlite3_result_error16, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 192), (void *)_cffi_d_sqlite3_result_error16 },
  { "sqlite3_result_error_code", (void *)_cffi_f_sqlite3_result_error_code, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 175), (void *)_cffi_d_sqlite3_result_error_code },
  { "sqlite3_result_error_nomem", (void *)_cffi_f_sqlite3_result_error_nomem, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 157), (void *)_cffi_d_sqlite3_result_error_nomem },
  { "sqlite3_result_error_toobig", (void *)_cffi_f_sqlite3_result_error_toobig, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 157), (void *)_cffi_d_sqlite3_result_error_toobig },
  { "sqlite3_result_int", (void *)_cffi_f_sqlite3_result_int, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 175), (void *)_cffi_d_sqlite3_result_int },
  { "sqlite3_result_int64", (void *)_cffi_f_sqlite3_result_int64, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 184), (void *)_cffi_d_sqlite3_result_int64 },
  { "sqlite3_result_null", (void *)_cffi_f_sqlite3_result_null, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 157), (void *)_cffi_d_sqlite3_result_null },
  { "sqlite3_result_text", (void *)_cffi_f_sqlite3_result_text, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 165), (void *)_cffi_d_sqlite3_result_text },
  { "sqlite3_result_text16", (void *)_cffi_f_sqlite3_result_text16, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 197), (void *)_cffi_d_sqlite3_result_text16 },
  { "sqlite3_result_text16be", (void *)_cffi_f_sqlite3_result_text16be, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 197), (void *)_cffi_d_sqlite3_result_text16be },
  { "sqlite3_result_text16le", (void *)_cffi_f_sqlite3_result_text16le, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 197), (void *)_cffi_d_sqlite3_result_text16le },
  { "sqlite3_result_value", (void *)_cffi_f_sqlite3_result_value, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 188), (void *)_cffi_d_sqlite3_result_value },
  { "sqlite3_result_zeroblob", (void *)_cffi_f_sqlite3_result_zeroblob, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 175), (void *)_cffi_d_sqlite3_result_zeroblob },
  { "sqlite3_set_authorizer", (void *)_cffi_f_sqlite3_set_authorizer, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 47), (void *)_cffi_d_sqlite3_set_authorizer },
  { "sqlite3_step", (void *)_cffi_f_sqlite3_step, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 56), (void *)_cffi_d_sqlite3_step },
  { "sqlite3_total_changes", (void *)_cffi_f_sqlite3_total_changes, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 20), (void *)_cffi_d_sqlite3_total_changes },
  { "sqlite3_trace", (void *)_cffi_f_sqlite3_trace, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_V, 152), (void *)_cffi_d_sqlite3_trace },
  { "sqlite3_value_blob", (void *)_cffi_f_sqlite3_value_blob, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 143), (void *)_cffi_d_sqlite3_value_blob },
  { "sqlite3_value_bytes", (void *)_cffi_f_sqlite3_value_bytes, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 97), (void *)_cffi_d_sqlite3_value_bytes },
  { "sqlite3_value_bytes16", (void *)_cffi_f_sqlite3_value_bytes16, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 97), (void *)_cffi_d_sqlite3_value_bytes16 },
  { "sqlite3_value_double", (void *)_cffi_f_sqlite3_value_double, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 13), (void *)_cffi_d_sqlite3_value_double },
  { "sqlite3_value_int", (void *)_cffi_f_sqlite3_value_int, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 97), (void *)_cffi_d_sqlite3_value_int },
  { "sqlite3_value_int64", (void *)_cffi_f_sqlite3_value_int64, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 125), (void *)_cffi_d_sqlite3_value_int64 },
  { "sqlite3_value_numeric_type", (void *)_cffi_f_sqlite3_value_numeric_type, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 97), (void *)_cffi_d_sqlite3_value_numeric_type },
  { "sqlite3_value_text", (void *)_cffi_f_sqlite3_value_text, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 132), (void *)_cffi_d_sqlite3_value_text },
  { "sqlite3_value_text16", (void *)_cffi_f_sqlite3_value_text16, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 143), (void *)_cffi_d_sqlite3_value_text16 },
  { "sqlite3_value_text16be", (void *)_cffi_f_sqlite3_value_text16be, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 143), (void *)_cffi_d_sqlite3_value_text16be },
  { "sqlite3_value_text16le", (void *)_cffi_f_sqlite3_value_text16le, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 143), (void *)_cffi_d_sqlite3_value_text16le },
  { "sqlite3_value_type", (void *)_cffi_f_sqlite3_value_type, _CFFI_OP(_CFFI_OP_CPYTHON_BLTN_O, 97), (void *)_cffi_d_sqlite3_value_type },
};

static const struct _cffi_struct_union_s _cffi_struct_unions[] = {
  { "$sqlite3", 211, _CFFI_F_OPAQUE,
    (size_t)-1, -1, -1, 0 /* opaque */ },
  { "$sqlite3_context", 212, _CFFI_F_OPAQUE,
    (size_t)-1, -1, -1, 0 /* opaque */ },
  { "$sqlite3_stmt", 213, _CFFI_F_OPAQUE,
    (size_t)-1, -1, -1, 0 /* opaque */ },
  { "$sqlite3_value", 214, _CFFI_F_OPAQUE,
    (size_t)-1, -1, -1, 0 /* opaque */ },
};

static const struct _cffi_typename_s _cffi_typenames[] = {
  { "sqlite3", 211 },
  { "sqlite3_context", 212 },
  { "sqlite3_int64", 83 },
  { "sqlite3_stmt", 213 },
  { "sqlite3_uint64", 215 },
  { "sqlite3_value", 214 },
};

static const struct _cffi_type_context_s _cffi_type_context = {
  _cffi_types,
  _cffi_globals,
  NULL,  /* no fields */
  _cffi_struct_unions,
  NULL,  /* no enums */
  _cffi_typenames,
  143,  /* num_globals */
  4,  /* num_struct_unions */
  0,  /* num_enums */
  6,  /* num_typenames */
  NULL,  /* no includes */
  219,  /* num_types */
  0,  /* flags */
};

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