/* Compiler: ECL 26.3.27                                                      */
/* Source: /build/ecl/src/ecl-26.3.27/src/lsp/arraylib.lsp                    */
#include <ecl/ecl-cmp.h>
#include "lsp/arraylib.eclh"
/* function definition for MAKE-ARRAY                                         */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_make_array(cl_narg narg, cl_object v1dimensions, ...)
{
 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(ECL_SYM("MAKE-ARRAY",524));
 {
  cl_object v2element_type;
  cl_object v3initial_element;
  cl_object v4initial_element_supplied_p;
  cl_object v5initial_contents;
  cl_object v6initial_contents_supplied_p;
  cl_object v7adjustable;
  cl_object v8fill_pointer;
  cl_object v9displaced_to;
  cl_object v10displaced_index_offset;
  ecl_va_list args; ecl_va_start(args,v1dimensions,narg,1);
  {
   cl_object keyvars[14];
   cl_parse_key(args,7,cl_make_arraykeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   if (Null(keyvars[7])) {
    v2element_type = ECL_T;
   } else {
    v2element_type = keyvars[0];
   }
   v3initial_element = keyvars[1];
   v4initial_element_supplied_p = keyvars[8];
   v5initial_contents = keyvars[2];
   v6initial_contents_supplied_p = keyvars[9];
   v7adjustable = keyvars[3];
   v8fill_pointer = keyvars[4];
   v9displaced_to = keyvars[5];
   if (Null(keyvars[13])) {
    v10displaced_index_offset = ecl_make_int8_t(0);
   } else {
    v10displaced_index_offset = keyvars[6];
   }
  }
  {
   cl_object v11x;
   v11x = si_make_pure_array(v2element_type, v1dimensions, v7adjustable, v8fill_pointer, v9displaced_to, v10displaced_index_offset);
   if (Null(v4initial_element_supplied_p)){
    goto L4;
   }
   if (Null(v6initial_contents_supplied_p)){
    goto L6;
   }
   cl_error(1, VV[0]);
L6:;
   value0 = si_fill_array_with_elt(v11x, v3initial_element, ecl_make_int8_t(0), ECL_NIL);
   return value0;
L4:;
   if (Null(v6initial_contents_supplied_p)){
    goto L8;
   }
   value0 = L274fill_array_with_seq(v11x, v5initial_contents);
   return value0;
L8:;
   value0 = v11x;
   cl_env_copy->nvalues = 1;
   return value0;
  }
 }
}
/* function definition for FILL-ARRAY-WITH-SEQ                                */
/* optimize speed 1, debug 1, space 1, safety 0                               */
static cl_object L274fill_array_with_seq(cl_object v1array, cl_object v2initial_contents)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
L1:;
 {
  cl_object v3dims;
  v3dims = cl_array_dimensions(v1array);
  if (Null(v3dims)){
   goto L4;
  }
  LC273iterate_over_contents(v1array, v2initial_contents, v3dims, ecl_make_int8_t(0));
  goto L2;
L4:;
  ecl_aset_unsafe(v1array,(cl_fixnum)(0),v2initial_contents);
 }
L2:;
 value0 = v1array;
 cl_env_copy->nvalues = 1;
 return value0;
}
/* function definition for VECTOR                                             */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_vector(cl_narg narg, ...)
{
 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 v1objects;
  ecl_va_list args; ecl_va_start(args,narg,narg,0);
  v1objects = cl_grab_rest_args(args);
  ecl_va_end(args);
  {
   cl_object v2a;
   {
    cl_fixnum v3;
    v3 = ecl_length(v1objects);
    v2a = si_make_vector(ECL_T, ecl_make_fixnum(v3), ECL_NIL, ECL_NIL, ECL_NIL, ecl_make_int8_t(0));
   }
   value0 = L274fill_array_with_seq(v2a, v1objects);
   return value0;
  }
 }
}
/* function definition for ARRAY-DIMENSIONS                                   */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_array_dimensions(cl_object v1array)
{
 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_fixnum v2;
  cl_fixnum v3i;
  cl_object v4d;
  v2 = ecl_array_rank(v1array);
  v3i = v2;
  v4d = ECL_NIL;
  goto L7;
L6:;
  v3i = (v3i)-((cl_fixnum)1);
  T0 = ecl_make_fixnum(v3i);
  {
   cl_fixnum v5;
   v5 = ecl_array_dimension(v1array,ecl_fixnum(T0));
   v4d = CONS(ecl_make_fixnum(v5),v4d);
  }
L7:;
  if ((v3i)==((cl_fixnum)(0))) {
   goto L13;
  }
  goto L6;
L13:;
  value0 = v4d;
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
/* function definition for ARRAY-IN-BOUNDS-P                                  */
/* optimize speed 1, debug 1, space 1, safety 0                               */
cl_object cl_array_in_bounds_p(cl_narg narg, cl_object v1array, ...)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 if (ecl_unlikely(narg<1)) FEwrong_num_arguments(ECL_SYM("ARRAY-IN-BOUNDS-P",105));
 {
  cl_object v2indices;
  ecl_va_list args; ecl_va_start(args,v1array,narg,1);
  v2indices = cl_grab_rest_args(args);
  ecl_va_end(args);
  if (ecl_unlikely(!ECL_ARRAYP(v1array))) FEtype_error_array(v1array);
  value0 = ECL_NIL;
  cl_env_copy->nvalues = 0;
  {
   cl_object v3indices;
   cl_fixnum v4r;
   cl_fixnum v5i;
   v3indices = v2indices;
   v4r = (((v1array)->d.t == t_array)?(v1array)->array.rank:1);
   v5i = (cl_fixnum)(0);
   goto L7;
L6:;
   if (Null(v3indices)){
    goto L10;
   }
   {
    cl_object v6index;
    v6index = ECL_CONS_CAR(v3indices);
    if (!(ECL_FIXNUMP(v6index))){
     goto L14;
    }
    if ((ecl_fixnum(v6index))<0) {
     goto L14;
    }
    {
     cl_fixnum v7;
     v7 = ecl_array_dimension(v1array,v5i);
     if (!((ecl_fixnum(v6index))>=(v7))){
      goto L9;
     }
     goto L13;
    }
L14:;
L13:;
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 1;
    return value0;
   }
L10:;
   cl_error(3, VV[8], ecl_make_fixnum(v4r), ecl_make_fixnum(v5i));
L9:;
   v3indices = ECL_CONS_CDR(v3indices);
   v5i = (v5i)+1;
L7:;
   if ((v5i)>=(v4r)) {
    goto L21;
   }
   goto L6;
L21:;
   value0 = ECL_T;
   cl_env_copy->nvalues = 1;
   return value0;
  }
 }
}
/* function definition for ROW-MAJOR-INDEX-INNER                              */
/* optimize speed 1, debug 1, space 1, safety 0                               */
static cl_object L276row_major_index_inner(cl_object v1array, cl_object v2indices)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
L1:;
 {
  cl_fixnum v3r;
  cl_fixnum v4i;
  cl_fixnum v5j;
  cl_object v6s;
  v3r = (((v1array)->d.t == t_array)?(v1array)->array.rank:1);
  v4i = (cl_fixnum)(0);
  v5j = (cl_fixnum)(0);
  v6s = v2indices;
  goto L8;
L7:;
  {
   cl_object v7d;
   cl_object v8o;
   cl_fixnum v9ndx;
   v7d = ecl_make_fixnum(ecl_array_dimension(v1array,v4i));
   v8o = ECL_CONS_CAR(v6s);
   v9ndx = (cl_fixnum)(0);
   if (!(ECL_FIXNUMP(v8o))){
    goto L17;
   }
   v9ndx = ecl_fixnum(v8o);
   if (!(((cl_fixnum)(0))<=(v9ndx))){
    goto L17;
   }
   {
    cl_fixnum v10;
    v10 = ecl_array_dimension(v1array,v4i);
    if ((v9ndx)<(v10)) {
     goto L14;
    }
    goto L15;
   }
L17:;
   goto L15;
L15:;
   LC275indexing_error(v1array, v2indices);
L14:;
   v5j = (v5j)*(ecl_fixnum(v7d));
   v5j = (v5j)+(v9ndx);
  }
  v4i = (v4i)+1;
  v6s = ECL_CONS_CDR(v6s);
L8:;
  if (v6s==ECL_NIL) {
   goto L28;
  }
  goto L7;
L28:;
  if (!((v4i)<(v3r))){
   goto L30;
  }
  LC275indexing_error(v1array, v2indices);
L30:;
  value0 = ecl_make_fixnum(v5j);
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
/* function definition for ARRAY-ROW-MAJOR-INDEX                              */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_array_row_major_index(cl_narg narg, cl_object v1array, ...)
{
 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(ECL_SYM("ARRAY-ROW-MAJOR-INDEX",108));
 {
  cl_object v2indices;
  ecl_va_list args; ecl_va_start(args,v1array,narg,1);
  v2indices = cl_grab_rest_args(args);
  ecl_va_end(args);
  if (ecl_unlikely(!ECL_ARRAYP(v1array))) FEtype_error_array(v1array);
  value0 = ECL_NIL;
  cl_env_copy->nvalues = 0;
  value0 = L276row_major_index_inner(v1array, v2indices);
  return value0;
 }
}
/* function definition for BIT                                                */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_bit(cl_narg narg, cl_object v1bit_array, ...)
{
 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(ECL_SYM("BIT",125));
 {
  cl_object v2indices;
  ecl_va_list args; ecl_va_start(args,v1bit_array,narg,1);
  v2indices = cl_grab_rest_args(args);
  ecl_va_end(args);
  if (ecl_unlikely(!ECL_ARRAYP(v1bit_array))) FEtype_error_array(v1bit_array);
  value0 = ECL_NIL;
  cl_env_copy->nvalues = 0;
  T0 = L276row_major_index_inner(v1bit_array, v2indices);
  value0 = ecl_aref(v1bit_array,ecl_to_size(T0));
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
/* function definition for SBIT                                               */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_sbit(cl_narg narg, cl_object v1bit_array, ...)
{
 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(ECL_SYM("SBIT",739));
 {
  cl_object v2indices;
  ecl_va_list args; ecl_va_start(args,v1bit_array,narg,1);
  v2indices = cl_grab_rest_args(args);
  ecl_va_end(args);
  if (ecl_unlikely(!ECL_ARRAYP(v1bit_array))) FEtype_error_array(v1bit_array);
  value0 = ECL_NIL;
  cl_env_copy->nvalues = 0;
  T0 = L276row_major_index_inner(v1bit_array, v2indices);
  value0 = ecl_aref(v1bit_array,ecl_to_size(T0));
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
/* function definition for BIT-AND                                            */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_bit_and(cl_narg narg, cl_object v1bit_array1, cl_object v2bit_array2, ...)
{
 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(ECL_SYM("BIT-AND",126));
 if (ecl_unlikely(narg>3)) FEwrong_num_arguments(ECL_SYM("BIT-AND",126));
 {
  cl_object v3result_bit_array;
  va_list args; va_start(args,v2bit_array2);
  {
   int i = 2;
   if (i >= narg) {
    v3result_bit_array = ECL_NIL;
   } else {
    i++;
    v3result_bit_array = va_arg(args,cl_object);
   }
  }
  va_end(args);
  value0 = si_bit_array_op(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("BOOLE-AND",143)), v1bit_array1, v2bit_array2, v3result_bit_array);
  return value0;
 }
}
/* function definition for BIT-IOR                                            */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_bit_ior(cl_narg narg, cl_object v1bit_array1, cl_object v2bit_array2, ...)
{
 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(ECL_SYM("BIT-IOR",130));
 if (ecl_unlikely(narg>3)) FEwrong_num_arguments(ECL_SYM("BIT-IOR",130));
 {
  cl_object v3result_bit_array;
  va_list args; va_start(args,v2bit_array2);
  {
   int i = 2;
   if (i >= narg) {
    v3result_bit_array = ECL_NIL;
   } else {
    i++;
    v3result_bit_array = va_arg(args,cl_object);
   }
  }
  va_end(args);
  value0 = si_bit_array_op(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("BOOLE-IOR",150)), v1bit_array1, v2bit_array2, v3result_bit_array);
  return value0;
 }
}
/* function definition for BIT-XOR                                            */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_bit_xor(cl_narg narg, cl_object v1bit_array1, cl_object v2bit_array2, ...)
{
 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(ECL_SYM("BIT-XOR",138));
 if (ecl_unlikely(narg>3)) FEwrong_num_arguments(ECL_SYM("BIT-XOR",138));
 {
  cl_object v3result_bit_array;
  va_list args; va_start(args,v2bit_array2);
  {
   int i = 2;
   if (i >= narg) {
    v3result_bit_array = ECL_NIL;
   } else {
    i++;
    v3result_bit_array = va_arg(args,cl_object);
   }
  }
  va_end(args);
  value0 = si_bit_array_op(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("BOOLE-XOR",156)), v1bit_array1, v2bit_array2, v3result_bit_array);
  return value0;
 }
}
/* function definition for BIT-EQV                                            */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_bit_eqv(cl_narg narg, cl_object v1bit_array1, cl_object v2bit_array2, ...)
{
 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(ECL_SYM("BIT-EQV",129));
 if (ecl_unlikely(narg>3)) FEwrong_num_arguments(ECL_SYM("BIT-EQV",129));
 {
  cl_object v3result_bit_array;
  va_list args; va_start(args,v2bit_array2);
  {
   int i = 2;
   if (i >= narg) {
    v3result_bit_array = ECL_NIL;
   } else {
    i++;
    v3result_bit_array = va_arg(args,cl_object);
   }
  }
  va_end(args);
  value0 = si_bit_array_op(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("BOOLE-EQV",149)), v1bit_array1, v2bit_array2, v3result_bit_array);
  return value0;
 }
}
/* function definition for BIT-NAND                                           */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_bit_nand(cl_narg narg, cl_object v1bit_array1, cl_object v2bit_array2, ...)
{
 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(ECL_SYM("BIT-NAND",131));
 if (ecl_unlikely(narg>3)) FEwrong_num_arguments(ECL_SYM("BIT-NAND",131));
 {
  cl_object v3result_bit_array;
  va_list args; va_start(args,v2bit_array2);
  {
   int i = 2;
   if (i >= narg) {
    v3result_bit_array = ECL_NIL;
   } else {
    i++;
    v3result_bit_array = va_arg(args,cl_object);
   }
  }
  va_end(args);
  value0 = si_bit_array_op(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("BOOLE-NAND",151)), v1bit_array1, v2bit_array2, v3result_bit_array);
  return value0;
 }
}
/* function definition for BIT-NOR                                            */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_bit_nor(cl_narg narg, cl_object v1bit_array1, cl_object v2bit_array2, ...)
{
 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(ECL_SYM("BIT-NOR",132));
 if (ecl_unlikely(narg>3)) FEwrong_num_arguments(ECL_SYM("BIT-NOR",132));
 {
  cl_object v3result_bit_array;
  va_list args; va_start(args,v2bit_array2);
  {
   int i = 2;
   if (i >= narg) {
    v3result_bit_array = ECL_NIL;
   } else {
    i++;
    v3result_bit_array = va_arg(args,cl_object);
   }
  }
  va_end(args);
  value0 = si_bit_array_op(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("BOOLE-NOR",152)), v1bit_array1, v2bit_array2, v3result_bit_array);
  return value0;
 }
}
/* function definition for BIT-ANDC1                                          */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_bit_andc1(cl_narg narg, cl_object v1bit_array1, cl_object v2bit_array2, ...)
{
 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(ECL_SYM("BIT-ANDC1",127));
 if (ecl_unlikely(narg>3)) FEwrong_num_arguments(ECL_SYM("BIT-ANDC1",127));
 {
  cl_object v3result_bit_array;
  va_list args; va_start(args,v2bit_array2);
  {
   int i = 2;
   if (i >= narg) {
    v3result_bit_array = ECL_NIL;
   } else {
    i++;
    v3result_bit_array = va_arg(args,cl_object);
   }
  }
  va_end(args);
  value0 = si_bit_array_op(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("BOOLE-ANDC1",144)), v1bit_array1, v2bit_array2, v3result_bit_array);
  return value0;
 }
}
/* function definition for BIT-ANDC2                                          */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_bit_andc2(cl_narg narg, cl_object v1bit_array1, cl_object v2bit_array2, ...)
{
 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(ECL_SYM("BIT-ANDC2",128));
 if (ecl_unlikely(narg>3)) FEwrong_num_arguments(ECL_SYM("BIT-ANDC2",128));
 {
  cl_object v3result_bit_array;
  va_list args; va_start(args,v2bit_array2);
  {
   int i = 2;
   if (i >= narg) {
    v3result_bit_array = ECL_NIL;
   } else {
    i++;
    v3result_bit_array = va_arg(args,cl_object);
   }
  }
  va_end(args);
  value0 = si_bit_array_op(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("BOOLE-ANDC2",145)), v1bit_array1, v2bit_array2, v3result_bit_array);
  return value0;
 }
}
/* function definition for BIT-ORC1                                           */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_bit_orc1(cl_narg narg, cl_object v1bit_array1, cl_object v2bit_array2, ...)
{
 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(ECL_SYM("BIT-ORC1",134));
 if (ecl_unlikely(narg>3)) FEwrong_num_arguments(ECL_SYM("BIT-ORC1",134));
 {
  cl_object v3result_bit_array;
  va_list args; va_start(args,v2bit_array2);
  {
   int i = 2;
   if (i >= narg) {
    v3result_bit_array = ECL_NIL;
   } else {
    i++;
    v3result_bit_array = va_arg(args,cl_object);
   }
  }
  va_end(args);
  value0 = si_bit_array_op(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("BOOLE-ORC1",153)), v1bit_array1, v2bit_array2, v3result_bit_array);
  return value0;
 }
}
/* function definition for BIT-ORC2                                           */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_bit_orc2(cl_narg narg, cl_object v1bit_array1, cl_object v2bit_array2, ...)
{
 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(ECL_SYM("BIT-ORC2",135));
 if (ecl_unlikely(narg>3)) FEwrong_num_arguments(ECL_SYM("BIT-ORC2",135));
 {
  cl_object v3result_bit_array;
  va_list args; va_start(args,v2bit_array2);
  {
   int i = 2;
   if (i >= narg) {
    v3result_bit_array = ECL_NIL;
   } else {
    i++;
    v3result_bit_array = va_arg(args,cl_object);
   }
  }
  va_end(args);
  value0 = si_bit_array_op(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("BOOLE-ORC2",154)), v1bit_array1, v2bit_array2, v3result_bit_array);
  return value0;
 }
}
/* function definition for BIT-NOT                                            */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_bit_not(cl_narg narg, cl_object v1bit_array, ...)
{
 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(ECL_SYM("BIT-NOT",133));
 if (ecl_unlikely(narg>2)) FEwrong_num_arguments(ECL_SYM("BIT-NOT",133));
 {
  cl_object v2result_bit_array;
  va_list args; va_start(args,v1bit_array);
  {
   int i = 1;
   if (i >= narg) {
    v2result_bit_array = ECL_NIL;
   } else {
    i++;
    v2result_bit_array = va_arg(args,cl_object);
   }
  }
  va_end(args);
  value0 = si_bit_array_op(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("BOOLE-C1",146)), v1bit_array, v1bit_array, v2result_bit_array);
  return value0;
 }
}
/* function definition for VECTOR-POP                                         */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_vector_pop(cl_object v1vector)
{
 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_fixnum v2fp;
  {
   cl_object v3;
   v3 = cl_fill_pointer(v1vector);
   {
    cl_fixnum v4;
    v4 = (cl_fixnum)(0);
    if (!(ECL_FIXNUMP(v3))){
     goto L8;
    }
    v4 = ecl_fixnum(v3);
    if (!((v4)<=(2305843009213693950))){
     goto L13;
    }
    T0 = ecl_make_bool((v4)>=((cl_fixnum)(0)));
    goto L5;
L13:;
    T0 = ECL_NIL;
    goto L5;
L8:;
    T0 = ECL_NIL;
    goto L5;
   }
L5:;
   if (ecl_unlikely(!((T0)!=ECL_NIL)))
         FEwrong_type_argument(ECL_SYM("ARRAY-INDEX",1877),v3);
   value0 = ECL_NIL;
   cl_env_copy->nvalues = 0;
   v2fp = ecl_fixnum(v3);
  }
  if (!((v2fp)==0)){
   goto L15;
  }
  cl_error(2, VV[12], v1vector);
L15:;
  v2fp = (v2fp)-((cl_fixnum)1);
  T0 = ecl_make_fixnum(v2fp);
  ((v1vector)->vector.fillp)=(ecl_fixnum(T0));
  value0 = ecl_aref_unsafe(v1vector,v2fp);
  cl_env_copy->nvalues = 1;
  return value0;
 }
}
/* function definition for COPY-ARRAY-CONTENTS                                */
/* optimize speed 1, debug 1, space 1, safety 0                               */
static cl_object L278copy_array_contents(cl_object v1dest, cl_object v2orig)
{
 cl_object T0, T1;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
L1:;
 value0 = cl_array_dimensions(v1dest);
 if (value0!=ECL_NIL) {
  goto L4;
 }
 T0 = VV[16];
 goto L2;
L4:;
 T0 = value0;
 goto L2;
L2:;
 value0 = cl_array_dimensions(v2orig);
 if (value0!=ECL_NIL) {
  goto L8;
 }
 T1 = VV[16];
 goto L6;
L8:;
 T1 = value0;
 goto L6;
L6:;
 value0 = LC277do_copy(v1dest, v2orig, T0, T1, ecl_make_int8_t(0), ecl_make_int8_t(0));
 return value0;
}
/* function definition for ADJUST-ARRAY                                       */
/* optimize speed 1, debug 1, space 1, safety 2                               */
cl_object cl_adjust_array(cl_narg narg, cl_object v1array, cl_object v2new_dimensions, ...)
{
 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<2)) FEwrong_num_arguments(ECL_SYM("ADJUST-ARRAY",85));
 {
  cl_object v3r;
  cl_object v4element_type;
  cl_object v5initial_element;
  cl_object v6initial_contents;
  cl_object v7fill_pointer;
  cl_object v8displaced_to;
  cl_object v9displaced_index_offset;
  ecl_va_list args; ecl_va_start(args,v2new_dimensions,narg,2);
  {
   cl_object keyvars[12];
   cl_parse_key(args,6,cl_adjust_arraykeys,keyvars,(cl_object*)&v3r,FALSE);
   ecl_va_end(args);
   if (Null(keyvars[6])) {
    v4element_type = cl_array_element_type(v1array);
   } else {
    v4element_type = keyvars[0];
   }
   v5initial_element = keyvars[1];
   v6initial_contents = keyvars[2];
   v7fill_pointer = keyvars[3];
   v8displaced_to = keyvars[4];
   v9displaced_index_offset = keyvars[5];
  }
  if (!(ECL_FIXNUMP(v2new_dimensions)||ECL_BIGNUMP(v2new_dimensions))){
   goto L2;
  }
  v2new_dimensions = ecl_list1(v2new_dimensions);
L2:;
  if (!((ECL_ARRAYP(v1array)?(void)0:FEtype_error_array(v1array),ECL_ARRAY_HAS_FILL_POINTER_P(v1array)))){
   goto L6;
  }
  if (v7fill_pointer!=ECL_NIL) {
   goto L5;
  }
  T0 = cl_fill_pointer(v1array);
  v3r = cl_listX(3, ECL_SYM("FILL-POINTER",1270), T0, v3r);
  goto L5;
L6:;
  if (Null(v7fill_pointer)){
   goto L5;
  }
  cl_error(7, ECL_SYM("SIMPLE-TYPE-ERROR",776), ECL_SYM("DATUM",1245), v1array, ECL_SYM("EXPECTED-TYPE",1263), VV[18], ECL_SYM("FORMAT-CONTROL",1272), VV[19]);
L5:;
  {
   cl_object v10x;
   T0 = (ECL_SYM("MAKE-ARRAY",524)->symbol.gfdef);
   v10x = cl_apply(7, T0, v2new_dimensions, ECL_SYM("ADJUSTABLE",1224), ECL_T, ECL_SYM("ELEMENT-TYPE",1255), v4element_type, v3r);
   if (v8displaced_to!=ECL_NIL) {
    goto L13;
   }
   if (v6initial_contents!=ECL_NIL) {
    goto L13;
   }
   L278copy_array_contents(v10x, v1array);
L13:;
   value0 = si_replace_array(v1array, v10x);
   return value0;
  }
 }
}
/* function definition for SHRINK-VECTOR                                      */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L279shrink_vector(cl_object v1vec, cl_object v2len)
{
 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 (!((ECL_ARRAYP(v1vec)? (void)0: FEtype_error_array(v1vec),ECL_ADJUSTABLE_ARRAY_P(v1vec)))){
  goto L2;
 }
 value0 = cl_adjust_array(2, v1vec, v2len);
 return value0;
L2:;
 if (Null((cl_env_copy->function=(VV[20]->symbol.gfdef))->cfun.entry(1, v1vec) /*  SIMPLE-ARRAY-P */)){
  goto L4;
 }
 {
  cl_object v3new_vec;
  {
   cl_object v4;
   v4 = cl_array_element_type(v1vec);
   v3new_vec = si_make_pure_array(v4, v2len, ECL_NIL, ECL_NIL, ECL_NIL, ecl_make_int8_t(0));
  }
  value0 = si_copy_subarray(v3new_vec, ecl_make_int8_t(0), v1vec, ecl_make_int8_t(0), v2len);
  return value0;
 }
L4:;
 if (!(ECL_VECTORP(v1vec))){
  goto L8;
 }
 si_fill_pointer_set(v1vec, v2len);
 value0 = v1vec;
 cl_env_copy->nvalues = 1;
 return value0;
L8:;
 T0 = cl_type_of(v1vec);
 value0 = cl_error(3, VV[21], v1vec, T0);
 return value0;
}
static cl_object L279shrink_vector_va(cl_narg narg, cl_object v4vec, cl_object v5len, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[22]);
 {
  return L279shrink_vector(v4vec, v5len);
 }
}
/* local function ITERATE-OVER-CONTENTS                                       */
/* optimize speed 1, debug 1, space 1, safety 0                               */
static cl_object LC273iterate_over_contents(cl_object v1array, cl_object v2contents, cl_object v3dims, cl_object v4written)
{
 cl_object T0, T1;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 cl_fixnum v5written;
 v5written = ecl_fixnum(v4written);
L1:;
 {
  cl_fixnum v6;
  v6 = ecl_length(v2contents);
  T0 = _ecl_car(v3dims);
  if (!(!ecl_number_equalp(ecl_make_fixnum(v6),T0))){
   goto L2;
  }
 }
 cl_error(1, VV[3]);
L2:;
 {
  cl_fixnum v6;
  v6 = ecl_length(v3dims);
  if (!((v6)==((cl_fixnum)(1)))){
   goto L5;
  }
 }
 {
  cl_object v6it;
  v6it = si_make_seq_iterator(1, v2contents);
  goto L10;
L9:;
  T0 = si_seq_iterator_ref(v2contents, v6it);
  ecl_aset_unsafe(v1array,v5written,T0);
  v5written = (v5written)+((cl_fixnum)1);
  v6it = si_seq_iterator_next(v2contents, v6it);
L10:;
  if (v6it==ECL_NIL) {
   goto L17;
  }
  goto L9;
L17:;
  goto L4;
 }
L5:;
 {
  cl_object v7it;
  v7it = si_make_seq_iterator(1, v2contents);
  goto L22;
L21:;
  T0 = si_seq_iterator_ref(v2contents, v7it);
  T1 = _ecl_cdr(v3dims);
  v5written = ecl_fixnum(LC273iterate_over_contents(v1array, T0, T1, ecl_make_fixnum(v5written)));
  v7it = si_seq_iterator_next(v2contents, v7it);
L22:;
  if (v7it==ECL_NIL) {
   goto L28;
  }
  goto L21;
L28:;
 }
L4:;
 value0 = ecl_make_fixnum(v5written);
 cl_env_copy->nvalues = 1;
 return value0;
}
static cl_object LC273iterate_over_contents_va(cl_narg narg, cl_object v6array, cl_object v7contents, cl_object v8dims, cl_object v9written, ...)
{
 return LC273iterate_over_contents(v6array, v7contents, v8dims, v9written);
}
/* local function INDEXING-ERROR                                              */
/* optimize speed 1, debug 1, space 1, safety 0                               */
static cl_object LC275indexing_error(cl_object v1array, cl_object v2indices)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
L1:;
 value0 = cl_error(3, VV[11], v2indices, v1array);
 return value0;
}
static cl_object LC275indexing_error_va(cl_narg narg, cl_object v3array, cl_object v4indices, ...)
{
 return LC275indexing_error(v3array, v4indices);
}
/* local function DO-COPY                                                     */
/* optimize speed 1, debug 1, space 1, safety 0                               */
static cl_object LC277do_copy(cl_object v1dest, cl_object v2orig, cl_object v3dims1, cl_object v4dims2, cl_object v5start1, cl_object v6start2)
{
 cl_object T0;
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 cl_fixnum v7start1;
 cl_fixnum v8start2;
 v7start1 = ecl_fixnum(v5start1);
 v8start2 = ecl_fixnum(v6start2);
L1:;
 {
  cl_fixnum v9d1;
  cl_fixnum v10d2;
  cl_fixnum v11l;
  cl_fixnum v12i1;
  cl_fixnum v13i2;
  {
   cl_object v14;
   v14 = v3dims1;
   if (Null(v14)){
    goto L5;
   }
   {
    cl_object v15;
    v15 = ECL_CONS_CDR(v14);
    v3dims1 = v15;
    v14 = ECL_CONS_CAR(v14);
   }
L5:;
   v9d1 = ecl_fixnum(v14);
  }
  {
   cl_object v14;
   v14 = v4dims2;
   if (Null(v14)){
    goto L14;
   }
   {
    cl_object v15;
    v15 = ECL_CONS_CDR(v14);
    v4dims2 = v15;
    v14 = ECL_CONS_CAR(v14);
   }
L14:;
   v10d2 = ecl_fixnum(v14);
  }
  v11l = (v9d1)<=(v10d2)?v9d1:v10d2;
  v12i1 = v7start1;
  v13i2 = v8start2;
  if (!(v3dims1==ECL_NIL)){
   goto L23;
  }
  value0 = (ecl_copy_subarray(v1dest,v12i1,v2orig,v13i2,v11l),v1dest);
  cl_env_copy->nvalues = 1;
  return value0;
L23:;
  {
   cl_fixnum v14;
   cl_fixnum v15;
   T0 = (ECL_SYM("*",20)->symbol.gfdef);
   v14 = ecl_fixnum(cl_apply(2, T0, v3dims1));
   T0 = (ECL_SYM("*",20)->symbol.gfdef);
   v15 = ecl_fixnum(cl_apply(2, T0, v4dims2));
   {
    cl_fixnum v16i;
    v16i = (cl_fixnum)(0);
    goto L31;
L30:;
    LC277do_copy(v1dest, v2orig, v3dims1, v4dims2, ecl_make_fixnum(v12i1), ecl_make_fixnum(v13i2));
    v12i1 = (v12i1)+(v14);
    v13i2 = (v13i2)+(v15);
    v16i = (v16i)+1;
L31:;
    if (!((v16i)<(v11l))){
     goto L40;
    }
    goto L30;
L40:;
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 1;
    return value0;
   }
  }
 }
}
static cl_object LC277do_copy_va(cl_narg narg, cl_object v17dest, cl_object v18orig, cl_object v19dims1, cl_object v20dims2, cl_object v21start1, cl_object v22start2, ...)
{
 return LC277do_copy(v17dest, v18orig, v19dims1, v20dims2, v21start1, v22start2);
}
#include "lsp/arraylib.data"
#ifdef __cplusplus
extern "C"
#endif

