/* Compiler: ECL 26.3.27                                                      */
/* Source: /build/ecl/src/ecl-26.3.27/src/lsp/mp.lsp                          */
#include <ecl/ecl-cmp.h>
#include "lsp/mp.eclh"
/* local function WITHOUT-INTERRUPTS                                          */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC729without_interrupts(cl_object v1, cl_object v2)
{
 cl_object T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26;
 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_cdr(v1);
  {
   cl_object v4outer_allow_with_interrupts;
   cl_object v5outer_interrupts_enabled;
   v4outer_allow_with_interrupts = cl_gensym(1, _ecl_static_0);
   v5outer_interrupts_enabled = cl_gensym(1, _ecl_static_1);
   T0 = cl_list(2, ECL_SYM("QUOTE",682), v4outer_allow_with_interrupts);
   T1 = cl_list(3, ECL_SYM("LIST",483), VV[2], T0);
   T2 = cl_list(2, ECL_SYM("LIST",483), T1);
   T3 = cl_list(4, ECL_SYM("LIST*",484), VV[1], T2, VV[3]);
   T4 = cl_list(3, ECL_SYM("ALLOW-WITH-INTERRUPTS",1835), VV[0], T3);
   T5 = cl_list(2, ECL_SYM("QUOTE",682), v5outer_interrupts_enabled);
   T6 = cl_list(3, ECL_SYM("LIST",483), VV[5], T5);
   T7 = cl_list(2, ECL_SYM("LIST",483), T6);
   T8 = cl_list(4, ECL_SYM("LIST*",484), VV[1], T7, VV[6]);
   T9 = cl_list(3, ECL_SYM("WITH-RESTORED-INTERRUPTS",1833), VV[4], T8);
   T10 = cl_list(2, ECL_SYM("QUOTE",682), v4outer_allow_with_interrupts);
   T11 = cl_list(3, ECL_SYM("LIST",483), VV[2], T10);
   T12 = cl_list(2, ECL_SYM("QUOTE",682), v4outer_allow_with_interrupts);
   T13 = cl_list(3, ECL_SYM("LIST",483), VV[5], T12);
   T14 = cl_list(3, ECL_SYM("LIST",483), T11, T13);
   T15 = cl_list(2, ECL_SYM("QUOTE",682), v4outer_allow_with_interrupts);
   T16 = cl_list(4, ECL_SYM("LIST",483), VV[8], T15, VV[9]);
   T17 = cl_list(5, ECL_SYM("LIST",483), VV[7], T14, T16, VV[10]);
   T18 = cl_list(3, ECL_SYM("WITH-LOCAL-INTERRUPTS",1834), VV[4], T17);
   T19 = cl_list(3, T4, T9, T18);
   T20 = cl_list(2, v5outer_interrupts_enabled, ECL_SYM("*INTERRUPTS-ENABLED*",7));
   T21 = cl_list(2, v4outer_allow_with_interrupts, ECL_SYM("*ALLOW-WITH-INTERRUPTS*",1821));
   T22 = cl_list(4, T20, VV[11], T21, VV[12]);
   T23 = cl_list(3, ECL_SYM("IGNORABLE",429), v4outer_allow_with_interrupts, v5outer_interrupts_enabled);
   T24 = cl_list(2, ECL_SYM("DECLARE",276), T23);
   T25 = cl_listX(4, ECL_SYM("LET*",480), T22, T24, v3);
   T26 = cl_list(3, ECL_SYM("MACROLET",523), T19, T25);
   value0 = cl_list(3, ECL_SYM("MULTIPLE-VALUE-PROG1",577), T26, VV[13]);
   return value0;
  }
 }
}
static cl_object LC729without_interrupts_va(cl_narg narg, cl_object v6, cl_object v7, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[14]);
 {
  return LC729without_interrupts(v6, v7);
 }
}
/* local function WITH-INTERRUPTS                                             */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC730with_interrupts(cl_object v1, cl_object v2)
{
 cl_object T0, T1, T2, T3, T4, T5, T6, T7, T8;
 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_cdr(v1);
  {
   cl_object v4allowp;
   cl_object v5enablep;
   v4allowp = cl_gensym(1, _ecl_static_2);
   v5enablep = cl_gensym(1, _ecl_static_3);
   T0 = cl_list(2, v4allowp, ECL_SYM("*ALLOW-WITH-INTERRUPTS*",1821));
   T1 = cl_list(2, v5enablep, ECL_SYM("*INTERRUPTS-ENABLED*",7));
   T2 = cl_list(3, ECL_SYM("OR",616), v5enablep, v4allowp);
   T3 = cl_list(2, ECL_SYM("*INTERRUPTS-ENABLED*",7), T2);
   T4 = cl_list(3, T0, T1, T3);
   T5 = cl_list(2, ECL_SYM("NOT",586), v5enablep);
   T6 = cl_list(3, ECL_SYM("AND",89), v4allowp, T5);
   T7 = cl_list(3, ECL_SYM("WHEN",909), T6, VV[15]);
   T8 = CONS(ECL_SYM("LOCALLY",492),v3);
   value0 = cl_list(4, ECL_SYM("LET*",480), T4, T7, T8);
   return value0;
  }
 }
}
static cl_object LC730with_interrupts_va(cl_narg narg, cl_object v6, cl_object v7, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[16]);
 {
  return LC730with_interrupts(v6, v7);
 }
}
/* local function WITH-LOCK                                                   */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC731with_lock(cl_object v1, cl_object v2)
{
 cl_object T0, T1, T2, T3, T4, T5, T6, T7, T8, T9;
 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;
  cl_object v6lock_form;
  cl_object v7;
  cl_object v8wait_form;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v9;
   v9 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4 = v9;
  }
  v5 = v4;
  if (!(v5==ECL_NIL)){
   goto L11;
  }
  si_dm_too_few_arguments(v1);
L11:;
  {
   cl_object v9;
   v9 = ecl_car(v5);
   v5 = ecl_cdr(v5);
   v6lock_form = v9;
  }
  v7 = si_search_keyword(v5, VV[19]);
  if (!((v7)==(ECL_SYM("MISSING-KEYWORD",2044)))){
   goto L18;
  }
  v8wait_form = ECL_T;
  goto L17;
L18:;
  v8wait_form = v7;
