/* Compiler: ECL 26.3.27                                                      */
/* Source: /build/ecl/src/ecl-26.3.27/src/lsp/ffi.lsp                         */
#include <ecl/ecl-cmp.h>
#include "lsp/ffi.eclh"
/* local function DEF-CONSTANT                                                */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC661def_constant(cl_object v1, cl_object v2)
{
 cl_object T0, T1, T2;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4name;
  cl_object v5value;
  cl_object v6;
  cl_object v7export;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v8;
   v8 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4name = v8;
  }
  if (!(v3==ECL_NIL)){
   goto L10;
  }
  si_dm_too_few_arguments(v1);
L10:;
  {
   cl_object v8;
   v8 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v5value = v8;
  }
  v6 = si_search_keyword(v3, ECL_SYM("EXPORT",1264));
  if (!((v6)==(ECL_SYM("MISSING-KEYWORD",2044)))){
   goto L17;
  }
  v7export = ECL_NIL;
  goto L16;
L17:;
  v7export = v6;
L16:;
  si_check_keyword(2, v3, VV[3]);
  T0 = cl_list(3, ECL_SYM("DEFCONSTANT",279), v4name, v5value);
  if (Null(v7export)){
   goto L21;
  }
  T2 = cl_list(2, ECL_SYM("QUOTE",682), v4name);
  T1 = cl_list(2, ECL_SYM("EXPORT",346), T2);
  goto L20;
L21:;
  T1 = ECL_NIL;
L20:;
  T2 = cl_list(2, ECL_SYM("QUOTE",682), v4name);
  value0 = cl_list(5, ECL_SYM("EVAL-WHEN",342), VV[4], T0, T1, T2);
  return value0;
 }
}
static cl_object LC661def_constant_va(cl_narg narg, cl_object v8, cl_object v9, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[5]);
 {
  return LC661def_constant(v8, v9);
 }
}
/* local function DEF-FOREIGN-TYPE                                            */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC662def_foreign_type(cl_object v1, cl_object v2)
{
 cl_object T0, T1, T2, T3;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4name;
  cl_object v5definition;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v6;
   v6 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4name = v6;
  }
  if (!(v3==ECL_NIL)){
   goto L10;
  }
  si_dm_too_few_arguments(v1);
L10:;
  {
   cl_object v6;
   v6 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v5definition = v6;
  }
  if (Null(v3)){
   goto L15;
  }
  si_dm_too_many_arguments(v1);
L15:;
  T0 = cl_list(2, ECL_SYM("QUOTE",682), v4name);
  T1 = cl_list(3, ECL_SYM("GETHASH",415), T0, VV[6]);
  T2 = cl_list(2, ECL_SYM("QUOTE",682), v5definition);
  T3 = cl_list(3, ECL_SYM("SETF",753), T1, T2);
  value0 = cl_list(3, ECL_SYM("EVAL-WHEN",342), VV[4], T3);
  return value0;
 }
}
static cl_object LC662def_foreign_type_va(cl_narg narg, cl_object v6, cl_object v7, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[8]);
 {
  return LC662def_foreign_type(v6, v7);
 }
}
/* local function DEF-TYPE                                                    */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC663def_type(cl_object v1, cl_object v2)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4name;
  cl_object v5definition;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v6;
   v6 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4name = v6;
  }
  if (!(v3==ECL_NIL)){
   goto L10;
  }
  si_dm_too_few_arguments(v1);
L10:;
  {
   cl_object v6;
   v6 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v5definition = v6;
  }
  if (Null(v3)){
   goto L15;
  }
  si_dm_too_many_arguments(v1);
L15:;
  value0 = cl_listX(3, ECL_SYM("DEFTYPE",290), v4name, VV[9]);
  return value0;
 }
}
static cl_object LC663def_type_va(cl_narg narg, cl_object v6, cl_object v7, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[10]);
 {
  return LC663def_type(v6, v7);
 }
}
/* function definition for %CONVERT-TO-FFI-TYPE                               */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L664_convert_to_ffi_type(cl_narg narg, cl_object v1type, ...)
{
 cl_object T0, T1, T2, T3;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
 if (ecl_unlikely(narg<1)) FEwrong_num_arguments(VV[11]);
 if (ecl_unlikely(narg>2)) FEwrong_num_arguments(VV[11]);
 {
  cl_object v2context;
  va_list args; va_start(args,v1type);
  {
   int i = 1;
   if (i >= narg) {
    v2context = ECL_NIL;
   } else {
    i++;
    v2context = va_arg(args,cl_object);
   }
  }
  va_end(args);
  if (!(ECL_ATOM(v1type))){
   goto L2;
  }
  {
   cl_object v3;
   cl_object v4;
   v3 = v1type;
   v4 = v2context;
   if (Null(ecl_memql(v3,v4))){
    goto L4;
   }
  }
  value0 = v1type;
  cl_env_copy->nvalues = 1;
  return value0;
L4:;
  {
   cl_object v3;                                  /*  VALUE                   */
   cl_object v4;                                  /*  PRESENT-P               */
   value0 = cl_gethash(3, v1type, ecl_cmp_symbol_value(cl_env_copy,VV[6]), v1type);
   {
    v3 = value0;
    v4 = cl_env_copy->values[1];
   }
   if (Null(v4)){
    goto L9;
   }
   T0 = CONS(v1type,v2context);
   value0 = L664_convert_to_ffi_type(2, v3, T0);
   return value0;
L9:;
   value0 = v3;
   cl_env_copy->nvalues = 1;
   return value0;
  }
L2:;
  T0 = ecl_car(v1type);
  T1 = L664_convert_to_ffi_type(2, T0, v2context);
  T2 = ecl_cdr(v1type);
  T3 = L664_convert_to_ffi_type(2, T2, v2context);
  value0 = CONS(T1,T3);
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
/* local function %ALIGN-DATA                                                 */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC665_align_data(cl_object v1, cl_object v2)
{
 cl_object T0, T1, T2;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4data;
  cl_object v5align;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v6;
   v6 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4data = v6;
  }
  if (!(v3==ECL_NIL)){
   goto L10;
  }
  si_dm_too_few_arguments(v1);
L10:;
  {
   cl_object v6;
   v6 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v5align = v6;
  }
  if (Null(v3)){
   goto L15;
  }
  si_dm_too_many_arguments(v1);
L15:;
  T0 = cl_list(3, ECL_SYM("/",23), v4data, v5align);
  T1 = cl_list(2, ECL_SYM("CEILING",201), T0);
  T2 = cl_list(3, ECL_SYM("*",20), T1, v5align);
  value0 = cl_list(3, ECL_SYM("SETF",753), v4data, T2);
  return value0;
 }
}
static cl_object LC665_align_data_va(cl_narg narg, cl_object v6, cl_object v7, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[13]);
 {
  return LC665_align_data(v6, v7);
 }
}
/* function definition for SIZE-OF-FOREIGN-TYPE                               */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L667size_of_foreign_type(cl_object v1name)
{
 cl_object T0, T1, T2, T3;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v2size;
  cl_object v3align;
  cl_object v4type;
  v2size = ecl_make_int8_t(0);
  v3align = ECL_NIL;
  v4type = L664_convert_to_ffi_type(1, v1name);
  if (v4type!=ECL_NIL) {
   goto L5;
  }
  cl_error(2, VV[15], v1name);
L5:;
  if (!(ECL_SYMBOLP(v4type))){
   goto L8;
  }
  v2size = si_size_of_foreign_elt_type(v4type);
  v3align = si_alignment_of_foreign_elt_type(v4type);
  goto L7;
L8:;
  if (!(ECL_ATOM(v4type))){
   goto L13;
  }
  cl_error(2, VV[16], v1name);
  goto L7;
L13:;
  v1name = ecl_car(v4type);
  if (!((v1name)==(ECL_SYM("STRUCT",1422)))){
   goto L15;
  }
  v2size = L672slot_position(v4type, ECL_NIL);
  if (Null(ecl_cdr(v4type))){
   goto L7;
  }
  T0 = (ECL_SYM("MAX",553)->symbol.gfdef);
  {
   cl_object v5;
   {
    cl_object v6;
    v6 = ecl_make_cfun_va((cl_objectfn)LC666__lambda60_va,ECL_NIL,Cblock,1);
    v5 = v6;
   }
   {
    cl_object v6;
    cl_object v7;
    cl_object v8;
    {
     cl_object v9;
     v9 = ecl_cdr(v4type);
     if (ecl_unlikely(!ECL_LISTP(v9))) FEtype_error_list(v9);
     value0 = ECL_NIL;
     cl_env_copy->nvalues = 0;
     v6 = v9;
    }
    v7 = ECL_NIL;
    v8 = v6;
    {
     cl_object v9;
     cl_object v10;
     v9 = ecl_list1(ECL_NIL);
     v10 = v9;
L33:;
     if (!(ecl_endp(v8))){
      goto L35;
     }
     goto L34;
L35:;
     v7 = ECL_CONS_CAR(v8);
     {
      cl_object v11;
      v11 = ECL_CONS_CDR(v8);
      if (ecl_unlikely(!ECL_LISTP(v11))) FEtype_error_list(v11);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
      v8 = v11;
     }
     {
      cl_object v11;
      v11 = v10;
      if (ecl_unlikely(ECL_ATOM(v11))) FEtype_error_cons(v11);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
      T2 = v11;
     }
     T3 = ecl_function_dispatch(cl_env_copy,v5)(1, v7);
     v10 = ecl_list1(T3);
     (ECL_CONS_CDR(T2)=v10,T2);
     goto L33;
L34:;
     T1 = ecl_cdr(v9);
     goto L24;
    }
   }
  }
L24:;
  v3align = cl_apply(2, T0, T1);
  T0 = ecl_divide(v2size,v3align);
  T1 = ecl_ceiling1(T0);
  v2size = ecl_times(T1,v3align);
  goto L7;
L15:;
  if (!((v1name)==(ECL_SYM("ARRAY",1229)))){
   goto L52;
  }
  v2size = ecl_caddr(v4type);
  if (Null(v2size)){
   goto L57;
  }
  if (cl_realp(v2size)!=ECL_NIL) {
   goto L54;
  }
  goto L55;
L57:;
  goto L55;
L55:;
  cl_error(2, VV[24], v4type);
L54:;
  {
   cl_object v5;                                  /*  ELT-SIZE                */
   cl_object v6;                                  /*  ELT-ALIGN               */
   T0 = ecl_cadr(v4type);
   value0 = L667size_of_foreign_type(T0);
   {
    const int v7 = cl_env_copy->nvalues;
    v5 = value0;
    cl_object v8;
    v8 = (v7<=1)? ECL_NIL : cl_env_copy->values[1];
    v6 = v8;
   }
   v2size = ecl_times(v2size,v5);
   v3align = v6;
   goto L7;
  }
L52:;
  if (!((v1name)==(ECL_SYM("UNION",1423)))){
   goto L64;
  }
  {
   cl_object v5;
   v5 = ecl_cdr(v4type);
   goto L69;
L68:;
   {
    cl_object v6field;
    v6field = ecl_car(v5);
    {
     cl_object v7;                                /*  FIELD-SIZE              */
     cl_object v8;                                /*  FIELD-ALIGN             */
     T0 = ecl_cadr(v6field);
     value0 = L667size_of_foreign_type(T0);
     {
      const int v9 = cl_env_copy->nvalues;
      v7 = value0;
      cl_object v10;
      v10 = (v9<=1)? ECL_NIL : cl_env_copy->values[1];
      v8 = v10;
     }
     if (!(ecl_greater(v7,v2size))){
      goto L75;
     }
     v2size = v7;
L75:;
     if (v3align==ECL_NIL) {
      goto L79;
     }
     if (!(ecl_greater(v8,v3align))){
      goto L73;
     }
     goto L78;
L79:;
L78:;
     v3align = v8;
    }
L73:;
   }
   v5 = ecl_cdr(v5);
L69:;
   if (Null(v5)){
    goto L84;
   }
   goto L68;
L84:;
   goto L7;
  }
L64:;
  if (!((v1name)==(ECL_SYM("*",20)))){
   goto L86;
  }
  v2size = si_size_of_foreign_elt_type(ECL_SYM("POINTER-VOID",1420));
  v3align = si_alignment_of_foreign_elt_type(ECL_SYM("POINTER-VOID",1420));
  goto L7;
L86:;
  if (!((v1name)==(ECL_SYM("QUOTE",682)))){
   goto L91;
  }
  v1name = ecl_cadr(v4type);
  goto L1;
L91:;
  cl_error(2, VV[25], v1name);
L7:;
  value0 = v3align;
  if (value0!=ECL_NIL) {
   goto L97;
  }
  T0 = ecl_make_int8_t(0);
  goto L95;
L97:;
  T0 = value0;
  goto L95;
L95:;
  cl_env_copy->nvalues = 2;
  cl_env_copy->values[1] = T0;
  cl_env_copy->values[0] = v2size;
  return cl_env_copy->values[0];
 }
}
static cl_object L667size_of_foreign_type_va(cl_narg narg, cl_object v5name, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[26]);
 {
  return L667size_of_foreign_type(v5name);
 }
}
/* function definition for ALLOCATE-FOREIGN-OBJECT                            */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L668allocate_foreign_object(cl_narg narg, cl_object v1type, ...)
{
 cl_object T0;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
 if (ecl_unlikely(narg<1)) FEwrong_num_arguments(VV[28]);
 if (ecl_unlikely(narg>2)) FEwrong_num_arguments(VV[28]);
 {
  cl_object v2size;
  cl_object v3size_flag;
  va_list args; va_start(args,v1type);
  {
   int i = 1;
   if (i >= narg) {
    v2size = ecl_make_int8_t(0);
    v3size_flag = ECL_NIL;
   } else {
    i++;
    v2size = va_arg(args,cl_object);
    v3size_flag = ECL_T;
   }
  }
  va_end(args);
  {
   cl_object v4type_size;
   v4type_size = L667size_of_foreign_type(v1type);
   if (!(v3size_flag==ECL_NIL)){
    goto L3;
   }
   value0 = si_allocate_foreign_data(v1type, v4type_size);
   return value0;
L3:;
   if (!(ECL_FIXNUMP(v2size))){
    goto L5;
   }
   if (!(ecl_greatereq(v2size,ecl_make_int8_t(0)))){
    goto L5;
   }
   {
    cl_object v5bytes;
    v5bytes = ecl_times(v2size,v4type_size);
    T0 = cl_list(3, ECL_SYM("ARRAY",1229), v1type, v2size);
    value0 = si_allocate_foreign_data(T0, v5bytes);
    return value0;
   }
L5:;
   value0 = cl_error(2, VV[27], v2size);
   return value0;
  }
 }
}
/* function definition for FREE-FOREIGN-OBJECT                                */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L669free_foreign_object(cl_object v1ptr)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 value0 = si_free_foreign_data(v1ptr);
 return value0;
}
static cl_object L669free_foreign_object_va(cl_narg narg, cl_object v2ptr, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[29]);
 {
  return L669free_foreign_object(v2ptr);
 }
}
/* local function DEF-ENUM                                                    */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC670def_enum(cl_object v1, cl_object v2)
{
 cl_object T0, T1, T2, T3;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4name;
  cl_object v5values_list;
  cl_object v6;
  cl_object v7separator_string;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v8;
   v8 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4name = v8;
  }
  if (!(v3==ECL_NIL)){
   goto L10;
  }
  si_dm_too_few_arguments(v1);
