/* Compiler: ECL 26.3.27                                                      */
/* Source: /build/ecl/src/ecl-26.3.27/src/cmp/cmpprop-array.lsp               */
#include <ecl/ecl-cmp.h>
#include "cmp/cmpprop-array.eclh"
/* function definition for TYPE-FROM-ARRAY-ELT                                */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3610type_from_array_elt(cl_object v1array)
{
 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 v2name;
  v2name = ECL_NIL;
  if (!((v1array)==(ECL_SYM("STRING",808)))){
   goto L4;
  }
  T0 = ECL_SYM("CHARACTER",224);
  goto L3;
L4:;
  if (!((v1array)==(ECL_SYM("BASE-STRING",123)))){
   goto L6;
  }
  T0 = ECL_SYM("BASE-CHAR",122);
  goto L3;
L6:;
  {
   cl_object v3;
   v1array = (cl_env_copy->function=(VV[1]->symbol.gfdef))->cfun.entry(2, v1array, ecl_cmp_symbol_value(cl_env_copy,VV[2])) /*  EXPAND-DEFTYPE */;
   v3 = v1array;
   if (!((v3)==(ECL_SYM("ARRAY",98)))){
    goto L15;
   }
   goto L12;
L15:;
   goto L13;
L13:;
   if (!((v3)==(ECL_SYM("VECTOR",902)))){
    goto L19;
   }
   goto L12;
L19:;
   goto L17;
L17:;
   if (!((v3)==(ECL_SYM("SIMPLE-ARRAY",766)))){
    goto L8;
   }
   goto L9;
L12:;
  }
L9:;
  T0 = ECL_T;
  goto L3;
L8:;
  if (!(ECL_ATOM(v1array))){
   goto L22;
  }
  v1array = ECL_SYM("ARRAY",98);
  T0 = ECL_T;
  goto L3;
L22:;
  v2name = ecl_car(v1array);
  if (!((v2name)==(ECL_SYM("OR",616)))){
   goto L26;
  }
  {
   cl_object v3;
   v3 = ecl_fdefinition(VV[0]);
   {
    cl_object v4;
    cl_object v5;
    cl_object v6;
    {
     cl_object v7;
     v7 = ecl_cdr(v1array);
     if (ecl_unlikely(!ECL_LISTP(v7))) FEtype_error_list(v7);
     value0 = ECL_NIL;
     cl_env_copy->nvalues = 0;
     v4 = v7;
    }
    v5 = ECL_NIL;
    v6 = v4;
    {
     cl_object v7;
     cl_object v8;
     v7 = ecl_list1(ECL_NIL);
     v8 = v7;
L38:;
     if (!(ecl_endp(v6))){
      goto L40;
     }
     goto L39;
L40:;
     v5 = ECL_CONS_CAR(v6);
     {
      cl_object v9;
      v9 = ECL_CONS_CDR(v6);
      if (ecl_unlikely(!ECL_LISTP(v9))) FEtype_error_list(v9);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
      v6 = v9;
     }
     {
      cl_object v9;
      v9 = v8;
      if (ecl_unlikely(ECL_ATOM(v9))) FEtype_error_cons(v9);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
      T2 = v9;
     }
     T3 = ecl_function_dispatch(cl_env_copy,v3)(1, v5);
     v8 = ecl_list1(T3);
     (ECL_CONS_CDR(T2)=v8,T2);
     goto L38;
L39:;
     T1 = ecl_cdr(v7);
     goto L29;
    }
   }
  }
L29:;
  T0 = CONS(ECL_SYM("OR",616),T1);
  goto L3;
L26:;
  v2name = ecl_car(v1array);
  if (!((v2name)==(ECL_SYM("AND",89)))){
   goto L56;
  }
  {
   cl_object v3;
   v3 = ecl_fdefinition(VV[0]);
   {
    cl_object v4;
    cl_object v5;
    cl_object v6;
    {
     cl_object v7;
     v7 = ecl_cdr(v1array);
     if (ecl_unlikely(!ECL_LISTP(v7))) FEtype_error_list(v7);
     value0 = ECL_NIL;
     cl_env_copy->nvalues = 0;
     v4 = v7;
    }
    v5 = ECL_NIL;
    v6 = v4;
    {
     cl_object v7;
     cl_object v8;
     v7 = ecl_list1(ECL_NIL);
     v8 = v7;
L68:;
     if (!(ecl_endp(v6))){
      goto L70;
     }
     goto L69;
L70:;
     v5 = ECL_CONS_CAR(v6);
     {
      cl_object v9;
      v9 = ECL_CONS_CDR(v6);
      if (ecl_unlikely(!ECL_LISTP(v9))) FEtype_error_list(v9);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
      v6 = v9;
     }
     {
      cl_object v9;
      v9 = v8;
      if (ecl_unlikely(ECL_ATOM(v9))) FEtype_error_cons(v9);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
      T2 = v9;
     }
     T3 = ecl_function_dispatch(cl_env_copy,v3)(1, v5);
     v8 = ecl_list1(T3);
     (ECL_CONS_CDR(T2)=v8,T2);
     goto L68;
L69:;
     T1 = ecl_cdr(v7);
     goto L59;
    }
   }
  }
L59:;
  T0 = CONS(ECL_SYM("AND",89),T1);
  goto L3;
L56:;
  {
   cl_object v3;
   v3 = ecl_car(v1array);
   if (!((v3)==(ECL_SYM("ARRAY",98)))){
    goto L91;
   }
   goto L86;
L91:;
   goto L89;
L89:;
   if (!((v3)==(ECL_SYM("VECTOR",902)))){
    goto L95;
   }
   goto L86;
L95:;
   goto L93;
L93:;
   if (!((v3)==(ECL_SYM("SIMPLE-ARRAY",766)))){
    goto L98;
   }
   goto L86;
L98:;
   goto L87;
  }
L87:;
  v1array = ECL_SYM("ARRAY",98);
  T0 = ECL_T;
  goto L3;
L86:;
  T1 = ecl_cdr(v1array);
  if (!(T1==ECL_NIL)){
   goto L102;
  }
  T0 = ECL_T;
  goto L3;
L102:;
  {
   cl_object v3x;
   v3x = ecl_cadr(v1array);
   if (!((v3x)==(ECL_SYM("*",20)))){
    goto L105;
   }
   T0 = ECL_T;
   goto L3;
L105:;
   T0 = v3x;
  }
L3:;
  cl_env_copy->nvalues = 2;
  cl_env_copy->values[1] = v1array;
  cl_env_copy->values[0] = T0;
  return cl_env_copy->values[0];
 }
}
static cl_object L3610type_from_array_elt_va(cl_narg narg, cl_object v3array, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[0]);
 {
  return L3610type_from_array_elt(v3array);
 }
}
/* local function LAMBDA43                                                    */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC3611__lambda43(cl_narg narg, cl_object v1fname, cl_object v2array_type, ...)
{
 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<2)) FEwrong_num_arguments(VV[13]);
 {
  cl_object v3indices_and_object;
  ecl_va_list args; ecl_va_start(args,v2array_type,narg,2);
  v3indices_and_object = cl_grab_rest_args(args);
  ecl_va_end(args);
  {
   cl_object v4;                                  /*  ELT-TYPE                */
   cl_object v5;                                  /*  ARRAY-TYPE              */
   value0 = L3610type_from_array_elt(v2array_type);
   {
    const int v6 = cl_env_copy->nvalues;
    v4 = value0;
    cl_object v7;
    v7 = (v6<=1)? ECL_NIL : cl_env_copy->values[1];
    v5 = v7;
   }
   {
    cl_fixnum v6;
    v6 = ecl_length(v3indices_and_object);
    T0 = ecl_make_integer((v6)-1);
    T1 = cl_make_list(3, T0, ECL_SYM("INITIAL-ELEMENT",1286), VV[14]);
    T2 = ecl_list1(v4);
    T3 = ecl_nconc(T1,T2);
    T4 = CONS(v5,T3);
    cl_env_copy->nvalues = 2;
    cl_env_copy->values[1] = v4;
    cl_env_copy->values[0] = T4;
    return cl_env_copy->values[0];
   }
  }
 }
}
/* local function LAMBDA48                                                    */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC3612__lambda48(cl_narg narg, cl_object v1fname, cl_object v2array_type, ...)
{
 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);
 if (ecl_unlikely(narg<2)) FEwrong_num_arguments(VV[15]);
 {
  cl_object v3indices;
  ecl_va_list args; ecl_va_start(args,v2array_type,narg,2);
  v3indices = cl_grab_rest_args(args);
  ecl_va_end(args);
  {
   cl_object v4;                                  /*  ELT-TYPE                */
   cl_object v5;                                  /*  ARRAY-TYPE              */
   value0 = L3610type_from_array_elt(v2array_type);
   {
    const int v6 = cl_env_copy->nvalues;
    v4 = value0;
    cl_object v7;
    v7 = (v6<=1)? ECL_NIL : cl_env_copy->values[1];
    v5 = v7;
   }
   {
    cl_fixnum v6;
    v6 = ecl_length(v3indices);
    T0 = cl_make_list(3, ecl_make_fixnum(v6), ECL_SYM("INITIAL-ELEMENT",1286), VV[14]);
    T1 = CONS(v5,T0);
    cl_env_copy->nvalues = 2;
    cl_env_copy->values[1] = v4;
    cl_env_copy->values[0] = T1;
    return cl_env_copy->values[0];
   }
  }
 }
}
/* local function LAMBDA54                                                    */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC3613__lambda54(cl_narg narg, cl_object v1fname, cl_object v2array_type, cl_object v3index, cl_object v4obj, ...)
{
 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<4)) FEwrong_num_arguments(VV[16]);
 {
  va_list args; va_start(args,v4obj);
  va_end(args);
  {
   cl_object v5;                                  /*  ELT-TYPE                */
   cl_object v6;                                  /*  ARRAY-TYPE              */
   value0 = L3610type_from_array_elt(v2array_type);
   {
    const int v7 = cl_env_copy->nvalues;
    v5 = value0;
    cl_object v8;
    v8 = (v7<=1)? ECL_NIL : cl_env_copy->values[1];
    v6 = v8;
   }
   T0 = cl_list(3, v6, VV[14], v5);
   cl_env_copy->nvalues = 2;
   cl_env_copy->values[1] = v5;
   cl_env_copy->values[0] = T0;
   return cl_env_copy->values[0];
  }
 }
}
/* local function LAMBDA60                                                    */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC3614__lambda60(cl_narg narg, cl_object v1fname, cl_object v2array_type, cl_object v3index, ...)
{
 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<3)) FEwrong_num_arguments(VV[17]);
 {
  va_list args; va_start(args,v3index);
  va_end(args);
  {
   cl_object v4;                                  /*  ELT-TYPE                */
   cl_object v5;                                  /*  ARRAY-TYPE              */
   value0 = L3610type_from_array_elt(v2array_type);
   {
    const int v6 = cl_env_copy->nvalues;
    v4 = value0;
    cl_object v7;
    v7 = (v6<=1)? ECL_NIL : cl_env_copy->values[1];
    v5 = v7;
   }
   T0 = cl_list(2, v5, VV[14]);
   cl_env_copy->nvalues = 2;
   cl_env_copy->values[1] = v4;
   cl_env_copy->values[0] = T0;
   return cl_env_copy->values[0];
  }
 }
}
#include "cmp/cmpprop-array.data"
#ifdef __cplusplus
extern "C"
#endif

