/* Compiler: ECL 26.3.27                                                      */
/* Source: /build/ecl/src/ecl-26.3.27/contrib/ecl-cdb/ecl-cdb.lisp            */
#include <ecl/ecl-cmp.h>
#include "ext/ecl-cdb.eclh"
/* function definition for MAKE-CDB                                           */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L4173make_cdb(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 v1;
  cl_object v2;
  cl_object v3;
  cl_object v4;
  cl_object v5;
  ecl_va_list args; ecl_va_start(args,narg,narg,0);
  {
   cl_object keyvars[10];
   cl_parse_key(args,5,L4173make_cdbkeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   v1 = keyvars[0];
   v2 = keyvars[1];
   v3 = keyvars[2];
   v4 = keyvars[3];
   v5 = keyvars[4];
  }
  value0 = si_make_structure(6, VV[6], v1, v2, v3, v4, v5);
  return value0;
 }
}
/* local function LAMBDA2                                                     */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC4174__lambda2(cl_object v1, cl_object v2si__x)
{
 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 v4;
  v3 = cl_gensym(0);
  v4 = cl_gensym(0);
  T0 = cl_list(2, ECL_SYM("QUOTE",682), VV[2]);
  T1 = cl_list(6, ECL_SYM("COMPARE-AND-SWAP-STRUCTURE",1527), v2si__x, T0, ecl_make_int8_t(4), v3, v4);
  T2 = cl_list(2, ECL_SYM("QUOTE",682), VV[2]);
  T3 = cl_list(4, ECL_SYM("STRUCTURE-REF",1178), v2si__x, T2, ecl_make_int8_t(4));
  cl_env_copy->nvalues = 6;
  cl_env_copy->values[5] = T3;
  cl_env_copy->values[4] = T1;
  cl_env_copy->values[3] = v4;
  cl_env_copy->values[2] = v3;
  cl_env_copy->values[1] = ECL_NIL;
  cl_env_copy->values[0] = ECL_NIL;
  return cl_env_copy->values[0];
 }
}
static cl_object LC4174__lambda2_va(cl_narg narg, cl_object v5, cl_object v6si__x, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[10]);
 {
  return LC4174__lambda2(v5, v6si__x);
 }
}
/* local function LAMBDA7                                                     */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC4175__lambda7(cl_object v1, cl_object v2si__x)
{
 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 v4;
  v3 = cl_gensym(0);
  v4 = cl_gensym(0);
  T0 = cl_list(2, ECL_SYM("QUOTE",682), VV[2]);
  T1 = cl_list(6, ECL_SYM("COMPARE-AND-SWAP-STRUCTURE",1527), v2si__x, T0, ecl_make_int8_t(3), v3, v4);
  T2 = cl_list(2, ECL_SYM("QUOTE",682), VV[2]);
  T3 = cl_list(4, ECL_SYM("STRUCTURE-REF",1178), v2si__x, T2, ecl_make_int8_t(3));
  cl_env_copy->nvalues = 6;
  cl_env_copy->values[5] = T3;
  cl_env_copy->values[4] = T1;
  cl_env_copy->values[3] = v4;
  cl_env_copy->values[2] = v3;
  cl_env_copy->values[1] = ECL_NIL;
  cl_env_copy->values[0] = ECL_NIL;
  return cl_env_copy->values[0];
 }
}
static cl_object LC4175__lambda7_va(cl_narg narg, cl_object v5, cl_object v6si__x, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[12]);
 {
  return LC4175__lambda7(v5, v6si__x);
 }
}
/* local function LAMBDA12                                                    */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC4176__lambda12(cl_object v1, cl_object v2si__x)
{
 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 v4;
  v3 = cl_gensym(0);
  v4 = cl_gensym(0);
  T0 = cl_list(2, ECL_SYM("QUOTE",682), VV[2]);
  T1 = cl_list(6, ECL_SYM("COMPARE-AND-SWAP-STRUCTURE",1527), v2si__x, T0, ecl_make_int8_t(2), v3, v4);
  T2 = cl_list(2, ECL_SYM("QUOTE",682), VV[2]);
  T3 = cl_list(4, ECL_SYM("STRUCTURE-REF",1178), v2si__x, T2, ecl_make_int8_t(2));
  cl_env_copy->nvalues = 6;
  cl_env_copy->values[5] = T3;
  cl_env_copy->values[4] = T1;
  cl_env_copy->values[3] = v4;
  cl_env_copy->values[2] = v3;
  cl_env_copy->values[1] = ECL_NIL;
  cl_env_copy->values[0] = ECL_NIL;
  return cl_env_copy->values[0];
 }
}
static cl_object LC4176__lambda12_va(cl_narg narg, cl_object v5, cl_object v6si__x, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[14]);
 {
  return LC4176__lambda12(v5, v6si__x);
 }
}
/* local function LAMBDA17                                                    */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC4177__lambda17(cl_object v1, cl_object v2si__x)
{
 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 v4;
  v3 = cl_gensym(0);
  v4 = cl_gensym(0);
  T0 = cl_list(2, ECL_SYM("QUOTE",682), VV[2]);
  T1 = cl_list(6, ECL_SYM("COMPARE-AND-SWAP-STRUCTURE",1527), v2si__x, T0, ecl_make_int8_t(1), v3, v4);
  T2 = cl_list(2, ECL_SYM("QUOTE",682), VV[2]);
  T3 = cl_list(4, ECL_SYM("STRUCTURE-REF",1178), v2si__x, T2, ecl_make_int8_t(1));
  cl_env_copy->nvalues = 6;
  cl_env_copy->values[5] = T3;
  cl_env_copy->values[4] = T1;
  cl_env_copy->values[3] = v4;
  cl_env_copy->values[2] = v3;
  cl_env_copy->values[1] = ECL_NIL;
  cl_env_copy->values[0] = ECL_NIL;
  return cl_env_copy->values[0];
 }
}
static cl_object LC4177__lambda17_va(cl_narg narg, cl_object v5, cl_object v6si__x, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[16]);
 {
  return LC4177__lambda17(v5, v6si__x);
 }
}
/* local function LAMBDA22                                                    */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC4178__lambda22(cl_object v1, cl_object v2si__x)
{
 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 v4;
  v3 = cl_gensym(0);
  v4 = cl_gensym(0);
  T0 = cl_list(2, ECL_SYM("QUOTE",682), VV[2]);
  T1 = cl_list(6, ECL_SYM("COMPARE-AND-SWAP-STRUCTURE",1527), v2si__x, T0, ecl_make_int8_t(0), v3, v4);
  T2 = cl_list(2, ECL_SYM("QUOTE",682), VV[2]);
  T3 = cl_list(4, ECL_SYM("STRUCTURE-REF",1178), v2si__x, T2, ecl_make_int8_t(0));
  cl_env_copy->nvalues = 6;
  cl_env_copy->values[5] = T3;
  cl_env_copy->values[4] = T1;
  cl_env_copy->values[3] = v4;
  cl_env_copy->values[2] = v3;
  cl_env_copy->values[1] = ECL_NIL;
  cl_env_copy->values[0] = ECL_NIL;
  return cl_env_copy->values[0];
 }
}
static cl_object LC4178__lambda22_va(cl_narg narg, cl_object v5, cl_object v6si__x, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[18]);
 {
  return LC4178__lambda22(v5, v6si__x);
 }
}
/* function definition for READ-WORD                                          */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L4179read_word(cl_object v1stream)
{
 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:;
 T0 = cl_read_byte(1, v1stream);
 T1 = cl_read_byte(1, v1stream);
 T2 = cl_ash(T1, ecl_make_int8_t(8));
 T3 = cl_read_byte(1, v1stream);
 T4 = cl_ash(T3, ecl_make_int8_t(16));
 T5 = cl_read_byte(1, v1stream);
 T6 = cl_ash(T5, ecl_make_int8_t(24));
 value0 = cl_logior(4, T0, T2, T4, T6);
 return value0;
}
static cl_object L4179read_word_va(cl_narg narg, cl_object v2stream, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[19]);
 {
  return L4179read_word(v2stream);
 }
}
/* function definition for WRITE-WORD                                         */
/* optimize speed 3, debug 1, space 1, safety 0                               */
static cl_object L4180write_word(cl_object v1byte, cl_object v2stream)
{
 cl_object T0, T1;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 cl_fixnum v3byte;
 v3byte = ecl_fixnum(v1byte);
L1:;
 {
  cl_fixnum v4;
  v4 = (((cl_fixnum)(255)) & (v3byte));
  cl_write_byte(ecl_make_fixnum(v4), v2stream);
 }
 T0 = ecl_ash(ecl_make_fixnum(v3byte),(cl_fixnum)(-8));
 T1 = ecl_boole(ECL_BOOLAND,(ecl_make_uint8_t(255)),(T0));
 cl_write_byte(T1, v2stream);
 T0 = ecl_ash(ecl_make_fixnum(v3byte),(cl_fixnum)(-16));
 T1 = ecl_boole(ECL_BOOLAND,(ecl_make_uint8_t(255)),(T0));
 cl_write_byte(T1, v2stream);
 T0 = ecl_ash(ecl_make_fixnum(v3byte),(cl_fixnum)(-24));
 T1 = ecl_boole(ECL_BOOLAND,(ecl_make_uint8_t(255)),(T0));
 value0 = cl_write_byte(T1, v2stream);
 return value0;
}
static cl_object L4180write_word_va(cl_narg narg, cl_object v4byte, cl_object v5stream, ...)
{
 return L4180write_word(v4byte, v5stream);
}
/* function definition for WRITE-VECTOR                                       */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L4181write_vector(cl_object v1vector, cl_object v2stream)
{
 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 v3v;
  cl_fixnum v4;
  cl_fixnum v5;
  v3v = ECL_NIL;
  v4 = (cl_fixnum)(0);
  v5 = (cl_fixnum)(0);
  v5 = ecl_length(v1vector);
L5:;
  if (!((v4)>=(v5))){
   goto L9;
  }
  goto L6;
L9:;
  {
   cl_object v6;
   v6 = v1vector;
   T0 = v6;
   {
    cl_fixnum v7;
    v7 = v4;
    if (ecl_unlikely((v7)>=(v6)->vector.dim))
           FEwrong_index(ECL_NIL,v6,-1,ecl_make_fixnum(v7),(v6)->vector.dim);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
    T1 = ecl_make_fixnum(v7);
   }
   v3v = ecl_aref_unsafe(T0,ecl_fixnum(T1));
  }
  {
   cl_object v6;
   v6 = ecl_make_integer((v4)+1);
   {
    bool v7;
    v7 = ECL_FIXNUMP(v6);
    if (ecl_unlikely(!(v7)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v6);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
   }
   v4 = ecl_fixnum(v6);
  }
  L4180write_word(v3v, v2stream);
  goto L5;
L6:;
  value0 = ECL_NIL;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
static cl_object L4181write_vector_va(cl_narg narg, cl_object v6vector, cl_object v7stream, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[24]);
 {
  return L4181write_vector(v6vector, v7stream);
 }
}
/* function definition for TO-CDB-HASH                                        */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L4182to_cdb_hash(cl_object v1key_vector)
{
 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_fixnum v2h;
  v2h = 5381;
  {
   uint8_t v3byte;
   cl_fixnum v4;
   cl_fixnum v5;
   v3byte = (uint8_t)(0);
   v4 = (cl_fixnum)(0);
   v5 = (cl_fixnum)(0);
   v5 = ecl_length(v1key_vector);
L6:;
   if (!((v4)>=(v5))){
    goto L10;
   }
   goto L7;
L10:;
   {
    cl_object v6;
    {
     cl_object v7;
     v7 = v1key_vector;
     T0 = v7;
     {
      cl_fixnum v8;
      v8 = v4;
      if (ecl_unlikely((v8)>=(v7)->vector.dim))
           FEwrong_index(ECL_NIL,v7,-1,ecl_make_fixnum(v8),(v7)->vector.dim);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
      T1 = ecl_make_fixnum(v8);
     }
     v6 = ecl_aref_unsafe(T0,ecl_fixnum(T1));
    }
    {
     cl_fixnum v7;
     v7 = (cl_fixnum)(0);
     if (!(ECL_FIXNUMP(v6))){
      goto L25;
     }
     v7 = ecl_fixnum(v6);
     if (!((v7)<=((cl_fixnum)(255)))){
      goto L30;
     }
     T0 = ecl_make_bool((v7)>=((cl_fixnum)(0)));
     goto L22;
L30:;
     T0 = ECL_NIL;
     goto L22;
L25:;
     T0 = ECL_NIL;
     goto L22;
    }
L22:;
    if (ecl_unlikely(!((T0)!=ECL_NIL)))
         FEwrong_type_argument(VV[31],v6);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
    v3byte = ecl_fixnum(v6);
   }
   {
    cl_object v6;
    v6 = ecl_make_integer((v4)+1);
    {
     bool v7;
     v7 = ECL_FIXNUMP(v6);
     if (ecl_unlikely(!(v7)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v6);
     value0 = ECL_NIL;
     cl_env_copy->nvalues = 0;
    }
    v4 = ecl_fixnum(v6);
   }
   {
    cl_object v6;
    {
     cl_fixnum v7;
     v7 = ((134217727) & (v2h));
     T0 = cl_ash(ecl_make_fixnum(v7), ecl_make_int8_t(5));
     T1 = ecl_plus(T0,ecl_make_fixnum(v2h));
     T2 = ecl_boole(ECL_BOOLAND,(ecl_make_fixnum(4294967295)),(T1));
     v6 = ecl_boole(ECL_BOOLXOR,(T2),(ecl_make_uint8_t(v3byte)));
    }
    {
     cl_fixnum v7;
     v7 = (cl_fixnum)(0);
     if (!(ECL_FIXNUMP(v6))){
      goto L43;
     }
     v7 = ecl_fixnum(v6);
     if (!((v7)<=(4294967295))){
      goto L48;
     }
     T0 = ecl_make_bool((v7)>=((cl_fixnum)(0)));
     goto L40;
L48:;
     T0 = ECL_NIL;
     goto L40;
L43:;
     T0 = ECL_NIL;
     goto L40;
    }
L40:;
    if (ecl_unlikely(!((T0)!=ECL_NIL)))
         FEwrong_type_argument(VV[32],v6);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
    v2h = ecl_fixnum(v6);
   }
   goto L6;
L7:;
   value0 = ecl_make_fixnum(v2h);
   cl_env_copy->nvalues = 1;
   return value0;
  }
 }
}
static cl_object L4182to_cdb_hash_va(cl_narg narg, cl_object v6key_vector, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[30]);
 {
  return L4182to_cdb_hash(v6key_vector);
 }
}
/* function definition for %MAKE-CDB                                          */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L4183_make_cdb(cl_object v1cdb_pathname, cl_object v2temporary_pathname)
{
 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 v3stream;
  v3stream = cl_open(9, v2temporary_pathname, ECL_SYM("DIRECTION",1249), ECL_SYM("OUTPUT",1319), ECL_SYM("IF-EXISTS",1279), ECL_SYM("SUPERSEDE",1351), ECL_SYM("IF-DOES-NOT-EXIST",1277), ECL_SYM("CREATE",1244), ECL_SYM("ELEMENT-TYPE",1255), VV[31]);
  if (Null(v3stream)){
   goto L3;
  }
  cl_file_position(2, v3stream, ecl_make_int8_t(0));
  {
   cl_fixnum v4i;
   v4i = (cl_fixnum)(0);
   goto L9;
L8:;
   L4180write_word(ecl_make_int8_t(0), v3stream);
   v4i = (v4i)+1;
L9:;
   if (!((v4i)<(512))){
    goto L14;
   }
   goto L8;
L14:;
  }
  T1 = si_make_vector(ECL_T, ecl_make_fixnum(256), ECL_NIL, ECL_NIL, ECL_NIL, ecl_make_int8_t(0));
  T0 = si_fill_array_with_elt(T1, ECL_NIL, ecl_make_int8_t(0), ECL_NIL);
  value0 = L4173make_cdb(8, ECL_SYM("STREAM",1350), v3stream, ECL_SYM("PATHNAME",1322), v1cdb_pathname, VV[35], T0, VV[36], v2temporary_pathname);
  return value0;
L3:;
  value0 = cl_error(2, VV[37], v2temporary_pathname);
  return value0;
 }
}
static cl_object L4183_make_cdb_va(cl_narg narg, cl_object v4cdb_pathname, cl_object v5temporary_pathname, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[34]);
 {
  return L4183_make_cdb(v4cdb_pathname, v5temporary_pathname);
 }
}
/* local function WITH-OUTPUT-TO-CDB                                          */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC4184with_output_to_cdb(cl_object v1, cl_object v2)
{
 cl_object T0, T1, T2, T3, T4, T5;
 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 v6cdb;
  cl_object v7cdb_pathname;
  cl_object v8temporary_pathname;
  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);
   v4 = v9;
  }
  v5 = v4;
  if (!(v5==ECL_NIL)){
   goto L11;
  }
  si_dm_too_few_arguments(v1);
