/* Compiler: ECL 26.3.27                                                      */
/* Source: /build/ecl/src/ecl-26.3.27/src/cmp/cmpenv-api.lsp                  */
#include <ecl/ecl-cmp.h>
#include "cmp/cmpenv-api.eclh"
/* function definition for CMP-ENV-ROOT                                       */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3219cmp_env_root(cl_narg narg, ...)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
 if (ecl_unlikely(narg>1)) FEwrong_num_arguments(VV[1]);
 {
  cl_object v1env;
  va_list args; va_start(args,narg);
  {
   int i = 0;
   if (i >= narg) {
    v1env = ecl_cmp_symbol_value(cl_env_copy,VV[0]);
   } else {
    i++;
    v1env = va_arg(args,cl_object);
   }
  }
  va_end(args);
  {
   cl_object v2env;
   v2env = L3220cmp_env_copy(1, v1env);
   value0 = (cl_env_copy->function=ecl_fdefinition(VV[3]))->cfun.entry(1, v2env) /*  ADD-DEFAULT-OPTIMIZATIONS */;
   return value0;
  }
 }
}
/* function definition for CMP-ENV-COPY                                       */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3220cmp_env_copy(cl_narg narg, ...)
{
 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>1)) FEwrong_num_arguments(VV[2]);
 {
  cl_object v1env;
  va_list args; va_start(args,narg);
  {
   int i = 0;
   if (i >= narg) {
    v1env = ecl_cmp_symbol_value(cl_env_copy,VV[5]);
   } else {
    i++;
    v1env = va_arg(args,cl_object);
   }
  }
  va_end(args);
  T0 = ecl_car(v1env);
  T1 = ecl_cdr(v1env);
  value0 = CONS(T0,T1);
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
/* local function CMP-ENV-VARIABLES                                           */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC3221cmp_env_variables(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 v4env;
  v3 = ecl_cdr(v1);
  if (Null(v3)){
   goto L4;
  }
  {
   cl_object v5;
   v5 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4env = v5;
   goto L3;
  }
L4:;
  v4env = VV[5];
L3:;
  if (Null(v3)){
   goto L9;
  }
  si_dm_too_many_arguments(v1);
L9:;
  value0 = cl_list(2, ECL_SYM("CAR",182), v4env);
  return value0;
 }
}
static cl_object LC3221cmp_env_variables_va(cl_narg narg, cl_object v5, cl_object v6, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[7]);
 {
  return LC3221cmp_env_variables(v5, v6);
 }
}
/* local function CMP-ENV-FUNCTIONS                                           */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC3222cmp_env_functions(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 v4env;
  v3 = ecl_cdr(v1);
  if (Null(v3)){
   goto L4;
  }
  {
   cl_object v5;
   v5 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4env = v5;
   goto L3;
  }
L4:;
  v4env = VV[5];
L3:;
  if (Null(v3)){
   goto L9;
  }
  si_dm_too_many_arguments(v1);
L9:;
  value0 = cl_list(2, ECL_SYM("CDR",200), v4env);
  return value0;
 }
}
static cl_object LC3222cmp_env_functions_va(cl_narg narg, cl_object v5, cl_object v6, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[10]);
 {
  return LC3222cmp_env_functions(v5, v6);
 }
}
/* function definition for CMP-ENV-REGISTER-VAR                               */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3223cmp_env_register_var(cl_narg narg, cl_object v1var, ...)
{
 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<1)) FEwrong_num_arguments(VV[12]);
 if (ecl_unlikely(narg>3)) FEwrong_num_arguments(VV[12]);
 {
  cl_object v2env;
  cl_object v3boundp;
  va_list args; va_start(args,v1var);
  {
   int i = 1;
   if (i >= narg) {
    v2env = ecl_cmp_symbol_value(cl_env_copy,VV[5]);
   } else {
    i++;
    v2env = va_arg(args,cl_object);
   }
   if (i >= narg) {
    v3boundp = ECL_T;
   } else {
    i++;
    v3boundp = va_arg(args,cl_object);
   }
  }
  va_end(args);
  {
   cl_object v4;
   cl_object v5;
   T0 = (cl_env_copy->function=ecl_fdefinition(VV[13]))->cfun.entry(1, v1var) /*  VAR-NAME */;
   {
    cl_object v6;
    v6 = (cl_env_copy->function=ecl_fdefinition(VV[14]))->cfun.entry(1, v1var) /*  VAR-KIND */;
    if (!((v6)==(ECL_SYM("SPECIAL",792)))){
     goto L12;
    }
    goto L9;
L12:;
    goto L10;
L10:;
    if (!((v6)==(VV[16]))){
     goto L6;
    }
    goto L7;
L9:;
   }
L7:;
   T1 = ECL_SYM("SPECIAL",1346);
   goto L5;
L6:;
   T1 = ECL_T;
L5:;
   v4 = cl_list(4, T0, T1, v3boundp, v1var);
   T0 = ecl_car(v2env);
   v5 = CONS(v4,T0);
   {
    cl_object v6;
    v6 = v2env;
    if (ecl_unlikely(ECL_ATOM(v6))) FEtype_error_cons(v6);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
    T0 = v6;
   }
   (ECL_CONS_CAR(T0)=v5,T0);
  }
  value0 = v2env;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
/* function definition for CMP-ENV-ADD-DECLARATION                            */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3224cmp_env_add_declaration(cl_narg narg, cl_object v1type, cl_object v2arguments, ...)
{
 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(VV[19]);
 if (ecl_unlikely(narg>3)) FEwrong_num_arguments(VV[19]);
 {
  cl_object v3env;
  va_list args; va_start(args,v2arguments);
  {
   int i = 2;
   if (i >= narg) {
    v3env = ecl_cmp_symbol_value(cl_env_copy,VV[5]);
   } else {
    i++;
    v3env = va_arg(args,cl_object);
   }
  }
  va_end(args);
  {
   cl_object v4;
   cl_object v5;
   v4 = cl_listX(3, ECL_SYM("DECLARE",990), v1type, v2arguments);
   T0 = ecl_car(v3env);
   v5 = CONS(v4,T0);
   {
    cl_object v6;
    v6 = v3env;
    if (ecl_unlikely(ECL_ATOM(v6))) FEtype_error_cons(v6);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
    T0 = v6;
   }
   (ECL_CONS_CAR(T0)=v5,T0);
  }
  value0 = v3env;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
/* function definition for CMP-ENV-EXTEND-DECLARATION                         */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3225cmp_env_extend_declaration(cl_narg narg, cl_object v1type, cl_object v2arguments, ...)
{
 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(VV[21]);
 if (ecl_unlikely(narg>4)) FEwrong_num_arguments(VV[21]);
 {
  cl_object v3env;
  cl_object v4default;
  va_list args; va_start(args,v2arguments);
  {
   int i = 2;
   if (i >= narg) {
    v3env = ecl_cmp_symbol_value(cl_env_copy,VV[5]);
   } else {
    i++;
    v3env = va_arg(args,cl_object);
   }
   if (i >= narg) {
    v4default = ECL_NIL;
   } else {
    i++;
    v4default = va_arg(args,cl_object);
   }
  }
  va_end(args);
  {
   cl_object v5x;
   v5x = L3252cmp_env_search_declaration(3, v1type, v3env, v4default);
   T0 = ecl_append(v2arguments,v5x);
   L3224cmp_env_add_declaration(3, v1type, T0, v3env);
   value0 = v3env;
   cl_env_copy->nvalues = 1;
   return value0;
  }
 }
}
/* function definition for CMP-ENV-REGISTER-FUNCTION                          */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3226cmp_env_register_function(cl_narg narg, cl_object v1fun, ...)
{
 cl_object T0;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
 if (ecl_unlikely(narg<1)) FEwrong_num_arguments(VV[24]);
 if (ecl_unlikely(narg>2)) FEwrong_num_arguments(VV[24]);
 {
  cl_object v2env;
  va_list args; va_start(args,v1fun);
  {
   int i = 1;
   if (i >= narg) {
    v2env = ecl_cmp_symbol_value(cl_env_copy,VV[5]);
   } else {
    i++;
    v2env = va_arg(args,cl_object);
   }
  }
  va_end(args);
  {
   cl_object v3;
   cl_object v4;
   T0 = (cl_env_copy->function=ecl_fdefinition(VV[25]))->cfun.entry(1, v1fun) /*  FUN-NAME */;
   v3 = cl_list(3, T0, ECL_SYM("FUNCTION",398), v1fun);
   T0 = ecl_cdr(v2env);
   v4 = CONS(v3,T0);
   {
    cl_object v5;
    v5 = v2env;
    if (ecl_unlikely(ECL_ATOM(v5))) FEtype_error_cons(v5);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
    T0 = v5;
   }
   (ECL_CONS_CDR(T0)=v4,T0);
  }
  value0 = v2env;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
/* function definition for CMP-ENV-REGISTER-GLOBAL-MACRO                      */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3227cmp_env_register_global_macro(cl_object v1name, cl_object v2function)
{
 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:;
 L3228cmp_env_register_macro(3, v1name, v2function, ecl_cmp_symbol_value(cl_env_copy,VV[5]));
 L3228cmp_env_register_macro(3, v1name, v2function, ecl_cmp_symbol_value(cl_env_copy,VV[0]));
 value0 = ECL_NIL;
 cl_env_copy->nvalues = 0;
 return value0;
}
static cl_object L3227cmp_env_register_global_macro_va(cl_narg narg, cl_object v3name, cl_object v4function, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[27]);
 {
  return L3227cmp_env_register_global_macro(v3name, v4function);
 }
}
/* function definition for CMP-ENV-REGISTER-MACRO                             */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3228cmp_env_register_macro(cl_narg narg, cl_object v1name, cl_object v2function, ...)
{
 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(VV[28]);
 if (ecl_unlikely(narg>3)) FEwrong_num_arguments(VV[28]);
 {
  cl_object v3env;
  va_list args; va_start(args,v2function);
  {
   int i = 2;
   if (i >= narg) {
    v3env = ecl_cmp_symbol_value(cl_env_copy,VV[5]);
   } else {
    i++;
    v3env = va_arg(args,cl_object);
   }
  }
  va_end(args);
  {
   cl_object v4;
   cl_object v5;
   v4 = cl_list(3, v1name, ECL_SYM("MACRO",1113), v2function);
   T0 = ecl_cdr(v3env);
   v5 = CONS(v4,T0);
   {
    cl_object v6;
    v6 = v3env;
    if (ecl_unlikely(ECL_ATOM(v6))) FEtype_error_cons(v6);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
    T0 = v6;
   }
   (ECL_CONS_CDR(T0)=v5,T0);
  }
  value0 = v3env;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
/* function definition for CMP-ENV-REGISTER-FTYPE                             */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3229cmp_env_register_ftype(cl_narg narg, cl_object v1name, cl_object v2declaration, ...)
{
 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(VV[31]);
 if (ecl_unlikely(narg>3)) FEwrong_num_arguments(VV[31]);
 {
  cl_object v3env;
  va_list args; va_start(args,v2declaration);
  {
   int i = 2;
   if (i >= narg) {
    v3env = ecl_cmp_symbol_value(cl_env_copy,VV[5]);
   } else {
    i++;
    v3env = va_arg(args,cl_object);
   }
  }
  va_end(args);
  {
   cl_object v4;
   cl_object v5;
   v4 = cl_listX(3, ECL_SYM("DECLARE",990), v1name, v2declaration);
   T0 = ecl_cdr(v3env);
   v5 = CONS(v4,T0);
   {
    cl_object v6;
    v6 = v3env;
    if (ecl_unlikely(ECL_ATOM(v6))) FEtype_error_cons(v6);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
    T0 = v6;
   }
   (ECL_CONS_CDR(T0)=v5,T0);
  }
  value0 = v3env;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
/* function definition for CMP-ENV-REGISTER-SYMBOL-MACRO                      */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3231cmp_env_register_symbol_macro(cl_narg narg, cl_object v1name, cl_object v2form, ...)
{
 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);
 if (ecl_unlikely(narg<2)) FEwrong_num_arguments(VV[33]);
 if (ecl_unlikely(narg>4)) FEwrong_num_arguments(VV[33]);
 {
  cl_object v3env;
  cl_object v4force;
  va_list args; va_start(args,v2form);
  env0 = ECL_NIL;
  CLV0 = env0 = CONS(v2form,env0);                /*  FORM                    */
  {
   int i = 2;
   if (i >= narg) {
    v3env = ecl_cmp_symbol_value(cl_env_copy,VV[5]);
   } else {
    i++;
    v3env = va_arg(args,cl_object);
   }
   if (i >= narg) {
    v4force = ECL_NIL;
   } else {
    i++;
    v4force = va_arg(args,cl_object);
   }
  }
  va_end(args);
  {
   cl_object v5;
   v5 = ecl_make_cclosure_va((cl_objectfn)LC3230__lambda51,env0,Cblock,2);
   T0 = v5;
  }
  value0 = L3232cmp_env_register_symbol_macro_function(4, v1name, T0, v3env, v4force);
  return value0;
 }
}
/* function definition for CMP-ENV-REGISTER-SYMBOL-MACRO-FUNCTION             */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3232cmp_env_register_symbol_macro_function(cl_narg narg, cl_object v1name, cl_object v2function, ...)
{
 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(VV[34]);
 if (ecl_unlikely(narg>4)) FEwrong_num_arguments(VV[34]);
 {
  cl_object v3env;
  cl_object v4force;
  va_list args; va_start(args,v2function);
  {
   int i = 2;
   if (i >= narg) {
    v3env = ecl_cmp_symbol_value(cl_env_copy,VV[5]);
   } else {
    i++;
    v3env = va_arg(args,cl_object);
   }
   if (i >= narg) {
    v4force = ECL_NIL;
   } else {
    i++;
    v4force = va_arg(args,cl_object);
   }
  }
  va_end(args);
  if (v4force!=ECL_NIL) {
   goto L3;
  }
  if ((cl_env_copy->function=ecl_fdefinition(VV[37]))->cfun.entry(1, v1name) /*  CONSTANT-VARIABLE-P */!=ECL_NIL) {
   goto L6;
  }
  if (Null((cl_env_copy->function=ecl_fdefinition(VV[38]))->cfun.entry(1, v1name) /*  SPECIAL-VARIABLE-P */)){
   goto L3;
  }
  goto L4;
L6:;
L4:;
  (cl_env_copy->function=ecl_fdefinition(VV[39]))->cfun.entry(2, VV[40], v1name) /*  CMPERR */;
L3:;
  {
   cl_object v5;
   cl_object v6;
   v5 = cl_list(3, v1name, ECL_SYM("SYMBOL-MACRO",1184), v2function);
   T0 = ecl_car(v3env);
   v6 = CONS(v5,T0);
   {
    cl_object v7;
    v7 = v3env;
    if (ecl_unlikely(ECL_ATOM(v7))) FEtype_error_cons(v7);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
    T0 = v7;
   }
   (ECL_CONS_CAR(T0)=v6,T0);
  }
  value0 = v3env;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
/* function definition for CMP-ENV-REGISTER-BLOCK                             */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3233cmp_env_register_block(cl_narg narg, cl_object v1blk, ...)
{
 cl_object T0;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
 if (ecl_unlikely(narg<1)) FEwrong_num_arguments(VV[42]);
 if (ecl_unlikely(narg>2)) FEwrong_num_arguments(VV[42]);
 {
  cl_object v2env;
  va_list args; va_start(args,v1blk);
  {
   int i = 1;
   if (i >= narg) {
    v2env = ecl_cmp_symbol_value(cl_env_copy,VV[5]);
   } else {
    i++;
    v2env = va_arg(args,cl_object);
   }
  }
  va_end(args);
  {
   cl_object v3;
   cl_object v4;
   T0 = (cl_env_copy->function=ecl_fdefinition(VV[43]))->cfun.entry(1, v1blk) /*  BLK-NAME */;
   v3 = cl_list(3, ECL_SYM("BLOCK",1232), T0, v1blk);
   T0 = ecl_car(v2env);
   v4 = CONS(v3,T0);
   {
    cl_object v5;
    v5 = v2env;
    if (ecl_unlikely(ECL_ATOM(v5))) FEtype_error_cons(v5);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
    T0 = v5;
   }
   (ECL_CONS_CAR(T0)=v4,T0);
  }
  value0 = v2env;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
/* function definition for CMP-ENV-REGISTER-TAG                               */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3234cmp_env_register_tag(cl_narg narg, cl_object v1name, cl_object v2tag, ...)
{
 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(VV[45]);
 if (ecl_unlikely(narg>3)) FEwrong_num_arguments(VV[45]);
 {
  cl_object v3env;
  va_list args; va_start(args,v2tag);
  {
   int i = 2;
   if (i >= narg) {
    v3env = ecl_cmp_symbol_value(cl_env_copy,VV[5]);
   } else {
    i++;
    v3env = va_arg(args,cl_object);
   }
  }
  va_end(args);
  {
   cl_object v4;
   cl_object v5;
   T0 = ecl_list1(v1name);
   v4 = cl_list(3, ECL_SYM("TAG",1352), T0, v2tag);
   T0 = ecl_car(v3env);
   v5 = CONS(v4,T0);
   {
    cl_object v6;
    v6 = v3env;
    if (ecl_unlikely(ECL_ATOM(v6))) FEtype_error_cons(v6);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
    T0 = v6;
   }
   (ECL_CONS_CAR(T0)=v5,T0);
  }
  value0 = v3env;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
/* function definition for CMP-ENV-REGISTER-COMPILER-MACRO                    */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3235cmp_env_register_compiler_macro(cl_object v1name, cl_object v2macro_function)
{
 cl_object T0;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4;
  cl_object v5;
  v3 = cl_list(3, v1name, ECL_SYM("COMPILER-MACRO",240), v2macro_function);
  v4 = ecl_cmp_symbol_value(cl_env_copy,VV[0]);
  T0 = ecl_cdr(v4);
  v5 = CONS(v3,T0);
  {
   cl_object v6;
   v6 = v4;
   if (ecl_unlikely(ECL_ATOM(v6))) FEtype_error_cons(v6);
   value0 = ECL_NIL;
   cl_env_copy->nvalues = 0;
   T0 = v6;
  }
  (ECL_CONS_CDR(T0)=v5,T0);
 }
 value0 = ECL_NIL;
 cl_env_copy->nvalues = 0;
 return value0;
}
static cl_object L3235cmp_env_register_compiler_macro_va(cl_narg narg, cl_object v3name, cl_object v4macro_function, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[47]);
 {
  return L3235cmp_env_register_compiler_macro(v3name, v4macro_function);
 }
}
/* function definition for CMP-ENV-REGISTER-TYPE                              */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3236cmp_env_register_type(cl_narg narg, cl_object v1name, cl_object v2definition, ...)
{
 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(VV[49]);
 if (ecl_unlikely(narg>3)) FEwrong_num_arguments(VV[49]);
 {
  cl_object v3env;
  va_list args; va_start(args,v2definition);
  {
   int i = 2;
   if (i >= narg) {
    v3env = ecl_cmp_symbol_value(cl_env_copy,VV[5]);
   } else {
    i++;
    v3env = va_arg(args,cl_object);
   }
  }
  va_end(args);
  {
   cl_object v4;
   cl_object v5;
   v4 = cl_list(3, ECL_SYM("TYPE",1356), v1name, v2definition);
   T0 = ecl_car(v3env);
   v5 = CONS(v4,T0);
   {
    cl_object v6;
    v6 = v3env;
    if (ecl_unlikely(ECL_ATOM(v6))) FEtype_error_cons(v6);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
    T0 = v6;
   }
   (ECL_CONS_CAR(T0)=v5,T0);
  }
  value0 = v3env;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
/* function definition for CMP-ENV-REGISTER-TYPES                             */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3237cmp_env_register_types(cl_narg narg, cl_object v1definitions, ...)
{
 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<1)) FEwrong_num_arguments(VV[51]);
 if (ecl_unlikely(narg>2)) FEwrong_num_arguments(VV[51]);
 {
  cl_object v2env;
  va_list args; va_start(args,v1definitions);
  {
   int i = 1;
   if (i >= narg) {
    v2env = ecl_cmp_symbol_value(cl_env_copy,VV[5]);
   } else {
    i++;
    v2env = va_arg(args,cl_object);
   }
  }
  va_end(args);
  {
   cl_object v3;
   v3 = v1definitions;
   goto L6;
L5:;
   {
    cl_object v4def;
    v4def = ecl_car(v3);
    T0 = ecl_car(v4def);
    T1 = ecl_cdr(v4def);
    v2env = L3236cmp_env_register_type(3, T0, T1, v2env);
   }
   v3 = ecl_cdr(v3);
L6:;
   if (Null(v3)){
    goto L14;
   }
   goto L5;
L14:;
  }
  value0 = v2env;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
/* function definition for REGISTER-ALL-KNOWN-TYPES                           */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3238register_all_known_types(cl_narg narg, ...)
{
 cl_object T0;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
 if (ecl_unlikely(narg>1)) FEwrong_num_arguments(VV[53]);
 {
  cl_object v1env;
  va_list args; va_start(args,narg);
  {
   int i = 0;
   if (i >= narg) {
    v1env = ecl_cmp_symbol_value(cl_env_copy,VV[5]);
   } else {
    i++;
    v1env = va_arg(args,cl_object);
   }
  }
  va_end(args);
  {
   cl_object v2;
   cl_object v3;
   cl_object v4type;
   T0 = cl_list_all_packages();
   v2 = si_packages_iterator(T0, VV[55], ECL_T);
   v3 = ECL_NIL;
   v4type = ECL_NIL;
   goto L8;
L7:;
   value0 = ecl_function_dispatch(cl_env_copy,v2)(0);
   {
    const int v5 = cl_env_copy->nvalues;
    v3 = value0;
    cl_object v6;
    v6 = (v5<=1)? ECL_NIL : cl_env_copy->values[1];
    v4type = v6;
   }
   if (v3!=ECL_NIL) {
    goto L12;
   }
   goto L2;
L12:;
   {
    cl_object v5deftype_form;
    v5deftype_form = si_get_sysprop(v4type, VV[56]);
    if (Null(v5deftype_form)){
     goto L14;
    }
    if (L3253cmp_env_search_type(2, v4type, v1env)!=ECL_NIL) {
     goto L14;
    }
    {
     cl_object v6type_definition;
     {
      cl_object v7;
      cl_object v8;
      cl_object v9name;
      cl_object v10lambda_list;
      v7 = ecl_cdr(v5deftype_form);
      v8 = v7;
      if (!(v8==ECL_NIL)){
       goto L23;
      }
      si_dm_too_few_arguments(v7);
L23:;
      {
       cl_object v11;
       v11 = ecl_car(v8);
       v8 = ecl_cdr(v8);
       v9name = v11;
      }
      if (!(v8==ECL_NIL)){
       goto L29;
      }
      si_dm_too_few_arguments(v7);
L29:;
      {
       cl_object v11;
       v11 = ecl_car(v8);
       v8 = ecl_cdr(v8);
       v10lambda_list = v11;
      }
      T0 = (cl_env_copy->function=(ECL_SYM("EXPAND-DEFMACRO",1077)->symbol.gfdef))->cfun.entry(4, v9name, v10lambda_list, v8, ECL_SYM("DEFTYPE",290)) /*  EXPAND-DEFMACRO */;
     }
     v6type_definition = cl_eval(T0);
     v1env = L3236cmp_env_register_type(3, v4type, v6type_definition, v1env);
    }
   }
L14:;
L8:;
   goto L7;
  }
L2:;
  value0 = v1env;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
/* function definition for CMP-ENV-SEARCH-FUNCTION                            */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3239cmp_env_search_function(cl_narg narg, cl_object v1name, ...)
{
 cl_object T0;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
 if (ecl_unlikely(narg<1)) FEwrong_num_arguments(VV[60]);
 if (ecl_unlikely(narg>2)) FEwrong_num_arguments(VV[60]);
 {
  cl_object v2env;
  va_list args; va_start(args,v1name);
  {
   int i = 1;
   if (i >= narg) {
    v2env = ecl_cmp_symbol_value(cl_env_copy,VV[5]);
   } else {
    i++;
    v2env = va_arg(args,cl_object);
   }
  }
  va_end(args);
  {
   cl_object v3cfb;
   cl_object v4unw;
   cl_object v5found;
   v3cfb = ECL_NIL;
   v4unw = ECL_NIL;
   v5found = ECL_NIL;
   {
    cl_object v6;
    v6 = ecl_cdr(v2env);
    goto L9;
L8:;
    {
     cl_object v7record;
     v7record = ecl_car(v6);
     if (!((v7record)==(ECL_SYM("FUNCTION-BOUNDARY",1947)))){
      goto L14;
     }
     v3cfb = ECL_T;
     goto L13;
L14:;
     if (!((v7record)==(ECL_SYM("UNWIND-PROTECT-BOUNDARY",1948)))){
      goto L17;
     }
     v4unw = ECL_T;
     goto L13;
L17:;
     if (!(ECL_ATOM(v7record))){
      goto L20;
     }
     T0 = ecl_list1(v7record);
     (cl_env_copy->function=ecl_fdefinition(VV[61]))->cfun.entry(4, ECL_SYM("FORMAT-CONTROL",1272), VV[62], ECL_SYM("FORMAT-ARGUMENTS",1271), T0) /*  BABOON */;
     goto L13;
L20:;
     T0 = ecl_car(v7record);
     if (!(ecl_equal(T0,v1name))){
      goto L13;
     }
     T0 = ecl_cadr(v7record);
     if ((T0)==(ECL_SYM("COMPILER-MACRO",240))) {
      goto L13;
     }
     T0 = ecl_last(v7record,1);
     v5found = ecl_car(T0);
     goto L5;
L13:;
    }
    v6 = ecl_cdr(v6);
L9:;
    if (Null(v6)){
     goto L28;
    }
    goto L8;
L28:;
   }
L5:;
   cl_env_copy->nvalues = 3;
   cl_env_copy->values[2] = v4unw;
   cl_env_copy->values[1] = v3cfb;
   cl_env_copy->values[0] = v5found;
   return cl_env_copy->values[0];
  }
 }
}
/* function definition for CMP-ENV-SEARCH-VARIABLES                           */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3240cmp_env_search_variables(cl_object v1type, cl_object v2name, cl_object v3env)
{
 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 v4cfb;
  cl_object v5unw;
  cl_object v6found;
  v4cfb = ECL_NIL;
  v5unw = ECL_NIL;
  v6found = ECL_NIL;
  {
   cl_object v7;
   v7 = ecl_car(v3env);
   goto L9;
L8:;
   {
    cl_object v8record;
    v8record = ecl_car(v7);
    if (!((v8record)==(ECL_SYM("FUNCTION-BOUNDARY",1947)))){
     goto L14;
    }
    v4cfb = ECL_T;
    goto L13;
L14:;
    if (!((v8record)==(ECL_SYM("UNWIND-PROTECT-BOUNDARY",1948)))){
     goto L17;
    }
    v5unw = ECL_T;
    goto L13;
L17:;
    if (!(ECL_ATOM(v8record))){
     goto L20;
    }
    T0 = ecl_list1(v8record);
    (cl_env_copy->function=ecl_fdefinition(VV[61]))->cfun.entry(4, ECL_SYM("FORMAT-CONTROL",1272), VV[62], ECL_SYM("FORMAT-ARGUMENTS",1271), T0) /*  BABOON */;
    goto L13;
L20:;
    {
     cl_object v9;
     T0 = ecl_car(v8record);
     {
      bool v10;
      v10 = (T0)==(v1type);
      v9 = (v10)?ECL_NIL:ECL_T;
     }
     if (Null(v9)){
      goto L23;
     }
     goto L13;
L23:;
     if (!((v1type)==(ECL_SYM("BLOCK",1232)))){
      goto L25;
     }
     T0 = ecl_cadr(v8record);
     if (!((v2name)==(T0))){
      goto L13;
     }
     v6found = v8record;
     goto L5;
L25:;
     if (!((v1type)==(ECL_SYM("TAG",1352)))){
      goto L30;
     }
     {
      cl_object v10;
      cl_object v11;
      cl_object v12;
      cl_object v13;
      v10 = ecl_cadr(v8record);
      v11 = (ECL_SYM("EQL",336)->symbol.gfdef);
      v12 = v2name;
      v13 = v10;
      if (Null(ecl_memql(v12,v13))){
       goto L13;
      }
     }
     v6found = v8record;
     goto L5;
L30:;
     if (!((v2name)==(ECL_SYM("SYMBOL-MACRO",1184)))){
      goto L39;
     }
     T0 = ecl_cadr(v8record);
     if (!((T0)==(ECL_SYM("SYMBOL-MACRO",1184)))){
      goto L41;
     }
     v6found = v8record;
L41:;
     goto L5;
L39:;
     T0 = ecl_cadr(v8record);
     if ((T0)==(ECL_SYM("SYMBOL-MACRO",1184))) {
      goto L44;
     }
     v6found = v8record;
L44:;
     goto L5;
    }
L13:;
   }
   v7 = ecl_cdr(v7);
L9:;
   if (Null(v7)){
    goto L49;
   }
   goto L8;
L49:;
  }
L5:;
  T0 = ecl_last(v6found,1);
  T1 = ecl_car(T0);
  cl_env_copy->nvalues = 3;
  cl_env_copy->values[2] = v5unw;
  cl_env_copy->values[1] = v4cfb;
  cl_env_copy->values[0] = T1;
  return cl_env_copy->values[0];
 }
}
static cl_object L3240cmp_env_search_variables_va(cl_narg narg, cl_object v7type, cl_object v8name, cl_object v9env, ...)
{
 if (ecl_unlikely(narg!=3)) FEwrong_num_arguments(VV[64]);
 {
  return L3240cmp_env_search_variables(v7type, v8name, v9env);
 }
}
/* function definition for CMP-ENV-SEARCH-BLOCK                               */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3241cmp_env_search_block(cl_narg narg, cl_object v1name, ...)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
 if (ecl_unlikely(narg<1)) FEwrong_num_arguments(VV[66]);
 if (ecl_unlikely(narg>2)) FEwrong_num_arguments(VV[66]);
 {
  cl_object v2env;
  va_list args; va_start(args,v1name);
  {
   int i = 1;
   if (i >= narg) {
    v2env = ecl_cmp_symbol_value(cl_env_copy,VV[5]);
   } else {
    i++;
    v2env = va_arg(args,cl_object);
   }
  }
  va_end(args);
  value0 = L3240cmp_env_search_variables(ECL_SYM("BLOCK",1232), v1name, v2env);
  return value0;
 }
}
/* function definition for CMP-ENV-SEARCH-TAG                                 */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3242cmp_env_search_tag(cl_narg narg, cl_object v1name, ...)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
 if (ecl_unlikely(narg<1)) FEwrong_num_arguments(VV[68]);
 if (ecl_unlikely(narg>2)) FEwrong_num_arguments(VV[68]);
 {
  cl_object v2env;
  va_list args; va_start(args,v1name);
  {
   int i = 1;
   if (i >= narg) {
    v2env = ecl_cmp_symbol_value(cl_env_copy,VV[5]);
   } else {
    i++;
    v2env = va_arg(args,cl_object);
   }
  }
  va_end(args);
  value0 = L3240cmp_env_search_variables(ECL_SYM("TAG",1352), v1name, v2env);
  return value0;
 }
}
/* function definition for CMP-ENV-SEARCH-SYMBOL-MACRO                        */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3243cmp_env_search_symbol_macro(cl_narg narg, cl_object v1name, ...)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
 if (ecl_unlikely(narg<1)) FEwrong_num_arguments(VV[70]);
 if (ecl_unlikely(narg>2)) FEwrong_num_arguments(VV[70]);
 {
  cl_object v2env;
  va_list args; va_start(args,v1name);
  {
   int i = 1;
   if (i >= narg) {
    v2env = ecl_cmp_symbol_value(cl_env_copy,VV[5]);
   } else {
    i++;
    v2env = va_arg(args,cl_object);
   }
  }
  va_end(args);
  value0 = L3240cmp_env_search_variables(v1name, ECL_SYM("SYMBOL-MACRO",1184), v2env);
  return value0;
 }
}
/* function definition for CMP-ENV-SEARCH-VAR                                 */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3244cmp_env_search_var(cl_narg narg, cl_object v1name, ...)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
 if (ecl_unlikely(narg<1)) FEwrong_num_arguments(VV[72]);
 if (ecl_unlikely(narg>2)) FEwrong_num_arguments(VV[72]);
 {
  cl_object v2env;
  va_list args; va_start(args,v1name);
  {
   int i = 1;
   if (i >= narg) {
    v2env = ecl_cmp_symbol_value(cl_env_copy,VV[5]);
   } else {
    i++;
    v2env = va_arg(args,cl_object);
   }
  }
  va_end(args);
  value0 = L3240cmp_env_search_variables(v1name, ECL_T, v2env);
  return value0;
 }
}
/* function definition for CMP-ENV-SEARCH-MACRO                               */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3245cmp_env_search_macro(cl_narg narg, cl_object v1name, ...)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
 if (ecl_unlikely(narg<1)) FEwrong_num_arguments(VV[74]);
 if (ecl_unlikely(narg>2)) FEwrong_num_arguments(VV[74]);
 {
  cl_object v2env;
  va_list args; va_start(args,v1name);
  {
   int i = 1;
   if (i >= narg) {
    v2env = ecl_cmp_symbol_value(cl_env_copy,VV[5]);
   } else {
    i++;
    v2env = va_arg(args,cl_object);
   }
  }
  va_end(args);
  {
   cl_object v3f;
   v3f = L3239cmp_env_search_function(2, v1name, v2env);
   if (Null(cl_functionp(v3f))){
    goto L3;
   }
   value0 = v3f;
   cl_env_copy->nvalues = 1;
   return value0;
L3:;
   value0 = ECL_NIL;
   cl_env_copy->nvalues = 1;
   return value0;
  }
 }
}
/* function definition for CMP-MACRO-FUNCTION                                 */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3246cmp_macro_function(cl_object v1name)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 value0 = L3245cmp_env_search_macro(1, v1name);
 if (value0!=ECL_NIL) {
  goto L3;
 }
 value0 = cl_macro_function(1, v1name);
 return value0;
L3:;
 cl_env_copy->nvalues = 1;
 return value0;
}
static cl_object L3246cmp_macro_function_va(cl_narg narg, cl_object v2name, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[76]);
 {
  return L3246cmp_macro_function(v2name);
 }
}
/* function definition for CMP-ENV-SEARCH-COMPILER-MACRO                      */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3247cmp_env_search_compiler_macro(cl_narg narg, cl_object v1name, ...)
{
 cl_object T0;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
 if (ecl_unlikely(narg<1)) FEwrong_num_arguments(VV[78]);
 if (ecl_unlikely(narg>2)) FEwrong_num_arguments(VV[78]);
 {
  cl_object v2env;
  va_list args; va_start(args,v1name);
  {
   int i = 1;
   if (i >= narg) {
    v2env = ecl_cmp_symbol_value(cl_env_copy,VV[5]);
   } else {
    i++;
    v2env = va_arg(args,cl_object);
   }
  }
  va_end(args);
  {
   cl_object v3;
   v3 = ecl_cdr(v2env);
   goto L5;
L4:;
   {
    cl_object v4record;
    v4record = ecl_car(v3);
    if (!(ECL_CONSP(v4record))){
     goto L9;
    }
    T0 = ecl_car(v4record);
    if (!(ecl_equal(T0,v1name))){
     goto L9;
    }
    T0 = ecl_cadr(v4record);
    if (!((T0)==(ECL_SYM("COMPILER-MACRO",240)))){
     goto L9;
    }
    value0 = ecl_caddr(v4record);
    cl_env_copy->nvalues = 1;
    return value0;
L9:;
   }
   v3 = ecl_cdr(v3);
L5:;
   if (Null(v3)){
    goto L15;
   }
   goto L4;
L15:;
   value0 = ECL_NIL;
   cl_env_copy->nvalues = 1;
   return value0;
  }
 }
}
/* function definition for CMP-COMPILER-MACRO-FUNCTION                        */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3248cmp_compiler_macro_function(cl_object v1name)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 value0 = L3247cmp_env_search_compiler_macro(1, v1name);
 if (value0!=ECL_NIL) {
  goto L3;
 }
 value0 = (cl_env_copy->function=(ECL_SYM("COMPILER-MACRO-FUNCTION",241)->symbol.gfdef))->cfun.entry(1, v1name) /*  COMPILER-MACRO-FUNCTION */;
 return value0;
L3:;
 cl_env_copy->nvalues = 1;
 return value0;
}
static cl_object L3248cmp_compiler_macro_function_va(cl_narg narg, cl_object v2name, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[80]);
 {
  return L3248cmp_compiler_macro_function(v2name);
 }
}
/* function definition for CMP-ENV-SEARCH-FTYPE                               */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3249cmp_env_search_ftype(cl_narg narg, cl_object v1name, ...)
{
 cl_object T0;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
 if (ecl_unlikely(narg<1)) FEwrong_num_arguments(VV[82]);
 if (ecl_unlikely(narg>2)) FEwrong_num_arguments(VV[82]);
 {
  cl_object v2env;
  va_list args; va_start(args,v1name);
  {
   int i = 1;
   if (i >= narg) {
    v2env = ecl_cmp_symbol_value(cl_env_copy,VV[5]);
   } else {
    i++;
    v2env = va_arg(args,cl_object);
   }
  }
  va_end(args);
  {
   cl_object v3;
   v3 = v2env;
   goto L5;
L4:;
   {
    cl_object v4i;
    v4i = ecl_car(v3);
    if (!(ECL_CONSP(v4i))){
     goto L9;
    }
    {
     cl_object v5;
     v5 = v4i;
     {
      cl_object v6;
      v6 = v5;
      {
       bool v7;
       v7 = ECL_LISTP(v6);
       if (ecl_unlikely(!(v7)))
         FEwrong_type_argument(VV[85],v6);
       value0 = ECL_NIL;
       cl_env_copy->nvalues = 0;
      }
     }
     if (Null(v5)){
      goto L18;
     }
     {
      cl_object v6;
      v6 = ECL_CONS_CDR(v5);
      v4i = v6;
      v5 = ECL_CONS_CAR(v5);
     }
L18:;
     T0 = v5;
    }
    if (!((T0)==(ECL_SYM("DECLARE",990)))){
     goto L9;
    }
    {
     cl_object v5;
     v5 = v4i;
     {
      cl_object v6;
      v6 = v5;
      {
       bool v7;
       v7 = ECL_LISTP(v6);
       if (ecl_unlikely(!(v7)))
         FEwrong_type_argument(VV[85],v6);
       value0 = ECL_NIL;
       cl_env_copy->nvalues = 0;
      }
     }
     if (Null(v5)){
      goto L29;
     }
     {
      cl_object v6;
      v6 = ECL_CONS_CDR(v5);
      v4i = v6;
      v5 = ECL_CONS_CAR(v5);
     }
L29:;
     T0 = v5;
    }
    if (Null((cl_env_copy->function=ecl_fdefinition(VV[86]))->cfun.entry(2, T0, v1name) /*  SAME-FNAME-P */)){
     goto L9;
    }
    value0 = v4i;
    cl_env_copy->nvalues = 1;
    return value0;
L9:;
   }
   v3 = ecl_cdr(v3);
L5:;
   if (Null(v3)){
    goto L37;
   }
   goto L4;
L37:;
   value0 = ECL_NIL;
   cl_env_copy->nvalues = 1;
   return value0;
  }
 }
}
/* function definition for CMP-ENV-MARK                                       */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3250cmp_env_mark(cl_narg narg, cl_object v1mark, ...)
{
 cl_object T0, T1, T2;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
 if (ecl_unlikely(narg<1)) FEwrong_num_arguments(VV[88]);
 if (ecl_unlikely(narg>2)) FEwrong_num_arguments(VV[88]);
 {
  cl_object v2env;
  va_list args; va_start(args,v1mark);
  {
   int i = 1;
   if (i >= narg) {
    v2env = ecl_cmp_symbol_value(cl_env_copy,VV[5]);
   } else {
    i++;
    v2env = va_arg(args,cl_object);
   }
  }
  va_end(args);
  T0 = ecl_car(v2env);
  T1 = CONS(v1mark,T0);
  T2 = ecl_cdr(v2env);
  value0 = cl_listX(3, T1, v1mark, T2);
  return value0;
 }
}
/* function definition for CMP-ENV-NEW-VARIABLES                              */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3251cmp_env_new_variables(cl_object v1new_env, cl_object v2old_env)
{
 cl_object T0, T1;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4i;
  cl_object v5;
  T0 = ecl_car(v1new_env);
  T1 = ecl_car(v2old_env);
  v3 = cl_ldiff(T0, T1);
  v4i = ECL_NIL;
  v5 = v3;
  {
   cl_object v6;
   cl_object v7;
   v6 = ecl_list1(ECL_NIL);
   v7 = v6;
L7:;
   if (!(ecl_endp(v5))){
    goto L9;
   }
   goto L8;
L9:;
   v4i = 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;
   }
   if (!(ECL_CONSP(v4i))){
    goto L17;
   }
   T0 = ecl_cadddr(v4i);
   if (Null((cl_env_copy->function=ecl_fdefinition(VV[94]))->cfun.entry(1, T0) /*  VAR-P */)){
    goto L17;
   }
   {
    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_cadddr(v4i);
   v7 = ecl_list1(T1);
   (ECL_CONS_CDR(T0)=v7,T0);
L17:;
   goto L7;
L8:;
   value0 = ecl_cdr(v6);
   cl_env_copy->nvalues = 1;
   return value0;
  }
 }
}
static cl_object L3251cmp_env_new_variables_va(cl_narg narg, cl_object v8new_env, cl_object v9old_env, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[90]);
 {
  return L3251cmp_env_new_variables(v8new_env, v9old_env);
 }
}
/* function definition for CMP-ENV-SEARCH-DECLARATION                         */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3252cmp_env_search_declaration(cl_narg narg, cl_object v1kind, ...)
{
 cl_object T0;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
 if (ecl_unlikely(narg<1)) FEwrong_num_arguments(VV[22]);
 if (ecl_unlikely(narg>3)) FEwrong_num_arguments(VV[22]);
 {
  cl_object v2env;
  cl_object v3default;
  va_list args; va_start(args,v1kind);
  {
   int i = 1;
   if (i >= narg) {
    v2env = ecl_cmp_symbol_value(cl_env_copy,VV[5]);
   } else {
    i++;
    v2env = va_arg(args,cl_object);
   }
   if (i >= narg) {
    v3default = ECL_NIL;
   } else {
    i++;
    v3default = va_arg(args,cl_object);
   }
  }
  va_end(args);
  {
   cl_object v4;
   cl_object v5i;
   cl_object v6;
   {
    cl_object v7;
    v7 = ecl_car(v2env);
    if (ecl_unlikely(!ECL_LISTP(v7))) FEtype_error_list(v7);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
    v4 = v7;
   }
   v5i = ECL_NIL;
   v6 = v4;
L8:;
   if (!(ecl_endp(v6))){
    goto L10;
   }
   goto L9;
L10:;
   v5i = ECL_CONS_CAR(v6);
   {
    cl_object v7;
    v7 = ECL_CONS_CDR(v6);
    if (ecl_unlikely(!ECL_LISTP(v7))) FEtype_error_list(v7);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
    v6 = v7;
   }
   if (!(ECL_CONSP(v5i))){
    goto L18;
   }
   T0 = ecl_car(v5i);
   if (!((T0)==(ECL_SYM("DECLARE",990)))){
    goto L18;
   }
   T0 = ecl_cadr(v5i);
   if (!((T0)==(v1kind))){
    goto L18;
   }
   value0 = ecl_cddr(v5i);
   cl_env_copy->nvalues = 1;
   return value0;
L18:;
   goto L8;
L9:;
   value0 = v3default;
   cl_env_copy->nvalues = 1;
   return value0;
  }
 }
}
/* function definition for CMP-ENV-SEARCH-TYPE                                */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3253cmp_env_search_type(cl_narg narg, cl_object v1name, ...)
{
 cl_object T0;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
 if (ecl_unlikely(narg<1)) FEwrong_num_arguments(VV[57]);
 if (ecl_unlikely(narg>2)) FEwrong_num_arguments(VV[57]);
 {
  cl_object v2env;
  va_list args; va_start(args,v1name);
  {
   int i = 1;
   if (i >= narg) {
    v2env = ecl_cmp_symbol_value(cl_env_copy,VV[5]);
   } else {
    i++;
    v2env = va_arg(args,cl_object);
   }
  }
  va_end(args);
  {
   cl_object v3;
   cl_object v4i;
   cl_object v5;
   {
    cl_object v6;
    v6 = ecl_car(v2env);
    if (ecl_unlikely(!ECL_LISTP(v6))) FEtype_error_list(v6);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
    v3 = v6;
   }
   v4i = ECL_NIL;
   v5 = v3;
L7:;
   if (!(ecl_endp(v5))){
    goto L9;
   }
   goto L8;
L9:;
   v4i = ECL_CONS_CAR(v5);
   {
    cl_object v6;
    v6 = ECL_CONS_CDR(v5);
    if (ecl_unlikely(!ECL_LISTP(v6))) FEtype_error_list(v6);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
    v5 = v6;
   }
   if (!(ECL_CONSP(v4i))){
    goto L17;
   }
   T0 = ecl_car(v4i);
   if (!((T0)==(ECL_SYM("TYPE",1356)))){
    goto L17;
   }
   T0 = ecl_cadr(v4i);
   if (!((T0)==(v1name))){
    goto L17;
   }
   value0 = ecl_caddr(v4i);
   cl_env_copy->nvalues = 1;
   return value0;
L17:;
   goto L7;
L8:;
   value0 = ECL_NIL;
   cl_env_copy->nvalues = 1;
   return value0;
  }
 }
}
/* closure LAMBDA51                                                           */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC3230__lambda51(cl_narg narg, cl_object v1whole, cl_object v2env, ...)
{
 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;                                     /*  FORM                    */
 { /* ... closure scanning finished */
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[35]);
 {
L1:;
  value0 = ECL_CONS_CAR(CLV0);
  cl_env_copy->nvalues = 1;
  return value0;
 }
 }
}
#include "cmp/cmpenv-api.data"
#ifdef __cplusplus
extern "C"
#endif

ECL_DLLEXPORT void _eclU0KK5sjvKw9n9_0cP0M881(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:CMP;CMPENV-API.LSP.NEWEST",-1);
 return;}
 #ifdef ECL_DYNAMIC_VV
 VV = Cblock->cblock.data;
 #endif
 Cblock->cblock.data_text = (const cl_object *)"@EcLtAg:_eclU0KK5sjvKw9n9_0cP0M881@";
 VVtemp = Cblock->cblock.temp_data;
 ECL_DEFINE_SETF_FUNCTIONS
/* MAKE-LOAD-FORMs                                                            */
/* TOP-LEVEL-FORMs                                                            */
  si_select_package(VVtemp[0]);
  ecl_cmp_defun(VV[100]);                         /*  CMP-ENV-ROOT            */
  ecl_cmp_defun(VV[101]);                         /*  CMP-ENV-COPY            */
  ecl_cmp_defmacro(VV[102]);                      /*  CMP-ENV-VARIABLES       */
  ecl_cmp_defmacro(VV[103]);                      /*  CMP-ENV-FUNCTIONS       */
  ecl_cmp_defun(VV[104]);                         /*  CMP-ENV-REGISTER-VAR    */
  ecl_cmp_defun(VV[105]);                         /*  CMP-ENV-ADD-DECLARATION */
  ecl_cmp_defun(VV[106]);                         /*  CMP-ENV-EXTEND-DECLARATION */
  ecl_cmp_defun(VV[107]);                         /*  CMP-ENV-REGISTER-FUNCTION */
  ecl_cmp_defun(VV[108]);                         /*  CMP-ENV-REGISTER-GLOBAL-MACRO */
  ecl_cmp_defun(VV[109]);                         /*  CMP-ENV-REGISTER-MACRO  */
  ecl_cmp_defun(VV[110]);                         /*  CMP-ENV-REGISTER-FTYPE  */
  ecl_cmp_defun(VV[111]);                         /*  CMP-ENV-REGISTER-SYMBOL-MACRO */
  ecl_cmp_defun(VV[112]);                         /*  CMP-ENV-REGISTER-SYMBOL-MACRO-FUNCTION */
  ecl_cmp_defun(VV[113]);                         /*  CMP-ENV-REGISTER-BLOCK  */
  ecl_cmp_defun(VV[114]);                         /*  CMP-ENV-REGISTER-TAG    */
  ecl_cmp_defun(VV[115]);                         /*  CMP-ENV-REGISTER-COMPILER-MACRO */
  ecl_cmp_defun(VV[116]);                         /*  CMP-ENV-REGISTER-TYPE   */
  ecl_cmp_defun(VV[117]);                         /*  CMP-ENV-REGISTER-TYPES  */
  ecl_cmp_defun(VV[118]);                         /*  REGISTER-ALL-KNOWN-TYPES */
  ecl_cmp_defun(VV[119]);                         /*  CMP-ENV-SEARCH-FUNCTION */
  ecl_cmp_defun(VV[120]);                         /*  CMP-ENV-SEARCH-VARIABLES */
  ecl_cmp_defun(VV[121]);                         /*  CMP-ENV-SEARCH-BLOCK    */
  ecl_cmp_defun(VV[122]);                         /*  CMP-ENV-SEARCH-TAG      */
  ecl_cmp_defun(VV[123]);                         /*  CMP-ENV-SEARCH-SYMBOL-MACRO */
  ecl_cmp_defun(VV[124]);                         /*  CMP-ENV-SEARCH-VAR      */
  ecl_cmp_defun(VV[125]);                         /*  CMP-ENV-SEARCH-MACRO    */
  ecl_cmp_defun(VV[126]);                         /*  CMP-MACRO-FUNCTION      */
  ecl_cmp_defun(VV[127]);                         /*  CMP-ENV-SEARCH-COMPILER-MACRO */
  ecl_cmp_defun(VV[128]);                         /*  CMP-COMPILER-MACRO-FUNCTION */
  ecl_cmp_defun(VV[129]);                         /*  CMP-ENV-SEARCH-FTYPE    */
  ecl_cmp_defun(VV[130]);                         /*  CMP-ENV-MARK            */
  ecl_cmp_defun(VV[131]);                         /*  CMP-ENV-NEW-VARIABLES   */
  ecl_cmp_defun(VV[132]);                         /*  CMP-ENV-SEARCH-DECLARATION */
  ecl_cmp_defun(VV[133]);                         /*  CMP-ENV-SEARCH-TYPE     */
}
