/* Compiler: ECL 26.3.27                                                      */
/* Source: /build/ecl/src/ecl-26.3.27/src/lsp/packlib.lsp                     */
#include <ecl/ecl-cmp.h>
#include "lsp/packlib.eclh"
/* function definition for FIND-ALL-SYMBOLS                                   */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_find_all_symbols(cl_object v1string_or_symbol)
{
 cl_object T0;
 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);
L1:;
 {
  cl_object env1 = env0;
  T0 = cl_string(v1string_or_symbol);
  env1 = ECL_NIL;
  CLV0 = env1 = CONS(T0,env1);                    /*  SYMBOL-NAME             */
  {
   cl_object v2;
   {
    cl_object v3;
    v3 = ecl_make_cclosure_va((cl_objectfn)LC355__lambda6,env1,Cblock,1);
    v2 = v3;
   }
   {
    cl_object v3;
    cl_object v4;
    cl_object v5;
    v3 = cl_list_all_packages();
    v4 = ECL_NIL;
    v5 = v3;
    {
     cl_object v6;
     cl_object v7;
     v6 = ecl_list1(ECL_NIL);
     v7 = v6;
L8:;
     if (!(ecl_endp(v5))){
      goto L10;
     }
     goto L9;
L10:;
     v4 = ECL_CONS_CAR(v5);
     {
      cl_object v8;
      v8 = ECL_CONS_CDR(v5);
      if (ecl_unlikely(!ECL_LISTP(v8))) FEtype_error_list(v8);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
      v5 = v8;
     }
     {
      cl_object v8;
      v8 = ecl_function_dispatch(cl_env_copy,v2)(1, v4);
      {
       cl_object v9;
       v9 = v7;
       if (ecl_unlikely(ECL_ATOM(v9))) FEtype_error_cons(v9);
       value0 = ECL_NIL;
       cl_env_copy->nvalues = 0;
       T0 = v9;
      }
      (ECL_CONS_CDR(T0)=v8,T0);
      if (Null(v8)){
       goto L18;
      }
     }
     T0 = ecl_cdr(v7);
     v7 = ecl_last(T0,1);
L18:;
     goto L8;
L9:;
     value0 = ecl_cdr(v6);
     cl_env_copy->nvalues = 1;
     return value0;
    }
   }
  }
 }
}
/* function definition for PACKAGES-ITERATOR                                  */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object si_packages_iterator(cl_object v1packages, cl_object v2options, cl_object v3maybe_list)
{
 cl_object T0, T1;
 cl_object env0 = ECL_NIL;
 cl_object CLV0, CLV1, CLV2, CLV3, CLV4;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object env1 = env0;
  env1 = ECL_NIL;
  CLV0 = env1 = CONS(ECL_NIL,env1);               /*  ALL-SYMBOLS             */
  if (ECL_ATOM(v1packages)) {
   goto L4;
  }
  if (v3maybe_list!=ECL_NIL) {
   goto L2;
  }
  goto L3;
L4:;
L3:;
  v1packages = ecl_list1(v1packages);
L2:;
  {
   cl_object v4;
   v4 = v1packages;
   goto L11;
L10:;
   {
    cl_object v5p;
    v5p = ecl_car(v4);
    {
     cl_object v6package;
     v6package = si_coerce_to_package(v5p);
     {
      cl_object v7;                               /*  HASH-EXT                */
      cl_object v8;                               /*  HASH-INT                */
      cl_object v9;                               /*  PACKAGES-USED           */
      value0 = si_package_hash_tables(v6package);
      {
       v7 = value0;
       v8 = cl_env_copy->values[1];
       v9 = cl_env_copy->values[2];
      }
      {
       cl_object v10;
       cl_object v11;
       v10 = ECL_SYM("EXTERNAL",1266);
       v11 = v2options;
       if (Null(ecl_memql(v10,v11))){
        goto L18;
       }
      }
      T0 = cl_list(3, v6package, ECL_SYM("EXTERNAL",1266), v7);
      ECL_CONS_CAR(CLV0) = CONS(T0,ECL_CONS_CAR(CLV0));
L18:;
      {
       cl_object v10;
       cl_object v11;
       v10 = ECL_SYM("INTERNAL",1293);
       v11 = v2options;
       if (Null(ecl_memql(v10,v11))){
        goto L23;
       }
      }
      T0 = cl_list(3, v6package, ECL_SYM("INTERNAL",1293), v8);
      ECL_CONS_CAR(CLV0) = CONS(T0,ECL_CONS_CAR(CLV0));
L23:;
      {
       cl_object v10;
       cl_object v11;
       v10 = ECL_SYM("INHERITED",1285);
       v11 = v2options;
       if (Null(ecl_memql(v10,v11))){
        goto L15;
       }
      }
      {
       cl_object v10;
       v10 = v9;
       goto L34;
L33:;
       {
        cl_object v11p;
        v11p = ecl_car(v10);
        T0 = si_package_hash_tables(v11p);
        T1 = cl_list(3, v6package, ECL_SYM("INHERITED",1285), T0);
        ECL_CONS_CAR(CLV0) = CONS(T1,ECL_CONS_CAR(CLV0));
       }
       v10 = ecl_cdr(v10);
L34:;
       if (Null(v10)){
        goto L42;
       }
       goto L33;
L42:;
      }
     }
    }
L15:;
   }
   v4 = ecl_cdr(v4);
L11:;
   if (Null(v4)){
    goto L46;
   }
   goto L10;
L46:;
  }
  if (ECL_CONS_CAR(CLV0)!=ECL_NIL) {
   goto L48;
  }
  {
   cl_object v4;
   v4 = ecl_make_cfun_va((cl_objectfn)LC356__lambda52_va,ECL_NIL,Cblock,0);
   value0 = v4;
   cl_env_copy->nvalues = 1;
   return value0;
  }
L48:;
  {
   cl_object env2 = env1;
   {
    cl_object v4;
    v4 = ECL_CONS_CAR(CLV0);
    {
     cl_object v5;
     v5 = v4;
     {
      bool v6;
      v6 = ECL_LISTP(v5);
      if (ecl_unlikely(!(v6)))
         FEwrong_type_argument(VV[10],v5);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
     }
    }
    if (Null(v4)){
     goto L55;
    }
    {
     cl_object v5;
     v5 = ECL_CONS_CDR(v4);
     ECL_CONS_CAR(CLV0) = v5;
     v4 = ECL_CONS_CAR(v4);
    }
L55:;
    T0 = v4;
   }
   CLV1 = env2 = CONS(T0,env2);                   /*  CURRENT                 */
   T0 = ecl_car(ECL_CONS_CAR(CLV1));
   CLV2 = env2 = CONS(T0,env2);                   /*  PACKAGE                 */
   T0 = ecl_cadr(ECL_CONS_CAR(CLV1));
   CLV3 = env2 = CONS(T0,env2);                   /*  TYPE                    */
   T0 = ecl_caddr(ECL_CONS_CAR(CLV1));
   T1 = si_hash_table_iterator(T0);
   CLV4 = env2 = CONS(T1,env2);                   /*  ITERATOR                */
   {
    cl_object v4;
    v4 = ecl_make_cclosure_va((cl_objectfn)LC357iterate,env2,Cblock,0);
    value0 = v4;
    cl_env_copy->nvalues = 1;
    return value0;
   }
  }
 }
}
cl_object si_packages_iterator_va(cl_narg narg, cl_object v5packages, cl_object v6options, cl_object v7maybe_list, ...)
{
 if (ecl_unlikely(narg!=3)) FEwrong_num_arguments(VV[6]);
 {
  return si_packages_iterator(v5packages, v6options, v7maybe_list);
 }
}
/* local function WITH-PACKAGE-ITERATOR                                       */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC358with_package_iterator(cl_object v1, cl_object v2)
{
 cl_object T0, T1, T2, T3, T4, T5, T6, T7, T8;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4;
  cl_object v5;
  cl_object v6iterator;
  cl_object v7package_list;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v8;
   v8 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4 = v8;
  }
  v5 = v4;
  if (!(v5==ECL_NIL)){
   goto L11;
  }
  si_dm_too_few_arguments(v1);
