/* Compiler: ECL 26.3.27                                                      */
/* Source: /build/ecl/src/ecl-26.3.27/src/cmp/cmppolicy.lsp                   */
#include <ecl/ecl-cmp.h>
#include "cmp/cmppolicy.eclh"
/* function definition for STANDARD-OPTIMIZATION-QUALITY-P                    */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3107standard_optimization_quality_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:;
 {
  cl_object v2;
  cl_object v3;
  cl_object v4;
  v2 = (ECL_SYM("EQ",335)->symbol.gfdef);
  v3 = v1name;
  v4 = VV[1];
  value0 = si_memq(v3,v4);
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
static cl_object L3107standard_optimization_quality_p_va(cl_narg narg, cl_object v5name, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[2]);
 {
  return L3107standard_optimization_quality_p(v5name);
 }
}
/* function definition for TAKE-OPTIMIZATION-BIT                              */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3108take_optimization_bit(cl_object v1name)
{
 cl_object T0, T1, T2;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 value0 = ecl_gethash_safe(v1name,ecl_cmp_symbol_value(cl_env_copy,VV[6]),ECL_NIL);
 if (value0!=ECL_NIL) {
  goto L3;
 }
 T0 = ecl_cmp_symbol_value(cl_env_copy,VV[6]);
 T2 = ecl_plus(ecl_cmp_symbol_value(cl_env_copy,VV[4]),ecl_make_int8_t(1));
 ecl_cmp_setq(cl_env_copy,VV[4],T2);
 T1 = ecl_cmp_symbol_value(cl_env_copy,VV[4]);
 value0 = si_hash_set(v1name, T0, T1);
 return value0;
L3:;
 cl_env_copy->nvalues = 1;
 return value0;
}
static cl_object L3108take_optimization_bit_va(cl_narg narg, cl_object v2name, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[7]);
 {
  return L3108take_optimization_bit(v2name);
 }
}
/* function definition for OPTIMIZATION-QUALITY-SWITCHES                      */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3109optimization_quality_switches(cl_object v1type, cl_object v2index)
{
 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 = cl_gethash(2, v1type, ecl_cmp_symbol_value(cl_env_copy,VV[5]));
 value0 = ecl_nth(ecl_to_size(v2index),T0);
 cl_env_copy->nvalues = 1;
 return value0;
}
static cl_object L3109optimization_quality_switches_va(cl_narg narg, cl_object v3type, cl_object v4index, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[9]);
 {
  return L3109optimization_quality_switches(v3type, v4index);
 }
}
/* function definition for COMPUTE-POLICY                                     */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3111compute_policy(cl_object v1arguments, cl_object v2old_bits)
{
 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 v3on;
  cl_object v4off;
  v3on = ecl_make_int8_t(0);
  v4off = ecl_make_int8_t(0);
  {
   cl_object v5;
   v5 = v1arguments;
   goto L8;
L7:;
   {
    cl_object v6x;
    v6x = ecl_car(v5);
    {
     cl_object v7flags;
     v7flags = LC3110get_flags(v6x);
     if (Null(v7flags)){
      goto L14;
     }
     T0 = ecl_car(v7flags);
     v3on = ecl_boole(ECL_BOOLIOR,(v3on),(T0));
     T0 = ecl_cdr(v7flags);
     v4off = ecl_boole(ECL_BOOLIOR,(v4off),(T0));
     goto L12;
L14:;
     (cl_env_copy->function=ecl_fdefinition(VV[15]))->cfun.entry(2, VV[16], v6x) /*  CMPWARN */;
    }
L12:;
   }
   v5 = ecl_cdr(v5);
L8:;
   if (Null(v5)){
    goto L21;
   }
   goto L7;
L21:;
  }
  T0 = ecl_boole(ECL_BOOLIOR,(v2old_bits),(v3on));
  value0 = ecl_boole(ECL_BOOLANDC2,(T0),(v4off));
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
static cl_object L3111compute_policy_va(cl_narg narg, cl_object v5arguments, cl_object v6old_bits, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[11]);
 {
  return L3111compute_policy(v5arguments, v6old_bits);
 }
}
/* function definition for AUGMENT-POLICY-SWITCH                              */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3112augment_policy_switch(cl_object v1on_off, cl_object v2switches, cl_object v3flag)
{
 cl_object T0, T1, T2;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 if (!((v1on_off)==(VV[19]))){
  goto L2;
 }
 {
  cl_object v4;
  v4 = v2switches;
  if (ecl_unlikely(ECL_ATOM(v4))) FEtype_error_cons(v4);
  value0 = ECL_NIL;
  cl_env_copy->nvalues = 0;
  T0 = v4;
 }
 T1 = ecl_car(v2switches);
 T2 = ecl_boole(ECL_BOOLIOR,(T1),(v3flag));
 value0 = (ECL_CONS_CAR(T0)=T2,T0);
 cl_env_copy->nvalues = 1;
 return value0;
L2:;
 if (!((v1on_off)==(VV[20]))){
  goto L7;
 }
 {
  cl_object v4;
  v4 = v2switches;
  if (ecl_unlikely(ECL_ATOM(v4))) FEtype_error_cons(v4);
  value0 = ECL_NIL;
  cl_env_copy->nvalues = 0;
  T0 = v4;
 }
 T1 = ecl_cdr(v2switches);
 T2 = ecl_boole(ECL_BOOLIOR,(T1),(v3flag));
 value0 = (ECL_CONS_CDR(T0)=T2,T0);
 cl_env_copy->nvalues = 1;
 return value0;
L7:;
 value0 = si_ecase_error(v1on_off, VV[21]);
 return value0;
}
static cl_object L3112augment_policy_switch_va(cl_narg narg, cl_object v4on_off, cl_object v5switches, cl_object v6flag, ...)
{
 if (ecl_unlikely(narg!=3)) FEwrong_num_arguments(VV[18]);
 {
  return L3112augment_policy_switch(v4on_off, v5switches, v6flag);
 }
}
/* function definition for AUGMENT-STANDARD-POLICY                            */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3113augment_standard_policy(cl_object v1quality, cl_object v2level, cl_object v3on_off, cl_object v4flag)
{
 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_fixnum v5i;
  v5i = (cl_fixnum)(0);
  {
   cl_object v6bits;
   v6bits = ECL_NIL;
L4:;
   v6bits = L3109optimization_quality_switches(v1quality, ecl_make_fixnum(v5i));
   if (!(ecl_lower(ecl_make_fixnum(v5i),v2level))){
    goto L9;
   }
   if (!((v3on_off)==(VV[19]))){
    goto L11;
   }
   L3112augment_policy_switch(VV[20], v6bits, v4flag);
   goto L8;
L11:;
   if (!((v3on_off)==(VV[20]))){
    goto L13;
   }
   L3112augment_policy_switch(VV[19], v6bits, v4flag);
   goto L8;
L13:;
   si_ecase_error(v3on_off, VV[21]);
   goto L8;
L9:;
   if (!((v3on_off)==(VV[19]))){
    goto L15;
   }
   L3112augment_policy_switch(VV[19], v6bits, v4flag);
   goto L8;
L15:;
   if (!((v3on_off)==(VV[20]))){
    goto L17;
   }
   L3112augment_policy_switch(VV[20], v6bits, v4flag);
   goto L8;
L17:;
   si_ecase_error(v3on_off, VV[21]);
L8:;
   v5i = (v5i)+1;
   if (!((v5i)>((cl_fixnum)(3)))){
    goto L21;
   }
   goto L5;
L21:;
   goto L4;
L5:;
   value0 = ECL_NIL;
   cl_env_copy->nvalues = 1;
   return value0;
  }
 }
}
static cl_object L3113augment_standard_policy_va(cl_narg narg, cl_object v7quality, cl_object v8level, cl_object v9on_off, cl_object v10flag, ...)
{
 if (ecl_unlikely(narg!=4)) FEwrong_num_arguments(VV[23]);
 {
  return L3113augment_standard_policy(v7quality, v8level, v9on_off, v10flag);
 }
}
/* function definition for AUGMENT-EXTENDED-POLICY                            */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3114augment_extended_policy(cl_object v1quality, cl_object v2on_off, cl_object v3flag)
{
 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 v4bits;
  v4bits = L3109optimization_quality_switches(v1quality, ecl_make_int8_t(1));
  if (!((v2on_off)==(VV[29]))){
   goto L3;
  }
  value0 = L3112augment_policy_switch(VV[19], v4bits, v3flag);
  return value0;
L3:;
  if (!((v2on_off)==(VV[30]))){
   goto L5;
  }
  value0 = L3112augment_policy_switch(VV[20], v4bits, v3flag);
  return value0;
L5:;
  value0 = si_ecase_error(v2on_off, VV[31]);
  return value0;
 }
}
static cl_object L3114augment_extended_policy_va(cl_narg narg, cl_object v5quality, cl_object v6on_off, cl_object v7flag, ...)
{
 if (ecl_unlikely(narg!=3)) FEwrong_num_arguments(VV[28]);
 {
  return L3114augment_extended_policy(v5quality, v6on_off, v7flag);
 }
}
/* function definition for POLICY-FUNCTION-NAME                               */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3115policy_function_name(cl_object v1base)
{
 cl_object T0, T1, T2;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 T0 = ecl_symbol_name(v1base);
 T1 = cl_concatenate(3, ECL_SYM("STRING",808), VV[34], T0);
 T2 = cl_find_package(VV[35]);
 value0 = cl_intern(2, T1, T2);
 return value0;
}
static cl_object L3115policy_function_name_va(cl_narg narg, cl_object v2base, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[33]);
 {
  return L3115policy_function_name(v2base);
 }
}
/* local function DEFINE-POLICY                                               */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC3116define_policy(cl_object v1, cl_object v2)
{
 cl_object T0, T1, T2, T3, T4, T5;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4name;
  cl_object v5conditions;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v6;
   v6 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4name = v6;
  }
  v5conditions = v3;
  {
   cl_object v6;
   cl_object v7;
   cl_object v8;
   T0 = ecl_car(v5conditions);
   if (!(ECL_STRINGP(T0))){
    goto L12;
   }
   {
    cl_object v9;
    v9 = v5conditions;
    {
     cl_object v10;
     v10 = v9;
     {
      bool v11;
      v11 = ECL_LISTP(v10);
      if (ecl_unlikely(!(v11)))
         FEwrong_type_argument(VV[40],v10);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
     }
    }
    if (Null(v9)){
     goto L18;
    }
    {
     cl_object v10;
     v10 = ECL_CONS_CDR(v9);
     v5conditions = v10;
     v9 = ECL_CONS_CAR(v9);
    }
L18:;
    v6 = v9;
    goto L10;
   }
L12:;
   v6 = ECL_NIL;
   goto L10;
L10:;
   T0 = L3108take_optimization_bit(v4name);
   v7 = cl_ash(ecl_make_int8_t(1), T0);
   v8 = L3115policy_function_name(v4name);
   T0 = ecl_cmp_symbol_value(cl_env_copy,VV[5]);
   T1 = CONS(ecl_make_int8_t(0),v7);
   T2 = CONS(v7,ecl_make_int8_t(0));
   T3 = cl_list(2, T1, T2);
   si_hash_set(v4name, T0, T3);
   {
    cl_object v9extra;
    v9extra = ECL_NIL;
    {
     cl_object v10;
     cl_object v11case;
     cl_object v12;
     {
      cl_object v13;
      v13 = v5conditions;
      if (ecl_unlikely(!ECL_LISTP(v13))) FEtype_error_list(v13);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
      v10 = v13;
     }
     v11case = ECL_NIL;
     v12 = v10;
L34:;
     if (!(ecl_endp(v12))){
      goto L36;
     }
     goto L35;
L36:;
     v11case = ECL_CONS_CAR(v12);
     {
      cl_object v13;
      v13 = ECL_CONS_CDR(v12);
      if (ecl_unlikely(!ECL_LISTP(v13))) FEtype_error_list(v13);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
      v12 = v13;
     }
     {
      cl_object v13;
      v13 = ecl_car(v11case);
      if (!((v13)==(VV[19]))){
       goto L51;
      }
      goto L48;
L51:;
      goto L49;
L49:;
      if (!((v13)==(VV[20]))){
       goto L46;
      }
      goto L47;
L48:;
L47:;
      {
       cl_object v14;
       cl_object v15op;
       cl_object v16quality;
       cl_object v17level;
       v14 = v11case;
       if (!(v14==ECL_NIL)){
        goto L56;
       }
       si_dm_too_few_arguments(v11case);
L56:;
       {
        cl_object v18;
        v18 = ecl_car(v14);
        v14 = ecl_cdr(v14);
        v15op = v18;
       }
       if (!(v14==ECL_NIL)){
        goto L62;
       }
       si_dm_too_few_arguments(v11case);
L62:;
       {
        cl_object v18;
        v18 = ecl_car(v14);
        v14 = ecl_cdr(v14);
        v16quality = v18;
       }
       if (!(v14==ECL_NIL)){
        goto L68;
       }
       si_dm_too_few_arguments(v11case);
L68:;
       {
        cl_object v18;
        v18 = ecl_car(v14);
        v14 = ecl_cdr(v14);
        v17level = v18;
       }
       if (Null(v14)){
        goto L73;
       }
       si_dm_too_many_arguments(v11case);
L73:;
       L3113augment_standard_policy(v16quality, v17level, v15op, v7);
       goto L44;
      }
L46:;
      if (!((v13)==(VV[29]))){
       goto L80;
      }
      goto L77;
L80:;
      goto L78;
L78:;
      if (!((v13)==(VV[30]))){
       goto L75;
      }
      goto L76;
L77:;
L76:;
      {
       cl_object v18;
       cl_object v19op;
       cl_object v20quality;
       v18 = v11case;
       if (!(v18==ECL_NIL)){
        goto L85;
       }
       si_dm_too_few_arguments(v11case);
L85:;
       {
        cl_object v21;
        v21 = ecl_car(v18);
        v18 = ecl_cdr(v18);
        v19op = v21;
       }
       if (!(v18==ECL_NIL)){
        goto L91;
       }
       si_dm_too_few_arguments(v11case);
L91:;
       {
        cl_object v21;
        v21 = ecl_car(v18);
        v18 = ecl_cdr(v18);
        v20quality = v21;
       }
       if (Null(v18)){
        goto L96;
       }
       si_dm_too_many_arguments(v11case);
L96:;
       L3114augment_extended_policy(v20quality, v19op, v7);
       goto L44;
      }
L75:;
      if (!((v13)==(VV[43]))){
       goto L98;
      }
      {
       cl_object v21;
       cl_object v22op;
       cl_object v23form;
       v21 = v11case;
       if (!(v21==ECL_NIL)){
        goto L102;
       }
       si_dm_too_few_arguments(v11case);
L102:;
       {
        cl_object v24;
        v24 = ecl_car(v21);
        v21 = ecl_cdr(v21);
        v22op = v24;
       }
       if (!(v21==ECL_NIL)){
        goto L108;
       }
       si_dm_too_few_arguments(v11case);
L108:;
       {
        cl_object v24;
        v24 = ecl_car(v21);
        v21 = ecl_cdr(v21);
        v23form = v24;
       }
       if (Null(v21)){
        goto L113;
       }
       si_dm_too_many_arguments(v11case);
L113:;
       v9extra = CONS(v23form,v9extra);
       goto L44;
      }
L98:;
      T0 = CONS(VV[37],v1);
      cl_error(2, VV[44], T0);
     }
L44:;
     goto L34;
L35:;
     if (Null(v6)){
      goto L120;
     }
     T0 = ecl_list1(v6);
     goto L118;
L120:;
     T0 = ECL_NIL;
     goto L118;
L118:;
     T1 = cl_list(3, ECL_SYM("LOGTEST",508), VV[47], v7);
     T2 = cl_listX(3, ECL_SYM("AND",89), T1, v9extra);
     T3 = cl_list(3, ECL_SYM("LET",479), VV[46], T2);
     T4 = ecl_list1(T3);
     T5 = ecl_append(T0,T4);
     value0 = cl_listX(4, ECL_SYM("DEFUN",291), v8, VV[45], T5);
     return value0;
    }
   }
  }
 }
}
static cl_object LC3116define_policy_va(cl_narg narg, cl_object v13, cl_object v14, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[37]);
 {
  return LC3116define_policy(v13, v14);
 }
}
/* local function DEFINE-POLICY-ALIAS                                         */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC3117define_policy_alias(cl_object v1, cl_object v2)
{
 cl_object T0, T1, T2, T3;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4name;
  cl_object v5doc;
  cl_object v6;
  cl_object v7;
  cl_object v8op;
  cl_object v9alias;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v10;
   v10 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4name = v10;
  }
  if (!(v3==ECL_NIL)){
   goto L10;
  }
  si_dm_too_few_arguments(v1);
