/* Compiler: ECL 26.3.27                                                      */
/* Source: /build/ecl/src/ecl-26.3.27/src/lsp/defpackage.lsp                  */
#include <ecl/ecl-cmp.h>
#include "lsp/defpackage.eclh"
/* local function DEFPACKAGE                                                  */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC657defpackage(cl_object v1, cl_object v2)
{
 cl_object T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4name;
  v3 = ecl_cdr(v1);
  {
   cl_object v5;
   if (!(v3==ECL_NIL)){
    goto L5;
   }
   si_dm_too_few_arguments(v1);
L5:;
   {
    cl_object v6;
    v6 = ecl_car(v3);
    v3 = ecl_cdr(v3);
    v5 = v6;
   }
   value0 = ecl_make_bool(ECL_SYMBOLP(v5));
   if (value0!=ECL_NIL) {
    goto L13;
   }
   value0 = ecl_make_bool(ECL_STRINGP(v5));
   if (value0!=ECL_NIL) {
    goto L13;
   }
   T0 = ecl_make_bool(ECL_CHARACTERP(v5));
   goto L11;
L13:;
   T0 = value0;
   goto L11;
L11:;
   if (ecl_unlikely(!((T0)!=ECL_NIL)))
         FEwrong_type_argument(VV[1],v5);
   value0 = ECL_NIL;
   cl_env_copy->nvalues = 0;
   v4name = v5;
  }
  {
   cl_object v5nicknames;
   cl_object v6documentation;
   cl_object v7size;
   cl_object v8shadowed_symbol_names;
   cl_object v9interned_symbol_names;
   cl_object v10exported_symbol_names;
   cl_object v11shadowing_imported_from_symbol_names_list;
   cl_object v12imported_from_symbol_names_list;
   cl_object v13exported_from_package_names;
   cl_object v14use;
   cl_object v15use_p;
   cl_object v16lock;
   cl_object v17local_nicknames;
   v5nicknames = ECL_NIL;
   v6documentation = ECL_NIL;
   v7size = ECL_NIL;
   v8shadowed_symbol_names = ECL_NIL;
   v9interned_symbol_names = ECL_NIL;
   v10exported_symbol_names = ECL_NIL;
   v11shadowing_imported_from_symbol_names_list = ECL_NIL;
   v12imported_from_symbol_names_list = ECL_NIL;
   v13exported_from_package_names = ECL_NIL;
   v14use = ECL_NIL;
   v15use_p = ECL_NIL;
   v16lock = ECL_NIL;
   v17local_nicknames = ECL_NIL;
   {
    cl_object v18;
    v18 = v3;
    goto L33;
L32:;
    {
     cl_object v19option;
     v19option = ecl_car(v18);
     {
      cl_object v20;
      v20 = ecl_car(v19option);
      if (!((v20)==(ECL_SYM("NICKNAMES",1313)))){
       goto L39;
      }
      T1 = ecl_cdr(v19option);
      T0 = LC655designators(T1);
      v5nicknames = ecl_append(v5nicknames,T0);
      goto L37;
L39:;
      if (!((v20)==(ECL_SYM("DOCUMENTATION",1253)))){
       goto L43;
      }
      if (Null(v6documentation)){
       goto L45;
      }
      si_simple_program_error(1, VV[8]);
L45:;
      v6documentation = ecl_cadr(v19option);
      goto L37;
L43:;
      if (!((v20)==(ECL_SYM("USE",1361)))){
       goto L48;
      }
      T1 = ecl_cdr(v19option);
      T0 = LC655designators(T1);
      v14use = ecl_append(v14use,T0);
      v15use_p = ECL_T;
      goto L37;
L48:;
      if (!((v20)==(ECL_SYM("SHADOW",1343)))){
       goto L54;
      }
      T1 = ecl_cdr(v19option);
      T0 = LC655designators(T1);
      v8shadowed_symbol_names = ecl_append(v8shadowed_symbol_names,T0);
      goto L37;
L54:;
      if (!((v20)==(ECL_SYM("INTERN",1292)))){
       goto L58;
      }
      T1 = ecl_cdr(v19option);
      T0 = LC655designators(T1);
      v9interned_symbol_names = ecl_append(v9interned_symbol_names,T0);
      goto L37;
L58:;
      if (!((v20)==(ECL_SYM("EXPORT",1264)))){
       goto L62;
      }
      T1 = ecl_cdr(v19option);
      T0 = LC655designators(T1);
      v10exported_symbol_names = ecl_append(v10exported_symbol_names,T0);
      goto L37;
L62:;
      if (!((v20)==(VV[9]))){
       goto L66;
      }
      {
       cl_object v21;
       cl_object v22;
       cl_object v23package_name;
       T0 = ecl_cdr(v19option);
       v21 = LC655designators(T0);
       v22 = v21;
       if (!(v22==ECL_NIL)){
        goto L71;
       }
       si_dm_too_few_arguments(v21);
L71:;
       {
        cl_object v24;
        v24 = ecl_car(v22);
        v22 = ecl_cdr(v22);
        v23package_name = v24;
       }
       {
        cl_object v24assoc;
        {
         cl_object v25;
         v25 = (ECL_SYM("STRING=",825)->symbol.gfdef);
         {
          cl_object v26;
          v26 = v11shadowing_imported_from_symbol_names_list;
          goto L81;
L80:;
          {
          cl_object v27;
          cl_object v28;
          {
          cl_object v29;
          v29 = v26;
          if (ecl_unlikely(ECL_ATOM(v29))) FEtype_error_cons(v29);
          value0 = ECL_NIL;
          cl_env_copy->nvalues = 0;
          v27 = v29;
          }
          v28 = ECL_CONS_CAR(v27);
          if (Null(v28)){
          goto L83;
          }
          {
          cl_object v29;
          {
          cl_object v30;
          v30 = v28;
          if (ecl_unlikely(ECL_ATOM(v30))) FEtype_error_cons(v30);
          value0 = ECL_NIL;
          cl_env_copy->nvalues = 0;
          T0 = v30;
          }
          v29 = ECL_CONS_CAR(T0);
          if (Null(cl_stringE(2, v23package_name, v29))){
          goto L83;
          }
          v24assoc = v28;
          goto L76;
          }
          }
L83:;
          v26 = ECL_CONS_CDR(v26);
L81:;
          if (v26==ECL_NIL) {
          goto L96;
          }
          goto L80;
L96:;
          v24assoc = ECL_NIL;
         }
        }
L76:;
        if (Null(v24assoc)){
         goto L98;
        }
        {
         cl_object v25;
         T0 = ecl_cdr(v24assoc);
         v25 = ecl_append(T0,v22);
         {
          cl_object v26;
          v26 = v24assoc;
          if (ecl_unlikely(ECL_ATOM(v26))) FEtype_error_cons(v26);
          value0 = ECL_NIL;
          cl_env_copy->nvalues = 0;
          T0 = v26;
         }
         (ECL_CONS_CDR(T0)=v25,T0);
         goto L37;
        }
L98:;
        v11shadowing_imported_from_symbol_names_list = cl_acons(v23package_name, v22, v11shadowing_imported_from_symbol_names_list);
        goto L37;
       }
      }
L66:;
      if (!((v20)==(ECL_SYM("IMPORT-FROM",1283)))){
       goto L106;
      }
      {
       cl_object v26;
       cl_object v27;
       cl_object v28package_name;
       T0 = ecl_cdr(v19option);
       v26 = LC655designators(T0);
       v27 = v26;
       if (!(v27==ECL_NIL)){
        goto L111;
       }
       si_dm_too_few_arguments(v26);
L111:;
       {
        cl_object v29;
        v29 = ecl_car(v27);
        v27 = ecl_cdr(v27);
        v28package_name = v29;
       }
       {
        cl_object v29assoc;
        {
         cl_object v30;
         v30 = (ECL_SYM("STRING=",825)->symbol.gfdef);
         {
          cl_object v31;
          v31 = v12imported_from_symbol_names_list;
          goto L121;
L120:;
          {
          cl_object v32;
          cl_object v33;
          {
          cl_object v34;
          v34 = v31;
          if (ecl_unlikely(ECL_ATOM(v34))) FEtype_error_cons(v34);
          value0 = ECL_NIL;
          cl_env_copy->nvalues = 0;
          v32 = v34;
          }
          v33 = ECL_CONS_CAR(v32);
          if (Null(v33)){
          goto L123;
          }
          {
          cl_object v34;
          {
          cl_object v35;
          v35 = v33;
          if (ecl_unlikely(ECL_ATOM(v35))) FEtype_error_cons(v35);
          value0 = ECL_NIL;
          cl_env_copy->nvalues = 0;
          T0 = v35;
          }
          v34 = ECL_CONS_CAR(T0);
          if (Null(cl_stringE(2, v28package_name, v34))){
          goto L123;
          }
          v29assoc = v33;
          goto L116;
          }
          }
L123:;
          v31 = ECL_CONS_CDR(v31);
L121:;
          if (v31==ECL_NIL) {
          goto L136;
          }
          goto L120;
L136:;
          v29assoc = ECL_NIL;
         }
        }
L116:;
        if (Null(v29assoc)){
         goto L138;
        }
        {
         cl_object v30;
         T0 = ecl_cdr(v29assoc);
         v30 = ecl_append(T0,v27);
         {
          cl_object v31;
          v31 = v29assoc;
          if (ecl_unlikely(ECL_ATOM(v31))) FEtype_error_cons(v31);
          value0 = ECL_NIL;
          cl_env_copy->nvalues = 0;
          T0 = v31;
         }
         (ECL_CONS_CDR(T0)=v30,T0);
         goto L37;
        }
L138:;
        v12imported_from_symbol_names_list = cl_acons(v28package_name, v27, v12imported_from_symbol_names_list);
        goto L37;
       }
      }
L106:;
      if (!((v20)==(ECL_SYM("SIZE",1345)))){
       goto L146;
      }
      if (Null(v7size)){
       goto L148;
      }
      si_simple_program_error(1, VV[13]);
L148:;
      v7size = ecl_cadr(v19option);
      goto L37;
L146:;
      if (!((v20)==(ECL_SYM("EXPORT-FROM",1265)))){
       goto L151;
      }
      T1 = ecl_cdr(v19option);
      T0 = LC655designators(T1);
      v13exported_from_package_names = ecl_append(v13exported_from_package_names,T0);
      goto L37;
L151:;
      if (!((v20)==(VV[14]))){
       goto L155;
      }
      if (Null(v16lock)){
       goto L37;
      }
      si_simple_program_error(1, VV[15]);
      v16lock = ecl_cadr(v19option);
      goto L37;
L155:;
      if (!((v20)==(ECL_SYM("LOCAL-NICKNAMES",1304)))){
       goto L160;
      }
      {
       cl_object v31;
       {
        cl_object v32;
        v32 = ecl_make_cfun_va((cl_objectfn)LC656__lambda277_va,ECL_NIL,Cblock,1);
        v31 = v32;
       }
       {
        cl_object v32;
        cl_object v33;
        cl_object v34;
        {
         cl_object v35;
         v35 = ecl_cdr(v19option);
         if (ecl_unlikely(!ECL_LISTP(v35))) FEtype_error_list(v35);
         value0 = ECL_NIL;
         cl_env_copy->nvalues = 0;
         v32 = v35;
        }
        v33 = ECL_NIL;
        v34 = v32;
        {
         cl_object v35;
         cl_object v36;
         v35 = ecl_list1(ECL_NIL);
         v36 = v35;
L172:;
         if (!(ecl_endp(v34))){
          goto L174;
         }
         goto L173;
L174:;
         v33 = ECL_CONS_CAR(v34);
         {
          cl_object v37;
          v37 = ECL_CONS_CDR(v34);
          if (ecl_unlikely(!ECL_LISTP(v37))) FEtype_error_list(v37);
          value0 = ECL_NIL;
          cl_env_copy->nvalues = 0;
          v34 = v37;
         }
         {
          cl_object v37;
          v37 = v36;
          if (ecl_unlikely(ECL_ATOM(v37))) FEtype_error_cons(v37);
          value0 = ECL_NIL;
          cl_env_copy->nvalues = 0;
          T1 = v37;
         }
         T2 = ecl_function_dispatch(cl_env_copy,v31)(1, v33);
         v36 = ecl_list1(T2);
         (ECL_CONS_CDR(T1)=v36,T1);
         goto L172;
L173:;
         T0 = ecl_cdr(v35);
         goto L163;
        }
       }
      }
L163:;
      v17local_nicknames = ecl_append(v17local_nicknames,T0);
      goto L37;
L160:;
      cl_cerror(3, VV[18], VV[19], v19option);
     }
L37:;
    }
    v18 = ecl_cdr(v18);
L33:;
    if (Null(v18)){
     goto L192;
    }
    goto L32;
L192:;
   }
   T0 = CONS(ECL_SYM("INTERN",1292),v9interned_symbol_names);
   T1 = CONS(ECL_SYM("EXPORT",1264),v10exported_symbol_names);
   L658check_disjoint(2, T0, T1);
   T0 = CONS(ECL_SYM("INTERN",1292),v9interned_symbol_names);
   T1 = (ECL_SYM("APPEND",90)->symbol.gfdef);
   {
    cl_object v18;
    v18 = (ECL_SYM("REST",722)->symbol.gfdef);
    {
     cl_object v19;
     cl_object v20;
     cl_object v21;
     {
      cl_object v22;
      v22 = v12imported_from_symbol_names_list;
      if (ecl_unlikely(!ECL_LISTP(v22))) FEtype_error_list(v22);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
      v19 = v22;
     }
     v20 = ECL_NIL;
     v21 = v19;
     {
      cl_object v22;
      cl_object v23;
      v22 = ecl_list1(ECL_NIL);
      v23 = v22;
L206:;
      if (!(ecl_endp(v21))){
       goto L208;
      }
      goto L207;
L208:;
      v20 = ECL_CONS_CAR(v21);
      {
       cl_object v24;
       v24 = ECL_CONS_CDR(v21);
       if (ecl_unlikely(!ECL_LISTP(v24))) FEtype_error_list(v24);
       value0 = ECL_NIL;
       cl_env_copy->nvalues = 0;
       v21 = v24;
      }
      {
       cl_object v24;
       v24 = v23;
       if (ecl_unlikely(ECL_ATOM(v24))) FEtype_error_cons(v24);
       value0 = ECL_NIL;
       cl_env_copy->nvalues = 0;
       T3 = v24;
      }
      T4 = ecl_function_dispatch(cl_env_copy,v18)(1, v20);
      v23 = ecl_list1(T4);
      (ECL_CONS_CDR(T3)=v23,T3);
      goto L206;
L207:;
      T2 = ecl_cdr(v22);
      goto L197;
     }
    }
   }
L197:;
   T3 = cl_apply(2, T1, T2);
   T4 = CONS(ECL_SYM("IMPORT-FROM",1283),T3);
   T5 = CONS(ECL_SYM("SHADOW",1343),v8shadowed_symbol_names);
   T6 = (ECL_SYM("APPEND",90)->symbol.gfdef);
   {
    cl_object v18;
    v18 = (ECL_SYM("REST",722)->symbol.gfdef);
    {
     cl_object v19;
     cl_object v20;
     cl_object v21;
     {
      cl_object v22;
      v22 = v11shadowing_imported_from_symbol_names_list;
      if (ecl_unlikely(!ECL_LISTP(v22))) FEtype_error_list(v22);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
      v19 = v22;
     }
     v20 = ECL_NIL;
     v21 = v19;
     {
      cl_object v22;
      cl_object v23;
      v22 = ecl_list1(ECL_NIL);
      v23 = v22;
L234:;
      if (!(ecl_endp(v21))){
       goto L236;
      }
      goto L235;
L236:;
      v20 = ECL_CONS_CAR(v21);
      {
       cl_object v24;
       v24 = ECL_CONS_CDR(v21);
       if (ecl_unlikely(!ECL_LISTP(v24))) FEtype_error_list(v24);
       value0 = ECL_NIL;
       cl_env_copy->nvalues = 0;
       v21 = v24;
      }
      {
       cl_object v24;
       v24 = v23;
       if (ecl_unlikely(ECL_ATOM(v24))) FEtype_error_cons(v24);
       value0 = ECL_NIL;
       cl_env_copy->nvalues = 0;
       T8 = v24;
      }
      T9 = ecl_function_dispatch(cl_env_copy,v18)(1, v20);
      v23 = ecl_list1(T9);
      (ECL_CONS_CDR(T8)=v23,T8);
      goto L234;
L235:;
      T7 = ecl_cdr(v22);
      goto L225;
     }
    }
   }
L225:;
   T8 = cl_apply(2, T6, T7);
   T9 = CONS(VV[9],T8);
   L658check_disjoint(4, T0, T4, T5, T9);
   T0 = cl_string(v4name);
   T1 = cl_list(2, ECL_SYM("QUOTE",682), v5nicknames);
   {
    cl_object v18;
    cl_object v19;
    v18 = VV[14];
    v19 = v3;
    T2 = ecl_assql(v18,v19);
   }
   T3 = ecl_cadr(T2);
   if (Null(v15use_p)){
    goto L256;
   }
   T4 = v14use;
   goto L255;
L256:;
   T4 = VV[23];
L255:;
   T5 = cl_list(2, ECL_SYM("QUOTE",682), T4);
   T6 = cl_list(2, ECL_SYM("QUOTE",682), v17local_nicknames);
   T7 = cl_list(2, ECL_SYM("QUOTE",682), v8shadowed_symbol_names);
   T8 = cl_list(2, ECL_SYM("QUOTE",682), v9interned_symbol_names);
   T9 = cl_list(2, ECL_SYM("QUOTE",682), v10exported_symbol_names);
   T10 = cl_list(2, ECL_SYM("QUOTE",682), v11shadowing_imported_from_symbol_names_list);
   T11 = cl_list(2, ECL_SYM("QUOTE",682), v12imported_from_symbol_names_list);
   T12 = cl_list(2, ECL_SYM("QUOTE",682), v13exported_from_package_names);
   T13 = cl_list(13, VV[22], T0, T1, v6documentation, T3, T5, T6, T7, T8, T9, T10, T11, T12);
   value0 = cl_list(3, ECL_SYM("EVAL-WHEN",342), VV[21], T13);
   return value0;
  }
 }
}
static cl_object LC657defpackage_va(cl_narg narg, cl_object v18, cl_object v19, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[24]);
 {
  return LC657defpackage(v18, v19);
 }
}
/* function definition for CHECK-DISJOINT                                     */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L658check_disjoint(cl_narg narg, ...)
{
 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);
 {
  cl_object v1args;
  ecl_va_list args; ecl_va_start(args,narg,narg,0);
  v1args = cl_grab_rest_args(args);
  ecl_va_end(args);
  {
   cl_object v2list;
   v2list = v1args;
   goto L4;
L3:;
   {
    cl_object v3x;
    v3x = ecl_car(v2list);
    {
     cl_object v4;
     cl_object v5y;
     cl_object v6;
     {
      cl_object v7;
      v7 = ecl_cdr(v2list);
      if (ecl_unlikely(!ECL_LISTP(v7))) FEtype_error_list(v7);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
      v4 = v7;
     }
     v5y = ECL_NIL;
     v6 = v4;
     {
      cl_object v7z;
      v7z = ECL_NIL;
L14:;
      if (!(ecl_endp(v6))){
       goto L16;
      }
      goto L15;
L16:;
      v5y = ECL_CONS_CAR(v6);
      {
       cl_object v8;
       v8 = ECL_CONS_CDR(v6);
       if (ecl_unlikely(!ECL_LISTP(v8))) FEtype_error_list(v8);
       value0 = ECL_NIL;
       cl_env_copy->nvalues = 0;
       v6 = v8;
      }
      T0 = ecl_cdr(v3x);
      T1 = ecl_cdr(v5y);
      T2 = (ECL_SYM("STRING=",825)->symbol.gfdef);
      T3 = cl_intersection(4, T0, T1, ECL_SYM("TEST",1353), T2);
      v7z = cl_remove_duplicates(1, T3);
      if (Null(v7z)){
       goto L27;
      }
      T0 = ecl_car(v3x);
      T1 = ecl_car(v5y);
      T2 = cl_list(3, T0, T1, v7z);
      cl_error(5, ECL_SYM("SIMPLE-PROGRAM-ERROR",1167), ECL_SYM("FORMAT-CONTROL",1272), VV[25], ECL_SYM("FORMAT-ARGUMENTS",1271), T2);
L27:;
      goto L14;
L15:;
     }
    }
   }
   v2list = ecl_cdr(v2list);
L4:;
   if (ecl_endp(v2list)) {
    goto L32;
   }
   goto L3;
L32:;
   value0 = ECL_NIL;
   cl_env_copy->nvalues = 1;
   return value0;
  }
 }
}
/* function definition for DODEFPACKAGE                                       */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L659dodefpackage(cl_object v1name, cl_object v2nicknames, cl_object v3documentation, cl_object v4lock, cl_object v5use, cl_object v6local_nicknames, cl_object v7shadowed_symbol_names, cl_object v8interned_symbol_names, cl_object v9exported_symbol_names, cl_object v10shadowing_imported_from_symbol_names_list, cl_object v11imported_from_symbol_names_list, cl_object v12exported_from_package_names)
{
 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:;
 if (Null(cl_find_package(v1name))){
  goto L3;
 }
 if (Null(v2nicknames)){
  goto L5;
 }
 cl_rename_package(3, v1name, v1name, v2nicknames);
L5:;
 if (Null(v5use)){
  goto L2;
 }
 T0 = cl_find_package(v1name);
 T1 = cl_package_use_list(T0);
 cl_unuse_package(2, T1, v1name);
 goto L2;
L3:;
 cl_make_package(7, v1name, ECL_SYM("USE",1361), ECL_NIL, ECL_SYM("NICKNAMES",1313), v2nicknames, ECL_SYM("LOCAL-NICKNAMES",1304), v6local_nicknames);
L2:;
 T0 = cl_find_package(v1name);
 ecl_bds_bind(cl_env_copy,ECL_SYM("*PACKAGE*",45),T0); /*  *PACKAGE*          */
 if (Null(v3documentation)){
  goto L9;
 }
 {
  cl_object v13;
  v13 = ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("*PACKAGE*",45));
  (cl_env_copy->function=ECL_CONS_CAR(VV[35]))->cfun.entry(3, v3documentation, v13, ECL_T) /*  (SETF DOCUMENTATION) */;
 }