L11:;
  {
   cl_object v8;
   v8 = ecl_car(v5);
   v5 = ecl_cdr(v5);
   v6iterator = v8;
  }
  if (!(v5==ECL_NIL)){
   goto L17;
  }
  si_dm_too_few_arguments(v1);
L17:;
  {
   cl_object v8;
   v8 = ecl_car(v5);
   v5 = ecl_cdr(v5);
   v7package_list = v8;
  }
  if (Null(v5)){
   goto L23;
  }
  {
   cl_object v8aux;
   v8aux = cl_set_difference(2, v5, VV[14]);
   if (Null(v8aux)){
    goto L22;
   }
   T0 = ecl_list1(v8aux);
   si_signal_simple_error(4, ECL_SYM("PROGRAM-ERROR",675), ECL_NIL, VV[15], T0);
   goto L22;
  }
L23:;
  si_signal_simple_error(4, ECL_SYM("PROGRAM-ERROR",675), ECL_NIL, VV[16], ECL_NIL);
L22:;
  T0 = cl_list(2, ECL_SYM("QUOTE",682), v5);
  T1 = cl_list(4, VV[6], v7package_list, T0, ECL_T);
  T2 = cl_list(2, v6iterator, T1);
  T3 = ecl_list1(T2);
  T4 = cl_list(2, ECL_SYM("QUOTE",682), v6iterator);
  T5 = cl_list(3, ECL_SYM("LIST",483), VV[17], T4);
  T6 = cl_list(3, v6iterator, ECL_NIL, T5);
  T7 = ecl_list1(T6);
  T8 = cl_listX(3, ECL_SYM("MACROLET",523), T7, v3);
  value0 = cl_list(3, ECL_SYM("LET",479), T3, T8);
  return value0;
 }
}
static cl_object LC358with_package_iterator_va(cl_narg narg, cl_object v8, cl_object v9, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[18]);
 {
  return LC358with_package_iterator(v8, v9);
 }
}
/* function definition for EXPAND-DO-SYMBOLS                                  */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L359expand_do_symbols(cl_object v1var, cl_object v2package, cl_object v3result_form, cl_object v4body, cl_object v5options)
{
 cl_object T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v6i;
  cl_object v7found;
  cl_object v8declaration;
  cl_object v9doc;
  v6i = cl_gensym(0);
  v7found = cl_gensym(0);
  v8declaration = ECL_NIL;
  v9doc = ECL_NIL;
  value0 = si_find_declarations(2, v4body, ECL_NIL);
  {
   const int v10 = cl_env_copy->nvalues;
   v8declaration = value0;
   cl_object v11;
   v11 = (v10<=1)? ECL_NIL : cl_env_copy->values[1];
   v4body = v11;
   v11 = (v10<=2)? ECL_NIL : cl_env_copy->values[2];
   v9doc = v11;
  }
  T0 = cl_list(2, ECL_SYM("QUOTE",682), v5options);
  T1 = cl_list(4, VV[6], v2package, T0, ECL_T);
  T2 = cl_list(2, v6i, T1);
  T3 = cl_list(3, T2, v7found, v1var);
  T4 = cl_list(2, v7found, v1var);
  T5 = cl_list(2, ECL_SYM("FUNCALL",396), v6i);
  T6 = cl_list(3, ECL_SYM("MULTIPLE-VALUE-SETQ",578), T4, T5);
  T7 = cl_list(2, ECL_SYM("RETURN",727), v3result_form);
  T8 = cl_list(3, ECL_SYM("UNLESS",886), v7found, T7);
  T9 = cl_listX(3, T6, T8, v4body);
  T10 = ecl_append(v8declaration,T9);
  value0 = cl_listX(4, ECL_SYM("DO*",310), T3, VV[21], T10);
  return value0;
 }
}
/* local function DO-SYMBOLS                                                  */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC360do_symbols(cl_object v1, cl_object v2)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4;
  cl_object v5;
  cl_object v6var;
  cl_object v7package;
  cl_object v8result_form;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v9;
   v9 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4 = v9;
  }
  v5 = v4;
  if (!(v5==ECL_NIL)){
   goto L11;
  }
  si_dm_too_few_arguments(v1);
