/* Compiler: ECL 26.3.27                                                      */
/* Source: /build/ecl/src/ecl-26.3.27/src/cmp/cmpenv-declare.lsp              */
#include <ecl/ecl-cmp.h>
#include "cmp/cmpenv-declare.eclh"
/* function definition for VALID-FORM-P                                       */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3312valid_form_p(cl_narg narg, cl_object v1x, ...)
{
 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[0]);
 if (ecl_unlikely(narg>2)) FEwrong_num_arguments(VV[0]);
 {
  cl_object v2test;
  va_list args; va_start(args,v1x);
  {
   int i = 1;
   if (i >= narg) {
    v2test = ECL_NIL;
   } else {
    i++;
    v2test = va_arg(args,cl_object);
   }
  }
  va_end(args);
  if (Null(si_proper_list_p(v1x))){
   goto L3;
  }
  value0 = ecl_make_bool(v2test==ECL_NIL);
  if (value0!=ECL_NIL) {
   goto L6;
  }
  value0 = cl_every(2, v2test, v1x);
  return value0;
L6:;
  cl_env_copy->nvalues = 1;
  return value0;
L3:;
  value0 = ECL_NIL;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
/* function definition for TYPE-NAME-P                                        */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3313type_name_p(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 = (cl_env_copy->function=ecl_fdefinition(VV[3]))->cfun.entry(2, v1name, ecl_cmp_symbol_value(cl_env_copy,VV[4])) /*  CMP-ENV-SEARCH-TYPE */;
 if (value0!=ECL_NIL) {
  goto L3;
 }
 value0 = si_get_sysprop(v1name, VV[5]);
 if (value0!=ECL_NIL) {
  goto L3;
 }
 value0 = cl_find_class(2, v1name, ECL_NIL);
 if (value0!=ECL_NIL) {
  goto L3;
 }
 value0 = si_get_sysprop(v1name, VV[6]);
 return value0;
L3:;
 cl_env_copy->nvalues = 1;
 return value0;
}
static cl_object L3313type_name_p_va(cl_narg narg, cl_object v2name, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[2]);
 {
  return L3313type_name_p(v2name);
 }
}
/* function definition for VALIDATE-ALIEN-DECLARATION                         */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3314validate_alien_declaration(cl_object v1names_list, cl_object v2error)
{
 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;
  v3 = v1names_list;
  goto L5;
L4:;
  {
   cl_object v4new_declaration;
   v4new_declaration = ecl_car(v3);
   if (ECL_SYMBOLP(v4new_declaration)) {
    goto L9;
   }
   ecl_function_dispatch(cl_env_copy,v2error)(2, VV[9], v4new_declaration);
L9:;
   if (Null(L3313type_name_p(v4new_declaration))){
    goto L11;
   }
   ecl_function_dispatch(cl_env_copy,v2error)(2, VV[10], v4new_declaration);
L11:;
  }
  v3 = ecl_cdr(v3);
L5:;
  if (Null(v3)){
   goto L15;
  }
  goto L4;
L15:;
  value0 = ECL_NIL;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
static cl_object L3314validate_alien_declaration_va(cl_narg narg, cl_object v4names_list, cl_object v5error, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[8]);
 {
  return L3314validate_alien_declaration(v4names_list, v5error);
 }
}
/* function definition for ALIEN-DECLARATION-P                                */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3315alien_declaration_p(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[12]);
 if (ecl_unlikely(narg>2)) FEwrong_num_arguments(VV[12]);
 {
  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[4]);
   } else {
    i++;
    v2env = va_arg(args,cl_object);
   }
  }
  va_end(args);
  if (!(ECL_SYMBOLP(v1name))){
   goto L3;
  }
  {
   cl_object v3;
   cl_object v4;
   cl_object v5;
   v3 = (cl_env_copy->function=ecl_fdefinition(VV[13]))->cfun.entry(3, VV[14], v2env, ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("*ALIEN-DECLARATIONS*",1662))) /*  CMP-ENV-SEARCH-DECLARATION */;
   v4 = v1name;
   v5 = v3;
   value0 = si_memq(v4,v5);
   cl_env_copy->nvalues = 1;
   return value0;
  }
