/* Compiler: ECL 26.3.27                                                      */
/* Source: /build/ecl/src/ecl-26.3.27/src/clos/std-slot-value.lsp             */
#include <ecl/ecl-cmp.h>
#include "clos/std-slot-value.eclh"
/* local function WITH-SLOTS                                                  */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC789with_slots(cl_object v1, cl_object v2)
{
 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 v4slot_entries;
  cl_object v5instance_form;
  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);
   v4slot_entries = 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);
   v5instance_form = v6;
  }
  {
   cl_object v6temp;
   cl_object v7accessors;
   v6temp = cl_gensym(0);
   {
    cl_object v8scan;
    cl_object v9res;
    v8scan = v4slot_entries;
    v9res = ECL_NIL;
    goto L21;
L20:;
    T0 = ecl_car(v8scan);
    if (!(ECL_SYMBOLP(T0))){
     goto L24;
    }
    T0 = ecl_car(v8scan);
    T1 = ecl_car(v8scan);
    T2 = cl_list(2, ECL_SYM("QUOTE",682), T1);
    T3 = cl_list(3, ECL_SYM("SLOT-VALUE",975), v6temp, T2);
    T4 = cl_list(2, T0, T3);
    v9res = CONS(T4,v9res);
    goto L23;
L24:;
    T0 = ecl_caar(v8scan);
    T1 = ecl_cadar(v8scan);
    T2 = cl_list(2, ECL_SYM("QUOTE",682), T1);
    T3 = cl_list(3, ECL_SYM("SLOT-VALUE",975), v6temp, T2);
    T4 = cl_list(2, T0, T3);
    v9res = CONS(T4,v9res);
L23:;
    v8scan = ecl_cdr(v8scan);
L21:;
    if (v8scan==ECL_NIL) {
     goto L30;
    }
    goto L20;
L30:;
    v7accessors = cl_nreverse(v9res);
   }
   T0 = cl_list(2, v6temp, v5instance_form);
   T1 = ecl_list1(T0);
   T2 = cl_listX(3, ECL_SYM("SYMBOL-MACROLET",845), v7accessors, v3);
   value0 = cl_list(3, ECL_SYM("LET",479), T1, T2);
   return value0;
  }
 }
}
static cl_object LC789with_slots_va(cl_narg narg, cl_object v8, cl_object v9, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[1]);
 {
  return LC789with_slots(v8, v9);
 }
}
/* function definition for STD-CREATE-SLOTS-TABLE                             */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L790std_create_slots_table(cl_object v1class)
{
 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 v2size;
  cl_object v3table;
  T0 = cl_slot_value(v1class, VV[3]);
  {
   cl_fixnum v4;
   v4 = ecl_length(T0);
   T1 = ecl_times(ecl_make_int8_t(2),ecl_make_fixnum(v4));
   v2size = ((ecl_float_nan_p(T1) || ecl_greatereq(ecl_make_int8_t(32),T1))?ecl_make_int8_t(32):T1);
  }
  v3table = cl_make_hash_table(2, ECL_SYM("SIZE",1345), v2size);
  {
   cl_object v4;
   v4 = cl_slot_value(v1class, VV[3]);
   goto L8;
L7:;
   {
    cl_object v5slotd;
    v5slotd = ecl_car(v4);
    T0 = (cl_env_copy->function=(ECL_SYM("SLOT-DEFINITION-NAME",1624)->symbol.gfdef))->cfun.entry(1, v5slotd) /*  SLOT-DEFINITION-NAME */;
    si_hash_set(T0, v3table, v5slotd);
   }
   v4 = ecl_cdr(v4);
L8:;
   if (Null(v4)){
    goto L15;
   }
   goto L7;
L15:;
  }
  {
   cl_object v4;
   cl_object v5locations;
   v4 = si_instance_class(v1class);
   v5locations = ECL_NIL;
   T0 = cl_find_class(1, ECL_SYM("STANDARD-CLASS",977));
   if ((v4)==(T0)) {
    goto L21;
   }
   T0 = cl_find_class(1, ECL_SYM("FUNCALLABLE-STANDARD-CLASS",1592));
   if ((v4)==(T0)) {
    goto L21;
   }
   T0 = cl_find_class(1, ECL_SYM("STRUCTURE-CLASS",981));
   if (!((v4)==(T0))){
    goto L19;
   }
   goto L20;
L21:;
L20:;
   v5locations = cl_make_hash_table(2, ECL_SYM("SIZE",1345), v2size);
   {
    cl_object v6;
    v6 = cl_slot_value(v1class, VV[3]);
    goto L29;
L28:;
    {
     cl_object v7slotd;
     v7slotd = ecl_car(v6);
     T0 = (cl_env_copy->function=(ECL_SYM("SLOT-DEFINITION-NAME",1624)->symbol.gfdef))->cfun.entry(1, v7slotd) /*  SLOT-DEFINITION-NAME */;
     T1 = (cl_env_copy->function=(ECL_SYM("SLOT-DEFINITION-LOCATION",1623)->symbol.gfdef))->cfun.entry(1, v7slotd) /*  SLOT-DEFINITION-LOCATION */;
     si_hash_set(T0, v5locations, T1);
    }
    v6 = ecl_cdr(v6);
L29:;
    if (Null(v6)){
     goto L36;
    }
    goto L28;
L36:;
   }
L19:;
   (cl_env_copy->function=ECL_CONS_CAR(VV[46]))->cfun.entry(3, v3table, v1class, ECL_SYM("SLOT-TABLE",1631)) /*  (SETF SLOT-VALUE) */;
   value0 = (cl_env_copy->function=ECL_CONS_CAR(VV[46]))->cfun.entry(3, v5locations, v1class, ECL_SYM("LOCATION-TABLE",1603)) /*  (SETF SLOT-VALUE) */;
   return value0;
  }
 }
}
static cl_object L790std_create_slots_table_va(cl_narg narg, cl_object v6class, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[2]);
 {
  return L790std_create_slots_table(v6class);
 }
}
/* function definition for FIND-SLOT-DEFINITION                               */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object clos_find_slot_definition(cl_object v1class, cl_object v2slot_name)
{
 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 = si_instance_class(v1class);
 if ((T0)==(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("+THE-STANDARD-CLASS+",1556)))) {
  goto L4;
 }
 T0 = si_instance_class(v1class);
 if (!((T0)==(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("+THE-FUNCALLABLE-STANDARD-CLASS+",1557))))){
  goto L2;
 }
 goto L3;