L11:;
  {
   cl_object v9;
   v9 = ecl_car(v5);
   v5 = ecl_cdr(v5);
   v6var = v9;
  }
  if (Null(v5)){
   goto L17;
  }
  {
   cl_object v9;
   v9 = ecl_car(v5);
   v5 = ecl_cdr(v5);
   v7package = v9;
   goto L16;
  }
L17:;
  v7package = ECL_SYM("*PACKAGE*",45);
L16:;
  if (Null(v5)){
   goto L23;
  }
  {
   cl_object v9;
   v9 = ecl_car(v5);
   v5 = ecl_cdr(v5);
   v8result_form = v9;
   goto L22;
  }
L23:;
  v8result_form = ECL_NIL;
L22:;
  if (Null(v5)){
   goto L28;
  }
  si_dm_too_many_arguments(v1);
L28:;
  value0 = L359expand_do_symbols(v6var, v7package, v8result_form, v3, VV[23]);
  return value0;
 }
}
static cl_object LC360do_symbols_va(cl_narg narg, cl_object v9, cl_object v10, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[24]);
 {
  return LC360do_symbols(v9, v10);
 }
}
/* local function DO-EXTERNAL-SYMBOLS                                         */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC361do_external_symbols(cl_object v1, cl_object v2)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4;
  cl_object v5;
  cl_object v6var;
  cl_object v7package;
  cl_object v8result_form;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v9;
   v9 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4 = v9;
  }
  v5 = v4;
  if (!(v5==ECL_NIL)){
   goto L11;
  }
  si_dm_too_few_arguments(v1);