L17:;
  si_check_keyword(2, v5, VV[21]);
  {
   cl_object v9lock;
   cl_object v10wait;
   v9lock = cl_gensym(1, _ecl_static_4);
   v10wait = cl_gensym(1, _ecl_static_5);
   T0 = cl_list(2, v9lock, v6lock_form);
   T1 = cl_list(2, v10wait, v8wait_form);
   T2 = cl_list(2, T0, T1);
   T3 = cl_list(3, ECL_SYM("GET-LOCK",1462), v9lock, v10wait);
   T4 = CONS(ECL_SYM("LOCALLY",492),v3);
   T5 = cl_list(2, ECL_SYM("WITH-RESTORED-INTERRUPTS",1833), T4);
   T6 = cl_list(2, ECL_SYM("GIVEUP-LOCK",1463), v9lock);
   T7 = cl_list(3, ECL_SYM("UNWIND-PROTECT",892), T5, T6);
   T8 = cl_list(2, ECL_SYM("WITHOUT-INTERRUPTS",1832), T7);
   T9 = cl_list(3, ECL_SYM("WHEN",909), T3, T8);
   value0 = cl_list(3, ECL_SYM("LET",479), T2, T9);
   return value0;
  }
 }
}
static cl_object LC731with_lock_va(cl_narg narg, cl_object v11, cl_object v12, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[22]);
 {
  return LC731with_lock(v11, v12);
 }
}
/* local function WITH-RWLOCK                                                 */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC732with_rwlock(cl_object v1, cl_object v2)
{
 cl_object T0, T1, T2, T3, T4, T5, T6, T7, T8;
 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;
  cl_object v6lock;
  cl_object v7op;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v8;
   v8 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4 = v8;
  }
  v5 = v4;
  if (!(v5==ECL_NIL)){
   goto L11;
  }
  si_dm_too_few_arguments(v1);
L11:;
  {
   cl_object v8;
   v8 = ecl_car(v5);
   v5 = ecl_cdr(v5);
   v6lock = v8;
  }
  if (!(v5==ECL_NIL)){
   goto L17;
  }
  si_dm_too_few_arguments(v1);
L17:;
  {
   cl_object v8;
   v8 = ecl_car(v5);
   v5 = ecl_cdr(v5);
   v7op = v8;
  }
  if (Null(v5)){
   goto L22;
  }
  si_dm_too_many_arguments(v1);
L22:;
  goto L26;
L25:;
  si_assert_failure(1, VV[24]);
L26:;
  {
   cl_object v8;
   v8 = (ECL_SYM("EQ",335)->symbol.gfdef);
   if (!((v7op)==(VV[26]))){
    goto L34;
   }
   goto L29;
L34:;
   goto L32;
L32:;
   if (!((v7op)==(VV[27]))){
    goto L37;
   }
   goto L29;
L37:;
   goto L30;
  }
L30:;
  goto L25;
L29:;
  {
   cl_object v8s_lock;
   v8s_lock = cl_gensym(0);
   T0 = cl_list(2, v8s_lock, v6lock);
   T1 = ecl_list1(T0);
   if (!((VV[26])==(v7op))){
    goto L41;
   }
   T2 = ECL_SYM("GET-RWLOCK-READ",1484);
   goto L40;
L41:;
   T2 = ECL_SYM("GET-RWLOCK-WRITE",1485);
L40:;
   T3 = cl_list(3, T2, v8s_lock, ECL_T);
   T4 = CONS(ECL_SYM("WITH-RESTORED-INTERRUPTS",1833),v3);
   if (!((VV[26])==(v7op))){
    goto L44;
   }
   T5 = ECL_SYM("GIVEUP-RWLOCK-READ",1486);
   goto L43;
L44:;
   T5 = ECL_SYM("GIVEUP-RWLOCK-WRITE",1487);
L43:;
   T6 = cl_list(2, T5, v8s_lock);
   T7 = cl_list(3, ECL_SYM("UNWIND-PROTECT",892), T4, T6);
   T8 = cl_list(2, ECL_SYM("WITHOUT-INTERRUPTS",1832), T7);
   value0 = cl_list(4, ECL_SYM("LET",479), T1, T3, T8);
   return value0;
  }
 }
}
static cl_object LC732with_rwlock_va(cl_narg narg, cl_object v9, cl_object v10, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[29]);
 {
  return LC732with_rwlock(v9, v10);
 }
}
/* local function DEFINE-CAS-EXPANDER                                         */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC733define_cas_expander(cl_object v1, cl_object v2)
{
 cl_object T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14;
 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 v4accessor;
  cl_object v5lambda_list;
  cl_object v6body;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v7;
   v7 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4accessor = v7;
  }
  if (!(v3==ECL_NIL)){
   goto L10;
  }
  si_dm_too_few_arguments(v1);
L10:;
  {
   cl_object v7;
   v7 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v5lambda_list = v7;
  }
  v6body = v3;
  {
   cl_object v7env;
   {
    cl_object v8;
    cl_object v9;
    cl_object v10;
    v8 = (ECL_SYM("EQ",335)->symbol.gfdef);
    v9 = ECL_SYM("&ENVIRONMENT",11);
    v10 = v5lambda_list;
    v7env = si_memq(v9,v10);
   }
   if (Null(v7env)){
    goto L21;
   }
   T0 = ecl_cadr(v7env);
   T1 = cl_ldiff(v5lambda_list, v7env);
   T2 = ecl_cddr(v7env);
   T3 = ecl_nconc(T1,T2);
   v5lambda_list = CONS(T0,T3);
   goto L16;
L21:;
   v7env = cl_gensym(0);
   v5lambda_list = CONS(v7env,v5lambda_list);
   T0 = cl_list(2, ECL_SYM("IGNORE",430), v7env);
   T1 = cl_list(2, ECL_SYM("DECLARE",276), T0);
   v6body = CONS(T1,v6body);
  }
L16:;
  T0 = cl_list(2, ECL_SYM("QUOTE",682), v4accessor);
  T1 = cl_list(2, ECL_SYM("SYMBOL-PACKAGE",847), T0);
  T2 = cl_list(2, ECL_SYM("PACKAGE",619), T1);
  T3 = ecl_list1(T2);
  T4 = ecl_list1(v4accessor);
  T5 = cl_list(2, ECL_SYM("QUOTE",682), T4);
  T6 = cl_listX(6, ECL_SYM("SIGNAL-SIMPLE-ERROR",1168), VV[32], VV[33], VV[34], T5, VV[35]);
  T7 = cl_list(3, ECL_SYM("WHEN",909), VV[31], T6);
  T8 = cl_list(3, ECL_SYM("LET",479), T3, T7);
  T9 = cl_list(2, ECL_SYM("QUOTE",682), v4accessor);
  {
   cl_object v7;                                  /*  DECLS                   */
   cl_object v8;                                  /*  BODY                    */
   value0 = si_find_declarations(1, v6body);
   {
    const int v9 = cl_env_copy->nvalues;
    v7 = value0;
    cl_object v10;
    v10 = (v9<=1)? ECL_NIL : cl_env_copy->values[1];
    v8 = v10;
   }
   T11 = cl_listX(3, ECL_SYM("BLOCK",139), v4accessor, v8);
   T12 = ecl_list1(T11);
   T13 = ecl_append(v7,T12);
   T14 = cl_listX(3, ECL_SYM("LAMBDA",454), v5lambda_list, T13);
   T10 = cl_list(2, ECL_SYM("FUNCTION",398), T14);
  }
  T11 = cl_list(4, ECL_SYM("PUT-SYSPROP",1150), T9, VV[36], T10);
  T12 = cl_list(2, ECL_SYM("QUOTE",682), v4accessor);
  value0 = cl_list(5, ECL_SYM("EVAL-WHEN",342), VV[30], T8, T11, T12);
  return value0;
 }
}
static cl_object LC733define_cas_expander_va(cl_narg narg, cl_object v7, cl_object v8, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[38]);
 {
  return LC733define_cas_expander(v7, v8);
 }
}
/* local function DEFCAS                                                      */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC734defcas(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 v4accessor;
  cl_object v5cas_fun;
  cl_object v6documentation;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v7;
   v7 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4accessor = v7;
  }
  if (!(v3==ECL_NIL)){
   goto L10;
  }
  si_dm_too_few_arguments(v1);