L11:;
  {
   cl_object v9;
   v9 = ecl_car(v5);
   v5 = ecl_cdr(v5);
   v6cdb = v9;
  }
  if (!(v5==ECL_NIL)){
   goto L17;
  }
  si_dm_too_few_arguments(v1);
L17:;
  {
   cl_object v9;
   v9 = ecl_car(v5);
   v5 = ecl_cdr(v5);
   v7cdb_pathname = v9;
  }
  if (!(v5==ECL_NIL)){
   goto L23;
  }
  si_dm_too_few_arguments(v1);
L23:;
  {
   cl_object v9;
   v9 = ecl_car(v5);
   v5 = ecl_cdr(v5);
   v8temporary_pathname = v9;
  }
  if (Null(v5)){
   goto L28;
  }
  si_dm_too_many_arguments(v1);
L28:;
  T0 = ecl_list1(v6cdb);
  T1 = cl_list(3, VV[34], v7cdb_pathname, v8temporary_pathname);
  T2 = cl_list(3, ECL_SYM("SETF",753), v6cdb, T1);
  T3 = cl_listX(3, ECL_SYM("PROGN",674), T2, v3);
  T4 = cl_list(2, VV[42], v6cdb);
  T5 = cl_list(3, ECL_SYM("UNWIND-PROTECT",892), T3, T4);
  value0 = cl_list(3, ECL_SYM("LET",479), T0, T5);
  return value0;
 }
}
static cl_object LC4184with_output_to_cdb_va(cl_narg narg, cl_object v9, cl_object v10, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[40]);
 {
  return LC4184with_output_to_cdb(v9, v10);
 }
}
/* function definition for ADD-RECORD                                         */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L4185add_record(cl_object v1key, cl_object v2value, cl_object v3cdb)
{
 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 v4hash_key;
  cl_object v5table_index;
  cl_object v6stream;
  v4hash_key = L4182to_cdb_hash(v1key);
  v5table_index = ecl_boole(ECL_BOOLAND,(ecl_make_uint8_t(255)),(v4hash_key));
  v6stream = (cl_env_copy->function=ecl_fdefinition(VV[17]))->cfun.entry(1, v3cdb) /*  CDB-STREAM */;
  {
   cl_object v7;
   cl_object v8;
   cl_object v9;
   T0 = cl_file_position(1, v6stream);
   v7 = CONS(v4hash_key,T0);
   v8 = (cl_env_copy->function=ecl_fdefinition(VV[11]))->cfun.entry(1, v3cdb) /*  CDB-TABLES */;
   {
    cl_object v10;
    v10 = v8;
    T1 = v10;
    {
     cl_object v11;
     v11 = v5table_index;
     if (ecl_unlikely((ecl_fixnum(v11))>=(v10)->vector.dim))
           FEwrong_index(ECL_NIL,v10,-1,ecl_make_fixnum(ecl_fixnum(v11)),(v10)->vector.dim);
     value0 = ECL_NIL;
     cl_env_copy->nvalues = 0;
     T2 = v11;
    }
    T0 = ecl_aref_unsafe(T1,ecl_fixnum(T2));
   }
   v9 = CONS(v7,T0);
   {
    cl_object v10;
    v10 = v8;
    T0 = v10;
    {
     cl_object v11;
     v11 = v5table_index;
     if (ecl_unlikely((ecl_fixnum(v11))>=(v10)->vector.dim))
           FEwrong_index(ECL_NIL,v10,-1,ecl_make_fixnum(ecl_fixnum(v11)),(v10)->vector.dim);
     value0 = ECL_NIL;
     cl_env_copy->nvalues = 0;
     T1 = v11;
    }
    ecl_aset_unsafe(T0,ecl_fixnum(T1),v9);
   }
  }
  {
   cl_fixnum v7;
   v7 = ecl_length(v1key);
   L4180write_word(ecl_make_fixnum(v7), v6stream);
  }
  {
   cl_fixnum v7;
   v7 = ecl_length(v2value);
   L4180write_word(ecl_make_fixnum(v7), v6stream);
  }
  cl_write_sequence(2, v1key, v6stream);
  value0 = cl_write_sequence(2, v2value, v6stream);
  return value0;
 }
}
static cl_object L4185add_record_va(cl_narg narg, cl_object v7key, cl_object v8value, cl_object v9cdb, ...)
{
 if (ecl_unlikely(narg!=3)) FEwrong_num_arguments(VV[44]);
 {
  return L4185add_record(v7key, v8value, v9cdb);
 }
}
/* function definition for DUMP-TABLE                                         */
/* optimize speed 3, debug 1, space 1, safety 0                               */
static cl_object L4186dump_table(cl_object v1table, cl_object v2stream)
{
 cl_object T0, T1;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
L1:;
 {
  cl_object v3length;
  {
   cl_fixnum v4;
   v4 = ecl_length(v1table);
   v3length = ecl_times(ecl_make_int8_t(2),ecl_make_fixnum(v4));
  }
  {
   cl_object v4vector;
   {
    cl_object v5;
    v5 = ecl_times(ecl_make_int8_t(2),v3length);
    T0 = si_make_pure_array(ECL_SYM("BYTE32",1370), v5, ECL_NIL, ECL_NIL, ECL_NIL, ecl_make_int8_t(0));
    v4vector = si_fill_array_with_elt(T0, ecl_make_int8_t(0), ecl_make_int8_t(0), ECL_NIL);
   }
   {
    cl_object v5hash_key;
    cl_object v6pos;
    cl_object v7;
    v5hash_key = ECL_NIL;
    v6pos = ECL_NIL;
    v7 = v1table;
    {
     cl_object v8index;
     v8index = ECL_NIL;
L9:;
     if (!(v7==ECL_NIL)){
      goto L11;
     }
     goto L10;
L11:;
     {
      cl_object v9;
      v9 = ECL_CONS_CAR(v7);
      v5hash_key = _ecl_car(v9);
      v9 = _ecl_cdr(v9);
      v6pos = v9;
     }
     v7 = ECL_CONS_CDR(v7);
     T0 = ecl_ash(v5hash_key,(cl_fixnum)(-8));
     v8index = (ecl_floor2(T0,v3length),cl_env_copy->values[1]);
     {
      cl_object v9disp;
      v9disp = ecl_make_int8_t(0);
      {
       cl_object v10i;
       v10i = ECL_NIL;
       {
        cl_object v11record_pos;
        v11record_pos = ECL_NIL;
L28:;
        if (!(ecl_greatereq(v9disp,v3length))){
         goto L30;
        }
        goto L29;
L30:;
        T0 = ecl_plus(v9disp,v8index);
        T1 = (ecl_floor2(T0,v3length),cl_env_copy->values[1]);
        v10i = ecl_times(ecl_make_int8_t(2),T1);
        T0 = ecl_one_plus(v10i);
        v11record_pos = ecl_make_uint32_t((v4vector)->vector.self.b32[ecl_fixnum(T0)]);
        if (!(ecl_zerop(v11record_pos))){
         goto L36;
        }
        goto L29;
L36:;
        v9disp = ecl_one_plus(v9disp);
        goto L28;
L29:;
        (v4vector)->vector.self.b32[ecl_fixnum(v10i)]= ecl_fixnum(v5hash_key);
        T0 = ecl_one_plus(v10i);
        (v4vector)->vector.self.b32[ecl_fixnum(T0)]= ecl_fixnum(v6pos);
       }
      }
     }
     goto L9;
L10:;
     L4181write_vector(v4vector, v2stream);
     value0 = v3length;
     cl_env_copy->nvalues = 1;
     return value0;
     value0 = ECL_NIL;
     cl_env_copy->nvalues = 1;
     return value0;
    }
   }
  }
 }
}
static cl_object L4186dump_table_va(cl_narg narg, cl_object v9table, cl_object v10stream, ...)
{
 return L4186dump_table(v9table, v10stream);
}
/* function definition for DUMP-CDB                                           */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L4187dump_cdb(cl_object v1cdb)
{
 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 v2stream;
  cl_object v3index;
  v2stream = (cl_env_copy->function=ecl_fdefinition(VV[17]))->cfun.entry(1, v1cdb) /*  CDB-STREAM */;
  v3index = si_make_vector(ECL_SYM("BYTE32",1370), ecl_make_fixnum(512), ECL_NIL, ECL_NIL, ECL_NIL, ecl_make_int8_t(0));
  {
   cl_object v4;
   cl_object v5table;
   cl_fixnum v6;
   cl_fixnum v7;
   {
    cl_object v8;
    v8 = (cl_env_copy->function=ecl_fdefinition(VV[11]))->cfun.entry(1, v1cdb) /*  CDB-TABLES */;
    if (ecl_unlikely(!ECL_VECTORP(v8))) FEtype_error_vector(v8);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
    v4 = v8;
   }
   v5table = ECL_NIL;
   v6 = (cl_fixnum)(0);
   v7 = (cl_fixnum)(0);
   {
    cl_fixnum v8i;
    v8i = (cl_fixnum)(0);
    v7 = ecl_length(v4);
    if (!((v6)>=(v7))){
     goto L16;
    }
    goto L13;
L16:;
    {
     cl_object v9;
     v9 = v4;
     T0 = v9;
     {
      cl_fixnum v10;
      v10 = v6;
      if (ecl_unlikely((v10)>=(v9)->vector.dim))
           FEwrong_index(ECL_NIL,v9,-1,ecl_make_fixnum(v10),(v9)->vector.dim);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
      T1 = ecl_make_fixnum(v10);
     }
     v5table = ecl_aref_unsafe(T0,ecl_fixnum(T1));
    }
    {
     cl_object v9;
     v9 = ecl_make_integer((v6)+1);
     {
      bool v10;
      v10 = ECL_FIXNUMP(v9);
      if (ecl_unlikely(!(v10)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v9);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
     }
     v6 = ecl_fixnum(v9);
    }
L12:;
    {
     cl_object v9;
     v9 = v3index;
     T0 = v9;
     {
      cl_fixnum v10;
      v10 = v8i;
      if (ecl_unlikely((v10)>=(v9)->vector.dim))
           FEwrong_index(ECL_NIL,v9,-1,ecl_make_fixnum(v10),(v9)->vector.dim);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
      T1 = ecl_make_fixnum(v10);
     }
     T2 = cl_file_position(1, v2stream);
     ecl_aset_unsafe(T0,ecl_fixnum(T1),T2);
    }
    {
     cl_object v9;
     v9 = v3index;
     T0 = v9;
     {
      cl_object v10;
      v10 = ecl_make_integer((v8i)+1);
      if (ecl_unlikely((ecl_fixnum(v10))>=(v9)->vector.dim))
           FEwrong_index(ECL_NIL,v9,-1,ecl_make_fixnum(ecl_fixnum(v10)),(v9)->vector.dim);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
      T1 = v10;
     }
     T2 = L4186dump_table(v5table, v2stream);
     ecl_aset_unsafe(T0,ecl_fixnum(T1),T2);
    }
    if (!((v6)>=(v7))){
     goto L44;
    }
    goto L13;
L44:;
    {
     cl_object v9;
     v9 = v4;
     T0 = v9;
     {
      cl_fixnum v10;
      v10 = v6;
      if (ecl_unlikely((v10)>=(v9)->vector.dim))
           FEwrong_index(ECL_NIL,v9,-1,ecl_make_fixnum(v10),(v9)->vector.dim);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
      T1 = ecl_make_fixnum(v10);
     }
     v5table = ecl_aref_unsafe(T0,ecl_fixnum(T1));
    }
    {
     cl_object v9;
     v9 = ecl_make_integer((v6)+1);
     {
      bool v10;
      v10 = ECL_FIXNUMP(v9);
      if (ecl_unlikely(!(v10)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v9);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
     }
     v6 = ecl_fixnum(v9);
    }
    v8i = (v8i)+((cl_fixnum)2);
    goto L12;
L13:;
   }
  }
  cl_file_position(2, v2stream, ecl_make_int8_t(0));
  value0 = L4181write_vector(v3index, v2stream);
  return value0;
 }
}
static cl_object L4187dump_cdb_va(cl_narg narg, cl_object v4cdb, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[49]);
 {
  return L4187dump_cdb(v4cdb);
 }
}
/* function definition for CLOSE-CDB                                          */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L4188close_cdb(cl_object v1cdb)
{
 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 v2stream;
  v2stream = (cl_env_copy->function=ecl_fdefinition(VV[17]))->cfun.entry(1, v1cdb) /*  CDB-STREAM */;
  if (Null(cl_open_stream_p(v2stream))){
   goto L3;
  }
  L4187dump_cdb(v1cdb);
  cl_close(1, v2stream);
  if (Null((cl_env_copy->function=ecl_fdefinition(VV[15]))->cfun.entry(1, v1cdb) /*  CDB-PATHNAME */)){
   goto L7;
  }
  T0 = (cl_env_copy->function=ecl_fdefinition(VV[8]))->cfun.entry(1, v1cdb) /*  CDB-TEMPORARY-PATHNAME */;
  T1 = (cl_env_copy->function=ecl_fdefinition(VV[15]))->cfun.entry(1, v1cdb) /*  CDB-PATHNAME */;
  value0 = cl_rename_file(2, T0, T1);
  return value0;
L7:;
  value0 = ECL_NIL;
  cl_env_copy->nvalues = 1;
  return value0;
L3:;
  value0 = ECL_NIL;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
static cl_object L4188close_cdb_va(cl_narg narg, cl_object v3cdb, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[42]);
 {
  return L4188close_cdb(v3cdb);
 }
}
/* function definition for CDB-ERROR                                          */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L4189cdb_error(cl_object v1stream)
{
 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_error(2, VV[53], v1stream);
 return value0;
}
static cl_object L4189cdb_error_va(cl_narg narg, cl_object v2stream, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[52]);
 {
  return L4189cdb_error(v2stream);
 }
}
/* function definition for VALUES-COINCIDE                                    */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L4190values_coincide(cl_object v1position, cl_object v2key_vector, cl_object v3stream, cl_object v4return_position_p)
{
 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 (cl_file_position(2, v3stream, v1position)!=ECL_NIL) {
  goto L2;
 }
 L4189cdb_error(v3stream);
L2:;
 {
  cl_object v5key_length;
  v5key_length = L4179read_word(v3stream);
  {
   cl_fixnum v6;
   v6 = ecl_length(v2key_vector);
   if (!(ecl_number_equalp(v5key_length,ecl_make_fixnum(v6)))){
    goto L5;
   }
  }
  {
   cl_object v6value_length;
   cl_object v7other_key;
   v6value_length = L4179read_word(v3stream);
   v7other_key = si_make_pure_array(ECL_SYM("BYTE8",1368), v5key_length, ECL_NIL, ECL_NIL, ECL_NIL, ecl_make_int8_t(0));
   cl_read_sequence(2, v7other_key, v3stream);
   if (!(ecl_equalp(v7other_key,v2key_vector))){
    goto L10;
   }
   if (Null(v4return_position_p)){
    goto L12;
   }
   value0 = cl_file_position(1, v3stream);
   return value0;
L12:;
   {
    cl_object v8value;
    v8value = si_make_pure_array(ECL_SYM("BYTE8",1368), v6value_length, ECL_NIL, ECL_NIL, ECL_NIL, ecl_make_int8_t(0));
    cl_read_sequence(2, v8value, v3stream);
    value0 = v8value;
    cl_env_copy->nvalues = 1;
    return value0;
   }
L10:;
   value0 = ECL_NIL;
   cl_env_copy->nvalues = 1;
   return value0;
  }
L5:;
  value0 = ECL_NIL;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
static cl_object L4190values_coincide_va(cl_narg narg, cl_object v9position, cl_object v10key_vector, cl_object v11stream, cl_object v12return_position_p, ...)
{
 if (ecl_unlikely(narg!=4)) FEwrong_num_arguments(VV[55]);
 {
  return L4190values_coincide(v9position, v10key_vector, v11stream, v12return_position_p);
 }
}
/* function definition for LOOKUP-CDB                                         */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L4191lookup_cdb(volatile cl_narg narg, cl_object volatile v1key, cl_object volatile v2stream, ...)
{
 cl_object T0;
 cl_object volatile env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object volatile value0;
 ecl_cs_check(cl_env_copy,value0);
 if (ecl_unlikely(narg<2)) FEwrong_num_arguments(VV[57]);
 if (ecl_unlikely(narg>3)) FEwrong_num_arguments(VV[57]);
 {
  cl_object volatile v3return_position_p;
  va_list args; va_start(args,v2stream);
  {
   int i = 2;
   if (i >= narg) {
    v3return_position_p = ECL_NIL;
   } else {
    i++;
    v3return_position_p = va_arg(args,cl_object);
   }
  }
  va_end(args);
  if (Null(cl_streamp(v2stream))){
   goto L2;
  }
  {
   cl_object v4hash;
   cl_object v5table;
   v4hash = L4182to_cdb_hash(v1key);
   v5table = ecl_boole(ECL_BOOLAND,(ecl_make_uint8_t(255)),(v4hash));
   T0 = ecl_times(v5table,ecl_make_int8_t(8));
   if (cl_file_position(2, v2stream, T0)!=ECL_NIL) {
    goto L6;
   }
   L4189cdb_error(v2stream);
L6:;
   {
    cl_object v6start;
    cl_object v7length;
    cl_object v8index;
    v6start = L4179read_word(v2stream);
    v7length = L4179read_word(v2stream);
    T0 = cl_ash(v4hash, ecl_make_int8_t(-8));
    v8index = (ecl_floor2(T0,v7length),cl_env_copy->values[1]);
    {
     cl_object v9reset;
     v9reset = ECL_NIL;
     {
      cl_object v10;
      cl_object v11;
      cl_object v12i;
      v10 = ecl_make_int8_t(0);
      {
       cl_object v13;
       v13 = v7length;
       {
        bool v14;
        v14 = ecl_numberp(v13);
        if (ecl_unlikely(!(v14)))
         FEwrong_type_argument(ECL_SYM("NUMBER",608),v13);
        value0 = ECL_NIL;
        cl_env_copy->nvalues = 0;
       }
       v11 = v13;
      }
      v12i = v10;
      {
       cl_object v13rounded_i;
       v13rounded_i = ECL_NIL;
       {
        cl_object v14position;
        v14position = ECL_NIL;
        v9reset = ECL_T;
L19:;
        if (!(ecl_greatereq(v12i,v11))){
         goto L23;
        }
        goto L20;
L23:;
        T0 = ecl_plus(v8index,v12i);
        v13rounded_i = (ecl_floor2(T0,v7length),cl_env_copy->values[1]);
        T0 = ecl_times(ecl_make_int8_t(8),v13rounded_i);
        v14position = ecl_plus(v6start,T0);
        if (Null(v9reset)){
         goto L30;
        }
        if (cl_file_position(2, v2stream, v14position)!=ECL_NIL) {
         goto L32;
        }
        L4189cdb_error(v2stream);
L32:;
        v9reset = ECL_NIL;
L30:;
        {
         cl_object v15other_hash;
         cl_object v16record_position;
         v15other_hash = L4179read_word(v2stream);
         v16record_position = L4179read_word(v2stream);
         if (!(ecl_zerop(v16record_position))){
          goto L37;
         }
         value0 = ECL_NIL;
         cl_env_copy->nvalues = 1;
         return value0;
L37:;
         if (!(ecl_number_equalp(v15other_hash,v4hash))){
          goto L29;
         }
         {
          cl_object v17output;
          v17output = L4190values_coincide(v16record_position, v1key, v2stream, v3return_position_p);
          if (Null(v17output)){
          goto L41;
          }
          value0 = v17output;
          cl_env_copy->nvalues = 1;
          return value0;
L41:;
          v9reset = ECL_T;
         }
        }
L29:;
        v9reset = ECL_T;
        v12i = ecl_one_plus(v12i);
        goto L19;
L20:;
        value0 = ECL_NIL;
        cl_env_copy->nvalues = 1;
        return value0;
       }
      }
     }
    }
   }
  }
L2:;
  {
   volatile cl_object v15s;
   v15s = cl_open(5, v2stream, ECL_SYM("DIRECTION",1249), ECL_SYM("INPUT",1289), ECL_SYM("ELEMENT-TYPE",1255), VV[31]);
   {
    struct ecl_stack_frame _ecl_inner_frame_aux;
    volatile cl_object _ecl_inner_frame=ecl_stack_frame_open(cl_env_copy,(cl_object)&_ecl_inner_frame_aux,0);
    volatile bool unwinding = FALSE;
    ecl_frame_ptr next_fr;
    {
     ecl_frs_push(cl_env_copy,ECL_PROTECT_TAG);
     if (__ecl_frs_push_result!=0) {
       unwinding = TRUE; next_fr=cl_env_copy->frs_stack.nlj_fr;
     } else {
     {
      struct ecl_stack_frame _ecl_inner_frame_aux;
      volatile cl_object _ecl_inner_frame=ecl_stack_frame_open(cl_env_copy,(cl_object)&_ecl_inner_frame_aux,0);
      cl_env_copy->values[0] = L4191lookup_cdb(3, v1key, v15s, v3return_position_p);
      ecl_stack_frame_push_values(_ecl_inner_frame);
      if (Null(v15s)){
       goto L52;
      }
      cl_close(1, v15s);
L52:;
      ecl_stack_frame_pop_values(_ecl_inner_frame);
      ecl_stack_frame_close(_ecl_inner_frame);
     }
     }
    }
    ecl_frs_pop(cl_env_copy);
    ecl_stack_frame_push_values(_ecl_inner_frame);
    if (Null(v15s)){
     goto L54;
    }
    cl_close(3, v15s, ECL_SYM("ABORT",1225), ECL_T);
L54:;
    ecl_stack_frame_pop_values(_ecl_inner_frame);
    if (unwinding) ecl_unwind(cl_env_copy,next_fr);
    ecl_stack_frame_close(_ecl_inner_frame);
    return cl_env_copy->values[0];
   }
  }
 }
}
/* function definition for MAP-CDB                                            */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L4192map_cdb(cl_object volatile v1function, cl_object volatile v2stream)
{
 cl_object T0, T1;
 cl_object volatile env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object volatile value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 if (Null(cl_streamp(v2stream))){
  goto L2;
 }
 {
  cl_object v3index;
  v3index = si_make_vector(ECL_SYM("BYTE32",1370), ecl_make_fixnum(512), ECL_NIL, ECL_NIL, ECL_NIL, ecl_make_int8_t(0));
  if (cl_file_position(2, v2stream, ecl_make_int8_t(0))!=ECL_NIL) {
   goto L5;
  }
  L4189cdb_error(v2stream);
L5:;
  T0 = cl_read_sequence(2, v3index, v2stream);
  {
   cl_fixnum v4;
   v4 = ecl_length(v3index);
   if ((ecl_fixnum(T0))==(v4)) {
    goto L7;
   }
  }
  L4189cdb_error(v2stream);
L7:;
  {
   cl_object v4;
   cl_object v5;
   cl_object v6i;
   v4 = ecl_make_int8_t(0);
   v5 = ecl_make_fixnum(ecl_length(v3index));
   v6i = v4;
   {
    cl_object v7table_position;
    v7table_position = ECL_NIL;
    {
     cl_object v8table_length;
     v8table_length = ECL_NIL;
L14:;
     if (!(ecl_greatereq(v6i,v5))){
      goto L16;
     }
     goto L15;
L16:;
     {
      cl_object v9;
      v9 = v3index;
      T0 = v9;
      {
       cl_object v10;
       v10 = v6i;
       if (ecl_unlikely((ecl_fixnum(v10))>=(v9)->vector.dim))
           FEwrong_index(ECL_NIL,v9,-1,ecl_make_fixnum(ecl_fixnum(v10)),(v9)->vector.dim);
       value0 = ECL_NIL;
       cl_env_copy->nvalues = 0;
       T1 = v10;
      }
      v7table_position = ecl_aref_unsafe(T0,ecl_fixnum(T1));
     }
     {
      cl_object v9;
      v9 = v3index;
      T0 = v9;
      {
       cl_object v10;
       v10 = ecl_one_plus(v6i);
       if (ecl_unlikely((ecl_fixnum(v10))>=(v9)->vector.dim))
           FEwrong_index(ECL_NIL,v9,-1,ecl_make_fixnum(ecl_fixnum(v10)),(v9)->vector.dim);
       value0 = ECL_NIL;
       cl_env_copy->nvalues = 0;
       T1 = v10;
      }
      v8table_length = ecl_aref_unsafe(T0,ecl_fixnum(T1));
     }
     if (cl_file_position(2, v2stream, v7table_position)!=ECL_NIL) {
      goto L35;
     }
     L4189cdb_error(v2stream);
L35:;
     {
      cl_object v9;
      cl_object v10;
      cl_object v11i;
      v9 = ecl_make_int8_t(0);
      {
       cl_object v12;
       v12 = v8table_length;
       {
        bool v13;
        v13 = ecl_numberp(v12);
        if (ecl_unlikely(!(v13)))
         FEwrong_type_argument(ECL_SYM("NUMBER",608),v12);
        value0 = ECL_NIL;
        cl_env_copy->nvalues = 0;
       }
       v10 = v12;
      }
      v11i = v9;
      {
       cl_object v12position;
       {
        cl_object v13;
        v13 = v7table_position;
        {
         bool v14;
         v14 = ecl_numberp(v13);
         if (ecl_unlikely(!(v14)))
         FEwrong_type_argument(ECL_SYM("NUMBER",608),v13);
         value0 = ECL_NIL;
         cl_env_copy->nvalues = 0;
        }
        v12position = v13;
       }
       {
        cl_object v13record_hash;
        v13record_hash = ECL_NIL;
        {
         cl_object v14record_position;
         v14record_position = ECL_NIL;
         if (!(ecl_greatereq(v11i,v10))){
          goto L49;
         }
         goto L48;
L49:;
L47:;
         v13record_hash = L4179read_word(v2stream);
         v14record_position = L4179read_word(v2stream);
         if (ecl_zerop(v14record_position)) {
          goto L55;
         }
         if (cl_file_position(2, v2stream, v14record_position)!=ECL_NIL) {
          goto L57;
         }
         L4189cdb_error(v2stream);
L57:;
         {
          cl_object v15key_length;
          cl_object v16value_length;
          cl_object v17key;
          cl_object v18value;
          v15key_length = L4179read_word(v2stream);
          v16value_length = L4179read_word(v2stream);
          v17key = si_make_pure_array(ECL_SYM("BYTE8",1368), v15key_length, ECL_NIL, ECL_NIL, ECL_NIL, ecl_make_int8_t(0));
          v18value = si_make_pure_array(ECL_SYM("BYTE8",1368), v16value_length, ECL_NIL, ECL_NIL, ECL_NIL, ecl_make_int8_t(0));
          T0 = cl_read_sequence(2, v17key, v2stream);
          if (!(ecl_number_equalp(T0,v15key_length))){
          goto L66;
          }
          T0 = cl_read_sequence(2, v18value, v2stream);
          if (ecl_number_equalp(T0,v16value_length)) {
          goto L63;
          }
          goto L64;
L66:;
          goto L64;
L64:;
          L4189cdb_error(v2stream);
L63:;
          ecl_function_dispatch(cl_env_copy,v1function)(2, v17key, v18value);
         }
L55:;
         v11i = ecl_one_plus(v11i);
         if (!(ecl_greatereq(v11i,v10))){
          goto L70;
         }
         goto L48;
L70:;
         v12position = ecl_plus(v12position,ecl_make_int8_t(8));
         goto L47;
L48:;
        }
       }
      }
     }
     v6i = ecl_plus(v6i,ecl_make_int8_t(2));
     goto L14;
L15:;
     value0 = ECL_NIL;
     cl_env_copy->nvalues = 1;
     return value0;
    }
   }
  }
 }
L2:;
 {
  volatile cl_object v9s;
  v9s = cl_open(5, v2stream, ECL_SYM("DIRECTION",1249), ECL_SYM("INPUT",1289), ECL_SYM("ELEMENT-TYPE",1255), VV[31]);
  {
   struct ecl_stack_frame _ecl_inner_frame_aux;
   volatile cl_object _ecl_inner_frame=ecl_stack_frame_open(cl_env_copy,(cl_object)&_ecl_inner_frame_aux,0);
   volatile bool unwinding = FALSE;
   ecl_frame_ptr next_fr;
   {
    ecl_frs_push(cl_env_copy,ECL_PROTECT_TAG);
    if (__ecl_frs_push_result!=0) {
      unwinding = TRUE; next_fr=cl_env_copy->frs_stack.nlj_fr;
    } else {
    {
     struct ecl_stack_frame _ecl_inner_frame_aux;
     volatile cl_object _ecl_inner_frame=ecl_stack_frame_open(cl_env_copy,(cl_object)&_ecl_inner_frame_aux,0);
     cl_env_copy->values[0] = L4192map_cdb(v1function, v9s);
     ecl_stack_frame_push_values(_ecl_inner_frame);
     if (Null(v9s)){
      goto L81;
     }
     cl_close(1, v9s);
L81:;
     ecl_stack_frame_pop_values(_ecl_inner_frame);
     ecl_stack_frame_close(_ecl_inner_frame);
    }
    }
   }
   ecl_frs_pop(cl_env_copy);
   ecl_stack_frame_push_values(_ecl_inner_frame);
   if (Null(v9s)){
    goto L83;
   }
   cl_close(3, v9s, ECL_SYM("ABORT",1225), ECL_T);
L83:;
   ecl_stack_frame_pop_values(_ecl_inner_frame);
   if (unwinding) ecl_unwind(cl_env_copy,next_fr);
   ecl_stack_frame_close(_ecl_inner_frame);
   return cl_env_copy->values[0];
  }
 }
}
static cl_object L4192map_cdb_va(cl_narg narg, cl_object v10function, cl_object v11stream, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[59]);
 {
  return L4192map_cdb(v10function, v11stream);
 }
}
#include "ext/ecl-cdb.data"
#ifdef __cplusplus
extern "C"
#endif

ECL_DLLEXPORT void _eclwpCfb5iQzLVh9_sjk0M881(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("EXT:ECL-CDB;ECL-CDB.LISP.NEWEST",-1);
 return;}
 #ifdef ECL_DYNAMIC_VV
 VV = Cblock->cblock.data;
 #endif
 Cblock->cblock.data_text = (const cl_object *)"@EcLtAg:_eclwpCfb5iQzLVh9_sjk0M881@";
 VVtemp = Cblock->cblock.temp_data;
 ECL_DEFINE_SETF_FUNCTIONS
 {
  cl_object T0;
  cl_object volatile env0 = ECL_NIL;
/* MAKE-LOAD-FORMs                                                            */
/* TOP-LEVEL-FORMs                                                            */
  (cl_env_copy->function=(VV[0]->symbol.gfdef))->cfun.entry(12, VVtemp[0], ECL_NIL, ECL_NIL, ECL_NIL, VVtemp[1], ECL_NIL, ECL_NIL, ECL_NIL, VVtemp[2], ECL_NIL, ECL_NIL, ECL_NIL) /*  DODEFPACKAGE */;
  si_select_package(VVtemp[0]);
  si_define_structure(VV[2], _ecl_static_0, ECL_NIL, ECL_NIL, VVtemp[3], VVtemp[4], VV[3], ECL_NIL, ECL_NIL, ECL_NIL, VVtemp[5], ecl_make_int8_t(5), ECL_NIL, ECL_NIL, VV[4]);
  VV[6]=cl_find_class(1, VV[2]);
  ecl_cmp_defun(VV[62]);                          /*  MAKE-CDB                */
  {
   cl_object v1package;
   v1package = cl_symbol_package(VV[8]);
   if (Null(v1package)){
    goto L10;
   }
   if (Null(si_package_locked_p(v1package))){
    goto L10;
   }
   if (!(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("*IGNORE-PACKAGE-LOCKS*",1128))==ECL_NIL)){
    goto L10;
   }
   si_signal_simple_error(6, ECL_SYM("PACKAGE-ERROR",620), VVtemp[6], VVtemp[7], VVtemp[8], ECL_SYM("PACKAGE",1321), v1package);
  }
L10:;
  {
   cl_object volatile v2;
   v2 = ecl_make_cfun_va((cl_objectfn)LC4174__lambda2_va,ECL_NIL,Cblock,2);
   T0 = v2;
  }
  si_put_sysprop(VV[8], VV[9], T0);
  {
   cl_object v2package;
   v2package = cl_symbol_package(VV[11]);
   if (Null(v2package)){
    goto L18;
   }
   if (Null(si_package_locked_p(v2package))){
    goto L18;
   }
   if (!(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("*IGNORE-PACKAGE-LOCKS*",1128))==ECL_NIL)){
    goto L18;
   }
   si_signal_simple_error(6, ECL_SYM("PACKAGE-ERROR",620), VVtemp[6], VVtemp[7], VVtemp[9], ECL_SYM("PACKAGE",1321), v2package);
  }