L11:;
  {
   cl_object v9;
   v9 = ecl_car(v5);
   v5 = ecl_cdr(v5);
   v6var = v9;
  }
  if (Null(v5)){
   goto L17;
  }
  {
   cl_object v9;
   v9 = ecl_car(v5);
   v5 = ecl_cdr(v5);
   v7package = v9;
   goto L16;
  }
L17:;
  v7package = ECL_SYM("*PACKAGE*",45);
L16:;
  if (Null(v5)){
   goto L23;
  }
  {
   cl_object v9;
   v9 = ecl_car(v5);
   v5 = ecl_cdr(v5);
   v8result_form = v9;
   goto L22;
  }
L23:;
  v8result_form = ECL_NIL;
L22:;
  if (Null(v5)){
   goto L28;
  }
  si_dm_too_many_arguments(v1);
L28:;
  value0 = L359expand_do_symbols(v6var, v7package, v8result_form, v3, VV[25]);
  return value0;
 }
}
static cl_object LC361do_external_symbols_va(cl_narg narg, cl_object v9, cl_object v10, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[26]);
 {
  return LC361do_external_symbols(v9, v10);
 }
}
/* local function DO-ALL-SYMBOLS                                              */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC362do_all_symbols(cl_object v1, cl_object v2)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4;
  cl_object v5;
  cl_object v6var;
  cl_object v7result_form;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v8;
   v8 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4 = v8;
  }
  v5 = v4;
  if (!(v5==ECL_NIL)){
   goto L11;
  }
  si_dm_too_few_arguments(v1);
L11:;
  {
   cl_object v8;
   v8 = ecl_car(v5);
   v5 = ecl_cdr(v5);
   v6var = v8;
  }
  if (Null(v5)){
   goto L17;
  }
  {
   cl_object v8;
   v8 = ecl_car(v5);
   v5 = ecl_cdr(v5);
   v7result_form = v8;
   goto L16;
  }
L17:;
  v7result_form = ECL_NIL;
L16:;
  if (Null(v5)){
   goto L22;
  }
  si_dm_too_many_arguments(v1);