L10:;
  {
   cl_object v7;
   v7 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v5cas_fun = v7;
  }
  if (Null(v3)){
   goto L16;
  }
  {
   cl_object v7;
   v7 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v6documentation = v7;
   goto L15;
  }
L16:;
  v6documentation = ECL_NIL;
L15:;
  if (Null(v3)){
   goto L21;
  }
  si_dm_too_many_arguments(v1);
L21:;
  T0 = cl_list(2, ECL_SYM("QUOTE",682), v5cas_fun);
  T1 = cl_list(3, ECL_SYM("LIST*",484), T0, VV[43]);
  T2 = cl_list(2, ECL_SYM("QUOTE",682), v4accessor);
  T3 = cl_list(3, ECL_SYM("LIST*",484), T2, VV[44]);
  T4 = cl_list(7, ECL_SYM("VALUES",899), ECL_NIL, ECL_NIL, VV[41], VV[42], T1, T3);
  T5 = cl_list(3, ECL_SYM("LET",479), VV[40], T4);
  value0 = cl_list(4, ECL_SYM("DEFINE-CAS-EXPANDER",1533), v4accessor, VV[39], T5);
  return value0;
 }
}
static cl_object LC734defcas_va(cl_narg narg, cl_object v7, cl_object v8, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[45]);
 {
  return LC734defcas(v7, v8);
 }
}
/* function definition for SPECIAL-VARIABLE-P                                 */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L735special_variable_p(cl_object v1place)
{
 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_SYMBOLP(v1place))){
  goto L3;
 }
 if (Null(cl_fboundp(VV[47]))){
  goto L9;
 }
 value0 = (cl_env_copy->function=ecl_fdefinition(VV[47]))->cfun.entry(1, v1place) /*  SPECIAL-VARIABLE-P */;
 goto L7;
L9:;
 value0 = ECL_NIL;
 goto L7;
L7:;
 if (value0!=ECL_NIL) {
  goto L6;
 }
 value0 = si_specialp(v1place);
 return value0;
L6:;
 cl_env_copy->nvalues = 1;
 return value0;
L3:;
 value0 = ECL_NIL;
 cl_env_copy->nvalues = 1;
 return value0;
}
/* function definition for REMCAS                                             */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L736remcas(cl_object v1symbol)
{
 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 v2package;
  v2package = cl_symbol_package(v1symbol);
  if (Null(v2package)){
   goto L2;
  }
  if (Null(si_package_locked_p(v2package))){
   goto L2;
  }
  if (!(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("*IGNORE-PACKAGE-LOCKS*",1128))==ECL_NIL)){
   goto L2;
  }
  T0 = ecl_list1(v1symbol);
  si_signal_simple_error(6, ECL_SYM("PACKAGE-ERROR",620), VV[33], VV[34], T0, ECL_SYM("PACKAGE",1321), v2package);
 }
L2:;
 value0 = si_rem_sysprop(v1symbol, VV[48]);
 return value0;
}
static cl_object L736remcas_va(cl_narg narg, cl_object v2symbol, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[49]);
 {
  return L736remcas(v2symbol);
 }
}
/* function definition for GET-CAS-EXPANSION                                  */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L737get_cas_expansion(cl_narg narg, cl_object v1place, ...)
{
 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[51]);
 if (ecl_unlikely(narg>2)) FEwrong_num_arguments(VV[51]);
 {
  cl_object v2environment;
  va_list args; va_start(args,v1place);
  {
   int i = 1;
   if (i >= narg) {
    v2environment = ECL_NIL;
   } else {
    i++;
    v2environment = va_arg(args,cl_object);
   }
  }
  va_end(args);
  {
   cl_object v3f;
   v3f = ECL_NIL;
   if (Null(L735special_variable_p(v1place))){
    goto L3;
   }
   T0 = cl_list(2, ECL_SYM("QUOTE",682), v1place);
   v1place = cl_list(2, ECL_SYM("SYMBOL-VALUE",849), T0);
L3:;
   if (!(ECL_LISTP(v1place))){
    goto L6;
   }
   T0 = ecl_car(v1place);
   v3f = si_get_sysprop(T0, VV[48]);
   if (Null(v3f)){
    goto L6;
   }
   T0 = ecl_cdr(v1place);
   value0 = cl_apply(3, v3f, v2environment, T0);
   return value0;
L6:;
   v3f = cl_macroexpand_1(2, v1place, v2environment);
   if (Null(v3f)){
    goto L10;
   }
   if (ecl_equal(v3f,v1place)) {
    goto L10;
   }
   value0 = L737get_cas_expansion(2, v3f, v2environment);
   return value0;
L10:;
   value0 = cl_error(2, VV[50], v1place);
   return value0;
  }
 }
}
/* local function COMPARE-AND-SWAP                                            */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC738compare_and_swap(cl_object v1, cl_object v2env)
{
 cl_object T0, T1, T2, T3, T4;
 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 v4place;
  cl_object v5old;
  cl_object v6new;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v7;
   v7 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4place = v7;
  }
  if (!(v3==ECL_NIL)){
   goto L10;
  }
  si_dm_too_few_arguments(v1);
L10:;
  {
   cl_object v7;
   v7 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v5old = v7;
  }
  if (!(v3==ECL_NIL)){
   goto L16;
  }
  si_dm_too_few_arguments(v1);
L16:;
  {
   cl_object v7;
   v7 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v6new = v7;
  }
  if (Null(v3)){
   goto L21;
  }
  si_dm_too_many_arguments(v1);
