/* Compiler: ECL 26.3.27                                                      */
/* Source: /build/ecl/src/ecl-26.3.27/src/cmp/cmppass1-data.lsp               */
#include <ecl/ecl-cmp.h>
#include "cmp/cmppass1-data.eclh"
/* function definition for ADD-LOAD-FORM                                      */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3444add_load_form(cl_object volatile v1object, cl_object volatile v2location)
{
 cl_object T0, T1, T2;
 volatile cl_object lex0[2];
 cl_object volatile env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object volatile value0;
 ecl_cs_check(cl_env_copy,value0);
 lex0[0] = v2location;                            /*  LOCATION                */
L1:;
 {
  cl_object volatile v3;                          /*  MAKE-FORM               */
  value0 = (cl_env_copy->function=(ECL_SYM("MAKE-LOAD-FORM",955)->symbol.gfdef))->cfun.entry(1, v1object) /*  MAKE-LOAD-FORM */;
  {
   const int v4 = cl_env_copy->nvalues;
   v3 = value0;
   cl_object v5;
   v5 = (v4<=1)? ECL_NIL : cl_env_copy->values[1];
   lex0[1] = v5;                                  /*  INIT-FORM               */
  }
  si_hash_set(v1object, ecl_cmp_symbol_value(cl_env_copy,VV[1]), lex0[0]);
  {
   volatile cl_object v4deferred;
   v4deferred = ECL_NIL;
   if (Null(v3)){
    goto L5;
   }
   {
    cl_object v5;
    v5 = CONS(v1object,ecl_cmp_symbol_value(cl_env_copy,VV[2]));
    ecl_bds_bind(cl_env_copy,VV[3],ECL_NIL);      /*  *OBJECTS-INIT-DEFERRED* */
    ecl_bds_bind(cl_env_copy,VV[2],v5);           /*  *OBJECTS-BEING-CREATED* */
    T0 = (cl_env_copy->function=ecl_fdefinition(VV[8]))->cfun.entry(1, v3) /*  C1EXPR */;
    T1 = (cl_env_copy->function=ecl_fdefinition(VV[5]))->cfun.entry(4, VV[6], VV[7], lex0[0], T0) /*  MAKE-C1FORM* */;
    T2 = CONS(T1,ecl_cmp_symbol_value(cl_env_copy,VV[4]));
    ecl_cmp_setq(cl_env_copy,VV[4],T2);
    v4deferred = cl_nreverse(ecl_cmp_symbol_value(cl_env_copy,VV[3]));
    ecl_bds_unwind1(cl_env_copy);
    ecl_bds_unwind1(cl_env_copy);
   }
L5:;
   {
    cl_object v5;
    cl_object v6loc;
    cl_object v7init;
    cl_object v8;
    {
     cl_object v9;
     v9 = v4deferred;
     if (ecl_unlikely(!ECL_LISTP(v9))) FEtype_error_list(v9);
     value0 = ECL_NIL;
     cl_env_copy->nvalues = 0;
     v5 = v9;
    }
    v6loc = ECL_NIL;
    v7init = ECL_NIL;
    v8 = v5;
L17:;
    if (!(ecl_endp(v8))){
     goto L19;
    }
    goto L18;
L19:;
    {
     cl_object v9;
     v9 = ECL_CONS_CAR(v8);
     v6loc = ecl_car(v9);
     v9 = ecl_cdr(v9);
     v7init = v9;
    }
    {
     cl_object v9;
     v9 = ECL_CONS_CDR(v8);
     if (ecl_unlikely(!ECL_LISTP(v9))) FEtype_error_list(v9);
     value0 = ECL_NIL;
     cl_env_copy->nvalues = 0;
     v8 = v9;
    }
    LC3443maybe_init(lex0, v6loc, v7init);
    goto L17;
L18:;
    if (Null(lex0[1])){
     goto L34;
    }
    LC3443maybe_init(lex0, lex0[0], lex0[1]);
L34:;
    value0 = ECL_NIL;
    cl_env_copy->nvalues = 1;
    return value0;
   }
  }
 }
}
static cl_object L3444add_load_form_va(cl_narg narg, cl_object v3object, cl_object v4location, ...)
{
 if (ecl_unlikely(narg!=2)) FEwrong_num_arguments(VV[0]);
 {
  return L3444add_load_form(v3object, v4location);
 }
}
/* function definition for DATA-EMPTY-LOC                                     */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3445data_empty_loc()
{
 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 = L3448add_object(5, ecl_cmp_symbol_value(cl_env_copy,VV[19]), VV[20], ECL_T, VV[21], ECL_T);
 return value0;
}
static cl_object L3445data_empty_loc_va(cl_narg narg, ...)
{
 if (ecl_unlikely(narg!=0)) FEwrong_num_arguments(VV[17]);
 {
  return L3445data_empty_loc();
 }
}
/* function definition for FIND-VV                                            */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3446find_vv(cl_narg narg, cl_object v1object, ...)
{
 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(VV[23]);
 {
  cl_object v2permanent;
  cl_object v3errorp;
  ecl_va_list args; ecl_va_start(args,v1object,narg,1);
  {
   cl_object keyvars[4];
   cl_parse_key(args,2,L3446find_vvkeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   v2permanent = keyvars[0];
   if (Null(keyvars[3])) {
    v3errorp = ECL_T;
   } else {
    v3errorp = keyvars[1];
   }
  }
  {
   cl_object v4test;
   cl_object v5item;
   if (Null(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("*COMPILER-CONSTANTS*",1021)))){
    goto L3;
   }
   v4test = ECL_SYM("EQ",335);
   goto L2;
L3:;
   v4test = VV[24];
L2:;
   {
    cl_object v6;
    cl_object v7;
    v6 = ecl_cmp_symbol_value(cl_env_copy,VV[25]);
    v7 = ecl_fdefinition(VV[26]);
    {
     cl_object v8;
     v8 = si_make_seq_iterator(2, v6, ecl_make_int8_t(0));
L9:;
     if (v8!=ECL_NIL) {
      goto L11;
     }
     v5item = ECL_NIL;
     goto L5;
L11:;
     {
      cl_object v9;
      v9 = si_seq_iterator_ref(v6, v8);
      T0 = (cl_env_copy->function=ecl_fdefinition(VV[26]))->cfun.entry(1, v9) /*  VV-VALUE */;
      if (Null(ecl_function_dispatch(cl_env_copy,v4test)(2, v1object, T0))){
       goto L13;
      }
      v5item = v9;
      goto L5;
     }
L13:;
     v8 = si_seq_iterator_next(v6, v8);
     goto L9;
    }
   }
L5:;
   if (!(v5item==ECL_NIL)){
    goto L19;
   }
   if (Null(v3errorp)){
    goto L18;
   }
   (cl_env_copy->function=ecl_fdefinition(VV[31]))->cfun.entry(2, VV[32], v1object) /*  CMPERR */;
   goto L18;
L19:;
   if (Null(v2permanent)){
    goto L18;
   }
   ecl_structure_set(v5item,VV[33],(cl_fixnum)(3),ECL_T);
L18:;
   value0 = v5item;
   cl_env_copy->nvalues = 1;
   return value0;
  }
 }
}
/* function definition for PUSH-VV                                            */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3447push_vv(cl_narg narg, ...)
{
 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);
 {
  cl_object v1args;
  cl_object v2permanent_p;
  cl_object v3value;
  ecl_va_list args; ecl_va_start(args,narg,narg,0);
  {
   cl_object keyvars[4];
   cl_parse_key(args,2,L3447push_vvkeys,keyvars,(cl_object*)&v1args,FALSE);
   ecl_va_end(args);
   v2permanent_p = keyvars[0];
   v3value = keyvars[1];
  }
  {
   cl_object v4vv;
   T0 = ecl_fdefinition(VV[36]);
   v4vv = cl_apply(2, T0, v1args);
   {
    cl_object v5;
    v5 = ecl_cmp_symbol_value(cl_env_copy,VV[25]);
    {
     cl_fixnum v6;
     cl_fixnum v7;
     v6 = ((v5)->vector.fillp);
     v7 = ((v5)->array.dim);
     if (!((v6)<(v7))){
      goto L8;
     }
     {
      cl_fixnum v8;
      v8 = ((cl_fixnum)1)+(v6);
      ((v5)->vector.fillp)=(v8);
     }
     ecl_aset_unsafe(v5,v6,v4vv);
     goto L3;
L8:;
     cl_vector_push_extend(2, v4vv, v5);
    }
   }
L3:;
   value0 = v4vv;
   cl_env_copy->nvalues = 1;
   return value0;
  }
 }
}
/* function definition for ADD-OBJECT                                         */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3448add_object(cl_narg narg, 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);
 if (ecl_unlikely(narg<1)) FEwrong_num_arguments(VV[18]);
 {
  cl_object v2duplicate;
  cl_object v3used_p;
  cl_object v4always;
  cl_object v5permanent;
  ecl_va_list args; ecl_va_start(args,v1object,narg,1);
  {
   cl_object keyvars[8];
   cl_parse_key(args,4,L3448add_objectkeys,keyvars,NULL,FALSE);
   ecl_va_end(args);
   v2duplicate = keyvars[0];
   v3used_p = keyvars[1];
   v4always = keyvars[2];
   if (Null(keyvars[7])) {
    value0 = ecl_make_bool(ECL_SYMBOLP(v1object));
    if (value0!=ECL_NIL) {
     goto L3;
    }
    v5permanent = ecl_cmp_symbol_value(cl_env_copy,VV[39]);
    goto L1;
L3:;
    v5permanent = value0;
    goto L1;
L1:;
   } else {
    v5permanent = keyvars[3];
   }
  }
  if ((ecl_cmp_symbol_value(cl_env_copy,VV[40]))==(VV[41])) {
   goto L5;
  }
  (cl_env_copy->function=ecl_fdefinition(VV[31]))->cfun.entry(2, VV[42], ecl_cmp_symbol_value(cl_env_copy,VV[40])) /*  CMPERR */;
L5:;
  {
   cl_object v6item;
   cl_object v7vv;
   v6item = L3446find_vv(5, v1object, VV[21], v5permanent, VV[43], ECL_NIL);
   if (Null(v6item)){
    goto L9;
   }
   if (Null(v2duplicate)){
    goto L9;
   }
   v7vv = L3447push_vv(4, VV[44], v5permanent, ECL_SYM("VALUE",2074), v1object);
   goto L8;
L9:;
   if (Null(v6item)){
    goto L12;
   }
   {
    cl_object v8;
    cl_object v9;
    cl_object v10;
    v8 = ecl_cmp_symbol_value(cl_env_copy,VV[2]);
    v9 = v1object;
    v10 = v8;
    if (Null(ecl_memql(v9,v10))){
     goto L14;
    }
   }
   cl_error(3, VV[11], VV[45], v1object);
L14:;
   v7vv = v6item;
   goto L8;
L12:;
   {
    cl_object v8vv;
    v8vv = L3447push_vv(4, VV[44], v5permanent, ECL_SYM("VALUE",2074), v1object);
    if (!(ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("*COMPILER-CONSTANTS*",1021))==ECL_NIL)){
     goto L20;
    }
    if (Null(si_need_to_make_load_form_p(v1object))){
     goto L20;
    }
    L3444add_load_form(v1object, v8vv);
L20:;
    v7vv = v8vv;
   }
L8:;
   if (Null(v4always)){
    goto L23;
   }
   ecl_structure_set(v7vv,VV[33],(cl_fixnum)(2),ECL_T);
L23:;
   if (v2duplicate!=ECL_NIL) {
    goto L27;
   }
   if (Null(v3used_p)){
    goto L25;
   }
   goto L26;
L27:;
L26:;
   ecl_structure_set(v7vv,VV[33],(cl_fixnum)(1),ECL_T);
L25:;
   value0 = v7vv;
   cl_env_copy->nvalues = 1;
   return value0;
  }
 }
}
/* function definition for ADD-FNAME                                          */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3449add_fname(cl_object v1fname)
{
 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 v2;
  v2 = v1fname;
  if (ECL_LISTP(v2)) {
   goto L4;
  }
  if (ECL_SYMBOLP(v2)) {
   goto L4;
  }
  v1fname = si_do_check_type(v2, VV[48], ECL_NIL, VV[49]);
L4:;
 }
 if (!(ECL_CONSP(v1fname))){
  goto L8;
 }
 T0 = ecl_cadr(v1fname);
 L3448add_object(5, T0, VV[20], ECL_NIL, VV[21], ECL_T);