L4:;
L3:;
 T0 = cl_slot_value(v1class, ECL_SYM("SLOT-TABLE",1631));
 value0 = cl_gethash(3, v2slot_name, T0, ECL_NIL);
 return value0;
L2:;
 {
  cl_object v3;
  cl_object v4;
  v3 = cl_slot_value(v1class, VV[3]);
  v4 = (ECL_SYM("SLOT-DEFINITION-NAME",1624)->symbol.gfdef);
  {
   cl_object v5;
   v5 = si_make_seq_iterator(2, v3, ecl_make_int8_t(0));
L9:;
   if (v5!=ECL_NIL) {
    goto L11;
   }
   value0 = ECL_NIL;
   cl_env_copy->nvalues = 1;
   return value0;
L11:;
   {
    cl_object v6;
    v6 = si_seq_iterator_ref(v3, v5);
    T0 = (cl_env_copy->function=(ECL_SYM("SLOT-DEFINITION-NAME",1624)->symbol.gfdef))->cfun.entry(1, v6) /*  SLOT-DEFINITION-NAME */;
    if (!(ecl_eql(v2slot_name,T0))){
     goto L13;
    }
    value0 = v6;
    cl_env_copy->nvalues = 1;
    return value0;
   }
L13:;
   v5 = si_seq_iterator_next(v3, v5);
   goto L9;
  }
 }
}
cl_object clos_find_slot_definition_va(cl_narg narg, cl_object v6class, cl_object v7slot_name, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[6]);
 {
  return clos_find_slot_definition(v6class, v7slot_name);
 }
}
/* function definition for UPDATE-INSTANCE                                    */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L791update_instance(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:;
 value0 = si_instance_sig_set(v1x);
 return value0;
}
static cl_object L791update_instance_va(cl_narg narg, cl_object v2x, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[12]);
 {
  return L791update_instance(v2x);
 }
}
/* function definition for STANDARD-INSTANCE-ACCESS                           */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object clos_standard_instance_access(cl_object v1instance, cl_object v2location)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 if (Null(si_instance_obsolete_p(v1instance))){
  goto L2;
 }
 (cl_env_copy->function=(VV[12]->symbol.gfdef))->cfun.entry(1, v1instance) /*  UPDATE-INSTANCE */;