L21:;
  {
   cl_object v7;                                  /*  VARS                    */
   cl_object v8;                                  /*  VALS                    */
   cl_object v9;                                  /*  OLD-VAR                 */
   cl_object v10;                                 /*  NEW-VAR                 */
   cl_object v11;                                 /*  CAS-FORM                */
   value0 = L737get_cas_expansion(2, v4place, v2env);
   {
    const int v12 = cl_env_copy->nvalues;
    v7 = value0;
    cl_object v13;
    v13 = (v12<=1)? ECL_NIL : cl_env_copy->values[1];
    v8 = v13;
    v13 = (v12<=2)? ECL_NIL : cl_env_copy->values[2];
    v9 = v13;
    v13 = (v12<=3)? ECL_NIL : cl_env_copy->values[3];
    v10 = v13;
    v13 = (v12<=4)? ECL_NIL : cl_env_copy->values[4];
    v11 = v13;
   }
   {
    cl_object v12;
    v12 = (ECL_SYM("LIST",483)->symbol.gfdef);
    {
     cl_object v13;
     cl_object v14;
     cl_object v15;
     {
      cl_object v16;
      v16 = v7;
      if (ecl_unlikely(!ECL_LISTP(v16))) FEtype_error_list(v16);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
      v13 = v16;
     }
     v14 = ECL_NIL;
     v15 = v13;
     {
      cl_object v16;
      cl_object v17;
      cl_object v18;
      {
       cl_object v19;
       v19 = v8;
       if (ecl_unlikely(!ECL_LISTP(v19))) FEtype_error_list(v19);
       value0 = ECL_NIL;
       cl_env_copy->nvalues = 0;
       v16 = v19;
      }
      v17 = ECL_NIL;
      v18 = v16;
      {
       cl_object v19;
       cl_object v20;
       v19 = ecl_list1(ECL_NIL);
       v20 = v19;
L38:;
       if (!(ecl_endp(v15))){
        goto L40;
       }
       goto L39;
L40:;
       v14 = ECL_CONS_CAR(v15);
       {
        cl_object v21;
        v21 = ECL_CONS_CDR(v15);
        if (ecl_unlikely(!ECL_LISTP(v21))) FEtype_error_list(v21);
        value0 = ECL_NIL;
        cl_env_copy->nvalues = 0;
        v15 = v21;
       }
       if (!(ecl_endp(v18))){
        goto L48;
       }
       goto L39;
L48:;
       v17 = ECL_CONS_CAR(v18);
       {
        cl_object v21;
        v21 = ECL_CONS_CDR(v18);
        if (ecl_unlikely(!ECL_LISTP(v21))) FEtype_error_list(v21);
        value0 = ECL_NIL;
        cl_env_copy->nvalues = 0;
        v18 = v21;
       }
       {
        cl_object v21;
        v21 = v20;
        if (ecl_unlikely(ECL_ATOM(v21))) FEtype_error_cons(v21);
        value0 = ECL_NIL;
        cl_env_copy->nvalues = 0;
        T1 = v21;
       }
       T2 = ecl_function_dispatch(cl_env_copy,v12)(2, v14, v17);
       v20 = ecl_list1(T2);
       (ECL_CONS_CDR(T1)=v20,T1);
       goto L38;
L39:;
       T0 = ecl_cdr(v19);
       goto L24;
      }
     }
    }
   }
L24:;
   T1 = cl_list(2, v9, v5old);
   T2 = cl_list(2, v10, v6new);
   T3 = cl_list(2, T1, T2);
   T4 = ecl_append(T0,T3);
   value0 = cl_list(3, ECL_SYM("LET*",480), T4, v11);
   return value0;
  }
 }
}
static cl_object LC738compare_and_swap_va(cl_narg narg, cl_object v7, cl_object v8env, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[57]);
 {
  return LC738compare_and_swap(v7, v8env);
 }
}
/* local function LAMBDA113                                                   */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC739__lambda113(cl_narg narg, cl_object v1, ...)
{
 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);
 if (ecl_unlikely(narg<1)) FEwrong_num_arguments(VV[58]);
 {
  cl_object v2args;
  ecl_va_list args; ecl_va_start(args,v1,narg,1);
  v2args = cl_grab_rest_args(args);
  ecl_va_end(args);
  {
   cl_object v3;
   cl_object v4;
   v3 = cl_gensym(0);
   v4 = cl_gensym(0);
   T0 = cl_list(2, v3, v4);
   T1 = ecl_append(v2args,T0);
   T2 = CONS(ECL_SYM("COMPARE-AND-SWAP-CAR",1521),T1);
   T3 = CONS(ECL_SYM("CAR",182),v2args);
   cl_env_copy->nvalues = 6;
   cl_env_copy->values[5] = T3;
   cl_env_copy->values[4] = T2;
   cl_env_copy->values[3] = v4;
   cl_env_copy->values[2] = v3;
   cl_env_copy->values[1] = ECL_NIL;
   cl_env_copy->values[0] = ECL_NIL;
   return cl_env_copy->values[0];
  }
 }
}
/* local function LAMBDA118                                                   */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC740__lambda118(cl_narg narg, cl_object v1, ...)
{
 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);
 if (ecl_unlikely(narg<1)) FEwrong_num_arguments(VV[60]);
 {
  cl_object v2args;
  ecl_va_list args; ecl_va_start(args,v1,narg,1);
  v2args = cl_grab_rest_args(args);
  ecl_va_end(args);
  {
   cl_object v3;
   cl_object v4;
   v3 = cl_gensym(0);
   v4 = cl_gensym(0);
   T0 = cl_list(2, v3, v4);
   T1 = ecl_append(v2args,T0);
   T2 = CONS(ECL_SYM("COMPARE-AND-SWAP-CAR",1521),T1);
   T3 = CONS(ECL_SYM("FIRST",373),v2args);
   cl_env_copy->nvalues = 6;
   cl_env_copy->values[5] = T3;
   cl_env_copy->values[4] = T2;
   cl_env_copy->values[3] = v4;
   cl_env_copy->values[2] = v3;
   cl_env_copy->values[1] = ECL_NIL;
   cl_env_copy->values[0] = ECL_NIL;
   return cl_env_copy->values[0];
  }
 }
}
/* local function LAMBDA123                                                   */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC741__lambda123(cl_narg narg, cl_object v1, ...)
{
 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);
 if (ecl_unlikely(narg<1)) FEwrong_num_arguments(VV[61]);
 {
  cl_object v2args;
  ecl_va_list args; ecl_va_start(args,v1,narg,1);
  v2args = cl_grab_rest_args(args);
  ecl_va_end(args);
  {
   cl_object v3;
   cl_object v4;
   v3 = cl_gensym(0);
   v4 = cl_gensym(0);
   T0 = cl_list(2, v3, v4);
   T1 = ecl_append(v2args,T0);
   T2 = CONS(ECL_SYM("COMPARE-AND-SWAP-CDR",1522),T1);
   T3 = CONS(ECL_SYM("CDR",200),v2args);
   cl_env_copy->nvalues = 6;
   cl_env_copy->values[5] = T3;
   cl_env_copy->values[4] = T2;
   cl_env_copy->values[3] = v4;
   cl_env_copy->values[2] = v3;
   cl_env_copy->values[1] = ECL_NIL;
   cl_env_copy->values[0] = ECL_NIL;
   return cl_env_copy->values[0];
  }
 }
}
/* local function LAMBDA128                                                   */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC742__lambda128(cl_narg narg, cl_object v1, ...)
{
 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);
 if (ecl_unlikely(narg<1)) FEwrong_num_arguments(VV[63]);
 {
  cl_object v2args;
  ecl_va_list args; ecl_va_start(args,v1,narg,1);
  v2args = cl_grab_rest_args(args);
  ecl_va_end(args);
  {
   cl_object v3;
   cl_object v4;
   v3 = cl_gensym(0);
   v4 = cl_gensym(0);
   T0 = cl_list(2, v3, v4);
   T1 = ecl_append(v2args,T0);
   T2 = CONS(ECL_SYM("COMPARE-AND-SWAP-CDR",1522),T1);
   T3 = CONS(ECL_SYM("REST",722),v2args);
   cl_env_copy->nvalues = 6;
   cl_env_copy->values[5] = T3;
   cl_env_copy->values[4] = T2;
   cl_env_copy->values[3] = v4;
   cl_env_copy->values[2] = v3;
   cl_env_copy->values[1] = ECL_NIL;
   cl_env_copy->values[0] = ECL_NIL;
   return cl_env_copy->values[0];
  }
 }
}
/* local function LAMBDA133                                                   */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC743__lambda133(cl_narg narg, cl_object v1, ...)
{
 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);
 if (ecl_unlikely(narg<1)) FEwrong_num_arguments(VV[64]);
 {
  cl_object v2args;
  ecl_va_list args; ecl_va_start(args,v1,narg,1);
  v2args = cl_grab_rest_args(args);
  ecl_va_end(args);
  {
   cl_object v3;
   cl_object v4;
   v3 = cl_gensym(0);
   v4 = cl_gensym(0);
   T0 = cl_list(2, v3, v4);
   T1 = ecl_append(v2args,T0);
   T2 = CONS(ECL_SYM("COMPARE-AND-SWAP-SYMBOL-VALUE",1524),T1);
   T3 = CONS(ECL_SYM("SYMBOL-VALUE",849),v2args);
   cl_env_copy->nvalues = 6;
   cl_env_copy->values[5] = T3;
   cl_env_copy->values[4] = T2;
   cl_env_copy->values[3] = v4;
   cl_env_copy->values[2] = v3;
   cl_env_copy->values[1] = ECL_NIL;
   cl_env_copy->values[0] = ECL_NIL;
   return cl_env_copy->values[0];
  }
 }
}
/* local function LAMBDA138                                                   */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC744__lambda138(cl_narg narg, cl_object v1, ...)
{
 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);
 if (ecl_unlikely(narg<1)) FEwrong_num_arguments(VV[65]);
 {
  cl_object v2args;
  ecl_va_list args; ecl_va_start(args,v1,narg,1);
  v2args = cl_grab_rest_args(args);
  ecl_va_end(args);
  {
   cl_object v3;
   cl_object v4;
   v3 = cl_gensym(0);
   v4 = cl_gensym(0);
   T0 = cl_list(2, v3, v4);
   T1 = ecl_append(v2args,T0);
   T2 = CONS(ECL_SYM("COMPARE-AND-SWAP-SYMBOL-PLIST",1523),T1);
   T3 = CONS(ECL_SYM("SYMBOL-PLIST",848),v2args);
   cl_env_copy->nvalues = 6;
   cl_env_copy->values[5] = T3;
   cl_env_copy->values[4] = T2;
   cl_env_copy->values[3] = v4;
   cl_env_copy->values[2] = v3;
   cl_env_copy->values[1] = ECL_NIL;
   cl_env_copy->values[0] = ECL_NIL;
   return cl_env_copy->values[0];
  }
 }
}
/* local function LAMBDA143                                                   */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC745__lambda143(cl_narg narg, cl_object v1, ...)
{
 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);
 if (ecl_unlikely(narg<1)) FEwrong_num_arguments(VV[66]);
 {
  cl_object v2args;
  ecl_va_list args; ecl_va_start(args,v1,narg,1);
  v2args = cl_grab_rest_args(args);
  ecl_va_end(args);
  {
   cl_object v3;
   cl_object v4;
   v3 = cl_gensym(0);
   v4 = cl_gensym(0);
   T0 = cl_list(2, v3, v4);
   T1 = ecl_append(v2args,T0);
   T2 = CONS(ECL_SYM("COMPARE-AND-SWAP-SVREF",1525),T1);
   T3 = CONS(ECL_SYM("SVREF",841),v2args);
   cl_env_copy->nvalues = 6;
   cl_env_copy->values[5] = T3;
   cl_env_copy->values[4] = T2;
   cl_env_copy->values[3] = v4;
   cl_env_copy->values[2] = v3;
   cl_env_copy->values[1] = ECL_NIL;
   cl_env_copy->values[0] = ECL_NIL;
   return cl_env_copy->values[0];
  }
 }
}
/* local function LAMBDA148                                                   */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC746__lambda148(cl_narg narg, cl_object v1, ...)
{
 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);
 if (ecl_unlikely(narg<1)) FEwrong_num_arguments(VV[67]);
 {
  cl_object v2args;
  ecl_va_list args; ecl_va_start(args,v1,narg,1);
  v2args = cl_grab_rest_args(args);
  ecl_va_end(args);
  {
   cl_object v3;
   cl_object v4;
   v3 = cl_gensym(0);
   v4 = cl_gensym(0);
   T0 = cl_list(2, v3, v4);
   T1 = ecl_append(v2args,T0);
   T2 = CONS(VV[68],T1);
   T3 = CONS(ECL_SYM("SLOT-VALUE",975),v2args);
   cl_env_copy->nvalues = 6;
   cl_env_copy->values[5] = T3;
   cl_env_copy->values[4] = T2;
   cl_env_copy->values[3] = v4;
   cl_env_copy->values[2] = v3;
   cl_env_copy->values[1] = ECL_NIL;
   cl_env_copy->values[0] = ECL_NIL;
   return cl_env_copy->values[0];
  }
 }
}
/* local function LAMBDA153                                                   */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC747__lambda153(cl_narg narg, cl_object v1, ...)
{
 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);
 if (ecl_unlikely(narg<1)) FEwrong_num_arguments(VV[69]);
 {
  cl_object v2args;
  ecl_va_list args; ecl_va_start(args,v1,narg,1);
  v2args = cl_grab_rest_args(args);
  ecl_va_end(args);
  {
   cl_object v3;
   cl_object v4;
   v3 = cl_gensym(0);
   v4 = cl_gensym(0);
   T0 = cl_list(2, v3, v4);
   T1 = ecl_append(v2args,T0);
   T2 = CONS(VV[70],T1);
   T3 = CONS(ECL_SYM("STANDARD-INSTANCE-ACCESS",1638),v2args);
   cl_env_copy->nvalues = 6;
   cl_env_copy->values[5] = T3;
   cl_env_copy->values[4] = T2;
   cl_env_copy->values[3] = v4;
   cl_env_copy->values[2] = v3;
   cl_env_copy->values[1] = ECL_NIL;
   cl_env_copy->values[0] = ECL_NIL;
   return cl_env_copy->values[0];
  }
 }
}
/* local function LAMBDA158                                                   */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC748__lambda158(cl_narg narg, cl_object v1, ...)
{
 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);
 if (ecl_unlikely(narg<1)) FEwrong_num_arguments(VV[72]);
 {
  cl_object v2args;
  ecl_va_list args; ecl_va_start(args,v1,narg,1);
  v2args = cl_grab_rest_args(args);
  ecl_va_end(args);
  {
   cl_object v3;
   cl_object v4;
   v3 = cl_gensym(0);
   v4 = cl_gensym(0);
   T0 = cl_list(2, v3, v4);
   T1 = ecl_append(v2args,T0);
   T2 = CONS(VV[70],T1);
   T3 = CONS(ECL_SYM("FUNCALLABLE-STANDARD-INSTANCE-ACCESS",1593),v2args);
   cl_env_copy->nvalues = 6;
   cl_env_copy->values[5] = T3;
   cl_env_copy->values[4] = T2;
   cl_env_copy->values[3] = v4;
   cl_env_copy->values[2] = v3;
   cl_env_copy->values[1] = ECL_NIL;
   cl_env_copy->values[0] = ECL_NIL;
   return cl_env_copy->values[0];
  }
 }
}
/* local function ATOMIC-UPDATE                                               */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC749atomic_update(cl_object v1, cl_object v2)
{
 cl_object T0, T1, T2, T3, T4, T5, T6, T7, T8, T9;
 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 v4place;
  cl_object v5update_fn;
  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);
   v4place = v6;
  }
  if (!(v3==ECL_NIL)){
   goto L10;
  }
  si_dm_too_few_arguments(v1);