L3:;
  value0 = ECL_NIL;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
/* function definition for POLICY-DECLARATION-P                               */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3316policy_declaration_p(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:;
 if (Null(ecl_gethash_safe(v1name,ecl_cmp_symbol_value(cl_env_copy,VV[17]),ECL_NIL))){
  goto L3;
 }
 value0 = ECL_T;
 cl_env_copy->nvalues = 1;
 return value0;
L3:;
 value0 = ECL_NIL;
 cl_env_copy->nvalues = 1;
 return value0;
}
static cl_object L3316policy_declaration_p_va(cl_narg narg, cl_object v2name, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[16]);
 {
  return L3316policy_declaration_p(v2name);
 }
}
/* function definition for PARSE-IGNORE-DECLARATION                           */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3317parse_ignore_declaration(cl_object v1decl_args, cl_object v2expected_ref_number, cl_object v3tail)
{
 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 v4;
  cl_object v5name;
  cl_object v6;
  {
   cl_object v7;
   v7 = v1decl_args;
   if (ecl_unlikely(!ECL_LISTP(v7))) FEtype_error_list(v7);
   value0 = ECL_NIL;
   cl_env_copy->nvalues = 0;
   v4 = v7;
  }
  v5name = ECL_NIL;
  v6 = v4;
L8:;
  if (!(ecl_endp(v6))){
   goto L10;
  }
  goto L9;
L10:;
  v5name = 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_SYMBOLP(v5name))){
   goto L19;
  }
  T0 = CONS(v5name,v2expected_ref_number);
  v3tail = CONS(T0,v3tail);
  goto L18;
L19:;
  if (!(ECL_CONSP(v5name))){
   goto L24;
  }
  {
   cl_fixnum v7;
   v7 = ecl_length(v5name);
   if (!((v7)==((cl_fixnum)(2)))){
    goto L24;
   }
  }
  T0 = ecl_car(v5name);
  if ((T0)==(ECL_SYM("FUNCTION",398))) {
   goto L18;
  }
  goto L22;
L24:;
  goto L22;
L22:;
  (cl_env_copy->function=ecl_fdefinition(VV[23]))->cfun.entry(2, VV[24], v5name) /*  CMPERR */;
L18:;
  goto L8;