L9:;
 cl_shadow(1, v7shadowed_symbol_names);
 {
  cl_object v13;
  v13 = v10shadowing_imported_from_symbol_names_list;
  goto L17;
L16:;
  {
   cl_object v14item;
   v14item = ecl_car(v13);
   {
    cl_object v15package;
    T0 = ecl_car(v14item);
    v15package = cl_find_package(T0);
    {
     cl_object v16;
     v16 = ecl_cdr(v14item);
     goto L26;
L25:;
     {
      cl_object v17name;
      v17name = ecl_car(v16);
      T0 = L660find_or_make_symbol(v17name, v15package);
      cl_shadowing_import(1, T0);
     }
     v16 = ecl_cdr(v16);
L26:;
     if (Null(v16)){
      goto L33;
     }
     goto L25;
L33:;
    }
   }
  }
  v13 = ecl_cdr(v13);
L17:;
  if (Null(v13)){
   goto L37;
  }
  goto L16;
L37:;
 }
 cl_use_package(1, v5use);
 {
  cl_object v13;
  v13 = v11imported_from_symbol_names_list;
  goto L44;
L43:;
  {
   cl_object v14item;
   v14item = ecl_car(v13);
   {
    cl_object v15package;
    T0 = ecl_car(v14item);
    v15package = cl_find_package(T0);
    {
     cl_object v16;
     v16 = ecl_cdr(v14item);
     goto L53;
L52:;
     {
      cl_object v17name;
      v17name = ecl_car(v16);
      value0 = L660find_or_make_symbol(v17name, v15package);
      if (value0!=ECL_NIL) {
       goto L60;
      }
      T0 = ecl_list1(ECL_NIL);
      goto L58;
L60:;
      T0 = value0;
      goto L58;
L58:;
      cl_import(1, T0);
     }
     v16 = ecl_cdr(v16);
L53:;
     if (Null(v16)){
      goto L64;
     }
     goto L52;
L64:;
    }
   }
  }
  v13 = ecl_cdr(v13);
L44:;
  if (Null(v13)){
   goto L68;
  }
  goto L43;
L68:;
 }
 {
  cl_object v13;
  v13 = (ECL_SYM("INTERN",444)->symbol.gfdef);
  {
   cl_object v14;
   cl_object v15;
   cl_object v16;
   {
    cl_object v17;
    v17 = v8interned_symbol_names;
    if (ecl_unlikely(!ECL_LISTP(v17))) FEtype_error_list(v17);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
    v14 = v17;
   }
   v15 = ECL_NIL;
   v16 = v14;
L77:;
   if (!(ecl_endp(v16))){
    goto L79;
   }
   goto L78;
L79:;
   v15 = ECL_CONS_CAR(v16);
   {
    cl_object v17;
    v17 = ECL_CONS_CDR(v16);
    if (ecl_unlikely(!ECL_LISTP(v17))) FEtype_error_list(v17);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
    v16 = v17;
   }
   ecl_function_dispatch(cl_env_copy,v13)(1, v15);
   goto L77;
L78:;
   goto L70;
  }
 }