L8:;
 value0 = L3448add_object(5, v1fname, VV[20], ECL_NIL, VV[21], ECL_T);
 return value0;
}
static cl_object L3449add_fname_va(cl_narg narg, cl_object v2fname, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[47]);
 {
  return L3449add_fname(v2fname);
 }
}
/* function definition for ADD-SYMBOL                                         */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object L3450add_symbol(cl_object v1symbol)
{
 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 v2;
  v2 = v1symbol;
  if (ECL_SYMBOLP(v2)) {
   goto L4;
  }
  v1symbol = si_do_check_type(v2, ECL_SYM("SYMBOL",843), ECL_NIL, ECL_SYM("SYMBOL",843));
L4:;
 }
 value0 = L3448add_object(5, v1symbol, VV[20], ECL_NIL, VV[21], ECL_T);
 return value0;
}
static cl_object L3450add_symbol_va(cl_narg narg, cl_object v2symbol, ...)
{
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[51]);
 {
  return L3450add_symbol(v2symbol);
 }
}
/* local function MAYBE-INIT                                                  */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC3443maybe_init(volatile cl_object *lex0, cl_object volatile v1loc, cl_object volatile v2init)
{
 cl_object T0, T1, T2, T3;
 cl_object volatile env0 = ECL_NIL;
 cl_object volatile CLV0, CLV1;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object volatile value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 {
  volatile cl_object env1 = env0;
  env1 = ECL_NIL;
  CLV0 = env1 = CONS(ECL_NIL,env1);
  {
   volatile cl_object env2 = env1;
   CLV1 = env2 = CONS(ECL_NEW_FRAME_ID(cl_env_copy),env2); /*  TAGBODY        */
   {
    ecl_frs_push(cl_env_copy,ECL_CONS_CAR(CLV1));
    if (__ecl_frs_push_result!=0) {
    if (cl_env_copy->values[0]==ecl_make_int8_t(0)) {
     goto L2;
    }
    ecl_internal_error("GO found an inexistent tag");
    } else {
    {
     cl_object v3;
     v3 = ecl_make_cclosure_va((cl_objectfn)LC3442__lambda12,env2,Cblock,1);
     T0 = v3;
    }
    T1 = CONS(VV[11],T0);
    T2 = ecl_list1(T1);
    T3 = CONS(T2,ecl_cmp_symbol_value(cl_env_copy,ECL_SYM("*HANDLER-CLUSTERS*",6)));
    ecl_bds_bind(cl_env_copy,ECL_SYM("*HANDLER-CLUSTERS*",6),T3); /*  *HANDLER-CLUSTERS* */
    T0 = (cl_env_copy->function=ecl_fdefinition(VV[8]))->cfun.entry(1, v2init) /*  C1EXPR */;
    T1 = (cl_env_copy->function=ecl_fdefinition(VV[5]))->cfun.entry(4, VV[13], VV[7], v1loc, T0) /*  MAKE-C1FORM* */;
    T2 = CONS(T1,ecl_cmp_symbol_value(cl_env_copy,VV[4]));
    ecl_cmp_setq(cl_env_copy,VV[4],T2);
    value0 = ecl_cmp_symbol_value(cl_env_copy,VV[4]);
    cl_env_copy->nvalues = 1;
    ecl_frs_pop_n(cl_env_copy, 1);
    ecl_bds_unwind1(cl_env_copy);
    return value0;
L2:;
    {
     cl_object v3c;
     v3c = ECL_CONS_CAR(CLV0);
     if (Null(ecl_cmp_symbol_value(cl_env_copy,VV[2]))){
      goto L8;
     }
     T0 = CONS(lex0[0],lex0[1]);
     T1 = CONS(T0,ecl_cmp_symbol_value(cl_env_copy,VV[3]));
     ecl_cmp_setq(cl_env_copy,VV[3],T1);
     value0 = ecl_cmp_symbol_value(cl_env_copy,VV[3]);
     cl_env_copy->nvalues = 1;
     ecl_frs_pop_n(cl_env_copy, 1);
     return value0;
L8:;
     value0 = cl_error(1, v3c);
     ecl_frs_pop_n(cl_env_copy, 1);
     return value0;
    }
    }
   }
  }
 }
}
/* closure LAMBDA12                                                           */
/* optimize speed 1, debug 1, space 1, safety 2                               */
static cl_object LC3442__lambda12(cl_narg narg, cl_object v1si__temp, ...)
{
 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;                                     /*  TAGBODY                 */
 CLV0 = _ecl_cdr(CLV1);
 { /* ... closure scanning finished */
 if (ecl_unlikely(narg!=1)) FEwrong_num_arguments(VV[12]);
 {
L1:;
  ECL_CONS_CAR(CLV0) = v1si__temp;
  cl_go(ECL_CONS_CAR(CLV1),ecl_make_fixnum(0));
 }
 }
}
#include "cmp/cmppass1-data.data"
#ifdef __cplusplus
extern "C"
#endif