L9:;
 }
 value0 = v3tail;
 cl_env_copy->nvalues = 1;
 return value0;
}
/* function definition for COLLECT-DECLARED                                   */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3318collect_declared(cl_object v1type, cl_object v2var_list, cl_object v3tail)
{
 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:;
 T0 = (ECL_SYM("SYMBOLP",850)->symbol.gfdef);
 if (L3312valid_form_p(2, v2var_list, T0)!=ECL_NIL) {
  goto L2;
 }
 T0 = cl_list(3, ECL_SYM("TYPE",872), v1type, v2var_list);
 (cl_env_copy->function=ecl_fdefinition(VV[23]))->cfun.entry(2, VV[26], T0) /*  CMPERR */;
L2:;
 {
  cl_object v4;
  cl_object v5var_name;
  cl_object v6;
  {
   cl_object v7;
   v7 = v2var_list;
   if (ecl_unlikely(!ECL_LISTP(v7))) FEtype_error_list(v7);
   value0 = ECL_NIL;
   cl_env_copy->nvalues = 0;
   v4 = v7;
  }
  v5var_name = ECL_NIL;
  v6 = v4;
L11:;
  if (!(ecl_endp(v6))){
   goto L13;
  }
  goto L12;
L13:;
  v5var_name = 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;
  }
  T0 = CONS(v5var_name,v1type);
  v3tail = CONS(T0,v3tail);
  goto L11;
L12:;
 }
 value0 = v3tail;
 cl_env_copy->nvalues = 1;
 return value0;
}
/* function definition for C1BODY                                             */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3319c1body(cl_object v1body, cl_object v2doc_p)
{
 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;                                   /*  ALL-DECLARATIONS        */
  cl_object v4;                                   /*  BODY                    */
  cl_object v5;                                   /*  DOC                     */
  cl_object v6;                                   /*  SPECIALS                */
  value0 = si_process_declarations(2, v1body, v2doc_p);
  {
   const int v7 = cl_env_copy->nvalues;
   v3 = value0;
   cl_object v8;
   v8 = (v7<=1)? ECL_NIL : cl_env_copy->values[1];
   v4 = v8;
   v8 = (v7<=2)? ECL_NIL : cl_env_copy->values[2];
   v5 = v8;
   v8 = (v7<=3)? ECL_NIL : cl_env_copy->values[3];
   v6 = v8;
  }
  {
   cl_object v7others;
   v7others = ECL_NIL;
   {
    cl_object v8types;
    v8types = ECL_NIL;
    {
     cl_object v9ignored;
     v9ignored = ECL_NIL;
     {
      cl_object v10;
      cl_object v11decl;
      cl_object v12;
      {
       cl_object v13;
       v13 = v3;
       if (ecl_unlikely(!ECL_LISTP(v13))) FEtype_error_list(v13);
       value0 = ECL_NIL;
       cl_env_copy->nvalues = 0;
       v10 = v13;
      }
      v11decl = ECL_NIL;
      v12 = v10;
      {
       cl_object v13decl_name;
       v13decl_name = ECL_NIL;
       {
        cl_object v14decl_args;
        v14decl_args = ECL_NIL;
L13:;
        if (!(ecl_endp(v12))){
         goto L15;
        }
        goto L14;
L15:;
        v11decl = ECL_CONS_CAR(v12);
        {
         cl_object v15;
         v15 = ECL_CONS_CDR(v12);
         if (ecl_unlikely(!ECL_LISTP(v15))) FEtype_error_list(v15);
         value0 = ECL_NIL;
         cl_env_copy->nvalues = 0;
         v12 = v15;
        }
        v13decl_name = ecl_car(v11decl);
        v14decl_args = ecl_cdr(v11decl);
        if (Null(L3312valid_form_p(1, v14decl_args))){
         goto L30;
        }
        if (ECL_SYMBOLP(v13decl_name)) {
         goto L27;
        }
        if (!(ECL_CONSP(v13decl_name))){
         goto L34;
        }
        if ((cl_env_copy->function=ecl_fdefinition(VV[28]))->cfun.entry(1, v13decl_name) /*  VALID-TYPE-SPECIFIER */!=ECL_NIL) {
         goto L27;
        }
        goto L28;
L34:;
        goto L28;
L30:;
        goto L28;
L28:;
        (cl_env_copy->function=ecl_fdefinition(VV[23]))->cfun.entry(2, VV[26], v11decl) /*  CMPERR */;
L27:;
        if ((v13decl_name)==(ECL_SYM("SPECIAL",792))) {
         goto L36;
        }
        if (!((v13decl_name)==(ECL_SYM("IGNORE",430)))){
         goto L38;
        }
        if (L3312valid_form_p(1, v14decl_args)!=ECL_NIL) {
         goto L40;
        }
        (cl_env_copy->function=ecl_fdefinition(VV[23]))->cfun.entry(2, VV[26], v11decl) /*  CMPERR */;
L40:;
        v9ignored = L3317parse_ignore_declaration(v14decl_args, ecl_make_int8_t(-1), v9ignored);
        goto L36;
L38:;
        if (!((v13decl_name)==(ECL_SYM("IGNORABLE",429)))){
         goto L43;
        }
        if (L3312valid_form_p(1, v14decl_args)!=ECL_NIL) {
         goto L45;
        }
        (cl_env_copy->function=ecl_fdefinition(VV[23]))->cfun.entry(2, VV[26], v11decl) /*  CMPERR */;
L45:;
        v9ignored = L3317parse_ignore_declaration(v14decl_args, ecl_make_int8_t(0), v9ignored);
        goto L36;
L43:;
        if (!((v13decl_name)==(ECL_SYM("TYPE",872)))){
         goto L48;
        }
        if (!(ECL_CONSP(v14decl_args))){
         goto L53;
        }
        T0 = ecl_cdr(v14decl_args);
        T1 = (ECL_SYM("SYMBOLP",850)->symbol.gfdef);
        if (L3312valid_form_p(2, T0, T1)!=ECL_NIL) {
         goto L50;
        }
        goto L51;
L53:;
        goto L51;
L51:;
        (cl_env_copy->function=ecl_fdefinition(VV[23]))->cfun.entry(2, VV[26], v11decl) /*  CMPERR */;
L50:;
        T0 = ecl_car(v14decl_args);
        T1 = ecl_cdr(v14decl_args);
        v8types = L3318collect_declared(T0, T1, v8types);
        goto L36;
L48:;
        if (!((v13decl_name)==(VV[29]))){
         goto L57;
        }
        T0 = (ECL_SYM("SYMBOLP",850)->symbol.gfdef);
        if (L3312valid_form_p(2, v14decl_args, T0)!=ECL_NIL) {
         goto L59;
        }
        (cl_env_copy->function=ecl_fdefinition(VV[23]))->cfun.entry(2, VV[26], v11decl) /*  CMPERR */;
L59:;
        v8types = L3318collect_declared(VV[29], v14decl_args, v8types);
        goto L36;
L57:;
        {
         cl_object v15;
         cl_object v16;
         v15 = v13decl_name;
         v16 = VV[30];
         if (Null(ecl_memql(v15,v16))){
          goto L63;
         }
        }
        v7others = CONS(v11decl,v7others);
        goto L36;
L63:;
        if ((v13decl_name)==(ECL_SYM("FUNCTION-BLOCK-NAME",1091))) {
         goto L36;
        }
        if (L3315alien_declaration_p(1, v13decl_name)!=ECL_NIL) {
         goto L71;
        }
        if (Null(L3316policy_declaration_p(v13decl_name))){
         goto L69;
        }
        goto L70;
L71:;
L70:;
        v7others = CONS(v11decl,v7others);
        goto L36;
L69:;
        {
         cl_object v15;                           /*  OK                      */
         cl_object v16;                           /*  TYPE                    */
         if (Null((cl_env_copy->function=ecl_fdefinition(VV[31]))->cfun.entry(1, v13decl_name) /*  MACHINE-C-TYPE-P */)){
          goto L75;
         }
         cl_env_copy->nvalues = 2;
         cl_env_copy->values[1] = v13decl_name;
         cl_env_copy->values[0] = ECL_T;
         value0 = cl_env_copy->values[0];
         goto L74;
L75:;
         value0 = (cl_env_copy->function=ecl_fdefinition(VV[28]))->cfun.entry(1, v13decl_name) /*  VALID-TYPE-SPECIFIER */;
L74:;
         {
          const int v17 = cl_env_copy->nvalues;
          v15 = value0;
          cl_object v18;
          v18 = (v17<=1)? ECL_NIL : cl_env_copy->values[1];
          v16 = v18;
         }
         if (!(v15==ECL_NIL)){
          goto L77;
         }
         (cl_env_copy->function=ecl_fdefinition(VV[32]))->cfun.entry(2, VV[33], v13decl_name) /*  CMPWARN */;
         goto L36;
L77:;
         v8types = L3318collect_declared(v16, v14decl_args, v8types);
        }
L36:;
        goto L13;
L14:;
        T0 = cl_nreverse(v7others);
        cl_env_copy->nvalues = 7;
        cl_env_copy->values[6] = v3;
        cl_env_copy->values[5] = v5;
        cl_env_copy->values[4] = T0;
        cl_env_copy->values[3] = v9ignored;
        cl_env_copy->values[2] = v8types;
        cl_env_copy->values[1] = v6;
        cl_env_copy->values[0] = v4;
        return cl_env_copy->values[0];
       }
      }
     }
    }
   }
  }
 }
}
static cl_object L3319c1body_va(cl_narg narg, cl_object v3body, cl_object v4doc_p, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[27]);
 {
  return L3319c1body(v3body, v4doc_p);
 }
}
/* function definition for ADD-ONE-DECLARATION                                */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3320add_one_declaration(cl_object v1env, cl_object v2decl)
{
 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;
  v3 = ecl_car(v2decl);
  if (!((v3)==(ECL_SYM("OPTIMIZE",615)))){
   goto L3;
  }
  T0 = ecl_cdr(v2decl);
  value0 = (cl_env_copy->function=ecl_fdefinition(VV[36]))->cfun.entry(2, T0, v1env) /*  CMP-ENV-ADD-OPTIMIZATIONS */;
  return value0;
L3:;
  if (!((v3)==(VV[37]))){
   goto L5;
  }
  {
   cl_object v4flag;
   value0 = ecl_cdr(v2decl);
   if (value0!=ECL_NIL) {
    goto L9;
   }
   v4flag = VV[38];
   goto L7;
L9:;
   v4flag = value0;
   goto L7;
L7:;
   if (Null(ecl_cmp_symbol_value(cl_env_copy,VV[39]))){
    goto L11;
   }
   T0 = (cl_env_copy->function=ecl_fdefinition(VV[41]))->cfun.entry(1, ecl_cmp_symbol_value(cl_env_copy,VV[39])) /*  FUN-CMP-ENV */;
   (cl_env_copy->function=ecl_fdefinition(VV[40]))->cfun.entry(3, VV[37], v4flag, T0) /*  CMP-ENV-ADD-DECLARATION */;
   value0 = v1env;
   cl_env_copy->nvalues = 1;
   return value0;
L11:;
   value0 = (cl_env_copy->function=ecl_fdefinition(VV[40]))->cfun.entry(3, VV[37], v4flag, v1env) /*  CMP-ENV-ADD-DECLARATION */;
   return value0;
  }
L5:;
  if (!((v3)==(ECL_SYM("FTYPE",395)))){
   goto L14;
  }
  T0 = ecl_cdr(v2decl);
  if (!(ECL_ATOM(T0))){
   goto L17;
  }
  (cl_env_copy->function=ecl_fdefinition(VV[32]))->cfun.entry(2, VV[42], v2decl) /*  CMPWARN */;
  goto L16;
L17:;
  {
   cl_object v5;                                  /*  TYPE-NAME               */
   cl_object v6;                                  /*  ARGS                    */
   T0 = ecl_cadr(v2decl);
   value0 = (cl_env_copy->function=(VV[43]->symbol.gfdef))->cfun.entry(2, T0, v1env) /*  NORMALIZE-TYPE */;
   {
    const int v7 = cl_env_copy->nvalues;
    v5 = value0;
    cl_object v8;
    v8 = (v7<=1)? ECL_NIL : cl_env_copy->values[1];
    v6 = v8;
   }
   if (!((v5)==(ECL_SYM("FUNCTION",398)))){
    goto L20;
   }
   {
    cl_object v7;
    v7 = ecl_cddr(v2decl);
    goto L25;
L24:;
    {
     cl_object v8v;
     v8v = ecl_car(v7);
     v1env = (cl_env_copy->function=ecl_fdefinition(VV[44]))->cfun.entry(3, v8v, v6, v1env) /*  ADD-FUNCTION-DECLARATION */;
    }
    v7 = ecl_cdr(v7);
L25:;
    if (Null(v7)){
     goto L33;
    }
    goto L24;
L33:;
    goto L16;
   }
L20:;
   T0 = ecl_cadr(v2decl);
   (cl_env_copy->function=ecl_fdefinition(VV[32]))->cfun.entry(2, VV[45], T0) /*  CMPWARN */;
  }
L16:;
  value0 = v1env;
  cl_env_copy->nvalues = 1;
  return value0;
L14:;
  if (!((v3)==(ECL_SYM("INLINE",436)))){
   goto L35;
  }
  {
   cl_object v5;
   cl_object v6name;
   cl_object v7;
   {
    cl_object v8;
    v8 = ecl_cdr(v2decl);
    if (ecl_unlikely(!ECL_LISTP(v8))) FEtype_error_list(v8);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
    v5 = v8;
   }
   v6name = ECL_NIL;
   v7 = v5;
L43:;
   if (!(ecl_endp(v7))){
    goto L45;
   }
   goto L44;
L45:;
   v6name = 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;
   }
   v1env = (cl_env_copy->function=ecl_fdefinition(VV[46]))->cfun.entry(2, v6name, v1env) /*  DECLARE-INLINE */;
   goto L43;
L44:;
  }
  value0 = v1env;
  cl_env_copy->nvalues = 1;
  return value0;