ECL_DLLEXPORT void _eclaIpyegzEoXPh9_joezL881(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;ARRAYLIB.LSP.NEWEST",-1);
 return;}
 #ifdef ECL_DYNAMIC_VV
 VV = Cblock->cblock.data;
 #endif
 Cblock->cblock.data_text = (const cl_object *)"@EcLtAg:_eclaIpyegzEoXPh9_joezL881@";
 VVtemp = Cblock->cblock.temp_data;
 ECL_DEFINE_SETF_FUNCTIONS
/* MAKE-LOAD-FORMs                                                            */
/* TOP-LEVEL-FORMs                                                            */
  si_select_package(VVtemp[0]);
  (void)0; /* No entry created for MAKE-ARRAY */
  (void)0; /* No entry created for FILL-ARRAY-WITH-SEQ */
  (void)0; /* No entry created for VECTOR */
  (void)0; /* No entry created for ARRAY-DIMENSIONS */
  (void)0; /* No entry created for ARRAY-IN-BOUNDS-P */
  (void)0; /* No entry created for ROW-MAJOR-INDEX-INNER */
  (void)0; /* No entry created for ARRAY-ROW-MAJOR-INDEX */
  (void)0; /* No entry created for BIT */
  (void)0; /* No entry created for SBIT */
  (void)0; /* No entry created for BIT-AND */
  (void)0; /* No entry created for BIT-IOR */
  (void)0; /* No entry created for BIT-XOR */
  (void)0; /* No entry created for BIT-EQV */
  (void)0; /* No entry created for BIT-NAND */
  (void)0; /* No entry created for BIT-NOR */
  (void)0; /* No entry created for BIT-ANDC1 */
  (void)0; /* No entry created for BIT-ANDC2 */
  (void)0; /* No entry created for BIT-ORC1 */
  (void)0; /* No entry created for BIT-ORC2 */
  (void)0; /* No entry created for BIT-NOT */
  (void)0; /* No entry created for VECTOR-POP */
  (void)0; /* No entry created for COPY-ARRAY-CONTENTS */
  (void)0; /* No entry created for ADJUST-ARRAY */
  ecl_cmp_defun(VV[23]);                          /*  SHRINK-VECTOR           */
}
