/* Compiler: ECL 26.3.27                                                      */
/* Source: /build/ecl/src/ecl-26.3.27/src/cmp/cmpenv-proclaim.lsp             */
#include <ecl/ecl-cmp.h>
#include "cmp/cmpenv-proclaim.eclh"
/* function definition for PROCLAIM                                           */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3323proclaim(cl_object v1decl)
{
 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 v2decl_name;
  v2decl_name = ECL_NIL;
  if (ECL_LISTP(v1decl)) {
   goto L3;
  }
  cl_error(2, VV[0], v1decl);
L3:;
  {
   cl_object v3;
   v2decl_name = ecl_car(v1decl);
   v3 = v2decl_name;
   if (!((v3)==(ECL_SYM("SPECIAL",792)))){
    goto L7;
   }
   {
    cl_object v4;
    v4 = ecl_cdr(v1decl);
    goto L12;
L11:;
    {
     cl_object v5var;
     v5var = ecl_car(v4);
     if (!(ECL_SYMBOLP(v5var))){
      goto L17;
     }
     si_Xmake_special(v5var);
     goto L16;
L17:;
     cl_error(2, VV[1], v1decl);
L16:;
    }
    v4 = ecl_cdr(v4);
L12:;
    if (Null(v4)){
     goto L21;
    }
    goto L11;
L21:;
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 1;
    return value0;
   }
L7:;
   if (!((v3)==(ECL_SYM("OPTIMIZE",615)))){
    goto L23;
   }
   {
    cl_object v5;
    v5 = ecl_cdr(v1decl);
    goto L28;
L27:;
    {
     cl_object v6x;
     v6x = ecl_car(v5);
     if (!(ECL_SYMBOLP(v6x))){
      goto L32;
     }
     v6x = cl_list(2, v6x, ecl_make_int8_t(3));
L32:;
     if (!(ECL_CONSP(v6x))){
      goto L38;
     }
     T0 = ecl_cdr(v6x);
     if (!(ECL_CONSP(T0))){
      goto L38;
     }
     T0 = ecl_cadr(v6x);
     if (!(ecl_numberp(T0))){
      goto L38;
     }
     T0 = ecl_cadr(v6x);
     if (cl_LE(3, ecl_make_int8_t(0), T0, ecl_make_int8_t(3))!=ECL_NIL) {
      goto L36;
     }
     goto L37;
L38:;
L37:;
     (cl_env_copy->function=(ECL_SYM("WARN",907)->symbol.gfdef))->cfun.entry(2, VV[2], v6x) /*  WARN */;
     goto L35;
L36:;
     {
      cl_object v7;
      v7 = ecl_car(v6x);
      if (!((v7)==(ECL_SYM("DEBUG",272)))){
       goto L43;
      }
      T0 = ecl_cadr(v6x);
      ecl_cmp_setq(cl_env_copy,VV[3],T0);
      goto L35;
L43:;
      if (!((v7)==(ECL_SYM("SAFETY",737)))){
       goto L46;
      }
      T0 = ecl_cadr(v6x);
      ecl_cmp_setq(cl_env_copy,VV[4],T0);
      goto L35;
L46:;
      if (!((v7)==(ECL_SYM("SPACE",791)))){
       goto L49;
      }
      T0 = ecl_cadr(v6x);
      ecl_cmp_setq(cl_env_copy,VV[5],T0);
      goto L35;
L49:;
      if (!((v7)==(ECL_SYM("SPEED",794)))){
       goto L52;
      }
      T0 = ecl_cadr(v6x);
      ecl_cmp_setq(cl_env_copy,VV[6],T0);
      goto L35;
L52:;
      if (!((v7)==(ECL_SYM("COMPILATION-SPEED",234)))){
       goto L55;
      }
      T0 = ecl_cadr(v6x);
      ecl_cmp_setq(cl_env_copy,VV[7],T0);
      goto L35;
L55:;
      T0 = ecl_car(v6x);
      (cl_env_copy->function=(ECL_SYM("WARN",907)->symbol.gfdef))->cfun.entry(2, VV[8], T0) /*  WARN */;
     }
L35:;
    }
    v5 = ecl_cdr(v5);
L28:;
    if (Null(v5)){
     goto L60;
    }
    goto L27;
L60:;
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 1;
    return value0;
   }
L23:;
   if (!((v3)==(ECL_SYM("TYPE",872)))){
    goto L62;
   }
   T0 = ecl_cdr(v1decl);
   if (!(ECL_CONSP(T0))){
    goto L64;
   }
   T0 = ecl_cadr(v1decl);
   T1 = ecl_cddr(v1decl);
   value0 = L3324proclaim_var(T0, T1);
   return value0;
L64:;
   value0 = cl_error(2, VV[1], v1decl);
   return value0;
L62:;
   if (!((v3)==(ECL_SYM("FTYPE",395)))){
    goto L66;
   }
   T0 = ecl_cdr(v1decl);
   if (!(ECL_ATOM(T0))){
    goto L68;
   }
   value0 = cl_error(2, VV[10], v1decl);
   return value0;
L68:;
   {
    cl_object v6;                                 /*  TYPE-NAME               */
    cl_object v7;                                 /*  ARGS                    */
    T0 = ecl_cadr(v1decl);
    value0 = (cl_env_copy->function=(VV[11]->symbol.gfdef))->cfun.entry(2, T0, ecl_cmp_symbol_value(cl_env_copy,VV[12])) /*  NORMALIZE-TYPE */;
    {
     const int v8 = cl_env_copy->nvalues;
     v6 = value0;
     cl_object v9;
     v9 = (v8<=1)? ECL_NIL : cl_env_copy->values[1];
     v7 = v9;
    }
    if (!((v6)==(ECL_SYM("FUNCTION",398)))){
     goto L71;
    }
    {
     cl_object v8;
     v8 = ecl_cddr(v1decl);
     goto L76;
L75:;
     {
      cl_object v9v;
      v9v = ecl_car(v8);
      (cl_env_copy->function=ecl_fdefinition(VV[13]))->cfun.entry(2, v9v, v7) /*  PROCLAIM-FUNCTION */;
     }
     v8 = ecl_cdr(v8);
L76:;
     if (Null(v8)){
      goto L83;
     }
     goto L75;
L83:;
     value0 = ECL_NIL;
     cl_env_copy->nvalues = 1;
     return value0;
    }
L71:;
    T0 = ecl_cadr(v1decl);
    value0 = cl_error(2, VV[14], T0);
    return value0;
   }
L66:;
   if (!((v3)==(ECL_SYM("INLINE",436)))){
    goto L85;
   }
   T0 = ecl_cdr(v1decl);
   value0 = (cl_env_copy->function=ecl_fdefinition(VV[15]))->cfun.entry(1, T0) /*  PROCLAIM-INLINE */;
   return value0;
L85:;
   if (!((v3)==(ECL_SYM("NOTINLINE",589)))){
    goto L87;
   }
   T0 = ecl_cdr(v1decl);
   value0 = (cl_env_copy->function=ecl_fdefinition(VV[16]))->cfun.entry(1, T0) /*  PROCLAIM-NOTINLINE */;
   return value0;
L87:;
   if (!((v3)==(VV[18]))){
    goto L94;
   }
   goto L91;
L94:;
   goto L92;
L92:;
   if (!((v3)==(ECL_SYM("IGNORE",430)))){
    goto L98;
   }
   goto L91;
L98:;
   goto L96;
L96:;
   if (!((v3)==(ECL_SYM("DYNAMIC-EXTENT",322)))){
    goto L102;
   }
   goto L91;
L102:;
   goto L100;
L100:;
   if (!((v3)==(ECL_SYM("IGNORABLE",429)))){
    goto L89;
   }
   goto L90;
L91:;
L90:;
   {
    cl_object v6;
    v6 = ecl_cdr(v1decl);
    goto L108;
L107:;
    {
     cl_object v7var;
     v7var = ecl_car(v6);
     if (si_valid_function_name_p(v7var)!=ECL_NIL) {
      goto L112;
     }
     cl_error(3, VV[22], v7var, v2decl_name);
L112:;
    }
    v6 = ecl_cdr(v6);
L108:;
    if (Null(v6)){
     goto L116;
    }
    goto L107;
L116:;
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 1;
    return value0;
   }
L89:;
   if (!((v3)==(ECL_SYM("DECLARATION",275)))){
    goto L118;
   }
   T0 = ecl_cdr(v1decl);
   T1 = (ECL_SYM("ERROR",339)->symbol.gfdef);
   (cl_env_copy->function=ecl_fdefinition(VV[23]))->cfun.entry(2, T0, T1) /*  VALIDATE-ALIEN-DECLARATION */;
   T0 = ecl_cdr(v1decl);
   T1 = ecl_append(T0,ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("*ALIEN-DECLARATIONS*",1662)));
   ecl_cmp_setq(cl_env_copy,ECL_SYM("*ALIEN-DECLARATIONS*",1662),T1);
   value0 = ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("*ALIEN-DECLARATIONS*",1662));
   cl_env_copy->nvalues = 1;
   return value0;