L22:;
  value0 = L359expand_do_symbols(v6var, VV[27], v7result_form, v3, VV[28]);
  return value0;
 }
}
static cl_object LC362do_all_symbols_va(cl_narg narg, cl_object v8, cl_object v9, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[29]);
 {
  return LC362do_all_symbols(v8, v9);
 }
}
/* function definition for PRINT-SYMBOL-APROPOS                               */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L363print_symbol_apropos(cl_object v1symbol)
{
 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_prin1(1, v1symbol);
 if (Null(cl_fboundp(v1symbol))){
  goto L3;
 }
 if (Null(cl_special_operator_p(v1symbol))){
  goto L5;
 }
 ecl_princ(VV[31],ECL_NIL);
 goto L3;
L5:;
 if (Null(cl_macro_function(1, v1symbol))){
  goto L7;
 }
 ecl_princ(VV[32],ECL_NIL);
 goto L3;
L7:;
 ecl_princ(VV[33],ECL_NIL);
L3:;
 if (!(ecl_boundp(cl_env_copy,v1symbol))){
  goto L9;
 }
 if (Null(cl_constantp(1, v1symbol))){
  goto L12;
 }
 ecl_princ(VV[34],ECL_NIL);
 goto L11;
L12:;
 ecl_princ(VV[35],ECL_NIL);
L11:;
 T0 = cl_symbol_value(v1symbol);
 cl_prin1(1, T0);
L9:;
 value0 = cl_terpri(0);
 return value0;
}
static cl_object L363print_symbol_apropos_va(cl_narg narg, cl_object v2symbol, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[30]);
 {
  return L363print_symbol_apropos(v2symbol);
 }
}
/* function definition for APROPOS                                            */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_apropos(cl_narg narg, cl_object v1string, ...)
{
 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("APROPOS",92));
 if (ecl_unlikely(narg>2)) FEwrong_num_arguments(ECL_SYM("APROPOS",92));
 {
  cl_object v2package;
  va_list args; va_start(args,v1string);
  {
   int i = 1;
   if (i >= narg) {
    v2package = ECL_NIL;
   } else {
    i++;
    v2package = va_arg(args,cl_object);
   }
  }
  va_end(args);
  v1string = cl_string(v1string);
  {
   cl_object v3;
   v3 = (VV[30]->symbol.gfdef);
   {
    cl_object v4;
    v4 = cl_apropos_list(2, v1string, v2package);
    {
     cl_object v5;
     cl_object v6;
     cl_object v7;
     v5 = v4;
     v6 = ECL_NIL;
     v7 = v5;
L10:;
     if (!(ecl_endp(v7))){
      goto L12;
     }
     goto L11;
L12:;
     v6 = ECL_CONS_CAR(v7);
     {
      cl_object v8;
      v8 = ECL_CONS_CDR(v7);
      if (ecl_unlikely(!ECL_LISTP(v8))) FEtype_error_list(v8);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
      v7 = v8;
     }
     ecl_function_dispatch(cl_env_copy,v3)(1, v6);
     goto L10;
L11:;
     goto L4;
    }
   }
  }
L4:;
  value0 = ECL_NIL;
  cl_env_copy->nvalues = 0;
  return value0;
 }
}
/* function definition for APROPOS-LIST                                       */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_apropos_list(cl_narg narg, cl_object v1string, ...)
{
 cl_object T0, T1, T2;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
 if (ecl_unlikely(narg<1)) FEwrong_num_arguments(ECL_SYM("APROPOS-LIST",93));
 if (ecl_unlikely(narg>2)) FEwrong_num_arguments(ECL_SYM("APROPOS-LIST",93));
 {
  cl_object v2package;
  va_list args; va_start(args,v1string);
  {
   int i = 1;
   if (i >= narg) {
    v2package = ECL_NIL;
   } else {
    i++;
    v2package = va_arg(args,cl_object);
   }
  }
  va_end(args);
  T0 = L365apropos_list_inner(v1string, v2package);
  T1 = cl_delete_duplicates(1, T0);
  {
   cl_object v3;
   v3 = ecl_make_cfun_va((cl_objectfn)LC364__lambda128_va,ECL_NIL,Cblock,2);
   T2 = v3;
  }
  value0 = cl_sort(2, T1, T2);
  return value0;
 }
}
/* function definition for APROPOS-LIST-INNER                                 */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L365apropos_list_inner(cl_object v1string, cl_object v2package)
{
 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 v3list;
  cl_object v4string;
  v3list = ECL_NIL;
  v4string = cl_string(v1string);
  if (Null(v2package)){
   goto L5;
  }
  {
   cl_object v5;
   v5 = cl_package_use_list(v2package);
   goto L11;
L10:;
   {
    cl_object v6p;
    v6p = ecl_car(v5);
    T0 = L365apropos_list_inner(v4string, v6p);
    v3list = ecl_nconc(T0,v3list);
   }
   v5 = ecl_cdr(v5);
L11:;
   if (Null(v5)){
    goto L19;
   }
   goto L10;
L19:;
  }
  {
   cl_object v5;
   cl_object v6;
   cl_object v7symbol;
   v5 = si_packages_iterator(v2package, VV[23], ECL_T);
   v6 = ECL_NIL;
   v7symbol = ECL_NIL;
   goto L26;
L25:;
   value0 = ecl_function_dispatch(cl_env_copy,v5)(0);
   {
    const int v8 = cl_env_copy->nvalues;
    v6 = value0;
    cl_object v9;
    v9 = (v8<=1)? ECL_NIL : cl_env_copy->values[1];
    v7symbol = v9;
   }
   if (v6!=ECL_NIL) {
    goto L30;
   }
   goto L4;
L30:;
   T0 = cl_string(v7symbol);
   T1 = (ECL_SYM("CHAR-EQUAL",209)->symbol.gfdef);
   if (Null(cl_search(4, v4string, T0, ECL_SYM("TEST",1353), T1))){
    goto L32;
   }
   v3list = CONS(v7symbol,v3list);
L32:;
L26:;
   goto L25;
   goto L4;
  }
L5:;
  {
   cl_object v8;
   cl_object v9;
   cl_object v10symbol;
   T0 = cl_list_all_packages();
   v8 = si_packages_iterator(T0, VV[28], ECL_T);
   v9 = ECL_NIL;
   v10symbol = ECL_NIL;
   goto L42;
L41:;
   value0 = ecl_function_dispatch(cl_env_copy,v8)(0);
   {
    const int v11 = cl_env_copy->nvalues;
    v9 = value0;
    cl_object v12;
    v12 = (v11<=1)? ECL_NIL : cl_env_copy->values[1];
    v10symbol = v12;
   }
   if (v9!=ECL_NIL) {
    goto L46;
   }
   goto L4;
L46:;
   T0 = cl_string(v10symbol);
   T1 = (ECL_SYM("CHAR-EQUAL",209)->symbol.gfdef);
   if (Null(cl_search(4, v4string, T0, ECL_SYM("TEST",1353), T1))){
    goto L48;
   }
   v3list = CONS(v10symbol,v3list);
L48:;
L42:;
   goto L41;
  }
L4:;
  value0 = v3list;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
/* function definition for ADD-PACKAGE-LOCAL-NICKNAME                         */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L366add_package_local_nickname(cl_narg narg, cl_object v1local_nickname, cl_object v2nicknamed_package, ...)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
 if (ecl_unlikely(narg<2)) FEwrong_num_arguments(VV[40]);
 if (ecl_unlikely(narg>3)) FEwrong_num_arguments(VV[40]);
 {
  cl_object v3package;
  va_list args; va_start(args,v2nicknamed_package);
  {
   int i = 2;
   if (i >= narg) {
    v3package = ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("*PACKAGE*",45));
   } else {
    i++;
    v3package = va_arg(args,cl_object);
   }
  }
  va_end(args);
  value0 = (cl_env_copy->function=ecl_fdefinition(ECL_SYM("%ADD-PACKAGE-LOCAL-NICKNAME",1139)))->cfun.entry(3, v1local_nickname, v2nicknamed_package, v3package) /*  %ADD-PACKAGE-LOCAL-NICKNAME */;
  return value0;
 }
}
/* function definition for REMOVE-PACKAGE-LOCAL-NICKNAME                      */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L367remove_package_local_nickname(cl_narg narg, cl_object v1old_nickname, ...)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
 if (ecl_unlikely(narg<1)) FEwrong_num_arguments(VV[41]);
 if (ecl_unlikely(narg>2)) FEwrong_num_arguments(VV[41]);
 {
  cl_object v2package;
  va_list args; va_start(args,v1old_nickname);
  {
   int i = 1;
   if (i >= narg) {
    v2package = ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("*PACKAGE*",45));
   } else {
    i++;
    v2package = va_arg(args,cl_object);
   }
  }
  va_end(args);
  value0 = (cl_env_copy->function=ecl_fdefinition(ECL_SYM("%REMOVE-PACKAGE-LOCAL-NICKNAME",1140)))->cfun.entry(2, v1old_nickname, v2package) /*  %REMOVE-PACKAGE-LOCAL-NICKNAME */;
  return value0;
 }
}
/* closure LAMBDA6                                                            */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC355__lambda6(cl_narg narg, cl_object v1p, ...)
{
 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;                                     /*  SYMBOL-NAME             */
 { /* ... closure scanning finished */
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[0]);
 {
L1:;
  {
   cl_object v2;                                  /*  S                       */
   cl_object v3;                                  /*  I                       */
   value0 = cl_find_symbol(2, ECL_CONS_CAR(CLV0), v1p);
   {
    v2 = value0;
    v3 = cl_env_copy->values[1];
   }
   if ((v3)==(ECL_SYM("INTERNAL",1293))) {
    goto L5;
   }
   if (!((v3)==(ECL_SYM("EXTERNAL",1266)))){
    goto L3;
   }
   goto L4;
L5:;
L4:;
   value0 = ecl_list1(v2);
   cl_env_copy->nvalues = 1;
   return value0;
L3:;
   value0 = ECL_NIL;
   cl_env_copy->nvalues = 1;
   return value0;
  }
 }
 }
}
/* local function LAMBDA52                                                    */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC356__lambda52()
{
 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_env_copy->nvalues = 4;
 cl_env_copy->values[3] = ECL_NIL;
 cl_env_copy->values[2] = ECL_NIL;
 cl_env_copy->values[1] = ECL_NIL;
 cl_env_copy->values[0] = ECL_NIL;
 return cl_env_copy->values[0];
}
static cl_object LC356__lambda52_va(cl_narg narg, ...)
{
 if (ecl_unlikely(narg!=0)) FEwrong_num_arguments(VV[7]);
 {
  return LC356__lambda52();
 }
}
/* closure ITERATE                                                            */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC357iterate(cl_narg narg, ...)
{
 cl_object T0;
 cl_object CLV0, CLV1, CLV2, CLV3, CLV4;
 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 ... */
 CLV4 = env0;                                     /*  ITERATOR                */
 CLV3 = _ecl_cdr(CLV4);
 CLV2 = _ecl_cdr(CLV3);
 CLV1 = _ecl_cdr(CLV2);
 CLV0 = _ecl_cdr(CLV1);
 { /* ... closure scanning finished */
 if (ecl_unlikely(narg!=0)) FEwrong_num_arguments(VV[11]);
 {
L1:;
L2:;
  {
   cl_object v1;                                  /*  FOUND                   */
   cl_object v2;                                  /*  KEY                     */
   cl_object v3;                                  /*  VALUE                   */
   value0 = ecl_function_dispatch(cl_env_copy,ECL_CONS_CAR(CLV4))(0);
   {
    const int v4 = cl_env_copy->nvalues;
    v1 = value0;
    cl_object v5;
    v5 = (v4<=1)? ECL_NIL : cl_env_copy->values[1];
    v2 = v5;
    v5 = (v4<=2)? ECL_NIL : cl_env_copy->values[2];
    v3 = v5;
   }
   if (Null(v1)){
    goto L5;
   }
   T0 = ECL_CONS_CAR(CLV3);
   if (!((T0)==(ECL_SYM("INHERITED",1285)))){
    goto L7;
   }
   {
    cl_object v4;                                 /*  S                       */
    cl_object v5;                                 /*  ACCESS                  */
    T0 = ecl_symbol_name(v3);
    value0 = cl_find_symbol(2, T0, ECL_CONS_CAR(CLV2));
    {
     v4 = value0;
     v5 = cl_env_copy->values[1];
    }
    if (!((v4)==(v3))){
     goto L13;
    }
    if ((v5)==(ECL_CONS_CAR(CLV3))) {
     goto L7;
    }
    goto L11;
L13:;
    goto L11;
L11:;
    goto L2;
   }
L7:;
   T0 = ECL_CONS_CAR(CLV3);
   cl_env_copy->nvalues = 4;
   cl_env_copy->values[3] = ECL_CONS_CAR(CLV2);
   cl_env_copy->values[2] = T0;
   cl_env_copy->values[1] = v3;
   cl_env_copy->values[0] = ECL_T;
   return cl_env_copy->values[0];
L5:;
   if (!(ECL_CONS_CAR(CLV0)==ECL_NIL)){
    goto L16;
   }
   cl_env_copy->nvalues = 4;
   cl_env_copy->values[3] = ECL_NIL;
   cl_env_copy->values[2] = ECL_NIL;
   cl_env_copy->values[1] = ECL_NIL;
   cl_env_copy->values[0] = ECL_NIL;
   return cl_env_copy->values[0];
L16:;
   {
    cl_object v4;
    v4 = ECL_CONS_CAR(CLV0);
    {
     cl_object v5;
     v5 = v4;
     {
      bool v6;
      v6 = ECL_LISTP(v5);
      if (ecl_unlikely(!(v6)))
         FEwrong_type_argument(VV[10],v5);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
     }
    }
    if (Null(v4)){
     goto L24;
    }
    {
     cl_object v5;
     v5 = ECL_CONS_CDR(v4);
     ECL_CONS_CAR(CLV0) = v5;
     v4 = ECL_CONS_CAR(v4);
    }
L24:;
    ECL_CONS_CAR(CLV1) = v4;
   }
   ECL_CONS_CAR(CLV2) = ecl_car(ECL_CONS_CAR(CLV1));
   ECL_CONS_CAR(CLV3) = ecl_cadr(ECL_CONS_CAR(CLV1));
   T0 = ecl_caddr(ECL_CONS_CAR(CLV1));
   ECL_CONS_CAR(CLV4) = si_hash_table_iterator(T0);
  }
  goto L2;
 }
 }
}
/* local function LAMBDA128                                                   */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC364__lambda128(cl_object v1s1, cl_object v2s2)
{
 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:;
 T0 = cl_prin1_to_string(v1s1);
 T1 = cl_prin1_to_string(v2s2);
 value0 = cl_string_lessp(2, T0, T1);
 return value0;
}
static cl_object LC364__lambda128_va(cl_narg narg, cl_object v3s1, cl_object v4s2, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[39]);
 {
  return LC364__lambda128(v3s1, v4s2);
 }
}
#include "lsp/packlib.data"
#ifdef __cplusplus
extern "C"
#endif

