/* Compiler: ECL 26.3.27                                                      */
/* Source: /build/ecl/src/ecl-26.3.27/src/clos/slotvalue.lsp                  */
#include <ecl/ecl-cmp.h>
#include "clos/slotvalue.eclh"
/* local function CLASS-PROTOTYPE                                             */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC1945class_prototype(cl_object v1class)
{
 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 (cl_slot_boundp(v1class, VV[1])!=ECL_NIL) {
  goto L2;
 }
 {
  cl_object v2;
  v2 = (cl_env_copy->function=(ECL_SYM("ALLOCATE-INSTANCE",931)->symbol.gfdef))->cfun.entry(1, v1class) /*  ALLOCATE-INSTANCE */;
  (cl_env_copy->function=ECL_CONS_CAR(VV[11]))->cfun.entry(3, v2, v1class, VV[1]) /*  (SETF SLOT-VALUE) */;
 }
L2:;
 value0 = cl_slot_value(v1class, VV[1]);
 return value0;
}
static cl_object LC1945class_prototype_va(cl_narg narg, cl_object v2class, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(ECL_SYM("CLASS-PROTOTYPE",1569));
 {
  return LC1945class_prototype(v2class);
 }
}
/* function definition for SLOT-MAKUNBOUND                                    */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_slot_makunbound(cl_object v1self, cl_object v2slot_name)
{
 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 v4slotd;
  v3class = cl_class_of(v1self);
  v4slotd = clos_find_slot_definition(v3class, v2slot_name);
  if (Null(v4slotd)){
   goto L5;
  }
  (cl_env_copy->function=(ECL_SYM("SLOT-MAKUNBOUND-USING-CLASS",1628)->symbol.gfdef))->cfun.entry(3, v3class, v1self, v4slotd) /*  SLOT-MAKUNBOUND-USING-CLASS */;
  goto L4;
L5:;
  (cl_env_copy->function=(ECL_SYM("SLOT-MISSING",973)->symbol.gfdef))->cfun.entry(4, v3class, v1self, v2slot_name, ECL_SYM("SLOT-MAKUNBOUND",972)) /*  SLOT-MISSING */;
L4:;
  value0 = v1self;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
/* local function SLOT-VALUE-USING-CLASS                                      */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC1946slot_value_using_class(cl_object v1class, cl_object v2self, cl_object v3slotd)
{
 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 v4location;
  cl_object v5value;
  v4location = (cl_env_copy->function=(ECL_SYM("SLOT-DEFINITION-LOCATION",1623)->symbol.gfdef))->cfun.entry(1, v3slotd) /*  SLOT-DEFINITION-LOCATION */;
  v5value = clos_standard_instance_access(v2self, v4location);
  if (!((v5value)!=ECL_UNBOUND)){
   goto L4;
  }
  value0 = v5value;
  cl_env_copy->nvalues = 1;
  return value0;
L4:;
  T0 = (cl_env_copy->function=(ECL_SYM("SLOT-DEFINITION-NAME",1624)->symbol.gfdef))->cfun.entry(1, v3slotd) /*  SLOT-DEFINITION-NAME */;
  value0 = (cl_env_copy->function=(ECL_SYM("SLOT-UNBOUND",974)->symbol.gfdef))->cfun.entry(3, v1class, v2self, T0) /*  SLOT-UNBOUND */;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
static cl_object LC1946slot_value_using_class_va(cl_narg narg, cl_object v6class, cl_object v7self, cl_object v8slotd, ...)
{
 if (ecl_unlikely(narg!=3)) FEwrong_num_arguments(ECL_SYM("SLOT-VALUE-USING-CLASS",1629));
 {
  return LC1946slot_value_using_class(v6class, v7self, v8slotd);
 }
}
/* local function SLOT-BOUNDP-USING-CLASS                                     */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC1947slot_boundp_using_class(cl_object v1class, cl_object v2self, cl_object v3slotd)
{
 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:;
 T0 = (cl_env_copy->function=(ECL_SYM("SLOT-DEFINITION-LOCATION",1623)->symbol.gfdef))->cfun.entry(1, v3slotd) /*  SLOT-DEFINITION-LOCATION */;
 T1 = clos_standard_instance_access(v2self, T0);
 value0 = ecl_make_bool((T1)!=ECL_UNBOUND);
 cl_env_copy->nvalues = 1;
 return value0;
}
static cl_object LC1947slot_boundp_using_class_va(cl_narg narg, cl_object v4class, cl_object v5self, cl_object v6slotd, ...)
{
 if (ecl_unlikely(narg!=3)) FEwrong_num_arguments(ECL_SYM("SLOT-BOUNDP-USING-CLASS",1617));
 {
  return LC1947slot_boundp_using_class(v4class, v5self, v6slotd);
 }
}
/* local function SLOT-VALUE-USING-CLASS                                      */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC1948slot_value_using_class(cl_object v1val, cl_object v2class, cl_object v3self, cl_object v4slotd)
{
 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_env_copy->function=(ECL_SYM("SLOT-DEFINITION-LOCATION",1623)->symbol.gfdef))->cfun.entry(1, v4slotd) /*  SLOT-DEFINITION-LOCATION */;
 value0 = clos_standard_instance_set(v3self, T0, v1val);
 return value0;
}
static cl_object LC1948slot_value_using_class_va(cl_narg narg, cl_object v5val, cl_object v6class, cl_object v7self, cl_object v8slotd, ...)
{
 if (ecl_unlikely(narg!=4)) FEwrong_num_arguments(ECL_SYM("SLOT-VALUE-USING-CLASS",1629));
 {
  return LC1948slot_value_using_class(v5val, v6class, v7self, v8slotd);
 }
}
/* local function SLOT-MAKUNBOUND-USING-CLASS                                 */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC1949slot_makunbound_using_class(cl_object v1class, cl_object v2instance, cl_object v3slotd)
{
 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:;
 T0 = (cl_env_copy->function=(ECL_SYM("SLOT-DEFINITION-LOCATION",1623)->symbol.gfdef))->cfun.entry(1, v3slotd) /*  SLOT-DEFINITION-LOCATION */;
 T1 = ECL_UNBOUND;
 clos_standard_instance_set(v2instance, T0, T1);
 value0 = v2instance;
 cl_env_copy->nvalues = 1;
 return value0;
}
static cl_object LC1949slot_makunbound_using_class_va(cl_narg narg, cl_object v4class, cl_object v5instance, cl_object v6slotd, ...)
{
 if (ecl_unlikely(narg!=3)) FEwrong_num_arguments(ECL_SYM("SLOT-MAKUNBOUND-USING-CLASS",1628));
 {
  return LC1949slot_makunbound_using_class(v4class, v5instance, v6slotd);
 }
}
/* local function SLOT-MISSING                                                */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC1950slot_missing(cl_narg narg, cl_object v1class, cl_object v2object, cl_object v3slot_name, cl_object v4operation, ...)
{
 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<4)) FEwrong_num_arguments(ECL_SYM("SLOT-MISSING",973));
 if (ecl_unlikely(narg>5)) FEwrong_num_arguments(ECL_SYM("SLOT-MISSING",973));
 {
  cl_object v5new_value;
  va_list args; va_start(args,v4operation);
  {
   int i = 4;
   if (i >= narg) {
    v5new_value = ECL_NIL;
   } else {
    i++;
    v5new_value = va_arg(args,cl_object);
   }
  }
  va_end(args);
  value0 = cl_error(3, VV[4], v3slot_name, v2object);
  return value0;
 }
}
/* local function SLOT-UNBOUND                                                */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC1951slot_unbound(cl_object v1class, cl_object v2object, cl_object v3slot_name)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 value0 = cl_error(5, ECL_SYM("UNBOUND-SLOT",879), ECL_SYM("INSTANCE",1291), v2object, ECL_SYM("NAME",1309), v3slot_name);
 return value0;
}
static cl_object LC1951slot_unbound_va(cl_narg narg, cl_object v4class, cl_object v5object, cl_object v6slot_name, ...)
{
 if (ecl_unlikely(narg!=3)) FEwrong_num_arguments(ECL_SYM("SLOT-UNBOUND",974));
 {
  return LC1951slot_unbound(v4class, v5object, v6slot_name);
 }
}
/* local function SLOT-UNBOUND                                                */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC1952slot_unbound(cl_object v1class, cl_object v2object, cl_object v3slot_index)
{
 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 v5slotd;
  v4class = cl_class_of(v2object);
  {
   cl_object v6;
   cl_object v7;
   v6 = cl_slot_value(v4class, VV[5]);
   v7 = (ECL_SYM("SLOT-DEFINITION-LOCATION",1623)->symbol.gfdef);
   {
    cl_object v8;
    v8 = si_make_seq_iterator(2, v6, ecl_make_int8_t(0));
L7:;
    if (v8!=ECL_NIL) {
     goto L9;
    }
    v5slotd = ECL_NIL;
    goto L3;
L9:;
    {
     cl_object v9;
     v9 = si_seq_iterator_ref(v6, v8);
     T0 = (cl_env_copy->function=(ECL_SYM("SLOT-DEFINITION-LOCATION",1623)->symbol.gfdef))->cfun.entry(1, v9) /*  SLOT-DEFINITION-LOCATION */;
     if (!(ecl_eql(v3slot_index,T0))){
      goto L11;
     }
     v5slotd = v9;
     goto L3;
    }
L11:;
    v8 = si_seq_iterator_next(v6, v8);
    goto L7;
   }
  }
L3:;
  T0 = (cl_env_copy->function=(ECL_SYM("SLOT-DEFINITION-NAME",1624)->symbol.gfdef))->cfun.entry(1, v5slotd) /*  SLOT-DEFINITION-NAME */;
  value0 = (cl_env_copy->function=(ECL_SYM("SLOT-UNBOUND",974)->symbol.gfdef))->cfun.entry(3, v4class, v2object, T0) /*  SLOT-UNBOUND */;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
static cl_object LC1952slot_unbound_va(cl_narg narg, cl_object v6class, cl_object v7object, cl_object v8slot_index, ...)
{
 if (ecl_unlikely(narg!=3)) FEwrong_num_arguments(ECL_SYM("SLOT-UNBOUND",974));
 {
  return LC1952slot_unbound(v6class, v7object, v8slot_index);
 }
}
/* local function CLASS-NAME                                                  */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC1953class_name(cl_object v1class)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 value0 = (cl_env_copy->function=(VV[10]->symbol.gfdef))->cfun.entry(1, v1class) /*  CLASS-ID */;
 return value0;
}
static cl_object LC1953class_name_va(cl_narg narg, cl_object v2class, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(ECL_SYM("CLASS-NAME",938));
 {
  return LC1953class_name(v2class);
 }
}
/* local function CLASS-NAME                                                  */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC1954class_name(cl_object v1new_value, cl_object v2class)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 (cl_env_copy->function=(ECL_SYM("REINITIALIZE-INSTANCE",967)->symbol.gfdef))->cfun.entry(3, v2class, ECL_SYM("NAME",1309), v1new_value) /*  REINITIALIZE-INSTANCE */;
 value0 = v1new_value;
 cl_env_copy->nvalues = 1;
 return value0;
}
static cl_object LC1954class_name_va(cl_narg narg, cl_object v3new_value, cl_object v4class, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(ECL_SYM("CLASS-NAME",938));
 {
  return LC1954class_name(v3new_value, v4class);
 }
}
#include "clos/slotvalue.data"
#ifdef __cplusplus
extern "C"
#endif