L10:;
  {
   cl_object v10;
   v10 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v5doc = v10;
  }
  if (!(v3==ECL_NIL)){
   goto L16;
  }
  si_dm_too_few_arguments(v1);
L16:;
  {
   cl_object v10;
   v10 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v6 = v10;
  }
  v7 = v6;
  if (!(v7==ECL_NIL)){
   goto L23;
  }
  si_dm_too_few_arguments(v1);
L23:;
  {
   cl_object v10;
   v10 = ecl_car(v7);
   v7 = ecl_cdr(v7);
   v8op = v10;
  }
  if (!(v7==ECL_NIL)){
   goto L29;
  }
  si_dm_too_few_arguments(v1);
L29:;
  {
   cl_object v10;
   v10 = ecl_car(v7);
   v7 = ecl_cdr(v7);
   v9alias = v10;
  }
  if (Null(v3)){
   goto L34;
  }
  si_dm_too_many_arguments(v1);
L34:;
  if (Null(v7)){
   goto L36;
  }
  si_dm_too_many_arguments(v1);
L36:;
  {
   cl_object v10bits;
   v10bits = ecl_gethash_safe(v9alias,ecl_cmp_symbol_value(cl_env_copy,VV[5]),ECL_NIL);
   if (!((v8op)==(VV[50]))){
    goto L39;
   }
   si_hash_set(v4name, ecl_cmp_symbol_value(cl_env_copy,VV[5]), v10bits);
   T0 = L3115policy_function_name(v4name);
   T1 = L3115policy_function_name(v9alias);
   T2 = cl_list(2, T1, VV[51]);
   value0 = cl_list(5, ECL_SYM("DEFUN",291), T0, VV[45], v5doc, T2);
   return value0;
L39:;
   if (!((v8op)==(VV[52]))){
    goto L42;
   }
   T0 = ecl_cmp_symbol_value(cl_env_copy,VV[5]);
   T1 = cl_reverse(v10bits);
   si_hash_set(v4name, T0, T1);
   T0 = L3115policy_function_name(v4name);
   T1 = L3115policy_function_name(v9alias);
   T2 = cl_list(2, T1, VV[51]);
   T3 = cl_list(2, ECL_SYM("NOT",586), T2);
   value0 = cl_list(5, ECL_SYM("DEFUN",291), T0, VV[45], v5doc, T3);
   return value0;
L42:;
   value0 = si_ecase_error(v8op, VV[53]);
   return value0;
  }
 }
}
static cl_object LC3117define_policy_alias_va(cl_narg narg, cl_object v11, cl_object v12, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[49]);
 {
  return LC3117define_policy_alias(v11, v12);
 }
}
/* function definition for POLICY-TO-DEBUG-LEVEL                              */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3118policy_to_debug_level(cl_object v1policy)
{
 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_fixnum v2level;
  v2level = (cl_fixnum)(0);
L3:;
  T0 = ecl_plus(ecl_make_fixnum(v2level),ecl_make_int8_t(0));
  if (Null(cl_logbitp(T0, v1policy))){
   goto L5;
  }
  value0 = ecl_make_fixnum(v2level);
  cl_env_copy->nvalues = 1;
  return value0;
L5:;
  v2level = (v2level)+1;
  if (!((v2level)>((cl_fixnum)(3)))){
   goto L9;
  }
  goto L4;
L9:;
  goto L3;
L4:;
  value0 = ECL_NIL;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
static cl_object L3118policy_to_debug_level_va(cl_narg narg, cl_object v3policy, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[55]);
 {
  return L3118policy_to_debug_level(v3policy);
 }
}
/* function definition for POLICY-TO-SAFETY-LEVEL                             */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3119policy_to_safety_level(cl_object v1policy)
{
 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_fixnum v2level;
  v2level = (cl_fixnum)(0);
L3:;
  T0 = ecl_plus(ecl_make_fixnum(v2level),ecl_make_int8_t(4));
  if (Null(cl_logbitp(T0, v1policy))){
   goto L5;
  }
  value0 = ecl_make_fixnum(v2level);
  cl_env_copy->nvalues = 1;
  return value0;
L5:;
  v2level = (v2level)+1;
  if (!((v2level)>((cl_fixnum)(3)))){
   goto L9;
  }
  goto L4;
L9:;
  goto L3;
L4:;
  value0 = ECL_NIL;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
static cl_object L3119policy_to_safety_level_va(cl_narg narg, cl_object v3policy, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[57]);
 {
  return L3119policy_to_safety_level(v3policy);
 }
}
/* function definition for POLICY-TO-SPEED-LEVEL                              */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3120policy_to_speed_level(cl_object v1policy)
{
 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_fixnum v2level;
  v2level = (cl_fixnum)(0);
L3:;
  T0 = ecl_plus(ecl_make_fixnum(v2level),ecl_make_int8_t(8));
  if (Null(cl_logbitp(T0, v1policy))){
   goto L5;
  }
  value0 = ecl_make_fixnum(v2level);
  cl_env_copy->nvalues = 1;
  return value0;
L5:;
  v2level = (v2level)+1;
  if (!((v2level)>((cl_fixnum)(3)))){
   goto L9;
  }
  goto L4;
L9:;
  goto L3;
L4:;
  value0 = ECL_NIL;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
static cl_object L3120policy_to_speed_level_va(cl_narg narg, cl_object v3policy, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[59]);
 {
  return L3120policy_to_speed_level(v3policy);
 }
}
/* function definition for POLICY-TO-SPACE-LEVEL                              */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3121policy_to_space_level(cl_object v1policy)
{
 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_fixnum v2level;
  v2level = (cl_fixnum)(0);
L3:;
  T0 = ecl_plus(ecl_make_fixnum(v2level),ecl_make_int8_t(12));
  if (Null(cl_logbitp(T0, v1policy))){
   goto L5;
  }
  value0 = ecl_make_fixnum(v2level);
  cl_env_copy->nvalues = 1;
  return value0;
L5:;
  v2level = (v2level)+1;
  if (!((v2level)>((cl_fixnum)(3)))){
   goto L9;
  }
  goto L4;
L9:;
  goto L3;
L4:;
  value0 = ECL_NIL;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
static cl_object L3121policy_to_space_level_va(cl_narg narg, cl_object v3policy, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[61]);
 {
  return L3121policy_to_space_level(v3policy);
 }
}
/* function definition for POLICY-TO-COMPILATION-SPEED-LEVEL                  */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3122policy_to_compilation_speed_level(cl_object v1policy)
{
 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_fixnum v2level;
  v2level = (cl_fixnum)(0);
L3:;
  T0 = ecl_plus(ecl_make_fixnum(v2level),ecl_make_int8_t(16));
  if (Null(cl_logbitp(T0, v1policy))){
   goto L5;
  }
  value0 = ecl_make_fixnum(v2level);
  cl_env_copy->nvalues = 1;
  return value0;
L5:;
  v2level = (v2level)+1;
  if (!((v2level)>((cl_fixnum)(3)))){
   goto L9;
  }
  goto L4;
L9:;
  goto L3;
L4:;
  value0 = ECL_NIL;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
static cl_object L3122policy_to_compilation_speed_level_va(cl_narg narg, cl_object v3policy, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[63]);
 {
  return L3122policy_to_compilation_speed_level(v3policy);
 }
}
/* local function GET-FLAGS                                                   */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC3110get_flags(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);
L1:;
 if (!(ECL_ATOM(v1x))){
  goto L2;
 }
 if (Null(L3107standard_optimization_quality_p(v1x))){
  goto L4;
 }
 value0 = L3109optimization_quality_switches(v1x, ecl_make_int8_t(3));
 return value0;