L10:;
  {
   cl_object v8;
   v8 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v5values_list = v8;
  }
  v6 = si_search_keyword(v3, VV[30]);
  if (!((v6)==(ECL_SYM("MISSING-KEYWORD",2044)))){
   goto L17;
  }
  v7separator_string = VV[31];
  goto L16;
L17:;
  v7separator_string = v6;
L16:;
  si_check_keyword(2, v3, VV[32]);
  {
   cl_object v8value;
   cl_object v9field;
   cl_object v10forms;
   v8value = ecl_make_int8_t(-1);
   v9field = ECL_NIL;
   v10forms = ECL_NIL;
   v7separator_string = cl_string(v7separator_string);
   {
    cl_object v11;
    v11 = v5values_list;
    goto L29;
L28:;
    {
     cl_object v12item;
     v12item = ecl_car(v11);
     if (!(ECL_SYMBOLP(v12item))){
      goto L34;
     }
     v9field = v12item;
     v8value = ecl_plus(v8value,ecl_make_int8_t(1));
     goto L33;
L34:;
     {
      cl_object v13;
      if (!(ECL_CONSP(v12item))){
       goto L41;
      }
      v9field = ecl_car(v12item);
      if (!(ECL_SYMBOLP(v9field))){
       goto L41;
      }
      v8value = ecl_cadr(v12item);
      if (!(ECL_FIXNUMP(v8value)||ECL_BIGNUMP(v8value))){
       goto L41;
      }
      T0 = ecl_cddr(v12item);
      v13 = ecl_make_bool(ecl_endp(T0));
      goto L39;
L41:;
      v13 = ECL_NIL;
      goto L39;
L39:;
      if (Null(v13)){
       goto L47;
      }
      goto L33;
L47:;
      cl_error(2, VV[33], v5values_list);
     }
L33:;
     T0 = ecl_symbol_name(v4name);
     T1 = cl_string(v9field);
     v9field = cl_concatenate(4, ECL_SYM("STRING",808), T0, v7separator_string, T1);
     T0 = cl_symbol_package(v4name);
     T1 = cl_intern(2, v9field, T0);
     T2 = cl_list(2, ECL_SYM("QUOTE",682), v8value);
     T3 = cl_list(3, ECL_SYM("DEFCONSTANT",279), T1, T2);
     v10forms = CONS(T3,v10forms);
    }
    v11 = ecl_cdr(v11);
L29:;
    if (Null(v11)){
     goto L55;
    }
    goto L28;
L55:;
   }
   T0 = cl_list(3, ECL_SYM("DEF-FOREIGN-TYPE",2120), v4name, ECL_SYM("INT",1411));
   value0 = cl_listX(3, ECL_SYM("PROGN",674), T0, v10forms);
   return value0;
  }
 }
}
static cl_object LC670def_enum_va(cl_narg narg, cl_object v11, cl_object v12, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[34]);
 {
  return LC670def_enum(v11, v12);
 }
}
/* local function DEF-STRUCT                                                  */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC671def_struct(cl_object v1, cl_object v2)
{
 cl_object T0;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4name;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v5;
   v5 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4name = v5;
  }
  {
   cl_object v5;
   cl_object v6struct_type;
   cl_object v7field;
   cl_object v8type;
   v5 = ecl_list1(ECL_SYM("STRUCT",1422));
   v6struct_type = v5;
   v7field = ECL_NIL;
   v8type = ECL_NIL;
   {
    cl_object v9;
    T0 = cl_list(2, ECL_SYM("*",20), v4name);
    v9 = cl_subst(3, T0, ECL_SYM("POINTER-SELF",1419), v3);
    goto L17;
L16:;
    {
     cl_object v10item;
     v10item = ecl_car(v9);
     if (!(ECL_CONSP(v10item))){
      goto L22;
     }
     {
      cl_fixnum v11;
      v11 = ecl_length(v10item);
      if (!((v11)==((cl_fixnum)(2)))){
       goto L22;
      }
     }
     v7field = ecl_car(v10item);
     if (!(ECL_SYMBOLP(v7field))){
      goto L22;
     }
     v8type = ecl_cadr(v10item);
     goto L21;
L22:;
     cl_error(2, VV[35], v10item);
L21:;
     T0 = cl_list(2, v7field, v8type);
     v6struct_type = CONS(T0,v6struct_type);
    }
    v9 = ecl_cdr(v9);
L17:;
    if (Null(v9)){
     goto L32;
    }
    goto L16;
L32:;
   }
   T0 = cl_nreverse(v6struct_type);
   value0 = cl_list(3, ECL_SYM("DEF-FOREIGN-TYPE",2120), v4name, T0);
   return value0;
  }
 }
}
static cl_object LC671def_struct_va(cl_narg narg, cl_object v9, cl_object v10, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[36]);
 {
  return LC671def_struct(v9, v10);
 }
}
/* function definition for SLOT-POSITION                                      */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L672slot_position(cl_object v1type, cl_object v2field)
{
 cl_object T0, T1;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 v1type = L664_convert_to_ffi_type(1, v1type);
 {
  cl_object v3ndx;
  cl_object v4is_union;
  v3ndx = ecl_make_int8_t(0);
  v4is_union = ECL_NIL;
  if (!(ECL_ATOM(v1type))){
   goto L7;
  }
  cl_error(2, VV[37], v1type);
  goto L6;
L7:;
  {
   cl_object v5;
   T0 = ecl_car(v1type);
   v5 = ecl_make_bool((T0)==(ECL_SYM("STRUCT",1422)));
   if (Null(v5)){
    goto L10;
   }
   goto L6;
L10:;
   T0 = ecl_car(v1type);
   if (!((T0)==(ECL_SYM("UNION",1423)))){
    goto L12;
   }
   v4is_union = ECL_T;
   goto L6;
L12:;
   cl_error(2, VV[37], v1type);
  }
L6:;
  {
   cl_object v5;
   v5 = ecl_cdr(v1type);
   goto L19;
L18:;
   {
    cl_object v6slot;
    v6slot = ecl_car(v5);
    {
     cl_object v7slot_name;
     cl_object v8slot_type;
     v7slot_name = ecl_car(v6slot);
     v8slot_type = ecl_cadr(v6slot);
     {
      cl_object v9;                               /*  SLOT-SIZE               */
      cl_object v10;                              /*  SLOT-ALIGN              */
      value0 = L667size_of_foreign_type(v8slot_type);
      {
       const int v11 = cl_env_copy->nvalues;
       v9 = value0;
       cl_object v12;
       v12 = (v11<=1)? ECL_NIL : cl_env_copy->values[1];
       v10 = v12;
      }
      T0 = ecl_divide(v3ndx,v10);
      T1 = ecl_ceiling1(T0);
      v3ndx = ecl_times(T1,v10);
      if (!((v7slot_name)==(v2field))){
       goto L29;
      }
      cl_env_copy->nvalues = 3;
      cl_env_copy->values[2] = v9;
      cl_env_copy->values[1] = v8slot_type;
      cl_env_copy->values[0] = v3ndx;
      return cl_env_copy->values[0];
L29:;
      if (v4is_union!=ECL_NIL) {
       goto L23;
      }
      v3ndx = ecl_plus(v3ndx,v9);
     }
    }
L23:;
   }
   v5 = ecl_cdr(v5);
L19:;
   if (Null(v5)){
    goto L35;
   }
   goto L18;
L35:;
  }
  cl_env_copy->nvalues = 3;
  cl_env_copy->values[2] = ECL_NIL;
  cl_env_copy->values[1] = ECL_NIL;
  cl_env_copy->values[0] = v3ndx;
  return cl_env_copy->values[0];
 }
}
static cl_object L672slot_position_va(cl_narg narg, cl_object v5type, cl_object v6field, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[17]);
 {
  return L672slot_position(v5type, v6field);
 }
}
/* function definition for GET-SLOT-VALUE                                     */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L673get_slot_value(cl_object v1object, cl_object v2struct_type, cl_object v3field)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v4;                                   /*  SLOT-NDX                */
  cl_object v5;                                   /*  SLOT-TYPE               */
  cl_object v6;                                   /*  SLOT-SIZE               */
  value0 = L672slot_position(v2struct_type, v3field);
  {
   const int v7 = cl_env_copy->nvalues;
   v4 = value0;
   cl_object v8;
   v8 = (v7<=1)? ECL_NIL : cl_env_copy->values[1];
   v5 = v8;
   v8 = (v7<=2)? ECL_NIL : cl_env_copy->values[2];
   v6 = v8;
  }
  if (v6!=ECL_NIL) {
   goto L3;
  }
  cl_error(3, VV[39], v3field, v2struct_type);
L3:;
  value0 = L680_foreign_data_ref(4, v1object, v4, v5, v6);
  return value0;
 }
}
static cl_object L673get_slot_value_va(cl_narg narg, cl_object v4object, cl_object v5struct_type, cl_object v6field, ...)
{
 if (ecl_unlikely(narg!=3)) FEwrong_num_arguments(VV[41]);
 {
  return L673get_slot_value(v4object, v5struct_type, v6field);
 }
}
/* function definition for (SETF GET-SLOT-VALUE)                              */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L674_setf_get_slot_value_(cl_object v1value, cl_object v2object, cl_object v3struct_type, cl_object v4field)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v5;                                   /*  SLOT-NDX                */
  cl_object v6;                                   /*  SLOT-TYPE               */
  cl_object v7;                                   /*  SLOT-SIZE               */
  value0 = L672slot_position(v3struct_type, v4field);
  {
   const int v8 = cl_env_copy->nvalues;
   v5 = value0;
   cl_object v9;
   v9 = (v8<=1)? ECL_NIL : cl_env_copy->values[1];
   v6 = v9;
   v9 = (v8<=2)? ECL_NIL : cl_env_copy->values[2];
   v7 = v9;
  }
  if (v7!=ECL_NIL) {
   goto L3;
  }
  cl_error(3, VV[39], v4field, v3struct_type);
L3:;
  value0 = L679_foreign_data_set(v2object, v5, v6, v1value);
  return value0;
 }
}
static cl_object L674_setf_get_slot_value__va(cl_narg narg, cl_object v5value, cl_object v6object, cl_object v7struct_type, cl_object v8field, ...)
{
 if (ecl_unlikely(narg!=4)) FEwrong_num_arguments(VV[43]);
 {
  return L674_setf_get_slot_value_(v5value, v6object, v7struct_type, v8field);
 }
}
/* function definition for GET-SLOT-POINTER                                   */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L675get_slot_pointer(cl_object v1object, cl_object v2struct_type, cl_object v3field)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v4;                                   /*  SLOT-NDX                */
  cl_object v5;                                   /*  SLOT-TYPE               */
  cl_object v6;                                   /*  SLOT-SIZE               */
  value0 = L672slot_position(v2struct_type, v3field);
  {
   const int v7 = cl_env_copy->nvalues;
   v4 = value0;
   cl_object v8;
   v8 = (v7<=1)? ECL_NIL : cl_env_copy->values[1];
   v5 = v8;
   v8 = (v7<=2)? ECL_NIL : cl_env_copy->values[2];
   v6 = v8;
  }
  if (v6!=ECL_NIL) {
   goto L3;
  }
  cl_error(3, VV[39], v3field, v2struct_type);
L3:;
  value0 = si_foreign_data_pointer(v1object, v4, v6, v5);
  return value0;
 }
}
static cl_object L675get_slot_pointer_va(cl_narg narg, cl_object v4object, cl_object v5struct_type, cl_object v6field, ...)
{
 if (ecl_unlikely(narg!=3)) FEwrong_num_arguments(VV[45]);
 {
  return L675get_slot_pointer(v4object, v5struct_type, v6field);
 }
}
/* local function DEF-ARRAY-POINTER                                           */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC676def_array_pointer(cl_object v1, cl_object v2)
{
 cl_object T0;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4name;
  cl_object v5element_type;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v6;
   v6 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4name = v6;
  }
  if (!(v3==ECL_NIL)){
   goto L10;
  }
  si_dm_too_few_arguments(v1);
L10:;
  {
   cl_object v6;
   v6 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v5element_type = v6;
  }
  if (Null(v3)){
   goto L15;
  }
  si_dm_too_many_arguments(v1);
