/* Compiler: ECL 26.3.27                                                      */
/* Source: /build/ecl/src/ecl-26.3.27/src/clos/combin.lsp                     */
#include <ecl/ecl-cmp.h>
#include "clos/combin.eclh"
/* function definition for EFFECTIVE-METHOD-FUNCTION                          */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L1855effective_method_function(cl_narg narg, cl_object v1form, ...)
{
 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);
 if (ecl_unlikely(narg<1)) FEwrong_num_arguments(VV[0]);
 if (ecl_unlikely(narg>2)) FEwrong_num_arguments(VV[0]);
 {
  cl_object v2top_level;
  va_list args; va_start(args,v1form);
  {
   int i = 1;
   if (i >= narg) {
    v2top_level = ECL_NIL;
   } else {
    i++;
    v2top_level = va_arg(args,cl_object);
   }
  }
  va_end(args);
  {
   cl_object v3first;
   v3first = ECL_NIL;
   if (Null(cl_functionp(v1form))){
    goto L3;
   }
   value0 = v1form;
   cl_env_copy->nvalues = 1;
   return value0;
L3:;
   if (Null((cl_env_copy->function=(VV[1]->symbol.gfdef))->cfun.entry(1, v1form) /*  METHOD-P */)){
    goto L5;
   }
   value0 = (cl_env_copy->function=(ECL_SYM("METHOD-FUNCTION",1607)->symbol.gfdef))->cfun.entry(1, v1form) /*  METHOD-FUNCTION */;
   return value0;
L5:;
   if (!(ECL_ATOM(v1form))){
    goto L7;
   }
   value0 = cl_error(2, VV[2], v1form);
   return value0;
L7:;
   v3first = ecl_car(v1form);
   if (!((v3first)==(ECL_SYM("MAKE-METHOD",957)))){
    goto L9;
   }
   T0 = ecl_cadr(v1form);
   T1 = cl_list(4, ECL_SYM("LAMBDA",454), VV[3], VV[4], T0);
   value0 = si_coerce_to_function(T1);
   return value0;
L9:;
   if (!((v3first)==(ECL_SYM("CALL-METHOD",934)))){
    goto L12;
   }
   T0 = ecl_cadr(v1form);
   T1 = L1855effective_method_function(1, T0);
   {
    cl_object v4;
    v4 = (VV[0]->symbol.gfdef);
    {
     cl_object v5;
     cl_object v6;
     cl_object v7;
     {
      cl_object v8;
      v8 = ecl_caddr(v1form);
      if (ecl_unlikely(!ECL_LISTP(v8))) FEtype_error_list(v8);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
      v5 = v8;
     }
     v6 = ECL_NIL;
     v7 = v5;
     {
      cl_object v8;
      cl_object v9;
      v8 = ecl_list1(ECL_NIL);
      v9 = v8;
L23:;
      if (!(ecl_endp(v7))){
       goto L25;
      }
      goto L24;
L25:;
      v6 = ECL_CONS_CAR(v7);
      {
       cl_object v10;
       v10 = ECL_CONS_CDR(v7);
       if (ecl_unlikely(!ECL_LISTP(v10))) FEtype_error_list(v10);
       value0 = ECL_NIL;
       cl_env_copy->nvalues = 0;
       v7 = v10;
      }
      {
       cl_object v10;
       v10 = v9;
       if (ecl_unlikely(ECL_ATOM(v10))) FEtype_error_cons(v10);
       value0 = ECL_NIL;
       cl_env_copy->nvalues = 0;
       T3 = v10;
      }
      T4 = ecl_function_dispatch(cl_env_copy,v4)(1, v6);
      v9 = ecl_list1(T4);
      (ECL_CONS_CDR(T3)=v9,T3);
      goto L23;
L24:;
      T2 = ecl_cdr(v8);
      goto L14;
     }
    }
   }
L14:;
   value0 = L1857combine_method_functions(T1, T2);
   return value0;
L12:;
   if (Null(v2top_level)){
    goto L41;
   }
   T0 = cl_list(4, ECL_SYM("LAMBDA",454), VV[11], VV[12], v1form);
   value0 = si_coerce_to_function(T0);
   return value0;
L41:;
   value0 = cl_error(2, VV[2], v1form);
   return value0;
  }
 }
}
/* function definition for COMBINE-METHOD-FUNCTIONS                           */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L1857combine_method_functions(cl_object v1method, cl_object v2rest_methods)
{
 cl_object env0 = ECL_NIL;
 cl_object CLV0, CLV1;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
 env0 = ECL_NIL;
 CLV0 = env0 = CONS(v1method,env0);               /*  METHOD                  */
 CLV1 = env0 = CONS(v2rest_methods,env0);         /*  REST-METHODS            */
 {
  cl_object v3;
  v3 = ecl_make_cclosure_va((cl_objectfn)LC1856__lambda10,env0,Cblock,2);
  value0 = v3;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
/* local function CALL-METHOD                                                 */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC1858call_method(cl_object v1, cl_object v2)
{
 cl_object T0, T1, T2, T3;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  cl_object v3;
  cl_object v4method;
  cl_object v5rest_methods;
  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);
   v4method = v6;
  }
  if (Null(v3)){
   goto L10;
  }
  {
   cl_object v6;
   v6 = ecl_car(v3);
   v3 = ecl_cdr(v3);
   v5rest_methods = v6;
   goto L9;
  }
L10:;
  v5rest_methods = ECL_NIL;
L9:;
  if (Null(v3)){
   goto L15;
  }
  si_dm_too_many_arguments(v1);
L15:;
  T0 = L1855effective_method_function(1, v4method);
  if (Null(v5rest_methods)){
   goto L19;
  }
  {
   cl_object v6;
   v6 = (VV[0]->symbol.gfdef);
   {
    cl_object v7;
    cl_object v8;
    cl_object v9;
    {
     cl_object v10;
     v10 = v5rest_methods;
     if (ecl_unlikely(!ECL_LISTP(v10))) FEtype_error_list(v10);
     value0 = ECL_NIL;
     cl_env_copy->nvalues = 0;
     v7 = v10;
    }
    v8 = ECL_NIL;
    v9 = v7;
    {
     cl_object v10;
     cl_object v11;
     v10 = ecl_list1(ECL_NIL);
     v11 = v10;
L29:;
     if (!(ecl_endp(v9))){
      goto L31;
     }
     goto L30;
L31:;
     v8 = ECL_CONS_CAR(v9);
     {
      cl_object v12;
      v12 = ECL_CONS_CDR(v9);
      if (ecl_unlikely(!ECL_LISTP(v12))) FEtype_error_list(v12);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
      v9 = v12;
     }
     {
      cl_object v12;
      v12 = v11;
      if (ecl_unlikely(ECL_ATOM(v12))) FEtype_error_cons(v12);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
      T2 = v12;
     }
     T3 = ecl_function_dispatch(cl_env_copy,v6)(1, v8);
     v11 = ecl_list1(T3);
     (ECL_CONS_CDR(T2)=v11,T2);
     goto L29;
L30:;
     T1 = ecl_cdr(v10);
     goto L17;
    }
   }
  }
L19:;
  T1 = ECL_NIL;
  goto L17;
L17:;
  T2 = cl_list(2, ECL_SYM("QUOTE",682), T1);
  value0 = cl_list(4, ECL_SYM("FUNCALL",396), T0, ECL_SYM(".COMBINED-METHOD-ARGS.",1547), T2);
  return value0;
 }
}
static cl_object LC1858call_method_va(cl_narg narg, cl_object v6, cl_object v7, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[17]);
 {
  return LC1858call_method(v6, v7);
 }
}
/* function definition for CALL-NEXT-METHOD                                   */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L1859call_next_method(cl_narg narg, ...)
{
 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);
 {
  cl_object v1args;
  ecl_va_list args; ecl_va_start(args,narg,narg,0);
  v1args = cl_grab_rest_args(args);
  ecl_va_end(args);
  if (ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("*NEXT-METHODS*",1549))!=ECL_NIL) {
   goto L1;
  }
  cl_error(1, VV[18]);