L4:;
 value0 = L3109optimization_quality_switches(v1x, ecl_make_int8_t(1));
 return value0;
L2:;
 {
  cl_object v2;
  cl_object v3name;
  cl_object v4value;
  v2 = v1x;
  if (!(v2==ECL_NIL)){
   goto L8;
  }
  si_dm_too_few_arguments(v1x);
L8:;
  {
   cl_object v5;
   v5 = ecl_car(v2);
   v2 = ecl_cdr(v2);
   v3name = v5;
  }
  if (!(v2==ECL_NIL)){
   goto L14;
  }
  si_dm_too_few_arguments(v1x);
L14:;
  {
   cl_object v5;
   v5 = ecl_car(v2);
   v2 = ecl_cdr(v2);
   v4value = v5;
  }
  if (Null(v2)){
   goto L19;
  }
  si_dm_too_many_arguments(v1x);
L19:;
  {
   cl_fixnum v5;
   v5 = (cl_fixnum)(0);
   if (!(ECL_FIXNUMP(v4value))){
    goto L21;
   }
   v5 = ecl_fixnum(v4value);
   if (!((v5)<=((cl_fixnum)(3)))){
    goto L21;
   }
   if (!((v5)>=((cl_fixnum)(0)))){
    goto L21;
   }
  }
  value0 = L3109optimization_quality_switches(v3name, v4value);
  return value0;
L21:;
  value0 = ECL_NIL;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
static cl_object LC3110get_flags_va(cl_narg narg, cl_object v5x, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[12]);
 {
  return LC3110get_flags(v5x);
 }
}
#include "cmp/cmppolicy.data"
#ifdef __cplusplus
extern "C"
#endif