L15:;
  T0 = cl_list(2, ECL_SYM("*",20), v5element_type);
  value0 = cl_list(3, ECL_SYM("DEF-FOREIGN-TYPE",2120), v4name, T0);
  return value0;
 }
}
static cl_object LC676def_array_pointer_va(cl_narg narg, cl_object v6, cl_object v7, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[46]);
 {
  return LC676def_array_pointer(v6, v7);
 }
}
/* function definition for DEREF-ARRAY                                        */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L677deref_array(cl_object v1array, cl_object v2array_type, cl_object v3position)
{
 cl_object T0, T1;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 v2array_type = L664_convert_to_ffi_type(1, v2array_type);
 {
  cl_object v4element_type;
  cl_object v5element_size;
  cl_object v6ndx;
  cl_object v7length;
  v4element_type = ecl_cadr(v2array_type);
  v5element_size = L667size_of_foreign_type(v4element_type);
  v6ndx = ecl_times(v3position,v5element_size);
  value0 = ecl_caddr(v2array_type);
  if (value0!=ECL_NIL) {
   goto L9;
  }
  v7length = ECL_SYM("*",20);
  goto L7;
L9:;
  v7length = value0;
  goto L7;
L7:;
  if ((v7length)==(ECL_SYM("*",20))) {
   goto L11;
  }
  if (cl_G(3, v7length, v3position, ecl_make_int8_t(-1))!=ECL_NIL) {
   goto L11;
  }
  cl_error(2, VV[47], v1array);
L11:;
  T0 = ecl_plus(v6ndx,v5element_size);
  T1 = si_foreign_data_recast(v1array, T0, v2array_type);
  value0 = L680_foreign_data_ref(4, T1, v6ndx, v4element_type, v5element_size);
  return value0;
 }
}
static cl_object L677deref_array_va(cl_narg narg, cl_object v8array, cl_object v9array_type, cl_object v10position, ...)
{
 if (ecl_unlikely(narg!=3)) FEwrong_num_arguments(VV[48]);
 {
  return L677deref_array(v8array, v9array_type, v10position);
 }
}
/* function definition for (SETF DEREF-ARRAY)                                 */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L678_setf_deref_array_(cl_object v1value, cl_object v2array, cl_object v3array_type, cl_object v4position)
{
 cl_object T0, T1;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 v3array_type = L664_convert_to_ffi_type(1, v3array_type);
 {
  cl_object v5element_type;
  cl_object v6element_size;
  cl_object v7ndx;
  cl_object v8length;
  v5element_type = ecl_cadr(v3array_type);
  v6element_size = L667size_of_foreign_type(v5element_type);
  v7ndx = ecl_times(v4position,v6element_size);
  value0 = ecl_caddr(v3array_type);
  if (value0!=ECL_NIL) {
   goto L9;
  }
  v8length = ECL_SYM("*",20);
  goto L7;
L9:;
  v8length = value0;
  goto L7;
L7:;
  if ((v8length)==(ECL_SYM("*",20))) {
   goto L11;
  }
  if (cl_G(3, v8length, v4position, ecl_make_int8_t(-1))!=ECL_NIL) {
   goto L11;
  }
  cl_error(2, VV[47], v2array);
L11:;
  T0 = ecl_plus(v7ndx,v6element_size);
  T1 = si_foreign_data_recast(v2array, T0, v3array_type);
  value0 = L679_foreign_data_set(T1, v7ndx, v5element_type, v1value);
  return value0;
 }
}
static cl_object L678_setf_deref_array__va(cl_narg narg, cl_object v9value, cl_object v10array, cl_object v11array_type, cl_object v12position, ...)
{
 if (ecl_unlikely(narg!=4)) FEwrong_num_arguments(VV[49]);
 {
  return L678_setf_deref_array_(v9value, v10array, v11array_type, v12position);
 }
}
/* function definition for %FOREIGN-DATA-SET                                  */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L679_foreign_data_set(cl_object v1obj, cl_object v2ndx, cl_object v3type, cl_object v4value)
{
 cl_object T0;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 if (Null(si_foreign_elt_type_p(v3type))){
  goto L2;
 }
 value0 = si_foreign_data_set_elt(v1obj, v2ndx, v3type, v4value);
 return value0;
L2:;
 if (!(ECL_ATOM(v3type))){
  goto L4;
 }
 value0 = cl_error(2, VV[51], v3type);
 return value0;
L4:;
 T0 = ecl_car(v3type);
 if (!((T0)==(ECL_SYM("*",20)))){
  goto L6;
 }
 value0 = si_foreign_data_set_elt(v1obj, v2ndx, ECL_SYM("POINTER-VOID",1420), v4value);
 return value0;
L6:;
 value0 = si_foreign_data_set(v1obj, v2ndx, v4value);
 return value0;
}
static cl_object L679_foreign_data_set_va(cl_narg narg, cl_object v5obj, cl_object v6ndx, cl_object v7type, cl_object v8value, ...)
{
 if (ecl_unlikely(narg!=4)) FEwrong_num_arguments(VV[42]);
 {
  return L679_foreign_data_set(v5obj, v6ndx, v7type, v8value);
 }
}
/* function definition for %FOREIGN-DATA-REF                                  */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L680_foreign_data_ref(cl_narg narg, cl_object v1obj, cl_object v2ndx, cl_object v3type, ...)
{
 cl_object T0, T1, T2;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
 if (ecl_unlikely(narg<3)) FEwrong_num_arguments(VV[40]);
 if (ecl_unlikely(narg>4)) FEwrong_num_arguments(VV[40]);
 {
  cl_object v4size;
  cl_object v5size_p;
  va_list args; va_start(args,v3type);
  {
   int i = 3;
   if (i >= narg) {
    v4size = ecl_make_int8_t(0);
    v5size_p = ECL_NIL;
   } else {
    i++;
    v4size = va_arg(args,cl_object);
    v5size_p = ECL_T;
   }
  }
  va_end(args);
  if (Null(si_foreign_elt_type_p(v3type))){
   goto L2;
  }
  value0 = si_foreign_data_ref_elt(v1obj, v2ndx, v3type);
  return value0;
L2:;
  if (!(ECL_ATOM(v3type))){
   goto L4;
  }
  value0 = cl_error(2, VV[51], v3type);
  return value0;
L4:;
  T0 = ecl_car(v3type);
  if (!((T0)==(ECL_SYM("*",20)))){
   goto L6;
  }
  T0 = si_foreign_data_ref_elt(v1obj, v2ndx, ECL_SYM("POINTER-VOID",1420));
  T1 = ecl_cadr(v3type);
  T2 = L667size_of_foreign_type(T1);
  value0 = si_foreign_data_recast(T0, T2, v3type);
  return value0;
L6:;
  if (Null(v5size_p)){
   goto L9;
  }
  T0 = v4size;
  goto L8;
L9:;
  T0 = L667size_of_foreign_type(v3type);
L8:;
  value0 = si_foreign_data_ref(v1obj, v2ndx, T0, v3type);
  return value0;
 }
}
/* local function DEF-UNION                                                   */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC681def_union(cl_object v1, cl_object v2)
{
 cl_object T0;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4name;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v5;
   v5 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4name = v5;
  }
  {
   cl_object v5;
   cl_object v6struct_type;
   cl_object v7field;
   cl_object v8type;
   v5 = ecl_list1(ECL_SYM("UNION",1423));
   v6struct_type = v5;
   v7field = ECL_NIL;
   v8type = ECL_NIL;
   {
    cl_object v9;
    T0 = cl_list(2, ECL_SYM("*",20), v6struct_type);
    v9 = cl_subst(3, T0, ECL_SYM("POINTER-SELF",1419), v3);
    goto L17;
L16:;
    {
     cl_object v10item;
     v10item = ecl_car(v9);
     if (!(ECL_CONSP(v10item))){
      goto L24;
     }
     {
      cl_fixnum v11;
      v11 = ecl_length(v10item);
      if (!((v11)==((cl_fixnum)(2)))){
       goto L24;
      }
     }
     v7field = ecl_car(v10item);
     if (ECL_SYMBOLP(v7field)) {
      goto L21;
     }
     goto L22;
L24:;
     goto L22;
L22:;
     cl_error(2, VV[54], v10item);
L21:;
     v8type = ecl_cadr(v10item);
     T0 = cl_list(2, v7field, v8type);
     v6struct_type = CONS(T0,v6struct_type);
    }
    v9 = ecl_cdr(v9);
L17:;
    if (Null(v9)){
     goto L34;
    }
    goto L16;
L34:;
   }
   T0 = cl_nreverse(v6struct_type);
   value0 = cl_list(3, ECL_SYM("DEF-FOREIGN-TYPE",2120), v4name, T0);
   return value0;
  }
 }
}
static cl_object LC681def_union_va(cl_narg narg, cl_object v9, cl_object v10, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[55]);
 {
  return LC681def_union(v9, v10);
 }
}
/* function definition for POINTER-ADDRESS                                    */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L682pointer_address(cl_object v1ptr)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 value0 = si_foreign_data_address(v1ptr);
 return value0;
}
static cl_object L682pointer_address_va(cl_narg narg, cl_object v2ptr, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[56]);
 {
  return L682pointer_address(v2ptr);
 }
}
/* function definition for DEREF-POINTER                                      */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L683deref_pointer(cl_object v1ptr, cl_object v2ftype)
{
 cl_object T0, T1, T2, T3;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 v2ftype = L664_convert_to_ffi_type(1, v2ftype);
 if (Null(si_foreign_elt_type_p(v2ftype))){
  goto L4;
 }
 value0 = si_foreign_data_ref_elt(v1ptr, ecl_make_int8_t(0), v2ftype);
 return value0;
L4:;
 if (!(ECL_ATOM(v2ftype))){
  goto L6;
 }
 value0 = cl_error(2, VV[51], v2ftype);
 return value0;
L6:;
 T0 = ecl_car(v2ftype);
 if (!((T0)==(ECL_SYM("*",20)))){
  goto L8;
 }
 T0 = si_foreign_data_ref_elt(v1ptr, ecl_make_int8_t(0), ECL_SYM("POINTER-VOID",1420));
 T1 = ecl_cadr(v2ftype);
 T2 = L667size_of_foreign_type(T1);
 T3 = ecl_cadr(v2ftype);
 value0 = si_foreign_data_recast(T0, T2, T3);
 return value0;
L8:;
 value0 = cl_error(2, VV[57], v1ptr);
 return value0;
}
static cl_object L683deref_pointer_va(cl_narg narg, cl_object v3ptr, cl_object v4ftype, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[58]);
 {
  return L683deref_pointer(v3ptr, v4ftype);
 }
}
/* function definition for (SETF DEREF-POINTER)                               */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L684_setf_deref_pointer_(cl_object v1value, cl_object v2ptr, cl_object v3type)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 v3type = L664_convert_to_ffi_type(1, v3type);
 if (Null(si_foreign_elt_type_p(v3type))){
  goto L4;
 }
 value0 = si_foreign_data_set_elt(v2ptr, ecl_make_int8_t(0), v3type, v1value);
 return value0;
L4:;
 value0 = si_foreign_data_set(v2ptr, ecl_make_int8_t(0), v1value);
 return value0;
}
static cl_object L684_setf_deref_pointer__va(cl_narg narg, cl_object v4value, cl_object v5ptr, cl_object v6type, ...)
{
 if (ecl_unlikely(narg!=3)) FEwrong_num_arguments(VV[59]);
 {
  return L684_setf_deref_pointer_(v4value, v5ptr, v6type);
 }
}
/* function definition for MAKE-NULL-POINTER                                  */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L685make_null_pointer(cl_object v1ftype)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 value0 = si_allocate_foreign_data(v1ftype, ecl_make_int8_t(0));
 return value0;
}
static cl_object L685make_null_pointer_va(cl_narg narg, cl_object v2ftype, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[61]);
 {
  return L685make_null_pointer(v2ftype);
 }
}
/* function definition for MAKE-POINTER                                       */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L686make_pointer(cl_object v1addr, cl_object v2type)
{
 cl_object T0;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 T0 = L667size_of_foreign_type(v2type);
 value0 = ecl_make_foreign_data(v2type, ecl_to_ulong(T0), (void*)ecl_to_ulong(v1addr));
 cl_env_copy->nvalues = 1;
 return value0;
}
static cl_object L686make_pointer_va(cl_narg narg, cl_object v3addr, cl_object v4type, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[62]);
 {
  return L686make_pointer(v3addr, v4type);
 }
}
/* function definition for NULL-CHAR-P                                        */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L687null_char_p(cl_object v1char)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 value0 = ecl_make_bool((v1char)==(ECL_CODE_CHAR(0)));
 cl_env_copy->nvalues = 1;
 return value0;
}
static cl_object L687null_char_p_va(cl_narg narg, cl_object v2char, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[63]);
 {
  return L687null_char_p(v2char);
 }
}
/* function definition for ENSURE-CHAR-CHARACTER                              */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L688ensure_char_character(cl_object v1char)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 if (!(ECL_CHARACTERP(v1char))){
  goto L2;
 }
 value0 = v1char;
 cl_env_copy->nvalues = 1;
 return value0;
L2:;
 if (!(ECL_FIXNUMP(v1char)||ECL_BIGNUMP(v1char))){
  goto L4;
 }
 value0 = cl_code_char(v1char);
 return value0;
L4:;
 value0 = cl_error(2, VV[64], v1char);
 return value0;
}
static cl_object L688ensure_char_character_va(cl_narg narg, cl_object v2char, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[65]);
 {
  return L688ensure_char_character(v2char);
 }
}
/* function definition for ENSURE-CHAR-INTEGER                                */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L689ensure_char_integer(cl_object v1char)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 if (!(ECL_CHARACTERP(v1char))){
  goto L2;
 }
 value0 = cl_char_code(v1char);
 return value0;
L2:;
 if (!(ECL_FIXNUMP(v1char)||ECL_BIGNUMP(v1char))){
  goto L4;
 }
 value0 = v1char;
 cl_env_copy->nvalues = 1;
 return value0;
L4:;
 value0 = cl_error(2, VV[66], v1char);
 return value0;
}
static cl_object L689ensure_char_integer_va(cl_narg narg, cl_object v2char, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[67]);
 {
  return L689ensure_char_integer(v2char);
 }
}
/* function definition for ENSURE-CHAR-STORABLE                               */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L690ensure_char_storable(cl_object v1char)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 value0 = v1char;
 cl_env_copy->nvalues = 1;
 return value0;
}
static cl_object L690ensure_char_storable_va(cl_narg narg, cl_object v2char, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[68]);
 {
  return L690ensure_char_storable(v2char);
 }
}
/* function definition for CHAR-ARRAY-TO-POINTER                              */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L691char_array_to_pointer(cl_object v1obj)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 value0 = si_foreign_data_pointer(v1obj, ecl_make_int8_t(0), ecl_make_int8_t(1), VV[69]);
 return value0;
}
static cl_object L691char_array_to_pointer_va(cl_narg narg, cl_object v2obj, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[70]);
 {
  return L691char_array_to_pointer(v2obj);
 }
}
/* local function CONVERT-FROM-CSTRING                                        */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC692convert_from_cstring(cl_object v1, cl_object v2)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4object;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v5;
   v5 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4object = v5;
  }
  if (Null(v3)){
   goto L9;
  }
  si_dm_too_many_arguments(v1);
L9:;
  value0 = v4object;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
static cl_object LC692convert_from_cstring_va(cl_narg narg, cl_object v5, cl_object v6, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[71]);
 {
  return LC692convert_from_cstring(v5, v6);
 }
}
/* local function CONVERT-TO-CSTRING                                          */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC693convert_to_cstring(cl_object v1, cl_object v2)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4object;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v5;
   v5 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4object = v5;
  }
  if (Null(v3)){
   goto L9;
  }
  si_dm_too_many_arguments(v1);
L9:;
  value0 = cl_list(2, ECL_SYM("COPY-TO-SIMPLE-BASE-STRING",1068), v4object);
  return value0;
 }
}
static cl_object LC693convert_to_cstring_va(cl_narg narg, cl_object v5, cl_object v6, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[72]);
 {
  return LC693convert_to_cstring(v5, v6);
 }
}
/* local function FREE-CSTRING                                                */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC694free_cstring(cl_object v1, cl_object v2)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4cstring;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v5;
   v5 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4cstring = v5;
  }
  if (Null(v3)){
   goto L9;
  }
  si_dm_too_many_arguments(v1);
L9:;
  value0 = v4cstring;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
static cl_object LC694free_cstring_va(cl_narg narg, cl_object v5, cl_object v6, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[73]);
 {
  return LC694free_cstring(v5, v6);
 }
}
/* local function WITH-CSTRING                                                */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC695with_cstring(cl_object v1, cl_object v2)
{
 cl_object T0, T1, T2;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4;
  cl_object v5;
  cl_object v6cstring;
  cl_object v7string;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v8;
   v8 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4 = v8;
  }
  v5 = v4;
  if (!(v5==ECL_NIL)){
   goto L11;
  }
  si_dm_too_few_arguments(v1);
L11:;
  {
   cl_object v8;
   v8 = ecl_car(v5);
   v5 = ecl_cdr(v5);
   v6cstring = v8;
  }
  if (!(v5==ECL_NIL)){
   goto L17;
  }
  si_dm_too_few_arguments(v1);
L17:;
  {
   cl_object v8;
   v8 = ecl_car(v5);
   v5 = ecl_cdr(v5);
   v7string = v8;
  }
  if (Null(v5)){
   goto L22;
  }
  si_dm_too_many_arguments(v1);
L22:;
  T0 = cl_list(2, ECL_SYM("CONVERT-TO-CSTRING",2114), v7string);
  T1 = cl_list(2, v6cstring, T0);
  T2 = ecl_list1(T1);
  value0 = cl_listX(3, ECL_SYM("LET",479), T2, v3);
  return value0;
 }
}
static cl_object LC695with_cstring_va(cl_narg narg, cl_object v8, cl_object v9, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[74]);
 {
  return LC695with_cstring(v8, v9);
 }
}
/* local function WITH-CSTRINGS                                               */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC696with_cstrings(cl_object v1, cl_object v2)
{
 cl_object T0, T1, T2;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4bindings;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v5;
   v5 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4bindings = v5;
  }
  if (Null(v4bindings)){
   goto L9;
  }
  T0 = ecl_car(v4bindings);
  T1 = ecl_cdr(v4bindings);
  T2 = cl_listX(3, ECL_SYM("WITH-CSTRINGS",2154), T1, v3);
  value0 = cl_list(3, ECL_SYM("WITH-CSTRING",2153), T0, T2);
  return value0;