L70:;
 {
  cl_object v13;
  v13 = (ECL_SYM("INTERN",444)->symbol.gfdef);
  {
   cl_object v14;
   cl_object v15;
   cl_object v16;
   {
    cl_object v17;
    v17 = v9exported_symbol_names;
    if (ecl_unlikely(!ECL_LISTP(v17))) FEtype_error_list(v17);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
    v14 = v17;
   }
   v15 = ECL_NIL;
   v16 = v14;
   {
    cl_object v17;
    cl_object v18;
    v17 = ecl_list1(ECL_NIL);
    v18 = v17;
L100:;
    if (!(ecl_endp(v16))){
     goto L102;
    }
    goto L101;
L102:;
    v15 = ECL_CONS_CAR(v16);
    {
     cl_object v19;
     v19 = ECL_CONS_CDR(v16);
     if (ecl_unlikely(!ECL_LISTP(v19))) FEtype_error_list(v19);
     value0 = ECL_NIL;
     cl_env_copy->nvalues = 0;
     v16 = v19;
    }
    {
     cl_object v19;
     v19 = v18;
     if (ecl_unlikely(ECL_ATOM(v19))) FEtype_error_cons(v19);
     value0 = ECL_NIL;
     cl_env_copy->nvalues = 0;
     T1 = v19;
    }
    T2 = ecl_function_dispatch(cl_env_copy,v13)(1, v15);
    v18 = ecl_list1(T2);
    (ECL_CONS_CDR(T1)=v18,T1);
    goto L100;
L101:;
    T0 = ecl_cdr(v17);
    goto L91;
   }
  }
 }