ECL_DLLEXPORT void _eclkkKBUGcGdZRl9_4QW0M881(cl_object flag)
{
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 cl_object *VVtemp;
 if (flag != OBJNULL){
 Cblock = flag;
 #ifndef ECL_DYNAMIC_VV
 flag->cblock.data = VV;
 #endif
 flag->cblock.data_size = VM;
 flag->cblock.temp_data_size = VMtemp;
 flag->cblock.data_text = compiler_data_text;
 flag->cblock.cfuns_size = compiler_cfuns_size;
 flag->cblock.cfuns = compiler_cfuns;
 flag->cblock.source = ecl_make_constant_base_string("SRC:CMP;CMPPROP-ARRAY.LSP.NEWEST",-1);
 return;}
 #ifdef ECL_DYNAMIC_VV
 VV = Cblock->cblock.data;
 #endif
 Cblock->cblock.data_text = (const cl_object *)"@EcLtAg:_eclkkKBUGcGdZRl9_4QW0M881@";
 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[18]);                          /*  TYPE-FROM-ARRAY-ELT     */
  {
   cl_object volatile v1;
   v1 = ecl_make_cfun_va((cl_objectfn)LC3611__lambda43,ECL_NIL,Cblock,2);
   T0 = v1;
  }
  si_hash_set(ECL_SYM("ASET",1045), ecl_cmp_symbol_value(cl_env_copy,VV[12]), T0);
  {
   cl_object volatile v1;
   v1 = ecl_make_cfun_va((cl_objectfn)LC3612__lambda48,ECL_NIL,Cblock,2);
   T0 = v1;
  }
  si_hash_set(ECL_SYM("AREF",94), ecl_cmp_symbol_value(cl_env_copy,VV[12]), T0);
  {
   cl_object volatile v1;
   v1 = ecl_make_cfun_va((cl_objectfn)LC3613__lambda54,ECL_NIL,Cblock,4);
   T0 = v1;
  }
  si_hash_set(ECL_SYM("ROW-MAJOR-ASET",1156), ecl_cmp_symbol_value(cl_env_copy,VV[12]), T0);
  {
   cl_object volatile v1;
   v1 = ecl_make_cfun_va((cl_objectfn)LC3614__lambda60,ECL_NIL,Cblock,3);
   T0 = v1;
  }
  si_hash_set(ECL_SYM("ROW-MAJOR-AREF",734), ecl_cmp_symbol_value(cl_env_copy,VV[12]), T0);
 }
}