L9:;
  value0 = CONS(ECL_SYM("PROGN",674),v3);
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
static cl_object LC696with_cstrings_va(cl_narg narg, cl_object v5, cl_object v6, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[75]);
 {
  return LC696with_cstrings(v5, v6);
 }
}
/* function definition for FOREIGN-STRING-LENGTH                              */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L697foreign_string_length(cl_object v1foreign_string)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 value0 = ecl_make_int(strlen((v1foreign_string)->foreign.data));
 cl_env_copy->nvalues = 1;
 return value0;
}
static cl_object L697foreign_string_length_va(cl_narg narg, cl_object v2foreign_string, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[76]);
 {
  return L697foreign_string_length(v2foreign_string);
 }
}
/* function definition for CONVERT-FROM-FOREIGN-STRING                        */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L698convert_from_foreign_string(cl_narg narg, cl_object v1foreign_string, ...)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
 if (ecl_unlikely(narg<1)) FEwrong_num_arguments(VV[78]);
 {
  cl_object v2length;
  cl_object v3null_terminated_p;
  ecl_va_list args; ecl_va_start(args,v1foreign_string,narg,1);
  {
   cl_object keyvars[4];
   cl_parse_key(args,2,L698convert_from_foreign_stringkeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   v2length = keyvars[0];
   if (Null(keyvars[3])) {
    v3null_terminated_p = ECL_T;
   } else {
    v3null_terminated_p = keyvars[1];
   }
  }
  if (v2length!=ECL_NIL) {
   goto L3;
  }
  if (Null(v3null_terminated_p)){
   goto L3;
  }
  v2length = L697foreign_string_length(v1foreign_string);
  goto L2;
L3:;
  if (ECL_FIXNUMP(v2length)||ECL_BIGNUMP(v2length)) {
   goto L2;
  }
  cl_error(2, VV[77], v2length);
L2:;
  {
   cl_object v4;
   {
        cl_index length = ecl_to_fixnum(v2length);
        cl_object output = ecl_alloc_simple_base_string(length);
        memcpy(output->base_string.self, (v1foreign_string)->foreign.data, length);
        v4= output;
        }
   value0 = v4;
   cl_env_copy->nvalues = 1;
   return value0;
  }
 }
}
/* function definition for CONVERT-TO-FOREIGN-STRING                          */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L699convert_to_foreign_string(cl_object v1string_designator)
{
 cl_object T0;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v2;
  cl_object v3cstring;
  cl_object v4foreign_type;
  T0 = cl_string(v1string_designator);
  v2 = si_copy_to_simple_base_string(T0);
  v3cstring = v2;
  v4foreign_type = VV[79];
  {
   cl_object v5;
   {
        cl_object lisp_string = v3cstring;
        cl_index size = lisp_string->base_string.fillp;
        cl_object output = ecl_allocate_foreign_data(v4foreign_type, size+1);
        memcpy(output->foreign.data, lisp_string->base_string.self, size);
        output->foreign.data[size] = '\0';
        v5= output;
        }
   value0 = v5;
   cl_env_copy->nvalues = 1;
   return value0;
  }
 }
}
static cl_object L699convert_to_foreign_string_va(cl_narg narg, cl_object v5string_designator, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[80]);
 {
  return L699convert_to_foreign_string(v5string_designator);
 }
}
/* function definition for ALLOCATE-FOREIGN-STRING                            */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L700allocate_foreign_string(cl_narg narg, cl_object v1size, ...)
{
 cl_object T0, T1, T2;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
 if (ecl_unlikely(narg<1)) FEwrong_num_arguments(VV[81]);
 {
  cl_object v2unsigned;
  ecl_va_list args; ecl_va_start(args,v1size,narg,1);
  {
   cl_object keyvars[2];
   cl_parse_key(args,1,L700allocate_foreign_stringkeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   if (Null(keyvars[1])) {
    v2unsigned = ECL_T;
   } else {
    v2unsigned = keyvars[0];
   }
  }
  if (Null(v2unsigned)){
   goto L3;
  }
  T0 = ECL_SYM("UNSIGNED-CHAR",1430);
  goto L2;
L3:;
  T0 = ECL_SYM("CHAR",1403);
L2:;
  T1 = cl_list(2, ECL_SYM("*",20), T0);
  T2 = ecl_one_plus(v1size);
  value0 = si_allocate_foreign_data(T1, T2);
  return value0;
 }
}
/* local function WITH-FOREIGN-STRING                                         */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC701with_foreign_string(cl_object v1, cl_object v2)
{
 cl_object T0, T1, T2, T3, T4, T5, T6;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4;
  cl_object v5;
  cl_object v6foreign_string;
  cl_object v7lisp_string;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v8;
   v8 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4 = v8;
  }
  v5 = v4;
  if (!(v5==ECL_NIL)){
   goto L11;
  }
  si_dm_too_few_arguments(v1);
L11:;
  {
   cl_object v8;
   v8 = ecl_car(v5);
   v5 = ecl_cdr(v5);
   v6foreign_string = v8;
  }
  if (!(v5==ECL_NIL)){
   goto L17;
  }
  si_dm_too_few_arguments(v1);
L17:;
  {
   cl_object v8;
   v8 = ecl_car(v5);
   v5 = ecl_cdr(v5);
   v7lisp_string = v8;
  }
  if (Null(v5)){
   goto L22;
  }
  si_dm_too_many_arguments(v1);
L22:;
  T0 = cl_list(2, ECL_SYM("CONVERT-TO-FOREIGN-STRING",2115), v7lisp_string);
  T1 = cl_list(2, v6foreign_string, T0);
  T2 = ecl_list1(T1);
  T3 = CONS(ECL_SYM("WITH-RESTORED-INTERRUPTS",1833),v3);
  T4 = cl_list(2, ECL_SYM("FREE-FOREIGN-OBJECT",2140), v6foreign_string);
  T5 = cl_list(3, ECL_SYM("UNWIND-PROTECT",892), T3, T4);
  T6 = cl_list(2, ECL_SYM("WITHOUT-INTERRUPTS",1832), T5);
  value0 = cl_list(3, ECL_SYM("LET*",480), T2, T6);
  return value0;
 }
}
static cl_object LC701with_foreign_string_va(cl_narg narg, cl_object v8, cl_object v9, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[82]);
 {
  return LC701with_foreign_string(v8, v9);
 }
}
/* local function WITH-FOREIGN-STRINGS                                        */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC702with_foreign_strings(cl_object v1, cl_object v2)
{
 cl_object T0, T1, T2;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4bindings;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v5;
   v5 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4bindings = v5;
  }
  if (Null(v4bindings)){
   goto L9;
  }
  T0 = ecl_car(v4bindings);
  T1 = ecl_cdr(v4bindings);
  T2 = cl_listX(3, ECL_SYM("WITH-FOREIGN-STRINGS",2158), T1, v3);
  value0 = cl_list(3, ECL_SYM("WITH-FOREIGN-STRING",2157), T0, T2);
  return value0;
L9:;
  value0 = CONS(ECL_SYM("PROGN",674),v3);
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
static cl_object LC702with_foreign_strings_va(cl_narg narg, cl_object v5, cl_object v6, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[83]);
 {
  return LC702with_foreign_strings(v5, v6);
 }
}
/* local function WITH-FOREIGN-OBJECT                                         */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC703with_foreign_object(cl_object v1, cl_object v2)
{
 cl_object T0, T1, T2, T3, T4, T5, T6;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4;
  cl_object v5;
  cl_object v6var;
  cl_object v7type;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v8;
   v8 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4 = v8;
  }
  v5 = v4;
  if (!(v5==ECL_NIL)){
   goto L11;
  }
  si_dm_too_few_arguments(v1);
L11:;
  {
   cl_object v8;
   v8 = ecl_car(v5);
   v5 = ecl_cdr(v5);
   v6var = v8;
  }
  if (!(v5==ECL_NIL)){
   goto L17;
  }
  si_dm_too_few_arguments(v1);
L17:;
  {
   cl_object v8;
   v8 = ecl_car(v5);
   v5 = ecl_cdr(v5);
   v7type = v8;
  }
  if (Null(v5)){
   goto L22;
  }
  si_dm_too_many_arguments(v1);
L22:;
  T0 = cl_list(2, ECL_SYM("ALLOCATE-FOREIGN-OBJECT",2104), v7type);
  T1 = cl_list(2, v6var, T0);
  T2 = ecl_list1(T1);
  T3 = CONS(ECL_SYM("WITH-RESTORED-INTERRUPTS",1833),v3);
  T4 = cl_list(2, ECL_SYM("FREE-FOREIGN-OBJECT",2140), v6var);
  T5 = cl_list(3, ECL_SYM("UNWIND-PROTECT",892), T3, T4);
  T6 = cl_list(2, ECL_SYM("WITHOUT-INTERRUPTS",1832), T5);
  value0 = cl_list(3, ECL_SYM("LET",479), T2, T6);
  return value0;
 }
}
static cl_object LC703with_foreign_object_va(cl_narg narg, cl_object v8, cl_object v9, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[84]);
 {
  return LC703with_foreign_object(v8, v9);
 }
}
/* local function WITH-FOREIGN-OBJECTS                                        */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC704with_foreign_objects(cl_object v1, cl_object v2)
{
 cl_object T0, T1, T2;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4bindings;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v5;
   v5 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4bindings = v5;
  }
  if (Null(v4bindings)){
   goto L9;
  }
  T0 = ecl_car(v4bindings);
  T1 = ecl_cdr(v4bindings);
  T2 = cl_listX(3, ECL_SYM("WITH-FOREIGN-OBJECTS",2156), T1, v3);
  value0 = cl_list(3, ECL_SYM("WITH-FOREIGN-OBJECT",2155), T0, T2);
  return value0;
L9:;
  value0 = CONS(ECL_SYM("PROGN",674),v3);
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
static cl_object LC704with_foreign_objects_va(cl_narg narg, cl_object v5, cl_object v6, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[85]);
 {
  return LC704with_foreign_objects(v5, v6);
 }
}
/* local function WITH-CAST-POINTER                                           */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC705with_cast_pointer(cl_object v1, cl_object v2)
{
 cl_object T0, T1, T2, T3, T4, T5, T6, T7, T8;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4bind;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v5;
   v5 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4bind = v5;
  }
  {
   cl_object v5binding_name;
   cl_object v6ptr;
   cl_object v7type;
   v5binding_name = ECL_NIL;
   v6ptr = ECL_NIL;
   v7type = ECL_NIL;
   {
    cl_object v8;
    v8 = ecl_make_fixnum(ecl_length(v4bind));
    if (!((ecl_fixnum(v8))==((cl_fixnum)(2)))){
     goto L14;
    }
    v5binding_name = ecl_car(v4bind);
    v6ptr = v5binding_name;
    v7type = ecl_cadr(v4bind);
    goto L12;
L14:;
    if (!((ecl_fixnum(v8))==((cl_fixnum)(3)))){
     goto L21;
    }
    v5binding_name = ecl_car(v4bind);
    v6ptr = ecl_cadr(v4bind);
    v7type = ecl_caddr(v4bind);
    goto L12;
L21:;
    cl_error(1, VV[86]);
   }
L12:;
   T0 = cl_list(2, ECL_SYM("QUOTE",682), v7type);
   T1 = cl_list(2, ECL_SYM("SIZE-OF-FOREIGN-TYPE",2150), T0);
   T2 = cl_list(4, ECL_SYM("FOREIGN-DATA-RECAST",1388), v6ptr, T1, ECL_SYM("VOID",1424));
   T3 = cl_list(2, ECL_SYM("QUOTE",682), v7type);
   T4 = cl_list(2, ECL_SYM("SIZE-OF-FOREIGN-TYPE",2150), T3);
   T5 = cl_list(2, ECL_SYM("QUOTE",682), v7type);
   T6 = cl_list(5, ECL_SYM("FOREIGN-DATA-POINTER",1387), T2, ecl_make_int8_t(0), T4, T5);
   T7 = cl_list(2, v5binding_name, T6);
   T8 = ecl_list1(T7);
   value0 = cl_listX(3, ECL_SYM("LET",479), T8, v3);
   return value0;
  }
 }
}
static cl_object LC705with_cast_pointer_va(cl_narg narg, cl_object v8, cl_object v9, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[87]);
 {
  return LC705with_cast_pointer(v8, v9);
 }
}
/* function definition for LISP-TO-C-NAME                                     */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L706lisp_to_c_name(cl_object v1name)
{
 cl_object T0, T1, T2, T3;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 if (ECL_STRINGP(v1name)) {
  goto L4;
 }
 if (!(ECL_SYMBOLP(v1name))){
  goto L2;
 }
 goto L3;
L4:;
L3:;
 T0 = cl_string(v1name);
 T1 = cl_substitute(3, ECL_CODE_CHAR(45), ECL_CODE_CHAR(95), T0);
 T2 = cl_string_upcase(1, T1);
 T3 = cl_intern(1, T2);
 cl_env_copy->nvalues = 2;
 cl_env_copy->values[1] = T3;
 cl_env_copy->values[0] = v1name;
 return cl_env_copy->values[0];
L2:;
 if (!(ECL_CONSP(v1name))){
  goto L6;
 }
 {
  cl_fixnum v2;
  v2 = ecl_length(v1name);
  if (!((v2)==((cl_fixnum)(2)))){
   goto L6;
  }
 }
 T0 = ecl_car(v1name);
 T1 = ecl_cadr(v1name);
 cl_env_copy->nvalues = 2;
 cl_env_copy->values[1] = T1;
 cl_env_copy->values[0] = T0;
 return cl_env_copy->values[0];
L6:;
 value0 = ECL_NIL;
 cl_env_copy->nvalues = 1;
 return value0;
}
static cl_object L706lisp_to_c_name_va(cl_narg narg, cl_object v2name, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[88]);
 {
  return L706lisp_to_c_name(v2name);
 }
}
/* function definition for %CONVERT-TO-ARG-TYPE                               */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L707_convert_to_arg_type(cl_object v1type)
{
 cl_object T0;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v2type;
  v2type = L664_convert_to_ffi_type(1, v1type);
  if (!(ECL_ATOM(v2type))){
   goto L3;
  }
  value0 = v2type;
  cl_env_copy->nvalues = 1;
  return value0;
L3:;
  T0 = ecl_car(v2type);
  if (!((T0)==(ECL_SYM("*",20)))){
   goto L5;
  }
  value0 = ECL_SYM("POINTER-VOID",1420);
  cl_env_copy->nvalues = 1;
  return value0;
L5:;
  T0 = ecl_car(v2type);
  if (!((T0)==(ECL_SYM("ARRAY",1229)))){
   goto L7;
  }
  value0 = ECL_SYM("POINTER-VOID",1420);
  cl_env_copy->nvalues = 1;
  return value0;
L7:;
  value0 = cl_error(2, VV[91], v2type);
  return value0;
 }
}
static cl_object L707_convert_to_arg_type_va(cl_narg narg, cl_object v3type, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[90]);
 {
  return L707_convert_to_arg_type(v3type);
 }
}
/* function definition for %CONVERT-TO-RETURN-TYPE                            */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L708_convert_to_return_type(cl_object v1type)
{
 cl_object T0;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v2type;
  v2type = L664_convert_to_ffi_type(1, v1type);
  if (!(ECL_ATOM(v2type))){
   goto L3;
  }
  value0 = v2type;
  cl_env_copy->nvalues = 1;
  return value0;
L3:;
  T0 = ecl_car(v2type);
  if (!((T0)==(ECL_SYM("*",20)))){
   goto L5;
  }
  value0 = ecl_cadr(v2type);
  cl_env_copy->nvalues = 1;
  return value0;
L5:;
  value0 = v2type;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
static cl_object L708_convert_to_return_type_va(cl_narg narg, cl_object v3type, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[93]);
 {
  return L708_convert_to_return_type(v3type);
 }
}
/* function definition for PRODUCE-FUNCTION-CALL                              */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L709produce_function_call(cl_object v1c_name, cl_object v2nargs)
{
 cl_object T0, T1, T2, T3;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 T0 = ecl_times(v2nargs,ecl_make_int8_t(3));
 T1 = ecl_one_minus(T0);
 T2 = ((ecl_float_nan_p(T1) || ecl_greatereq(ecl_make_int8_t(0),T1))?ecl_make_int8_t(0):T1);
 T3 = cl_subseq(3, VV[97], ecl_make_int8_t(0), T2);
 value0 = cl_format(4, ECL_NIL, VV[96], v1c_name, T3);
 return value0;
}
/* local function DEF-LIB-FUNCTION                                            */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC711def_lib_function(cl_object v1, cl_object v2)
{
 cl_object T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4name;
  cl_object v5args;
  cl_object v6;
  cl_object v7returning;
  cl_object v8;
  cl_object v9module;
  cl_object v10;
  cl_object v11call;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v12;
   v12 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4name = v12;
  }
  if (!(v3==ECL_NIL)){
   goto L10;
  }
  si_dm_too_few_arguments(v1);