L2:;
 if (!(ECL_FIXNUMP(v2location))){
  goto L4;
 }
 value0 = ecl_instance_ref((v1instance),(ecl_fixnum(v2location)));
 cl_env_copy->nvalues = 1;
 return value0;
L4:;
 if (!(ECL_CONSP(v2location))){
  goto L6;
 }
 value0 = ecl_car(v2location);
 cl_env_copy->nvalues = 1;
 return value0;
L6:;
 value0 = L1062invalid_slot_location(v1instance, v2location);
 return value0;
}
/* function definition for STANDARD-INSTANCE-SET                              */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object clos_standard_instance_set(cl_object v1instance, cl_object v2location, cl_object v3val)
{
 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:;
 if (Null(si_instance_obsolete_p(v1instance))){
  goto L2;
 }
 (cl_env_copy->function=(VV[12]->symbol.gfdef))->cfun.entry(1, v1instance) /*  UPDATE-INSTANCE */;
L2:;
 if (!(ECL_FIXNUMP(v2location))){
  goto L5;
 }
 si_instance_set(v1instance, v2location, v3val);
 goto L4;
L5:;
 if (!(ECL_CONSP(v2location))){
  goto L7;
 }
 {
  cl_object v4;
  v4 = v3val;
  {
   cl_object v5;
   v5 = v2location;
   if (ecl_unlikely(ECL_ATOM(v5))) FEtype_error_cons(v5);
   value0 = ECL_NIL;
   cl_env_copy->nvalues = 0;
   T0 = v5;
  }
  (ECL_CONS_CAR(T0)=v4,T0);
  goto L4;
 }
L7:;
 L1062invalid_slot_location(v1instance, v2location);
L4:;
 value0 = v3val;
 cl_env_copy->nvalues = 1;
 return value0;
}
/* function definition for SLOT-VALUE                                         */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_slot_value(cl_object v1self, cl_object v2slot_name)
{
 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 v3class;
  cl_object v4location_table;
  v3class = cl_class_of(v1self);
  v4location_table = ecl_instance_ref((v3class),((cl_fixnum)(19)));
  if (Null(v4location_table)){
   goto L4;
  }
  {
   cl_object v5location;
   v5location = ecl_gethash_safe(v2slot_name,v4location_table,ECL_NIL);
   if (Null(v5location)){
    goto L7;
   }
   {
    cl_object v6value;
    v6value = clos_standard_instance_access(v1self, v5location);
    if (!((v6value)!=ECL_UNBOUND)){
     goto L10;
    }
    value0 = v6value;
    cl_env_copy->nvalues = 1;
    return value0;
L10:;
    value0 = (cl_env_copy->function=(ECL_SYM("SLOT-UNBOUND",974)->symbol.gfdef))->cfun.entry(3, v3class, v1self, v2slot_name) /*  SLOT-UNBOUND */;
    cl_env_copy->nvalues = 1;
    return value0;
   }
L7:;
   value0 = (cl_env_copy->function=(ECL_SYM("SLOT-MISSING",973)->symbol.gfdef))->cfun.entry(4, v3class, v1self, v2slot_name, ECL_SYM("SLOT-VALUE",975)) /*  SLOT-MISSING */;
   return value0;
  }
L4:;
  {
   cl_object v7slotd;
   {
    cl_object v8;
    v8 = ecl_instance_ref((v3class),((cl_fixnum)(6)));
    {
     cl_object v9;
     v9 = si_make_seq_iterator(2, v8, ecl_make_int8_t(0));
L16:;
     if (v9!=ECL_NIL) {
      goto L18;
     }
     v7slotd = ECL_NIL;
     goto L13;
L18:;
     {
      cl_object v10;
      v10 = si_seq_iterator_ref(v8, v9);
      T0 = ecl_instance_ref((v10),((cl_fixnum)(0)));
      if (!((v2slot_name)==(T0))){
       goto L20;
      }
      v7slotd = v10;
      goto L13;
     }
L20:;
     v9 = si_seq_iterator_next(v8, v9);
     goto L16;
    }
   }
L13:;
   if (Null(v7slotd)){
    goto L26;
   }
   value0 = (cl_env_copy->function=(ECL_SYM("SLOT-VALUE-USING-CLASS",1629)->symbol.gfdef))->cfun.entry(3, v3class, v1self, v7slotd) /*  SLOT-VALUE-USING-CLASS */;
   return value0;
L26:;
   value0 = (cl_env_copy->function=(ECL_SYM("SLOT-MISSING",973)->symbol.gfdef))->cfun.entry(4, v3class, v1self, v2slot_name, ECL_SYM("SLOT-VALUE",975)) /*  SLOT-MISSING */;
   cl_env_copy->nvalues = 1;
   return value0;
  }
 }
}
/* function definition for SLOT-EXISTS-P                                      */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_slot_exists_p(cl_object v1self, cl_object v2slot_name)
{
 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_class_of(v1self);
 if (Null(clos_find_slot_definition(T0, v2slot_name))){
  goto L3;
 }
 value0 = ECL_T;
 cl_env_copy->nvalues = 1;
 return value0;
L3:;
 value0 = ECL_NIL;
 cl_env_copy->nvalues = 1;
 return value0;
}
/* function definition for SLOT-BOUNDP                                        */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_slot_boundp(cl_object v1self, cl_object v2slot_name)
{
 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 v3class;
  cl_object v4location_table;
  v3class = cl_class_of(v1self);
  v4location_table = ecl_instance_ref((v3class),((cl_fixnum)(19)));
  if (Null(v4location_table)){
   goto L4;
  }
  {
   cl_object v5location;
   v5location = ecl_gethash_safe(v2slot_name,v4location_table,ECL_NIL);
   if (Null(v5location)){
    goto L7;
   }
   T0 = clos_standard_instance_access(v1self, v5location);
   value0 = ecl_make_bool((T0)!=ECL_UNBOUND);
   cl_env_copy->nvalues = 1;
   return value0;
L7:;
   value0 = (cl_env_copy->function=(ECL_SYM("SLOT-MISSING",973)->symbol.gfdef))->cfun.entry(4, v3class, v1self, v2slot_name, ECL_SYM("SLOT-BOUNDP",970)) /*  SLOT-MISSING */;
   cl_env_copy->nvalues = 1;
   return value0;
  }
L4:;
  {
   cl_object v6slotd;
   {
    cl_object v7;
    v7 = ecl_instance_ref((v3class),((cl_fixnum)(6)));
    {
     cl_object v8;
     v8 = si_make_seq_iterator(2, v7, ecl_make_int8_t(0));
L13:;
     if (v8!=ECL_NIL) {
      goto L15;
     }
     v6slotd = ECL_NIL;
     goto L10;
L15:;
     {
      cl_object v9;
      v9 = si_seq_iterator_ref(v7, v8);
      T0 = ecl_instance_ref((v9),((cl_fixnum)(0)));
      if (!((v2slot_name)==(T0))){
       goto L17;
      }
      v6slotd = v9;
      goto L10;
     }
L17:;
     v8 = si_seq_iterator_next(v7, v8);
     goto L13;
    }
   }
L10:;
   if (Null(v6slotd)){
    goto L23;
   }
   value0 = (cl_env_copy->function=(ECL_SYM("SLOT-BOUNDP-USING-CLASS",1617)->symbol.gfdef))->cfun.entry(3, v3class, v1self, v6slotd) /*  SLOT-BOUNDP-USING-CLASS */;
   return value0;
L23:;
   value0 = (cl_env_copy->function=(ECL_SYM("SLOT-MISSING",973)->symbol.gfdef))->cfun.entry(4, v3class, v1self, v2slot_name, ECL_SYM("SLOT-BOUNDP",970)) /*  SLOT-MISSING */;
   cl_env_copy->nvalues = 1;
   return value0;
  }
 }
}
/* function definition for SLOT-VALUE-SET                                     */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object clos_slot_value_set(cl_object v1value, cl_object v2self, cl_object v3slot_name)
{
 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 v4class;
  cl_object v5location_table;
  v4class = cl_class_of(v2self);
  v5location_table = ecl_instance_ref((v4class),((cl_fixnum)(19)));
  if (Null(v5location_table)){
   goto L5;
  }
  {
   cl_object v6location;
   v6location = ecl_gethash_safe(v3slot_name,v5location_table,ECL_NIL);
   if (Null(v6location)){
    goto L8;
   }
   clos_standard_instance_set(v2self, v6location, v1value);
   goto L2;
L8:;
   (cl_env_copy->function=(ECL_SYM("SLOT-MISSING",973)->symbol.gfdef))->cfun.entry(5, v4class, v2self, v3slot_name, ECL_SYM("SETF",753), v1value) /*  SLOT-MISSING */;
   goto L2;
  }
L5:;
  {
   cl_object v7slotd;
   {
    cl_object v8;
    v8 = ecl_instance_ref((v4class),((cl_fixnum)(6)));
    {
     cl_object v9;
     v9 = si_make_seq_iterator(2, v8, ecl_make_int8_t(0));
L13:;
     if (v9!=ECL_NIL) {
      goto L15;
     }
     v7slotd = ECL_NIL;
     goto L10;
L15:;
     {
      cl_object v10;
      v10 = si_seq_iterator_ref(v8, v9);
      T0 = ecl_instance_ref((v10),((cl_fixnum)(0)));
      if (!((v3slot_name)==(T0))){
       goto L17;
      }
      v7slotd = v10;
      goto L10;
     }
L17:;
     v9 = si_seq_iterator_next(v8, v9);
     goto L13;
    }
   }
L10:;
   if (Null(v7slotd)){
    goto L23;
   }
   (cl_env_copy->function=ECL_CONS_CAR(VV[47]))->cfun.entry(4, v1value, v4class, v2self, v7slotd) /*  (SETF SLOT-VALUE-USING-CLASS) */;
   goto L2;
L23:;
   (cl_env_copy->function=(ECL_SYM("SLOT-MISSING",973)->symbol.gfdef))->cfun.entry(5, v4class, v2self, v3slot_name, ECL_SYM("SETF",753), v1value) /*  SLOT-MISSING */;
  }
 }