L91:;
 cl_export(1, T0);
 {
  cl_object v13;
  v13 = v12exported_from_package_names;
  goto L121;
L120:;
  {
   cl_object v14package;
   v14package = ecl_car(v13);
   {
    cl_object v15;
    cl_object v16;
    cl_object v17symbol;
    T0 = cl_find_package(v14package);
    v15 = si_packages_iterator(T0, VV[29], ECL_T);
    v16 = ECL_NIL;
    v17symbol = ECL_NIL;
    goto L131;
L130:;
    value0 = ecl_function_dispatch(cl_env_copy,v15)(0);
    {
     const int v18 = cl_env_copy->nvalues;
     v16 = value0;
     cl_object v19;
     v19 = (v18<=1)? ECL_NIL : cl_env_copy->values[1];
     v17symbol = v19;
    }
    if (v16!=ECL_NIL) {
     goto L135;
    }
    goto L125;
L135:;
    {
     struct ecl_stack_frame _ecl_inner_frame_aux;
     cl_object _ecl_inner_frame=ecl_stack_frame_open(cl_env_copy,(cl_object)&_ecl_inner_frame_aux,0);
     T1 = cl_string(v17symbol);
     cl_env_copy->values[0] = cl_find_symbol(1, T1);
     ecl_stack_frame_push_values(_ecl_inner_frame);
     T0 = ecl_apply_from_stack_frame(_ecl_inner_frame,ECL_SYM("LIST",483));
     ecl_stack_frame_close(_ecl_inner_frame);
    }
    if (Null(ecl_cadr(T0))){
     goto L137;
    }
    T0 = cl_string(v17symbol);
    T1 = cl_intern(1, T0);
    T2 = ecl_list1(T1);
    cl_export(1, T2);
L137:;
L131:;
    goto L130;
   }
L125:;
  }
  v13 = ecl_cdr(v13);
L121:;
  if (Null(v13)){
   goto L144;
  }
  goto L120;
L144:;
  ecl_bds_unwind1(cl_env_copy);
 }
 if (Null(v4lock)){
  goto L146;
 }
 (cl_env_copy->function=ecl_fdefinition(ECL_SYM("LOCK-PACKAGE",1131)))->cfun.entry(1, v1name) /*  LOCK-PACKAGE */;