L10:;
  {
   cl_object v12;
   v12 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v5args = v12;
  }
  v6 = si_search_keyword(v3, VV[98]);
  if (!((v6)==(ECL_SYM("MISSING-KEYWORD",2044)))){
   goto L17;
  }
  v7returning = ECL_NIL;
  goto L16;
L17:;
  v7returning = v6;
L16:;
  v8 = si_search_keyword(v3, VV[99]);
  if (!((v8)==(ECL_SYM("MISSING-KEYWORD",2044)))){
   goto L21;
  }
  v9module = ECL_NIL;
  goto L20;
L21:;
  v9module = v8;
L20:;
  v10 = si_search_keyword(v3, VV[100]);
  if (!((v10)==(ECL_SYM("MISSING-KEYWORD",2044)))){
   goto L25;
  }
  v11call = ECL_SYM("DEFAULT",1246);
  goto L24;
L25:;
  v11call = v10;
L24:;
  si_check_keyword(2, v3, VV[102]);
  {
   cl_object v12;                                 /*  C-NAME                  */
   cl_object v13;                                 /*  LISP-NAME               */
   value0 = L706lisp_to_c_name(v4name);
   {
    const int v14 = cl_env_copy->nvalues;
    v12 = value0;
    cl_object v15;
    v15 = (v14<=1)? ECL_NIL : cl_env_copy->values[1];
    v13 = v15;
   }
   {
    cl_object v14return_type;
    cl_object v15argtypes;
    v14return_type = L708_convert_to_return_type(v7returning);
    {
     cl_object v16;
     {
      cl_object v17;
      v17 = ecl_make_cfun_va((cl_objectfn)LC710__lambda442_va,ECL_NIL,Cblock,1);
      v16 = v17;
     }
     {
      cl_object v17;
      cl_object v18;
      cl_object v19;
      {
       cl_object v20;
       v20 = v5args;
       if (ecl_unlikely(!ECL_LISTP(v20))) FEtype_error_list(v20);
       value0 = ECL_NIL;
       cl_env_copy->nvalues = 0;
       v17 = v20;
      }
      v18 = ECL_NIL;
      v19 = v17;
      {
       cl_object v20;
       cl_object v21;
       v20 = ecl_list1(ECL_NIL);
       v21 = v20;
L39:;
       if (!(ecl_endp(v19))){
        goto L41;
       }
       goto L40;
L41:;
       v18 = ECL_CONS_CAR(v19);
       {
        cl_object v22;
        v22 = ECL_CONS_CDR(v19);
        if (ecl_unlikely(!ECL_LISTP(v22))) FEtype_error_list(v22);
        value0 = ECL_NIL;
        cl_env_copy->nvalues = 0;
        v19 = v22;
       }
       {
        cl_object v22;
        v22 = v21;
        if (ecl_unlikely(ECL_ATOM(v22))) FEtype_error_cons(v22);
        value0 = ECL_NIL;
        cl_env_copy->nvalues = 0;
        T0 = v22;
       }
       T1 = ecl_function_dispatch(cl_env_copy,v16)(1, v18);
       v21 = ecl_list1(T1);
       (ECL_CONS_CDR(T0)=v21,T0);
       goto L39;
L40:;
       v15argtypes = ecl_cdr(v20);
       goto L30;
      }
     }
    }
L30:;
    T0 = cl_list(2, ECL_SYM("QUOTE",682), v12);
    T1 = cl_listX(4, ECL_SYM("FIND-FOREIGN-SYMBOL",1382), T0, v9module, VV[105]);
    T2 = cl_list(2, VV[104], T1);
    T3 = ecl_list1(T2);
    {
     cl_object v16;
     v16 = (ECL_SYM("FIRST",373)->symbol.gfdef);
     {
      cl_object v17;
      cl_object v18;
      cl_object v19;
      {
       cl_object v20;
       v20 = v5args;
       if (ecl_unlikely(!ECL_LISTP(v20))) FEtype_error_list(v20);
       value0 = ECL_NIL;
       cl_env_copy->nvalues = 0;
       v17 = v20;
      }
      v18 = ECL_NIL;
      v19 = v17;
      {
       cl_object v20;
       cl_object v21;
       v20 = ecl_list1(ECL_NIL);
       v21 = v20;
L66:;
       if (!(ecl_endp(v19))){
        goto L68;
       }
       goto L67;
L68:;
       v18 = ECL_CONS_CAR(v19);
       {
        cl_object v22;
        v22 = ECL_CONS_CDR(v19);
        if (ecl_unlikely(!ECL_LISTP(v22))) FEtype_error_list(v22);
        value0 = ECL_NIL;
        cl_env_copy->nvalues = 0;
        v19 = v22;
       }
       {
        cl_object v22;
        v22 = v21;
        if (ecl_unlikely(ECL_ATOM(v22))) FEtype_error_cons(v22);
        value0 = ECL_NIL;
        cl_env_copy->nvalues = 0;
        T5 = v22;
       }
       T6 = ecl_function_dispatch(cl_env_copy,v16)(1, v18);
       v21 = ecl_list1(T6);
       (ECL_CONS_CDR(T5)=v21,T5);
       goto L66;
L67:;
       T4 = ecl_cdr(v20);
       goto L57;
      }
     }
    }
L57:;
    T5 = cl_list(2, ECL_SYM("QUOTE",682), v14return_type);
    T6 = cl_list(2, ECL_SYM("QUOTE",682), v15argtypes);
    {
     cl_object v16;
     v16 = (ECL_SYM("FIRST",373)->symbol.gfdef);
     {
      cl_object v17;
      cl_object v18;
      cl_object v19;
      {
       cl_object v20;
       v20 = v5args;
       if (ecl_unlikely(!ECL_LISTP(v20))) FEtype_error_list(v20);
       value0 = ECL_NIL;
       cl_env_copy->nvalues = 0;
       v17 = v20;
      }
      v18 = ECL_NIL;
      v19 = v17;
      {
       cl_object v20;
       cl_object v21;
       v20 = ecl_list1(ECL_NIL);
       v21 = v20;
L93:;
       if (!(ecl_endp(v19))){
        goto L95;
       }
       goto L94;
L95:;
       v18 = ECL_CONS_CAR(v19);
       {
        cl_object v22;
        v22 = ECL_CONS_CDR(v19);
        if (ecl_unlikely(!ECL_LISTP(v22))) FEtype_error_list(v22);
        value0 = ECL_NIL;
        cl_env_copy->nvalues = 0;
        v19 = v22;
       }
       {
        cl_object v22;
        v22 = v21;
        if (ecl_unlikely(ECL_ATOM(v22))) FEtype_error_cons(v22);
        value0 = ECL_NIL;
        cl_env_copy->nvalues = 0;
        T8 = v22;
       }
       T9 = ecl_function_dispatch(cl_env_copy,v16)(1, v18);
       v21 = ecl_list1(T9);
       (ECL_CONS_CDR(T8)=v21,T8);
       goto L93;
L94:;
       T7 = ecl_cdr(v20);
       goto L84;
      }
     }
    }
L84:;
    T8 = CONS(ECL_SYM("LIST",483),T7);
    T9 = cl_list(6, ECL_SYM("CALL-CFUN",1666), VV[104], T5, T6, T8, v11call);
    T10 = cl_list(4, ECL_SYM("DEFUN",291), v13, T4, T9);
    value0 = cl_list(3, ECL_SYM("LET",479), T3, T10);
    return value0;
   }
  }
 }
}
static cl_object LC711def_lib_function_va(cl_narg narg, cl_object v12, cl_object v13, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[101]);
 {
  return LC711def_lib_function(v12, v13);
 }
}
/* local function DEF-FUNCTION                                                */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC713def_function(cl_object v1, cl_object v2)
{
 cl_object T0, T1, T2;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4name;
  cl_object v5args;
  cl_object v6;
  cl_object v7module;
  cl_object v8;
  cl_object v9returning;
  cl_object v10;
  cl_object v11call;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v12;
   v12 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4name = v12;
  }
  if (!(v3==ECL_NIL)){
   goto L10;
  }
  si_dm_too_few_arguments(v1);
L10:;
  {
   cl_object v12;
   v12 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v5args = v12;
  }
  v6 = si_search_keyword(v3, VV[99]);
  if (!((v6)==(ECL_SYM("MISSING-KEYWORD",2044)))){
   goto L17;
  }
  v7module = ECL_NIL;
  goto L16;
L17:;
  v7module = v6;
L16:;
  v8 = si_search_keyword(v3, VV[98]);
  if (!((v8)==(ECL_SYM("MISSING-KEYWORD",2044)))){
   goto L21;
  }
  v9returning = ECL_SYM("VOID",1424);
  goto L20;
L21:;
  v9returning = v8;
L20:;
  v10 = si_search_keyword(v3, VV[100]);
  if (!((v10)==(ECL_SYM("MISSING-KEYWORD",2044)))){
   goto L25;
  }
  v11call = ECL_SYM("DEFAULT",1246);
  goto L24;
L25:;
  v11call = v10;
L24:;
  si_check_keyword(2, v3, VV[107]);
  if (Null(v7module)){
   goto L28;
  }
  if (Null(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("*USE-DFFI*",2102)))){
   goto L28;
  }
  value0 = cl_list(9, VV[101], v4name, v5args, VV[98], v9returning, VV[99], v7module, VV[100], v11call);
  return value0;
L28:;
  {
   cl_object v12;                                 /*  C-NAME                  */
   cl_object v13;                                 /*  LISP-NAME               */
   value0 = L706lisp_to_c_name(v4name);
   {
    const int v14 = cl_env_copy->nvalues;
    v12 = value0;
    cl_object v15;
    v15 = (v14<=1)? ECL_NIL : cl_env_copy->values[1];
    v13 = v15;
   }
   {
    cl_object v14arguments;
    cl_object v15arg_types;
    cl_object v16return_type;
    cl_object v17nargs;
    cl_object v18c_string;
    cl_object v19casting_required;
    cl_object v20inline_form;
    {
     cl_object v21;
     v21 = (ECL_SYM("FIRST",373)->symbol.gfdef);
     {
      cl_object v22;
      cl_object v23;
      cl_object v24;
      {
       cl_object v25;
       v25 = v5args;
       if (ecl_unlikely(!ECL_LISTP(v25))) FEtype_error_list(v25);
       value0 = ECL_NIL;
       cl_env_copy->nvalues = 0;
       v22 = v25;
      }
      v23 = ECL_NIL;
      v24 = v22;
      {
       cl_object v25;
       cl_object v26;
       v25 = ecl_list1(ECL_NIL);
       v26 = v25;
L41:;
       if (!(ecl_endp(v24))){
        goto L43;
       }
       goto L42;
L43:;
       v23 = ECL_CONS_CAR(v24);
       {
        cl_object v27;
        v27 = ECL_CONS_CDR(v24);
        if (ecl_unlikely(!ECL_LISTP(v27))) FEtype_error_list(v27);
        value0 = ECL_NIL;
        cl_env_copy->nvalues = 0;
        v24 = v27;
       }
       {
        cl_object v27;
        v27 = v26;
        if (ecl_unlikely(ECL_ATOM(v27))) FEtype_error_cons(v27);
        value0 = ECL_NIL;
        cl_env_copy->nvalues = 0;
        T0 = v27;
       }
       T1 = ecl_function_dispatch(cl_env_copy,v21)(1, v23);
       v26 = ecl_list1(T1);
       (ECL_CONS_CDR(T0)=v26,T0);
       goto L41;
L42:;
       v14arguments = ecl_cdr(v25);
       goto L32;
      }
     }
    }
L32:;
    {
     cl_object v21;
     {
      cl_object v22;
      v22 = ecl_make_cfun_va((cl_objectfn)LC712__lambda489_va,ECL_NIL,Cblock,1);
      v21 = v22;
     }
     {
      cl_object v22;
      cl_object v23;
      cl_object v24;
      {
       cl_object v25;
       v25 = v5args;
       if (ecl_unlikely(!ECL_LISTP(v25))) FEtype_error_list(v25);
       value0 = ECL_NIL;
       cl_env_copy->nvalues = 0;
       v22 = v25;
      }
      v23 = ECL_NIL;
      v24 = v22;
      {
       cl_object v25;
       cl_object v26;
       v25 = ecl_list1(ECL_NIL);
       v26 = v25;
L68:;
       if (!(ecl_endp(v24))){
        goto L70;
       }
       goto L69;
L70:;
       v23 = ECL_CONS_CAR(v24);
       {
        cl_object v27;
        v27 = ECL_CONS_CDR(v24);
        if (ecl_unlikely(!ECL_LISTP(v27))) FEtype_error_list(v27);
        value0 = ECL_NIL;
        cl_env_copy->nvalues = 0;
        v24 = v27;
       }
       {
        cl_object v27;
        v27 = v26;
        if (ecl_unlikely(ECL_ATOM(v27))) FEtype_error_cons(v27);
        value0 = ECL_NIL;
        cl_env_copy->nvalues = 0;
        T0 = v27;
       }
       T1 = ecl_function_dispatch(cl_env_copy,v21)(1, v23);
       v26 = ecl_list1(T1);
       (ECL_CONS_CDR(T0)=v26,T0);
       goto L68;
L69:;
       v15arg_types = ecl_cdr(v25);
       goto L59;
      }
     }
    }
L59:;
    v16return_type = L708_convert_to_return_type(v9returning);
    v17nargs = ecl_make_fixnum(ecl_length(v14arguments));
    v18c_string = L709produce_function_call(v12, v17nargs);
    if (!((v16return_type)==(ECL_SYM("VOID",1424)))){
     goto L98;
    }
    value0 = VV[109];
    goto L96;
L98:;
    value0 = ECL_NIL;
    goto L96;
L96:;
    if (value0!=ECL_NIL) {
     goto L95;
    }
    if (!((v16return_type)==(ECL_SYM("CSTRING",1407)))){
     goto L101;
    }
    value0 = VV[110];
    goto L93;
L101:;
    value0 = ECL_NIL;
    goto L93;
L95:;
    goto L93;
L93:;
    if (value0!=ECL_NIL) {
     goto L92;
    }
    T0 = si_foreign_elt_type_p(v16return_type);
    goto L90;
L92:;
    T0 = value0;
    goto L90;
L90:;
    v19casting_required = Null(T0)?ECL_T:ECL_NIL;
    if (Null(v19casting_required)){
     goto L105;
    }
    T0 = ECL_SYM("POINTER-VOID",1420);
    goto L104;
L105:;
    T0 = v16return_type;
L104:;
    v20inline_form = cl_listX(6, ECL_SYM("C-INLINE",2106), v14arguments, v15arg_types, T0, v18c_string, VV[111]);
    if (Null(v19casting_required)){
     goto L107;
    }
    T0 = cl_list(2, ECL_SYM("QUOTE",682), v16return_type);
    T1 = cl_list(2, ECL_SYM("SIZE-OF-FOREIGN-TYPE",2150), T0);
    T2 = cl_list(2, ECL_SYM("QUOTE",682), v16return_type);
    v20inline_form = cl_list(4, ECL_SYM("FOREIGN-DATA-RECAST",1388), v20inline_form, T1, T2);
L107:;
    if (!((ecl_fixnum(v17nargs))>((cl_fixnum)(36)))){
     goto L110;
    }
    cl_error(1, VV[112]);
L110:;
    value0 = cl_list(4, ECL_SYM("DEFUN",291), v13, v14arguments, v20inline_form);
    return value0;
   }
  }
 }
}
static cl_object LC713def_function_va(cl_narg narg, cl_object v12, cl_object v13, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[113]);
 {
  return LC713def_function(v12, v13);
 }
}
/* local function DEF-FOREIGN-VAR                                             */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC714def_foreign_var(cl_object v1, cl_object v2)
{
 cl_object T0, T1, T2, T3, T4, T5, T6, T7;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4name;
  cl_object v5type;
  cl_object v6module;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v7;
   v7 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4name = v7;
  }
  if (!(v3==ECL_NIL)){
   goto L10;
  }
  si_dm_too_few_arguments(v1);
