/* Compiler: ECL 26.3.27                                                      */
/* Source: /build/ecl/src/ecl-26.3.27/src/cmp/cmpmap.lsp                      */
#include <ecl/ecl-cmp.h>
#include "cmp/cmpmap.eclh"
/* function definition for EXPAND-MAPCAR                                      */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3989expand_mapcar(cl_object v1whole)
{
 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);
L1:;
 {
  cl_fixnum v2;
  v2 = ecl_length(v1whole);
  if (!((v2)<((cl_fixnum)(3)))){
   goto L2;
  }
 }
 T0 = ecl_car(v1whole);
 (cl_env_copy->function=ecl_fdefinition(VV[1]))->cfun.entry(3, VV[2], T0, v1whole) /*  CMPWARN */;
 T0 = ecl_car(v1whole);
 T1 = cl_list(2, ECL_SYM("QUOTE",682), T0);
 T2 = cl_list(2, ECL_SYM("QUOTE",682), v1whole);
 value0 = cl_list(4, ECL_SYM("SIMPLE-PROGRAM-ERROR",1167), VV[2], T1, T2);
 return value0;
L2:;
 {
  cl_object v2which;
  v2which = ecl_car(v1whole);
  if (!((v2which)==(ECL_SYM("FUNCALL",396)))){
   goto L6;
  }
  v1whole = ecl_cdr(v1whole);
  v2which = ecl_car(v1whole);
  if (!(ECL_CONSP(v2which))){
   goto L6;
  }
  T0 = ecl_car(v2which);
  if (!((T0)==(ECL_SYM("FUNCTION",398)))){
   goto L13;
  }
  v2which = ecl_cadr(v2which);
  goto L6;
L13:;
  value0 = v1whole;
  cl_env_copy->nvalues = 1;
  return value0;
L6:;
  {
   cl_object v3function;
   cl_object v4fun_with;
   cl_object v5args;
   cl_object v6iterators;
   cl_object v7for_statements;
   cl_object v8in_or_on;
   cl_object v9do_or_collect;
   cl_object v10list_1_form;
   cl_object v11finally_form;
   v3function = cl_gensym(0);
   T0 = ecl_cadr(v1whole);
   v4fun_with = cl_list(4, VV[3], v3function, ECL_SYM("=",76), T0);
   v5args = ecl_cddr(v1whole);
   v6iterators = ECL_NIL;
   v7for_statements = ECL_NIL;
   v8in_or_on = VV[4];
   v9do_or_collect = VV[5];
   v10list_1_form = ECL_NIL;
   v11finally_form = ECL_NIL;
   if ((v2which)==(ECL_SYM("MAPCAR",547))) {
    goto L25;
   }
   if (!((v2which)==(ECL_SYM("MAPLIST",551)))){
    goto L27;
   }
   v8in_or_on = VV[6];
   goto L25;
L27:;
   if (!((v2which)==(ECL_SYM("MAPC",545)))){
    goto L30;
   }
   v9do_or_collect = VV[7];
   goto L25;
L30:;
   if (!((v2which)==(ECL_SYM("MAPL",550)))){
    goto L33;
   }
   v8in_or_on = VV[6];
   v9do_or_collect = VV[7];
   goto L25;
L33:;
   if (!((v2which)==(ECL_SYM("MAPCAN",546)))){
    goto L38;
   }
   v9do_or_collect = ECL_SYM("NCONC",583);
   goto L25;
L38:;
   if (!((v2which)==(ECL_SYM("MAPCON",548)))){
    goto L25;
   }
   v8in_or_on = VV[6];
   v9do_or_collect = ECL_SYM("NCONC",583);
L25:;
   if (!((v8in_or_on)==(VV[6]))){
    goto L45;
   }
   {
    cl_object v12;
    {
     cl_object v13;
     v13 = ecl_make_cfun_va((cl_objectfn)LC3988__lambda18_va,ECL_NIL,Cblock,1);
     v12 = v13;
    }
    {
     cl_object v13;
     cl_object v14;
     cl_object v15;
     {
      cl_object v16;
      v16 = v5args;
      if (ecl_unlikely(!ECL_LISTP(v16))) FEtype_error_list(v16);
      value0 = ECL_NIL;
      cl_env_copy->nvalues = 0;
      v13 = v16;
     }
     v14 = ECL_NIL;
     v15 = v13;
     {
      cl_object v16;
      cl_object v17;
      v16 = ecl_list1(ECL_NIL);
      v17 = v16;
L56:;
      if (!(ecl_endp(v15))){
       goto L58;
      }
      goto L57;
L58:;
      v14 = ECL_CONS_CAR(v15);
      {
       cl_object v18;
       v18 = ECL_CONS_CDR(v15);
       if (ecl_unlikely(!ECL_LISTP(v18))) FEtype_error_list(v18);
       value0 = ECL_NIL;
       cl_env_copy->nvalues = 0;
       v15 = v18;
      }
      {
       cl_object v18;
       v18 = v17;
       if (ecl_unlikely(ECL_ATOM(v18))) FEtype_error_cons(v18);
       value0 = ECL_NIL;
       cl_env_copy->nvalues = 0;
       T0 = v18;
      }
      T1 = ecl_function_dispatch(cl_env_copy,v12)(1, v14);
      v17 = ecl_list1(T1);
      (ECL_CONS_CDR(T0)=v17,T0);
      goto L56;
L57:;
      v5args = ecl_cdr(v16);
      goto L47;
     }
    }
   }
L47:;
L45:;
   if (!((v9do_or_collect)==(VV[7]))){
    goto L74;
   }
   {
    cl_object v12var;
    v12var = cl_gensym(0);
    T0 = ecl_car(v5args);
    v10list_1_form = cl_list(4, VV[3], v12var, ECL_SYM("=",76), T0);
    T0 = ecl_cdr(v5args);
    v5args = CONS(v12var,T0);
    T0 = cl_list(2, ECL_SYM("RETURN",727), v12var);
    v11finally_form = cl_list(2, VV[14], T0);
   }
L74:;
   {
    cl_object v12;
    cl_object v13arg;
    cl_object v14;
    {
     cl_object v15;
     v15 = cl_reverse(v5args);
     if (ecl_unlikely(!ECL_LISTP(v15))) FEtype_error_list(v15);
     value0 = ECL_NIL;
     cl_env_copy->nvalues = 0;
     v12 = v15;
    }
    v13arg = ECL_NIL;
    v14 = v12;
L88:;
    if (!(ecl_endp(v14))){
     goto L90;
    }
    goto L89;
L90:;
    v13arg = ECL_CONS_CAR(v14);
    {
     cl_object v15;
     v15 = ECL_CONS_CDR(v14);
     if (ecl_unlikely(!ECL_LISTP(v15))) FEtype_error_list(v15);
     value0 = ECL_NIL;
     cl_env_copy->nvalues = 0;
     v14 = v15;
    }
    {
     cl_object v15var;
     v15var = cl_gensym(0);
     v6iterators = CONS(v15var,v6iterators);
     v7for_statements = cl_listX(5, VV[15], v15var, v8in_or_on, v13arg, v7for_statements);
    }
    goto L88;
L89:;
   }
   T0 = cl_listX(3, ECL_SYM("FUNCALL",396), v3function, v6iterators);
   T1 = cl_listX(3, v9do_or_collect, T0, v11finally_form);
   T2 = cl_append(4, v4fun_with, v10list_1_form, v7for_statements, T1);
   value0 = CONS(ECL_SYM("LOOP",514),T2);
   cl_env_copy->nvalues = 1;
   return value0;
  }
 }
}
static cl_object L3989expand_mapcar_va(cl_narg narg, cl_object v12whole, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[0]);
 {
  return L3989expand_mapcar(v12whole);
 }
}
/* local function LAMBDA33                                                    */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC3990__lambda33(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:;
  value0 = L3989expand_mapcar(v1);
  return value0;
 }
}
static cl_object LC3990__lambda33_va(cl_narg narg, cl_object v4, cl_object v5, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[17]);
 {
  return LC3990__lambda33(v4, v5);
 }
}
/* local function LAMBDA38                                                    */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC3991__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:;
  value0 = L3989expand_mapcar(v1);
  return value0;
 }
}
static cl_object LC3991__lambda38_va(cl_narg narg, cl_object v4, cl_object v5, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[18]);
 {
  return LC3991__lambda38(v4, v5);
 }
}
/* local function LAMBDA43                                                    */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC3992__lambda43(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:;
  value0 = L3989expand_mapcar(v1);
  return value0;
 }
}
static cl_object LC3992__lambda43_va(cl_narg narg, cl_object v4, cl_object v5, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[19]);
 {
  return LC3992__lambda43(v4, v5);
 }
}
/* local function LAMBDA48                                                    */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC3993__lambda48(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:;
  value0 = L3989expand_mapcar(v1);
  return value0;
 }
}
static cl_object LC3993__lambda48_va(cl_narg narg, cl_object v4, cl_object v5, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[20]);
 {
  return LC3993__lambda48(v4, v5);
 }
}
/* local function LAMBDA53                                                    */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC3994__lambda53(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:;
  value0 = L3989expand_mapcar(v1);
  return value0;
 }
}
static cl_object LC3994__lambda53_va(cl_narg narg, cl_object v4, cl_object v5, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[21]);
 {
  return LC3994__lambda53(v4, v5);
 }
}
/* local function LAMBDA58                                                    */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC3995__lambda58(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:;
  value0 = L3989expand_mapcar(v1);
  return value0;
 }
}
static cl_object LC3995__lambda58_va(cl_narg narg, cl_object v4, cl_object v5, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[22]);
 {
  return LC3995__lambda58(v4, v5);
 }
}
/* local function LAMBDA18                                                    */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC3988__lambda18(cl_object v1arg)
{
 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_list(3, ECL_SYM("CHECKED-VALUE",2082), ECL_SYM("LIST",483), v1arg);
 return value0;
}
static cl_object LC3988__lambda18_va(cl_narg narg, cl_object v2arg, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[8]);
 {
  return LC3988__lambda18(v2arg);
 }
}
#include "cmp/cmpmap.data"
#ifdef __cplusplus
extern "C"
#endif