L35:;
  if (!((v3)==(ECL_SYM("NOTINLINE",589)))){
   goto L56;
  }
  {
   cl_object v5;
   cl_object v6name;
   cl_object v7;
   {
    cl_object v8;
    v8 = ecl_cdr(v2decl);
    if (ecl_unlikely(!ECL_LISTP(v8))) FEtype_error_list(v8);
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 0;
    v5 = v8;
   }
   v6name = ECL_NIL;
   v7 = v5;
L64:;
   if (!(ecl_endp(v7))){
    goto L66;
   }
   goto L65;
L66:;
   v6name = 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;
   }
   v1env = (cl_env_copy->function=ecl_fdefinition(VV[47]))->cfun.entry(2, v6name, v1env) /*  DECLARE-NOTINLINE */;
   goto L64;
L65:;
  }
  value0 = v1env;
  cl_env_copy->nvalues = 1;
  return value0;
L56:;
  if (!((v3)==(ECL_SYM("DECLARATION",275)))){
   goto L77;
  }
  T0 = ecl_cdr(v2decl);
  T1 = ecl_fdefinition(VV[23]);
  L3314validate_alien_declaration(T0, T1);
  T0 = ecl_cdr(v2decl);
  value0 = (cl_env_copy->function=ecl_fdefinition(VV[48]))->cfun.entry(4, VV[14], T0, v1env, ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("*ALIEN-DECLARATIONS*",1662))) /*  CMP-ENV-EXTEND-DECLARATION */;
  return value0;