L10:;
  {
   cl_object v7;
   v7 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v5type = v7;
  }
  if (!(v3==ECL_NIL)){
   goto L16;
  }
  si_dm_too_few_arguments(v1);
L16:;
  {
   cl_object v7;
   v7 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v6module = v7;
  }
  if (Null(v3)){
   goto L21;
  }
  si_dm_too_many_arguments(v1);
L21:;
  {
   cl_object v7;                                  /*  C-NAME                  */
   cl_object v8;                                  /*  LISP-NAME               */
   value0 = L706lisp_to_c_name(v4name);
   {
    const int v9 = cl_env_copy->nvalues;
    v7 = value0;
    cl_object v10;
    v10 = (v9<=1)? ECL_NIL : cl_env_copy->values[1];
    v8 = v10;
   }
   {
    cl_object v9ffi_type;
    cl_object v10can_deref;
    cl_object v11inline_form;
    v9ffi_type = L664_convert_to_ffi_type(1, v5type);
    value0 = si_foreign_elt_type_p(v9ffi_type);
    if (value0!=ECL_NIL) {
     goto L27;
    }
    if (!(ECL_CONSP(v9ffi_type))){
     goto L30;
    }
    {
     cl_object v12;
     v12 = ecl_car(v9ffi_type);
     if (!((v12)==(ECL_SYM("*",20)))){
      goto L37;
     }
     value0 = VV[114];
     goto L35;
L37:;
     value0 = ECL_NIL;
     goto L35;
L35:;
     if (value0!=ECL_NIL) {
      goto L34;
     }
     if (!((v12)==(ECL_SYM("ARRAY",1229)))){
      goto L40;
     }
     v10can_deref = VV[115];
     goto L25;
L40:;
     v10can_deref = ECL_NIL;
     goto L25;
L34:;
     v10can_deref = value0;
     goto L25;
    }
L30:;
    v10can_deref = ECL_NIL;
    goto L25;
L27:;
    v10can_deref = value0;
    goto L25;
L25:;
    if (Null(v6module)){
     goto L43;
    }
    if (Null(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("*USE-DFFI*",2102)))){
     goto L43;
    }
    T0 = cl_list(2, ECL_SYM("QUOTE",682), v5type);
    T1 = L667size_of_foreign_type(v5type);
    v11inline_form = cl_list(5, ECL_SYM("FIND-FOREIGN-SYMBOL",1382), v7, v6module, T0, T1);
    goto L42;
L43:;
    T0 = L667size_of_foreign_type(v5type);
    T1 = cl_format(5, ECL_NIL, VV[116], v5type, T0, v7);
    v11inline_form = cl_listX(6, ECL_SYM("C-INLINE",2106), ECL_NIL, ECL_NIL, ECL_SYM("OBJECT",1315), T1, VV[117]);
L42:;
    if (Null(v10can_deref)){
     goto L46;
    }
    T0 = cl_list(2, ECL_SYM("QUOTE",682), v8);
    T1 = cl_list(4, ECL_SYM("PUT-SYSPROP",1150), T0, VV[118], v11inline_form);
    T2 = cl_list(2, ECL_SYM("QUOTE",682), v8);
    T3 = cl_list(3, ECL_SYM("GET-SYSPROP",1093), T2, VV[118]);
    T4 = cl_list(2, ECL_SYM("QUOTE",682), v5type);
    T5 = cl_list(3, ECL_SYM("DEREF-POINTER",2132), T3, T4);
    T6 = cl_list(3, ECL_SYM("DEFINE-SYMBOL-MACRO",284), v8, T5);
    T7 = cl_list(3, ECL_SYM("EVAL-WHEN",342), VV[4], T6);
    value0 = cl_list(3, ECL_SYM("PROGN",674), T1, T7);
    return value0;
L46:;
    value0 = cl_list(3, ECL_SYM("DEFPARAMETER",287), v8, v11inline_form);
    return value0;
   }
  }
 }
}
static cl_object LC714def_foreign_var_va(cl_narg narg, cl_object v7, cl_object v8, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[119]);
 {
  return LC714def_foreign_var(v7, v8);
 }
}
/* function definition for FIND-FOREIGN-LIBRARY                               */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L715find_foreign_library(cl_narg narg, cl_object v1names, cl_object v2directories, ...)
{
 cl_object T0, T1;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
 if (ecl_unlikely(narg<2)) FEwrong_num_arguments(VV[123]);
 {
  cl_object v3drive_letters;
  cl_object v4types;
  ecl_va_list args; ecl_va_start(args,v2directories,narg,2);
  {
   cl_object keyvars[4];
   cl_parse_key(args,2,L715find_foreign_librarykeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   v3drive_letters = keyvars[0];
   v4types = keyvars[1];
  }
  if (ECL_LISTP(v1names)) {
   goto L1;
  }
  v1names = ecl_list1(v1names);
L1:;
  if (ECL_LISTP(v2directories)) {
   goto L4;
  }
  v2directories = ecl_list1(v2directories);
L4:;
  if (v4types!=ECL_NIL) {
   goto L7;
  }
  v4types = VV[120];
L7:;
  if (ECL_LISTP(v4types)) {
   goto L10;
  }
  v4types = ecl_list1(v4types);
L10:;
  if (ECL_LISTP(v3drive_letters)) {
   goto L13;
  }
  v3drive_letters = ecl_list1(v3drive_letters);
L13:;
  v3drive_letters = VV[121];
  {
   cl_object v5;
   v5 = v3drive_letters;
   goto L22;
L21:;
   {
    cl_object v6d;
    v6d = ecl_car(v5);
    {
     cl_object v7;
     v7 = v2directories;
     goto L30;
L29:;
     {
      cl_object v8p;
      v8p = ecl_car(v7);
      {
       cl_object v9;
       v9 = v1names;
       goto L38;
L37:;
       {
        cl_object v10n;
        v10n = ecl_car(v9);
        {
         cl_object v11;
         v11 = v4types;
         goto L46;
L45:;
         {
          cl_object v12e;
          v12e = ecl_car(v11);
          {
          cl_object v13full_path;
          if (Null(cl_pathnamep(v8p))){
          goto L53;
          }
          T0 = cl_pathname_directory(1, v8p);
          goto L52;
L53:;
          if (!(ECL_STRINGP(v8p))){
          goto L55;
          }
          T1 = cl_parse_namestring(1, v8p);
          T0 = cl_pathname_directory(1, T1);
          goto L52;
L55:;
          if (!(ECL_LISTP(v8p))){
          goto L57;
          }
          T0 = v8p;
          goto L52;
L57:;
          T0 = si_etypecase_error(v8p, VV[122]);
L52:;
          T1 = cl_make_pathname(8, ECL_SYM("DEVICE",1248), v6d, ECL_SYM("DIRECTORY",1250), T0, ECL_SYM("NAME",1309), v10n, ECL_SYM("TYPE",1356), v12e);
          v13full_path = cl_probe_file(T1);
          if (Null(v13full_path)){
          goto L50;
          }
          value0 = v13full_path;
          cl_env_copy->nvalues = 1;
          return value0;
          }
L50:;
         }
         v11 = ecl_cdr(v11);
L46:;
         if (Null(v11)){
          goto L62;
         }
         goto L45;
L62:;
        }
       }
       v9 = ecl_cdr(v9);
L38:;
       if (Null(v9)){
        goto L66;
       }
       goto L37;
L66:;
      }
     }
     v7 = ecl_cdr(v7);
L30:;
     if (Null(v7)){
      goto L70;
     }
     goto L29;
L70:;
    }
   }
   v5 = ecl_cdr(v5);
L22:;
   if (Null(v5)){
    goto L74;
   }
   goto L21;
L74:;
  }
  value0 = ECL_NIL;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
/* function definition for DO-LOAD-FOREIGN-LIBRARY                            */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L716do_load_foreign_library(cl_narg narg, cl_object v1tmp, ...)
{
 cl_object T0, T1, T2, T3;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
 if (ecl_unlikely(narg<1)) FEwrong_num_arguments(VV[125]);
 if (ecl_unlikely(narg>2)) FEwrong_num_arguments(VV[125]);
 {
  cl_object v2system_library;
  va_list args; va_start(args,v1tmp);
  {
   int i = 1;
   if (i >= narg) {
    v2system_library = ECL_NIL;
   } else {
    i++;
    v2system_library = va_arg(args,cl_object);
   }
  }
  va_end(args);
  {
   cl_object v3path;
   cl_object v4filename;
   cl_object v5pack;
   cl_object v6flag;
   if (Null(cl_pathnamep(v1tmp))){
    goto L3;
   }
   v3path = v1tmp;
   goto L2;
L3:;
   v1tmp = cl_string(v1tmp);
   if (Null(cl_probe_file(v1tmp))){
    goto L5;
   }
   v3path = v1tmp;
   goto L2;
L5:;
   v3path = (cl_env_copy->function=(ECL_SYM("COMPILE-FILE-PATHNAME",237)->symbol.gfdef))->cfun.entry(3, v1tmp, ECL_SYM("TYPE",1356), VV[126]) /*  COMPILE-FILE-PATHNAME */;
L2:;
   v4filename = cl_namestring(v3path);
   v5pack = cl_find_package(VV[127]);
   if (Null(v2system_library)){
    goto L11;
   }
   v6flag = cl_concatenate(3, ECL_SYM("STRING",808), VV[128], v1tmp);
   goto L10;
L11:;
   v6flag = v4filename;
L10:;
   {
    cl_object v7;
    cl_object v8;
    v7 = ecl_cmp_symbol_value(cl_env_copy,VV[124]);
    v8 = (ECL_SYM("STRING-EQUAL",811)->symbol.gfdef);
    {
     cl_object v9;
     v9 = si_make_seq_iterator(2, v7, ecl_make_int8_t(0));
L18:;
     if (v9!=ECL_NIL) {
      goto L20;
     }
     goto L14;
L20:;
     {
      cl_object v10;
      v10 = si_seq_iterator_ref(v7, v9);
      if (Null(cl_string_equal(2, v4filename, v10))){
       goto L22;
      }
      if (v10!=ECL_NIL) {
       goto L13;
      }
      goto L14;
     }
L22:;
     v9 = si_seq_iterator_next(v7, v9);
     goto L18;
    }
   }
L14:;
   T0 = cl_intern(2, VV[133], v5pack);
   T1 = cl_intern(2, VV[133], v5pack);
   T2 = cl_symbol_value(T1);
   T3 = cl_concatenate(4, ECL_SYM("STRING",808), T2, VV[134], v6flag);
   cl_set(T0, T3);
   T0 = cl_intern(2, VV[135], v5pack);
   T1 = cl_intern(2, VV[135], v5pack);
   T2 = cl_symbol_value(T1);
   T3 = cl_concatenate(4, ECL_SYM("STRING",808), T2, VV[134], v6flag);
   cl_set(T0, T3);
   T0 = cl_intern(2, VV[136], v5pack);
   T1 = cl_intern(2, VV[136], v5pack);
   T2 = cl_symbol_value(T1);
   T3 = cl_concatenate(4, ECL_SYM("STRING",808), T2, VV[134], v6flag);
   cl_set(T0, T3);
   T0 = CONS(v4filename,ecl_cmp_symbol_value(cl_env_copy,VV[124]));
   ecl_cmp_setq(cl_env_copy,VV[124],T0);
L13:;
   value0 = ECL_T;
   cl_env_copy->nvalues = 1;
   return value0;
  }
 }
}
/* local function LOAD-FOREIGN-LIBRARY                                        */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC717load_foreign_library(cl_object v1, cl_object v2env)
{
 cl_object T0, T1, T2, T3;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4filename;
  cl_object v5;
  cl_object v6module;
  cl_object v7;
  cl_object v8supporting_libraries;
  cl_object v9;
  cl_object v10force_load;
  cl_object v11;
  cl_object v12system_library;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v13;
   v13 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4filename = v13;
  }
  v5 = si_search_keyword(v3, VV[99]);
  if (!((v5)==(ECL_SYM("MISSING-KEYWORD",2044)))){
   goto L11;
  }
  v6module = ECL_NIL;
  goto L10;
L11:;
  v6module = v5;
L10:;
  v7 = si_search_keyword(v3, VV[138]);
  if (!((v7)==(ECL_SYM("MISSING-KEYWORD",2044)))){
   goto L15;
  }
  v8supporting_libraries = ECL_NIL;
  goto L14;
L15:;
  v8supporting_libraries = v7;
L14:;
  v9 = si_search_keyword(v3, VV[139]);
  if (!((v9)==(ECL_SYM("MISSING-KEYWORD",2044)))){
   goto L19;
  }
  v10force_load = ECL_NIL;
  goto L18;
L19:;
  v10force_load = v9;
L18:;
  v11 = si_search_keyword(v3, VV[140]);
  if (!((v11)==(ECL_SYM("MISSING-KEYWORD",2044)))){
   goto L23;
  }
  v12system_library = ECL_NIL;
  goto L22;
L23:;
  v12system_library = v11;
L22:;
  si_check_keyword(2, v3, VV[141]);
  {
   cl_object v13;
   cl_object v14;
   if (Null(cl_constantp(2, v4filename, v2env))){
    goto L28;
   }
   T0 = (cl_env_copy->function=ecl_fdefinition(ECL_SYM("CONSTANT-FORM-VALUE",2161)))->cfun.entry(1, v12system_library) /*  CONSTANT-FORM-VALUE */;
   T1 = cl_list(3, VV[125], v4filename, T0);
   T2 = cl_list(3, ECL_SYM("EVAL-WHEN",342), VV[142], T1);
   T3 = cl_listX(4, ECL_SYM("WITH-BACKEND",1874), ECL_SYM("C/C++",1876), T2, VV[143]);
   v13 = ecl_list1(T3);
   goto L26;
L28:;
   v13 = ECL_NIL;
   goto L26;
L26:;
   if (v12system_library!=ECL_NIL) {
    goto L31;
   }
   if (Null(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("*USE-DFFI*",2102)))){
    goto L31;
   }
   T0 = cl_list(2, ECL_SYM("LOAD-FOREIGN-MODULE",1397), v4filename);
   v14 = ecl_list1(T0);
   goto L30;
L31:;
   v14 = ECL_NIL;
L30:;
   T0 = ecl_append(v13,v14);
   value0 = CONS(ECL_SYM("PROGN",674),T0);
   cl_env_copy->nvalues = 1;
   return value0;
  }
 }
}
static cl_object LC717load_foreign_library_va(cl_narg narg, cl_object v15, cl_object v16env, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[144]);
 {
  return LC717load_foreign_library(v15, v16env);
 }
}
/* local function DEFCALLBACK                                                 */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC718defcallback(cl_object v1, cl_object v2)
{
 cl_object T0, T1, T2, T3, T4;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4name;
  cl_object v5ret_type;
  cl_object v6arg_desc;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v7;
   v7 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4name = v7;
  }
  if (!(v3==ECL_NIL)){
   goto L10;
  }
  si_dm_too_few_arguments(v1);