L2:;
 value0 = v1value;
 cl_env_copy->nvalues = 1;
 return value0;
}
/* function definition for INVALID-SLOT-LOCATION                              */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L1062invalid_slot_location(cl_object v1instance, cl_object v2location)
{
 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_class_of(v2location);
 value0 = cl_error(3, VV[26], v2location, T0);
 return value0;
}
/* function definition for STD-SLOT-LOCATION                                  */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L1063std_slot_location(cl_object v1self, cl_object v2slot_name, cl_object v3operation)
{
 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 v4class;
  cl_object v5location_table;
  cl_object v6location;
  v4class = cl_class_of(v1self);
  v5location_table = (cl_env_copy->function=(VV[15]->symbol.gfdef))->cfun.entry(1, v4class) /*  CLASS-LOCATION-TABLE */;
  if (Null(v5location_table)){
   goto L5;
  }
  v6location = ecl_gethash_safe(v2slot_name,v5location_table,ECL_NIL);
  goto L4;
L5:;
  {
   cl_object v7slotd;
   {
    cl_object v8;
    cl_object v9;
    v8 = (cl_env_copy->function=(ECL_SYM("CLASS-SLOTS",1570)->symbol.gfdef))->cfun.entry(1, v4class) /*  CLASS-SLOTS */;
    v9 = (ECL_SYM("SLOT-DEFINITION-NAME",1624)->symbol.gfdef);
    {
     cl_object v10;
     v10 = si_make_seq_iterator(2, v8, ecl_make_int8_t(0));
L11:;
     if (v10!=ECL_NIL) {
      goto L13;
     }
     v7slotd = ECL_NIL;
     goto L7;
L13:;
     {
      cl_object v11;
      v11 = si_seq_iterator_ref(v8, v10);
      T0 = (cl_env_copy->function=(ECL_SYM("SLOT-DEFINITION-NAME",1624)->symbol.gfdef))->cfun.entry(1, v11) /*  SLOT-DEFINITION-NAME */;
      if (!(ecl_eql(v2slot_name,T0))){
       goto L15;
      }
      v7slotd = v11;
      goto L7;
     }
L15:;
     v10 = si_seq_iterator_next(v8, v10);
     goto L11;
    }
   }
L7:;
   if (Null(v7slotd)){
    goto L20;
   }
   v6location = (cl_env_copy->function=(ECL_SYM("SLOT-DEFINITION-LOCATION",1623)->symbol.gfdef))->cfun.entry(1, v7slotd) /*  SLOT-DEFINITION-LOCATION */;
   goto L4;
L20:;
   v6location = ECL_NIL;
  }
L4:;
  value0 = v6location;
  if (value0!=ECL_NIL) {
   goto L23;
  }
  value0 = (cl_env_copy->function=(ECL_SYM("SLOT-MISSING",973)->symbol.gfdef))->cfun.entry(4, v4class, v1self, v2slot_name, v3operation) /*  SLOT-MISSING */;
  return value0;
L23:;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
static cl_object L1063std_slot_location_va(cl_narg narg, cl_object v7self, cl_object v8slot_name, cl_object v9operation, ...)
{
 if (ecl_unlikely(narg!=3)) FEwrong_num_arguments(VV[27]);
 {
  return L1063std_slot_location(v7self, v8slot_name, v9operation);
 }
}
/* function definition for COMPARE-AND-SWAP-STANDARD-INSTANCE                 */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L1118mp__compare_and_swap_standard_instance(cl_object v1instance, cl_object v2location, cl_object v3old, cl_object v4new)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 if (Null(si_instance_obsolete_p(v1instance))){
  goto L2;
 }
 (cl_env_copy->function=(VV[12]->symbol.gfdef))->cfun.entry(1, v1instance) /*  UPDATE-INSTANCE */;
L2:;
 if (!(ECL_FIXNUMP(v2location))){
  goto L4;
 }
 value0 = ecl_compare_and_swap_instance((v1instance),(ecl_fixnum(v2location)),(v3old),(v4new));
 cl_env_copy->nvalues = 1;
 return value0;
L4:;
 if (!(ECL_CONSP(v2location))){
  goto L6;
 }
 value0 = mp_compare_and_swap_car(v2location, v3old, v4new);
 return value0;
L6:;
 value0 = L1062invalid_slot_location(v1instance, v2location);
 return value0;
}
static cl_object L1118mp__compare_and_swap_standard_instance_va(cl_narg narg, cl_object v5instance, cl_object v6location, cl_object v7old, cl_object v8new, ...)
{
 if (ecl_unlikely(narg!=4)) FEwrong_num_arguments(VV[29]);
 {
  return L1118mp__compare_and_swap_standard_instance(v5instance, v6location, v7old, v8new);
 }
}
/* function definition for COMPARE-AND-SWAP-SLOT-VALUE                        */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L1173mp__compare_and_swap_slot_value(cl_object v1self, cl_object v2slot_name, cl_object v3old, cl_object v4new)
{
 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 v5location;
  cl_object v6old_slot_value;
  v5location = L1063std_slot_location(v1self, v2slot_name, ECL_SYM("COMPARE-AND-SWAP",1537));
  v6old_slot_value = L1118mp__compare_and_swap_standard_instance(v1self, v5location, v3old, v4new);
  if ((v6old_slot_value)!=ECL_UNBOUND) {
   goto L4;
  }
  if (!((v3old)!=ECL_UNBOUND)){
   goto L4;
  }
  T0 = cl_class_of(v1self);
  value0 = (cl_env_copy->function=(ECL_SYM("SLOT-UNBOUND",974)->symbol.gfdef))->cfun.entry(3, T0, v1self, v2slot_name) /*  SLOT-UNBOUND */;
  return value0;
L4:;
  value0 = v6old_slot_value;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
static cl_object L1173mp__compare_and_swap_slot_value_va(cl_narg narg, cl_object v7self, cl_object v8slot_name, cl_object v9old, cl_object v10new, ...)
{
 if (ecl_unlikely(narg!=4)) FEwrong_num_arguments(VV[31]);
 {
  return L1173mp__compare_and_swap_slot_value(v7self, v8slot_name, v9old, v10new);
 }
}
/* function definition for ATOMIC-INCF-STANDARD-INSTANCE                      */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L1228mp__atomic_incf_standard_instance(cl_object v1instance, cl_object v2location, cl_object v3increment)
{
 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);
 cl_fixnum v4increment;
 v4increment = ecl_to_fixnum(v3increment);
L1:;
 if (Null(si_instance_obsolete_p(v1instance))){
  goto L2;
 }
 (cl_env_copy->function=(VV[12]->symbol.gfdef))->cfun.entry(1, v1instance) /*  UPDATE-INSTANCE */;
L2:;
 if (!(ECL_FIXNUMP(v2location))){
  goto L4;
 }
 value0 = ecl_atomic_incf_instance((v1instance),(ecl_fixnum(v2location)),(ecl_make_fixnum(v4increment)));
 cl_env_copy->nvalues = 1;
 return value0;
L4:;
 if (!(ECL_CONSP(v2location))){
  goto L6;
 }
 value0 = mp_atomic_incf_car(v2location, ecl_make_fixnum(v4increment));
 return value0;
L6:;
 value0 = L1062invalid_slot_location(v1instance, v2location);
 return value0;
}
static cl_object L1228mp__atomic_incf_standard_instance_va(cl_narg narg, cl_object v5instance, cl_object v6location, cl_object v7increment, ...)
{
 if (ecl_unlikely(narg!=3)) FEwrong_num_arguments(VV[33]);
 {
  return L1228mp__atomic_incf_standard_instance(v5instance, v6location, v7increment);
 }
}
/* function definition for ATOMIC-INCF-SLOT-VALUE                             */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L1283mp__atomic_incf_slot_value(cl_object v1self, cl_object v2slot_name, cl_object v3increment)
{
 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);
 cl_fixnum v4increment;
 v4increment = ecl_to_fixnum(v3increment);