L77:;
  if (!((v3)==(VV[50]))){
   goto L86;
  }
  goto L83;
L86:;
  goto L84;
L84:;
  if (!((v3)==(VV[51]))){
   goto L90;
  }
  goto L83;
L90:;
  goto L88;
L88:;
  if (!((v3)==(VV[53]))){
   goto L94;
  }
  goto L83;
L94:;
  goto L92;
L92:;
  if (!((v3)==(VV[55]))){
   goto L81;
  }
  goto L82;
L83:;
L82:;
  value0 = v1env;
  cl_env_copy->nvalues = 1;
  return value0;
L81:;
  if (!((v3)==(ECL_SYM("DYNAMIC-EXTENT",322)))){
   goto L102;
  }
  goto L99;
L102:;
  goto L100;
L100:;
  if (!((v3)==(ECL_SYM("IGNORABLE",429)))){
   goto L106;
  }
  goto L99;
L106:;
  goto L104;
L104:;
  if (!((v3)==(ECL_SYM("FUNCTION-BLOCK-NAME",1091)))){
   goto L97;
  }
  goto L98;
L99:;
L98:;
  value0 = v1env;
  cl_env_copy->nvalues = 1;
  return value0;
L97:;
  T0 = ecl_car(v2decl);
  if (Null(L3315alien_declaration_p(2, T0, v1env))){
   goto L109;
  }
  value0 = v1env;
  cl_env_copy->nvalues = 1;
  return value0;