L118:;
   if (!((v3)==(VV[24]))){
    goto L123;
   }
   {
    cl_object v7;
    v7 = ecl_cdr(v1decl);
    goto L128;
L127:;
    {
     cl_object v8x;
     v8x = ecl_car(v7);
     if (!(ECL_SYMBOLP(v8x))){
      goto L133;
     }
     {
      cl_object v9;                               /*  FOUND                   */
      cl_object v10;                              /*  C-NAME                  */
      value0 = si_mangle_name(2, v8x, ECL_T);
      {
       const int v11 = cl_env_copy->nvalues;
       v9 = value0;
       cl_object v12;
       v12 = (v11<=1)? ECL_NIL : cl_env_copy->values[1];
       v10 = v12;
      }
      if (Null(v9)){
       goto L136;
      }
      cl_error(2, VV[25], v8x);
      goto L132;
L136:;
      si_put_sysprop(v8x, VV[26], v10);
      goto L132;
     }
L133:;
     if (!(ECL_CONSP(v8x))){
      goto L138;
     }
     {
      cl_object v9;
      cl_object v10c_name;
      cl_object v11lisp_name;
      v9 = v8x;
      if (!(v9==ECL_NIL)){
       goto L142;
      }
      si_dm_too_few_arguments(v8x);
L142:;
      {
       cl_object v12;
       v12 = ecl_car(v9);
       v9 = ecl_cdr(v9);
       v10c_name = v12;
      }
      if (!(v9==ECL_NIL)){
       goto L148;
      }
      si_dm_too_few_arguments(v8x);
L148:;
      {
       cl_object v12;
       v12 = ecl_car(v9);
       v9 = ecl_cdr(v9);
       v11lisp_name = v12;
      }
      if (Null(v9)){
       goto L153;
      }
      si_dm_too_many_arguments(v8x);
L153:;
      if (Null(si_mangle_name(1, v11lisp_name))){
       goto L155;
      }
      cl_error(2, VV[25], v11lisp_name);
      goto L132;
L155:;
      si_put_sysprop(v11lisp_name, VV[26], v10c_name);
      goto L132;
     }
L138:;
     cl_error(2, VV[1], v1decl);
L132:;
    }
    v7 = ecl_cdr(v7);
L128:;
    if (Null(v7)){
     goto L159;
    }
    goto L127;
L159:;
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 1;
    return value0;
   }