ECL_DLLEXPORT void _eclPJMOrzmToGmk9_NDe0M881(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;CMPMAP.LSP.NEWEST",-1);
 return;}
 #ifdef ECL_DYNAMIC_VV
 VV = Cblock->cblock.data;
 #endif
 Cblock->cblock.data_text = (const cl_object *)"@EcLtAg:_eclPJMOrzmToGmk9_NDe0M881@";
 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[23]);                          /*  EXPAND-MAPCAR           */
  {
   cl_object volatile v1;
   v1 = ecl_make_cfun_va((cl_objectfn)LC3990__lambda33_va,ECL_NIL,Cblock,2);
   T0 = v1;
  }
  si_put_sysprop(ECL_SYM("MAPCAR",547), ECL_SYM("COMPILER-MACRO",240), T0);
  {
   cl_object volatile v1;
   v1 = ecl_make_cfun_va((cl_objectfn)LC3991__lambda38_va,ECL_NIL,Cblock,2);
   T0 = v1;
  }
  si_put_sysprop(ECL_SYM("MAPC",545), ECL_SYM("COMPILER-MACRO",240), T0);
  {
   cl_object volatile v1;
   v1 = ecl_make_cfun_va((cl_objectfn)LC3992__lambda43_va,ECL_NIL,Cblock,2);
   T0 = v1;
  }
  si_put_sysprop(ECL_SYM("MAPCAN",546), ECL_SYM("COMPILER-MACRO",240), T0);
  {
   cl_object volatile v1;
   v1 = ecl_make_cfun_va((cl_objectfn)LC3993__lambda48_va,ECL_NIL,Cblock,2);
   T0 = v1;
  }
  si_put_sysprop(ECL_SYM("MAPLIST",551), ECL_SYM("COMPILER-MACRO",240), T0);
  {
   cl_object volatile v1;
   v1 = ecl_make_cfun_va((cl_objectfn)LC3994__lambda53_va,ECL_NIL,Cblock,2);
   T0 = v1;
  }
  si_put_sysprop(ECL_SYM("MAPL",550), ECL_SYM("COMPILER-MACRO",240), T0);
  {
   cl_object volatile v1;
   v1 = ecl_make_cfun_va((cl_objectfn)LC3995__lambda58_va,ECL_NIL,Cblock,2);
   T0 = v1;
  }
  si_put_sysprop(ECL_SYM("MAPCON",548), ECL_SYM("COMPILER-MACRO",240), T0);
 }
}