L10:;
  {
   cl_object v7;
   v7 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v5ret_type = v7;
  }
  if (!(v3==ECL_NIL)){
   goto L16;
  }
  si_dm_too_few_arguments(v1);
L16:;
  {
   cl_object v7;
   v7 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v6arg_desc = v7;
  }
  if (Null(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("*USE-DFFI*",2102)))){
   goto L21;
  }
  {
   cl_object v7;                                  /*  NAME                    */
   cl_object v8;                                  /*  CALL-TYPE               */
   if (!(ECL_CONSP(v4name))){
    goto L24;
   }
   value0 = cl_values_list(v4name);
   goto L23;
L24:;
   cl_env_copy->nvalues = 2;
   cl_env_copy->values[1] = ECL_SYM("DEFAULT",1246);
   cl_env_copy->values[0] = v4name;
   value0 = cl_env_copy->values[0];
L23:;
   {
    const int v9 = cl_env_copy->nvalues;
    v7 = value0;
    cl_object v10;
    v10 = (v9<=1)? ECL_NIL : cl_env_copy->values[1];
    v8 = v10;
   }
   {
    cl_object v9;
    cl_object v10;
    cl_object v11;
    {
     cl_object v12;
     v12 = (ECL_SYM("SECOND",743)->symbol.gfdef);
     {
      cl_object v13;
      cl_object v14;
      cl_object v15;
      {
       cl_object v16;
       v16 = v6arg_desc;
       if (ecl_unlikely(!ECL_LISTP(v16))) FEtype_error_list(v16);
       value0 = ECL_NIL;
       cl_env_copy->nvalues = 0;
       v13 = v16;
      }
      v14 = ECL_NIL;
      v15 = v13;
      {
       cl_object v16;
       cl_object v17;
       v16 = ecl_list1(ECL_NIL);
       v17 = v16;
L35:;
       if (!(ecl_endp(v15))){
        goto L37;
       }
       goto L36;
L37:;
       v14 = ECL_CONS_CAR(v15);
       {
        cl_object v18;
        v18 = ECL_CONS_CDR(v15);
        if (ecl_unlikely(!ECL_LISTP(v18))) FEtype_error_list(v18);
        value0 = ECL_NIL;
        cl_env_copy->nvalues = 0;
        v15 = v18;
       }
       {
        cl_object v18;
        v18 = v17;
        if (ecl_unlikely(ECL_ATOM(v18))) FEtype_error_cons(v18);
        value0 = ECL_NIL;
        cl_env_copy->nvalues = 0;
        T0 = v18;
       }
       T1 = ecl_function_dispatch(cl_env_copy,v12)(1, v14);
       v17 = ecl_list1(T1);
       (ECL_CONS_CDR(T0)=v17,T0);
       goto L35;
L36:;
       v9 = ecl_cdr(v16);
       goto L26;
      }
     }
    }
L26:;
    {
     cl_object v12;
     v12 = (ECL_SYM("FIRST",373)->symbol.gfdef);
     {
      cl_object v13;
      cl_object v14;
      cl_object v15;
      {
       cl_object v16;
       v16 = v6arg_desc;
       if (ecl_unlikely(!ECL_LISTP(v16))) FEtype_error_list(v16);
       value0 = ECL_NIL;
       cl_env_copy->nvalues = 0;
       v13 = v16;
      }
      v14 = ECL_NIL;
      v15 = v13;
      {
       cl_object v16;
       cl_object v17;
       v16 = ecl_list1(ECL_NIL);
       v17 = v16;
L62:;
       if (!(ecl_endp(v15))){
        goto L64;
       }
       goto L63;
L64:;
       v14 = ECL_CONS_CAR(v15);
       {
        cl_object v18;
        v18 = ECL_CONS_CDR(v15);
        if (ecl_unlikely(!ECL_LISTP(v18))) FEtype_error_list(v18);
        value0 = ECL_NIL;
        cl_env_copy->nvalues = 0;
        v15 = v18;
       }
       {
        cl_object v18;
        v18 = v17;
        if (ecl_unlikely(ECL_ATOM(v18))) FEtype_error_cons(v18);
        value0 = ECL_NIL;
        cl_env_copy->nvalues = 0;
        T0 = v18;
       }
       T1 = ecl_function_dispatch(cl_env_copy,v12)(1, v14);
       v17 = ecl_list1(T1);
       (ECL_CONS_CDR(T0)=v17,T0);
       goto L62;
L63:;
       v10 = ecl_cdr(v16);
       goto L53;
      }
     }
    }
L53:;
    if (!((v5ret_type)==(ECL_NIL))){
     goto L86;
    }
    goto L83;
L86:;
    goto L84;
L84:;
    if (!((v5ret_type)==(ECL_SYM("VOID",1424)))){
     goto L81;
    }
    goto L82;
L83:;
L82:;
    v11 = ECL_SYM("VOID",1424);
    goto L80;
L81:;
    if (Null(cl_typep(2, v5ret_type, VV[147]))){
     goto L89;
    }
    v11 = ECL_SYM("POINTER-VOID",1420);
    goto L80;
L89:;
    v11 = v5ret_type;
L80:;
    T0 = cl_listX(4, ECL_SYM("LAMBDA-BLOCK",1377), v7, v10, v3);
    T1 = cl_list(2, ECL_SYM("FUNCTION",398), T0);
    T2 = cl_list(2, ECL_SYM("QUOTE",682), v7);
    T3 = cl_list(2, ECL_SYM("QUOTE",682), v11);
    T4 = cl_list(2, ECL_SYM("QUOTE",682), v9);
    value0 = cl_list(6, ECL_SYM("MAKE-DYNAMIC-CALLBACK",1668), T1, T2, T3, T4, v8);
    return value0;
   }
  }
L21:;
  value0 = cl_error(1, VV[148]);
  return value0;
 }
}
static cl_object LC718defcallback_va(cl_narg narg, cl_object v7, cl_object v8, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[149]);
 {
  return LC718defcallback(v7, v8);
 }
}
/* function definition for CALLBACK                                           */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L719callback(cl_object v1name)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v2x;
  v2x = si_get_sysprop(v1name, ECL_SYM("CALLBACK",1667));
  if (v2x!=ECL_NIL) {
   goto L3;
  }
  cl_error(2, VV[150], v1name);
L3:;
  value0 = v2x;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
static cl_object L719callback_va(cl_narg narg, cl_object v3name, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[151]);
 {
  return L719callback(v3name);
 }
}
/* function definition for CLINES                                             */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L720clines(cl_narg narg, ...)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
 {
  cl_object v1c_c___code;
  ecl_va_list args; ecl_va_start(args,narg,narg,0);
  v1c_c___code = cl_grab_rest_args(args);
  ecl_va_end(args);
  value0 = cl_error(2, VV[152], v1c_c___code);
  return value0;
 }
}
/* local function C-INLINE                                                    */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC721c_inline(cl_object v1, cl_object v2)
{
 cl_object T0, T1, T2, T3;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4lisp_values;
  cl_object v5arg_c_types;
  cl_object v6return_type;
  cl_object v7c_c___code;
  cl_object v8;
  cl_object v9side_effects;
  cl_object v10;
  cl_object v11one_liner;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v12;
   v12 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4lisp_values = v12;
  }
  if (!(v3==ECL_NIL)){
   goto L10;
  }
  si_dm_too_few_arguments(v1);
L10:;
  {
   cl_object v12;
   v12 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v5arg_c_types = v12;
  }
  if (!(v3==ECL_NIL)){
   goto L16;
  }
  si_dm_too_few_arguments(v1);
L16:;
  {
   cl_object v12;
   v12 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v6return_type = v12;
  }
  if (!(v3==ECL_NIL)){
   goto L22;
  }
  si_dm_too_few_arguments(v1);
L22:;
  {
   cl_object v12;
   v12 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v7c_c___code = v12;
  }
  v8 = si_search_keyword(v3, VV[154]);
  if (!((v8)==(ECL_SYM("MISSING-KEYWORD",2044)))){
   goto L29;
  }
  v9side_effects = ECL_T;
  goto L28;
L29:;
  v9side_effects = v8;
L28:;
  v10 = si_search_keyword(v3, VV[155]);
  if (!((v10)==(ECL_SYM("MISSING-KEYWORD",2044)))){
   goto L33;
  }
  v11one_liner = ECL_NIL;
  goto L32;
L33:;
  v11one_liner = v10;
L32:;
  si_check_keyword(2, v3, VV[156]);
  T0 = CONS(ECL_SYM("LIST",483),v4lisp_values);
  T1 = cl_list(2, ECL_SYM("QUOTE",682), v5arg_c_types);
  T2 = cl_list(2, ECL_SYM("QUOTE",682), v6return_type);
  T3 = cl_list(9, ECL_SYM("LIST",483), T0, T1, T2, v7c_c___code, VV[154], v9side_effects, VV[155], v11one_liner);
  value0 = cl_list(3, ECL_SYM("ERROR",339), VV[157], T3);
  return value0;
 }
}
static cl_object LC721c_inline_va(cl_narg narg, cl_object v12, cl_object v13, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[158]);
 {
  return LC721c_inline(v12, v13);
 }
}
/* local function C-PROGN                                                     */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC722c_progn(cl_object v1, cl_object v2)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4args;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v5;
   v5 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4args = v5;
  }
  value0 = VV[159];
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
static cl_object LC722c_progn_va(cl_narg narg, cl_object v5, cl_object v6, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[160]);
 {
  return LC722c_progn(v5, v6);
 }
}
/* local function DEFINLINE                                                   */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC723definline(cl_object v1, cl_object v2)
{
 cl_object T0, T1, T2, T3, T4;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4fun;
  cl_object v5arg_types;
  cl_object v6type;
  cl_object v7code;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v8;
   v8 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4fun = v8;
  }
  if (!(v3==ECL_NIL)){
   goto L10;
  }
  si_dm_too_few_arguments(v1);
L10:;
  {
   cl_object v8;
   v8 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v5arg_types = v8;
  }
  if (!(v3==ECL_NIL)){
   goto L16;
  }
  si_dm_too_few_arguments(v1);
L16:;
  {
   cl_object v8;
   v8 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v6type = v8;
  }
  if (!(v3==ECL_NIL)){
   goto L22;
  }
  si_dm_too_few_arguments(v1);
L22:;
  {
   cl_object v8;
   v8 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v7code = v8;
  }
  if (Null(v3)){
   goto L27;
  }
  si_dm_too_many_arguments(v1);
L27:;
  T0 = cl_list(5, ECL_SYM("DEFCBODY",2127), v4fun, v5arg_types, v6type, v7code);
  T1 = cl_list(3, ECL_SYM("FUNCTION",398), v5arg_types, v6type);
  T2 = cl_list(3, ECL_SYM("FTYPE",395), T1, v4fun);
  T3 = cl_list(2, ECL_SYM("DECLAIM",274), T2);
  T4 = cl_list(6, VV[162], v4fun, VV[163], v5arg_types, v6type, v7code);
  value0 = cl_list(5, ECL_SYM("EVAL-WHEN",342), VV[4], T0, T3, T4);
  return value0;
 }
}
static cl_object LC723definline_va(cl_narg narg, cl_object v8, cl_object v9, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[164]);
 {
  return LC723definline(v8, v9);
 }
}
/* local function DEFLA                                                       */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC724defla(cl_object v1, cl_object v2)
{
 cl_object T0;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4name;
  cl_object v5args;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v6;
   v6 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4name = v6;
  }
  if (!(v3==ECL_NIL)){
   goto L10;
  }
  si_dm_too_few_arguments(v1);
L10:;
  {
   cl_object v6;
   v6 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v5args = v6;
  }
  T0 = cl_listX(4, ECL_SYM("DEFUN",291), v4name, v5args, v3);
  value0 = cl_list(3, ECL_SYM("EVAL-WHEN",342), VV[165], T0);
  return value0;
 }
}
static cl_object LC724defla_va(cl_narg narg, cl_object v6, cl_object v7, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[166]);
 {
  return LC724defla(v6, v7);
 }
}
/* local function DEFCBODY                                                    */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC726defcbody(cl_object v1, cl_object v2)
{
 cl_object T0, T1;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4name;
  cl_object v5arg_types;
  cl_object v6result_type;
  cl_object v7c_expression;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v8;
   v8 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4name = v8;
  }
  if (!(v3==ECL_NIL)){
   goto L10;
  }
  si_dm_too_few_arguments(v1);
L10:;
  {
   cl_object v8;
   v8 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v5arg_types = v8;
  }
  if (!(v3==ECL_NIL)){
   goto L16;
  }
  si_dm_too_few_arguments(v1);
L16:;
  {
   cl_object v8;
   v8 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v6result_type = v8;
  }
  if (!(v3==ECL_NIL)){
   goto L22;
  }
  si_dm_too_few_arguments(v1);
L22:;
  {
   cl_object v8;
   v8 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v7c_expression = v8;
  }
  if (Null(v3)){
   goto L27;
  }
  si_dm_too_many_arguments(v1);
L27:;
  {
   cl_object v8args;
   {
    cl_object v9;
    {
     cl_object v10;
     v10 = ecl_make_cfun_va((cl_objectfn)LC725__lambda687_va,ECL_NIL,Cblock,1);
     v9 = v10;
    }
    {
     cl_object v10;
     cl_object v11;
     cl_object v12;
     {
      cl_object v13;
      v13 = v5arg_types;
      if (ecl_unlikely(!ECL_LISTP(v13))) FEtype_error_list(v13);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
      v10 = v13;
     }
     v11 = ECL_NIL;
     v12 = v10;
     {
      cl_object v13;
      cl_object v14;
      v13 = ecl_list1(ECL_NIL);
      v14 = v13;
L38:;
      if (!(ecl_endp(v12))){
       goto L40;
      }
      goto L39;
L40:;
      v11 = ECL_CONS_CAR(v12);
      {
       cl_object v15;
       v15 = ECL_CONS_CDR(v12);
       if (ecl_unlikely(!ECL_LISTP(v15))) FEtype_error_list(v15);
       value0 = ECL_NIL;
       cl_env_copy->nvalues = 0;
       v12 = v15;
      }
      {
       cl_object v15;
       v15 = v14;
       if (ecl_unlikely(ECL_ATOM(v15))) FEtype_error_cons(v15);
       value0 = ECL_NIL;
       cl_env_copy->nvalues = 0;
       T0 = v15;
      }
      T1 = ecl_function_dispatch(cl_env_copy,v9)(1, v11);
      v14 = ecl_list1(T1);
      (ECL_CONS_CDR(T0)=v14,T0);
      goto L38;
L39:;
      v8args = ecl_cdr(v13);
      goto L29;
     }
    }
   }
L29:;
   T0 = cl_listX(6, ECL_SYM("C-INLINE",2106), v8args, v5arg_types, v6result_type, v7c_expression, VV[168]);
   value0 = cl_list(4, ECL_SYM("DEFUN",291), v4name, v8args, T0);
   return value0;
  }
 }
}
static cl_object LC726defcbody_va(cl_narg narg, cl_object v9, cl_object v10, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[169]);
 {
  return LC726defcbody(v9, v10);
 }
}
/* local function DEFENTRY                                                    */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC728defentry(cl_object v1, cl_object v2)
{
 cl_object T0, T1;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4name;
  cl_object v5arg_types;
  cl_object v6c_name;
  cl_object v7;
  cl_object v8no_interrupts;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v9;
   v9 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4name = v9;
  }
  if (!(v3==ECL_NIL)){
   goto L10;
  }
  si_dm_too_few_arguments(v1);