L10:;
  {
   cl_object v6;
   v6 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v5update_fn = v6;
  }
  {
   cl_object v6;
   cl_object v7;
   v6 = cl_gensym(0);
   v7 = cl_gensym(0);
   T0 = cl_list(2, v7, v4place);
   T1 = ecl_list1(T0);
   T2 = ecl_list1(v7);
   T3 = ecl_append(v3,T2);
   T4 = cl_listX(3, ECL_SYM("FUNCALL",396), v5update_fn, T3);
   T5 = cl_list(4, ECL_SYM("COMPARE-AND-SWAP",1537), v4place, v7, v6);
   T6 = cl_list(3, ECL_SYM("SETF",753), v7, T5);
   T7 = cl_list(3, ECL_SYM("EQ",335), v7, T6);
   T8 = cl_list(2, ECL_SYM("RETURN",727), v6);
   T9 = cl_list(9, ECL_SYM("LOOP",514), VV[73], v6, ECL_SYM("=",76), T4, VV[74], T7, VV[75], T8);
   value0 = cl_list(3, ECL_SYM("LET",479), T1, T9);
   return value0;
  }
 }
}
static cl_object LC749atomic_update_va(cl_narg narg, cl_object v8, cl_object v9, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[76]);
 {
  return LC749atomic_update(v8, v9);
 }
}
/* local function ATOMIC-PUSH                                                 */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC750atomic_push(cl_object v1, cl_object v2)
{
 cl_object T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10;
 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 v4obj;
  cl_object v5place;
  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);
   v4obj = v6;
  }
  if (!(v3==ECL_NIL)){
   goto L10;
  }
  si_dm_too_few_arguments(v1);