ECL_DLLEXPORT void _ecl96jATW7JtXNj9_Eq30M881(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;SLOTVALUE.LSP.NEWEST",-1);
 return;}
 #ifdef ECL_DYNAMIC_VV
 VV = Cblock->cblock.data;
 #endif
 Cblock->cblock.data_text = (const cl_object *)"@EcLtAg:_ecl96jATW7JtXNj9_Eq30M881@";
 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]);
  {
   cl_object volatile v1;
   v1 = ecl_make_cfun_va((cl_objectfn)LC1945class_prototype_va,ECL_NIL,Cblock,1);
   T0 = v1;
  }
  clos_install_method(5, ECL_SYM("CLASS-PROTOTYPE",1569), ECL_NIL, VVtemp[1], VVtemp[1], T0);
  (void)0; /* No entry created for SLOT-MAKUNBOUND */
  {
   cl_object volatile v1;
   v1 = ecl_make_cfun_va((cl_objectfn)LC1946slot_value_using_class_va,ECL_NIL,Cblock,3);
   T0 = v1;
  }
  clos_install_method(5, ECL_SYM("SLOT-VALUE-USING-CLASS",1629), ECL_NIL, VVtemp[2], VVtemp[3], T0);
  {
   cl_object volatile v1;
   v1 = ecl_make_cfun_va((cl_objectfn)LC1947slot_boundp_using_class_va,ECL_NIL,Cblock,3);
   T0 = v1;
  }
  clos_install_method(5, ECL_SYM("SLOT-BOUNDP-USING-CLASS",1617), ECL_NIL, VVtemp[2], VVtemp[3], T0);
  {
   cl_object volatile v1;
   v1 = ecl_make_cfun_va((cl_objectfn)LC1948slot_value_using_class_va,ECL_NIL,Cblock,4);
   T0 = v1;
  }
  clos_install_method(5, VVtemp[4], ECL_NIL, VVtemp[5], VVtemp[6], T0);
  {
   cl_object volatile v1;
   v1 = ecl_make_cfun_va((cl_objectfn)LC1949slot_makunbound_using_class_va,ECL_NIL,Cblock,3);
   T0 = v1;
  }
  clos_install_method(5, ECL_SYM("SLOT-MAKUNBOUND-USING-CLASS",1628), ECL_NIL, VVtemp[2], VVtemp[7], T0);
  {
   cl_object volatile v1;
   v1 = ecl_make_cfun_va((cl_objectfn)LC1950slot_missing,ECL_NIL,Cblock,4);
   T0 = v1;
  }
  clos_install_method(5, ECL_SYM("SLOT-MISSING",973), ECL_NIL, VVtemp[8], VVtemp[9], T0);
  {
   cl_object volatile v1;
   v1 = ecl_make_cfun_va((cl_objectfn)LC1951slot_unbound_va,ECL_NIL,Cblock,3);
   T0 = v1;
  }
  clos_install_method(5, ECL_SYM("SLOT-UNBOUND",974), ECL_NIL, VVtemp[10], VVtemp[11], T0);
  {
   cl_object volatile v1;
   v1 = ecl_make_cfun_va((cl_objectfn)LC1952slot_unbound_va,ECL_NIL,Cblock,3);
   T0 = v1;
  }
  clos_install_method(5, ECL_SYM("SLOT-UNBOUND",974), ECL_NIL, VVtemp[12], VVtemp[13], T0);
  {
   cl_object volatile v1;
   v1 = ecl_make_cfun_va((cl_objectfn)LC1953class_name_va,ECL_NIL,Cblock,1);
   T0 = v1;
  }
  clos_install_method(5, ECL_SYM("CLASS-NAME",938), ECL_NIL, VVtemp[1], VVtemp[1], T0);
  {
   cl_object volatile v1;
   v1 = ecl_make_cfun_va((cl_objectfn)LC1954class_name_va,ECL_NIL,Cblock,2);
   T0 = v1;
  }
  clos_install_method(5, VVtemp[14], ECL_NIL, VVtemp[15], VVtemp[16], T0);
 }
}