L1:;
  T0 = ecl_car(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("*NEXT-METHODS*",1549)));
  value0 = v1args;
  if (value0!=ECL_NIL) {
   goto L5;
  }
  T1 = ecl_cmp_symbol_value(cl_env_copy,ECL_SYM(".COMBINED-METHOD-ARGS.",1547));
  goto L3;
L5:;
  T1 = value0;
  goto L3;
L3:;
  T2 = ecl_cdr(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("*NEXT-METHODS*",1549)));
  value0 = ecl_function_dispatch(cl_env_copy,T0)(2, T1, T2);
  return value0;
 }
}
/* function definition for NEXT-METHOD-P                                      */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L1860next_method_p()
{
 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_cmp_symbol_value(cl_env_copy,ECL_SYM("*NEXT-METHODS*",1549));
 cl_env_copy->nvalues = 1;
 return value0;
}
static cl_object L1860next_method_p_va(cl_narg narg, ...)
{
 if (ecl_unlikely(narg!=0)) FEwrong_num_arguments(VV[20]);
 {
  return L1860next_method_p();
 }
}
/* local function LAMBDA33                                                    */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC1861__lambda33(cl_object v1, cl_object v2)
{
 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 v3;
  T0 = ecl_car(v1);
  if (!((T0)==(ECL_SYM("FUNCALL",396)))){
   goto L3;
  }
  T0 = ecl_caadr(v1);
  if (!((T0)==(ECL_SYM("FUNCTION",398)))){
   goto L3;
  }
  v3 = ecl_cddr(v1);
  goto L2;
L3:;
  v3 = ecl_cdr(v1);
L2:;
  if (Null(v3)){
   goto L7;
  }
  T0 = CONS(ECL_SYM("LIST",483),v3);
  goto L6;
L7:;
  T0 = ECL_SYM(".COMBINED-METHOD-ARGS.",1547);
L6:;
  T1 = cl_list(4, ECL_SYM("FUNCALL",396), VV[22], T0, VV[23]);
  value0 = cl_list(4, ECL_SYM("IF",950), ECL_SYM("*NEXT-METHODS*",1549), T1, VV[24]);
  return value0;
 }
}
static cl_object LC1861__lambda33_va(cl_narg narg, cl_object v4, cl_object v5, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[21]);
 {
  return LC1861__lambda33(v4, v5);
 }
}
/* local function LAMBDA38                                                    */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC1862__lambda38(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;
  T0 = ecl_car(v1);
  if (!((T0)==(ECL_SYM("FUNCALL",396)))){
   goto L3;
  }
  T0 = ecl_caadr(v1);
  if (!((T0)==(ECL_SYM("FUNCTION",398)))){
   goto L3;
  }
  v3 = ecl_cddr(v1);
  goto L2;
L3:;
  v3 = ecl_cdr(v1);
L2:;
  if (Null(v3)){
   goto L6;
  }
  si_dm_too_many_arguments(v1);
L6:;
  value0 = ECL_SYM("*NEXT-METHODS*",1549);
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
static cl_object LC1862__lambda38_va(cl_narg narg, cl_object v4, cl_object v5, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[25]);
 {
  return LC1862__lambda38(v4, v5);
 }
}
/* function definition for ERROR-QUALIFIER                                    */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L1863error_qualifier(cl_object v1m, cl_object v2qualifier)
{
 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(3, VV[27], v1m, v2qualifier);
 return value0;
}
/* function definition for STANDARD-MAIN-EFFECTIVE-METHOD                     */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L1865standard_main_effective_method(cl_object v1before, cl_object v2primary, cl_object v3after)
{
 cl_object env0 = ECL_NIL;
 cl_object CLV0, CLV1, CLV2;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
 env0 = ECL_NIL;
 CLV0 = env0 = CONS(v1before,env0);               /*  BEFORE                  */
 CLV1 = env0 = CONS(v2primary,env0);              /*  PRIMARY                 */
 CLV2 = env0 = CONS(v3after,env0);                /*  AFTER                   */
 {
  cl_object v4;
  v4 = ecl_make_cclosure_va((cl_objectfn)LC1864__lambda42,env0,Cblock,2);
  value0 = v4;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
/* function definition for STANDARD-COMPUTE-EFFECTIVE-METHOD                  */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L1881standard_compute_effective_method(cl_object v1gf, cl_object v2methods)
{
 cl_object T0, T1, T2;
 cl_object env0 = ECL_NIL;
 cl_object CLV0;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
 env0 = ECL_NIL;
 CLV0 = env0 = CONS(v1gf,env0);                   /*  GF                      */
 {
  cl_object v3before;
  cl_object v4primary;
  cl_object v5after;
  cl_object v6around;
  v3before = ECL_NIL;
  v4primary = ECL_NIL;
  v5after = ECL_NIL;
  v6around = ECL_NIL;
  {
   cl_object v7;
   v7 = v2methods;
   goto L9;
L8:;
   {
    cl_object v8m;
    v8m = ecl_car(v7);
    {
     cl_object v9qualifiers;
     cl_object v10f;
     v9qualifiers = ecl_instance_ref((v8m),((cl_fixnum)(3)));
     v10f = ecl_instance_ref((v8m),((cl_fixnum)(4)));
     if (!(v9qualifiers==ECL_NIL)){
      goto L16;
     }
     v4primary = CONS(v10f,v4primary);
     goto L13;
L16:;
     if (Null(ecl_cdr(v9qualifiers))){
      goto L19;
     }
     L1863error_qualifier(v8m, v9qualifiers);
     goto L13;
L19:;
     v9qualifiers = ecl_car(v9qualifiers);
     if (!((v9qualifiers)==(VV[34]))){
      goto L21;
     }
     v3before = CONS(v10f,v3before);
     goto L13;
L21:;
     if (!((v9qualifiers)==(VV[35]))){
      goto L25;
     }
     v5after = CONS(v10f,v5after);
     goto L13;
L25:;
     if (!((v9qualifiers)==(VV[36]))){
      goto L28;
     }
     v6around = CONS(v10f,v6around);
     goto L13;
L28:;
     L1863error_qualifier(v8m, v9qualifiers);
    }
L13:;
   }
   v7 = ecl_cdr(v7);
L9:;
   if (Null(v7)){
    goto L33;
   }
   goto L8;
L33:;
  }
  if (!(v4primary==ECL_NIL)){
   goto L35;
  }
  {
   cl_object v7;
   v7 = ecl_make_cclosure_va((cl_objectfn)LC1880__lambda74,env0,Cblock,0);
   value0 = v7;
   cl_env_copy->nvalues = 1;
   return value0;
  }
L35:;
  v4primary = cl_nreverse(v4primary);
  v3before = cl_nreverse(v3before);
  if (Null(v6around)){
   goto L41;
  }
  {
   cl_object v7main;
   if (v3before!=ECL_NIL) {
    goto L46;
   }
   if (Null(v5after)){
    goto L44;
   }
   goto L45;
L46:;
L45:;
   T0 = L1865standard_main_effective_method(v3before, v4primary, v5after);
   v7main = ecl_list1(T0);
   goto L43;
L44:;
   v7main = v4primary;
L43:;
   v6around = cl_nreverse(v6around);
   T0 = ecl_car(v6around);
   T1 = ecl_cdr(v6around);
   T2 = ecl_nconc(T1,v7main);
   value0 = L1857combine_method_functions(T0, T2);
   return value0;
  }
L41:;
  if (v3before!=ECL_NIL) {
   goto L52;
  }
  if (Null(v5after)){
   goto L50;
  }
  goto L51;
L52:;
L51:;
  value0 = L1865standard_main_effective_method(v3before, v4primary, v5after);
  return value0;
L50:;
  T0 = ecl_car(v4primary);
  T1 = ecl_cdr(v4primary);
  value0 = L1857combine_method_functions(T0, T1);
  return value0;
 }
}
static cl_object L1881standard_compute_effective_method_va(cl_narg narg, cl_object v8gf, cl_object v9methods, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[30]);
 {
  return L1881standard_compute_effective_method(v8gf, v9methods);
 }
}
/* function definition for STD-COMPUTE-EFFECTIVE-METHOD                       */
/* optimize speed 3, debug 1, space 1, safety 0                               */
cl_object clos_std_compute_effective_method(cl_object v1gf, cl_object v2method_combination, cl_object v3applicable_methods)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
L1:;
 {
  cl_object v4compiler;
  cl_object v5options;
  v4compiler = (v2method_combination)->instance.slots[(cl_fixnum)(1)];
  v5options = (v2method_combination)->instance.slots[(cl_fixnum)(2)];
  if (Null(v5options)){
   goto L4;
  }
  value0 = cl_apply(4, v4compiler, v1gf, v3applicable_methods, v5options);
  return value0;
L4:;
  value0 = ecl_function_dispatch(cl_env_copy,v4compiler)(2, v1gf, v3applicable_methods);
  return value0;
 }
}
/* function definition for COMPUTE-EFFECTIVE-METHOD-FUNCTION                  */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object clos_compute_effective_method_function(cl_object v1gf, cl_object v2method_combination, cl_object v3applicable_methods)
{
 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 v4form;
  v4form = (cl_env_copy->function=(VV[46]->symbol.gfdef))->cfun.entry(3, v1gf, v2method_combination, v3applicable_methods) /*  COMPUTE-EFFECTIVE-METHOD */;
  {
   cl_object v5aux;
   cl_object v6f;
   v5aux = v4form;
   v6f = ECL_NIL;
   if (!(ECL_LISTP(v5aux))){
    goto L5;
   }
   {
    cl_object v7;
    v7 = v5aux;
    {
     cl_object v8;
     v8 = v7;
     {
      bool v9;
      v9 = ECL_LISTP(v8);
      if (ecl_unlikely(!(v9)))
         FEwrong_type_argument(VV[45],v8);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
     }
    }
    if (Null(v7)){
     goto L14;
    }
    {
     cl_object v8;
     v8 = ECL_CONS_CDR(v7);
     v5aux = v8;
     v7 = ECL_CONS_CAR(v7);
    }
L14:;
    T0 = v7;
   }
   if (!((T0)==(ECL_SYM("FUNCALL",396)))){
    goto L5;
   }
   {
    cl_object v7;
    v7 = v5aux;
    {
     cl_object v8;
     v8 = v7;
     {
      bool v9;
      v9 = ECL_LISTP(v8);
      if (ecl_unlikely(!(v9)))
         FEwrong_type_argument(VV[45],v8);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
     }
    }
    if (Null(v7)){
     goto L26;
    }
    {
     cl_object v8;
     v8 = ECL_CONS_CDR(v7);
     v5aux = v8;
     v7 = ECL_CONS_CAR(v7);
    }
L26:;
    v6f = v7;
   }
   if (Null(cl_functionp(v6f))){
    goto L5;
   }
   {
    cl_object v7;
    v7 = v5aux;
    {
     cl_object v8;
     v8 = v7;
     {
      bool v9;
      v9 = ECL_LISTP(v8);
      if (ecl_unlikely(!(v9)))
         FEwrong_type_argument(VV[45],v8);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
     }
    }
    if (Null(v7)){
     goto L38;
    }
    {
     cl_object v8;
     v8 = ECL_CONS_CDR(v7);
     v5aux = v8;
     v7 = ECL_CONS_CAR(v7);
    }
L38:;
    T0 = v7;
   }
   if (!((T0)==(ECL_SYM(".COMBINED-METHOD-ARGS.",1547)))){
    goto L5;
   }
   {
    cl_object v7;
    v7 = v5aux;
    {
     cl_object v8;
     v8 = v7;
     {
      bool v9;
      v9 = ECL_LISTP(v8);
      if (ecl_unlikely(!(v9)))
         FEwrong_type_argument(VV[45],v8);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
     }
    }
    if (Null(v7)){
     goto L49;
    }
    {
     cl_object v8;
     v8 = ECL_CONS_CDR(v7);
     v5aux = v8;
     v7 = ECL_CONS_CAR(v7);
    }
L49:;
    T0 = v7;
   }
   if (!((T0)==(ECL_SYM("*NEXT-METHODS*",1549)))){
    goto L5;
   }
   value0 = v6f;
   cl_env_copy->nvalues = 1;
   return value0;
L5:;
   value0 = L1855effective_method_function(2, v4form, ECL_T);
   return value0;
  }
 }
}
/* function definition for COMPUTE-EFFECTIVE-METHOD                           */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L1888compute_effective_method(cl_object v1gf, cl_object v2method_combination, cl_object v3applicable_methods)
{
 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 = clos_std_compute_effective_method(v1gf, v2method_combination, v3applicable_methods);
 value0 = cl_listX(3, ECL_SYM("FUNCALL",396), T0, VV[3]);
 return value0;
}
static cl_object L1888compute_effective_method_va(cl_narg narg, cl_object v4gf, cl_object v5method_combination, cl_object v6applicable_methods, ...)
{
 if (ecl_unlikely(narg!=3)) FEwrong_num_arguments(VV[46]);
 {
  return L1888compute_effective_method(v4gf, v5method_combination, v6applicable_methods);
 }
}
/* closure LAMBDA10                                                           */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC1856__lambda10(cl_narg narg, cl_object v1_combined_method_args_, cl_object v2no_next_methods, ...)
{
 cl_object CLV0, CLV1;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object env0 = cl_env_copy->function->cclosure.env;
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
 /* Scanning closure data ... */
 CLV1 = env0;                                     /*  REST-METHODS            */
 CLV0 = _ecl_cdr(CLV1);
 { /* ... closure scanning finished */
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[14]);
 {
  ecl_bds_bind(cl_env_copy,ECL_SYM(".COMBINED-METHOD-ARGS.",1547),v1_combined_method_args_); /*  .COMBINED-METHOD-ARGS. */
L1:;
  value0 = ecl_function_dispatch(cl_env_copy,ECL_CONS_CAR(CLV0))(2, ecl_cmp_symbol_value(cl_env_copy,ECL_SYM(".COMBINED-METHOD-ARGS.",1547)), ECL_CONS_CAR(CLV1));
  ecl_bds_unwind1(cl_env_copy);
  return value0;
 }
 }
}
/* closure LAMBDA42                                                           */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC1864__lambda42(cl_narg narg, cl_object v1_combined_method_args_, cl_object v2no_next_method, ...)
{
 cl_object T0, T1, T2;
 cl_object CLV0, CLV1, CLV2;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object env0 = cl_env_copy->function->cclosure.env;
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
 /* Scanning closure data ... */
 CLV2 = env0;                                     /*  AFTER                   */
 CLV1 = _ecl_cdr(CLV2);
 CLV0 = _ecl_cdr(CLV1);
 { /* ... closure scanning finished */
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[29]);
 {
  ecl_bds_bind(cl_env_copy,ECL_SYM(".COMBINED-METHOD-ARGS.",1547),v1_combined_method_args_); /*  .COMBINED-METHOD-ARGS. */
L1:;
  {
   cl_object v3;
   v3 = ECL_CONS_CAR(CLV0);
   goto L6;
L5:;
   {
    cl_object v4i;
    v4i = ecl_car(v3);
    ecl_function_dispatch(cl_env_copy,v4i)(2, ecl_cmp_symbol_value(cl_env_copy,ECL_SYM(".COMBINED-METHOD-ARGS.",1547)), ECL_NIL);
   }
   v3 = ecl_cdr(v3);
L6:;
   if (Null(v3)){
    goto L13;
   }
   goto L5;
L13:;
  }
  if (Null(ECL_CONS_CAR(CLV2))){
   goto L15;
  }
  {
   struct ecl_stack_frame _ecl_inner_frame_aux;
   cl_object _ecl_inner_frame=ecl_stack_frame_open(cl_env_copy,(cl_object)&_ecl_inner_frame_aux,0);
   T0 = ecl_car(ECL_CONS_CAR(CLV1));
   T1 = ecl_cmp_symbol_value(cl_env_copy,ECL_SYM(".COMBINED-METHOD-ARGS.",1547));
   T2 = ecl_cdr(ECL_CONS_CAR(CLV1));
   cl_env_copy->values[0] = ecl_function_dispatch(cl_env_copy,T0)(2, T1, T2);
   ecl_stack_frame_push_values(_ecl_inner_frame);
   {
    cl_object v3;
    v3 = ECL_CONS_CAR(CLV2);
    goto L23;
L22:;
    {
     cl_object v4i;
     v4i = ecl_car(v3);
     ecl_function_dispatch(cl_env_copy,v4i)(2, ecl_cmp_symbol_value(cl_env_copy,ECL_SYM(".COMBINED-METHOD-ARGS.",1547)), ECL_NIL);
    }
    v3 = ecl_cdr(v3);
L23:;
    if (Null(v3)){
     goto L30;
    }
    goto L22;
L30:;
   }
   ecl_stack_frame_pop_values(_ecl_inner_frame);
   ecl_stack_frame_close(_ecl_inner_frame);
   ecl_bds_unwind1(cl_env_copy);
   return cl_env_copy->values[0];
  }
L15:;
  T0 = ecl_car(ECL_CONS_CAR(CLV1));
  T1 = ecl_cmp_symbol_value(cl_env_copy,ECL_SYM(".COMBINED-METHOD-ARGS.",1547));
  T2 = ecl_cdr(ECL_CONS_CAR(CLV1));
  value0 = ecl_function_dispatch(cl_env_copy,T0)(2, T1, T2);
  ecl_bds_unwind1(cl_env_copy);
  return value0;
 }
 }
}
/* local function METHOD-QUALIFIERS                                           */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC1873method_qualifiers(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)(3)));
 cl_env_copy->nvalues = 1;
 return value0;
}
static cl_object LC1873method_qualifiers_va(cl_narg narg, cl_object v2object, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(ECL_SYM("METHOD-QUALIFIERS",961));
 {
  return LC1873method_qualifiers(v2object);
 }
}
/* local function METHOD-FUNCTION                                             */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC1871method_function(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)(4)));
 cl_env_copy->nvalues = 1;
 return value0;
}
static cl_object LC1871method_function_va(cl_narg narg, cl_object v2object, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(ECL_SYM("METHOD-FUNCTION",1607));
 {
  return LC1871method_function(v2object);
 }
}
/* closure LAMBDA74                                                           */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC1880__lambda74(cl_narg narg, ...)
{
 cl_object CLV0;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object env0 = cl_env_copy->function->cclosure.env;
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
 /* Scanning closure data ... */
 CLV0 = env0;                                     /*  GF                      */
 { /* ... closure scanning finished */
 {
  cl_object v1args;
  ecl_va_list args; ecl_va_start(args,narg,narg,0);
  v1args = cl_grab_rest_args(args);
  ecl_va_end(args);
  value0 = cl_apply(3, VV[38], ECL_CONS_CAR(CLV0), v1args);
  return value0;
 }
 }
}
/* local function METHOD-COMBINATION-COMPILER                                 */
/* optimize speed 3, debug 1, space 1, safety 0                               */
static cl_object LC1885method_combination_compiler(cl_object v1object)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
L1:;
 value0 = ecl_instance_ref((v1object),((cl_fixnum)(1)));
 cl_env_copy->nvalues = 1;
 return value0;
}
static cl_object LC1885method_combination_compiler_va(cl_narg narg, cl_object v2object, ...)
{
 return LC1885method_combination_compiler(v2object);
}
/* local function METHOD-COMBINATION-OPTIONS                                  */
/* optimize speed 3, debug 1, space 1, safety 0                               */
static cl_object LC1883method_combination_options(cl_object v1object)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
L1:;
 value0 = ecl_instance_ref((v1object),((cl_fixnum)(2)));
 cl_env_copy->nvalues = 1;
 return value0;
}
static cl_object LC1883method_combination_options_va(cl_narg narg, cl_object v2object, ...)
{
 return LC1883method_combination_options(v2object);
}
#include "clos/combin.data"
#ifdef __cplusplus
extern "C"
#endif