L10:;
  {
   cl_object v6;
   v6 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v5place = v6;
  }
  if (Null(v3)){
   goto L15;
  }
  si_dm_too_many_arguments(v1);
L15:;
  {
   cl_object v6;
   cl_object v7;
   v6 = cl_gensym(0);
   v7 = cl_gensym(0);
   T0 = cl_list(2, v7, v5place);
   T1 = cl_list(3, ECL_SYM("CONS",253), v4obj, v7);
   T2 = cl_list(2, v6, T1);
   T3 = cl_list(2, T0, T2);
   T4 = cl_list(4, ECL_SYM("COMPARE-AND-SWAP",1537), v5place, v7, v6);
   T5 = cl_list(3, ECL_SYM("SETF",753), v7, T4);
   T6 = cl_list(3, ECL_SYM("EQ",335), v7, T5);
   T7 = cl_list(2, ECL_SYM("CDR",200), v6);
   T8 = cl_list(3, ECL_SYM("SETF",753), T7, v7);
   T9 = cl_list(2, ECL_SYM("RETURN",727), v6);
   T10 = cl_list(7, ECL_SYM("LOOP",514), VV[74], T6, ECL_SYM("DO",309), T8, VV[75], T9);
   value0 = cl_list(3, ECL_SYM("LET*",480), T3, T10);
   return value0;
  }
 }
}
static cl_object LC750atomic_push_va(cl_narg narg, cl_object v8, cl_object v9, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[77]);
 {
  return LC750atomic_push(v8, v9);
 }
}
/* local function ATOMIC-POP                                                  */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC751atomic_pop(cl_object v1, cl_object v2)
{
 cl_object T0, T1, T2, T3, T4, T5, T6, T7, T8, T9;
 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 v4place;
  v3 = ecl_cdr(v1);
  if (!(v3==ECL_NIL)){
   goto L4;
  }
  si_dm_too_few_arguments(v1);
L4:;
  {
   cl_object v5;
   v5 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v4place = v5;
  }
  if (Null(v3)){
   goto L9;
  }
  si_dm_too_many_arguments(v1);
L9:;
  {
   cl_object v5;
   cl_object v6;
   v5 = cl_gensym(0);
   v6 = cl_gensym(0);
   T0 = cl_list(2, v6, v4place);
   T1 = ecl_list1(T0);
   T2 = cl_list(2, ECL_SYM("CDR",200), v6);
   T3 = cl_list(4, ECL_SYM("COMPARE-AND-SWAP",1537), v4place, v6, v5);
   T4 = cl_list(3, ECL_SYM("SETF",753), v6, T3);
   T5 = cl_list(3, ECL_SYM("EQ",335), v6, T4);
   T6 = cl_list(3, ECL_SYM("TRULY-THE",2081), ECL_SYM("LIST",483), v6);
   T7 = cl_list(2, ECL_SYM("CAR",182), T6);
   T8 = cl_list(2, ECL_SYM("RETURN",727), T7);
   T9 = cl_list(9, ECL_SYM("LOOP",514), VV[73], v5, ECL_SYM("=",76), T2, VV[74], T5, VV[75], T8);
   value0 = cl_list(3, ECL_SYM("LET*",480), T1, T9);
   return value0;
  }
 }
}
static cl_object LC751atomic_pop_va(cl_narg narg, cl_object v7, cl_object v8, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[78]);
 {
  return LC751atomic_pop(v7, v8);
 }
}
/* local function ATOMIC-INCF                                                 */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC752atomic_incf(cl_object v1, cl_object v2)
{
 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:;
 {
  cl_object v3;
  cl_object v4place;
  cl_object v5increment;
  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);
   v4place = v6;
  }
  if (Null(v3)){
   goto L10;
  }
  {
   cl_object v6;
   v6 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v5increment = v6;
   goto L9;
  }
L10:;
  v5increment = ecl_make_int8_t(1);
L9:;
  if (Null(v3)){
   goto L15;
  }
  si_dm_too_many_arguments(v1);
L15:;
  v4place = cl_macroexpand(1, v4place);
  if (Null(L735special_variable_p(v4place))){
   goto L19;
  }
  T0 = cl_list(2, ECL_SYM("QUOTE",682), v4place);
  v4place = cl_list(2, ECL_SYM("SYMBOL-VALUE",849), T0);