L10:;
  {
   cl_object v9;
   v9 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v5arg_types = v9;
  }
  if (!(v3==ECL_NIL)){
   goto L16;
  }
  si_dm_too_few_arguments(v1);
L16:;
  {
   cl_object v9;
   v9 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v6c_name = v9;
  }
  v7 = si_search_keyword(v3, VV[170]);
  if (!((v7)==(ECL_SYM("MISSING-KEYWORD",2044)))){
   goto L23;
  }
  v8no_interrupts = ECL_NIL;
  goto L22;
L23:;
  v8no_interrupts = v7;
L22:;
  si_check_keyword(2, v3, VV[171]);
  {
   cl_object v9;
   cl_object v10output_type;
   {
    cl_object v11;
    {
     cl_object v12;
     v12 = ecl_make_cfun_va((cl_objectfn)LC727__lambda718_va,ECL_NIL,Cblock,1);
     v11 = v12;
    }
    {
     cl_object v12;
     cl_object v13;
     cl_object v14;
     {
      cl_object v15;
      v15 = v5arg_types;
      if (ecl_unlikely(!ECL_LISTP(v15))) FEtype_error_list(v15);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
      v12 = v15;
     }
     v13 = ECL_NIL;
     v14 = v12;
     {
      cl_object v15;
      cl_object v16;
      v15 = ecl_list1(ECL_NIL);
      v16 = v15;
L35:;
      if (!(ecl_endp(v14))){
       goto L37;
      }
      goto L36;
L37:;
      v13 = ECL_CONS_CAR(v14);
      {
       cl_object v17;
       v17 = ECL_CONS_CDR(v14);
       if (ecl_unlikely(!ECL_LISTP(v17))) FEtype_error_list(v17);
       value0 = ECL_NIL;
       cl_env_copy->nvalues = 0;
       v14 = v17;
      }
      {
       cl_object v17;
       v17 = v16;
       if (ecl_unlikely(ECL_ATOM(v17))) FEtype_error_cons(v17);
       value0 = ECL_NIL;
       cl_env_copy->nvalues = 0;
       T0 = v17;
      }
      T1 = ecl_function_dispatch(cl_env_copy,v11)(1, v13);
      v16 = ecl_list1(T1);
      (ECL_CONS_CDR(T0)=v16,T0);
      goto L35;
L36:;
      v9 = ecl_cdr(v15);
      goto L26;
     }
    }
   }
L26:;
   v10output_type = ECL_SYM("OBJECT",1315);
   if (!(ECL_CONSP(v6c_name))){
    goto L54;
   }
   v10output_type = ecl_car(v6c_name);
   v6c_name = ecl_cadr(v6c_name);
L54:;
   {
    cl_object v11call;
    cl_object v12full_text;
    T0 = cl_string(v6c_name);
    {
     cl_fixnum v13;
     v13 = ecl_length(v5arg_types);
     v11call = L709produce_function_call(T0, ecl_make_fixnum(v13));
    }
    if (Null(v8no_interrupts)){
     goto L61;
    }
    v12full_text = cl_concatenate(4, ECL_SYM("STRING",808), VV[173], v11call, VV[174]);
    goto L60;
L61:;
    v12full_text = v11call;
L60:;
    T0 = Null(v8no_interrupts)?ECL_T:ECL_NIL;
    T1 = cl_list(7, ECL_SYM("C-INLINE",2106), v9, v5arg_types, v10output_type, v12full_text, VV[155], T0);
    value0 = cl_list(4, ECL_SYM("DEFUN",291), v4name, v9, T1);
    return value0;
   }
  }
 }
}
static cl_object LC728defentry_va(cl_narg narg, cl_object v13, cl_object v14, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[175]);
 {
  return LC728defentry(v13, v14);
 }
}
/* local function LAMBDA60                                                    */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC666__lambda60(cl_object v1field)
{
 cl_object T0;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v2;                                   /*  FIELD-ALIGN             */
  T0 = ecl_cadr(v1field);
  value0 = L667size_of_foreign_type(T0);
  {
   const int v3 = cl_env_copy->nvalues;
   cl_object v4;
   v4 = (v3<=1)? ECL_NIL : cl_env_copy->values[1];
   v2 = v4;
  }
  value0 = v2;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
static cl_object LC666__lambda60_va(cl_narg narg, cl_object v2field, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[18]);
 {
  return LC666__lambda60(v2field);
 }
}
/* local function LAMBDA442                                                   */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC710__lambda442(cl_object v1a)
{
 cl_object T0;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 T0 = ecl_cadr(v1a);
 value0 = L707_convert_to_arg_type(T0);
 return value0;
}
static cl_object LC710__lambda442_va(cl_narg narg, cl_object v2a, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[103]);
 {
  return LC710__lambda442(v2a);
 }
}
/* local function LAMBDA489                                                   */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC712__lambda489(cl_object v1type)
{
 cl_object T0;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 T0 = ecl_cadr(v1type);
 value0 = L707_convert_to_arg_type(T0);
 return value0;
}
static cl_object LC712__lambda489_va(cl_narg narg, cl_object v2type, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[108]);
 {
  return LC712__lambda489(v2type);
 }
}
/* local function LAMBDA687                                                   */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC725__lambda687(cl_object v1x)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 value0 = cl_gensym(0);
 return value0;
}
static cl_object LC725__lambda687_va(cl_narg narg, cl_object v2x, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[167]);
 {
  return LC725__lambda687(v2x);
 }
}
/* local function LAMBDA718                                                   */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC727__lambda718(cl_object v1x)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 value0 = cl_gensym(0);
 return value0;
}
static cl_object LC727__lambda718_va(cl_narg narg, cl_object v2x, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[172]);
 {
  return LC727__lambda718(v2x);
 }
}
#include "lsp/ffi.data"
#ifdef __cplusplus
extern "C"
#endif

ECL_DLLEXPORT void _ecl5MX3foVtPdEo9_8DzzL881(cl_object flag)
{
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 cl_object *VVtemp;
 if (flag != OBJNULL){
 Cblock = flag;
 #ifndef ECL_DYNAMIC_VV
 flag->cblock.data = VV;
 #endif
 flag->cblock.data_size = VM;
 flag->cblock.temp_data_size = VMtemp;
 flag->cblock.data_text = compiler_data_text;
 flag->cblock.cfuns_size = compiler_cfuns_size;
 flag->cblock.cfuns = compiler_cfuns;
 flag->cblock.source = ecl_make_constant_base_string("SRC:LSP;FFI.LSP.NEWEST",-1);
 return;}
 #ifdef ECL_DYNAMIC_VV
 VV = Cblock->cblock.data;
 #endif
 Cblock->cblock.data_text = (const cl_object *)"@EcLtAg:_ecl5MX3foVtPdEo9_8DzzL881@";
 VVtemp = Cblock->cblock.temp_data;
 ECL_DEFINE_SETF_FUNCTIONS
 {
  cl_object T0;
  cl_object volatile env0 = ECL_NIL;
/* MAKE-LOAD-FORMs                                                            */
/* TOP-LEVEL-FORMs                                                            */
  si_select_package(VVtemp[0]);
  cl_import(1, ECL_SYM("NULL-POINTER-P",1399));
  cl_export(1, ECL_SYM("NULL-POINTER-P",1399));
  ecl_cmp_defmacro(VV[176]);                      /*  DEF-CONSTANT            */
  si_Xmake_special(VV[6]);
  T0 = cl_make_hash_table(2, ECL_SYM("SIZE",1345), ecl_make_uint8_t(128));
  ecl_cmp_setq(cl_env_copy,VV[6],T0);
  si_Xmake_special(ECL_SYM("*USE-DFFI*",2102));
  T0 = ECL_T;
  ecl_cmp_setq(cl_env_copy,ECL_SYM("*USE-DFFI*",2102),T0);
  ecl_cmp_defmacro(VV[177]);                      /*  DEF-FOREIGN-TYPE        */
  ecl_cmp_defmacro(VV[178]);                      /*  DEF-TYPE                */
  ecl_cmp_defun(VV[179]);                         /*  %CONVERT-TO-FFI-TYPE    */
  ecl_cmp_defmacro(VV[180]);                      /*  %ALIGN-DATA             */
  ecl_cmp_defun(VV[181]);                         /*  SIZE-OF-FOREIGN-TYPE    */
  ecl_cmp_defun(VV[182]);                         /*  ALLOCATE-FOREIGN-OBJECT */
  ecl_cmp_defun(VV[183]);                         /*  FREE-FOREIGN-OBJECT     */
  ecl_cmp_defmacro(VV[184]);                      /*  DEF-ENUM                */
  ecl_cmp_defmacro(VV[185]);                      /*  DEF-STRUCT              */
  ecl_cmp_defun(VV[186]);                         /*  SLOT-POSITION           */
  ecl_cmp_defun(VV[187]);                         /*  GET-SLOT-VALUE          */
  ecl_cmp_defun(VV[188]);                         /*  (SETF GET-SLOT-VALUE)   */
  ecl_cmp_defun(VV[189]);                         /*  GET-SLOT-POINTER        */
  ecl_cmp_defmacro(VV[190]);                      /*  DEF-ARRAY-POINTER       */
  ecl_cmp_defun(VV[191]);                         /*  DEREF-ARRAY             */
  ecl_cmp_defun(VV[192]);                         /*  (SETF DEREF-ARRAY)      */
  ecl_cmp_defun(VV[193]);                         /*  %FOREIGN-DATA-SET       */
  ecl_cmp_defun(VV[194]);                         /*  %FOREIGN-DATA-REF       */
  ecl_cmp_defmacro(VV[195]);                      /*  DEF-UNION               */
  si_Xmake_special(ECL_SYM("+NULL-CSTRING-POINTER+",2103));
  T0 = si_allocate_foreign_data(ECL_SYM("POINTER-VOID",1420), ecl_make_int8_t(0));
  ecl_cmp_setq(cl_env_copy,ECL_SYM("+NULL-CSTRING-POINTER+",2103),T0);
  ecl_cmp_defun(VV[196]);                         /*  POINTER-ADDRESS         */
  ecl_cmp_defun(VV[197]);                         /*  DEREF-POINTER           */
  ecl_cmp_defun(VV[198]);                         /*  (SETF DEREF-POINTER)    */
  ecl_cmp_defun(VV[199]);                         /*  MAKE-NULL-POINTER       */
  ecl_cmp_defun(VV[200]);                         /*  MAKE-POINTER            */
  ecl_cmp_defun(VV[201]);                         /*  NULL-CHAR-P             */
  ecl_cmp_defun(VV[202]);                         /*  ENSURE-CHAR-CHARACTER   */
  ecl_cmp_defun(VV[203]);                         /*  ENSURE-CHAR-INTEGER     */
  ecl_cmp_defun(VV[204]);                         /*  ENSURE-CHAR-STORABLE    */
  ecl_cmp_defun(VV[205]);                         /*  CHAR-ARRAY-TO-POINTER   */
  ecl_cmp_defmacro(VV[206]);                      /*  CONVERT-FROM-CSTRING    */
  ecl_cmp_defmacro(VV[207]);                      /*  CONVERT-TO-CSTRING      */
  ecl_cmp_defmacro(VV[208]);                      /*  FREE-CSTRING            */
  ecl_cmp_defmacro(VV[209]);                      /*  WITH-CSTRING            */
  ecl_cmp_defmacro(VV[210]);                      /*  WITH-CSTRINGS           */
  ecl_cmp_defun(VV[211]);                         /*  FOREIGN-STRING-LENGTH   */
  ecl_cmp_defun(VV[212]);                         /*  CONVERT-FROM-FOREIGN-STRING */
  ecl_cmp_defun(VV[213]);                         /*  CONVERT-TO-FOREIGN-STRING */
  ecl_cmp_defun(VV[214]);                         /*  ALLOCATE-FOREIGN-STRING */
  ecl_cmp_defmacro(VV[215]);                      /*  WITH-FOREIGN-STRING     */
  ecl_cmp_defmacro(VV[216]);                      /*  WITH-FOREIGN-STRINGS    */
  ecl_cmp_defmacro(VV[217]);                      /*  WITH-FOREIGN-OBJECT     */
  ecl_cmp_defmacro(VV[218]);                      /*  WITH-FOREIGN-OBJECTS    */
  ecl_cmp_defmacro(VV[219]);                      /*  WITH-CAST-POINTER       */
  ecl_cmp_defun(VV[220]);                         /*  LISP-TO-C-NAME          */
  ecl_cmp_defun(VV[221]);                         /*  %CONVERT-TO-ARG-TYPE    */
  ecl_cmp_defun(VV[222]);                         /*  %CONVERT-TO-RETURN-TYPE */
  (void)0; /* No entry created for PRODUCE-FUNCTION-CALL */
  ecl_cmp_defmacro(VV[223]);                      /*  DEF-LIB-FUNCTION        */
  ecl_cmp_defmacro(VV[224]);                      /*  DEF-FUNCTION            */
  ecl_cmp_defmacro(VV[225]);                      /*  DEF-FOREIGN-VAR         */
  ecl_cmp_defun(VV[226]);                         /*  FIND-FOREIGN-LIBRARY    */
  si_Xmake_special(VV[124]);
  T0 = ECL_NIL;
  ecl_cmp_setq(cl_env_copy,VV[124],T0);
  ecl_cmp_defun(VV[227]);                         /*  DO-LOAD-FOREIGN-LIBRARY */
  ecl_cmp_defmacro(VV[228]);                      /*  LOAD-FOREIGN-LIBRARY    */
  ecl_cmp_defmacro(VV[229]);                      /*  DEFCALLBACK             */
  ecl_cmp_defun(VV[230]);                         /*  CALLBACK                */
  ecl_cmp_defun(VV[231]);                         /*  CLINES                  */
  ecl_cmp_defmacro(VV[232]);                      /*  C-INLINE                */
  ecl_cmp_defmacro(VV[233]);                      /*  C-PROGN                 */
  ecl_cmp_defmacro(VV[234]);                      /*  DEFINLINE               */
  ecl_cmp_defmacro(VV[235]);                      /*  DEFLA                   */
  ecl_cmp_defmacro(VV[236]);                      /*  DEFCBODY                */
  ecl_cmp_defmacro(VV[237]);                      /*  DEFENTRY                */
 }
}