ECL_DLLEXPORT void _eclmXc8rDxglsIr9_z8O0M881(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;CMPPOLICY.LSP.NEWEST",-1);
 return;}
 #ifdef ECL_DYNAMIC_VV
 VV = Cblock->cblock.data;
 #endif
 Cblock->cblock.data_text = (const cl_object *)"@EcLtAg:_eclmXc8rDxglsIr9_z8O0M881@";
 VVtemp = Cblock->cblock.temp_data;
 ECL_DEFINE_SETF_FUNCTIONS
 {
  cl_object T0;
  cl_object volatile env0 = ECL_NIL;
/* MAKE-LOAD-FORMs                                                            */
/* TOP-LEVEL-FORMs                                                            */
  si_select_package(VVtemp[0]);
  si_Xmake_constant(VV[0], VV[1]);
  ecl_cmp_defun(VV[65]);                          /*  STANDARD-OPTIMIZATION-QUALITY-P */
  si_Xmake_special(VV[4]);
  if (ecl_boundp(cl_env_copy,VV[4])) {
   goto L11;
  }
  T0 = ecl_make_int8_t(39);
  ecl_cmp_setq(cl_env_copy,VV[4],T0);
L11:;
  si_Xmake_special(VV[5]);
  T0 = cl_make_hash_table(8, ECL_SYM("SIZE",1345), ecl_make_int8_t(64), ECL_SYM("REHASH-SIZE",1334), _ecl_static_0, ECL_SYM("REHASH-THRESHOLD",1335), _ecl_static_1, ECL_SYM("TEST",1353), ECL_SYM("EQ",335));
  VVtemp[1]=si_hash_table_fill(T0, VVtemp[2]);
  if (ecl_boundp(cl_env_copy,VV[5])) {
   goto L19;
  }
  T0 = VVtemp[1];
  ecl_cmp_setq(cl_env_copy,VV[5],T0);
L19:;
  si_Xmake_special(VV[6]);
  T0 = cl_make_hash_table(8, ECL_SYM("SIZE",1345), ecl_make_int8_t(64), ECL_SYM("REHASH-SIZE",1334), _ecl_static_0, ECL_SYM("REHASH-THRESHOLD",1335), _ecl_static_1, ECL_SYM("TEST",1353), ECL_SYM("EQ",335));
  VVtemp[3]=si_hash_table_fill(T0, VVtemp[4]);
  if (ecl_boundp(cl_env_copy,VV[6])) {
   goto L27;
  }
  T0 = VVtemp[3];
  ecl_cmp_setq(cl_env_copy,VV[6],T0);
L27:;
  ecl_cmp_defun(VV[66]);                          /*  TAKE-OPTIMIZATION-BIT   */
  ecl_cmp_defun(VV[67]);                          /*  OPTIMIZATION-QUALITY-SWITCHES */
  ecl_cmp_defun(VV[68]);                          /*  COMPUTE-POLICY          */
  ecl_cmp_defun(VV[69]);                          /*  AUGMENT-POLICY-SWITCH   */
  ecl_cmp_defun(VV[70]);                          /*  AUGMENT-STANDARD-POLICY */
  ecl_cmp_defun(VV[71]);                          /*  AUGMENT-EXTENDED-POLICY */
  ecl_cmp_defun(VV[72]);                          /*  POLICY-FUNCTION-NAME    */
  ecl_cmp_defmacro(VV[73]);                       /*  DEFINE-POLICY           */
  ecl_cmp_defmacro(VV[74]);                       /*  DEFINE-POLICY-ALIAS     */
  ecl_cmp_defun(VV[75]);                          /*  POLICY-TO-DEBUG-LEVEL   */
  ecl_cmp_defun(VV[76]);                          /*  POLICY-TO-SAFETY-LEVEL  */
  ecl_cmp_defun(VV[77]);                          /*  POLICY-TO-SPEED-LEVEL   */
  ecl_cmp_defun(VV[78]);                          /*  POLICY-TO-SPACE-LEVEL   */
  ecl_cmp_defun(VV[79]);                          /*  POLICY-TO-COMPILATION-SPEED-LEVEL */
 }
}