L19:;
  {
   cl_object v6fun;
   if (!(ECL_LISTP(v4place))){
    goto L23;
   }
   {
    cl_object v7;
    v7 = ecl_car(v4place);
    if (!((v7)==(ECL_SYM("CAR",182)))){
     goto L31;
    }
    goto L28;
L31:;
    goto L29;
L29:;
    if (!((v7)==(ECL_SYM("FIRST",373)))){
     goto L26;
    }
    goto L27;
L28:;
L27:;
    v6fun = ECL_SYM("ATOMIC-INCF-CAR",1528);
    goto L22;
L26:;
    if (!((v7)==(ECL_SYM("CDR",200)))){
     goto L39;
    }
    goto L36;
L39:;
    goto L37;
L37:;
    if (!((v7)==(ECL_SYM("REST",722)))){
     goto L34;
    }
    goto L35;
L36:;
L35:;
    v6fun = ECL_SYM("ATOMIC-INCF-CDR",1529);
    goto L22;
L34:;
    if (!((v7)==(ECL_SYM("SYMBOL-VALUE",849)))){
     goto L42;
    }
    v6fun = ECL_SYM("ATOMIC-INCF-SYMBOL-VALUE",1530);
    goto L22;
L42:;
    if (!((v7)==(ECL_SYM("SVREF",841)))){
     goto L44;
    }
    v6fun = ECL_SYM("ATOMIC-INCF-SVREF",1531);
    goto L22;
L44:;
    if (!((v7)==(ECL_SYM("SLOT-VALUE",975)))){
     goto L46;
    }
    v6fun = VV[81];
    goto L22;
L46:;
    if (!((v7)==(ECL_SYM("STANDARD-INSTANCE-ACCESS",1638)))){
     goto L53;
    }
    goto L50;
L53:;
    goto L51;
L51:;
    if (!((v7)==(ECL_SYM("FUNCALLABLE-STANDARD-INSTANCE-ACCESS",1593)))){
     goto L48;
    }
    goto L49;
L50:;
L49:;
    v6fun = VV[83];
    goto L22;
L48:;
    v6fun = ECL_NIL;
    goto L22;
   }
L23:;
   v6fun = ECL_NIL;
L22:;
   if (v6fun!=ECL_NIL) {
    goto L56;
   }
   cl_error(2, VV[84], v4place);
L56:;
   T0 = ecl_cdr(v4place);
   T1 = ecl_list1(v5increment);
   T2 = ecl_append(T0,T1);
   value0 = CONS(v6fun,T2);
   cl_env_copy->nvalues = 1;
   return value0;
  }
 }
}
static cl_object LC752atomic_incf_va(cl_narg narg, cl_object v7, cl_object v8, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[85]);
 {
  return LC752atomic_incf(v7, v8);
 }
}
/* local function ATOMIC-DECF                                                 */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC753atomic_decf(cl_object v1, cl_object v2)
{
 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 v4place;
  cl_object v5decrement;
  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);
   v4place = v6;
  }
  if (Null(v3)){
   goto L10;
  }
  {
   cl_object v6;
   v6 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v5decrement = v6;
   goto L9;
  }
L10:;
  v5decrement = ecl_make_int8_t(1);
L9:;
  if (Null(v3)){
   goto L15;
  }
  si_dm_too_many_arguments(v1);
L15:;
  T0 = cl_list(2, ECL_SYM("-",19), v5decrement);
  value0 = cl_list(3, ECL_SYM("ATOMIC-INCF",1541), v4place, T0);
  return value0;
 }
}
static cl_object LC753atomic_decf_va(cl_narg narg, cl_object v6, cl_object v7, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[86]);
 {
  return LC753atomic_decf(v6, v7);
 }
}
#include "lsp/mp.data"
#ifdef __cplusplus
extern "C"
#endif

ECL_DLLEXPORT void _eclJejZo6rSrTpp9_MYzzL881(cl_object flag)
{
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 cl_object *VVtemp;
 if (flag != OBJNULL){
 Cblock = flag;
 #ifndef ECL_DYNAMIC_VV
 flag->cblock.data = VV;
 #endif
 flag->cblock.data_size = VM;
 flag->cblock.temp_data_size = VMtemp;
 flag->cblock.data_text = compiler_data_text;
 flag->cblock.cfuns_size = compiler_cfuns_size;
 flag->cblock.cfuns = compiler_cfuns;
 flag->cblock.source = ecl_make_constant_base_string("SRC:LSP;MP.LSP.NEWEST",-1);
 return;}
 #ifdef ECL_DYNAMIC_VV
 VV = Cblock->cblock.data;
 #endif
 Cblock->cblock.data_text = (const cl_object *)"@EcLtAg:_eclJejZo6rSrTpp9_MYzzL881@";
 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]);
  ecl_cmp_defmacro(VV[87]);                       /*  WITHOUT-INTERRUPTS      */
  ecl_cmp_defmacro(VV[88]);                       /*  WITH-INTERRUPTS         */
  ecl_cmp_defmacro(VV[89]);                       /*  WITH-LOCK               */
  ecl_cmp_defmacro(VV[90]);                       /*  WITH-RWLOCK             */
  ecl_cmp_defmacro(VV[91]);                       /*  DEFINE-CAS-EXPANDER     */
  ecl_cmp_defmacro(VV[92]);                       /*  DEFCAS                  */
  (void)0; /* No entry created for SPECIAL-VARIABLE-P */
  ecl_cmp_defun(VV[93]);                          /*  REMCAS                  */
  ecl_cmp_defun(VV[94]);                          /*  GET-CAS-EXPANSION       */
  ecl_cmp_defmacro(VV[95]);                       /*  COMPARE-AND-SWAP        */
  {
   cl_object v1package;
   v1package = cl_symbol_package(ECL_SYM("CAR",182));
   if (Null(v1package)){
    goto L25;
   }
   if (Null(si_package_locked_p(v1package))){
    goto L25;
   }
   if (!(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("*IGNORE-PACKAGE-LOCKS*",1128))==ECL_NIL)){
    goto L25;
   }
   si_signal_simple_error(6, ECL_SYM("PACKAGE-ERROR",620), VV[33], VV[34], VVtemp[1], ECL_SYM("PACKAGE",1321), v1package);
  }
L25:;
  {
   cl_object volatile v2;
   v2 = ecl_make_cfun_va((cl_objectfn)LC739__lambda113,ECL_NIL,Cblock,1);
   T0 = v2;
  }
  si_put_sysprop(ECL_SYM("CAR",182), VV[48], T0);
  {
   cl_object v2package;
   v2package = cl_symbol_package(ECL_SYM("FIRST",373));
   if (Null(v2package)){
    goto L33;
   }
   if (Null(si_package_locked_p(v2package))){
    goto L33;
   }
   if (!(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("*IGNORE-PACKAGE-LOCKS*",1128))==ECL_NIL)){
    goto L33;
   }
   si_signal_simple_error(6, ECL_SYM("PACKAGE-ERROR",620), VV[33], VV[34], VV[59], ECL_SYM("PACKAGE",1321), v2package);
  }
L33:;
  {
   cl_object volatile v3;
   v3 = ecl_make_cfun_va((cl_objectfn)LC740__lambda118,ECL_NIL,Cblock,1);
   T0 = v3;
  }
  si_put_sysprop(ECL_SYM("FIRST",373), VV[48], T0);
  {
   cl_object v3package;
   v3package = cl_symbol_package(ECL_SYM("CDR",200));
   if (Null(v3package)){
    goto L41;
   }
   if (Null(si_package_locked_p(v3package))){
    goto L41;
   }
   if (!(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("*IGNORE-PACKAGE-LOCKS*",1128))==ECL_NIL)){
    goto L41;
   }
   si_signal_simple_error(6, ECL_SYM("PACKAGE-ERROR",620), VV[33], VV[34], VVtemp[2], ECL_SYM("PACKAGE",1321), v3package);
  }