L123:;
   {
    cl_object v8;
    cl_object v9;
    v8 = v3;
    v9 = VV[29];
    if (Null(ecl_memql(v8,v9))){
     goto L161;
    }
   }
   T0 = ecl_cdr(v1decl);
   value0 = L3324proclaim_var(v2decl_name, T0);
   return value0;
L161:;
   {
    cl_object v8;
    {
     cl_object v9;
     cl_object v10;
     cl_object v11;
     cl_object v12;
     v9 = ecl_car(v1decl);
     v10 = ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("*ALIEN-DECLARATIONS*",1662));
     v11 = v9;
     v12 = v10;
     v8 = ecl_memql(v11,v12);
    }
    if (Null(v8)){
     goto L170;
    }
    value0 = v8;
    cl_env_copy->nvalues = 1;
    return value0;
L170:;
    {
     cl_object v9;
     {
      cl_object v10;                              /*  OK                      */
      cl_object v11;                              /*  TYPE                    */
      value0 = (cl_env_copy->function=ecl_fdefinition(VV[30]))->cfun.entry(1, v2decl_name) /*  VALID-TYPE-SPECIFIER */;
      {
       const int v12 = cl_env_copy->nvalues;
       v10 = value0;
       cl_object v13;
       v13 = (v12<=1)? ECL_NIL : cl_env_copy->values[1];
       v11 = v13;
      }
      if (Null(v10)){
       goto L174;
      }
      T0 = ecl_cdr(v1decl);
      L3324proclaim_var(v11, T0);
      v9 = ECL_T;
      goto L172;
L174:;
      v9 = ECL_NIL;
     }
L172:;
     if (Null(v9)){
      goto L177;
     }
     value0 = v9;
     cl_env_copy->nvalues = 1;
     return value0;
L177:;
     {
      cl_object v10;
      v10 = (cl_env_copy->function=ecl_fdefinition(VV[31]))->cfun.entry(2, v1decl, ecl_cmp_symbol_value(cl_env_copy,VV[32])) /*  MAYBE-ADD-POLICY */;
      if (Null(v10)){
       goto L180;
      }
      value0 = v10;
      cl_env_copy->nvalues = 1;
      return value0;
L180:;
      {
       cl_object v11;
       {
        cl_object v12proclaimer;
        T0 = ecl_car(v1decl);
        v12proclaimer = si_get_sysprop(T0, VV[33]);
        if (Null(cl_functionp(v12proclaimer))){
         goto L184;
        }
        {
         cl_object v13;
         v13 = ecl_cdr(v1decl);
         {
          cl_object v14;
          cl_object v15;
          cl_object v16;
          {
          cl_object v17;
          v17 = v13;
          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;
L193:;
          if (!(ecl_endp(v16))){
          goto L195;
          }
          goto L194;
L195:;
          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,v12proclaimer)(1, v15);
          goto L193;
L194:;
          goto L186;
         }
        }
L186:;
        v11 = ECL_T;
        goto L182;
L184:;
        v11 = ECL_NIL;
       }
L182:;
       if (Null(v11)){
        goto L206;
       }
       value0 = v11;
       cl_env_copy->nvalues = 1;
       return value0;
L206:;
       value0 = (cl_env_copy->function=(ECL_SYM("WARN",907)->symbol.gfdef))->cfun.entry(2, VV[36], v2decl_name) /*  WARN */;
       return value0;
      }
     }
    }
   }
  }
 }
}
static cl_object L3323proclaim_va(cl_narg narg, cl_object v12decl, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[37]);
 {
  return L3323proclaim(v12decl);
 }
}
/* function definition for PROCLAIM-VAR                                       */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3324proclaim_var(cl_object v1type, cl_object v2vl)
{
 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 = v2vl;
  goto L5;
L4:;
  {
   cl_object v4var;
   v4var = ecl_car(v3);
   if (!(ECL_SYMBOLP(v4var))){
    goto L10;
   }
   {
    cl_object v5type1;
    v5type1 = si_get_sysprop(v4var, VV[38]);
    if (Null(v5type1)){
     goto L15;
    }
    v5type1 = (cl_env_copy->function=ecl_fdefinition(VV[39]))->cfun.entry(2, v5type1, v1type) /*  TYPE-AND */;
    goto L14;
L15:;
    v5type1 = v1type;
L14:;
    if (v5type1!=ECL_NIL) {
     goto L17;
    }
    (cl_env_copy->function=(ECL_SYM("WARN",907)->symbol.gfdef))->cfun.entry(2, VV[40], v4var) /*  WARN */;
    v5type1 = ECL_T;
L17:;
    si_put_sysprop(v4var, VV[38], v5type1);
    goto L9;
   }
L10:;
   (cl_env_copy->function=(ECL_SYM("WARN",907)->symbol.gfdef))->cfun.entry(2, VV[41], v4var) /*  WARN */;
L9:;
  }
  v3 = ecl_cdr(v3);
L5:;
  if (Null(v3)){
   goto L23;
  }
  goto L4;
L23:;
  value0 = ECL_NIL;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
static cl_object L3324proclaim_var_va(cl_narg narg, cl_object v4type, cl_object v5vl, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[9]);
 {
  return L3324proclaim_var(v4type, v5vl);
 }
}
/* function definition for PROCLAIM-CLASS                                     */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3325si_proclaim_class(cl_narg narg, cl_object v1name, cl_object v2class, ...)
{
 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[44]);
 if (ecl_unlikely(narg>3)) FEwrong_num_arguments(VV[44]);
 {
  cl_object v3env;
  va_list args; va_start(args,v2class);
  {
   int i = 2;
   if (i >= narg) {
    v3env = ecl_cmp_symbol_value(cl_env_copy,VV[32]);
   } else {
    i++;
    v3env = va_arg(args,cl_object);
   }
  }
  va_end(args);
  (cl_env_copy->function=(ECL_SYM("CREATE-TYPE-NAME",1661)->symbol.gfdef))->cfun.entry(1, v1name) /*  CREATE-TYPE-NAME */;
  value0 = (cl_env_copy->function=ecl_fdefinition(VV[43]))->cfun.entry(3, v1name, v2class, ecl_cmp_symbol_value(cl_env_copy,VV[32])) /*  CMP-ENV-REGISTER-TYPE */;
  return value0;
 }
}
#include "cmp/cmpenv-proclaim.data"
#ifdef __cplusplus
extern "C"
#endif

ECL_DLLEXPORT void _eclGE8ba8GOQxEn9_sYQ0M881(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-PROCLAIM.LSP.NEWEST",-1);
 return;}
 #ifdef ECL_DYNAMIC_VV
 VV = Cblock->cblock.data;
 #endif
 Cblock->cblock.data_text = (const cl_object *)"@EcLtAg:_eclGE8ba8GOQxEn9_sYQ0M881@";
 VVtemp = Cblock->cblock.temp_data;
 ECL_DEFINE_SETF_FUNCTIONS
/* MAKE-LOAD-FORMs                                                            */
/* TOP-LEVEL-FORMs                                                            */
  si_select_package(VVtemp[0]);
  ecl_cmp_defun(VV[45]);                          /*  PROCLAIM                */
  ecl_cmp_defun(VV[46]);                          /*  PROCLAIM-VAR            */
  ecl_cmp_defun(VV[47]);                          /*  PROCLAIM-CLASS          */
}
