/* Compiler: ECL 26.3.27                                                      */
/* Source: /build/ecl/src/ecl-26.3.27/src/lsp/seqlib.lsp                      */
#include <ecl/ecl-cmp.h>
#include "lsp/seqlib.eclh"
/* function definition for SEQTYPE                                            */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L368seqtype(cl_object v1sequence)
{
 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 (!(ECL_LISTP(v1sequence))){
  goto L2;
 }
 value0 = ECL_SYM("LIST",483);
 cl_env_copy->nvalues = 1;
 return value0;
L2:;
 if (!(ECL_BASE_STRING_P(v1sequence))){
  goto L4;
 }
 value0 = ECL_SYM("BASE-STRING",123);
 cl_env_copy->nvalues = 1;
 return value0;
L4:;
 if (!(ECL_STRINGP(v1sequence))){
  goto L6;
 }
 value0 = ECL_SYM("STRING",808);
 cl_env_copy->nvalues = 1;
 return value0;
L6:;
 if (!(ECL_BIT_VECTOR_P(v1sequence))){
  goto L8;
 }
 value0 = ECL_SYM("BIT-VECTOR",136);
 cl_env_copy->nvalues = 1;
 return value0;
L8:;
 if (!(ECL_VECTORP(v1sequence))){
  goto L10;
 }
 T0 = cl_array_element_type(v1sequence);
 value0 = cl_list(2, ECL_SYM("VECTOR",902), T0);
 return value0;
L10:;
 value0 = cl_error(2, VV[1], v1sequence);
 return value0;
}
/* function definition for SEQUENCE-COUNT                                     */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object si_sequence_count(cl_object v1count)
{
 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 (!(v1count==ECL_NIL)){
  goto L2;
 }
 value0 = ecl_make_fixnum(2305843009213693951);
 cl_env_copy->nvalues = 1;
 return value0;
L2:;
 if (!(ECL_FIXNUMP(v1count))){
  goto L4;
 }
 value0 = v1count;
 cl_env_copy->nvalues = 1;
 return value0;
L4:;
 if (!(ECL_FIXNUMP(v1count)||ECL_BIGNUMP(v1count))){
  goto L6;
 }
 if (!(ecl_minusp(v1count))){
  goto L8;
 }
 value0 = ecl_make_int8_t(-1);
 cl_env_copy->nvalues = 1;
 return value0;
L8:;
 value0 = ecl_make_fixnum(2305843009213693951);
 cl_env_copy->nvalues = 1;
 return value0;
L6:;
 T0 = ecl_list1(v1count);
 value0 = cl_error(9, ECL_SYM("SIMPLE-TYPE-ERROR",776), ECL_SYM("DATUM",1245), v1count, ECL_SYM("EXPECTED-TYPE",1263), ECL_SYM("INTEGER",439), ECL_SYM("FORMAT-CONTROL",1272), VV[2], ECL_SYM("FORMAT-ARGUMENTS",1271), T0);
 return value0;
}
/* function definition for TEST-ERROR                                         */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L369test_error()
{
 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(1, VV[4]);
 return value0;
}
/* function definition for UNSAFE-FUNCALL1                                    */
/* optimize speed 3, debug 1, space 1, safety 0                               */
static cl_object L370unsafe_funcall1(cl_object v1f, cl_object v2x)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
L1:;
 value0 = (cl_env_copy->function=v1f)->cfun.entry(1, v2x);
 return value0;
}
static cl_object L370unsafe_funcall1_va(cl_narg narg, cl_object v3f, cl_object v4x, ...)
{
 return L370unsafe_funcall1(v3f, v4x);
}
/* function definition for REDUCE                                             */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_reduce(cl_narg narg, cl_object v1function, cl_object v2sequence, ...)
{
 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<2)) FEwrong_num_arguments(ECL_SYM("REDUCE",709));
 {
  cl_object v3from_end;
  cl_object v4start;
  cl_object v5end;
  cl_object v6key;
  cl_object v7initial_value;
  cl_object v8ivsp;
  ecl_va_list args; ecl_va_start(args,v2sequence,narg,2);
  {
   cl_object keyvars[10];
   cl_parse_key(args,5,cl_reducekeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   v3from_end = keyvars[0];
   if (Null(keyvars[6])) {
    v4start = ecl_make_int8_t(0);
   } else {
    v4start = keyvars[1];
   }
   v5end = keyvars[2];
   v6key = keyvars[3];
   v7initial_value = keyvars[4];
   v8ivsp = keyvars[9];
  }
  {
   cl_object v9function;
   v9function = si_coerce_to_function(v1function);
   {
    cl_fixnum v10;                                /*  START                   */
    cl_fixnum v11;                                /*  END                     */
    value0 = si_sequence_start_end(ECL_SYM("SUBSEQ",832), v2sequence, v4start, v5end);
    {
     v10 = ecl_fixnum(value0);
     v11 = ecl_fixnum(cl_env_copy->values[1]);
    }
    {
     cl_object v12key;
     if (Null(v6key)){
      goto L5;
     }
     v12key = si_coerce_to_function(v6key);
     goto L4;
L5:;
     v12key = (ECL_SYM("IDENTITY",428)->symbol.gfdef);
L4:;
     if (!((v10)>=(v11))){
      goto L7;
     }
     if (Null(v8ivsp)){
      goto L9;
     }
     value0 = v7initial_value;
     cl_env_copy->nvalues = 1;
     return value0;
L9:;
     value0 = (cl_env_copy->function=v9function)->cfun.entry(0);
     return value0;
L7:;
     if (!(ECL_LISTP(v2sequence))){
      goto L11;
     }
     if (Null(v3from_end)){
      goto L13;
     }
     {
      cl_object v13output;
      v13output = ECL_NIL;
      {
       cl_fixnum v14;
       cl_object v15;
       cl_fixnum v16;
       v14 = v10;
       v15 = ecl_nthcdr(v14,v2sequence);
       v16 = (v11)-(v14);
       goto L22;
L21:;
       {
        cl_object v17elt;
        v17elt = _ecl_car(v15);
        v13output = CONS(v17elt,v13output);
       }
       v14 = (v14)+1;
       v15 = _ecl_cdr(v15);
       v16 = (v16)-1;
L22:;
       if ((v16)<=((cl_fixnum)(0))) {
        goto L33;
       }
       goto L21;
L33:;
      }
      v2sequence = v13output;
      v11 = (v11)-(v10);
      v10 = (cl_fixnum)(0);
     }
L13:;
     goto L42;
L41:;
     v2sequence = ECL_CONS_CDR(v2sequence);
     v10 = (v10)-1;
     v11 = (v11)-1;
L42:;
     if (!((v10)>0)){
      goto L50;
     }
     goto L41;
L50:;
     if (v8ivsp!=ECL_NIL) {
      goto L52;
     }
     T0 = ECL_CONS_CAR(v2sequence);
     v7initial_value = (cl_env_copy->function=v12key)->cfun.entry(1, T0);
     v2sequence = ECL_CONS_CDR(v2sequence);
     v11 = (v11)-1;
L52:;
     {
      cl_fixnum v13;
      cl_object v14;
      cl_fixnum v15;
      v13 = (cl_fixnum)(0);
      v14 = ecl_nthcdr(v13,v2sequence);
      v15 = (v11)-(v13);
      goto L64;
L63:;
      {
       cl_object v16elt;
       v16elt = _ecl_car(v14);
       if (Null(v3from_end)){
        goto L69;
       }
       T0 = (cl_env_copy->function=v12key)->cfun.entry(1, v16elt);
       v7initial_value = (cl_env_copy->function=v9function)->cfun.entry(2, T0, v7initial_value);
       goto L68;
L69:;
       T0 = (cl_env_copy->function=v12key)->cfun.entry(1, v16elt);
       v7initial_value = (cl_env_copy->function=v9function)->cfun.entry(2, v7initial_value, T0);
L68:;
      }
      v13 = (v13)+1;
      v14 = _ecl_cdr(v14);
      v15 = (v15)-1;
L64:;
      if ((v15)<=((cl_fixnum)(0))) {
       goto L79;
      }
      goto L63;
L79:;
      value0 = v7initial_value;
      cl_env_copy->nvalues = 1;
      return value0;
     }
L11:;
     if (Null(v3from_end)){
      goto L81;
     }
     if (v8ivsp!=ECL_NIL) {
      goto L83;
     }
     {
      cl_fixnum v16;
      v16 = (v11)-1;
      T0 = ecl_aref_unsafe(v2sequence,v16);
     }
     v7initial_value = (cl_env_copy->function=v12key)->cfun.entry(1, T0);
     v11 = (v11)-1;
L83:;
     {
      cl_fixnum v16;
      v16 = v11;
      goto L92;
L91:;
      {
       cl_object v17elt;
       v16 = (v16)-1;
       v17elt = ecl_aref_unsafe(v2sequence,v16);
       T0 = (cl_env_copy->function=v12key)->cfun.entry(1, v17elt);
       v7initial_value = (cl_env_copy->function=v9function)->cfun.entry(2, T0, v7initial_value);
      }
L92:;
      if ((v16)==(v10)) {
       goto L99;
      }
      goto L91;
L99:;
      value0 = v7initial_value;
      cl_env_copy->nvalues = 1;
      return value0;
     }
L81:;
     if (v8ivsp!=ECL_NIL) {
      goto L101;
     }
     T0 = ecl_aref_unsafe(v2sequence,v10);
     v7initial_value = (cl_env_copy->function=v12key)->cfun.entry(1, T0);
     v10 = (v10)+1;
L101:;
     {
      cl_fixnum v17;
      v17 = v10;
      goto L110;
L109:;
      {
       cl_object v18elt;
       v18elt = ecl_aref_unsafe(v2sequence,v17);
       T0 = (cl_env_copy->function=v12key)->cfun.entry(1, v18elt);
       v7initial_value = (cl_env_copy->function=v9function)->cfun.entry(2, v7initial_value, T0);
      }
      v17 = (v17)+1;
L110:;
      if ((v17)==(v11)) {
       goto L118;
      }
      goto L109;
L118:;
      value0 = v7initial_value;
      cl_env_copy->nvalues = 1;
      return value0;
     }
    }
   }
  }
 }
}
/* function definition for FILL                                               */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_fill(cl_narg narg, cl_object v1sequence, cl_object v2item, ...)
{
 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(ECL_SYM("FILL",363));
 {
  cl_object v3start;
  cl_object v4end;
  ecl_va_list args; ecl_va_start(args,v2item,narg,2);
  {
   cl_object keyvars[4];
   cl_parse_key(args,2,cl_fillkeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   if (Null(keyvars[2])) {
    v3start = ecl_make_int8_t(0);
   } else {
    v3start = keyvars[0];
   }
   v4end = keyvars[1];
  }
  {
   cl_fixnum v5;                                  /*  START                   */
   cl_fixnum v6;                                  /*  END                     */
   value0 = si_sequence_start_end(ECL_SYM("SUBSEQ",832), v1sequence, v3start, v4end);
   {
    v5 = ecl_fixnum(value0);
    v6 = ecl_fixnum(cl_env_copy->values[1]);
   }
   if (!(ECL_LISTP(v1sequence))){
    goto L3;
   }
   {
    cl_object v7x;
    cl_fixnum v8i;
    v7x = ecl_nthcdr(v5,v1sequence);
    v8i = (v6)-(v5);
    goto L9;
L8:;
    {
     cl_object v9;
     v9 = v7x;
     {
      cl_object v10;
      v10 = v2item;
      (ECL_CONS_CAR(v9)=v10,v9);
     }
    }
    v7x = ECL_CONS_CDR(v7x);
    v8i = (v8i)-1;
L9:;
    if ((v8i)==0) {
     goto L19;
    }
    goto L8;
L19:;
    value0 = v1sequence;
    cl_env_copy->nvalues = 1;
    return value0;
   }
L3:;
   value0 = si_fill_array_with_elt(v1sequence, v2item, ecl_make_fixnum(v5), ecl_make_fixnum(v6));
   return value0;
  }
 }
}
/* function definition for REPLACE                                            */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_replace(cl_narg narg, cl_object v1sequence1, cl_object v2sequence2, ...)
{
 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(ECL_SYM("REPLACE",720));
 {
  cl_object v3start1;
  cl_object v4end1;
  cl_object v5start2;
  cl_object v6end2;
  ecl_va_list args; ecl_va_start(args,v2sequence2,narg,2);
  {
   cl_object keyvars[8];
   cl_parse_key(args,4,cl_replacekeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   if (Null(keyvars[4])) {
    v3start1 = ecl_make_int8_t(0);
   } else {
    v3start1 = keyvars[0];
   }
   v4end1 = keyvars[1];
   if (Null(keyvars[6])) {
    v5start2 = ecl_make_int8_t(0);
   } else {
    v5start2 = keyvars[2];
   }
   v6end2 = keyvars[3];
  }
  {
   cl_fixnum v7;                                  /*  START1                  */
   cl_fixnum v8;                                  /*  END1                    */
   value0 = si_sequence_start_end(ECL_SYM("SUBSEQ",832), v1sequence1, v3start1, v4end1);
   {
    v7 = ecl_to_fixnum(value0);
    v8 = ecl_to_fixnum(cl_env_copy->values[1]);
   }
   {
    cl_fixnum v9;                                 /*  START2                  */
    cl_fixnum v10;                                /*  END2                    */
    value0 = si_sequence_start_end(ECL_SYM("SUBSEQ",832), v2sequence2, v5start2, v6end2);
    {
     v9 = ecl_to_fixnum(value0);
     v10 = ecl_to_fixnum(cl_env_copy->values[1]);
    }
    {
     cl_fixnum v11length;
     T0 = ecl_minus(ecl_make_fixnum(v10),ecl_make_fixnum(v9));
     T1 = ecl_minus(ecl_make_fixnum(v8),ecl_make_fixnum(v7));
     v11length = ecl_fixnum(((ecl_float_nan_p(T1) || ecl_lowereq(T0,T1))?T0:T1));
     if (!(ECL_VECTORP(v1sequence1))){
      goto L7;
     }
     if (!(ECL_VECTORP(v2sequence2))){
      goto L7;
     }
     ecl_copy_subarray(v1sequence1,v7,v2sequence2,v9,v11length);
     value0 = ECL_NIL;
     cl_env_copy->nvalues = 0;
     goto L3;
L7:;
     {
      cl_object v12data;
      cl_object v13it2;
      cl_object v14it1;
      if (!((v1sequence1)==(v2sequence2))){
       goto L11;
      }
      if (!((v7)>(v9))){
       goto L11;
      }
      v12data = cl_subseq(3, v2sequence2, ecl_make_fixnum(v9), ecl_make_fixnum(v10));
      goto L10;
L11:;
      v12data = v2sequence2;
L10:;
      v13it2 = si_make_seq_iterator(2, v12data, ecl_make_fixnum(v9));
      v14it1 = si_make_seq_iterator(2, v1sequence1, ecl_make_fixnum(v7));
      goto L18;
L17:;
      T0 = si_seq_iterator_ref(v2sequence2, v13it2);
      si_seq_iterator_set(v1sequence1, v14it1, T0);
      v11length = (v11length)-((cl_fixnum)1);
      v13it2 = si_seq_iterator_next(v12data, v13it2);
      v14it1 = si_seq_iterator_next(v1sequence1, v14it1);
L18:;
      if ((v11length)<=((cl_fixnum)(0))) {
       goto L27;
      }
      if (v14it1==ECL_NIL) {
       goto L27;
      }
      if (v13it2==ECL_NIL) {
       goto L27;
      }
      goto L17;
L27:;
     }
    }
   }
  }
L3:;
  value0 = v1sequence1;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
/* function definition for FILTER-VECTOR                                      */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L371filter_vector(cl_object v1which, cl_object v2out, cl_object v3in, cl_object v4start, cl_object v5end, cl_object v6from_end, cl_object v7count, cl_object v8test, cl_object v9test_not, cl_object v10key)
{
 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 v11;
  if (Null(v8test)){
   goto L3;
  }
  if (Null(v9test_not)){
   goto L5;
  }
  L369test_error();
L5:;
  v11 = si_coerce_to_function(v8test);
  goto L2;
L3:;
  if (Null(v9test_not)){
   goto L7;
  }
  v11 = si_coerce_to_function(v9test_not);
  goto L2;
L7:;
  v11 = (ECL_SYM("EQL",336)->symbol.gfdef);
L2:;
  {
   cl_object v12key;
   if (Null(v10key)){
    goto L10;
   }
   v12key = si_coerce_to_function(v10key);
   goto L9;
L10:;
   v12key = (ECL_SYM("IDENTITY",428)->symbol.gfdef);
L9:;
   {
    cl_fixnum v13;                                /*  START                   */
    cl_fixnum v14;                                /*  END                     */
    cl_fixnum v15;                                /*  L                       */
    value0 = si_sequence_start_end(ECL_SYM("SUBSEQ",832), v3in, v4start, v5end);
    {
     v13 = ecl_fixnum(value0);
     v14 = ecl_fixnum(cl_env_copy->values[1]);
     v15 = ecl_fixnum(cl_env_copy->values[2]);
    }
    {
     cl_fixnum v16_count;
     v16_count = ecl_fixnum(si_sequence_count(v7count));
     if (!((v16_count)>0)){
      goto L14;
     }
     {
      cl_fixnum v17existing;
      v17existing = (cl_fixnum)(0);
      if ((v2out)==(v3in)) {
       goto L17;
      }
      v17existing = ecl_fixnum(cl_count(12, v1which, v3in, ECL_SYM("START",1347), ecl_make_fixnum(v13), ECL_SYM("END",1256), ecl_make_fixnum(v14), ECL_SYM("TEST",1353), v8test, ECL_SYM("TEST-NOT",1354), v9test_not, ECL_SYM("KEY",1297), v12key));
      if (!((v17existing)==0)){
       goto L21;
      }
      cl_env_copy->nvalues = 2;
      cl_env_copy->values[1] = ecl_make_fixnum(v15);
      cl_env_copy->values[0] = v3in;
      return cl_env_copy->values[0];
L21:;
      {
       cl_object v18;
       cl_object v19;
       {
        cl_fixnum v20;
        v20 = (v17existing)<=(v16_count)?v17existing:v16_count;
        v18 = ecl_minus(ecl_make_fixnum(v15),ecl_make_fixnum(v20));
       }
       v19 = cl_array_element_type(v3in);
       v2out = si_make_pure_array(v19, v18, ECL_NIL, ECL_NIL, ECL_NIL, ecl_make_int8_t(0));
      }
L17:;
      if ((v2out)==(v3in)) {
       goto L26;
      }
      ecl_copy_subarray(v2out,(cl_fixnum)(0),v3in,(cl_fixnum)(0),v13);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
L26:;
      {
       cl_fixnum v18skip;
       v18skip = (cl_fixnum)(0);
       if (Null(v6from_end)){
        goto L30;
       }
       if ((v17existing)>0) {
        goto L32;
       }
       v17existing = ecl_fixnum(cl_count(12, v1which, v3in, ECL_SYM("START",1347), ecl_make_fixnum(v13), ECL_SYM("END",1256), ecl_make_fixnum(v14), ECL_SYM("TEST",1353), v8test, ECL_SYM("TEST-NOT",1354), v9test_not, ECL_SYM("KEY",1297), v12key));
L32:;
       if (!((v17existing)<(v16_count))){
        goto L36;
       }
       v18skip = (cl_fixnum)(0);
       goto L35;
L36:;
       v18skip = (v17existing)-(v16_count);
L35:;
L30:;
       if (!((v2out)==(v3in))){
        goto L38;
       }
       {
        cl_fixnum v19index;
        v19index = v13;
        goto L43;
L42:;
        {
         cl_object v20elt;
         v20elt = ecl_aref_unsafe(v3in,v19index);
         if (Null(v9test_not)){
          goto L50;
         }
         T0 = (cl_env_copy->function=v12key)->cfun.entry(1, v20elt);
         if ((cl_env_copy->function=v11)->cfun.entry(2, v1which, T0)!=ECL_NIL) {
          goto L47;
         }
         goto L49;
L50:;
         T0 = (cl_env_copy->function=v12key)->cfun.entry(1, v20elt);
         if (Null((cl_env_copy->function=v11)->cfun.entry(2, v1which, T0))){
          goto L47;
         }
L49:;
         v18skip = (v18skip)-((cl_fixnum)1);
         T0 = ecl_make_fixnum(v18skip);
         if (!((ecl_fixnum(T0))<0)){
          goto L47;
         }
         goto L28;
L47:;
         v13 = (v13)+((cl_fixnum)1);
        }
        v19index = (v19index)+1;
L43:;
        if ((v19index)==(v14)) {
         goto L59;
        }
        goto L42;
L59:;
        goto L28;
       }
L38:;
       {
        cl_fixnum v20index;
        v20index = v13;
        goto L64;
L63:;
        {
         cl_object v21elt;
         v21elt = ecl_aref_unsafe(v3in,v20index);
         if (Null(v9test_not)){
          goto L71;
         }
         T0 = (cl_env_copy->function=v12key)->cfun.entry(1, v21elt);
         if ((cl_env_copy->function=v11)->cfun.entry(2, v1which, T0)!=ECL_NIL) {
          goto L68;
         }
         goto L70;
L71:;
         T0 = (cl_env_copy->function=v12key)->cfun.entry(1, v21elt);
         if (Null((cl_env_copy->function=v11)->cfun.entry(2, v1which, T0))){
          goto L68;
         }
L70:;
         v18skip = (v18skip)-((cl_fixnum)1);
         T0 = ecl_make_fixnum(v18skip);
         if (!((ecl_fixnum(T0))<0)){
          goto L68;
         }
         goto L28;
L68:;
         ecl_aset_unsafe(v2out,v13,v21elt);
         v13 = (v13)+1;
        }
        v20index = (v20index)+1;
L64:;
        if ((v20index)==(v14)) {
         goto L81;
        }
        goto L63;
L81:;
       }
      }
L28:;
      {
       cl_fixnum v18index;
       cl_fixnum v19;
       v18index = v13;
       v19 = v14;
       goto L88;
L87:;
       {
        cl_object v20elt;
        v20elt = ecl_aref_unsafe(v3in,v18index);
        if (Null(v9test_not)){
         goto L94;
        }
        T0 = (cl_env_copy->function=v12key)->cfun.entry(1, v20elt);
        if ((cl_env_copy->function=v11)->cfun.entry(2, v1which, T0)!=ECL_NIL) {
         goto L92;
        }
        goto L93;
L94:;
        T0 = (cl_env_copy->function=v12key)->cfun.entry(1, v20elt);
        if (Null((cl_env_copy->function=v11)->cfun.entry(2, v1which, T0))){
         goto L92;
        }
L93:;
        v16_count = (v16_count)-((cl_fixnum)1);
        T0 = ecl_make_fixnum(v16_count);
        if (!((ecl_fixnum(T0))==0)){
         goto L90;
        }
        v14 = (v18index)+1;
        goto L83;
L92:;
        ecl_aset_unsafe(v2out,v13,v20elt);
        v13 = (v13)+1;
       }
L90:;
       v18index = (v18index)+1;
L88:;
       if ((v18index)==(v19)) {
        goto L107;
       }
       goto L87;
L107:;
      }
L83:;
      ecl_copy_subarray(v2out,v13,v3in,v14,v15);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
      T0 = ecl_minus(ecl_make_fixnum(v15),ecl_make_fixnum(v14));
      T1 = ecl_plus(ecl_make_fixnum(v13),T0);
      cl_env_copy->nvalues = 2;
      cl_env_copy->values[1] = T1;
      cl_env_copy->values[0] = v2out;
      return cl_env_copy->values[0];
     }
L14:;
     value0 = v3in;
     cl_env_copy->nvalues = 1;
     return value0;
    }
   }
  }
 }
}
static cl_object L371filter_vector_va(cl_narg narg, cl_object v13which, cl_object v14out, cl_object v15in, cl_object v16start, cl_object v17end, cl_object v18from_end, cl_object v19count, cl_object v20test, cl_object v21test_not, cl_object v22key, ...)
{
 if (ecl_unlikely(narg!=10)) FEwrong_num_arguments(VV[17]);
 {
  return L371filter_vector(v13which, v14out, v15in, v16start, v17end, v18from_end, v19count, v20test, v21test_not, v22key);
 }
}
/* function definition for REMOVE-LIST                                        */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L372remove_list(cl_object v1which, cl_object v2sequence, cl_object v3start, cl_object v4end, cl_object v5count, cl_object v6test, cl_object v7test_not, cl_object v8key)
{
 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 v9;
  if (Null(v6test)){
   goto L3;
  }
  if (Null(v7test_not)){
   goto L5;
  }
  L369test_error();
L5:;
  v9 = si_coerce_to_function(v6test);
  goto L2;
L3:;
  if (Null(v7test_not)){
   goto L7;
  }
  v9 = si_coerce_to_function(v7test_not);
  goto L2;
L7:;
  v9 = (ECL_SYM("EQL",336)->symbol.gfdef);
L2:;
  {
   cl_object v10key;
   if (Null(v8key)){
    goto L10;
   }
   v10key = si_coerce_to_function(v8key);
   goto L9;
L10:;
   v10key = (ECL_SYM("IDENTITY",428)->symbol.gfdef);
L9:;
   {
    cl_fixnum v11;                                /*  START                   */
    cl_fixnum v12;                                /*  END                     */
    value0 = si_sequence_start_end(ECL_SYM("SUBSEQ",832), v2sequence, v3start, v4end);
    {
     v11 = ecl_fixnum(value0);
     v12 = ecl_fixnum(cl_env_copy->values[1]);
    }
    {
     cl_fixnum v13_count;
     v13_count = ecl_fixnum(si_sequence_count(v5count));
     if (!((v13_count)>0)){
      goto L14;
     }
     {
      cl_object v14output;
      cl_fixnum v15index;
      v14output = ECL_NIL;
      v15index = (cl_fixnum)(0);
      goto L20;
L19:;
      T0 = ECL_CONS_CAR(v2sequence);
      v14output = CONS(T0,v14output);
      v2sequence = ECL_CONS_CDR(v2sequence);
      v15index = (v15index)+1;
L20:;
      if (Null(v2sequence)){
       goto L28;
      }
      if (!((v15index)<(v11))){
       goto L28;
      }
      goto L19;
L28:;
L32:;
      if ((v15index)<(v12)) {
       goto L34;
      }
      goto L31;
L34:;
      {
       cl_object v16elt;
       v16elt = ECL_CONS_CAR(v2sequence);
       v2sequence = ECL_CONS_CDR(v2sequence);
       if (Null(v7test_not)){
        goto L42;
       }
       T0 = (cl_env_copy->function=v10key)->cfun.entry(1, v16elt);
       if ((cl_env_copy->function=v9)->cfun.entry(2, v1which, T0)!=ECL_NIL) {
        goto L40;
       }
       goto L41;
L42:;
       T0 = (cl_env_copy->function=v10key)->cfun.entry(1, v16elt);
       if (Null((cl_env_copy->function=v9)->cfun.entry(2, v1which, T0))){
        goto L40;
       }
L41:;
       v13_count = (v13_count)-((cl_fixnum)1);
       T0 = ecl_make_fixnum(v13_count);
       if (!((ecl_fixnum(T0))==0)){
        goto L39;
       }
       goto L31;
L40:;
       v14output = CONS(v16elt,v14output);
L39:;
       v15index = (v15index)+((cl_fixnum)1);
      }
      goto L32;
L31:;
      value0 = cl_nreconc(v14output, v2sequence);
      return value0;
     }
L14:;
     value0 = v2sequence;
     cl_env_copy->nvalues = 1;
     return value0;
    }
   }
  }
 }
}
static cl_object L372remove_list_va(cl_narg narg, cl_object v11which, cl_object v12sequence, cl_object v13start, cl_object v14end, cl_object v15count, cl_object v16test, cl_object v17test_not, cl_object v18key, ...)
{
 if (ecl_unlikely(narg!=8)) FEwrong_num_arguments(VV[22]);
 {
  return L372remove_list(v11which, v12sequence, v13start, v14end, v15count, v16test, v17test_not, v18key);
 }
}
/* function definition for REMOVE                                             */
/* optimize speed 3, debug 0, space 1, safety 1                               */
cl_object cl_remove(cl_narg narg, cl_object v1which, cl_object v2sequence, ...)
{
 cl_object T0, T1, T2, T3;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 if (ecl_unlikely(narg<2)) FEwrong_num_arguments(ECL_SYM("REMOVE",713));
 {
  cl_object v3test;
  cl_object v4test_not;
  cl_object v5start;
  cl_object v6end;
  cl_object v7from_end;
  cl_object v8count;
  cl_object v9key;
  ecl_va_list args; ecl_va_start(args,v2sequence,narg,2);
  {
   cl_object keyvars[14];
   cl_parse_key(args,7,cl_removekeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   v3test = keyvars[0];
   v4test_not = keyvars[1];
   if (Null(keyvars[9])) {
    v5start = ecl_make_int8_t(0);
   } else {
    v5start = keyvars[2];
   }
   v6end = keyvars[3];
   v7from_end = keyvars[4];
   v8count = keyvars[5];
   v9key = keyvars[6];
  }
  if (ecl_unlikely(!(ECL_LISTP(v2sequence) || ECL_VECTORP(v2sequence))))
           FEtype_error_sequence(v2sequence);
  value0 = ECL_NIL;
  cl_env_copy->nvalues = 0;
  if (!(ECL_LISTP(v2sequence))){
   goto L3;
  }
  if (Null(v7from_end)){
   goto L5;
  }
  {
   cl_object v10l;
   v10l = ecl_make_fixnum(ecl_length(v2sequence));
   T0 = cl_reverse(v2sequence);
   if (Null(v6end)){
    goto L9;
   }
   T1 = ecl_minus(v10l,v6end);
   goto L8;
L9:;
   T1 = ecl_make_int8_t(0);
L8:;
   T2 = ecl_minus(v10l,v5start);
   T3 = cl_delete(16, v1which, T0, ECL_SYM("START",1347), T1, ECL_SYM("END",1256), T2, VV[25], ECL_NIL, ECL_SYM("TEST",1353), v3test, ECL_SYM("TEST-NOT",1354), v4test_not, ECL_SYM("KEY",1297), v9key, ECL_SYM("COUNT",1499), v8count);
   value0 = cl_nreverse(T3);
   return value0;
  }
L5:;
  value0 = L372remove_list(v1which, v2sequence, v5start, v6end, v8count, v3test, v4test_not, v9key);
  return value0;
L3:;
  value0 = L371filter_vector(v1which, ECL_NIL, v2sequence, v5start, v6end, v7from_end, v8count, v3test, v4test_not, v9key);
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
/* function definition for REMOVE-IF                                          */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_remove_if(cl_narg narg, cl_object v1predicate, cl_object v2sequence, ...)
{
 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(ECL_SYM("REMOVE-IF",715));
 {
  cl_object v3start;
  cl_object v4end;
  cl_object v5from_end;
  cl_object v6count;
  cl_object v7key;
  ecl_va_list args; ecl_va_start(args,v2sequence,narg,2);
  {
   cl_object keyvars[10];
   cl_parse_key(args,5,cl_remove_ifkeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   if (Null(keyvars[5])) {
    v3start = ecl_make_int8_t(0);
   } else {
    v3start = keyvars[0];
   }
   v4end = keyvars[1];
   v5from_end = keyvars[2];
   v6count = keyvars[3];
   v7key = keyvars[4];
  }
  T0 = si_coerce_to_function(v1predicate);
  T1 = (VV[5]->symbol.gfdef);
  value0 = cl_remove(14, T0, v2sequence, ECL_SYM("START",1347), v3start, ECL_SYM("END",1256), v4end, VV[25], v5from_end, ECL_SYM("COUNT",1499), v6count, ECL_SYM("TEST",1353), T1, ECL_SYM("KEY",1297), v7key);
  return value0;
 }
}
/* function definition for REMOVE-IF-NOT                                      */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_remove_if_not(cl_narg narg, cl_object v1predicate, cl_object v2sequence, ...)
{
 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(ECL_SYM("REMOVE-IF-NOT",716));
 {
  cl_object v3start;
  cl_object v4end;
  cl_object v5from_end;
  cl_object v6count;
  cl_object v7key;
  ecl_va_list args; ecl_va_start(args,v2sequence,narg,2);
  {
   cl_object keyvars[10];
   cl_parse_key(args,5,cl_remove_if_notkeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   if (Null(keyvars[5])) {
    v3start = ecl_make_int8_t(0);
   } else {
    v3start = keyvars[0];
   }
   v4end = keyvars[1];
   v5from_end = keyvars[2];
   v6count = keyvars[3];
   v7key = keyvars[4];
  }
  T0 = si_coerce_to_function(v1predicate);
  T1 = (VV[5]->symbol.gfdef);
  value0 = cl_remove(14, T0, v2sequence, ECL_SYM("START",1347), v3start, ECL_SYM("END",1256), v4end, VV[25], v5from_end, ECL_SYM("COUNT",1499), v6count, ECL_SYM("TEST-NOT",1354), T1, ECL_SYM("KEY",1297), v7key);
  return value0;
 }
}
/* function definition for DELETE-LIST                                        */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L373delete_list(cl_object v1which, cl_object v2sequence, cl_object v3start, cl_object v4end, cl_object v5count, cl_object v6test, cl_object v7test_not, cl_object v8key)
{
 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 v9;
  if (Null(v6test)){
   goto L3;
  }
  if (Null(v7test_not)){
   goto L5;
  }
  L369test_error();
L5:;
  v9 = si_coerce_to_function(v6test);
  goto L2;
L3:;
  if (Null(v7test_not)){
   goto L7;
  }
  v9 = si_coerce_to_function(v7test_not);
  goto L2;
L7:;
  v9 = (ECL_SYM("EQL",336)->symbol.gfdef);
L2:;
  {
   cl_object v10key;
   if (Null(v8key)){
    goto L10;
   }
   v10key = si_coerce_to_function(v8key);
   goto L9;
L10:;
   v10key = (ECL_SYM("IDENTITY",428)->symbol.gfdef);
L9:;
   {
    cl_fixnum v11;                                /*  START                   */
    cl_fixnum v12;                                /*  END                     */
    value0 = si_sequence_start_end(ECL_SYM("SUBSEQ",832), v2sequence, v3start, v4end);
    {
     v11 = ecl_fixnum(value0);
     v12 = ecl_fixnum(cl_env_copy->values[1]);
    }
    {
     cl_fixnum v13_count;
     v13_count = ecl_fixnum(si_sequence_count(v5count));
     if (!((v13_count)>0)){
      goto L14;
     }
     {
      cl_object v14splice;
      cl_object v15output;
      cl_fixnum v16index;
      v14splice = CONS(ECL_NIL,v2sequence);
      v15output = v14splice;
      v16index = (cl_fixnum)(0);
      goto L21;
L20:;
      v2sequence = ECL_CONS_CDR(v2sequence);
      v14splice = ECL_CONS_CDR(v14splice);
      v16index = (v16index)+1;
L21:;
      if (Null(v2sequence)){
       goto L29;
      }
      if (!((v16index)<(v11))){
       goto L29;
      }
      goto L20;
L29:;
L33:;
      if ((v16index)<(v12)) {
       goto L35;
      }
      goto L32;
L35:;
      {
       cl_object v17elt;
       v17elt = ECL_CONS_CAR(v2sequence);
       v2sequence = ECL_CONS_CDR(v2sequence);
       if (Null(v7test_not)){
        goto L43;
       }
       T0 = (cl_env_copy->function=v10key)->cfun.entry(1, v17elt);
       if ((cl_env_copy->function=v9)->cfun.entry(2, v1which, T0)!=ECL_NIL) {
        goto L41;
       }
       goto L42;
L43:;
       T0 = (cl_env_copy->function=v10key)->cfun.entry(1, v17elt);
       if (Null((cl_env_copy->function=v9)->cfun.entry(2, v1which, T0))){
        goto L41;
       }
L42:;
       {
        cl_object v18;
        v18 = v14splice;
        {
         cl_object v19;
         v19 = v2sequence;
         (ECL_CONS_CDR(v18)=v19,v18);
        }
       }
       v13_count = (v13_count)-((cl_fixnum)1);
       T0 = ecl_make_fixnum(v13_count);
       if (!((ecl_fixnum(T0))==0)){
        goto L40;
       }
       goto L32;
L41:;
       v14splice = ECL_CONS_CDR(v14splice);
L40:;
       v16index = (v16index)+((cl_fixnum)1);
      }
      goto L33;
L32:;
      value0 = ECL_CONS_CDR(v15output);
      cl_env_copy->nvalues = 1;
      return value0;
     }
L14:;
     value0 = v2sequence;
     cl_env_copy->nvalues = 1;
     return value0;
    }
   }
  }
 }
}
static cl_object L373delete_list_va(cl_narg narg, cl_object v11which, cl_object v12sequence, cl_object v13start, cl_object v14end, cl_object v15count, cl_object v16test, cl_object v17test_not, cl_object v18key, ...)
{
 if (ecl_unlikely(narg!=8)) FEwrong_num_arguments(VV[26]);
 {
  return L373delete_list(v11which, v12sequence, v13start, v14end, v15count, v16test, v17test_not, v18key);
 }
}
/* function definition for DELETE                                             */
/* optimize speed 3, debug 0, space 1, safety 1                               */
cl_object cl_delete(cl_narg narg, cl_object v1which, cl_object v2sequence, ...)
{
 cl_object T0, T1, T2, T3;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 if (ecl_unlikely(narg<2)) FEwrong_num_arguments(ECL_SYM("DELETE",293));
 {
  cl_object v3test;
  cl_object v4test_not;
  cl_object v5start;
  cl_object v6end;
  cl_object v7from_end;
  cl_object v8count;
  cl_object v9key;
  ecl_va_list args; ecl_va_start(args,v2sequence,narg,2);
  {
   cl_object keyvars[14];
   cl_parse_key(args,7,cl_deletekeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   v3test = keyvars[0];
   v4test_not = keyvars[1];
   if (Null(keyvars[9])) {
    v5start = ecl_make_int8_t(0);
   } else {
    v5start = keyvars[2];
   }
   v6end = keyvars[3];
   v7from_end = keyvars[4];
   v8count = keyvars[5];
   v9key = keyvars[6];
  }
  if (!(ECL_LISTP(v2sequence))){
   goto L2;
  }
  if (Null(v7from_end)){
   goto L4;
  }
  {
   cl_object v10l;
   v10l = ecl_make_fixnum(ecl_length(v2sequence));
   T0 = cl_nreverse(v2sequence);
   if (Null(v6end)){
    goto L8;
   }
   T1 = ecl_minus(v10l,v6end);
   goto L7;
L8:;
   T1 = ecl_make_int8_t(0);
L7:;
   T2 = ecl_minus(v10l,v5start);
   T3 = L373delete_list(v1which, T0, T1, T2, v8count, v3test, v4test_not, v9key);
   value0 = cl_nreverse(T3);
   return value0;
  }
L4:;
  value0 = L373delete_list(v1which, v2sequence, v5start, v6end, v8count, v3test, v4test_not, v9key);
  return value0;
L2:;
  if (ECL_VECTORP(v2sequence)) {
   goto L10;
  }
  value0 = si_signal_type_error(v2sequence, ECL_SYM("SEQUENCE",744));
  return value0;
L10:;
  if (!(ECL_ARRAY_HAS_FILL_POINTER_P(v2sequence))){
   goto L12;
  }
  {
   cl_object v11;                                 /*  SEQUENCE                */
   cl_object v12;                                 /*  L                       */
   value0 = L371filter_vector(v1which, v2sequence, v2sequence, v5start, v6end, v7from_end, v8count, v3test, v4test_not, v9key);
   {
    const int v13 = cl_env_copy->nvalues;
    v11 = value0;
    cl_object v14;
    v14 = (v13<=1)? ECL_NIL : cl_env_copy->values[1];
    v12 = v14;
   }
   si_fill_pointer_set(v11, v12);
   value0 = v11;
   cl_env_copy->nvalues = 1;
   return value0;
  }
L12:;
  value0 = L371filter_vector(v1which, ECL_NIL, v2sequence, v5start, v6end, v7from_end, v8count, v3test, v4test_not, v9key);
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
/* function definition for DELETE-IF                                          */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_delete_if(cl_narg narg, cl_object v1predicate, cl_object v2sequence, ...)
{
 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(ECL_SYM("DELETE-IF",296));
 {
  cl_object v3start;
  cl_object v4end;
  cl_object v5from_end;
  cl_object v6count;
  cl_object v7key;
  ecl_va_list args; ecl_va_start(args,v2sequence,narg,2);
  {
   cl_object keyvars[10];
   cl_parse_key(args,5,cl_delete_ifkeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   if (Null(keyvars[5])) {
    v3start = ecl_make_int8_t(0);
   } else {
    v3start = keyvars[0];
   }
   v4end = keyvars[1];
   v5from_end = keyvars[2];
   v6count = keyvars[3];
   v7key = keyvars[4];
  }
  T0 = si_coerce_to_function(v1predicate);
  T1 = (VV[5]->symbol.gfdef);
  value0 = cl_delete(14, T0, v2sequence, ECL_SYM("START",1347), v3start, ECL_SYM("END",1256), v4end, VV[25], v5from_end, ECL_SYM("COUNT",1499), v6count, ECL_SYM("TEST",1353), T1, ECL_SYM("KEY",1297), v7key);
  return value0;
 }
}
/* function definition for DELETE-IF-NOT                                      */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_delete_if_not(cl_narg narg, cl_object v1predicate, cl_object v2sequence, ...)
{
 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(ECL_SYM("DELETE-IF-NOT",297));
 {
  cl_object v3start;
  cl_object v4end;
  cl_object v5from_end;
  cl_object v6count;
  cl_object v7key;
  ecl_va_list args; ecl_va_start(args,v2sequence,narg,2);
  {
   cl_object keyvars[10];
   cl_parse_key(args,5,cl_delete_if_notkeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   if (Null(keyvars[5])) {
    v3start = ecl_make_int8_t(0);
   } else {
    v3start = keyvars[0];
   }
   v4end = keyvars[1];
   v5from_end = keyvars[2];
   v6count = keyvars[3];
   v7key = keyvars[4];
  }
  T0 = si_coerce_to_function(v1predicate);
  T1 = (VV[5]->symbol.gfdef);
  value0 = cl_delete(14, T0, v2sequence, ECL_SYM("START",1347), v3start, ECL_SYM("END",1256), v4end, VV[25], v5from_end, ECL_SYM("COUNT",1499), v6count, ECL_SYM("TEST-NOT",1354), T1, ECL_SYM("KEY",1297), v7key);
  return value0;
 }
}
/* function definition for COUNT                                              */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_count(cl_narg narg, cl_object v1item, cl_object v2sequence, ...)
{
 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<2)) FEwrong_num_arguments(ECL_SYM("COUNT",268));
 {
  cl_object v3test;
  cl_object v4test_not;
  cl_object v5from_end;
  cl_object v6start;
  cl_object v7end;
  cl_object v8key;
  ecl_va_list args; ecl_va_start(args,v2sequence,narg,2);
  {
   cl_object keyvars[12];
   cl_parse_key(args,6,cl_countkeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   v3test = keyvars[0];
   v4test_not = keyvars[1];
   v5from_end = keyvars[2];
   if (Null(keyvars[9])) {
    v6start = ecl_make_int8_t(0);
   } else {
    v6start = keyvars[3];
   }
   v7end = keyvars[4];
   v8key = keyvars[5];
  }
  {
   cl_object v9;
   if (Null(v3test)){
    goto L3;
   }
   if (Null(v4test_not)){
    goto L5;
   }
   L369test_error();
L5:;
   v9 = si_coerce_to_function(v3test);
   goto L2;
L3:;
   if (Null(v4test_not)){
    goto L7;
   }
   v9 = si_coerce_to_function(v4test_not);
   goto L2;
L7:;
   v9 = (ECL_SYM("EQL",336)->symbol.gfdef);
L2:;
   {
    cl_object v10key;
    if (Null(v8key)){
     goto L10;
    }
    v10key = si_coerce_to_function(v8key);
    goto L9;
L10:;
    v10key = (ECL_SYM("IDENTITY",428)->symbol.gfdef);
L9:;
    {
     cl_fixnum v11;                               /*  START                   */
     cl_fixnum v12;                               /*  END                     */
     cl_fixnum v13;                               /*  L                       */
     value0 = si_sequence_start_end(ECL_SYM("SUBSEQ",832), v2sequence, v6start, v7end);
     {
      v11 = ecl_fixnum(value0);
      v12 = ecl_fixnum(cl_env_copy->values[1]);
      v13 = ecl_fixnum(cl_env_copy->values[2]);
     }
     {
      cl_fixnum v14counter;
      v14counter = (cl_fixnum)(0);
      if (Null(v5from_end)){
       goto L14;
      }
      if (!(ECL_LISTP(v2sequence))){
       goto L16;
      }
      T0 = cl_reverse(v2sequence);
      T1 = ecl_minus(ecl_make_fixnum(v13),ecl_make_fixnum(v12));
      T2 = ecl_minus(ecl_make_fixnum(v13),ecl_make_fixnum(v11));
      value0 = cl_count(12, v1item, T0, ECL_SYM("START",1347), T1, ECL_SYM("END",1256), T2, ECL_SYM("TEST",1353), v3test, ECL_SYM("TEST-NOT",1354), v4test_not, ECL_SYM("KEY",1297), v10key);
      return value0;
L16:;
      {
       cl_fixnum v15;
       v15 = v12;
       goto L21;
L20:;
       {
        cl_object v16elt;
        v15 = (v15)-1;
        v16elt = ecl_aref_unsafe(v2sequence,v15);
        if (Null(v4test_not)){
         goto L27;
        }
        T0 = (cl_env_copy->function=v10key)->cfun.entry(1, v16elt);
        if ((cl_env_copy->function=v9)->cfun.entry(2, v1item, T0)!=ECL_NIL) {
         goto L23;
        }
        goto L26;
L27:;
        T0 = (cl_env_copy->function=v10key)->cfun.entry(1, v16elt);
        if (Null((cl_env_copy->function=v9)->cfun.entry(2, v1item, T0))){
         goto L23;
        }
L26:;
        v14counter = (v14counter)+((cl_fixnum)1);
       }
L23:;
L21:;
       if ((v15)==(v11)) {
        goto L32;
       }
       goto L20;
L32:;
       value0 = ecl_make_fixnum(v14counter);
       cl_env_copy->nvalues = 1;
       return value0;
      }
L14:;
      if (!(ECL_LISTP(v2sequence))){
       goto L34;
      }
      {
       cl_fixnum v16;
       cl_object v17;
       cl_fixnum v18;
       v16 = v11;
       v17 = ecl_nthcdr(v16,v2sequence);
       v18 = (v12)-(v16);
       goto L41;
L40:;
       {
        cl_object v19elt;
        v19elt = _ecl_car(v17);
        if (Null(v4test_not)){
         goto L46;
        }
        T0 = (cl_env_copy->function=v10key)->cfun.entry(1, v19elt);
        if ((cl_env_copy->function=v9)->cfun.entry(2, v1item, T0)!=ECL_NIL) {
         goto L43;
        }
        goto L45;
L46:;
        T0 = (cl_env_copy->function=v10key)->cfun.entry(1, v19elt);
        if (Null((cl_env_copy->function=v9)->cfun.entry(2, v1item, T0))){
         goto L43;
        }
L45:;
        v14counter = (v14counter)+((cl_fixnum)1);
       }
L43:;
       v16 = (v16)+1;
       v17 = _ecl_cdr(v17);
       v18 = (v18)-1;
L41:;
       if ((v18)<=((cl_fixnum)(0))) {
        goto L57;
       }
       goto L40;
L57:;
       value0 = ecl_make_fixnum(v14counter);
       cl_env_copy->nvalues = 1;
       return value0;
      }
L34:;
      {
       cl_fixnum v19;
       v19 = v11;
       goto L62;
L61:;
       {
        cl_object v20elt;
        v20elt = ecl_aref_unsafe(v2sequence,v19);
        if (Null(v4test_not)){
         goto L67;
        }
        T0 = (cl_env_copy->function=v10key)->cfun.entry(1, v20elt);
        if ((cl_env_copy->function=v9)->cfun.entry(2, v1item, T0)!=ECL_NIL) {
         goto L64;
        }
        goto L66;
L67:;
        T0 = (cl_env_copy->function=v10key)->cfun.entry(1, v20elt);
        if (Null((cl_env_copy->function=v9)->cfun.entry(2, v1item, T0))){
         goto L64;
        }
L66:;
        v14counter = (v14counter)+((cl_fixnum)1);
       }
L64:;
       v19 = (v19)+1;
L62:;
       if ((v19)==(v12)) {
        goto L74;
       }
       goto L61;
L74:;
       value0 = ecl_make_fixnum(v14counter);
       cl_env_copy->nvalues = 1;
       return value0;
      }
     }
    }
   }
  }
 }
}
/* function definition for COUNT-IF                                           */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_count_if(cl_narg narg, cl_object v1predicate, cl_object v2sequence, ...)
{
 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(ECL_SYM("COUNT-IF",269));
 {
  cl_object v3from_end;
  cl_object v4start;
  cl_object v5end;
  cl_object v6key;
  ecl_va_list args; ecl_va_start(args,v2sequence,narg,2);
  {
   cl_object keyvars[8];
   cl_parse_key(args,4,cl_count_ifkeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   v3from_end = keyvars[0];
   if (Null(keyvars[5])) {
    v4start = ecl_make_int8_t(0);
   } else {
    v4start = keyvars[1];
   }
   v5end = keyvars[2];
   v6key = keyvars[3];
  }
  T0 = si_coerce_to_function(v1predicate);
  T1 = (VV[5]->symbol.gfdef);
  value0 = cl_count(12, T0, v2sequence, VV[25], v3from_end, ECL_SYM("START",1347), v4start, ECL_SYM("END",1256), v5end, ECL_SYM("TEST",1353), T1, ECL_SYM("KEY",1297), v6key);
  return value0;
 }
}
/* function definition for COUNT-IF-NOT                                       */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_count_if_not(cl_narg narg, cl_object v1predicate, cl_object v2sequence, ...)
{
 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(ECL_SYM("COUNT-IF-NOT",270));
 {
  cl_object v3from_end;
  cl_object v4start;
  cl_object v5end;
  cl_object v6key;
  ecl_va_list args; ecl_va_start(args,v2sequence,narg,2);
  {
   cl_object keyvars[8];
   cl_parse_key(args,4,cl_count_if_notkeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   v3from_end = keyvars[0];
   if (Null(keyvars[5])) {
    v4start = ecl_make_int8_t(0);
   } else {
    v4start = keyvars[1];
   }
   v5end = keyvars[2];
   v6key = keyvars[3];
  }
  T0 = si_coerce_to_function(v1predicate);
  T1 = (VV[5]->symbol.gfdef);
  value0 = cl_count(12, T0, v2sequence, VV[25], v3from_end, ECL_SYM("START",1347), v4start, ECL_SYM("END",1256), v5end, ECL_SYM("TEST-NOT",1354), T1, ECL_SYM("KEY",1297), v6key);
  return value0;
 }
}
/* function definition for SUBSTITUTE                                         */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_substitute(cl_narg narg, cl_object v1new, cl_object v2old, cl_object v3sequence, ...)
{
 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<3)) FEwrong_num_arguments(ECL_SYM("SUBSTITUTE",837));
 {
  cl_object v4test;
  cl_object v5test_not;
  cl_object v6start;
  cl_object v7end;
  cl_object v8from_end;
  cl_object v9count;
  cl_object v10key;
  ecl_va_list args; ecl_va_start(args,v3sequence,narg,3);
  {
   cl_object keyvars[14];
   cl_parse_key(args,7,cl_substitutekeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   v4test = keyvars[0];
   v5test_not = keyvars[1];
   if (Null(keyvars[9])) {
    v6start = ecl_make_int8_t(0);
   } else {
    v6start = keyvars[2];
   }
   v7end = keyvars[3];
   v8from_end = keyvars[4];
   v9count = keyvars[5];
   v10key = keyvars[6];
  }
  T0 = ecl_copy_seq(v3sequence);
  value0 = cl_nsubstitute(17, v1new, v2old, T0, ECL_SYM("START",1347), v6start, ECL_SYM("END",1256), v7end, VV[25], v8from_end, ECL_SYM("COUNT",1499), v9count, ECL_SYM("KEY",1297), v10key, ECL_SYM("TEST",1353), v4test, ECL_SYM("TEST-NOT",1354), v5test_not);
  return value0;
 }
}
/* function definition for SUBSTITUTE-IF                                      */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_substitute_if(cl_narg narg, cl_object v1new, cl_object v2predicate, cl_object v3sequence, ...)
{
 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(ECL_SYM("SUBSTITUTE-IF",838));
 {
  cl_object v4start;
  cl_object v5end;
  cl_object v6from_end;
  cl_object v7count;
  cl_object v8key;
  ecl_va_list args; ecl_va_start(args,v3sequence,narg,3);
  {
   cl_object keyvars[10];
   cl_parse_key(args,5,cl_substitute_ifkeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   if (Null(keyvars[5])) {
    v4start = ecl_make_int8_t(0);
   } else {
    v4start = keyvars[0];
   }
   v5end = keyvars[1];
   v6from_end = keyvars[2];
   v7count = keyvars[3];
   v8key = keyvars[4];
  }
  T0 = si_coerce_to_function(v2predicate);
  T1 = ecl_copy_seq(v3sequence);
  T2 = (VV[5]->symbol.gfdef);
  value0 = cl_nsubstitute(17, v1new, T0, T1, ECL_SYM("KEY",1297), v8key, ECL_SYM("TEST",1353), T2, ECL_SYM("START",1347), v4start, ECL_SYM("END",1256), v5end, VV[25], v6from_end, ECL_SYM("COUNT",1499), v7count, ECL_SYM("KEY",1297), v8key);
  return value0;
 }
}
/* function definition for SUBSTITUTE-IF-NOT                                  */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_substitute_if_not(cl_narg narg, cl_object v1new, cl_object v2predicate, cl_object v3sequence, ...)
{
 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(ECL_SYM("SUBSTITUTE-IF-NOT",839));
 {
  cl_object v4start;
  cl_object v5end;
  cl_object v6from_end;
  cl_object v7count;
  cl_object v8key;
  ecl_va_list args; ecl_va_start(args,v3sequence,narg,3);
  {
   cl_object keyvars[10];
   cl_parse_key(args,5,cl_substitute_if_notkeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   if (Null(keyvars[5])) {
    v4start = ecl_make_int8_t(0);
   } else {
    v4start = keyvars[0];
   }
   v5end = keyvars[1];
   v6from_end = keyvars[2];
   v7count = keyvars[3];
   v8key = keyvars[4];
  }
  T0 = si_coerce_to_function(v2predicate);
  T1 = ecl_copy_seq(v3sequence);
  T2 = (VV[5]->symbol.gfdef);
  value0 = cl_nsubstitute(17, v1new, T0, T1, ECL_SYM("KEY",1297), v8key, ECL_SYM("TEST-NOT",1354), T2, ECL_SYM("START",1347), v4start, ECL_SYM("END",1256), v5end, VV[25], v6from_end, ECL_SYM("COUNT",1499), v7count, ECL_SYM("KEY",1297), v8key);
  return value0;
 }
}
/* function definition for NSUBSTITUTE                                        */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_nsubstitute(cl_narg narg, cl_object v1new, cl_object v2old, cl_object v3sequence, ...)
{
 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<3)) FEwrong_num_arguments(ECL_SYM("NSUBSTITUTE",601));
 {
  cl_object v4test;
  cl_object v5test_not;
  cl_object v6start;
  cl_object v7end;
  cl_object v8from_end;
  cl_object v9count;
  cl_object v10key;
  ecl_va_list args; ecl_va_start(args,v3sequence,narg,3);
  {
   cl_object keyvars[14];
   cl_parse_key(args,7,cl_nsubstitutekeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   v4test = keyvars[0];
   v5test_not = keyvars[1];
   if (Null(keyvars[9])) {
    v6start = ecl_make_int8_t(0);
   } else {
    v6start = keyvars[2];
   }
   v7end = keyvars[3];
   v8from_end = keyvars[4];
   v9count = keyvars[5];
   v10key = keyvars[6];
  }
  {
   cl_object v11;
   if (Null(v4test)){
    goto L3;
   }
   if (Null(v5test_not)){
    goto L5;
   }
   L369test_error();
L5:;
   v11 = si_coerce_to_function(v4test);
   goto L2;
L3:;
   if (Null(v5test_not)){
    goto L7;
   }
   v11 = si_coerce_to_function(v5test_not);
   goto L2;
L7:;
   v11 = (ECL_SYM("EQL",336)->symbol.gfdef);
L2:;
   {
    cl_object v12key;
    if (Null(v10key)){
     goto L10;
    }
    v12key = si_coerce_to_function(v10key);
    goto L9;
L10:;
    v12key = (ECL_SYM("IDENTITY",428)->symbol.gfdef);
L9:;
    {
     cl_fixnum v13;                               /*  START                   */
     cl_fixnum v14;                               /*  END                     */
     cl_fixnum v15;                               /*  L                       */
     value0 = si_sequence_start_end(ECL_SYM("SUBSEQ",832), v3sequence, v6start, v7end);
     {
      v13 = ecl_fixnum(value0);
      v14 = ecl_fixnum(cl_env_copy->values[1]);
      v15 = ecl_fixnum(cl_env_copy->values[2]);
     }
     {
      cl_fixnum v16_count;
      v16_count = ecl_fixnum(si_sequence_count(v9count));
      if (!((v16_count)>0)){
       goto L14;
      }
      if (Null(v8from_end)){
       goto L16;
      }
      if (!(ECL_LISTP(v3sequence))){
       goto L18;
      }
      T0 = cl_nreverse(v3sequence);
      T1 = ecl_minus(ecl_make_fixnum(v15),ecl_make_fixnum(v14));
      T2 = ecl_minus(ecl_make_fixnum(v15),ecl_make_fixnum(v13));
      T3 = cl_nsubstitute(15, v1new, v2old, T0, ECL_SYM("START",1347), T1, ECL_SYM("END",1256), T2, ECL_SYM("KEY",1297), v12key, ECL_SYM("TEST",1353), v4test, ECL_SYM("TEST-NOT",1354), v5test_not, ECL_SYM("COUNT",1499), v9count);
      value0 = cl_nreverse(T3);
      return value0;
L18:;
      {
       cl_fixnum v17;
       v17 = v14;
       goto L23;
L22:;
       {
        cl_object v18elt;
        v17 = (v17)-1;
        v18elt = ecl_aref_unsafe(v3sequence,v17);
        if (Null(v5test_not)){
         goto L29;
        }
        T0 = (cl_env_copy->function=v12key)->cfun.entry(1, v18elt);
        if ((cl_env_copy->function=v11)->cfun.entry(2, v2old, T0)!=ECL_NIL) {
         goto L25;
        }
        goto L28;
L29:;
        T0 = (cl_env_copy->function=v12key)->cfun.entry(1, v18elt);
        if (Null((cl_env_copy->function=v11)->cfun.entry(2, v2old, T0))){
         goto L25;
        }
L28:;
        ecl_aset_unsafe(v3sequence,v17,v1new);
        v16_count = (v16_count)-((cl_fixnum)1);
        T0 = ecl_make_fixnum(v16_count);
        if (!((ecl_fixnum(T0))==0)){
         goto L25;
        }
        value0 = v3sequence;
        cl_env_copy->nvalues = 1;
        return value0;
       }
L25:;
L23:;
       if ((v17)==(v13)) {
        goto L37;
       }
       goto L22;
L37:;
       value0 = v3sequence;
       cl_env_copy->nvalues = 1;
       return value0;
      }
L16:;
      if (!(ECL_LISTP(v3sequence))){
       goto L39;
      }
      {
       cl_fixnum v18;
       cl_object v19;
       cl_fixnum v20;
       v18 = v13;
       v19 = ecl_nthcdr(v18,v3sequence);
       v20 = (v14)-(v18);
       goto L46;
L45:;
       {
        cl_object v21elt;
        v21elt = _ecl_car(v19);
        if (Null(v5test_not)){
         goto L51;
        }
        T0 = (cl_env_copy->function=v12key)->cfun.entry(1, v21elt);
        if ((cl_env_copy->function=v11)->cfun.entry(2, v2old, T0)!=ECL_NIL) {
         goto L48;
        }
        goto L50;
L51:;
        T0 = (cl_env_copy->function=v12key)->cfun.entry(1, v21elt);
        if (Null((cl_env_copy->function=v11)->cfun.entry(2, v2old, T0))){
         goto L48;
        }
L50:;
        (ECL_CONS_CAR(v19)=v1new,v19);
        v16_count = (v16_count)-((cl_fixnum)1);
        T0 = ecl_make_fixnum(v16_count);
        if (!((ecl_fixnum(T0))==0)){
         goto L48;
        }
        value0 = v3sequence;
        cl_env_copy->nvalues = 1;
        return value0;
       }
L48:;
       v18 = (v18)+1;
       v19 = _ecl_cdr(v19);
       v20 = (v20)-1;
L46:;
       if ((v20)<=((cl_fixnum)(0))) {
        goto L65;
       }
       goto L45;
L65:;
       value0 = v3sequence;
       cl_env_copy->nvalues = 1;
       return value0;
      }
L39:;
      {
       cl_fixnum v21;
       v21 = v13;
       goto L70;
L69:;
       {
        cl_object v22elt;
        v22elt = ecl_aref_unsafe(v3sequence,v21);
        if (Null(v5test_not)){
         goto L75;
        }
        T0 = (cl_env_copy->function=v12key)->cfun.entry(1, v22elt);
        if ((cl_env_copy->function=v11)->cfun.entry(2, v2old, T0)!=ECL_NIL) {
         goto L72;
        }
        goto L74;
L75:;
        T0 = (cl_env_copy->function=v12key)->cfun.entry(1, v22elt);
        if (Null((cl_env_copy->function=v11)->cfun.entry(2, v2old, T0))){
         goto L72;
        }
L74:;
        ecl_aset_unsafe(v3sequence,v21,v1new);
        v16_count = (v16_count)-((cl_fixnum)1);
        T0 = ecl_make_fixnum(v16_count);
        if (!((ecl_fixnum(T0))==0)){
         goto L72;
        }
        value0 = v3sequence;
        cl_env_copy->nvalues = 1;
        return value0;
       }
L72:;
       v21 = (v21)+1;
L70:;
       if ((v21)==(v14)) {
        goto L85;
       }
       goto L69;
L85:;
       value0 = v3sequence;
       cl_env_copy->nvalues = 1;
       return value0;
      }
L14:;
      value0 = v3sequence;
      cl_env_copy->nvalues = 1;
      return value0;
     }
    }
   }
  }
 }
}
/* function definition for NSUBSTITUTE-IF                                     */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_nsubstitute_if(cl_narg narg, cl_object v1new, cl_object v2predicate, cl_object v3sequence, ...)
{
 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<3)) FEwrong_num_arguments(ECL_SYM("NSUBSTITUTE-IF",602));
 {
  cl_object v4start;
  cl_object v5end;
  cl_object v6from_end;
  cl_object v7count;
  cl_object v8key;
  ecl_va_list args; ecl_va_start(args,v3sequence,narg,3);
  {
   cl_object keyvars[10];
   cl_parse_key(args,5,cl_nsubstitute_ifkeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   if (Null(keyvars[5])) {
    v4start = ecl_make_int8_t(0);
   } else {
    v4start = keyvars[0];
   }
   v5end = keyvars[1];
   v6from_end = keyvars[2];
   v7count = keyvars[3];
   v8key = keyvars[4];
  }
  T0 = si_coerce_to_function(v2predicate);
  T1 = (VV[5]->symbol.gfdef);
  value0 = cl_nsubstitute(17, v1new, T0, v3sequence, ECL_SYM("KEY",1297), v8key, ECL_SYM("TEST",1353), T1, ECL_SYM("START",1347), v4start, ECL_SYM("END",1256), v5end, VV[25], v6from_end, ECL_SYM("COUNT",1499), v7count, ECL_SYM("KEY",1297), v8key);
  return value0;
 }
}
/* function definition for NSUBSTITUTE-IF-NOT                                 */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_nsubstitute_if_not(cl_narg narg, cl_object v1new, cl_object v2predicate, cl_object v3sequence, ...)
{
 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<3)) FEwrong_num_arguments(ECL_SYM("NSUBSTITUTE-IF-NOT",603));
 {
  cl_object v4start;
  cl_object v5end;
  cl_object v6from_end;
  cl_object v7count;
  cl_object v8key;
  ecl_va_list args; ecl_va_start(args,v3sequence,narg,3);
  {
   cl_object keyvars[10];
   cl_parse_key(args,5,cl_nsubstitute_if_notkeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   if (Null(keyvars[5])) {
    v4start = ecl_make_int8_t(0);
   } else {
    v4start = keyvars[0];
   }
   v5end = keyvars[1];
   v6from_end = keyvars[2];
   v7count = keyvars[3];
   v8key = keyvars[4];
  }
  T0 = si_coerce_to_function(v2predicate);
  T1 = (VV[5]->symbol.gfdef);
  value0 = cl_nsubstitute(17, v1new, T0, v3sequence, ECL_SYM("KEY",1297), v8key, ECL_SYM("TEST-NOT",1354), T1, ECL_SYM("START",1347), v4start, ECL_SYM("END",1256), v5end, VV[25], v6from_end, ECL_SYM("COUNT",1499), v7count, ECL_SYM("KEY",1297), v8key);
  return value0;
 }
}
/* function definition for FIND                                               */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_find(cl_narg narg, cl_object v1item, cl_object v2sequence, ...)
{
 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<2)) FEwrong_num_arguments(ECL_SYM("FIND",365));
 {
  cl_object v3test;
  cl_object v4test_not;
  cl_object v5start;
  cl_object v6end;
  cl_object v7from_end;
  cl_object v8key;
  ecl_va_list args; ecl_va_start(args,v2sequence,narg,2);
  {
   cl_object keyvars[12];
   cl_parse_key(args,6,cl_findkeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   v3test = keyvars[0];
   v4test_not = keyvars[1];
   if (Null(keyvars[8])) {
    v5start = ecl_make_int8_t(0);
   } else {
    v5start = keyvars[2];
   }
   v6end = keyvars[3];
   v7from_end = keyvars[4];
   v8key = keyvars[5];
  }
  {
   cl_object v9;
   if (Null(v3test)){
    goto L3;
   }
   if (Null(v4test_not)){
    goto L5;
   }
   L369test_error();
L5:;
   v9 = si_coerce_to_function(v3test);
   goto L2;
L3:;
   if (Null(v4test_not)){
    goto L7;
   }
   v9 = si_coerce_to_function(v4test_not);
   goto L2;
L7:;
   v9 = (ECL_SYM("EQL",336)->symbol.gfdef);
L2:;
   {
    cl_object v10key;
    if (Null(v8key)){
     goto L10;
    }
    v10key = si_coerce_to_function(v8key);
    goto L9;
L10:;
    v10key = (ECL_SYM("IDENTITY",428)->symbol.gfdef);
L9:;
    {
     cl_fixnum v11;                               /*  START                   */
     cl_fixnum v12;                               /*  END                     */
     value0 = si_sequence_start_end(ECL_SYM("SUBSEQ",832), v2sequence, v5start, v6end);
     {
      v11 = ecl_fixnum(value0);
      v12 = ecl_fixnum(cl_env_copy->values[1]);
     }
     {
      cl_object v13output;
      v13output = ECL_NIL;
      if (!(ECL_LISTP(v2sequence))){
       goto L14;
      }
      {
       cl_fixnum v14index;
       cl_object v15;
       cl_fixnum v16;
       v14index = v11;
       v15 = ecl_nthcdr(v14index,v2sequence);
       v16 = (v12)-(v14index);
       goto L21;
L20:;
       {
        cl_object v17elt;
        v17elt = _ecl_car(v15);
        if (Null(v4test_not)){
         goto L26;
        }
        T0 = (cl_env_copy->function=v10key)->cfun.entry(1, v17elt);
        if ((cl_env_copy->function=v9)->cfun.entry(2, v1item, T0)!=ECL_NIL) {
         goto L23;
        }
        goto L25;
L26:;
        T0 = (cl_env_copy->function=v10key)->cfun.entry(1, v17elt);
        if (Null((cl_env_copy->function=v9)->cfun.entry(2, v1item, T0))){
         goto L23;
        }
L25:;
        if (v7from_end!=ECL_NIL) {
         goto L30;
        }
        value0 = v17elt;
        cl_env_copy->nvalues = 1;
        return value0;
L30:;
        v13output = v17elt;
       }
L23:;
       v14index = (v14index)+1;
       v15 = _ecl_cdr(v15);
       v16 = (v16)-1;
L21:;
       if ((v16)<=((cl_fixnum)(0))) {
        goto L39;
       }
       goto L20;
L39:;
       value0 = v13output;
       cl_env_copy->nvalues = 1;
       return value0;
      }
L14:;
      {
       cl_fixnum v17index;
       v17index = v11;
       goto L44;
L43:;
       {
        cl_object v18elt;
        v18elt = ecl_aref_unsafe(v2sequence,v17index);
        if (Null(v4test_not)){
         goto L49;
        }
        T0 = (cl_env_copy->function=v10key)->cfun.entry(1, v18elt);
        if ((cl_env_copy->function=v9)->cfun.entry(2, v1item, T0)!=ECL_NIL) {
         goto L46;
        }
        goto L48;
L49:;
        T0 = (cl_env_copy->function=v10key)->cfun.entry(1, v18elt);
        if (Null((cl_env_copy->function=v9)->cfun.entry(2, v1item, T0))){
         goto L46;
        }
L48:;
        if (v7from_end!=ECL_NIL) {
         goto L53;
        }
        value0 = v18elt;
        cl_env_copy->nvalues = 1;
        return value0;
L53:;
        v13output = v18elt;
       }
L46:;
       v17index = (v17index)+1;
L44:;
       if ((v17index)==(v12)) {
        goto L58;
       }
       goto L43;
L58:;
       value0 = v13output;
       cl_env_copy->nvalues = 1;
       return value0;
      }
     }
    }
   }
  }
 }
}
/* function definition for FIND-IF                                            */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_find_if(cl_narg narg, cl_object v1predicate, cl_object v2sequence, ...)
{
 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(ECL_SYM("FIND-IF",367));
 {
  cl_object v3from_end;
  cl_object v4start;
  cl_object v5end;
  cl_object v6key;
  ecl_va_list args; ecl_va_start(args,v2sequence,narg,2);
  {
   cl_object keyvars[8];
   cl_parse_key(args,4,cl_find_ifkeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   v3from_end = keyvars[0];
   if (Null(keyvars[5])) {
    v4start = ecl_make_int8_t(0);
   } else {
    v4start = keyvars[1];
   }
   v5end = keyvars[2];
   v6key = keyvars[3];
  }
  T0 = si_coerce_to_function(v1predicate);
  T1 = (VV[5]->symbol.gfdef);
  value0 = cl_find(12, T0, v2sequence, VV[25], v3from_end, ECL_SYM("START",1347), v4start, ECL_SYM("END",1256), v5end, ECL_SYM("TEST",1353), T1, ECL_SYM("KEY",1297), v6key);
  return value0;
 }
}
/* function definition for FIND-IF-NOT                                        */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_find_if_not(cl_narg narg, cl_object v1predicate, cl_object v2sequence, ...)
{
 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(ECL_SYM("FIND-IF-NOT",368));
 {
  cl_object v3from_end;
  cl_object v4start;
  cl_object v5end;
  cl_object v6key;
  ecl_va_list args; ecl_va_start(args,v2sequence,narg,2);
  {
   cl_object keyvars[8];
   cl_parse_key(args,4,cl_find_if_notkeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   v3from_end = keyvars[0];
   if (Null(keyvars[5])) {
    v4start = ecl_make_int8_t(0);
   } else {
    v4start = keyvars[1];
   }
   v5end = keyvars[2];
   v6key = keyvars[3];
  }
  T0 = si_coerce_to_function(v1predicate);
  T1 = (VV[5]->symbol.gfdef);
  value0 = cl_find(12, T0, v2sequence, VV[25], v3from_end, ECL_SYM("START",1347), v4start, ECL_SYM("END",1256), v5end, ECL_SYM("TEST-NOT",1354), T1, ECL_SYM("KEY",1297), v6key);
  return value0;
 }
}
/* function definition for POSITION                                           */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_position(cl_narg narg, cl_object v1item, cl_object v2sequence, ...)
{
 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<2)) FEwrong_num_arguments(ECL_SYM("POSITION",647));
 {
  cl_object v3test;
  cl_object v4test_not;
  cl_object v5from_end;
  cl_object v6start;
  cl_object v7end;
  cl_object v8key;
  ecl_va_list args; ecl_va_start(args,v2sequence,narg,2);
  {
   cl_object keyvars[12];
   cl_parse_key(args,6,cl_positionkeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   v3test = keyvars[0];
   v4test_not = keyvars[1];
   v5from_end = keyvars[2];
   if (Null(keyvars[9])) {
    v6start = ecl_make_int8_t(0);
   } else {
    v6start = keyvars[3];
   }
   v7end = keyvars[4];
   v8key = keyvars[5];
  }
  {
   cl_object v9;
   if (Null(v3test)){
    goto L3;
   }
   if (Null(v4test_not)){
    goto L5;
   }
   L369test_error();
L5:;
   v9 = si_coerce_to_function(v3test);
   goto L2;
L3:;
   if (Null(v4test_not)){
    goto L7;
   }
   v9 = si_coerce_to_function(v4test_not);
   goto L2;
L7:;
   v9 = (ECL_SYM("EQL",336)->symbol.gfdef);
L2:;
   {
    cl_object v10key;
    if (Null(v8key)){
     goto L10;
    }
    v10key = si_coerce_to_function(v8key);
    goto L9;
L10:;
    v10key = (ECL_SYM("IDENTITY",428)->symbol.gfdef);
L9:;
    {
     cl_fixnum v11;                               /*  START                   */
     cl_fixnum v12;                               /*  END                     */
     value0 = si_sequence_start_end(ECL_SYM("SUBSEQ",832), v2sequence, v6start, v7end);
     {
      v11 = ecl_fixnum(value0);
      v12 = ecl_fixnum(cl_env_copy->values[1]);
     }
     {
      cl_object v13output;
      v13output = ECL_NIL;
      if (!(ECL_LISTP(v2sequence))){
       goto L14;
      }
      {
       cl_fixnum v14index;
       cl_object v15;
       cl_fixnum v16;
       v14index = v11;
       v15 = ecl_nthcdr(v14index,v2sequence);
       v16 = (v12)-(v14index);
       goto L21;
L20:;
       {
        cl_object v17elt;
        v17elt = _ecl_car(v15);
        if (Null(v4test_not)){
         goto L26;
        }
        T0 = (cl_env_copy->function=v10key)->cfun.entry(1, v17elt);
        if ((cl_env_copy->function=v9)->cfun.entry(2, v1item, T0)!=ECL_NIL) {
         goto L23;
        }
        goto L25;
L26:;
        T0 = (cl_env_copy->function=v10key)->cfun.entry(1, v17elt);
        if (Null((cl_env_copy->function=v9)->cfun.entry(2, v1item, T0))){
         goto L23;
        }
L25:;
        if (v5from_end!=ECL_NIL) {
         goto L30;
        }
        value0 = ecl_make_fixnum(v14index);
        cl_env_copy->nvalues = 1;
        return value0;
L30:;
        v13output = ecl_make_fixnum(v14index);
       }
L23:;
       v14index = (v14index)+1;
       v15 = _ecl_cdr(v15);
       v16 = (v16)-1;
L21:;
       if ((v16)<=((cl_fixnum)(0))) {
        goto L39;
       }
       goto L20;
L39:;
       value0 = v13output;
       cl_env_copy->nvalues = 1;
       return value0;
      }
L14:;
      {
       cl_fixnum v17index;
       v17index = v11;
       goto L44;
L43:;
       {
        cl_object v18elt;
        v18elt = ecl_aref_unsafe(v2sequence,v17index);
        if (Null(v4test_not)){
         goto L49;
        }
        T0 = (cl_env_copy->function=v10key)->cfun.entry(1, v18elt);
        if ((cl_env_copy->function=v9)->cfun.entry(2, v1item, T0)!=ECL_NIL) {
         goto L46;
        }
        goto L48;
L49:;
        T0 = (cl_env_copy->function=v10key)->cfun.entry(1, v18elt);
        if (Null((cl_env_copy->function=v9)->cfun.entry(2, v1item, T0))){
         goto L46;
        }
L48:;
        if (v5from_end!=ECL_NIL) {
         goto L53;
        }
        value0 = ecl_make_fixnum(v17index);
        cl_env_copy->nvalues = 1;
        return value0;
L53:;
        v13output = ecl_make_fixnum(v17index);
       }
L46:;
       v17index = (v17index)+1;
L44:;
       if ((v17index)==(v12)) {
        goto L58;
       }
       goto L43;
L58:;
       value0 = v13output;
       cl_env_copy->nvalues = 1;
       return value0;
      }
     }
    }
   }
  }
 }
}
/* function definition for POSITION-IF                                        */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_position_if(cl_narg narg, cl_object v1predicate, cl_object v2sequence, ...)
{
 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(ECL_SYM("POSITION-IF",648));
 {
  cl_object v3from_end;
  cl_object v4start;
  cl_object v5end;
  cl_object v6key;
  ecl_va_list args; ecl_va_start(args,v2sequence,narg,2);
  {
   cl_object keyvars[8];
   cl_parse_key(args,4,cl_position_ifkeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   v3from_end = keyvars[0];
   if (Null(keyvars[5])) {
    v4start = ecl_make_int8_t(0);
   } else {
    v4start = keyvars[1];
   }
   v5end = keyvars[2];
   v6key = keyvars[3];
  }
  T0 = si_coerce_to_function(v1predicate);
  T1 = (VV[5]->symbol.gfdef);
  value0 = cl_position(12, T0, v2sequence, VV[25], v3from_end, ECL_SYM("START",1347), v4start, ECL_SYM("END",1256), v5end, ECL_SYM("TEST",1353), T1, ECL_SYM("KEY",1297), v6key);
  return value0;
 }
}
/* function definition for POSITION-IF-NOT                                    */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_position_if_not(cl_narg narg, cl_object v1predicate, cl_object v2sequence, ...)
{
 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(ECL_SYM("POSITION-IF-NOT",649));
 {
  cl_object v3from_end;
  cl_object v4start;
  cl_object v5end;
  cl_object v6key;
  ecl_va_list args; ecl_va_start(args,v2sequence,narg,2);
  {
   cl_object keyvars[8];
   cl_parse_key(args,4,cl_position_if_notkeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   v3from_end = keyvars[0];
   if (Null(keyvars[5])) {
    v4start = ecl_make_int8_t(0);
   } else {
    v4start = keyvars[1];
   }
   v5end = keyvars[2];
   v6key = keyvars[3];
  }
  T0 = si_coerce_to_function(v1predicate);
  T1 = (VV[5]->symbol.gfdef);
  value0 = cl_position(12, T0, v2sequence, VV[25], v3from_end, ECL_SYM("START",1347), v4start, ECL_SYM("END",1256), v5end, ECL_SYM("TEST-NOT",1354), T1, ECL_SYM("KEY",1297), v6key);
  return value0;
 }
}
/* function definition for REMOVE-DUPLICATES-LIST                             */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L375remove_duplicates_list(cl_object v1sequence, cl_object v2start, cl_object v3end, cl_object v4from_end, cl_object v5test, cl_object v6test_not, cl_object v7key)
{
 cl_object T0;
 volatile cl_object lex0[3];
 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:;
 lex0[0] = v6test_not;
 if (Null(v5test)){
  goto L3;
 }
 if (Null(lex0[0])){
  goto L5;
 }
 L369test_error();
L5:;
 T0 = si_coerce_to_function(v5test);
 goto L2;
L3:;
 if (Null(lex0[0])){
  goto L7;
 }
 T0 = si_coerce_to_function(lex0[0]);
 goto L2;
L7:;
 T0 = (ECL_SYM("EQL",336)->symbol.gfdef);
L2:;
 lex0[1] = T0;
 if (Null(v7key)){
  goto L10;
 }
 T0 = si_coerce_to_function(v7key);
 goto L9;
L10:;
 T0 = (ECL_SYM("IDENTITY",428)->symbol.gfdef);
L9:;
 lex0[2] = T0;                                    /*  KEY                     */
 {
  cl_fixnum v8;                                   /*  START                   */
  cl_fixnum v9;                                   /*  END                     */
  value0 = si_sequence_start_end(ECL_SYM("SUBSEQ",832), v1sequence, v2start, v3end);
  {
   v8 = ecl_fixnum(value0);
   v9 = ecl_fixnum(cl_env_copy->values[1]);
  }
  {
   cl_object v10output;
   v10output = ECL_NIL;
   goto L16;
L15:;
   T0 = ECL_CONS_CAR(v1sequence);
   v10output = CONS(T0,v10output);
   v1sequence = ECL_CONS_CDR(v1sequence);
   v8 = (v8)-1;
   v9 = (v9)-1;
L16:;
   if (Null(v1sequence)){
    goto L26;
   }
   if (!((v8)>0)){
    goto L26;
   }
   goto L15;
L26:;
   {
    cl_object v11;
    cl_object v12;
    v11 = v1sequence;
    {
     cl_fixnum v13;
     v13 = (v9)-(v8);
     v12 = ecl_nthcdr(v13,v1sequence);
    }
L31:;
    if (!((v1sequence)==(v12))){
     goto L33;
    }
    value0 = cl_nreconc(v10output, v1sequence);
    return value0;
L33:;
    if (LC374already_in_list_p(lex0, v11, v1sequence, v12, v4from_end)!=ECL_NIL) {
     goto L35;
    }
    T0 = ECL_CONS_CAR(v1sequence);
    v10output = CONS(T0,v10output);
L35:;
    v1sequence = ECL_CONS_CDR(v1sequence);
    goto L31;
   }
  }
 }
}
static cl_object L375remove_duplicates_list_va(cl_narg narg, cl_object v8sequence, cl_object v9start, cl_object v10end, cl_object v11from_end, cl_object v12test, cl_object v13test_not, cl_object v14key, ...)
{
 if (ecl_unlikely(narg!=7)) FEwrong_num_arguments(VV[29]);
 {
  return L375remove_duplicates_list(v8sequence, v9start, v10end, v11from_end, v12test, v13test_not, v14key);
 }
}
/* function definition for REMOVE-DUPLICATES                                  */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_remove_duplicates(cl_narg narg, cl_object v1sequence, ...)
{
 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(ECL_SYM("REMOVE-DUPLICATES",714));
 {
  cl_object v2test;
  cl_object v3test_not;
  cl_object v4from_end;
  cl_object v5start;
  cl_object v6end;
  cl_object v7key;
  ecl_va_list args; ecl_va_start(args,v1sequence,narg,1);
  {
   cl_object keyvars[12];
   cl_parse_key(args,6,cl_remove_duplicateskeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   v2test = keyvars[0];
   v3test_not = keyvars[1];
   v4from_end = keyvars[2];
   if (Null(keyvars[9])) {
    v5start = ecl_make_int8_t(0);
   } else {
    v5start = keyvars[3];
   }
   v6end = keyvars[4];
   v7key = keyvars[5];
  }
  if (!(ECL_LISTP(v1sequence))){
   goto L2;
  }
  value0 = L375remove_duplicates_list(v1sequence, v5start, v6end, v4from_end, v2test, v3test_not, v7key);
  return value0;
L2:;
  if (!(ECL_VECTORP(v1sequence))){
   goto L4;
  }
  {
   cl_object v8l;
   cl_object v9v;
   v8l = L379filter_duplicates_vector(ECL_NIL, v1sequence, v5start, v6end, v4from_end, v2test, v3test_not, v7key);
   {
    cl_object v10;
    v10 = cl_array_element_type(v1sequence);
    v9v = si_make_pure_array(v10, v8l, ECL_NIL, ECL_NIL, ECL_NIL, ecl_make_int8_t(0));
   }
   L379filter_duplicates_vector(v9v, v1sequence, v5start, v6end, v4from_end, v2test, v3test_not, v7key);
   value0 = v9v;
   cl_env_copy->nvalues = 1;
   return value0;
  }
L4:;
  if (ECL_VECTORP(v1sequence)) {
   goto L10;
  }
  value0 = si_signal_type_error(v1sequence, ECL_SYM("SEQUENCE",744));
  return value0;
L10:;
  value0 = ECL_NIL;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
/* function definition for DELETE-DUPLICATES-LIST                             */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L377delete_duplicates_list(cl_object v1sequence, cl_object v2start, cl_object v3end, cl_object v4from_end, cl_object v5test, cl_object v6test_not, cl_object v7key)
{
 cl_object T0;
 volatile cl_object lex0[3];
 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:;
 lex0[0] = v6test_not;
 if (Null(v5test)){
  goto L3;
 }
 if (Null(lex0[0])){
  goto L5;
 }
 L369test_error();
L5:;
 T0 = si_coerce_to_function(v5test);
 goto L2;
L3:;
 if (Null(lex0[0])){
  goto L7;
 }
 T0 = si_coerce_to_function(lex0[0]);
 goto L2;
L7:;
 T0 = (ECL_SYM("EQL",336)->symbol.gfdef);
L2:;
 lex0[1] = T0;
 if (Null(v7key)){
  goto L10;
 }
 T0 = si_coerce_to_function(v7key);
 goto L9;
L10:;
 T0 = (ECL_SYM("IDENTITY",428)->symbol.gfdef);
L9:;
 lex0[2] = T0;                                    /*  KEY                     */
 {
  cl_fixnum v8;                                   /*  START                   */
  cl_fixnum v9;                                   /*  END                     */
  value0 = si_sequence_start_end(ECL_SYM("SUBSEQ",832), v1sequence, v2start, v3end);
  {
   v8 = ecl_fixnum(value0);
   v9 = ecl_fixnum(cl_env_copy->values[1]);
  }
  {
   cl_object v10splice;
   cl_object v11output;
   v10splice = CONS(ECL_NIL,v1sequence);
   v11output = v10splice;
   goto L17;
L16:;
   v10splice = ECL_CONS_CDR(v10splice);
   v1sequence = ECL_CONS_CDR(v1sequence);
   v8 = (v8)-1;
   v9 = (v9)-1;
L17:;
   if (Null(v1sequence)){
    goto L27;
   }
   if (!((v8)>0)){
    goto L27;
   }
   goto L16;
L27:;
   {
    cl_object v12;
    cl_object v13;
    v12 = v10splice;
    {
     cl_fixnum v14;
     v14 = (v9)-(v8);
     v13 = ecl_nthcdr(v14,v1sequence);
    }
L32:;
    if (!((v1sequence)==(v13))){
     goto L34;
    }
    value0 = ECL_CONS_CDR(v11output);
    cl_env_copy->nvalues = 1;
    return value0;
L34:;
    T0 = ECL_CONS_CDR(v12);
    if (Null(LC376already_in_list_p(lex0, T0, v1sequence, v13, v4from_end))){
     goto L36;
    }
    v1sequence = ECL_CONS_CDR(v1sequence);
    {
     cl_object v14;
     v14 = v10splice;
     {
      cl_object v15;
      v15 = v1sequence;
      (ECL_CONS_CDR(v14)=v15,v14);
      goto L33;
     }
    }
L36:;
    v1sequence = ECL_CONS_CDR(v1sequence);
    v10splice = ECL_CONS_CDR(v10splice);
L33:;
    goto L32;
   }
  }
 }
}
static cl_object L377delete_duplicates_list_va(cl_narg narg, cl_object v8sequence, cl_object v9start, cl_object v10end, cl_object v11from_end, cl_object v12test, cl_object v13test_not, cl_object v14key, ...)
{
 if (ecl_unlikely(narg!=7)) FEwrong_num_arguments(VV[33]);
 {
  return L377delete_duplicates_list(v8sequence, v9start, v10end, v11from_end, v12test, v13test_not, v14key);
 }
}
/* function definition for FILTER-DUPLICATES-VECTOR                           */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L379filter_duplicates_vector(cl_object v1out, cl_object v2in, cl_object v3start, cl_object v4end, cl_object v5from_end, cl_object v6test, cl_object v7test_not, cl_object v8key)
{
 cl_object T0;
 volatile cl_object lex0[3];
 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:;
 lex0[0] = v7test_not;
 if (Null(v6test)){
  goto L3;
 }
 if (Null(lex0[0])){
  goto L5;
 }
 L369test_error();
L5:;
 T0 = si_coerce_to_function(v6test);
 goto L2;
L3:;
 if (Null(lex0[0])){
  goto L7;
 }
 T0 = si_coerce_to_function(lex0[0]);
 goto L2;
L7:;
 T0 = (ECL_SYM("EQL",336)->symbol.gfdef);
L2:;
 lex0[1] = T0;
 if (Null(v8key)){
  goto L10;
 }
 T0 = si_coerce_to_function(v8key);
 goto L9;
L10:;
 T0 = (ECL_SYM("IDENTITY",428)->symbol.gfdef);
L9:;
 lex0[2] = T0;                                    /*  KEY                     */
 {
  cl_fixnum v9;                                   /*  START                   */
  cl_fixnum v10;                                  /*  END                     */
  cl_fixnum v11;                                  /*  LENGTH                  */
  value0 = si_sequence_start_end(ECL_SYM("SUBSEQ",832), v2in, v3start, v4end);
  {
   v9 = ecl_fixnum(value0);
   v10 = ecl_fixnum(cl_env_copy->values[1]);
   v11 = ecl_fixnum(cl_env_copy->values[2]);
  }
  if (Null(v1out)){
   goto L13;
  }
  if ((v1out)==(v2in)) {
   goto L13;
  }
  ecl_copy_subarray(v1out,(cl_fixnum)(0),v2in,(cl_fixnum)(0),v9);
  value0 = ECL_NIL;
  cl_env_copy->nvalues = 0;
L13:;
  {
   cl_fixnum v12index;
   cl_fixnum v13jndex;
   v12index = v9;
   v13jndex = v9;
L18:;
   if (!((v12index)==(v10))){
    goto L20;
   }
   if (Null(v1out)){
    goto L22;
   }
   ecl_copy_subarray(v1out,v13jndex,v2in,v10,v11);
   value0 = ECL_NIL;
   cl_env_copy->nvalues = 0;
L22:;
   T0 = ecl_minus(ecl_make_fixnum(v11),ecl_make_fixnum(v10));
   value0 = ecl_plus(ecl_make_fixnum(v13jndex),T0);
   cl_env_copy->nvalues = 1;
   return value0;
L20:;
   if (LC378already_in_vector_p(lex0, v2in, ecl_make_fixnum(v9), ecl_make_fixnum(v12index), ecl_make_fixnum(v10), v5from_end)!=ECL_NIL) {
    goto L24;
   }
   if (Null(v1out)){
    goto L26;
   }
   T0 = ecl_aref_unsafe(v2in,v12index);
   ecl_aset_unsafe(v1out,v13jndex,T0);
L26:;
   v13jndex = (v13jndex)+1;
L24:;
   v12index = (v12index)+1;
   goto L18;
  }
 }
}
static cl_object L379filter_duplicates_vector_va(cl_narg narg, cl_object v9out, cl_object v10in, cl_object v11start, cl_object v12end, cl_object v13from_end, cl_object v14test, cl_object v15test_not, cl_object v16key, ...)
{
 if (ecl_unlikely(narg!=8)) FEwrong_num_arguments(VV[32]);
 {
  return L379filter_duplicates_vector(v9out, v10in, v11start, v12end, v13from_end, v14test, v15test_not, v16key);
 }
}
/* function definition for DELETE-DUPLICATES                                  */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_delete_duplicates(cl_narg narg, cl_object v1sequence, ...)
{
 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(ECL_SYM("DELETE-DUPLICATES",294));
 {
  cl_object v2test;
  cl_object v3test_not;
  cl_object v4from_end;
  cl_object v5start;
  cl_object v6end;
  cl_object v7key;
  ecl_va_list args; ecl_va_start(args,v1sequence,narg,1);
  {
   cl_object keyvars[12];
   cl_parse_key(args,6,cl_delete_duplicateskeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   v2test = keyvars[0];
   v3test_not = keyvars[1];
   v4from_end = keyvars[2];
   if (Null(keyvars[9])) {
    v5start = ecl_make_int8_t(0);
   } else {
    v5start = keyvars[3];
   }
   v6end = keyvars[4];
   v7key = keyvars[5];
  }
  if (!(ECL_LISTP(v1sequence))){
   goto L2;
  }
  value0 = L377delete_duplicates_list(v1sequence, v5start, v6end, v4from_end, v2test, v3test_not, v7key);
  return value0;
L2:;
  if (ECL_VECTORP(v1sequence)) {
   goto L4;
  }
  value0 = si_signal_type_error(v1sequence, ECL_SYM("SEQUENCE",744));
  return value0;
L4:;
  if (!((ECL_ARRAYP(v1sequence)?(void)0:FEtype_error_array(v1sequence),ECL_ARRAY_HAS_FILL_POINTER_P(v1sequence)))){
   goto L6;
  }
  {
   cl_object v8l;
   v8l = L379filter_duplicates_vector(v1sequence, v1sequence, v5start, v6end, v4from_end, v2test, v3test_not, v7key);
   si_fill_pointer_set(v1sequence, v8l);
   value0 = v1sequence;
   cl_env_copy->nvalues = 1;
   return value0;
  }
L6:;
  {
   cl_object v9l;
   cl_object v10v;
   v9l = L379filter_duplicates_vector(ECL_NIL, v1sequence, v5start, v6end, v4from_end, v2test, v3test_not, v7key);
   {
    cl_object v11;
    v11 = cl_array_element_type(v1sequence);
    v10v = si_make_pure_array(v11, v9l, ECL_NIL, ECL_NIL, ECL_NIL, ecl_make_int8_t(0));
   }
   L379filter_duplicates_vector(v10v, v1sequence, v5start, v6end, v4from_end, v2test, v3test_not, v7key);
   value0 = v10v;
   cl_env_copy->nvalues = 1;
   return value0;
  }
 }
}
/* function definition for MISMATCH                                           */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_mismatch(cl_narg narg, cl_object v1sequence1, cl_object v2sequence2, ...)
{
 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<2)) FEwrong_num_arguments(ECL_SYM("MISMATCH",561));
 {
  cl_object v3from_end;
  cl_object v4test;
  cl_object v5test_not;
  cl_object v6key;
  cl_object v7start1;
  cl_object v8start2;
  cl_object v9end1;
  cl_object v10end2;
  ecl_va_list args; ecl_va_start(args,v2sequence2,narg,2);
  {
   cl_object keyvars[16];
   cl_parse_key(args,8,cl_mismatchkeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   v3from_end = keyvars[0];
   v4test = keyvars[1];
   v5test_not = keyvars[2];
   v6key = keyvars[3];
   if (Null(keyvars[12])) {
    v7start1 = ecl_make_int8_t(0);
   } else {
    v7start1 = keyvars[4];
   }
   if (Null(keyvars[13])) {
    v8start2 = ecl_make_int8_t(0);
   } else {
    v8start2 = keyvars[5];
   }
   v9end1 = keyvars[6];
   v10end2 = keyvars[7];
  }
  {
   cl_fixnum v11;                                 /*  START1                  */
   cl_fixnum v12;                                 /*  END1                    */
   value0 = si_sequence_start_end(ECL_SYM("SUBSEQ",832), v1sequence1, v7start1, v9end1);
   {
    v11 = ecl_to_fixnum(value0);
    v12 = ecl_to_fixnum(cl_env_copy->values[1]);
   }
   {
    cl_fixnum v13;                                /*  START2                  */
    cl_fixnum v14;                                /*  END2                    */
    value0 = si_sequence_start_end(ECL_SYM("SUBSEQ",832), v2sequence2, v8start2, v10end2);
    {
     v13 = ecl_to_fixnum(value0);
     v14 = ecl_to_fixnum(cl_env_copy->values[1]);
    }
    {
     cl_object v15;
     if (Null(v4test)){
      goto L6;
     }
     if (Null(v5test_not)){
      goto L8;
     }
     L369test_error();
L8:;
     v15 = si_coerce_to_function(v4test);
     goto L5;
L6:;
     if (Null(v5test_not)){
      goto L10;
     }
     v15 = si_coerce_to_function(v5test_not);
     goto L5;
L10:;
     v15 = (ECL_SYM("EQL",336)->symbol.gfdef);
L5:;
     {
      cl_object v16key;
      if (Null(v6key)){
       goto L13;
      }
      v16key = si_coerce_to_function(v6key);
      goto L12;
L13:;
      v16key = (ECL_SYM("IDENTITY",428)->symbol.gfdef);
L12:;
      if (v3from_end!=ECL_NIL) {
       goto L15;
      }
      {
       cl_fixnum v17i1;
       cl_fixnum v18i2;
       v17i1 = v11;
       v18i2 = v13;
       goto L21;
L20:;
       if (Null(v5test_not)){
        goto L25;
       }
       T1 = ecl_elt(v1sequence1,v17i1);
       T0 = (cl_env_copy->function=v16key)->cfun.entry(1, T1);
       T2 = ecl_elt(v2sequence2,v18i2);
       T1 = (cl_env_copy->function=v16key)->cfun.entry(1, T2);
       if (Null((cl_env_copy->function=v15)->cfun.entry(2, T0, T1))){
        goto L23;
       }
       goto L24;
L25:;
       T1 = ecl_elt(v1sequence1,v17i1);
       T0 = (cl_env_copy->function=v16key)->cfun.entry(1, T1);
       T2 = ecl_elt(v2sequence2,v18i2);
       T1 = (cl_env_copy->function=v16key)->cfun.entry(1, T2);
       if ((cl_env_copy->function=v15)->cfun.entry(2, T0, T1)!=ECL_NIL) {
        goto L23;
       }
L24:;
       value0 = ecl_make_fixnum(v17i1);
       cl_env_copy->nvalues = 1;
       return value0;
L23:;
       {
        cl_object v19;
        v19 = ecl_make_integer((v17i1)+1);
        {
         bool v20;
         v20 = ECL_FIXNUMP(v19);
         if (ecl_unlikely(!(v20)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v19);
         value0 = ECL_NIL;
         cl_env_copy->nvalues = 0;
        }
        v17i1 = ecl_fixnum(v19);
       }
       {
        cl_object v19;
        v19 = ecl_make_integer((v18i2)+1);
        {
         bool v20;
         v20 = ECL_FIXNUMP(v19);
         if (ecl_unlikely(!(v20)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v19);
         value0 = ECL_NIL;
         cl_env_copy->nvalues = 0;
        }
        v18i2 = ecl_fixnum(v19);
       }
L21:;
       if ((v17i1)>=(v12)) {
        goto L38;
       }
       if ((v18i2)>=(v14)) {
        goto L38;
       }
       goto L20;
L38:;
       if (!((v17i1)>=(v12))){
        goto L41;
       }
       if (!((v18i2)>=(v14))){
        goto L41;
       }
       value0 = ECL_NIL;
       cl_env_copy->nvalues = 1;
       return value0;
L41:;
       value0 = ecl_make_fixnum(v17i1);
       cl_env_copy->nvalues = 1;
       return value0;
      }
L15:;
      {
       cl_fixnum v19;
       cl_fixnum v20;
       cl_fixnum v21i1;
       cl_fixnum v22i2;
       {
        cl_object v23;
        v23 = ecl_make_integer((v12)-1);
        {
         bool v24;
         v24 = ECL_FIXNUMP(v23);
         if (ecl_unlikely(!(v24)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v23);
         value0 = ECL_NIL;
         cl_env_copy->nvalues = 0;
        }
        v19 = ecl_fixnum(v23);
       }
       {
        cl_object v23;
        v23 = ecl_make_integer((v14)-1);
        {
         bool v24;
         v24 = ECL_FIXNUMP(v23);
         if (ecl_unlikely(!(v24)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v23);
         value0 = ECL_NIL;
         cl_env_copy->nvalues = 0;
        }
        v20 = ecl_fixnum(v23);
       }
       v21i1 = v19;
       v22i2 = v20;
       goto L54;
L53:;
       if (Null(v5test_not)){
        goto L58;
       }
       T1 = ecl_elt(v1sequence1,v21i1);
       T0 = (cl_env_copy->function=v16key)->cfun.entry(1, T1);
       T2 = ecl_elt(v2sequence2,v22i2);
       T1 = (cl_env_copy->function=v16key)->cfun.entry(1, T2);
       if (Null((cl_env_copy->function=v15)->cfun.entry(2, T0, T1))){
        goto L56;
       }
       goto L57;
L58:;
       T1 = ecl_elt(v1sequence1,v21i1);
       T0 = (cl_env_copy->function=v16key)->cfun.entry(1, T1);
       T2 = ecl_elt(v2sequence2,v22i2);
       T1 = (cl_env_copy->function=v16key)->cfun.entry(1, T2);
       if ((cl_env_copy->function=v15)->cfun.entry(2, T0, T1)!=ECL_NIL) {
        goto L56;
       }
L57:;
       value0 = ecl_make_integer((v21i1)+1);
       cl_env_copy->nvalues = 1;
       return value0;
L56:;
       {
        cl_object v23;
        v23 = ecl_make_integer((v21i1)-1);
        {
         bool v24;
         v24 = ECL_FIXNUMP(v23);
         if (ecl_unlikely(!(v24)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v23);
         value0 = ECL_NIL;
         cl_env_copy->nvalues = 0;
        }
        v21i1 = ecl_fixnum(v23);
       }
       {
        cl_object v23;
        v23 = ecl_make_integer((v22i2)-1);
        {
         bool v24;
         v24 = ECL_FIXNUMP(v23);
         if (ecl_unlikely(!(v24)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v23);
         value0 = ECL_NIL;
         cl_env_copy->nvalues = 0;
        }
        v22i2 = ecl_fixnum(v23);
       }
L54:;
       if ((v21i1)<(v11)) {
        goto L71;
       }
       if ((v22i2)<(v13)) {
        goto L71;
       }
       goto L53;
L71:;
       if (!((v21i1)<(v11))){
        goto L74;
       }
       if (!((v22i2)<(v13))){
        goto L74;
       }
       value0 = ECL_NIL;
       cl_env_copy->nvalues = 1;
       return value0;
L74:;
       value0 = ecl_make_integer((v21i1)+1);
       cl_env_copy->nvalues = 1;
       return value0;
      }
     }
    }
   }
  }
 }
}
/* function definition for SEARCH                                             */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_search(cl_narg narg, cl_object v1sequence1, cl_object v2sequence2, ...)
{
 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(ECL_SYM("SEARCH",742));
 {
  cl_object v3from_end;
  cl_object v4test;
  cl_object v5test_not;
  cl_object v6key;
  cl_object v7start1;
  cl_object v8start2;
  cl_object v9end1;
  cl_object v10end2;
  ecl_va_list args; ecl_va_start(args,v2sequence2,narg,2);
  {
   cl_object keyvars[16];
   cl_parse_key(args,8,cl_searchkeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   v3from_end = keyvars[0];
   v4test = keyvars[1];
   v5test_not = keyvars[2];
   v6key = keyvars[3];
   if (Null(keyvars[12])) {
    v7start1 = ecl_make_int8_t(0);
   } else {
    v7start1 = keyvars[4];
   }
   if (Null(keyvars[13])) {
    v8start2 = ecl_make_int8_t(0);
   } else {
    v8start2 = keyvars[5];
   }
   v9end1 = keyvars[6];
   v10end2 = keyvars[7];
  }
  if (!(ECL_VECTORP(v1sequence1))){
   goto L3;
  }
  if (!(ECL_VECTORP(v2sequence2))){
   goto L3;
  }
  value0 = L380search_vector(v1sequence1, v7start1, v9end1, v2sequence2, v8start2, v10end2, v4test, v5test_not, v6key, v3from_end);
  return value0;
L3:;
  value0 = L381search_generic(v1sequence1, v7start1, v9end1, v2sequence2, v8start2, v10end2, v4test, v5test_not, v6key, v3from_end);
  return value0;
 }
}
/* function definition for SEARCH-VECTOR                                      */
/* optimize speed 3, debug 0, space 0, safety 0                               */
static cl_object L380search_vector(cl_object v1sequence1, cl_object v2start1, cl_object v3end1, cl_object v4sequence2, cl_object v5start2, cl_object v6end2, cl_object v7test, cl_object v8test_not, cl_object v9key, cl_object v10from_end)
{
 cl_object T0, T1, T2;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
L1:;
 {
  cl_object v11;
  if (Null(v7test)){
   goto L3;
  }
  if (Null(v8test_not)){
   goto L5;
  }
  L369test_error();
L5:;
  v11 = si_coerce_to_function(v7test);
  goto L2;
L3:;
  if (Null(v8test_not)){
   goto L7;
  }
  v11 = si_coerce_to_function(v8test_not);
  goto L2;
L7:;
  v11 = (ECL_SYM("EQL",336)->symbol.gfdef);
L2:;
  {
   cl_object v12key;
   if (Null(v9key)){
    goto L10;
   }
   v12key = si_coerce_to_function(v9key);
   goto L9;
L10:;
   v12key = (ECL_SYM("IDENTITY",428)->symbol.gfdef);
L9:;
   {
    cl_fixnum v13;                                /*  START1                  */
    cl_fixnum v14;                                /*  END1                    */
    value0 = si_sequence_start_end(ECL_SYM("SUBSEQ",832), v1sequence1, v2start1, v3end1);
    {
     v13 = ecl_fixnum(value0);
     v14 = ecl_fixnum(cl_env_copy->values[1]);
    }
    {
     cl_fixnum v15;                               /*  START2                  */
     cl_fixnum v16;                               /*  END2                    */
     value0 = si_sequence_start_end(ECL_SYM("SUBSEQ",832), v4sequence2, v5start2, v6end2);
     {
      v15 = ecl_fixnum(value0);
      v16 = ecl_fixnum(cl_env_copy->values[1]);
     }
     {
      cl_fixnum v17last_index;
      cl_object v18last;
      cl_fixnum v19start2;
      cl_object v20base;
      v17last_index = (cl_fixnum)(-1);
      {
       cl_fixnum v21l;
       cl_fixnum v22e;
       v21l = (v14)-(v13);
       v22e = (v16)-(v21l);
       if ((v21l)>0) {
        goto L18;
       }
       if (Null(v10from_end)){
        goto L20;
       }
       value0 = ecl_make_fixnum(v16);
       cl_env_copy->nvalues = 1;
       return value0;
L20:;
       value0 = ecl_make_int8_t(0);
       cl_env_copy->nvalues = 1;
       return value0;
L18:;
       v18last = ecl_make_integer((v22e)+1);
      }
      v19start2 = v15;
      T0 = ecl_aref_unsafe(v1sequence1,v13);
      v20base = (cl_env_copy->function=v12key)->cfun.entry(1, T0);
      goto L27;
L26:;
      if (Null(v8test_not)){
       goto L31;
      }
      T1 = ecl_aref_unsafe(v4sequence2,v19start2);
      T0 = (cl_env_copy->function=v12key)->cfun.entry(1, T1);
      if ((cl_env_copy->function=v11)->cfun.entry(2, v20base, T0)!=ECL_NIL) {
       goto L29;
      }
      goto L30;
L31:;
      T1 = ecl_aref_unsafe(v4sequence2,v19start2);
      T0 = (cl_env_copy->function=v12key)->cfun.entry(1, T1);
      if (Null((cl_env_copy->function=v11)->cfun.entry(2, v20base, T0))){
       goto L29;
      }
L30:;
      {
       cl_fixnum v21i1;
       cl_fixnum v22i2;
       v21i1 = v13;
       v22i2 = v19start2;
L39:;
       v21i1 = (v21i1)+1;
       v22i2 = (v22i2)+1;
       if ((v21i1)>=(v14)) {
        goto L47;
       }
       if (!((v22i2)>=(v16))){
        goto L45;
       }
       goto L46;
L47:;
L46:;
       if (Null(v10from_end)){
        goto L49;
       }
       v17last_index = v19start2;
       goto L29;
L49:;
       value0 = ecl_make_fixnum(v19start2);
       cl_env_copy->nvalues = 1;
       return value0;
L45:;
       if (Null(v8test_not)){
        goto L54;
       }
       T1 = ecl_aref_unsafe(v1sequence1,v21i1);
       T0 = (cl_env_copy->function=v12key)->cfun.entry(1, T1);
       T2 = ecl_aref_unsafe(v4sequence2,v22i2);
       T1 = (cl_env_copy->function=v12key)->cfun.entry(1, T2);
       if (Null((cl_env_copy->function=v11)->cfun.entry(2, T0, T1))){
        goto L40;
       }
       goto L53;
L54:;
       T1 = ecl_aref_unsafe(v1sequence1,v21i1);
       T0 = (cl_env_copy->function=v12key)->cfun.entry(1, T1);
       T2 = ecl_aref_unsafe(v4sequence2,v22i2);
       T1 = (cl_env_copy->function=v12key)->cfun.entry(1, T2);
       if ((cl_env_copy->function=v11)->cfun.entry(2, T0, T1)!=ECL_NIL) {
        goto L40;
       }
L53:;
       goto L29;
L40:;
       goto L39;
      }
L29:;
      v19start2 = (v19start2)+1;
L27:;
      if (ecl_greatereq(ecl_make_fixnum(v19start2),v18last)) {
       goto L67;
      }
      goto L26;
L67:;
      if (!((v17last_index)<0)){
       goto L69;
      }
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 1;
      return value0;
L69:;
      value0 = ecl_make_fixnum(v17last_index);
      cl_env_copy->nvalues = 1;
      return value0;
     }
    }
   }
  }
 }
}
/* function definition for SEARCH-GENERIC                                     */
/* optimize speed 3, debug 0, space 0, safety 2                               */
static cl_object L381search_generic(cl_object v1sequence1, cl_object v2start1, cl_object v3end1, cl_object v4sequence2, cl_object v5start2, cl_object v6end2, cl_object v7test, cl_object v8test_not, cl_object v9key, cl_object v10from_end)
{
 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 v11;
  if (Null(v7test)){
   goto L3;
  }
  if (Null(v8test_not)){
   goto L5;
  }
  L369test_error();
L5:;
  v11 = si_coerce_to_function(v7test);
  goto L2;
L3:;
  if (Null(v8test_not)){
   goto L7;
  }
  v11 = si_coerce_to_function(v8test_not);
  goto L2;
L7:;
  v11 = (ECL_SYM("EQL",336)->symbol.gfdef);
L2:;
  {
   cl_object v12key;
   if (Null(v9key)){
    goto L10;
   }
   v12key = si_coerce_to_function(v9key);
   goto L9;
L10:;
   v12key = (ECL_SYM("IDENTITY",428)->symbol.gfdef);
L9:;
   {
    cl_fixnum v13;                                /*  START1                  */
    cl_fixnum v14;                                /*  END1                    */
    value0 = si_sequence_start_end(ECL_SYM("SUBSEQ",832), v1sequence1, v2start1, v3end1);
    {
     v13 = ecl_to_fixnum(value0);
     v14 = ecl_to_fixnum(cl_env_copy->values[1]);
    }
    {
     cl_fixnum v15;                               /*  START2                  */
     cl_fixnum v16;                               /*  END2                    */
     value0 = si_sequence_start_end(ECL_SYM("SUBSEQ",832), v4sequence2, v5start2, v6end2);
     {
      v15 = ecl_to_fixnum(value0);
      v16 = ecl_to_fixnum(cl_env_copy->values[1]);
     }
     {
      cl_fixnum v17last_index;
      cl_fixnum v18start2;
      cl_fixnum v19last;
      cl_object v20it1;
      cl_object v21base;
      cl_object v22it2;
      v17last_index = (cl_fixnum)(-1);
      v18start2 = v15;
      {
       cl_object v23;
       {
        cl_fixnum v24l;
        cl_fixnum v25e;
        {
         cl_object v26;
         v26 = ecl_minus(ecl_make_fixnum(v14),ecl_make_fixnum(v13));
         {
          bool v27;
          v27 = ECL_FIXNUMP(v26);
          if (ecl_unlikely(!(v27)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v26);
          value0 = ECL_NIL;
          cl_env_copy->nvalues = 0;
         }
         v24l = ecl_fixnum(v26);
        }
        {
         cl_object v26;
         v26 = ecl_minus(ecl_make_fixnum(v16),ecl_make_fixnum(v24l));
         {
          bool v27;
          v27 = ECL_FIXNUMP(v26);
          if (ecl_unlikely(!(v27)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v26);
          value0 = ECL_NIL;
          cl_env_copy->nvalues = 0;
         }
         v25e = ecl_fixnum(v26);
        }
        if ((v24l)>0) {
         goto L24;
        }
        if (Null(v10from_end)){
         goto L26;
        }
        value0 = ecl_make_fixnum(v16);
        cl_env_copy->nvalues = 1;
        return value0;
L26:;
        value0 = ecl_make_int8_t(0);
        cl_env_copy->nvalues = 1;
        return value0;
L24:;
        v23 = ecl_make_integer((v25e)+1);
       }
       {
        bool v24;
        v24 = ECL_FIXNUMP(v23);
        if (ecl_unlikely(!(v24)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v23);
        value0 = ECL_NIL;
        cl_env_copy->nvalues = 0;
       }
       v19last = ecl_fixnum(v23);
      }
      v20it1 = si_make_seq_iterator(2, v1sequence1, ecl_make_fixnum(v13));
      T0 = si_seq_iterator_ref(v1sequence1, v20it1);
      v21base = (cl_env_copy->function=v12key)->cfun.entry(1, T0);
      v22it2 = si_make_seq_iterator(2, v4sequence2, ecl_make_fixnum(v18start2));
      goto L34;
L33:;
      if (Null(v8test_not)){
       goto L38;
      }
      T1 = si_seq_iterator_ref(v4sequence2, v22it2);
      T0 = (cl_env_copy->function=v12key)->cfun.entry(1, T1);
      if ((cl_env_copy->function=v11)->cfun.entry(2, v21base, T0)!=ECL_NIL) {
       goto L36;
      }
      goto L37;
L38:;
      T1 = si_seq_iterator_ref(v4sequence2, v22it2);
      T0 = (cl_env_copy->function=v12key)->cfun.entry(1, T1);
      if (Null((cl_env_copy->function=v11)->cfun.entry(2, v21base, T0))){
       goto L36;
      }
L37:;
      {
       cl_object v23it1;
       cl_object v24it2;
       cl_fixnum v25i1;
       cl_fixnum v26i2;
       v23it1 = v20it1;
       v24it2 = v22it2;
       v25i1 = v13;
       v26i2 = v18start2;
L46:;
       v23it1 = si_seq_iterator_next(v1sequence1, v23it1);
       v24it2 = si_seq_iterator_next(v4sequence2, v24it2);
       {
        cl_object v27;
        v27 = ecl_make_integer((v25i1)+1);
        {
         bool v28;
         v28 = ECL_FIXNUMP(v27);
         if (ecl_unlikely(!(v28)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v27);
         value0 = ECL_NIL;
         cl_env_copy->nvalues = 0;
        }
        v25i1 = ecl_fixnum(v27);
       }
       {
        cl_object v27;
        v27 = ecl_make_integer((v26i2)+1);
        {
         bool v28;
         v28 = ECL_FIXNUMP(v27);
         if (ecl_unlikely(!(v28)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v27);
         value0 = ECL_NIL;
         cl_env_copy->nvalues = 0;
        }
        v26i2 = ecl_fixnum(v27);
       }
       if ((v25i1)>=(v14)) {
        goto L62;
       }
       if ((v26i2)>=(v16)) {
        goto L62;
       }
       if (v23it1==ECL_NIL) {
        goto L62;
       }
       if (!(v24it2==ECL_NIL)){
        goto L60;
       }
       goto L61;
L62:;
L61:;
       if (Null(v10from_end)){
        goto L66;
       }
       v17last_index = v18start2;
       goto L36;
L66:;
       value0 = ecl_make_fixnum(v18start2);
       cl_env_copy->nvalues = 1;
       return value0;
L60:;
       if (Null(v8test_not)){
        goto L71;
       }
       T1 = si_seq_iterator_ref(v1sequence1, v23it1);
       T0 = (cl_env_copy->function=v12key)->cfun.entry(1, T1);
       T2 = si_seq_iterator_ref(v4sequence2, v24it2);
       T1 = (cl_env_copy->function=v12key)->cfun.entry(1, T2);
       if (Null((cl_env_copy->function=v11)->cfun.entry(2, T0, T1))){
        goto L47;
       }
       goto L70;
L71:;
       T1 = si_seq_iterator_ref(v1sequence1, v23it1);
       T0 = (cl_env_copy->function=v12key)->cfun.entry(1, T1);
       T2 = si_seq_iterator_ref(v4sequence2, v24it2);
       T1 = (cl_env_copy->function=v12key)->cfun.entry(1, T2);
       if ((cl_env_copy->function=v11)->cfun.entry(2, T0, T1)!=ECL_NIL) {
        goto L47;
       }
L70:;
       goto L36;
L47:;
       goto L46;
      }
L36:;
      {
       cl_object v23;
       v23 = ecl_make_integer((v18start2)+1);
       {
        bool v24;
        v24 = ECL_FIXNUMP(v23);
        if (ecl_unlikely(!(v24)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v23);
        value0 = ECL_NIL;
        cl_env_copy->nvalues = 0;
       }
       v18start2 = ecl_fixnum(v23);
      }
      v22it2 = si_seq_iterator_next(v4sequence2, v22it2);
L34:;
      if (v22it2==ECL_NIL) {
       goto L84;
      }
      if ((v18start2)>=(v19last)) {
       goto L84;
      }
      goto L33;
L84:;
      if (!((v17last_index)<0)){
       goto L87;
      }
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 1;
      return value0;
L87:;
      value0 = ecl_make_fixnum(v17last_index);
      cl_env_copy->nvalues = 1;
      return value0;
     }
    }
   }
  }
 }
}
/* function definition for SORT                                               */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_sort(cl_narg narg, cl_object v1sequence, cl_object v2predicate, ...)
{
 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<2)) FEwrong_num_arguments(ECL_SYM("SORT",790));
 {
  cl_object v3key;
  ecl_va_list args; ecl_va_start(args,v2predicate,narg,2);
  {
   cl_object keyvars[2];
   cl_parse_key(args,1,cl_sortkeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   v3key = keyvars[0];
  }
  if (Null(v3key)){
   goto L4;
  }
  v3key = si_coerce_to_function(v3key);
  goto L3;
L4:;
  v3key = (ECL_SYM("IDENTITY",428)->symbol.gfdef);
L3:;
  v2predicate = si_coerce_to_function(v2predicate);
  if (!(ECL_LISTP(v1sequence))){
   goto L7;
  }
  value0 = L382list_merge_sort(v1sequence, v2predicate, v3key);
  return value0;
L7:;
  {
   cl_fixnum v4;
   v4 = ecl_length(v1sequence);
   T0 = ecl_make_integer((v4)-1);
   value0 = L383quick_sort(v1sequence, ecl_make_int8_t(0), T0, v2predicate, v3key);
   return value0;
  }
 }
}
/* function definition for LIST-MERGE-SORT                                    */
/* optimize speed 3, debug 1, space 1, safety 0                               */
static cl_object L382list_merge_sort(cl_object v1l, cl_object v2predicate, cl_object v3key)
{
 cl_object T0;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
L1:;
 {
  cl_fixnum v4i;
  cl_object v5left;
  cl_object v6right;
  cl_object v7l0;
  cl_object v8l1;
  cl_object v9key_left;
  cl_object v10key_right;
  v4i = (cl_fixnum)(0);
  v5left = ECL_NIL;
  v6right = ECL_NIL;
  v7l0 = ECL_NIL;
  v8l1 = ECL_NIL;
  v9key_left = ECL_NIL;
  v10key_right = ECL_NIL;
  v4i = ecl_length(v1l);
  if (!((v4i)<((cl_fixnum)(2)))){
   goto L15;
  }
  value0 = v1l;
  cl_env_copy->nvalues = 1;
  return value0;
L15:;
  if (!((v4i)==((cl_fixnum)(2)))){
   goto L14;
  }
  T0 = _ecl_car(v1l);
  v9key_left = (cl_env_copy->function=v3key)->cfun.entry(1, T0);
  T0 = _ecl_cadr(v1l);
  v10key_right = (cl_env_copy->function=v3key)->cfun.entry(1, T0);
  if (Null((cl_env_copy->function=v2predicate)->cfun.entry(2, v9key_left, v10key_right))){
   goto L22;
  }
  value0 = v1l;
  cl_env_copy->nvalues = 1;
  return value0;
L22:;
  if (Null((cl_env_copy->function=v2predicate)->cfun.entry(2, v10key_right, v9key_left))){
   goto L24;
  }
  value0 = cl_nreverse(v1l);
  return value0;
L24:;
  value0 = v1l;
  cl_env_copy->nvalues = 1;
  return value0;
L14:;
  v4i = ecl_fixnum(ecl_floor2(ecl_make_fixnum(v4i),ecl_make_int8_t(2)));
  {
   cl_fixnum v11j;
   cl_object v12l1;
   v11j = (cl_fixnum)(1);
   v12l1 = v1l;
   goto L33;
L32:;
   v11j = (v11j)+1;
   v12l1 = _ecl_cdr(v12l1);
L33:;
   if ((v11j)>=(v4i)) {
    goto L38;
   }
   goto L32;
L38:;
   v5left = v1l;
   v6right = _ecl_cdr(v12l1);
   (ECL_CONS_CDR(v12l1)=ECL_NIL,v12l1);
  }
  v5left = L382list_merge_sort(v5left, v2predicate, v3key);
  v6right = L382list_merge_sort(v6right, v2predicate, v3key);
  if (!(v5left==ECL_NIL)){
   goto L49;
  }
  value0 = v6right;
  cl_env_copy->nvalues = 1;
  return value0;
L49:;
  if (!(v6right==ECL_NIL)){
   goto L48;
  }
  value0 = v5left;
  cl_env_copy->nvalues = 1;
  return value0;
L48:;
  v7l0 = CONS(ECL_NIL,ECL_NIL);
  v8l1 = v7l0;
  T0 = _ecl_car(v5left);
  v9key_left = (cl_env_copy->function=v3key)->cfun.entry(1, T0);
  T0 = _ecl_car(v6right);
  v10key_right = (cl_env_copy->function=v3key)->cfun.entry(1, T0);
L9:;
  if (Null((cl_env_copy->function=v2predicate)->cfun.entry(2, v9key_left, v10key_right))){
   goto L61;
  }
  goto L10;
L61:;
  if (Null((cl_env_copy->function=v2predicate)->cfun.entry(2, v10key_right, v9key_left))){
   goto L63;
  }
  goto L11;
L63:;
  goto L10;
L10:;
  (ECL_CONS_CDR(v8l1)=v5left,v8l1);
  v8l1 = _ecl_cdr(v8l1);
  v5left = _ecl_cdr(v5left);
  if (!(v5left==ECL_NIL)){
   goto L70;
  }
  (ECL_CONS_CDR(v8l1)=v6right,v8l1);
  value0 = _ecl_cdr(v7l0);
  cl_env_copy->nvalues = 1;
  return value0;
L70:;
  T0 = _ecl_car(v5left);
  v9key_left = (cl_env_copy->function=v3key)->cfun.entry(1, T0);
  goto L9;
L11:;
  (ECL_CONS_CDR(v8l1)=v6right,v8l1);
  v8l1 = _ecl_cdr(v8l1);
  v6right = _ecl_cdr(v6right);
  if (!(v6right==ECL_NIL)){
   goto L81;
  }
  (ECL_CONS_CDR(v8l1)=v5left,v8l1);
  value0 = _ecl_cdr(v7l0);
  cl_env_copy->nvalues = 1;
  return value0;
L81:;
  T0 = _ecl_car(v6right);
  v10key_right = (cl_env_copy->function=v3key)->cfun.entry(1, T0);
  goto L9;
 }
}
/* function definition for QUICK-SORT                                         */
/* optimize speed 1, debug 1, space 1, safety 0                               */
static cl_object L383quick_sort(cl_object v1seq, cl_object v2start, cl_object v3end, cl_object v4pred, cl_object v5key)
{
 cl_object T0, T1;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 cl_fixnum v6start;
 cl_fixnum v7end;
 v6start = ecl_fixnum(v2start);
 v7end = ecl_fixnum(v3end);
L1:;
 if (!((v6start)<(v7end))){
  goto L2;
 }
 {
  cl_fixnum v8j;
  v8j = (v7end)+1;
  {
   cl_fixnum v9i;
   cl_fixnum v10l;
   cl_fixnum v11l_half;
   cl_fixnum v12p;
   cl_object v13d;
   cl_object v14kd;
   v9i = v6start;
   v10l = (v7end)-(v6start);
   v11l_half = ((v10l) >> (1));
   v12p = (v6start)+(v11l_half);
   v13d = ecl_elt(v1seq,v12p);
   v14kd = (cl_env_copy->function=v5key)->cfun.entry(1, v13d);
   {
    cl_object v15;
    v15 = ecl_elt(v1seq,v6start);
    {
     cl_object v16;
     v16 = ecl_elt(v1seq,v12p);
     ecl_elt_set(v1seq,v12p,v15);
     ecl_elt_set(v1seq,v6start,v16);
    }
   }
L18:;
L21:;
   v8j = (v8j)-((cl_fixnum)1);
   T0 = ecl_make_fixnum(v8j);
   if ((ecl_fixnum(T0))>(v9i)) {
    goto L23;
   }
   goto L17;
L23:;
   T1 = ecl_elt(v1seq,v8j);
   T0 = (cl_env_copy->function=v5key)->cfun.entry(1, T1);
   if (Null((cl_env_copy->function=v4pred)->cfun.entry(2, T0, v14kd))){
    goto L22;
   }
   goto L20;
L22:;
   goto L21;
L20:;
L31:;
   v9i = (v9i)+((cl_fixnum)1);
   T0 = ecl_make_fixnum(v9i);
   if ((ecl_fixnum(T0))<(v8j)) {
    goto L33;
   }
   goto L17;
L33:;
   T1 = ecl_elt(v1seq,v9i);
   T0 = (cl_env_copy->function=v5key)->cfun.entry(1, T1);
   if ((cl_env_copy->function=v4pred)->cfun.entry(2, T0, v14kd)!=ECL_NIL) {
    goto L32;
   }
   goto L30;
L32:;
   goto L31;
L30:;
   {
    cl_object v15;
    v15 = ecl_elt(v1seq,v8j);
    {
     cl_object v16;
     v16 = ecl_elt(v1seq,v9i);
     ecl_elt_set(v1seq,v9i,v15);
     ecl_elt_set(v1seq,v8j,v16);
    }
   }
   goto L18;
L17:;
   T0 = ecl_elt(v1seq,v8j);
   ecl_elt_set(v1seq,v6start,T0);
   ecl_elt_set(v1seq,v8j,v13d);
  }
  {
   cl_fixnum v9;
   v9 = (v8j)-(v6start);
   {
    cl_fixnum v10;
    v10 = (v7end)-(v8j);
    if (!((v9)<(v10))){
     goto L46;
    }
   }
  }
  T0 = ecl_make_integer((v8j)-1);
  L383quick_sort(v1seq, ecl_make_fixnum(v6start), T0, v4pred, v5key);
  v6start = (v8j)+1;
  goto L1;
L46:;
  T0 = ecl_make_integer((v8j)+1);
  L383quick_sort(v1seq, T0, ecl_make_fixnum(v7end), v4pred, v5key);
  v7end = (v8j)-1;
  goto L1;
 }
L2:;
 value0 = v1seq;
 cl_env_copy->nvalues = 1;
 return value0;
}
/* function definition for STABLE-SORT-MERGE-VECTORS                          */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L384stable_sort_merge_vectors(cl_object v1source, cl_object v2target, cl_object v3start_1, cl_object v4end_1, cl_object v5end_2, cl_object v6pred, cl_object v7key)
{
 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_fixnum v8;
  cl_fixnum v9;
  cl_fixnum v10;
  cl_fixnum v11i;
  cl_fixnum v12j;
  cl_fixnum v13target_i;
  {
   cl_object v14;
   v14 = v3start_1;
   {
    bool v15;
    v15 = ECL_FIXNUMP(v14);
    if (ecl_unlikely(!(v15)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v14);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
   }
   v8 = ecl_fixnum(v14);
  }
  {
   cl_object v14;
   v14 = v4end_1;
   {
    bool v15;
    v15 = ECL_FIXNUMP(v14);
    if (ecl_unlikely(!(v15)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v14);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
   }
   v9 = ecl_fixnum(v14);
  }
  {
   cl_object v14;
   v14 = v3start_1;
   {
    bool v15;
    v15 = ECL_FIXNUMP(v14);
    if (ecl_unlikely(!(v15)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v14);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
   }
   v10 = ecl_fixnum(v14);
  }
  v11i = v8;
  v12j = v9;
  v13target_i = v10;
L14:;
  if (!(ecl_number_equalp(ecl_make_fixnum(v11i),v4end_1))){
   goto L17;
  }
L20:;
  if (!(ecl_number_equalp(ecl_make_fixnum(v12j),v5end_2))){
   goto L22;
  }
  goto L19;
L22:;
  {
   cl_object v14;
   v14 = v2target;
   T0 = v14;
   {
    cl_fixnum v15;
    v15 = v13target_i;
    if (ecl_unlikely((v15)>=(v14)->vector.dim))
           FEwrong_index(ECL_NIL,v14,-1,ecl_make_fixnum(v15),(v14)->vector.dim);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
    T1 = ecl_make_fixnum(v15);
   }
   T2 = ecl_aref_unsafe(v1source,v12j);
   ecl_aset_unsafe(T0,ecl_fixnum(T1),T2);
  }
  {
   cl_object v14;
   v14 = ecl_plus(ecl_make_fixnum(v13target_i),ecl_make_int8_t(1));
   {
    bool v15;
    v15 = ECL_FIXNUMP(v14);
    if (ecl_unlikely(!(v15)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v14);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
   }
   v13target_i = ecl_fixnum(v14);
  }
  {
   cl_object v14;
   v14 = ecl_plus(ecl_make_fixnum(v12j),ecl_make_int8_t(1));
   {
    bool v15;
    v15 = ECL_FIXNUMP(v14);
    if (ecl_unlikely(!(v15)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v14);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
   }
   v12j = ecl_fixnum(v14);
  }
  goto L20;
L19:;
  value0 = ECL_NIL;
  cl_env_copy->nvalues = 1;
  return value0;
L17:;
  if (!(ecl_number_equalp(ecl_make_fixnum(v12j),v5end_2))){
   goto L40;
  }
L43:;
  if (!(ecl_number_equalp(ecl_make_fixnum(v11i),v4end_1))){
   goto L45;
  }
  goto L42;
L45:;
  {
   cl_object v14;
   v14 = v2target;
   T0 = v14;
   {
    cl_fixnum v15;
    v15 = v13target_i;
    if (ecl_unlikely((v15)>=(v14)->vector.dim))
           FEwrong_index(ECL_NIL,v14,-1,ecl_make_fixnum(v15),(v14)->vector.dim);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
    T1 = ecl_make_fixnum(v15);
   }
   T2 = ecl_aref_unsafe(v1source,v11i);
   ecl_aset_unsafe(T0,ecl_fixnum(T1),T2);
  }
  {
   cl_object v14;
   v14 = ecl_plus(ecl_make_fixnum(v13target_i),ecl_make_int8_t(1));
   {
    bool v15;
    v15 = ECL_FIXNUMP(v14);
    if (ecl_unlikely(!(v15)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v14);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
   }
   v13target_i = ecl_fixnum(v14);
  }
  {
   cl_object v14;
   v14 = ecl_plus(ecl_make_fixnum(v11i),ecl_make_int8_t(1));
   {
    bool v15;
    v15 = ECL_FIXNUMP(v14);
    if (ecl_unlikely(!(v15)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v14);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
   }
   v11i = ecl_fixnum(v14);
  }
  goto L43;
L42:;
  value0 = ECL_NIL;
  cl_env_copy->nvalues = 1;
  return value0;
L40:;
  if (Null(v7key)){
   goto L65;
  }
  {
   cl_object v14;
   v14 = v1source;
   T2 = v14;
   {
    cl_fixnum v15;
    v15 = v12j;
    if (ecl_unlikely((v15)>=(v14)->vector.dim))
           FEwrong_index(ECL_NIL,v14,-1,ecl_make_fixnum(v15),(v14)->vector.dim);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
    T3 = ecl_make_fixnum(v15);
   }
   T1 = ecl_aref_unsafe(T2,ecl_fixnum(T3));
  }
  T0 = ecl_function_dispatch(cl_env_copy,v7key)(1, T1);
  {
   cl_object v14;
   v14 = v1source;
   T3 = v14;
   {
    cl_fixnum v15;
    v15 = v11i;
    if (ecl_unlikely((v15)>=(v14)->vector.dim))
           FEwrong_index(ECL_NIL,v14,-1,ecl_make_fixnum(v15),(v14)->vector.dim);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
    T4 = ecl_make_fixnum(v15);
   }
   T2 = ecl_aref_unsafe(T3,ecl_fixnum(T4));
  }
  T1 = ecl_function_dispatch(cl_env_copy,v7key)(1, T2);
  if (Null(ecl_function_dispatch(cl_env_copy,v6pred)(2, T0, T1))){
   goto L63;
  }
  goto L64;
L65:;
  {
   cl_object v14;
   v14 = v1source;
   T1 = v14;
   {
    cl_fixnum v15;
    v15 = v12j;
    if (ecl_unlikely((v15)>=(v14)->vector.dim))
           FEwrong_index(ECL_NIL,v14,-1,ecl_make_fixnum(v15),(v14)->vector.dim);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
    T2 = ecl_make_fixnum(v15);
   }
   T0 = ecl_aref_unsafe(T1,ecl_fixnum(T2));
  }
  {
   cl_object v14;
   v14 = v1source;
   T2 = v14;
   {
    cl_fixnum v15;
    v15 = v11i;
    if (ecl_unlikely((v15)>=(v14)->vector.dim))
           FEwrong_index(ECL_NIL,v14,-1,ecl_make_fixnum(v15),(v14)->vector.dim);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
    T3 = ecl_make_fixnum(v15);
   }
   T1 = ecl_aref_unsafe(T2,ecl_fixnum(T3));
  }
  if (Null(ecl_function_dispatch(cl_env_copy,v6pred)(2, T0, T1))){
   goto L63;
  }
L64:;
  {
   cl_object v14;
   v14 = v2target;
   T0 = v14;
   {
    cl_fixnum v15;
    v15 = v13target_i;
    if (ecl_unlikely((v15)>=(v14)->vector.dim))
           FEwrong_index(ECL_NIL,v14,-1,ecl_make_fixnum(v15),(v14)->vector.dim);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
    T1 = ecl_make_fixnum(v15);
   }
   T2 = ecl_aref_unsafe(v1source,v12j);
   ecl_aset_unsafe(T0,ecl_fixnum(T1),T2);
  }
  {
   cl_object v14;
   v14 = ecl_plus(ecl_make_fixnum(v12j),ecl_make_int8_t(1));
   {
    bool v15;
    v15 = ECL_FIXNUMP(v14);
    if (ecl_unlikely(!(v15)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v14);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
   }
   v12j = ecl_fixnum(v14);
  }
  goto L16;
L63:;
  {
   cl_object v14;
   v14 = v2target;
   T0 = v14;
   {
    cl_fixnum v15;
    v15 = v13target_i;
    if (ecl_unlikely((v15)>=(v14)->vector.dim))
           FEwrong_index(ECL_NIL,v14,-1,ecl_make_fixnum(v15),(v14)->vector.dim);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
    T1 = ecl_make_fixnum(v15);
   }
   T2 = ecl_aref_unsafe(v1source,v11i);
   ecl_aset_unsafe(T0,ecl_fixnum(T1),T2);
  }
  {
   cl_object v14;
   v14 = ecl_plus(ecl_make_fixnum(v11i),ecl_make_int8_t(1));
   {
    bool v15;
    v15 = ECL_FIXNUMP(v14);
    if (ecl_unlikely(!(v15)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v14);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
   }
   v11i = ecl_fixnum(v14);
  }
L16:;
  {
   cl_object v14;
   v14 = ecl_plus(ecl_make_fixnum(v13target_i),ecl_make_int8_t(1));
   {
    bool v15;
    v15 = ECL_FIXNUMP(v14);
    if (ecl_unlikely(!(v15)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v14);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
   }
   v13target_i = ecl_fixnum(v14);
  }
  goto L14;
 }
}
/* function definition for VECTOR-MERGE-SORT                                  */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L385vector_merge_sort(cl_object v1vector, cl_object v2pred, cl_object v3key)
{
 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 v4vector_len;
  cl_fixnum v5n;
  cl_object v6direction;
  cl_object v7temp;
  cl_fixnum v8unsorted;
  cl_fixnum v9start_1;
  {
   cl_object v10;
   v10 = v1vector;
   if (ecl_unlikely(!ECL_VECTORP(v10))) FEtype_error_vector(v10);
   value0 = ECL_NIL;
   cl_env_copy->nvalues = 0;
   T0 = v10;
  }
  v4vector_len = ecl_length(T0);
  v5n = (cl_fixnum)(1);
  v6direction = ECL_T;
  v7temp = si_make_pure_array(ECL_T, ecl_make_fixnum(v4vector_len), ECL_NIL, ECL_NIL, ECL_NIL, ecl_make_int8_t(0));
  v8unsorted = (cl_fixnum)(0);
  v9start_1 = (cl_fixnum)(0);
L11:;
  v8unsorted = (cl_fixnum)(0);
L16:;
  v9start_1 = v8unsorted;
  {
   cl_fixnum v10end_1;
   {
    cl_object v11;
    v11 = ecl_plus(ecl_make_fixnum(v9start_1),ecl_make_fixnum(v5n));
    {
     bool v12;
     v12 = ECL_FIXNUMP(v11);
     if (ecl_unlikely(!(v12)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v11);
     value0 = ECL_NIL;
     cl_env_copy->nvalues = 0;
    }
    v10end_1 = ecl_fixnum(v11);
   }
   if (!((v10end_1)<(v4vector_len))){
    goto L23;
   }
   {
    cl_fixnum v11end_2;
    {
     cl_object v12;
     v12 = ecl_plus(ecl_make_fixnum(v10end_1),ecl_make_fixnum(v5n));
     {
      bool v13;
      v13 = ECL_FIXNUMP(v12);
      if (ecl_unlikely(!(v13)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v12);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
     }
     v11end_2 = ecl_fixnum(v12);
    }
    if (!((v11end_2)>(v4vector_len))){
     goto L28;
    }
    v11end_2 = v4vector_len;
L28:;
    v8unsorted = v11end_2;
    if (Null(v6direction)){
     goto L34;
    }
    L384stable_sort_merge_vectors(v1vector, v7temp, ecl_make_fixnum(v9start_1), ecl_make_fixnum(v10end_1), ecl_make_fixnum(v11end_2), v2pred, v3key);
    goto L33;
L34:;
    L384stable_sort_merge_vectors(v7temp, v1vector, ecl_make_fixnum(v9start_1), ecl_make_fixnum(v10end_1), ecl_make_fixnum(v11end_2), v2pred, v3key);
L33:;
    if (!((v8unsorted)==(v4vector_len))){
     goto L17;
    }
    goto L15;
   }
L23:;
   if (Null(v6direction)){
    goto L38;
   }
   {
    cl_fixnum v12i;
    v12i = v9start_1;
    goto L43;
L42:;
    {
     cl_object v13;
     v13 = v7temp;
     T0 = v13;
     {
      cl_fixnum v14;
      v14 = v12i;
      if (ecl_unlikely((v14)>=(v13)->vector.dim))
           FEwrong_index(ECL_NIL,v13,-1,ecl_make_fixnum(v14),(v13)->vector.dim);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
      T1 = ecl_make_fixnum(v14);
     }
     T2 = ecl_aref_unsafe(v1vector,v12i);
     ecl_aset_unsafe(T0,ecl_fixnum(T1),T2);
    }
    {
     cl_object v13;
     v13 = ecl_make_integer((v12i)+1);
     {
      bool v14;
      v14 = ECL_FIXNUMP(v13);
      if (ecl_unlikely(!(v14)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v13);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
     }
     v12i = ecl_fixnum(v13);
    }
L43:;
    if ((v12i)==(v4vector_len)) {
     goto L57;
    }
    goto L42;
L57:;
    goto L37;
   }
L38:;
   {
    cl_fixnum v13i;
    v13i = v9start_1;
    goto L62;
L61:;
    {
     cl_object v14;
     v14 = v1vector;
     T0 = v14;
     {
      cl_fixnum v15;
      v15 = v13i;
      if (ecl_unlikely((v15)>=(v14)->vector.dim))
           FEwrong_index(ECL_NIL,v14,-1,ecl_make_fixnum(v15),(v14)->vector.dim);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
      T1 = ecl_make_fixnum(v15);
     }
     T2 = ecl_aref_unsafe(v7temp,v13i);
     ecl_aset_unsafe(T0,ecl_fixnum(T1),T2);
    }
    {
     cl_object v14;
     v14 = ecl_make_integer((v13i)+1);
     {
      bool v15;
      v15 = ECL_FIXNUMP(v14);
      if (ecl_unlikely(!(v15)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v14);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
     }
     v13i = ecl_fixnum(v14);
    }
L62:;
    if ((v13i)==(v4vector_len)) {
     goto L76;
    }
    goto L61;
L76:;
   }
L37:;
   goto L15;
  }
L17:;
  goto L16;
L15:;
  if (!((v9start_1)==0)){
   goto L79;
  }
  if (Null(v6direction)){
   goto L81;
  }
  {
   cl_fixnum v10i;
   v10i = (cl_fixnum)(0);
   goto L85;
L84:;
   {
    cl_object v11;
    v11 = v1vector;
    T0 = v11;
    {
     cl_fixnum v12;
     v12 = v10i;
     if (ecl_unlikely((v12)>=(v11)->vector.dim))
           FEwrong_index(ECL_NIL,v11,-1,ecl_make_fixnum(v12),(v11)->vector.dim);
     value0 = ECL_NIL;
     cl_env_copy->nvalues = 0;
     T1 = ecl_make_fixnum(v12);
    }
    T2 = ecl_aref_unsafe(v7temp,v10i);
    ecl_aset_unsafe(T0,ecl_fixnum(T1),T2);
   }
   v10i = (v10i)+1;
L85:;
   if (!((v10i)<(v4vector_len))){
    goto L97;
   }
   goto L84;
L97:;
  }
L81:;
  value0 = v1vector;
  cl_env_copy->nvalues = 1;
  return value0;
L79:;
  {
   cl_object v10;
   v10 = cl_ash(ecl_make_fixnum(v5n), ecl_make_int8_t(1));
   {
    bool v11;
    v11 = ECL_FIXNUMP(v10);
    if (ecl_unlikely(!(v11)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v10);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
   }
   v5n = ecl_fixnum(v10);
  }
  v6direction = Null(v6direction)?ECL_T:ECL_NIL;
  goto L11;
 }
}
/* function definition for STABLE-SORT                                        */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_stable_sort(cl_narg narg, cl_object v1sequence, cl_object v2predicate, ...)
{
 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(ECL_SYM("STABLE-SORT",796));
 {
  cl_object v3key;
  ecl_va_list args; ecl_va_start(args,v2predicate,narg,2);
  {
   cl_object keyvars[2];
   cl_parse_key(args,1,cl_stable_sortkeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   v3key = keyvars[0];
  }
  if (Null(v3key)){
   goto L4;
  }
  v3key = si_coerce_to_function(v3key);
  goto L3;
L4:;
  v3key = (ECL_SYM("IDENTITY",428)->symbol.gfdef);
L3:;
  v2predicate = si_coerce_to_function(v2predicate);
  if (!(ECL_LISTP(v1sequence))){
   goto L7;
  }
  value0 = L382list_merge_sort(v1sequence, v2predicate, v3key);
  return value0;
L7:;
  if (!(ECL_BIT_VECTOR_P(v1sequence))){
   goto L9;
  }
  value0 = cl_sort(4, v1sequence, v2predicate, ECL_SYM("KEY",1297), v3key);
  return value0;
L9:;
  value0 = L385vector_merge_sort(v1sequence, v2predicate, v3key);
  return value0;
 }
}
/* function definition for MERGE                                              */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_merge(cl_narg narg, cl_object v1result_type, cl_object v2sequence1, cl_object v3sequence2, cl_object v4predicate, ...)
{
 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<4)) FEwrong_num_arguments(ECL_SYM("MERGE",557));
 {
  cl_object v5key;
  ecl_va_list args; ecl_va_start(args,v4predicate,narg,4);
  {
   cl_object keyvars[2];
   cl_parse_key(args,1,cl_mergekeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   v5key = keyvars[0];
  }
  {
   cl_fixnum v6l1;
   cl_fixnum v7l2;
   v6l1 = ecl_length(v2sequence1);
   v7l2 = ecl_length(v3sequence2);
   {
    cl_object v8key;
    if (Null(v5key)){
     goto L4;
    }
    v8key = si_coerce_to_function(v5key);
    goto L3;
L4:;
    v8key = (ECL_SYM("IDENTITY",428)->symbol.gfdef);
L3:;
    {
     cl_object v9predicate;
     v9predicate = si_coerce_to_function(v4predicate);
     {
      cl_fixnum v10size;
      cl_fixnum v11j;
      cl_object v12newseq;
      cl_fixnum v13i1;
      cl_fixnum v14i2;
      v10size = ecl_to_fixnum(ecl_plus(ecl_make_fixnum(v6l1),ecl_make_fixnum(v7l2)));
      v11j = (cl_fixnum)(0);
      v12newseq = cl_make_sequence(2, v1result_type, ecl_make_fixnum(v10size));
      v13i1 = (cl_fixnum)(0);
      v14i2 = (cl_fixnum)(0);
      goto L14;
L13:;
      if (!((v13i1)>=(v6l1))){
       goto L17;
      }
      T0 = ecl_elt(v3sequence2,v14i2);
      ecl_elt_set(v12newseq,v11j,T0);
      {
       cl_object v15;
       v15 = ecl_make_integer((v14i2)+1);
       {
        bool v16;
        v16 = ECL_FIXNUMP(v15);
        if (ecl_unlikely(!(v16)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v15);
        value0 = ECL_NIL;
        cl_env_copy->nvalues = 0;
       }
       v14i2 = ecl_fixnum(v15);
      }
      goto L16;
L17:;
      {
       cl_object v15v1;
       v15v1 = ecl_elt(v2sequence1,v13i1);
       if (!((v14i2)>=(v7l2))){
        goto L24;
       }
       ecl_elt_set(v12newseq,v11j,v15v1);
       {
        cl_object v16;
        v16 = ecl_make_integer((v13i1)+1);
        {
         bool v17;
         v17 = ECL_FIXNUMP(v16);
         if (ecl_unlikely(!(v17)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v16);
         value0 = ECL_NIL;
         cl_env_copy->nvalues = 0;
        }
        v13i1 = ecl_fixnum(v16);
       }
       goto L16;
L24:;
       {
        cl_object v16v2;
        cl_object v17k2;
        cl_object v18k1;
        v16v2 = ecl_elt(v3sequence2,v14i2);
        v17k2 = (cl_env_copy->function=v8key)->cfun.entry(1, v16v2);
        v18k1 = (cl_env_copy->function=v8key)->cfun.entry(1, v15v1);
        if (Null((cl_env_copy->function=v9predicate)->cfun.entry(2, v18k1, v17k2))){
         goto L33;
        }
        ecl_elt_set(v12newseq,v11j,v15v1);
        {
         cl_object v19;
         v19 = ecl_make_integer((v13i1)+1);
         {
          bool v20;
          v20 = ECL_FIXNUMP(v19);
          if (ecl_unlikely(!(v20)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v19);
          value0 = ECL_NIL;
          cl_env_copy->nvalues = 0;
         }
         v13i1 = ecl_fixnum(v19);
        }
        goto L16;
L33:;
        if (Null((cl_env_copy->function=v9predicate)->cfun.entry(2, v17k2, v18k1))){
         goto L39;
        }
        ecl_elt_set(v12newseq,v11j,v16v2);
        {
         cl_object v19;
         v19 = ecl_make_integer((v14i2)+1);
         {
          bool v20;
          v20 = ECL_FIXNUMP(v19);
          if (ecl_unlikely(!(v20)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v19);
          value0 = ECL_NIL;
          cl_env_copy->nvalues = 0;
         }
         v14i2 = ecl_fixnum(v19);
        }
        goto L16;
L39:;
        ecl_elt_set(v12newseq,v11j,v15v1);
        {
         cl_object v19;
         v19 = ecl_make_integer((v13i1)+1);
         {
          bool v20;
          v20 = ECL_FIXNUMP(v19);
          if (ecl_unlikely(!(v20)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v19);
          value0 = ECL_NIL;
          cl_env_copy->nvalues = 0;
         }
         v13i1 = ecl_fixnum(v19);
        }
       }
      }
L16:;
      {
       cl_object v15;
       v15 = ecl_make_integer((v11j)+1);
       {
        bool v16;
        v16 = ECL_FIXNUMP(v15);
        if (ecl_unlikely(!(v16)))
         FEwrong_type_argument(ECL_SYM("FIXNUM",374),v15);
        value0 = ECL_NIL;
        cl_env_copy->nvalues = 0;
       }
       v11j = ecl_fixnum(v15);
      }
L14:;
      if ((v11j)==(v10size)) {
       goto L53;
      }
      goto L13;
L53:;
      value0 = v12newseq;
      cl_env_copy->nvalues = 1;
      return value0;
     }
    }
   }
  }
 }
}
/* function definition for COMPLEMENT                                         */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_complement(cl_object v1f)
{
 cl_object env0 = ECL_NIL;
 cl_object CLV0;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
 env0 = ECL_NIL;
 CLV0 = env0 = CONS(v1f,env0);                    /*  F                       */
 {
  cl_object v2;
  v2 = ecl_make_cclosure_va((cl_objectfn)LC386__lambda658,env0,Cblock,0);
  value0 = v2;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
/* local function ALREADY-IN-LIST-P                                           */
/* optimize speed 3, debug 0, space 0, safety 0                               */
static cl_object LC374already_in_list_p(volatile cl_object *lex0, cl_object v1start, cl_object v2current, cl_object v3end, cl_object v4from_end)
{
 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 v5elt;
  T0 = ECL_CONS_CAR(v2current);
  v5elt = (cl_env_copy->function=lex0[2])->cfun.entry(1, T0);
  if (Null(v4from_end)){
   goto L3;
  }
L5:;
  if (!((v1start)==(v2current))){
   goto L7;
  }
  value0 = ECL_NIL;
  cl_env_copy->nvalues = 1;
  return value0;
L7:;
  if (Null(lex0[0])){
   goto L11;
  }
  T1 = ECL_CONS_CAR(v1start);
  T0 = (cl_env_copy->function=lex0[2])->cfun.entry(1, T1);
  if ((cl_env_copy->function=lex0[1])->cfun.entry(2, v5elt, T0)!=ECL_NIL) {
   goto L9;
  }
  goto L10;
L11:;
  T1 = ECL_CONS_CAR(v1start);
  T0 = (cl_env_copy->function=lex0[2])->cfun.entry(1, T1);
  if (Null((cl_env_copy->function=lex0[1])->cfun.entry(2, v5elt, T0))){
   goto L9;
  }
L10:;
  value0 = ECL_T;
  cl_env_copy->nvalues = 1;
  return value0;
L9:;
  v1start = ECL_CONS_CDR(v1start);
  goto L5;
L3:;
L17:;
  v2current = ECL_CONS_CDR(v2current);
  if (!((v2current)==(v3end))){
   goto L21;
  }
  value0 = ECL_NIL;
  cl_env_copy->nvalues = 1;
  return value0;
L21:;
  if (Null(lex0[0])){
   goto L24;
  }
  T1 = ECL_CONS_CAR(v2current);
  T0 = (cl_env_copy->function=lex0[2])->cfun.entry(1, T1);
  if ((cl_env_copy->function=lex0[1])->cfun.entry(2, v5elt, T0)!=ECL_NIL) {
   goto L18;
  }
  goto L23;
L24:;
  T1 = ECL_CONS_CAR(v2current);
  T0 = (cl_env_copy->function=lex0[2])->cfun.entry(1, T1);
  if (Null((cl_env_copy->function=lex0[1])->cfun.entry(2, v5elt, T0))){
   goto L18;
  }
L23:;
  value0 = ECL_T;
  cl_env_copy->nvalues = 1;
  return value0;
L18:;
  goto L17;
 }
}
/* local function ALREADY-IN-LIST-P                                           */
/* optimize speed 3, debug 0, space 0, safety 0                               */
static cl_object LC376already_in_list_p(volatile cl_object *lex0, cl_object v1start, cl_object v2current, cl_object v3end, cl_object v4from_end)
{
 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 v5elt;
  T0 = ECL_CONS_CAR(v2current);
  v5elt = (cl_env_copy->function=lex0[2])->cfun.entry(1, T0);
  if (Null(v4from_end)){
   goto L3;
  }
L5:;
  if (!((v1start)==(v2current))){
   goto L7;
  }
  value0 = ECL_NIL;
  cl_env_copy->nvalues = 1;
  return value0;
L7:;
  if (Null(lex0[0])){
   goto L11;
  }
  T1 = ECL_CONS_CAR(v1start);
  T0 = (cl_env_copy->function=lex0[2])->cfun.entry(1, T1);
  if ((cl_env_copy->function=lex0[1])->cfun.entry(2, v5elt, T0)!=ECL_NIL) {
   goto L9;
  }
  goto L10;
L11:;
  T1 = ECL_CONS_CAR(v1start);
  T0 = (cl_env_copy->function=lex0[2])->cfun.entry(1, T1);
  if (Null((cl_env_copy->function=lex0[1])->cfun.entry(2, v5elt, T0))){
   goto L9;
  }
L10:;
  value0 = ECL_T;
  cl_env_copy->nvalues = 1;
  return value0;
L9:;
  v1start = ECL_CONS_CDR(v1start);
  goto L5;
L3:;
L17:;
  v2current = ECL_CONS_CDR(v2current);
  if (!((v2current)==(v3end))){
   goto L21;
  }
  value0 = ECL_NIL;
  cl_env_copy->nvalues = 1;
  return value0;
L21:;
  if (Null(lex0[0])){
   goto L24;
  }
  T1 = ECL_CONS_CAR(v2current);
  T0 = (cl_env_copy->function=lex0[2])->cfun.entry(1, T1);
  if ((cl_env_copy->function=lex0[1])->cfun.entry(2, v5elt, T0)!=ECL_NIL) {
   goto L18;
  }
  goto L23;
L24:;
  T1 = ECL_CONS_CAR(v2current);
  T0 = (cl_env_copy->function=lex0[2])->cfun.entry(1, T1);
  if (Null((cl_env_copy->function=lex0[1])->cfun.entry(2, v5elt, T0))){
   goto L18;
  }
L23:;
  value0 = ECL_T;
  cl_env_copy->nvalues = 1;
  return value0;
L18:;
  goto L17;
 }
}
/* local function ALREADY-IN-VECTOR-P                                         */
/* optimize speed 3, debug 0, space 0, safety 0                               */
static cl_object LC378already_in_vector_p(volatile cl_object *lex0, cl_object v1sequence, cl_object v2start, cl_object v3current, cl_object v4end, cl_object v5from_end)
{
 cl_object T0;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 cl_fixnum v6start;
 cl_fixnum v7current;
 cl_fixnum v8end;
 v6start = ecl_fixnum(v2start);
 v7current = ecl_fixnum(v3current);
 v8end = ecl_fixnum(v4end);
L1:;
 if (Null(v5from_end)){
  goto L3;
 }
 v8end = v7current;
 goto L2;
L3:;
 v6start = (v7current)+1;
L2:;
 {
  cl_object v9base;
  T0 = ecl_aref_unsafe(v1sequence,v7current);
  v9base = (cl_env_copy->function=lex0[2])->cfun.entry(1, T0);
  {
   cl_fixnum v10;
   v10 = v6start;
   goto L12;
L11:;
   {
    cl_object v11elt;
    v11elt = ecl_aref_unsafe(v1sequence,v10);
    if (Null(lex0[0])){
     goto L17;
    }
    T0 = (cl_env_copy->function=lex0[2])->cfun.entry(1, v11elt);
    if ((cl_env_copy->function=lex0[1])->cfun.entry(2, v9base, T0)!=ECL_NIL) {
     goto L14;
    }
    goto L16;
L17:;
    T0 = (cl_env_copy->function=lex0[2])->cfun.entry(1, v11elt);
    if (Null((cl_env_copy->function=lex0[1])->cfun.entry(2, v9base, T0))){
     goto L14;
    }
L16:;
    value0 = ECL_T;
    cl_env_copy->nvalues = 1;
    return value0;
   }
L14:;
   v10 = (v10)+1;
L12:;
   if ((v10)==(v8end)) {
    goto L23;
   }
   goto L11;
L23:;
   value0 = ECL_NIL;
   cl_env_copy->nvalues = 1;
   return value0;
  }
 }
}
/* closure LAMBDA658                                                          */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC386__lambda658(cl_narg narg, ...)
{
 cl_object T0;
 cl_object CLV0;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object env0 = cl_env_copy->function->cclosure.env;
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
 /* Scanning closure data ... */
 CLV0 = env0;                                     /*  F                       */
 { /* ... closure scanning finished */
 {
  cl_object v1x;
  ecl_va_list args; ecl_va_start(args,narg,narg,0);
  v1x = cl_grab_rest_args(args);
  ecl_va_end(args);
  T0 = cl_apply(2, ECL_CONS_CAR(CLV0), v1x);
  value0 = Null(T0)?ECL_T:ECL_NIL;
  cl_env_copy->nvalues = 1;
  return value0;
 }
 }
}
#include "lsp/seqlib.data"
#ifdef __cplusplus
extern "C"
#endif

ECL_DLLEXPORT void _eclklIiiBzXPT3p9_QvjzL881(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;SEQLIB.LSP.NEWEST",-1);
 return;}
 #ifdef ECL_DYNAMIC_VV
 VV = Cblock->cblock.data;
 #endif
 Cblock->cblock.data_text = (const cl_object *)"@EcLtAg:_eclklIiiBzXPT3p9_QvjzL881@";
 VVtemp = Cblock->cblock.temp_data;
 ECL_DEFINE_SETF_FUNCTIONS
/* MAKE-LOAD-FORMs                                                            */
/* TOP-LEVEL-FORMs                                                            */
  si_select_package(VVtemp[0]);
  (void)0; /* No entry created for SEQTYPE */
  (void)0; /* No entry created for SEQUENCE-COUNT */
  (void)0; /* No entry created for TEST-ERROR */
  ecl_cmp_defun(VV[51]);                          /*  UNSAFE-FUNCALL1         */
  (void)0; /* No entry created for REDUCE */
  (void)0; /* No entry created for FILL */
  (void)0; /* No entry created for REPLACE */
  ecl_cmp_defun(VV[52]);                          /*  FILTER-VECTOR           */
  ecl_cmp_defun(VV[53]);                          /*  REMOVE-LIST             */
  (void)0; /* No entry created for REMOVE */
  (void)0; /* No entry created for REMOVE-IF */
  (void)0; /* No entry created for REMOVE-IF-NOT */
  ecl_cmp_defun(VV[54]);                          /*  DELETE-LIST             */
  (void)0; /* No entry created for DELETE */
  (void)0; /* No entry created for DELETE-IF */
  (void)0; /* No entry created for DELETE-IF-NOT */
  (void)0; /* No entry created for COUNT */
  (void)0; /* No entry created for COUNT-IF */
  (void)0; /* No entry created for COUNT-IF-NOT */
  (void)0; /* No entry created for SUBSTITUTE */
  (void)0; /* No entry created for SUBSTITUTE-IF */
  (void)0; /* No entry created for SUBSTITUTE-IF-NOT */
  (void)0; /* No entry created for NSUBSTITUTE */
  (void)0; /* No entry created for NSUBSTITUTE-IF */
  (void)0; /* No entry created for NSUBSTITUTE-IF-NOT */
  (void)0; /* No entry created for FIND */
  (void)0; /* No entry created for FIND-IF */
  (void)0; /* No entry created for FIND-IF-NOT */
  (void)0; /* No entry created for POSITION */
  (void)0; /* No entry created for POSITION-IF */
  (void)0; /* No entry created for POSITION-IF-NOT */
  ecl_cmp_defun(VV[55]);                          /*  REMOVE-DUPLICATES-LIST  */
  (void)0; /* No entry created for REMOVE-DUPLICATES */
  ecl_cmp_defun(VV[56]);                          /*  DELETE-DUPLICATES-LIST  */
  ecl_cmp_defun(VV[57]);                          /*  FILTER-DUPLICATES-VECTOR */
  (void)0; /* No entry created for DELETE-DUPLICATES */
  (void)0; /* No entry created for MISMATCH */
  (void)0; /* No entry created for SEARCH */
  (void)0; /* No entry created for SEARCH-VECTOR */
  (void)0; /* No entry created for SEARCH-GENERIC */
  (void)0; /* No entry created for SORT */
  (void)0; /* No entry created for LIST-MERGE-SORT */
  (void)0; /* No entry created for QUICK-SORT */
  (void)0; /* No entry created for STABLE-SORT-MERGE-VECTORS */
  (void)0; /* No entry created for VECTOR-MERGE-SORT */
  (void)0; /* No entry created for STABLE-SORT */
  (void)0; /* No entry created for MERGE */
  (void)0; /* No entry created for COMPLEMENT */
}