L18:;
  {
   cl_object volatile v3;
   v3 = ecl_make_cfun_va((cl_objectfn)LC4175__lambda7_va,ECL_NIL,Cblock,2);
   T0 = v3;
  }
  si_put_sysprop(VV[11], VV[9], T0);
  {
   cl_object v3package;
   v3package = cl_symbol_package(VV[13]);
   if (Null(v3package)){
    goto L26;
   }
   if (Null(si_package_locked_p(v3package))){
    goto L26;
   }
   if (!(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("*IGNORE-PACKAGE-LOCKS*",1128))==ECL_NIL)){
    goto L26;
   }
   si_signal_simple_error(6, ECL_SYM("PACKAGE-ERROR",620), VVtemp[6], VVtemp[7], VVtemp[10], ECL_SYM("PACKAGE",1321), v3package);
  }
L26:;
  {
   cl_object volatile v4;
   v4 = ecl_make_cfun_va((cl_objectfn)LC4176__lambda12_va,ECL_NIL,Cblock,2);
   T0 = v4;
  }
  si_put_sysprop(VV[13], VV[9], T0);
  {
   cl_object v4package;
   v4package = cl_symbol_package(VV[15]);
   if (Null(v4package)){
    goto L34;
   }
   if (Null(si_package_locked_p(v4package))){
    goto L34;
   }
   if (!(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("*IGNORE-PACKAGE-LOCKS*",1128))==ECL_NIL)){
    goto L34;
   }
   si_signal_simple_error(6, ECL_SYM("PACKAGE-ERROR",620), VVtemp[6], VVtemp[7], VVtemp[11], ECL_SYM("PACKAGE",1321), v4package);
  }