L109:;
  {
   cl_object v5;
   v5 = (cl_env_copy->function=ecl_fdefinition(VV[60]))->cfun.entry(2, v2decl, v1env) /*  MAYBE-ADD-POLICY */;
   if (Null(v5)){
    goto L112;
   }
   value0 = v5;
   cl_env_copy->nvalues = 1;
   return value0;
L112:;
   T0 = ecl_car(v2decl);
   (cl_env_copy->function=ecl_fdefinition(VV[32]))->cfun.entry(2, VV[61], T0) /*  CMPWARN */;
   value0 = v1env;
   cl_env_copy->nvalues = 1;
   return value0;
  }
 }
}
static cl_object L3320add_one_declaration_va(cl_narg narg, cl_object v6env, cl_object v7decl, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[35]);
 {
  return L3320add_one_declaration(v6env, v7decl);
 }
}
/* function definition for SYMBOL-MACRO-DECLARATION-P                         */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3321symbol_macro_declaration_p(cl_object v1name, cl_object v2type)
{
 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 v3record;
  v3record = (cl_env_copy->function=ecl_fdefinition(VV[64]))->cfun.entry(1, v1name) /*  CMP-ENV-SEARCH-SYMBOL-MACRO */;
  if (Null(v3record)){
   goto L3;
  }
  {
   cl_object v4expression;
   v4expression = ecl_function_dispatch(cl_env_copy,v3record)(2, v1name, ECL_NIL);
   T0 = cl_list(3, ECL_SYM("THE",859), v2type, v4expression);
   (cl_env_copy->function=ecl_fdefinition(VV[65]))->cfun.entry(2, v1name, T0) /*  CMP-ENV-REGISTER-SYMBOL-MACRO */;
  }
  value0 = ECL_T;
  cl_env_copy->nvalues = 1;
  return value0;
L3:;
  value0 = ECL_NIL;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
static cl_object L3321symbol_macro_declaration_p_va(cl_narg narg, cl_object v4name, cl_object v5type, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[63]);
 {
  return L3321symbol_macro_declaration_p(v4name, v5type);
 }
}
/* function definition for CHECK-VDECL                                        */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3322check_vdecl(cl_object v1vnames, cl_object v2ts, cl_object v3is)
{
 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 v4;
  cl_object v5name;
  cl_object v6type;
  cl_object v7;
  {
   cl_object v8;
   v8 = v2ts;
   if (ecl_unlikely(!ECL_LISTP(v8))) FEtype_error_list(v8);
   value0 = ECL_NIL;
   cl_env_copy->nvalues = 0;
   v4 = v8;
  }
  v5name = ECL_NIL;
  v6type = ECL_NIL;
  v7 = v4;
L9:;
  if (!(ecl_endp(v7))){
   goto L11;
  }
  goto L10;
L11:;
  {
   cl_object v8;
   v8 = ECL_CONS_CAR(v7);
   v5name = ecl_car(v8);
   v8 = ecl_cdr(v8);
   v6type = v8;
  }
  {
   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;
  }
  {
   cl_object v8;
   cl_object v9;
   cl_object v10;
   v8 = (ECL_SYM("EQ",335)->symbol.gfdef);
   v9 = v5name;
   v10 = v1vnames;
   if (si_memq(v9,v10)!=ECL_NIL) {
    goto L24;
   }
  }
  if (L3321symbol_macro_declaration_p(v5name, v6type)!=ECL_NIL) {
   goto L24;
  }
  if ((cl_env_copy->function=ecl_fdefinition(VV[68]))->cfun.entry(1, v5name) /*  CMP-ENV-SEARCH-VAR */!=ECL_NIL) {
   goto L24;
  }
  (cl_env_copy->function=ecl_fdefinition(VV[32]))->cfun.entry(3, VV[69], v6type, v5name) /*  CMPWARN */;
L24:;
  goto L9;
L10:;
 }
 {
  cl_object v4;
  cl_object v5name;
  cl_object v6expected_uses;
  cl_object v7;
  {
   cl_object v8;
   v8 = v3is;
   if (ecl_unlikely(!ECL_LISTP(v8))) FEtype_error_list(v8);
   value0 = ECL_NIL;
   cl_env_copy->nvalues = 0;
   v4 = v8;
  }
  v5name = ECL_NIL;
  v6expected_uses = ECL_NIL;
  v7 = v4;
L38:;
  if (!(ecl_endp(v7))){
   goto L40;
  }
  goto L39;
L40:;
  {
   cl_object v8;
   v8 = ECL_CONS_CAR(v7);
   v5name = ecl_car(v8);
   v8 = ecl_cdr(v8);
   v6expected_uses = v8;
  }
  {
   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;
  }
  {
   cl_object v8;
   cl_object v9;
   cl_object v10;
   v8 = (ECL_SYM("EQ",335)->symbol.gfdef);
   v9 = v5name;
   v10 = v1vnames;
   if (si_memq(v9,v10)!=ECL_NIL) {
    goto L53;
   }
  }
  if ((cl_env_copy->function=ecl_fdefinition(VV[64]))->cfun.entry(1, v5name) /*  CMP-ENV-SEARCH-SYMBOL-MACRO */!=ECL_NIL) {
   goto L53;
  }
  if ((cl_env_copy->function=ecl_fdefinition(VV[70]))->cfun.entry(1, v5name) /*  CMP-ENV-SEARCH-MACRO */!=ECL_NIL) {
   goto L53;
  }
  if (!(ecl_minusp(v6expected_uses))){
   goto L61;
  }
  T0 = VV[71];
  goto L60;
L61:;
  T0 = VV[72];
L60:;
  (cl_env_copy->function=ecl_fdefinition(VV[32]))->cfun.entry(2, T0, v5name) /*  CMPWARN */;
L53:;
  goto L38;
L39:;
  value0 = ECL_NIL;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
static cl_object L3322check_vdecl_va(cl_narg narg, cl_object v8vnames, cl_object v9ts, cl_object v10is, ...)
{
 if (ecl_unlikely(narg!=3)) FEwrong_num_arguments(VV[67]);
 {
  return L3322check_vdecl(v8vnames, v9ts, v10is);
 }
}
#include "cmp/cmpenv-declare.data"
#ifdef __cplusplus
extern "C"
#endif

ECL_DLLEXPORT void _ecl4cTjszxEy6ko9_ZIQ0M881(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-DECLARE.LSP.NEWEST",-1);
 return;}
 #ifdef ECL_DYNAMIC_VV
 VV = Cblock->cblock.data;
 #endif
 Cblock->cblock.data_text = (const cl_object *)"@EcLtAg:_ecl4cTjszxEy6ko9_ZIQ0M881@";
 VVtemp = Cblock->cblock.temp_data;
 ECL_DEFINE_SETF_FUNCTIONS
/* MAKE-LOAD-FORMs                                                            */
/* TOP-LEVEL-FORMs                                                            */
  si_select_package(VVtemp[0]);
  ecl_cmp_defun(VV[74]);                          /*  VALID-FORM-P            */
  ecl_cmp_defun(VV[75]);                          /*  TYPE-NAME-P             */
  ecl_cmp_defun(VV[76]);                          /*  VALIDATE-ALIEN-DECLARATION */
  ecl_cmp_defun(VV[77]);                          /*  ALIEN-DECLARATION-P     */
  ecl_cmp_defun(VV[78]);                          /*  POLICY-DECLARATION-P    */
  (void)0; /* No entry created for PARSE-IGNORE-DECLARATION */
  (void)0; /* No entry created for COLLECT-DECLARED */
  ecl_cmp_defun(VV[79]);                          /*  C1BODY                  */
  ecl_cmp_defun(VV[80]);                          /*  ADD-ONE-DECLARATION     */
  ecl_cmp_defun(VV[81]);                          /*  SYMBOL-MACRO-DECLARATION-P */
  ecl_cmp_defun(VV[82]);                          /*  CHECK-VDECL             */
}