L41:;
  {
   cl_object volatile v4;
   v4 = ecl_make_cfun_va((cl_objectfn)LC741__lambda123,ECL_NIL,Cblock,1);
   T0 = v4;
  }
  si_put_sysprop(ECL_SYM("CDR",200), VV[48], T0);
  {
   cl_object v4package;
   v4package = cl_symbol_package(ECL_SYM("REST",722));
   if (Null(v4package)){
    goto L49;
   }
   if (Null(si_package_locked_p(v4package))){
    goto L49;
   }
   if (!(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("*IGNORE-PACKAGE-LOCKS*",1128))==ECL_NIL)){
    goto L49;
   }
   si_signal_simple_error(6, ECL_SYM("PACKAGE-ERROR",620), VV[33], VV[34], VV[62], ECL_SYM("PACKAGE",1321), v4package);
  }
L49:;
  {
   cl_object volatile v5;
   v5 = ecl_make_cfun_va((cl_objectfn)LC742__lambda128,ECL_NIL,Cblock,1);
   T0 = v5;
  }
  si_put_sysprop(ECL_SYM("REST",722), VV[48], T0);
  {
   cl_object v5package;
   v5package = cl_symbol_package(ECL_SYM("SYMBOL-VALUE",849));
   if (Null(v5package)){
    goto L57;
   }
   if (Null(si_package_locked_p(v5package))){
    goto L57;
   }
   if (!(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("*IGNORE-PACKAGE-LOCKS*",1128))==ECL_NIL)){
    goto L57;
   }
   si_signal_simple_error(6, ECL_SYM("PACKAGE-ERROR",620), VV[33], VV[34], VVtemp[3], ECL_SYM("PACKAGE",1321), v5package);
  }
L57:;
  {
   cl_object volatile v6;
   v6 = ecl_make_cfun_va((cl_objectfn)LC743__lambda133,ECL_NIL,Cblock,1);
   T0 = v6;
  }
  si_put_sysprop(ECL_SYM("SYMBOL-VALUE",849), VV[48], T0);
  {
   cl_object v6package;
   v6package = cl_symbol_package(ECL_SYM("SYMBOL-PLIST",848));
   if (Null(v6package)){
    goto L65;
   }
   if (Null(si_package_locked_p(v6package))){
    goto L65;
   }
   if (!(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("*IGNORE-PACKAGE-LOCKS*",1128))==ECL_NIL)){
    goto L65;
   }
   si_signal_simple_error(6, ECL_SYM("PACKAGE-ERROR",620), VV[33], VV[34], VVtemp[4], ECL_SYM("PACKAGE",1321), v6package);
  }
L65:;
  {
   cl_object volatile v7;
   v7 = ecl_make_cfun_va((cl_objectfn)LC744__lambda138,ECL_NIL,Cblock,1);
   T0 = v7;
  }
  si_put_sysprop(ECL_SYM("SYMBOL-PLIST",848), VV[48], T0);
  {
   cl_object v7package;
   v7package = cl_symbol_package(ECL_SYM("SVREF",841));
   if (Null(v7package)){
    goto L73;
   }
   if (Null(si_package_locked_p(v7package))){
    goto L73;
   }
   if (!(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("*IGNORE-PACKAGE-LOCKS*",1128))==ECL_NIL)){
    goto L73;
   }
   si_signal_simple_error(6, ECL_SYM("PACKAGE-ERROR",620), VV[33], VV[34], VVtemp[5], ECL_SYM("PACKAGE",1321), v7package);
  }
L73:;
  {
   cl_object volatile v8;
   v8 = ecl_make_cfun_va((cl_objectfn)LC745__lambda143,ECL_NIL,Cblock,1);
   T0 = v8;
  }
  si_put_sysprop(ECL_SYM("SVREF",841), VV[48], T0);
  {
   cl_object v8package;
   v8package = cl_symbol_package(ECL_SYM("SLOT-VALUE",975));
   if (Null(v8package)){
    goto L81;
   }
   if (Null(si_package_locked_p(v8package))){
    goto L81;
   }
   if (!(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("*IGNORE-PACKAGE-LOCKS*",1128))==ECL_NIL)){
    goto L81;
   }
   si_signal_simple_error(6, ECL_SYM("PACKAGE-ERROR",620), VV[33], VV[34], VVtemp[6], ECL_SYM("PACKAGE",1321), v8package);
  }
L81:;
  {
   cl_object volatile v9;
   v9 = ecl_make_cfun_va((cl_objectfn)LC746__lambda148,ECL_NIL,Cblock,1);
   T0 = v9;
  }
  si_put_sysprop(ECL_SYM("SLOT-VALUE",975), VV[48], T0);
  {
   cl_object v9package;
   v9package = cl_symbol_package(ECL_SYM("STANDARD-INSTANCE-ACCESS",1638));
   if (Null(v9package)){
    goto L89;
   }
   if (Null(si_package_locked_p(v9package))){
    goto L89;
   }
   if (!(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("*IGNORE-PACKAGE-LOCKS*",1128))==ECL_NIL)){
    goto L89;
   }
   si_signal_simple_error(6, ECL_SYM("PACKAGE-ERROR",620), VV[33], VV[34], VVtemp[7], ECL_SYM("PACKAGE",1321), v9package);
  }
L89:;
  {
   cl_object volatile v10;
   v10 = ecl_make_cfun_va((cl_objectfn)LC747__lambda153,ECL_NIL,Cblock,1);
   T0 = v10;
  }
  si_put_sysprop(ECL_SYM("STANDARD-INSTANCE-ACCESS",1638), VV[48], T0);
  {
   cl_object v10package;
   v10package = cl_symbol_package(ECL_SYM("FUNCALLABLE-STANDARD-INSTANCE-ACCESS",1593));
   if (Null(v10package)){
    goto L97;
   }
   if (Null(si_package_locked_p(v10package))){
    goto L97;
   }
   if (!(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("*IGNORE-PACKAGE-LOCKS*",1128))==ECL_NIL)){
    goto L97;
   }
   si_signal_simple_error(6, ECL_SYM("PACKAGE-ERROR",620), VV[33], VV[34], VV[71], ECL_SYM("PACKAGE",1321), v10package);
  }
L97:;
  {
   cl_object volatile v11;
   v11 = ecl_make_cfun_va((cl_objectfn)LC748__lambda158,ECL_NIL,Cblock,1);
   T0 = v11;
  }
  si_put_sysprop(ECL_SYM("FUNCALLABLE-STANDARD-INSTANCE-ACCESS",1593), VV[48], T0);
  ecl_cmp_defmacro(VV[96]);                       /*  ATOMIC-UPDATE           */
  ecl_cmp_defmacro(VV[97]);                       /*  ATOMIC-PUSH             */
  ecl_cmp_defmacro(VV[98]);                       /*  ATOMIC-POP              */
  ecl_cmp_defmacro(VV[99]);                       /*  ATOMIC-INCF             */
  ecl_cmp_defmacro(VV[100]);                      /*  ATOMIC-DECF             */
 }
}