ECL_DLLEXPORT void _eclggixxmVP9SAq9_GpS0M881(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;CMPPASS1-DATA.LSP.NEWEST",-1);
 return;}
 #ifdef ECL_DYNAMIC_VV
 VV = Cblock->cblock.data;
 #endif
 Cblock->cblock.data_text = (const cl_object *)"@EcLtAg:_eclggixxmVP9SAq9_GpS0M881@";
 VVtemp = Cblock->cblock.temp_data;
 ECL_DEFINE_SETF_FUNCTIONS
/* MAKE-LOAD-FORMs                                                            */
/* TOP-LEVEL-FORMs                                                            */
  si_select_package(_ecl_static_0);
  ecl_cmp_defun(VV[53]);                          /*  ADD-LOAD-FORM           */
  ecl_cmp_defun(VV[54]);                          /*  DATA-EMPTY-LOC          */
  ecl_cmp_defun(VV[55]);                          /*  FIND-VV                 */
  ecl_cmp_defun(VV[56]);                          /*  PUSH-VV                 */
  ecl_cmp_defun(VV[57]);                          /*  ADD-OBJECT              */
  ecl_cmp_defun(VV[58]);                          /*  ADD-FNAME               */
  ecl_cmp_defun(VV[59]);                          /*  ADD-SYMBOL              */
}