ECL_DLLEXPORT void _eclYut87CEiaxyl9_KoizL881(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;PACKLIB.LSP.NEWEST",-1);
 return;}
 #ifdef ECL_DYNAMIC_VV
 VV = Cblock->cblock.data;
 #endif
 Cblock->cblock.data_text = (const cl_object *)"@EcLtAg:_eclYut87CEiaxyl9_KoizL881@";
 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 FIND-ALL-SYMBOLS */
  ecl_cmp_defun(VV[42]);                          /*  PACKAGES-ITERATOR       */
  ecl_cmp_defmacro(VV[43]);                       /*  WITH-PACKAGE-ITERATOR   */
  (void)0; /* No entry created for EXPAND-DO-SYMBOLS */
  ecl_cmp_defmacro(VV[44]);                       /*  DO-SYMBOLS              */
  ecl_cmp_defmacro(VV[45]);                       /*  DO-EXTERNAL-SYMBOLS     */
  ecl_cmp_defmacro(VV[46]);                       /*  DO-ALL-SYMBOLS          */
  ecl_cmp_defun(VV[47]);                          /*  PRINT-SYMBOL-APROPOS    */
  (void)0; /* No entry created for APROPOS */
  (void)0; /* No entry created for APROPOS-LIST */
  (void)0; /* No entry created for APROPOS-LIST-INNER */
  ecl_cmp_defun(VV[48]);                          /*  ADD-PACKAGE-LOCAL-NICKNAME */
  ecl_cmp_defun(VV[49]);                          /*  REMOVE-PACKAGE-LOCAL-NICKNAME */
}