L1:;
 T0 = L1063std_slot_location(v1self, v2slot_name, ECL_SYM("ATOMIC-INCF",1541));
 value0 = L1228mp__atomic_incf_standard_instance(v1self, T0, ecl_make_fixnum(v4increment));
 return value0;
}
static cl_object L1283mp__atomic_incf_slot_value_va(cl_narg narg, cl_object v5self, cl_object v6slot_name, cl_object v7increment, ...)
{
 if (ecl_unlikely(narg!=3)) FEwrong_num_arguments(VV[35]);
 {
  return L1283mp__atomic_incf_slot_value(v5self, v6slot_name, v7increment);
 }
}
/* local function CLASS-SLOTS                                                 */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC943class_slots(cl_object v1object)
{
 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_instance_ref((v1object),((cl_fixnum)(6)));
 cl_env_copy->nvalues = 1;
 return value0;
}
static cl_object LC943class_slots_va(cl_narg narg, cl_object v2object, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(ECL_SYM("CLASS-SLOTS",1570));
 {
  return LC943class_slots(v2object);
 }
}
/* local function CLASS-LOCATION-TABLE                                        */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC921class_location_table(cl_object v1object)
{
 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_instance_ref((v1object),((cl_fixnum)(19)));
 cl_env_copy->nvalues = 1;
 return value0;
}
static cl_object LC921class_location_table_va(cl_narg narg, cl_object v2object, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[15]);
 {
  return LC921class_location_table(v2object);
 }
}
/* local function SLOT-DEFINITION-NAME                                        */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC919slot_definition_name(cl_object v1object)
{
 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_instance_ref((v1object),((cl_fixnum)(0)));
 cl_env_copy->nvalues = 1;
 return value0;
}
static cl_object LC919slot_definition_name_va(cl_narg narg, cl_object v2object, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(ECL_SYM("SLOT-DEFINITION-NAME",1624));
 {
  return LC919slot_definition_name(v2object);
 }
}
/* local function CLASS-SLOTS                                                 */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC997class_slots(cl_object v1object)
{
 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_instance_ref((v1object),((cl_fixnum)(6)));
 cl_env_copy->nvalues = 1;
 return value0;
}
static cl_object LC997class_slots_va(cl_narg narg, cl_object v2object, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(ECL_SYM("CLASS-SLOTS",1570));
 {
  return LC997class_slots(v2object);
 }
}
/* local function CLASS-LOCATION-TABLE                                        */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC975class_location_table(cl_object v1object)
{
 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_instance_ref((v1object),((cl_fixnum)(19)));
 cl_env_copy->nvalues = 1;
 return value0;
}
static cl_object LC975class_location_table_va(cl_narg narg, cl_object v2object, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[15]);
 {
  return LC975class_location_table(v2object);
 }
}
/* local function SLOT-DEFINITION-NAME                                        */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC973slot_definition_name(cl_object v1object)
{
 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_instance_ref((v1object),((cl_fixnum)(0)));
 cl_env_copy->nvalues = 1;
 return value0;
}
static cl_object LC973slot_definition_name_va(cl_narg narg, cl_object v2object, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(ECL_SYM("SLOT-DEFINITION-NAME",1624));
 {
  return LC973slot_definition_name(v2object);
 }
}
/* local function CLASS-SLOTS                                                 */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC1051class_slots(cl_object v1object)
{
 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_instance_ref((v1object),((cl_fixnum)(6)));
 cl_env_copy->nvalues = 1;
 return value0;
}
static cl_object LC1051class_slots_va(cl_narg narg, cl_object v2object, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(ECL_SYM("CLASS-SLOTS",1570));
 {
  return LC1051class_slots(v2object);
 }
}
/* local function CLASS-LOCATION-TABLE                                        */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC1029class_location_table(cl_object v1object)
{
 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_instance_ref((v1object),((cl_fixnum)(19)));
 cl_env_copy->nvalues = 1;
 return value0;
}
static cl_object LC1029class_location_table_va(cl_narg narg, cl_object v2object, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[15]);
 {
  return LC1029class_location_table(v2object);
 }
}
/* local function SLOT-DEFINITION-NAME                                        */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC1027slot_definition_name(cl_object v1object)
{
 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_instance_ref((v1object),((cl_fixnum)(0)));
 cl_env_copy->nvalues = 1;
 return value0;
}
static cl_object LC1027slot_definition_name_va(cl_narg narg, cl_object v2object, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(ECL_SYM("SLOT-DEFINITION-NAME",1624));
 {
  return LC1027slot_definition_name(v2object);
 }
}
#include "clos/std-slot-value.data"
#ifdef __cplusplus
extern "C"
#endif