L34:;
  {
   cl_object volatile v5;
   v5 = ecl_make_cfun_va((cl_objectfn)LC4177__lambda17_va,ECL_NIL,Cblock,2);
   T0 = v5;
  }
  si_put_sysprop(VV[15], VV[9], T0);
  {
   cl_object v5package;
   v5package = cl_symbol_package(VV[17]);
   if (Null(v5package)){
    goto L42;
   }
   if (Null(si_package_locked_p(v5package))){
    goto L42;
   }
   if (!(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("*IGNORE-PACKAGE-LOCKS*",1128))==ECL_NIL)){
    goto L42;
   }
   si_signal_simple_error(6, ECL_SYM("PACKAGE-ERROR",620), VVtemp[6], VVtemp[7], VVtemp[12], ECL_SYM("PACKAGE",1321), v5package);
  }
L42:;
  {
   cl_object volatile v6;
   v6 = ecl_make_cfun_va((cl_objectfn)LC4178__lambda22_va,ECL_NIL,Cblock,2);
   T0 = v6;
  }
  si_put_sysprop(VV[17], VV[9], T0);
  ecl_cmp_defun(VV[63]);                          /*  READ-WORD               */
  ecl_cmp_defun(VV[64]);                          /*  WRITE-WORD              */
  ecl_cmp_defun(VV[65]);                          /*  WRITE-VECTOR            */
  ecl_cmp_defun(VV[66]);                          /*  TO-CDB-HASH             */
  ecl_cmp_defun(VV[67]);                          /*  %MAKE-CDB               */
  ecl_cmp_defmacro(VV[68]);                       /*  WITH-OUTPUT-TO-CDB      */
  ecl_cmp_defun(VV[69]);                          /*  ADD-RECORD              */
  ecl_cmp_defun(VV[70]);                          /*  DUMP-TABLE              */
  ecl_cmp_defun(VV[71]);                          /*  DUMP-CDB                */
  ecl_cmp_defun(VV[72]);                          /*  CLOSE-CDB               */
  ecl_cmp_defun(VV[73]);                          /*  CDB-ERROR               */
  ecl_cmp_defun(VV[74]);                          /*  VALUES-COINCIDE         */
  ecl_cmp_defun(VV[75]);                          /*  LOOKUP-CDB              */
  ecl_cmp_defun(VV[76]);                          /*  MAP-CDB                 */
  cl_provide(VV[61]);
 }
}