ECL_DLLEXPORT void _eclMEGaLwT1kakr9_Wi20M881(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;COMBIN.LSP.NEWEST",-1);
 return;}
 #ifdef ECL_DYNAMIC_VV
 VV = Cblock->cblock.data;
 #endif
 Cblock->cblock.data_text = (const cl_object *)"@EcLtAg:_eclMEGaLwT1kakr9_Wi20M881@";
 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_defun(VV[47]);                          /*  EFFECTIVE-METHOD-FUNCTION */
  (void)0; /* No entry created for COMBINE-METHOD-FUNCTIONS */
  ecl_cmp_defmacro(VV[48]);                       /*  CALL-METHOD             */
  ecl_cmp_defun(VV[49]);                          /*  CALL-NEXT-METHOD        */
  ecl_cmp_defun(VV[50]);                          /*  NEXT-METHOD-P           */
  {
   cl_object volatile v1;
   v1 = ecl_make_cfun_va((cl_objectfn)LC1861__lambda33_va,ECL_NIL,Cblock,2);
   T0 = v1;
  }
  si_put_sysprop(ECL_SYM("CALL-NEXT-METHOD",935), ECL_SYM("COMPILER-MACRO",240), T0);
  {
   cl_object volatile v1;
   v1 = ecl_make_cfun_va((cl_objectfn)LC1862__lambda38_va,ECL_NIL,Cblock,2);
   T0 = v1;
  }
  si_put_sysprop(ECL_SYM("NEXT-METHOD-P",962), ECL_SYM("COMPILER-MACRO",240), T0);
  (void)0; /* No entry created for ERROR-QUALIFIER */
  (void)0; /* No entry created for STANDARD-MAIN-EFFECTIVE-METHOD */
  ecl_cmp_defun(VV[51]);                          /*  STANDARD-COMPUTE-EFFECTIVE-METHOD */
  (void)0; /* No entry created for STD-COMPUTE-EFFECTIVE-METHOD */
  (void)0; /* No entry created for COMPUTE-EFFECTIVE-METHOD-FUNCTION */
  ecl_cmp_defun(VV[52]);                          /*  COMPUTE-EFFECTIVE-METHOD */
 }
}