L146:;
 value0 = cl_find_package(v1name);
 return value0;
}
static cl_object L659dodefpackage_va(cl_narg narg, cl_object v13name, cl_object v14nicknames, cl_object v15documentation, cl_object v16lock, cl_object v17use, cl_object v18local_nicknames, cl_object v19shadowed_symbol_names, cl_object v20interned_symbol_names, cl_object v21exported_symbol_names, cl_object v22shadowing_imported_from_symbol_names_list, cl_object v23imported_from_symbol_names_list, cl_object v24exported_from_package_names, ...)
{
 if (ecl_unlikely(narg!=12)) FEwrong_num_arguments(VV[22]);
 {
  return L659dodefpackage(v13name, v14nicknames, v15documentation, v16lock, v17use, v18local_nicknames, v19shadowed_symbol_names, v20interned_symbol_names, v21exported_symbol_names, v22shadowing_imported_from_symbol_names_list, v23imported_from_symbol_names_list, v24exported_from_package_names);
 }
}
/* function definition for FIND-OR-MAKE-SYMBOL                                */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L660find_or_make_symbol(cl_object v1name, cl_object v2package)
{
 cl_object T0;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;                                   /*  SYMBOL                  */
  cl_object v4;                                   /*  FOUND                   */
  value0 = cl_find_symbol(2, v1name, v2package);
  {
   v3 = value0;
   v4 = cl_env_copy->values[1];
  }
  if (v4!=ECL_NIL) {
   goto L3;
  }
  T0 = cl_list(2, v1name, v2package);
  si_signal_simple_error(6, ECL_SYM("PACKAGE-ERROR",620), VV[31], VV[32], T0, ECL_SYM("PACKAGE",1321), v2package);
  v3 = cl_intern(2, v1name, v2package);
L3:;
  value0 = v3;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
/* local function DESIGNATORS                                                 */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC655designators(cl_object v1values)
{
 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 v2;
  v2 = (ECL_SYM("STRING",808)->symbol.gfdef);
  {
   cl_object v3;
   cl_object v4;
   cl_object v5;
   {
    cl_object v6;
    v6 = v1values;
    if (ecl_unlikely(!ECL_LISTP(v6))) FEtype_error_list(v6);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
    v3 = v6;
   }
   v4 = ECL_NIL;
   v5 = v3;
   {
    cl_object v6;
    cl_object v7;
    v6 = ecl_list1(ECL_NIL);
    v7 = v6;
L10:;
    if (!(ecl_endp(v5))){
     goto L12;
    }
    goto L11;
L12:;
    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 = v7;
     if (ecl_unlikely(ECL_ATOM(v8))) FEtype_error_cons(v8);
     value0 = ECL_NIL;
     cl_env_copy->nvalues = 0;
     T0 = v8;
    }
    T1 = ecl_function_dispatch(cl_env_copy,v2)(1, v4);
    v7 = ecl_list1(T1);
    (ECL_CONS_CDR(T0)=v7,T0);
    goto L10;
L11:;
    value0 = ecl_cdr(v6);
    cl_env_copy->nvalues = 1;
    return value0;
   }
  }
 }
}
static cl_object LC655designators_va(cl_narg narg, cl_object v8values, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[2]);
 {
  return LC655designators(v8values);
 }
}
/* local function LAMBDA277                                                   */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC656__lambda277(cl_object v1spec)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v2;
  cl_object v3nick;
  cl_object v4name;
  v2 = v1spec;
  if (!(v2==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1spec);
L4:;
  {
   cl_object v5;
   v5 = ecl_car(v2);
   v2 = ecl_cdr(v2);
   v3nick = v5;
  }
  if (!(v2==ECL_NIL)){
   goto L10;
  }
  si_dm_too_few_arguments(v1spec);
L10:;
  {
   cl_object v5;
   v5 = ecl_car(v2);
   v2 = ecl_cdr(v2);
   v4name = v5;
  }
  if (Null(v2)){
   goto L15;
  }
  si_dm_too_many_arguments(v1spec);
L15:;
  value0 = CONS(v3nick,v4name);
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
static cl_object LC656__lambda277_va(cl_narg narg, cl_object v5spec, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[16]);
 {
  return LC656__lambda277(v5spec);
 }
}
#include "lsp/defpackage.data"
#ifdef __cplusplus
extern "C"
#endif

ECL_DLLEXPORT void _eclEusiUetpENzr9_7oyzL881(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;DEFPACKAGE.LSP.NEWEST",-1);
 return;}
 #ifdef ECL_DYNAMIC_VV
 VV = Cblock->cblock.data;
 #endif
 Cblock->cblock.data_text = (const cl_object *)"@EcLtAg:_eclEusiUetpENzr9_7oyzL881@";
 VVtemp = Cblock->cblock.temp_data;
 ECL_DEFINE_SETF_FUNCTIONS
/* MAKE-LOAD-FORMs                                                            */
/* TOP-LEVEL-FORMs                                                            */
  si_select_package(VVtemp[0]);
  ecl_cmp_defmacro(VV[33]);                       /*  DEFPACKAGE              */
  (void)0; /* No entry created for CHECK-DISJOINT */
  ecl_cmp_defun(VV[34]);                          /*  DODEFPACKAGE            */
  (void)0; /* No entry created for FIND-OR-MAKE-SYMBOL */
}