ECL_DLLEXPORT void _eclCvOYnbSW4i0k9_vr00M881(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:CLOS;STD-SLOT-VALUE.LSP.NEWEST",-1);
 return;}
 #ifdef ECL_DYNAMIC_VV
 VV = Cblock->cblock.data;
 #endif
 Cblock->cblock.data_text = (const cl_object *)"@EcLtAg:_eclCvOYnbSW4i0k9_vr00M881@";
 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[37]);                       /*  WITH-SLOTS              */
  ecl_cmp_defun(VV[38]);                          /*  STD-CREATE-SLOTS-TABLE  */
  ecl_cmp_defun(VV[39]);                          /*  FIND-SLOT-DEFINITION    */
  ecl_cmp_defun(VV[40]);                          /*  UPDATE-INSTANCE         */
  (cl_env_copy->function=(ECL_SYM("MAPC",545)->symbol.gfdef))->cfun.entry(2, ECL_SYM("PROCLAIM",669), VVtemp[1]) /*  MAPC */;
  (void)0; /* No entry created for STANDARD-INSTANCE-ACCESS */
  (void)0; /* No entry created for STANDARD-INSTANCE-SET */
  si_do_defsetf(3, ECL_SYM("STANDARD-INSTANCE-ACCESS",1638), ECL_SYM("STANDARD-INSTANCE-SET",1639), ecl_make_int8_t(1));
  si_do_defsetf(3, ECL_SYM("FUNCALLABLE-STANDARD-INSTANCE-ACCESS",1593), ECL_SYM("STANDARD-INSTANCE-SET",1639), ecl_make_int8_t(1));
  (void)0; /* No entry created for SLOT-VALUE */
  (void)0; /* No entry created for SLOT-EXISTS-P */
  (void)0; /* No entry created for SLOT-BOUNDP */
  (void)0; /* No entry created for SLOT-VALUE-SET */
  T0 = (ECL_SYM("SLOT-VALUE-SET",1630)->symbol.gfdef);
  si_fset(2, VV[4], T0);
  (void)0; /* No entry created for INVALID-SLOT-LOCATION */
  ecl_cmp_defun(VV[41]);                          /*  STD-SLOT-LOCATION       */
  ecl_cmp_defun(VV[42]);                          /*  COMPARE-AND-SWAP-STANDARD-INSTANCE */
  ecl_cmp_defun(VV[43]);                          /*  COMPARE-AND-SWAP-SLOT-VALUE */
  ecl_cmp_defun(VV[44]);                          /*  ATOMIC-INCF-STANDARD-INSTANCE */
  ecl_cmp_defun(VV[45]);                          /*  ATOMIC-INCF-SLOT-VALUE  */
 }
}
