/* Generated by CIL v. 1.3.6 */
/* print_CIL_Input is true */

inline void GC_set_variable_stack1( void ** s ){
	extern void ** GC_stack;
	GC_stack = s;
}

inline void **GC_get_variable_stack1(){
	extern void ** GC_stack;
	return GC_stack;
}

extern struct gc_tag_struct *gc_tag_struct ;

void GC_add_root_tagged(void *v , struct gc_tag_struct * , int size ) ;
struct gc_tag_struct *GC_init_tag(void a(void *x ) , void b(void *x ) ) ;
void GC_add_root(void *x ) ;
void *GC_malloc(struct gc_tag_struct * , int  ) ;
void *GC_find_end_of_object(void *x ) ;
int GC_get_autotagged_case(void *x ) ;
void GC_mark(void *x ) ;
void GC_repair(void *x ) ;
typedef unsigned int size_t;
typedef long long __quad_t;
typedef long __off_t;
typedef __quad_t __off64_t;
struct _IO_FILE;
struct _IO_FILE;
typedef struct _IO_FILE FILE;
typedef void _IO_lock_t;
struct _IO_marker {
   struct _IO_marker *_next ;
   struct _IO_FILE *_sbuf ;
   int _pos ;
};
struct _IO_FILE {
   int _flags ;
   char *_IO_read_ptr ;
   char *_IO_read_end ;
   char *_IO_read_base ;
   char *_IO_write_base ;
   char *_IO_write_ptr ;
   char *_IO_write_end ;
   char *_IO_buf_base ;
   char *_IO_buf_end ;
   char *_IO_save_base ;
   char *_IO_backup_base ;
   char *_IO_save_end ;
   struct _IO_marker *_markers ;
   struct _IO_FILE *_chain ;
   int _fileno ;
   int _flags2 ;
   __off_t _old_offset ;
   unsigned short _cur_column ;
   signed char _vtable_offset ;
   char _shortbuf[1] ;
   _IO_lock_t *_lock ;
   __off64_t _offset ;
   void *__pad1 ;
   void *__pad2 ;
   void *__pad3 ;
   void *__pad4 ;
   size_t __pad5 ;
   int _mode ;
   char _unused2[(15U * sizeof(int ) - 4U * sizeof(void *)) - sizeof(size_t )] ;
};
struct Connector_struct;
struct Connector_struct;
typedef struct Connector_struct Connector;
struct Connector_struct {
   short label ;
   short word ;
   char priority ;
   char multi ;
   Connector *next ;
   char *string ;
};
struct Disjunct_struct;
struct Disjunct_struct;
typedef struct Disjunct_struct Disjunct;
struct Disjunct_struct {
   Disjunct *next ;
   short cost ;
   char marked ;
   char *string ;
   Connector *left ;
   Connector *right ;
};
struct Link_struct;
struct Link_struct;
typedef struct Link_struct Link;
struct Link_struct {
   int l ;
   int r ;
   Connector *lc ;
   Connector *rc ;
   char *name ;
};
struct Exp_struct;
struct Exp_struct;
typedef struct Exp_struct Exp;
struct X_node_struct;
struct X_node_struct;
typedef struct X_node_struct X_node;
struct X_node_struct {
   char *string ;
   Exp *exp ;
   X_node *next ;
};
struct Word_struct;
struct Word_struct;
typedef struct Word_struct Word;
struct Word_struct {
   char string[60] ;
   X_node *x ;
   Disjunct *d ;
};
struct E_list_struct;
struct E_list_struct;
typedef struct E_list_struct E_list;
union __anonunion_u_27 {
   E_list *l ;
   char *string ;
};
struct Exp_struct {
   char type ;
   unsigned char cost ;
   char dir ;
   char multi ;
   union __anonunion_u_27 u ;
};
struct E_list_struct {
   E_list *next ;
   Exp *e ;
};
struct Violation_list_struct;
struct Violation_list_struct;
typedef struct Violation_list_struct Violation_list;
struct Violation_list_struct {
   Violation_list *next ;
   char *string ;
};
struct D_type_list_struct;
struct D_type_list_struct;
typedef struct D_type_list_struct D_type_list;
struct D_type_list_struct {
   D_type_list *next ;
   int type ;
};
struct PP_node_struct;
struct PP_node_struct;
typedef struct PP_node_struct PP_node;
struct PP_node_struct {
   D_type_list **d_type_array ;
   Violation_list *v ;
};
struct Linkage_info_struct;
struct Linkage_info_struct;
typedef struct Linkage_info_struct Linkage_info;
struct Linkage_info_struct {
   int index ;
   short N_violations ;
   short null_cost ;
   short disjunct_cost ;
   short and_cost ;
   short link_cost ;
};
struct List_o_links_struct;
struct List_o_links_struct;
typedef struct List_o_links_struct List_o_links;
struct List_o_links_struct {
   int link ;
   int word ;
   int dir ;
   List_o_links *next ;
};
struct DIS_node_struct;
struct DIS_node_struct;
typedef struct DIS_node_struct DIS_node;
struct CON_node_struct;
struct CON_node_struct;
typedef struct CON_node_struct CON_node;
struct CON_list_struct;
struct CON_list_struct;
typedef struct CON_list_struct CON_list;
struct DIS_list_struct;
struct DIS_list_struct;
typedef struct DIS_list_struct DIS_list;
struct Links_to_patch_struct;
struct Links_to_patch_struct;
typedef struct Links_to_patch_struct Links_to_patch;
struct DIS_node_struct {
   CON_list *cl ;
   List_o_links *lol ;
   int word ;
};
struct CON_node_struct {
   DIS_list *dl ;
   DIS_list *current ;
   int word ;
};
struct DIS_list_struct {
   DIS_list *next ;
   DIS_node *dn ;
};
struct CON_list_struct {
   CON_list *next ;
   CON_node *cn ;
};
struct Links_to_patch_struct {
   Links_to_patch *next ;
   int link ;
   char dir ;
   int new ;
};
struct patch_element_struct;
struct patch_element_struct;
typedef struct patch_element_struct Patch_element;
struct patch_element_struct {
   char used ;
   char changed ;
   int newl ;
   int newr ;
};
struct Word_file_struct;
struct Word_file_struct;
typedef struct Word_file_struct Word_file;
struct Word_file_struct {
   char file[60] ;
   int changed ;
   Word_file *next ;
};
struct Dict_node_struct;
struct Dict_node_struct;
typedef struct Dict_node_struct Dict_node;
struct Dict_node_struct {
   char *string ;
   Word_file *file ;
   Exp *exp ;
   Dict_node *left ;
   Dict_node *right ;
};
struct label_node_struct;
struct label_node_struct;
typedef struct label_node_struct Label_node;
struct label_node_struct {
   int label ;
   Label_node *next ;
};
struct Image_node_struct;
struct Image_node_struct;
typedef struct Image_node_struct Image_node;
struct Image_node_struct {
   Image_node *next ;
   Connector *c ;
   int place ;
};
struct Tconnector_struct;
struct Tconnector_struct;
typedef struct Tconnector_struct Tconnector;
struct Tconnector_struct {
   char multi ;
   char dir ;
   Tconnector *next ;
   char *string ;
};
struct clause_struct;
struct clause_struct;
typedef struct clause_struct Clause;
struct clause_struct {
   Clause *next ;
   int cost ;
   int maxcost ;
   Tconnector *c ;
};
struct Match_node_struct;
struct Match_node_struct;
typedef struct Match_node_struct Match_node;
struct Match_node_struct {
   Match_node *next ;
   Disjunct *d ;
};
struct __anonstruct_user_variable_28 {
   char *s ;
   int *p ;
   int isboolean ;
   char *str ;
};
struct __anonstruct_user_command_29 {
   char *s ;
   char *str ;
};
struct Table_connector;
struct Table_connector;
typedef struct Table_connector Table_connector;
struct Table_connector {
   short lw ;
   short rw ;
   Connector *le ;
   Connector *re ;
   short cost ;
   int count ;
   Table_connector *next ;
};
struct connector_domain_name_pair_struct;
struct connector_domain_name_pair_struct;
typedef struct connector_domain_name_pair_struct CDNP;
struct connector_domain_name_pair_struct {
   char *string ;
   int n ;
};
struct d_tree_leaf_struct;
struct d_tree_leaf_struct;
typedef struct d_tree_leaf_struct D_tree_leaf;
struct domain_struct;
struct domain_struct;
typedef struct domain_struct Domain;
struct domain_struct {
   char *string ;
   int size ;
   List_o_links *lol ;
   int start_link ;
   int type ;
   D_tree_leaf *child ;
   Domain *parent ;
};
struct d_tree_leaf_struct {
   Domain *parent ;
   int link ;
   D_tree_leaf *next ;
};
typedef struct _IO_FILE _IO_FILE;
struct c_list_struct;
struct c_list_struct;
typedef struct c_list_struct C_list;
struct c_list_struct {
   Connector *c ;
   int shallow ;
   C_list *next ;
};
struct string_node_struct;
struct string_node_struct;
typedef struct string_node_struct String_node;
struct string_node_struct {
   char *string ;
   int size ;
   String_node *next ;
};
typedef unsigned int SIZET;
struct __anonstruct_Nuggie_28 {
   SIZET size ;
};
typedef struct __anonstruct_Nuggie_28 Nuggie;
typedef double Align;
#pragma merger(0,"merge/analyze-linkage.i","")
extern struct _IO_FILE *stdout ;
extern int fflush(FILE *__stream ) ;
extern int fprintf(FILE * __restrict  __stream , char const   * __restrict  __format 
                   , ...) ;
extern  __attribute__((__nothrow__)) int strcmp(char const   *__s1 , char const   *__s2 )  __attribute__((__pure__,
__nonnull__(1,2))) ;
Word sentence[250]  ;
int N_null  ;
int N_words  ;
int left_wall_defined  ;
int right_wall_defined  ;
int verbosity ;
int display_on ;
int display_links ;
int display_bad ;
int display_multiple ;
int display_fat ;
Link link_array[497]  ;
Link pp_link_array[497]  ;
int N_links  ;
char *chosen_words[250]  ;
Disjunct *chosen_disjuncts[250]  ;
char is_conjunction[250]  ;
void print_links_graphically(FILE *fp ) ;
void print_links(FILE *fp ) ;
PP_node *post_process(void) ;
int match(Connector *a , Connector *b ) ;
void *xalloc(int size ) ;
void x_free(char *p , int size ) ;
void print_a_link(FILE *fp , int link ) ;
char *intersect_strings(char *s , char *t ) ;
Linkage_info analyze_fat_linkage(int should_print ) ;
Linkage_info analyze_thin_linkage(int should_print ) ;
void free_PP_node(PP_node *p ) ;
void compute_pp_link_array_connectors(void) ;
void left_print_string(FILE *fp , char *s , char *t ) ;
static List_o_links *word_links[250]  ;
void build_digraph(void) 
{ int i ;
  int link ;
  int N_fat ;
  Link *lp ;
  List_o_links *lol ;
  void *tmp ;
  void *tmp___0 ;
  void *__cil_tmp8 ;
  void *__cil_tmp9 ;
  extern struct gc_tag_struct *__gc_struct_List_o_links_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& lp);
  lp = 0;
  simple_gc_frame[3] = (void *)(& lol);
  lol = 0;
  simple_gc_frame[4] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[5] = (void *)(& tmp___0);
  tmp___0 = 0;
  N_fat = 0;
  i = 0;
  while (i < N_words) {
    word_links[i] = (List_o_links *)((void *)0);
    i ++;
  }
  link = 0;
  while (link < N_links) {
    lp = & link_array[link];
    i = (int )(lp->lc)->label;
    if (i < -1) {
      goto __Cont;
    }
    __cil_tmp8 = GC_malloc(__gc_struct_List_o_links_struct_tag, (int )sizeof(List_o_links ));
    tmp = __cil_tmp8;
    lol = (List_o_links *)tmp;
    lol->next = word_links[lp->l];
    word_links[lp->l] = lol;
    lol->link = link;
    lol->word = lp->r;
    i = (int )(lp->lc)->priority;
    if (i == 0) {
      lol->dir = 0;
    } else {
      if (i == 2) {
        lol->dir = 1;
      } else {
        lol->dir = -1;
      }
    }
    __cil_tmp9 = GC_malloc(__gc_struct_List_o_links_struct_tag, (int )sizeof(List_o_links ));
    tmp___0 = __cil_tmp9;
    lol = (List_o_links *)tmp___0;
    lol->next = word_links[lp->r];
    word_links[lp->r] = lol;
    lol->link = link;
    lol->word = lp->l;
    i = (int )(lp->rc)->priority;
    if (i == 0) {
      lol->dir = 0;
    } else {
      if (i == 2) {
        lol->dir = 1;
      } else {
        lol->dir = -1;
      }
    }
    __Cont: 
    link ++;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
static int structure_violation  ;
static int dfs_root_word[250]  ;
int is_CON_word(int w ) 
{ List_o_links *lol ;
  int __retres3 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& lol);
  lol = 0;
  lol = word_links[w];
  while ((unsigned int )lol != (unsigned int )((void *)0)) {
    if (lol->dir == 1) {
      __retres3 = 1;
      goto return_label;
    }
    lol = lol->next;
  }
  __retres3 = 0;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres3);
  }
}
}
DIS_node *build_DIS_node(int w ) ;
CON_list *c_dfs(int w , DIS_node *start_dn , CON_list *c ) ;
CON_node *build_CON_node(int w ) 
{ List_o_links *lol ;
  CON_node *a ;
  DIS_list *d ;
  DIS_list *dx ;
  void *tmp ;
  void *tmp___0 ;
  void *__cil_tmp8 ;
  DIS_node *__cil_tmp9 ;
  void *__cil_tmp10 ;
  extern struct gc_tag_struct *__gc_struct_CON_node_struct_tag ;
  extern struct gc_tag_struct *__gc_struct_DIS_list_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[8] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((6 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& lol);
  lol = 0;
  simple_gc_frame[3] = (void *)(& a);
  a = 0;
  simple_gc_frame[4] = (void *)(& d);
  d = 0;
  simple_gc_frame[5] = (void *)(& dx);
  dx = 0;
  simple_gc_frame[6] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[7] = (void *)(& tmp___0);
  tmp___0 = 0;
  d = (DIS_list *)((void *)0);
  lol = word_links[w];
  while ((unsigned int )lol != (unsigned int )((void *)0)) {
    if (lol->dir == 1) {
      __cil_tmp8 = GC_malloc(__gc_struct_DIS_list_struct_tag, (int )sizeof(DIS_list ));
      tmp = __cil_tmp8;
      dx = (DIS_list *)tmp;
      dx->next = d;
      d = dx;
      __cil_tmp9 = build_DIS_node(lol->word);
      d->dn = __cil_tmp9;
    }
    lol = lol->next;
  }
  __cil_tmp10 = GC_malloc(__gc_struct_CON_node_struct_tag, (int )sizeof(CON_node ));
  tmp___0 = __cil_tmp10;
  a = (CON_node *)tmp___0;
  a->current = d;
  a->dl = a->current;
  a->word = w;
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (a);
  }
}
}
CON_list *c_dfs(int w , DIS_node *start_dn , CON_list *c ) 
{ CON_list *cx ;
  List_o_links *lol ;
  List_o_links *lolx ;
  void *tmp ;
  void *tmp___0 ;
  int tmp___1 ;
  CON_list *__retres10 ;
  void *__cil_tmp11 ;
  CON_list *__cil_tmp12 ;
  int __cil_tmp13 ;
  void *__cil_tmp14 ;
  CON_node *__cil_tmp15 ;
  extern struct gc_tag_struct *__gc_struct_CON_list_struct_tag ;
  extern struct gc_tag_struct *__gc_struct_List_o_links_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[10] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((8 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& cx);
  cx = 0;
  simple_gc_frame[3] = (void *)(& lol);
  lol = 0;
  simple_gc_frame[4] = (void *)(& lolx);
  lolx = 0;
  simple_gc_frame[5] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[6] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[7] = (void *)(& __retres10);
  __retres10 = 0;
  simple_gc_frame[8] = (void *)(& start_dn);
  simple_gc_frame[9] = (void *)(& c);
  if (dfs_root_word[w] != -1) {
    if (dfs_root_word[w] != start_dn->word) {
      structure_violation = 1;
    }
    __retres10 = c;
    goto return_label;
  }
  dfs_root_word[w] = start_dn->word;
  lol = word_links[w];
  while ((unsigned int )lol != (unsigned int )((void *)0)) {
    if (lol->dir < 0) {
      if (dfs_root_word[lol->word] == -1) {
        structure_violation = 1;
      }
    } else {
      if (lol->dir == 0) {
        __cil_tmp11 = GC_malloc(__gc_struct_List_o_links_struct_tag, (int )sizeof(List_o_links ));
        tmp = __cil_tmp11;
        lolx = (List_o_links *)tmp;
        lolx->next = start_dn->lol;
        lolx->link = lol->link;
        start_dn->lol = lolx;
        __cil_tmp12 = c_dfs(lol->word, start_dn, c);
        c = __cil_tmp12;
      }
    }
    lol = lol->next;
  }
  __cil_tmp13 = is_CON_word(w);
  tmp___1 = __cil_tmp13;
  if (tmp___1) {
    __cil_tmp14 = GC_malloc(__gc_struct_CON_list_struct_tag, (int )sizeof(CON_list ));
    tmp___0 = __cil_tmp14;
    cx = (CON_list *)tmp___0;
    cx->next = c;
    c = cx;
    __cil_tmp15 = build_CON_node(w);
    c->cn = __cil_tmp15;
  }
  __retres10 = c;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres10);
  }
}
}
DIS_node *build_DIS_node(int w ) 
{ DIS_node *dn ;
  void *tmp ;
  void *__cil_tmp4 ;
  CON_list *__cil_tmp5 ;
  extern struct gc_tag_struct *__gc_struct_DIS_node_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& dn);
  dn = 0;
  simple_gc_frame[3] = (void *)(& tmp);
  tmp = 0;
  __cil_tmp4 = GC_malloc(__gc_struct_DIS_node_struct_tag, (int )sizeof(DIS_node ));
  tmp = __cil_tmp4;
  dn = (DIS_node *)tmp;
  dn->word = w;
  dn->lol = (List_o_links *)((void *)0);
  __cil_tmp5 = c_dfs(w, dn, (CON_list *)((void *)0));
  dn->cl = __cil_tmp5;
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (dn);
  }
}
}
DIS_node *build_DIS_CON_tree(void) 
{ int w ;
  DIS_node *dnroot ;
  DIS_node *dn ;
  CON_list *child ;
  CON_list *xchild ;
  List_o_links *lol ;
  List_o_links *xlol ;
  DIS_node *__cil_tmp8 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[8] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((6 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& dnroot);
  dnroot = 0;
  simple_gc_frame[3] = (void *)(& dn);
  dn = 0;
  simple_gc_frame[4] = (void *)(& child);
  child = 0;
  simple_gc_frame[5] = (void *)(& xchild);
  xchild = 0;
  simple_gc_frame[6] = (void *)(& lol);
  lol = 0;
  simple_gc_frame[7] = (void *)(& xlol);
  xlol = 0;
  w = 0;
  while (w < N_words) {
    dfs_root_word[w] = -1;
    w ++;
  }
  dnroot = (DIS_node *)((void *)0);
  w = 0;
  while (w < N_words) {
    if (dfs_root_word[w] == -1) {
      __cil_tmp8 = build_DIS_node(w);
      dn = __cil_tmp8;
      if ((unsigned int )dnroot == (unsigned int )((void *)0)) {
        dnroot = dn;
      } else {
        child = dn->cl;
        while ((unsigned int )child != (unsigned int )((void *)0)) {
          xchild = child->next;
          child->next = dnroot->cl;
          dnroot->cl = child;
          child = xchild;
        }
        lol = dn->lol;
        while ((unsigned int )lol != (unsigned int )((void *)0)) {
          xlol = lol->next;
          lol->next = dnroot->lol;
          dnroot->lol = lol;
          lol = xlol;
        }
      }
    }
    w ++;
  }
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (dnroot);
  }
}
}
int advance_CON(CON_node *cn ) ;
int advance_DIS(DIS_node *dn ) 
{ CON_list *cl ;
  int tmp ;
  int __retres4 ;
  int __cil_tmp5 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& cl);
  cl = 0;
  simple_gc_frame[3] = (void *)(& dn);
  cl = dn->cl;
  while ((unsigned int )cl != (unsigned int )((void *)0)) {
    __cil_tmp5 = advance_CON(cl->cn);
    tmp = __cil_tmp5;
    if (tmp) {
      __retres4 = 1;
      goto return_label;
    }
    cl = cl->next;
  }
  __retres4 = 0;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres4);
  }
}
}
int advance_CON(CON_node *cn ) 
{ int tmp ;
  int __retres3 ;
  int __cil_tmp4 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& cn);
  __cil_tmp4 = advance_DIS((cn->current)->dn);
  tmp = __cil_tmp4;
  if (tmp) {
    __retres3 = 1;
    goto return_label;
  } else {
    if ((unsigned int )(cn->current)->next == (unsigned int )((void *)0)) {
      cn->current = cn->dl;
      __retres3 = 0;
      goto return_label;
    } else {
      cn->current = (cn->current)->next;
      __retres3 = 1;
      goto return_label;
    }
  }
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres3);
  }
}
}
static Patch_element patch_array[497]  ;
void fill_patch_array_CON(CON_node *cn , Links_to_patch *ltp ) ;
void fill_patch_array_DIS(DIS_node *dn , Links_to_patch *ltp ) 
{ CON_list *cl ;
  List_o_links *lol ;
  Links_to_patch *ltpx ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[7] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((5 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& cl);
  cl = 0;
  simple_gc_frame[3] = (void *)(& lol);
  lol = 0;
  simple_gc_frame[4] = (void *)(& ltpx);
  ltpx = 0;
  simple_gc_frame[5] = (void *)(& dn);
  simple_gc_frame[6] = (void *)(& ltp);
  lol = dn->lol;
  while ((unsigned int )lol != (unsigned int )((void *)0)) {
    patch_array[lol->link].used = (char)1;
    lol = lol->next;
  }
  if ((unsigned int )dn->cl == (unsigned int )((void *)0)) {
    goto _L;
  } else {
    if (((dn->cl)->cn)->word != dn->word) {
      _L: 
      while ((unsigned int )ltp != (unsigned int )((void *)0)) {
        ltpx = ltp->next;
        patch_array[ltp->link].changed = (char)1;
        if ((int )ltp->dir == 108) {
          patch_array[ltp->link].newl = dn->word;
        } else {
          patch_array[ltp->link].newr = dn->word;
        }
        ltp = ltpx;
      }
    }
  }
  cl = dn->cl;
  while ((unsigned int )cl != (unsigned int )((void *)0)) {
    fill_patch_array_CON(cl->cn, ltp);
    ltp = (Links_to_patch *)((void *)0);
    cl = cl->next;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void fill_patch_array_CON(CON_node *cn , Links_to_patch *ltp ) 
{ List_o_links *lol ;
  Links_to_patch *ltpx ;
  void *tmp ;
  void *__cil_tmp6 ;
  extern struct gc_tag_struct *__gc_struct_Links_to_patch_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[7] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((5 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& lol);
  lol = 0;
  simple_gc_frame[3] = (void *)(& ltpx);
  ltpx = 0;
  simple_gc_frame[4] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[5] = (void *)(& cn);
  simple_gc_frame[6] = (void *)(& ltp);
  lol = word_links[cn->word];
  while ((unsigned int )lol != (unsigned int )((void *)0)) {
    if (lol->dir == 0) {
      __cil_tmp6 = GC_malloc(__gc_struct_Links_to_patch_struct_tag, (int )sizeof(Links_to_patch ));
      tmp = __cil_tmp6;
      ltpx = (Links_to_patch *)tmp;
      ltpx->next = ltp;
      ltp = ltpx;
      ltp->new = cn->word;
      ltp->link = lol->link;
      if (lol->word > cn->word) {
        ltp->dir = (char )'l';
      } else {
        ltp->dir = (char )'r';
      }
    }
    lol = lol->next;
  }
  fill_patch_array_DIS((cn->current)->dn, ltp);

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void free_digraph(void) 
{ List_o_links *lol ;
  List_o_links *lolx ;
  int i ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& lol);
  lol = 0;
  simple_gc_frame[3] = (void *)(& lolx);
  lolx = 0;
  i = 0;
  while (i < N_words) {
    lol = word_links[i];
    while ((unsigned int )lol != (unsigned int )((void *)0)) {
      lolx = lol->next;
      lol = lolx;
    }
    i ++;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void free_CON_tree(CON_node *cn ) ;
void free_DIS_tree(DIS_node *dn ) 
{ List_o_links *lol ;
  List_o_links *lolx ;
  CON_list *cl ;
  CON_list *clx ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[7] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((5 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& lol);
  lol = 0;
  simple_gc_frame[3] = (void *)(& lolx);
  lolx = 0;
  simple_gc_frame[4] = (void *)(& cl);
  cl = 0;
  simple_gc_frame[5] = (void *)(& clx);
  clx = 0;
  simple_gc_frame[6] = (void *)(& dn);
  lol = dn->lol;
  while ((unsigned int )lol != (unsigned int )((void *)0)) {
    lolx = lol->next;
    lol = lolx;
  }
  cl = dn->cl;
  while ((unsigned int )cl != (unsigned int )((void *)0)) {
    clx = cl->next;
    free_CON_tree(cl->cn);
    cl = clx;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void free_CON_tree(CON_node *cn ) 
{ DIS_list *dl ;
  DIS_list *dlx ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& dl);
  dl = 0;
  simple_gc_frame[3] = (void *)(& dlx);
  dlx = 0;
  simple_gc_frame[4] = (void *)(& cn);
  dl = cn->dl;
  while ((unsigned int )dl != (unsigned int )((void *)0)) {
    dlx = dl->next;
    free_DIS_tree(dl->dn);
    dl = dlx;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void print_a_link(FILE *fp , int link ) 
{ int j ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& fp);
  if (pp_link_array[link].l == 0) {
    if (left_wall_defined) {
      left_print_string(fp, (char *)"/////", (char *)"               ");
    } else {
      goto _L;
    }
  } else {
    _L: 
    if (pp_link_array[link].l == N_words - 1) {
      if (right_wall_defined) {
        left_print_string(fp, (char *)"/////", (char *)"               ");
      } else {
        left_print_string(fp, chosen_words[pp_link_array[link].l], (char *)"               ");
      }
    } else {
      left_print_string(fp, chosen_words[pp_link_array[link].l], (char *)"               ");
    }
  }
  left_print_string(fp, (pp_link_array[link].lc)->string, (char *)"     ");
  j = (int )(pp_link_array[link].lc)->label;
  if (j < 0) {
    fprintf((FILE * __restrict  )fp, (char const   * __restrict  )"   ");
  } else {
    fprintf((FILE * __restrict  )fp, (char const   * __restrict  )"%3d", j);
  }
  fprintf((FILE * __restrict  )fp, (char const   * __restrict  )"<---");
  left_print_string(fp, pp_link_array[link].name, (char *)"-----");
  fprintf((FILE * __restrict  )fp, (char const   * __restrict  )"->  ");
  left_print_string(fp, (pp_link_array[link].rc)->string, (char *)"     ");
  j = (int )(pp_link_array[link].rc)->label;
  if (j < 0) {
    fprintf((FILE * __restrict  )fp, (char const   * __restrict  )"   ");
  } else {
    fprintf((FILE * __restrict  )fp, (char const   * __restrict  )"%3d", j);
  }
  fprintf((FILE * __restrict  )fp, (char const   * __restrict  )"  %s", chosen_words[pp_link_array[link].r]);
  fprintf((FILE * __restrict  )fp, (char const   * __restrict  )"\n");

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void print_links(FILE *fp ) 
{ int link ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& fp);
  link = 0;
  while (link < N_links) {
    if (pp_link_array[link].l == -1) {
      goto __Cont;
    }
    fprintf((FILE * __restrict  )fp, (char const   * __restrict  )"       ");
    print_a_link(fp, link);
    __Cont: 
    link ++;
  }
  fprintf((FILE * __restrict  )fp, (char const   * __restrict  )"\n");

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void print_links_and_domains(FILE *fp , PP_node *pp ) 
{ int link ;
  int longest ;
  int j ;
  D_type_list *d ;
  Violation_list *v ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& d);
  d = 0;
  simple_gc_frame[3] = (void *)(& v);
  v = 0;
  simple_gc_frame[4] = (void *)(& fp);
  simple_gc_frame[5] = (void *)(& pp);
  longest = 0;
  link = 0;
  while (link < N_links) {
    if (pp_link_array[link].l == -1) {
      goto __Cont;
    }
    j = 0;
    d = *(pp->d_type_array + link);
    while ((unsigned int )d != (unsigned int )((void *)0)) {
      j ++;
      d = d->next;
    }
    if (j > longest) {
      longest = j;
    }
    __Cont: 
    link ++;
  }
  link = 0;
  while (link < N_links) {
    if (pp_link_array[link].l == -1) {
      goto __Cont___0;
    }
    j = 0;
    d = *(pp->d_type_array + link);
    while ((unsigned int )d != (unsigned int )((void *)0)) {
      fprintf((FILE * __restrict  )fp, (char const   * __restrict  )" (%c)", d->type);
      j ++;
      d = d->next;
    }
    while (j < longest) {
      fprintf((FILE * __restrict  )fp, (char const   * __restrict  )"    ");
      j ++;
    }
    fprintf((FILE * __restrict  )fp, (char const   * __restrict  )"   ");
    print_a_link(fp, link);
    __Cont___0: 
    link ++;
  }
  fprintf((FILE * __restrict  )fp, (char const   * __restrict  )"\n");
  if ((unsigned int )pp->v != (unsigned int )((void *)0)) {
    fprintf((FILE * __restrict  )fp, (char const   * __restrict  )"P.P. violations:\n");
  }
  v = pp->v;
  while ((unsigned int )v != (unsigned int )((void *)0)) {
    fprintf((FILE * __restrict  )fp, (char const   * __restrict  )"        %s\n",
            v->string);
    v = v->next;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
static int visited[250]  ;
static int and_element_sizes[250]  ;
static int N_and_elements  ;
void and_dfs_full(int w ) 
{ List_o_links *lol ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& lol);
  lol = 0;
  if (visited[w]) {

    goto return_label;
  }
  visited[w] = 1;
  (and_element_sizes[N_and_elements]) ++;
  lol = word_links[w];
  while ((unsigned int )lol != (unsigned int )((void *)0)) {
    if (lol->dir >= 0) {
      and_dfs_full(lol->word);
    }
    lol = lol->next;
  }

  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void and_dfs_commas(int w ) 
{ List_o_links *lol ;
  int tmp ;
  int __cil_tmp4 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& lol);
  lol = 0;
  if (visited[w]) {

    goto return_label;
  }
  visited[w] = 1;
  lol = word_links[w];
  while ((unsigned int )lol != (unsigned int )((void *)0)) {
    if (lol->dir == 1) {
      __cil_tmp4 = strcmp((char const   *)(sentence[lol->word].string), ",");
      tmp = __cil_tmp4;
      if (tmp == 0) {
        and_dfs_commas(lol->word);
      } else {
        and_dfs_full(lol->word);
        N_and_elements ++;
      }
    }
    lol = lol->next;
  }

  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
int and_cost(void) 
{ int w ;
  int i ;
  int min ;
  int max ;
  int j ;
  int cost ;
  char *s ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& s);
  s = 0;
  cost = 0;
  w = 0;
  while (w < N_words) {
    s = sentence[w].string;
    if (is_conjunction[w]) {
      N_and_elements = 0;
      i = 0;
      while (i < N_words) {
        visited[i] = 0;
        and_element_sizes[i] = 0;
        i ++;
      }
      if (left_wall_defined) {
        visited[0] = 1;
      }
      and_dfs_commas(w);
      if (N_and_elements > 0) {
        min = 250;
        max = 0;
        i = 0;
        while (i < N_and_elements) {
          j = and_element_sizes[i];
          if (j < min) {
            min = j;
          }
          if (j > max) {
            max = j;
          }
          i ++;
        }
        cost += max - min;
      }
    }
    w ++;
  }
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (cost);
  }
}
}
int cost_for_length(int length ) 
{ int __retres2 ;

  {
  __retres2 = length - 1;
  return (__retres2);
}
}
int link_cost(void) 
{ int lcost ;
  int i ;
  int tmp ;
  int __cil_tmp4 ;

  {
  lcost = 0;
  i = 0;
  while (i < N_links) {
    __cil_tmp4 = cost_for_length(link_array[i].r - link_array[i].l);
    tmp = __cil_tmp4;
    lcost += tmp;
    i ++;
  }
  return (lcost);
}
}
static int null_cost(void) 
{ 

  {
  return (N_null);
}
}
int disjunct_cost(void) 
{ int lcost ;
  int i ;

  {
  lcost = 0;
  i = 0;
  while (i < N_words) {
    if ((unsigned int )chosen_disjuncts[i] != (unsigned int )((void *)0)) {
      lcost += (int )(chosen_disjuncts[i])->cost;
    }
    i ++;
  }
  return (lcost);
}
}
int strictly_smaller_name(char *s , char *t ) 
{ int strictness ;
  int ss ;
  int tt ;
  int __retres6 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& s);
  simple_gc_frame[3] = (void *)(& t);
  strictness = 0;
  while (1) {
    if (! ((int )*s != 0)) {
      if (! ((int )*t != 0)) {
        break;
      }
    }
    if ((int )*s == 0) {
      ss = '*';
    } else {
      ss = (int )*s;
      s ++;
    }
    if ((int )*t == 0) {
      tt = '*';
    } else {
      tt = (int )*t;
      t ++;
    }
    if (ss == tt) {
      continue;
    }
    if (tt == 42) {
      strictness ++;
    } else {
      if (ss == 94) {
        strictness ++;
      } else {
        __retres6 = 0;
        goto return_label;
      }
    }
  }
  __retres6 = strictness > 0;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres6);
  }
}
}
void compute_link_names(void) 
{ int i ;
  char *__cil_tmp2 ;

  {
  i = 0;
  while (i < N_links) {
    __cil_tmp2 = intersect_strings((link_array[i].lc)->string, (link_array[i].rc)->string);
    link_array[i].name = __cil_tmp2;
    i ++;
  }

  return;
}
}
void compute_pp_link_names(void) 
{ int i ;
  char *s ;
  int tmp ;
  int tmp___0 ;
  int __cil_tmp5 ;
  char *__cil_tmp6 ;
  int __cil_tmp7 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& s);
  s = 0;
  i = 0;
  while (i < N_links) {
    if (pp_link_array[i].l == -1) {
      goto __Cont;
    }
    __cil_tmp5 = match(pp_link_array[i].lc, pp_link_array[i].rc);
    tmp___0 = __cil_tmp5;
    if (tmp___0) {
      __cil_tmp6 = intersect_strings((pp_link_array[i].lc)->string, (pp_link_array[i].rc)->string);
      s = __cil_tmp6;
      __cil_tmp7 = strictly_smaller_name(s, link_array[i].name);
      tmp = __cil_tmp7;
      if (tmp) {
        pp_link_array[i].name = link_array[i].name;
      } else {
        pp_link_array[i].name = s;
      }
    } else {
      pp_link_array[i].name = link_array[i].name;
    }
    __Cont: 
    i ++;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
Linkage_info analyze_fat_linkage(int should_print ) 
{ int i ;
  int should_print_messages ;
  Violation_list *v ;
  Linkage_info li ;
  DIS_node *d_root ;
  PP_node *pp ;
  PP_node *accum ;
  D_type_list *dtl0 ;
  D_type_list *dtl1 ;
  int tmp ;
  int tmp___0 ;
  int tmp___1 ;
  int tmp___2 ;
  void *tmp___3 ;
  void *tmp___4 ;
  int tmp___5 ;
  DIS_node *__cil_tmp18 ;
  int __cil_tmp19 ;
  int __cil_tmp20 ;
  int __cil_tmp21 ;
  int __cil_tmp22 ;
  void *__cil_tmp23 ;
  void *__cil_tmp24 ;
  PP_node *__cil_tmp25 ;
  int __cil_tmp26 ;
  extern struct gc_tag_struct *__gcstandard_array_tag ;
  extern struct gc_tag_struct *__gc_struct_PP_node_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[10] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((8 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& v);
  v = 0;
  memset(& li, 0, sizeof(li));
  simple_gc_frame[3] = (void *)(& d_root);
  d_root = 0;
  simple_gc_frame[4] = (void *)(& pp);
  pp = 0;
  simple_gc_frame[5] = (void *)(& accum);
  accum = 0;
  simple_gc_frame[6] = (void *)(& dtl0);
  dtl0 = 0;
  simple_gc_frame[7] = (void *)(& dtl1);
  dtl1 = 0;
  simple_gc_frame[8] = (void *)(& tmp___3);
  tmp___3 = 0;
  simple_gc_frame[9] = (void *)(& tmp___4);
  tmp___4 = 0;
  should_print_messages = 1;
  build_digraph();
  structure_violation = 0;
  __cil_tmp18 = build_DIS_CON_tree();
  d_root = __cil_tmp18;
  li.N_violations = (short)0;
  __cil_tmp19 = disjunct_cost();
  tmp = __cil_tmp19;
  li.disjunct_cost = (short )tmp;
  __cil_tmp20 = null_cost();
  tmp___0 = __cil_tmp20;
  li.null_cost = (short )tmp___0;
  __cil_tmp21 = link_cost();
  tmp___1 = __cil_tmp21;
  li.link_cost = (short )tmp___1;
  if (structure_violation) {
    if (should_print) {
      if (display_multiple) {
        goto _L;
      } else {
        goto _L___1;
      }
    } else {
      goto _L___1;
    }
  } else {
    _L___1: 
    if (should_print) {
      if (display_fat) {
        _L: 
        compute_link_names();
        i = 0;
        while (i < N_links) {
          pp_link_array[i] = link_array[i];
          i ++;
        }
        print_links_graphically(stdout);
        if (display_links) {
          print_links(stdout);
        }
      }
    }
  }
  if (structure_violation) {
    if (display_links) {
      if (display_bad) {
        fprintf((FILE * __restrict  )stdout, (char const   * __restrict  )"And structure violation.\n");
      }
    }
    li.N_violations = (short )((int )li.N_violations + 1);
    li.and_cost = (short)0;
  } else {
    __cil_tmp22 = and_cost();
    tmp___2 = __cil_tmp22;
    li.and_cost = (short )tmp___2;
    compute_link_names();
    __cil_tmp23 = GC_malloc(__gc_struct_PP_node_struct_tag, (int )sizeof(PP_node ));
    tmp___3 = __cil_tmp23;
    accum = (PP_node *)tmp___3;
    __cil_tmp24 = GC_malloc(__gcstandard_array_tag, (int )((unsigned int )N_links * sizeof(D_type_list *)));
    tmp___4 = __cil_tmp24;
    accum->d_type_array = (D_type_list **)tmp___4;
    accum->v = (Violation_list *)((void *)0);
    i = 0;
    while (i < N_links) {
      *(accum->d_type_array + i) = (D_type_list *)((void *)0);
      i ++;
    }
    while (1) {
      i = 0;
      while (i < N_links) {
        patch_array[i].changed = (char)0;
        patch_array[i].used = patch_array[i].changed;
        patch_array[i].newl = link_array[i].l;
        patch_array[i].newr = link_array[i].r;
        pp_link_array[i] = link_array[i];
        i ++;
      }
      fill_patch_array_DIS(d_root, (Links_to_patch *)((void *)0));
      i = 0;
      while (i < N_links) {
        if (patch_array[i].changed) {
          pp_link_array[i].l = patch_array[i].newl;
          pp_link_array[i].r = patch_array[i].newr;
        } else {
          if (patch_array[i].used) {
            pp_link_array[i].l = patch_array[i].newl;
            pp_link_array[i].r = patch_array[i].newr;
          } else {
            if (dfs_root_word[link_array[i].l] != -1) {
              if (dfs_root_word[link_array[i].r] != -1) {
                pp_link_array[i].l = -1;
              }
            }
          }
        }
        i ++;
      }
      compute_pp_link_array_connectors();
      compute_pp_link_names();
      __cil_tmp25 = post_process();
      pp = __cil_tmp25;
      if (display_multiple) {
        if (should_print) {
          print_links_graphically(stdout);
        }
      }
      if ((unsigned int )pp->v == (unsigned int )((void *)0)) {
        i = 0;
        while (i < N_links) {
          if (pp_link_array[i].l == -1) {
            goto __Cont;
          }
          if ((unsigned int )*(accum->d_type_array + i) == (unsigned int )((void *)0)) {
            *(accum->d_type_array + i) = *(pp->d_type_array + i);
            *(pp->d_type_array + i) = (D_type_list *)((void *)0);
          } else {
            dtl0 = *(pp->d_type_array + i);
            dtl1 = *(accum->d_type_array + i);
            while (1) {
              if ((unsigned int )dtl0 != (unsigned int )((void *)0)) {
                if ((unsigned int )dtl1 != (unsigned int )((void *)0)) {
                  if (! (dtl0->type == dtl1->type)) {
                    break;
                  }
                } else {
                  break;
                }
              } else {
                break;
              }
              dtl0 = dtl0->next;
              dtl1 = dtl1->next;
            }
            if ((unsigned int )dtl0 != (unsigned int )((void *)0)) {
              break;
            } else {
              if ((unsigned int )dtl1 != (unsigned int )((void *)0)) {
                break;
              }
            }
          }
          __Cont: 
          i ++;
        }
        if (i != N_links) {
          if (display_links) {
            if (should_print_messages) {
              fprintf((FILE * __restrict  )stdout, (char const   * __restrict  )"Incompatible domain ancestry\n");
              li.N_violations = (short )((int )li.N_violations + 1);
            }
          }
          free_PP_node(pp);
          break;
        }
      } else {
        v = pp->v;
        while ((unsigned int )v != (unsigned int )((void *)0)) {
          li.N_violations = (short )((int )li.N_violations + 1);
          v = v->next;
        }
      }
      free_PP_node(pp);
      __cil_tmp26 = advance_DIS(d_root);
      tmp___5 = __cil_tmp26;
      if (! tmp___5) {
        break;
      }
    }
    if (display_on) {
      if ((int )li.N_violations != 0) {
        if (verbosity > 1) {
          if (should_print_messages) {
            fprintf((FILE * __restrict  )stdout, (char const   * __restrict  )"P.P. violation in one part of conjunction.\n");
          }
        }
      }
    }
    free_PP_node(accum);
  }
  free_digraph();
  free_DIS_tree(d_root);
  if (should_print) {
    fflush(stdout);
  }
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (li);
  }
}
}
Linkage_info analyze_thin_linkage(int should_print ) 
{ int i ;
  Violation_list *v ;
  Linkage_info li ;
  PP_node *pp ;
  int tmp ;
  int tmp___0 ;
  int tmp___1 ;
  PP_node *__cil_tmp9 ;
  int __cil_tmp10 ;
  int __cil_tmp11 ;
  int __cil_tmp12 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& v);
  v = 0;
  memset(& li, 0, sizeof(li));
  simple_gc_frame[3] = (void *)(& pp);
  pp = 0;
  compute_link_names();
  i = 0;
  while (i < N_links) {
    pp_link_array[i] = link_array[i];
    i ++;
  }
  __cil_tmp9 = post_process();
  pp = __cil_tmp9;
  if (display_fat) {
    goto _L;
  } else {
    if (display_multiple) {
      _L: 
      if (should_print) {
        print_links_graphically(stdout);
        if (display_links) {
          print_links_and_domains(stdout, pp);
        }
      }
    }
  }
  li.N_violations = (short)0;
  li.and_cost = (short)0;
  __cil_tmp10 = disjunct_cost();
  tmp = __cil_tmp10;
  li.disjunct_cost = (short )tmp;
  __cil_tmp11 = null_cost();
  tmp___0 = __cil_tmp11;
  li.null_cost = (short )tmp___0;
  __cil_tmp12 = link_cost();
  tmp___1 = __cil_tmp12;
  li.link_cost = (short )tmp___1;
  v = pp->v;
  while ((unsigned int )v != (unsigned int )((void *)0)) {
    li.N_violations = (short )((int )li.N_violations + 1);
    v = v->next;
  }
  free_PP_node(pp);
  if (should_print) {
    fflush(stdout);
  }
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (li);
  }
}
}
#pragma merger(0,"merge/and.i","")
extern int printf(char const   * __restrict  __format  , ...) ;
extern unsigned short const   **__ctype_b_loc(void)  __attribute__((__const__)) ;
extern  __attribute__((__nothrow__)) char *strcpy(char * __restrict  __dest , char const   * __restrict  __src )  __attribute__((__nonnull__(1,2))) ;
extern  __attribute__((__nothrow__)) size_t strlen(char const   *__s )  __attribute__((__pure__,
__nonnull__(1))) ;
extern  __attribute__((__nothrow__, __noreturn__)) void exit(int __status ) ;
int andable_defined  ;
char has_fat_down[250]  ;
unsigned int randtable[256]  ;
Dict_node *dictionary_lookup(char *s ) ;
void free_disjuncts(Disjunct *c ) ;
Disjunct *copy_disjunct(Disjunct *d ) ;
void free_this_string_later(char *s , int size ) ;
Disjunct *build_AND_disjunct_list(char *s ) ;
void free_AND_tables(void) ;
Disjunct *catenate_disjuncts(Disjunct *d1 , Disjunct *d2 ) ;
Disjunct *build_COMMA_disjunct_list(void) ;
Disjunct *explode_disjunct_list(Disjunct *d ) ;
void print_AND_statistics(void) ;
int next_power_of_two_up(int i ) ;
void init_andable_hash_table(void) ;
void build_conjunction_tables(void) ;
int size_of_expression(Exp *e ) ;
int is_canonical_linkage(void) ;
int set_has_fat_down(void) ;
static Label_node *hash_table[1 << 10]  ;
static Disjunct **label_table  ;
static int LT_bound  ;
static int LT_size  ;
static int STAT_N_disjuncts  ;
static int STAT_calls_to_equality_test  ;
void init_LT(void) 
{ void *tmp ;
  void *__cil_tmp2 ;
  extern struct gc_tag_struct *__gcstandard_array_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& tmp);
  tmp = 0;
  LT_bound = 200;
  LT_size = 0;
  __cil_tmp2 = GC_malloc(__gcstandard_array_tag, (int )((unsigned int )LT_bound * sizeof(Disjunct *)));
  tmp = __cil_tmp2;
  label_table = (Disjunct **)tmp;

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void grow_LT(void) 
{ int i ;
  Disjunct **new_table ;
  int new_LT_bound ;
  void *tmp ;
  void *__cil_tmp5 ;
  extern struct gc_tag_struct *__gcstandard_array_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& new_table);
  new_table = 0;
  simple_gc_frame[3] = (void *)(& tmp);
  tmp = 0;
  new_LT_bound = (3 * LT_bound) / 2;
  __cil_tmp5 = GC_malloc(__gcstandard_array_tag, (int )((unsigned int )new_LT_bound * sizeof(Disjunct *)));
  tmp = __cil_tmp5;
  new_table = (Disjunct **)tmp;
  i = 0;
  while (i < LT_bound) {
    *(new_table + i) = *(label_table + i);
    i ++;
  }
  while (i < new_LT_bound) {
    *(new_table + i) = (Disjunct *)((void *)0);
    i ++;
  }
  LT_bound = new_LT_bound;
  label_table = new_table;

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void init_HT(void) 
{ int i ;

  {
  i = 0;
  while (i < 1 << 10) {
    hash_table[i] = (Label_node *)((void *)0);
    i ++;
  }

  return;
}
}
void free_HT(void) 
{ int i ;
  Label_node *la ;
  Label_node *la1 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& la);
  la = 0;
  simple_gc_frame[3] = (void *)(& la1);
  la1 = 0;
  i = 0;
  while (i < 1 << 10) {
    la = hash_table[i];
    while ((unsigned int )la != (unsigned int )((void *)0)) {
      la1 = la->next;
      la = la1;
    }
    hash_table[i] = (Label_node *)((void *)0);
    i ++;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void free_LT(void) 
{ int i ;

  {
  i = 0;
  while (i < LT_size) {
    free_disjuncts(*(label_table + i));
    i ++;
  }
  LT_bound = 0;
  LT_size = 0;
  label_table = (Disjunct **)((void *)0);

  return;
}
}
void free_AND_tables(void) 
{ 

  {
  free_LT();
  free_HT();

  return;
}
}
int and_connector_hash(Connector *c , int i ) 
{ char *s ;
  unsigned short const   **tmp ;
  int __retres5 ;
  unsigned short const   **__cil_tmp6 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& s);
  s = 0;
  simple_gc_frame[3] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[4] = (void *)(& c);
  s = c->string;
  i = (int )((unsigned int )(i + (i << 1)) + randtable[((int )c->label + i) & 255]);
  while (1) {
    __cil_tmp6 = __ctype_b_loc();
    tmp = __cil_tmp6;
    if (! ((int const   )*(*tmp + (int )*s) & 256)) {
      break;
    }
    i = (int )((unsigned int )(i + (i << 1)) + randtable[((int )*s + i) & 255]);
    s ++;
  }
  __retres5 = i & ((1 << 10) - 1);
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres5);
  }
}
}
int and_hash_disjunct(Disjunct *d ) 
{ int i ;
  Connector *e ;
  int __retres4 ;
  int __cil_tmp5 ;
  int __cil_tmp6 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& e);
  e = 0;
  simple_gc_frame[3] = (void *)(& d);
  i = 0;
  e = d->left;
  while ((unsigned int )e != (unsigned int )((void *)0)) {
    __cil_tmp5 = and_connector_hash(e, i);
    i = __cil_tmp5;
    e = e->next;
  }
  i = (int )((unsigned int )(i + (i << 1)) + randtable[i & 255]);
  e = d->right;
  while ((unsigned int )e != (unsigned int )((void *)0)) {
    __cil_tmp6 = and_connector_hash(e, i);
    i = __cil_tmp6;
    e = e->next;
  }
  __retres4 = i & ((1 << 10) - 1);
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres4);
  }
}
}
static int N_andable_hash_table  ;
static Connector **andable_hash_table  ;
int andable_hash(char *s , int d ) 
{ int i ;
  unsigned short const   **tmp ;
  int __retres5 ;
  unsigned short const   **__cil_tmp6 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[3] = (void *)(& s);
  i = d;
  while (1) {
    __cil_tmp6 = __ctype_b_loc();
    tmp = __cil_tmp6;
    if (! ((int const   )*(*tmp + (int )*s) & 256)) {
      break;
    }
    i = (int )((unsigned int )(i + (i << 1)) + randtable[((int )*s + i) & 255]);
    s ++;
  }
  __retres5 = i & (N_andable_hash_table - 1);
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres5);
  }
}
}
void fill_andable_hash_table(Exp *e ) 
{ E_list *l ;
  Connector *c ;
  int h ;
  void *tmp ;
  void *__cil_tmp6 ;
  int __cil_tmp7 ;
  extern struct gc_tag_struct *__gc_struct_Connector_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& l);
  l = 0;
  simple_gc_frame[3] = (void *)(& c);
  c = 0;
  simple_gc_frame[4] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[5] = (void *)(& e);
  if ((int )e->type == 2) {
    __cil_tmp6 = GC_malloc(__gc_struct_Connector_struct_tag, (int )sizeof(Connector ));
    tmp = __cil_tmp6;
    c = (Connector *)tmp;
    c->string = e->u.string;
    c->label = (short)-1;
    c->priority = (char)0;
    c->word = (short )e->dir;
    __cil_tmp7 = andable_hash(c->string, (int )c->word);
    h = __cil_tmp7;
    c->next = *(andable_hash_table + h);
    *(andable_hash_table + h) = c;
  } else {
    l = e->u.l;
    while ((unsigned int )l != (unsigned int )((void *)0)) {
      fill_andable_hash_table(l->e);
      l = l->next;
    }
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void init_andable_hash_table(void) 
{ int i ;
  Exp *e ;
  Dict_node *tmp ;
  int tmp___0 ;
  void *tmp___1 ;
  Dict_node *__cil_tmp6 ;
  int __cil_tmp7 ;
  int __cil_tmp8 ;
  void *__cil_tmp9 ;
  extern struct gc_tag_struct *__gcstandard_array_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& e);
  e = 0;
  simple_gc_frame[3] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[4] = (void *)(& tmp___1);
  tmp___1 = 0;
  __cil_tmp6 = dictionary_lookup((char *)"ANDABLE-CONNECTORS");
  tmp = __cil_tmp6;
  e = tmp->exp;
  __cil_tmp7 = size_of_expression(e);
  tmp___0 = __cil_tmp7;
  __cil_tmp8 = next_power_of_two_up(tmp___0);
  N_andable_hash_table = __cil_tmp8;
  __cil_tmp9 = GC_malloc(__gcstandard_array_tag, (int )((unsigned int )N_andable_hash_table * sizeof(Connector *)));
  tmp___1 = __cil_tmp9;
  andable_hash_table = (Connector **)tmp___1;
  i = 0;
  while (i < N_andable_hash_table) {
    *(andable_hash_table + i) = (Connector *)((void *)0);
    i ++;
  }
  fill_andable_hash_table(e);

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
int is_andable_connector(Connector *c , int d ) 
{ int h ;
  Connector *c1 ;
  int tmp ;
  int __retres6 ;
  int __cil_tmp7 ;
  int __cil_tmp8 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& c1);
  c1 = 0;
  simple_gc_frame[3] = (void *)(& c);
  if (! andable_defined) {
    __retres6 = 1;
    goto return_label;
  }
  __cil_tmp7 = andable_hash(c->string, d);
  h = __cil_tmp7;
  c1 = *(andable_hash_table + h);
  while ((unsigned int )c1 != (unsigned int )((void *)0)) {
    __cil_tmp8 = match(c1, c);
    tmp = __cil_tmp8;
    if (tmp) {
      if (d == (int )c1->word) {
        __retres6 = 1;
        goto return_label;
      }
    }
    c1 = c1->next;
  }
  __retres6 = 0;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres6);
  }
}
}
int is_appropriate(Disjunct *d ) 
{ Connector *c ;
  int tmp ;
  int tmp___0 ;
  int __retres5 ;
  int __cil_tmp6 ;
  int __cil_tmp7 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& c);
  c = 0;
  simple_gc_frame[3] = (void *)(& d);
  c = d->right;
  while ((unsigned int )c != (unsigned int )((void *)0)) {
    __cil_tmp6 = is_andable_connector(c, '+');
    tmp = __cil_tmp6;
    if (! tmp) {
      __retres5 = 0;
      goto return_label;
    }
    c = c->next;
  }
  c = d->left;
  while ((unsigned int )c != (unsigned int )((void *)0)) {
    __cil_tmp7 = is_andable_connector(c, '-');
    tmp___0 = __cil_tmp7;
    if (! tmp___0) {
      __retres5 = 0;
      goto return_label;
    }
    c = c->next;
  }
  __retres5 = 1;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres5);
  }
}
}
int connector_types_equal(Connector *c1 , Connector *c2 ) 
{ char *s ;
  char *t ;
  unsigned short const   **tmp ;
  unsigned short const   **tmp___0 ;
  int __retres7 ;
  unsigned short const   **__cil_tmp8 ;
  unsigned short const   **__cil_tmp9 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[8] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((6 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& s);
  s = 0;
  simple_gc_frame[3] = (void *)(& t);
  t = 0;
  simple_gc_frame[4] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[5] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[6] = (void *)(& c1);
  simple_gc_frame[7] = (void *)(& c2);
  if ((int )c1->label != (int )c2->label) {
    __retres7 = 0;
    goto return_label;
  }
  s = c1->string;
  t = c2->string;
  while (1) {
    __cil_tmp8 = __ctype_b_loc();
    tmp = __cil_tmp8;
    if (! ((int const   )*(*tmp + (int )*s) & 256)) {
      __cil_tmp9 = __ctype_b_loc();
      tmp___0 = __cil_tmp9;
      if (! ((int const   )*(*tmp___0 + (int )*t) & 256)) {
        break;
      }
    }
    if ((int )*s != (int )*t) {
      __retres7 = 0;
      goto return_label;
    }
    s ++;
    t ++;
  }
  __retres7 = 1;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres7);
  }
}
}
int disjunct_types_equal(Disjunct *d1 , Disjunct *d2 ) 
{ Connector *e1 ;
  Connector *e2 ;
  int tmp ;
  int tmp___0 ;
  int __retres7 ;
  int __cil_tmp8 ;
  int __cil_tmp9 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& e1);
  e1 = 0;
  simple_gc_frame[3] = (void *)(& e2);
  e2 = 0;
  simple_gc_frame[4] = (void *)(& d1);
  simple_gc_frame[5] = (void *)(& d2);
  e1 = d1->left;
  e2 = d2->left;
  while (1) {
    if ((unsigned int )e1 != (unsigned int )((void *)0)) {
      if (! ((unsigned int )e2 != (unsigned int )((void *)0))) {
        break;
      }
    } else {
      break;
    }
    __cil_tmp8 = connector_types_equal(e1, e2);
    tmp = __cil_tmp8;
    if (! tmp) {
      break;
    }
    e1 = e1->next;
    e2 = e2->next;
  }
  if ((unsigned int )e1 != (unsigned int )((void *)0)) {
    __retres7 = 0;
    goto return_label;
  } else {
    if ((unsigned int )e2 != (unsigned int )((void *)0)) {
      __retres7 = 0;
      goto return_label;
    }
  }
  e1 = d1->right;
  e2 = d2->right;
  while (1) {
    if ((unsigned int )e1 != (unsigned int )((void *)0)) {
      if (! ((unsigned int )e2 != (unsigned int )((void *)0))) {
        break;
      }
    } else {
      break;
    }
    __cil_tmp9 = connector_types_equal(e1, e2);
    tmp___0 = __cil_tmp9;
    if (! tmp___0) {
      break;
    }
    e1 = e1->next;
    e2 = e2->next;
  }
  if ((unsigned int )e1 != (unsigned int )((void *)0)) {
    __retres7 = 0;
    goto return_label;
  } else {
    if ((unsigned int )e2 != (unsigned int )((void *)0)) {
      __retres7 = 0;
      goto return_label;
    }
  }
  __retres7 = 1;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres7);
  }
}
}
char *intersect_strings(char *s , char *t ) 
{ int len ;
  int i ;
  int j ;
  int d ;
  char *u ;
  char *u0 ;
  char *s0 ;
  int tmp ;
  size_t tmp___0 ;
  size_t tmp___1 ;
  void *tmp___2 ;
  char *__retres14 ;
  int __cil_tmp15 ;
  size_t __cil_tmp16 ;
  size_t __cil_tmp17 ;
  void *__cil_tmp18 ;
  extern struct gc_tag_struct *__gcstandard_atomic_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[9] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((7 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& u);
  u = 0;
  simple_gc_frame[3] = (void *)(& u0);
  u0 = 0;
  simple_gc_frame[4] = (void *)(& s0);
  s0 = 0;
  simple_gc_frame[5] = (void *)(& tmp___2);
  tmp___2 = 0;
  simple_gc_frame[6] = (void *)(& __retres14);
  __retres14 = 0;
  simple_gc_frame[7] = (void *)(& s);
  simple_gc_frame[8] = (void *)(& t);
  __cil_tmp15 = strcmp((char const   *)s, (char const   *)t);
  tmp = __cil_tmp15;
  if (tmp == 0) {
    __retres14 = s;
    goto return_label;
  }
  __cil_tmp16 = strlen((char const   *)s);
  tmp___0 = __cil_tmp16;
  i = (int )tmp___0;
  __cil_tmp17 = strlen((char const   *)t);
  tmp___1 = __cil_tmp17;
  j = (int )tmp___1;
  if (j > i) {
    u = s;
    s = t;
    t = u;
    len = j;
  } else {
    len = i;
  }
  __cil_tmp18 = GC_malloc(__gcstandard_atomic_tag, len + 1);
  tmp___2 = __cil_tmp18;
  u = (char *)tmp___2;
  u0 = u;
  d = 0;
  s0 = s;
  while ((int )*t != 0) {
    if ((int )*s == (int )*t) {
      *u = *s;
    } else {
      if ((int )*t == 42) {
        *u = *s;
      } else {
        d ++;
        if ((int )*s == 42) {
          *u = *t;
        } else {
          *u = (char )'^';
        }
      }
    }
    s ++;
    t ++;
    u ++;
  }
  if (d == 0) {
    __retres14 = s0;
    goto return_label;
  } else {
    strcpy((char * __restrict  )u, (char const   * __restrict  )s);
    free_this_string_later(u0, len + 1);
    __retres14 = u0;
    goto return_label;
  }
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres14);
  }
}
}
int connectors_equal_AND(Connector *c1 , Connector *c2 ) 
{ int tmp ;
  int tmp___0 ;
  int __cil_tmp5 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& c1);
  simple_gc_frame[3] = (void *)(& c2);
  if ((int )c1->label == (int )c2->label) {
    if ((int )c1->multi == (int )c2->multi) {
      __cil_tmp5 = strcmp((char const   *)c1->string, (char const   *)c2->string);
      tmp = __cil_tmp5;
      if (tmp == 0) {
        tmp___0 = 1;
      } else {
        tmp___0 = 0;
      }
    } else {
      tmp___0 = 0;
    }
  } else {
    tmp___0 = 0;
  }
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (tmp___0);
  }
}
}
int disjuncts_equal_AND(Disjunct *d1 , Disjunct *d2 ) 
{ Connector *e1 ;
  Connector *e2 ;
  int tmp ;
  int tmp___0 ;
  int __retres7 ;
  int __cil_tmp8 ;
  int __cil_tmp9 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& e1);
  e1 = 0;
  simple_gc_frame[3] = (void *)(& e2);
  e2 = 0;
  simple_gc_frame[4] = (void *)(& d1);
  simple_gc_frame[5] = (void *)(& d2);
  STAT_calls_to_equality_test ++;
  e1 = d1->left;
  e2 = d2->left;
  while (1) {
    if ((unsigned int )e1 != (unsigned int )((void *)0)) {
      if (! ((unsigned int )e2 != (unsigned int )((void *)0))) {
        break;
      }
    } else {
      break;
    }
    __cil_tmp8 = connectors_equal_AND(e1, e2);
    tmp = __cil_tmp8;
    if (! tmp) {
      break;
    }
    e1 = e1->next;
    e2 = e2->next;
  }
  if ((unsigned int )e1 != (unsigned int )((void *)0)) {
    __retres7 = 0;
    goto return_label;
  } else {
    if ((unsigned int )e2 != (unsigned int )((void *)0)) {
      __retres7 = 0;
      goto return_label;
    }
  }
  e1 = d1->right;
  e2 = d2->right;
  while (1) {
    if ((unsigned int )e1 != (unsigned int )((void *)0)) {
      if (! ((unsigned int )e2 != (unsigned int )((void *)0))) {
        break;
      }
    } else {
      break;
    }
    __cil_tmp9 = connectors_equal_AND(e1, e2);
    tmp___0 = __cil_tmp9;
    if (! tmp___0) {
      break;
    }
    e1 = e1->next;
    e2 = e2->next;
  }
  if ((unsigned int )e1 != (unsigned int )((void *)0)) {
    __retres7 = 0;
    goto return_label;
  } else {
    if ((unsigned int )e2 != (unsigned int )((void *)0)) {
      __retres7 = 0;
      goto return_label;
    }
  }
  __retres7 = 1;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres7);
  }
}
}
Disjunct *intersect_disjuncts(Disjunct *d1 , Disjunct *d2 ) 
{ Disjunct *d ;
  Connector *c1 ;
  Connector *c2 ;
  Connector *c ;
  int tmp ;
  int tmp___0 ;
  Disjunct *__cil_tmp9 ;
  char *__cil_tmp10 ;
  char *__cil_tmp11 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[8] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((6 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& d);
  d = 0;
  simple_gc_frame[3] = (void *)(& c1);
  c1 = 0;
  simple_gc_frame[4] = (void *)(& c2);
  c2 = 0;
  simple_gc_frame[5] = (void *)(& c);
  c = 0;
  simple_gc_frame[6] = (void *)(& d1);
  simple_gc_frame[7] = (void *)(& d2);
  __cil_tmp9 = copy_disjunct(d1);
  d = __cil_tmp9;
  c = d->left;
  c1 = d1->left;
  c2 = d2->left;
  while ((unsigned int )c1 != (unsigned int )((void *)0)) {
    __cil_tmp10 = intersect_strings(c1->string, c2->string);
    c->string = __cil_tmp10;
    if (c1->multi) {
      if (c2->multi) {
        tmp = 1;
      } else {
        tmp = 0;
      }
    } else {
      tmp = 0;
    }
    c->multi = (char )tmp;
    c = c->next;
    c1 = c1->next;
    c2 = c2->next;
  }
  c = d->right;
  c1 = d1->right;
  c2 = d2->right;
  while ((unsigned int )c1 != (unsigned int )((void *)0)) {
    __cil_tmp11 = intersect_strings(c1->string, c2->string);
    c->string = __cil_tmp11;
    if (c1->multi) {
      if (c2->multi) {
        tmp___0 = 1;
      } else {
        tmp___0 = 0;
      }
    } else {
      tmp___0 = 0;
    }
    c->multi = (char )tmp___0;
    c = c->next;
    c1 = c1->next;
    c2 = c2->next;
  }
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (d);
  }
}
}
void put_disjunct_into_table(Disjunct *d ) 
{ Disjunct *d1 ;
  Disjunct *d2 ;
  Disjunct *di ;
  Disjunct *d_copy ;
  Label_node *lp ;
  int h ;
  int k ;
  int tmp ;
  int tmp___0 ;
  int tmp___1 ;
  void *tmp___2 ;
  int __cil_tmp13 ;
  int __cil_tmp14 ;
  int __cil_tmp15 ;
  Disjunct *__cil_tmp16 ;
  Disjunct *__cil_tmp17 ;
  int __cil_tmp18 ;
  Disjunct *__cil_tmp19 ;
  void *__cil_tmp20 ;
  extern struct gc_tag_struct *__gc_struct_label_node_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[9] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((7 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& d1);
  d1 = 0;
  simple_gc_frame[3] = (void *)(& d2);
  d2 = 0;
  simple_gc_frame[4] = (void *)(& di);
  di = 0;
  simple_gc_frame[5] = (void *)(& d_copy);
  d_copy = 0;
  simple_gc_frame[6] = (void *)(& lp);
  lp = 0;
  simple_gc_frame[7] = (void *)(& tmp___2);
  tmp___2 = 0;
  simple_gc_frame[8] = (void *)(& d);
  d1 = (Disjunct *)((void *)0);
  __cil_tmp13 = and_hash_disjunct(d);
  h = __cil_tmp13;
  lp = hash_table[h];
  while ((unsigned int )lp != (unsigned int )((void *)0)) {
    d1 = *(label_table + lp->label);
    __cil_tmp14 = disjunct_types_equal(d, d1);
    tmp = __cil_tmp14;
    if (tmp) {
      break;
    }
    lp = lp->next;
  }
  if ((unsigned int )lp != (unsigned int )((void *)0)) {
    while ((unsigned int )d1 != (unsigned int )((void *)0)) {
      __cil_tmp15 = disjuncts_equal_AND(d1, d);
      tmp___0 = __cil_tmp15;
      if (tmp___0) {

        goto return_label;
      }
      d1 = d1->next;
    }
    __cil_tmp16 = copy_disjunct(d);
    d_copy = __cil_tmp16;
    d_copy->cost = (short)0;
    k = lp->label;
    d2 = (Disjunct *)((void *)0);
    d1 = *(label_table + k);
    while ((unsigned int )d1 != (unsigned int )((void *)0)) {
      __cil_tmp17 = intersect_disjuncts(d_copy, d1);
      di = __cil_tmp17;
      di->next = d2;
      d2 = di;
      d1 = d1->next;
    }
    d_copy->next = *(label_table + k);
    *(label_table + k) = d_copy;
    while ((unsigned int )d2 != (unsigned int )((void *)0)) {
      di = d2->next;
      d1 = *(label_table + k);
      while ((unsigned int )d1 != (unsigned int )((void *)0)) {
        __cil_tmp18 = disjuncts_equal_AND(d1, d2);
        tmp___1 = __cil_tmp18;
        if (tmp___1) {
          break;
        }
        d1 = d1->next;
      }
      if ((unsigned int )d1 == (unsigned int )((void *)0)) {
        STAT_N_disjuncts ++;
        d2->next = *(label_table + k);
        *(label_table + k) = d2;
      } else {
        d2->next = (Disjunct *)((void *)0);
        free_disjuncts(d2);
      }
      d2 = di;
    }
  } else {
    __cil_tmp19 = copy_disjunct(d);
    d_copy = __cil_tmp19;
    d_copy->cost = (short)0;
    d_copy->next = (Disjunct *)((void *)0);
    if (LT_size == LT_bound) {
      grow_LT();
    }
    __cil_tmp20 = GC_malloc(__gc_struct_label_node_struct_tag, (int )sizeof(Label_node ));
    tmp___2 = __cil_tmp20;
    lp = (Label_node *)tmp___2;
    lp->next = hash_table[h];
    hash_table[h] = lp;
    lp->label = LT_size;
    *(label_table + LT_size) = d_copy;
    LT_size ++;
    STAT_N_disjuncts ++;
  }

  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void extract_all_fat_links(Disjunct *d ) 
{ Connector *cl ;
  Connector *cr ;
  Connector *tl ;
  Connector *tr ;
  int tmp ;
  int tmp___0 ;
  int tmp___1 ;
  int __cil_tmp9 ;
  int __cil_tmp10 ;
  int __cil_tmp11 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[7] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((5 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& cl);
  cl = 0;
  simple_gc_frame[3] = (void *)(& cr);
  cr = 0;
  simple_gc_frame[4] = (void *)(& tl);
  tl = 0;
  simple_gc_frame[5] = (void *)(& tr);
  tr = 0;
  simple_gc_frame[6] = (void *)(& d);
  tl = d->left;
  d->left = (Connector *)((void *)0);
  cr = d->right;
  while ((unsigned int )cr != (unsigned int )((void *)0)) {
    tr = cr->next;
    cr->next = (Connector *)((void *)0);
    __cil_tmp9 = is_appropriate(d);
    tmp = __cil_tmp9;
    if (tmp) {
      put_disjunct_into_table(d);
    }
    cr->next = tr;
    cr = cr->next;
  }
  d->left = tl;
  tr = d->right;
  d->right = (Connector *)((void *)0);
  cl = d->left;
  while ((unsigned int )cl != (unsigned int )((void *)0)) {
    tl = cl->next;
    cl->next = (Connector *)((void *)0);
    __cil_tmp10 = is_appropriate(d);
    tmp___0 = __cil_tmp10;
    if (tmp___0) {
      put_disjunct_into_table(d);
    }
    cl->next = tl;
    cl = cl->next;
  }
  d->right = tr;
  cl = d->left;
  while ((unsigned int )cl != (unsigned int )((void *)0)) {
    cr = d->right;
    while ((unsigned int )cr != (unsigned int )((void *)0)) {
      tl = cl->next;
      tr = cr->next;
      cr->next = (Connector *)((void *)0);
      cl->next = cr->next;
      __cil_tmp11 = is_appropriate(d);
      tmp___1 = __cil_tmp11;
      if (tmp___1) {
        put_disjunct_into_table(d);
      }
      cl->next = tl;
      cr->next = tr;
      cr = cr->next;
    }
    cl = cl->next;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
char *stick_in_one_connector(char *s , Connector *c , int len ) 
{ char *t ;
  unsigned short const   **tmp ;
  char *tmp___0 ;
  char *tmp___1 ;
  char *tmp___2 ;
  char *tmp___3 ;
  char *tmp___4 ;
  unsigned short const   **__cil_tmp11 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[11] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((9 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& t);
  t = 0;
  simple_gc_frame[3] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[4] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[5] = (void *)(& tmp___1);
  tmp___1 = 0;
  simple_gc_frame[6] = (void *)(& tmp___2);
  tmp___2 = 0;
  simple_gc_frame[7] = (void *)(& tmp___3);
  tmp___3 = 0;
  simple_gc_frame[8] = (void *)(& tmp___4);
  tmp___4 = 0;
  simple_gc_frame[9] = (void *)(& s);
  simple_gc_frame[10] = (void *)(& c);
  t = c->string;
  while (1) {
    __cil_tmp11 = __ctype_b_loc();
    tmp = __cil_tmp11;
    if (! ((int const   )*(*tmp + (int )*t) & 256)) {
      break;
    }
    t ++;
  }
  while ((int )*t != 0) {
    tmp___0 = s;
    s ++;
    tmp___1 = t;
    t ++;
    *tmp___0 = *tmp___1;
    len --;
  }
  while (len > 0) {
    tmp___2 = s;
    s ++;
    *tmp___2 = (char )'*';
    len --;
  }
  if (c->multi) {
    tmp___3 = s;
    s ++;
    *tmp___3 = (char )'*';
  } else {
    tmp___4 = s;
    s ++;
    *tmp___4 = (char )'^';
  }
  *s = (char )'\000';
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (s);
  }
}
}
void compute_matchers_for_a_label(int k ) 
{ int *lengths ;
  int N_connectors ;
  int i ;
  int j ;
  int tot_len ;
  Connector *c ;
  Disjunct *d ;
  char *s ;
  char *os ;
  void *tmp ;
  unsigned short const   **tmp___0 ;
  size_t tmp___1 ;
  unsigned short const   **tmp___2 ;
  size_t tmp___3 ;
  void *tmp___4 ;
  void *__cil_tmp17 ;
  unsigned short const   **__cil_tmp18 ;
  size_t __cil_tmp19 ;
  unsigned short const   **__cil_tmp20 ;
  size_t __cil_tmp21 ;
  void *__cil_tmp22 ;
  char *__cil_tmp23 ;
  char *__cil_tmp24 ;
  extern struct gc_tag_struct *__gcstandard_atomic_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[11] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((9 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& lengths);
  lengths = 0;
  simple_gc_frame[3] = (void *)(& c);
  c = 0;
  simple_gc_frame[4] = (void *)(& d);
  d = 0;
  simple_gc_frame[5] = (void *)(& s);
  s = 0;
  simple_gc_frame[6] = (void *)(& os);
  os = 0;
  simple_gc_frame[7] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[8] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[9] = (void *)(& tmp___2);
  tmp___2 = 0;
  simple_gc_frame[10] = (void *)(& tmp___4);
  tmp___4 = 0;
  d = *(label_table + k);
  N_connectors = 0;
  c = d->left;
  while ((unsigned int )c != (unsigned int )((void *)0)) {
    N_connectors ++;
    c = c->next;
  }
  c = d->right;
  while ((unsigned int )c != (unsigned int )((void *)0)) {
    N_connectors ++;
    c = c->next;
  }
  __cil_tmp17 = GC_malloc(__gcstandard_atomic_tag, (int )((unsigned int )N_connectors * sizeof(int )));
  tmp = __cil_tmp17;
  lengths = (int *)tmp;
  i = 0;
  while (i < N_connectors) {
    *(lengths + i) = 0;
    i ++;
  }
  while ((unsigned int )d != (unsigned int )((void *)0)) {
    i = 0;
    c = d->left;
    while ((unsigned int )c != (unsigned int )((void *)0)) {
      s = c->string;
      while (1) {
        __cil_tmp18 = __ctype_b_loc();
        tmp___0 = __cil_tmp18;
        if (! ((int const   )*(*tmp___0 + (int )*s) & 256)) {
          break;
        }
        s ++;
      }
      __cil_tmp19 = strlen((char const   *)s);
      tmp___1 = __cil_tmp19;
      j = (int )tmp___1;
      if (j > *(lengths + i)) {
        *(lengths + i) = j;
      }
      i ++;
      c = c->next;
    }
    c = d->right;
    while ((unsigned int )c != (unsigned int )((void *)0)) {
      s = c->string;
      while (1) {
        __cil_tmp20 = __ctype_b_loc();
        tmp___2 = __cil_tmp20;
        if (! ((int const   )*(*tmp___2 + (int )*s) & 256)) {
          break;
        }
        s ++;
      }
      __cil_tmp21 = strlen((char const   *)s);
      tmp___3 = __cil_tmp21;
      j = (int )tmp___3;
      if (j > *(lengths + i)) {
        *(lengths + i) = j;
      }
      i ++;
      c = c->next;
    }
    d = d->next;
  }
  tot_len = 0;
  i = 0;
  while (i < N_connectors) {
    tot_len += *(lengths + i) + 1;
    i ++;
  }
  d = *(label_table + k);
  while ((unsigned int )d != (unsigned int )((void *)0)) {
    i = 0;
    __cil_tmp22 = GC_malloc(__gcstandard_atomic_tag, tot_len + 1);
    tmp___4 = __cil_tmp22;
    s = (char *)tmp___4;
    os = s;
    free_this_string_later(s, tot_len + 1);
    c = d->left;
    while ((unsigned int )c != (unsigned int )((void *)0)) {
      __cil_tmp23 = stick_in_one_connector(s, c, *(lengths + i));
      s = __cil_tmp23;
      i ++;
      c = c->next;
    }
    c = d->right;
    while ((unsigned int )c != (unsigned int )((void *)0)) {
      __cil_tmp24 = stick_in_one_connector(s, c, *(lengths + i));
      s = __cil_tmp24;
      i ++;
      c = c->next;
    }
    d->string = os;
    d = d->next;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void build_conjunction_tables(void) 
{ int w ;
  int k ;
  Disjunct *d ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& d);
  d = 0;
  init_HT();
  init_LT();
  STAT_calls_to_equality_test = 0;
  STAT_N_disjuncts = STAT_calls_to_equality_test;
  w = 0;
  while (w < N_words) {
    d = sentence[w].d;
    while ((unsigned int )d != (unsigned int )((void *)0)) {
      extract_all_fat_links(d);
      d = d->next;
    }
    w ++;
  }
  k = 0;
  while (k < LT_size) {
    compute_matchers_for_a_label(k);
    k ++;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void print_AND_statistics(void) 
{ 

  {
  printf((char const   * __restrict  )"Number of disjunct types (labels): %d\n", LT_size);
  printf((char const   * __restrict  )"Number of disjuncts in the table: %d\n", STAT_N_disjuncts);
  printf((char const   * __restrict  )"average list length: %f\n", (float )STAT_N_disjuncts / (float )LT_size);
  printf((char const   * __restrict  )"Number of equality tests: %d\n", STAT_calls_to_equality_test);

  return;
}
}
void connector_for_disjunct(Disjunct *d , Connector *c ) 
{ int h ;
  Disjunct *d1 ;
  Label_node *lp ;
  int tmp ;
  int tmp___0 ;
  int __cil_tmp8 ;
  int __cil_tmp9 ;
  int __cil_tmp10 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& d1);
  d1 = 0;
  simple_gc_frame[3] = (void *)(& lp);
  lp = 0;
  simple_gc_frame[4] = (void *)(& d);
  simple_gc_frame[5] = (void *)(& c);
  d1 = (Disjunct *)((void *)0);
  __cil_tmp8 = and_hash_disjunct(d);
  h = __cil_tmp8;
  lp = hash_table[h];
  while ((unsigned int )lp != (unsigned int )((void *)0)) {
    d1 = *(label_table + lp->label);
    __cil_tmp9 = disjunct_types_equal(d, d1);
    tmp = __cil_tmp9;
    if (tmp) {
      break;
    }
    lp = lp->next;
  }
  if (! ((unsigned int )lp != (unsigned int )((void *)0))) {
    printf((char const   * __restrict  )"Assertion failed: %s\n", "A disjunct I inserted was not there. (1)");
    exit(1);
  }
  while ((unsigned int )d1 != (unsigned int )((void *)0)) {
    __cil_tmp10 = disjuncts_equal_AND(d1, d);
    tmp___0 = __cil_tmp10;
    if (tmp___0) {
      break;
    }
    d1 = d1->next;
  }
  if (! ((unsigned int )d1 != (unsigned int )((void *)0))) {
    printf((char const   * __restrict  )"Assertion failed: %s\n", "A disjunct I inserted was not there. (2)");
    exit(1);
  }
  c->label = (short )lp->label;
  c->string = d1->string;
  c->priority = (char)1;
  c->multi = (char)0;

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
Disjunct *build_fat_link_substitutions(Disjunct *d ) 
{ Connector *cl ;
  Connector *cr ;
  Connector *tl ;
  Connector *tr ;
  Connector *wc ;
  Connector work_connector ;
  Disjunct *d1 ;
  Disjunct *wd ;
  Disjunct work_disjunct ;
  Disjunct *d_list ;
  int tmp ;
  int tmp___0 ;
  int tmp___1 ;
  Disjunct *__retres15 ;
  int __cil_tmp16 ;
  Disjunct *__cil_tmp17 ;
  Disjunct *__cil_tmp18 ;
  int __cil_tmp19 ;
  Disjunct *__cil_tmp20 ;
  Disjunct *__cil_tmp21 ;
  int __cil_tmp22 ;
  Disjunct *__cil_tmp23 ;
  Disjunct *__cil_tmp24 ;
  extern struct gc_tag_struct *__gc_struct_Disjunct_struct_tag ;
  extern struct gc_tag_struct *__gc_struct_Connector_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[12] ;
  void *struct_gc_frame[10] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((10 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  memset(& struct_gc_frame, 0, sizeof(struct_gc_frame));
  struct_gc_frame[0] = (void *)simple_gc_frame;
  struct_gc_frame[1] = (void *)((2 << 2) + 3);
  GC_set_variable_stack1(struct_gc_frame);
  simple_gc_frame[2] = (void *)(& cl);
  cl = 0;
  simple_gc_frame[3] = (void *)(& cr);
  cr = 0;
  simple_gc_frame[4] = (void *)(& tl);
  tl = 0;
  simple_gc_frame[5] = (void *)(& tr);
  tr = 0;
  simple_gc_frame[6] = (void *)(& wc);
  wc = 0;
  struct_gc_frame[2] = (void *)(& work_connector);
  struct_gc_frame[3] = (void *)__gc_struct_Connector_struct_tag;
  struct_gc_frame[4] = 0;
  struct_gc_frame[5] = 0;
  memset(& work_connector, 0, sizeof(work_connector));
  simple_gc_frame[7] = (void *)(& d1);
  d1 = 0;
  simple_gc_frame[8] = (void *)(& wd);
  wd = 0;
  struct_gc_frame[6] = (void *)(& work_disjunct);
  struct_gc_frame[7] = (void *)__gc_struct_Disjunct_struct_tag;
  struct_gc_frame[8] = 0;
  struct_gc_frame[9] = 0;
  memset(& work_disjunct, 0, sizeof(work_disjunct));
  simple_gc_frame[9] = (void *)(& d_list);
  d_list = 0;
  simple_gc_frame[10] = (void *)(& __retres15);
  __retres15 = 0;
  simple_gc_frame[11] = (void *)(& d);
  if ((unsigned int )d == (unsigned int )((void *)0)) {
    __retres15 = (Disjunct *)((void *)0);
    goto return_label;
  }
  wd = & work_disjunct;
  wc = & work_connector;
  d_list = (Disjunct *)((void *)0);
  *wd = *d;
  tl = d->left;
  d->left = (Connector *)((void *)0);
  cr = d->right;
  while ((unsigned int )cr != (unsigned int )((void *)0)) {
    tr = cr->next;
    cr->next = (Connector *)((void *)0);
    __cil_tmp16 = is_appropriate(d);
    tmp = __cil_tmp16;
    if (tmp) {
      connector_for_disjunct(d, wc);
      wd->left = tl;
      wd->right = wc;
      wc->next = tr;
      __cil_tmp17 = copy_disjunct(wd);
      d1 = __cil_tmp17;
      d1->next = d_list;
      d_list = d1;
      wd->left = wc;
      wc->next = tl;
      wd->right = tr;
      __cil_tmp18 = copy_disjunct(wd);
      d1 = __cil_tmp18;
      d1->next = d_list;
      d_list = d1;
    }
    cr->next = tr;
    cr = cr->next;
  }
  d->left = tl;
  tr = d->right;
  d->right = (Connector *)((void *)0);
  cl = d->left;
  while ((unsigned int )cl != (unsigned int )((void *)0)) {
    tl = cl->next;
    cl->next = (Connector *)((void *)0);
    __cil_tmp19 = is_appropriate(d);
    tmp___0 = __cil_tmp19;
    if (tmp___0) {
      connector_for_disjunct(d, wc);
      wd->left = tl;
      wd->right = wc;
      wc->next = tr;
      __cil_tmp20 = copy_disjunct(wd);
      d1 = __cil_tmp20;
      d1->next = d_list;
      d_list = d1;
      wd->left = wc;
      wc->next = tl;
      wd->right = tr;
      __cil_tmp21 = copy_disjunct(wd);
      d1 = __cil_tmp21;
      d1->next = d_list;
      d_list = d1;
    }
    cl->next = tl;
    cl = cl->next;
  }
  d->right = tr;
  cl = d->left;
  while ((unsigned int )cl != (unsigned int )((void *)0)) {
    cr = d->right;
    while ((unsigned int )cr != (unsigned int )((void *)0)) {
      tl = cl->next;
      tr = cr->next;
      cr->next = (Connector *)((void *)0);
      cl->next = cr->next;
      __cil_tmp22 = is_appropriate(d);
      tmp___1 = __cil_tmp22;
      if (tmp___1) {
        connector_for_disjunct(d, wc);
        wd->left = tl;
        wd->right = wc;
        wc->next = tr;
        __cil_tmp23 = copy_disjunct(wd);
        d1 = __cil_tmp23;
        d1->next = d_list;
        d_list = d1;
        wd->left = wc;
        wc->next = tl;
        wd->right = tr;
        __cil_tmp24 = copy_disjunct(wd);
        d1 = __cil_tmp24;
        d1->next = d_list;
        d_list = d1;
      }
      cl->next = tl;
      cr->next = tr;
      cr = cr->next;
    }
    cl = cl->next;
  }
  __retres15 = d_list;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres15);
  }
}
}
Disjunct *explode_disjunct_list(Disjunct *d ) 
{ Disjunct *d1 ;
  Disjunct *tmp ;
  Disjunct *__cil_tmp4 ;
  Disjunct *__cil_tmp5 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& d1);
  d1 = 0;
  simple_gc_frame[3] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[4] = (void *)(& d);
  d1 = (Disjunct *)((void *)0);
  while ((unsigned int )d != (unsigned int )((void *)0)) {
    __cil_tmp4 = build_fat_link_substitutions(d);
    tmp = __cil_tmp4;
    __cil_tmp5 = catenate_disjuncts(d1, tmp);
    d1 = __cil_tmp5;
    d = d->next;
  }
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (d1);
  }
}
}
Disjunct *build_COMMA_disjunct_list(void) 
{ int lab ;
  Disjunct *d1 ;
  Disjunct *d2 ;
  Disjunct *d ;
  Disjunct work_disjunct ;
  Disjunct *wd ;
  Connector work_connector1 ;
  Connector work_connector2 ;
  Connector *c1 ;
  Connector *c2 ;
  Connector work_connector3 ;
  Connector *c3 ;
  Disjunct *__cil_tmp13 ;
  extern struct gc_tag_struct *__gc_struct_Connector_struct_tag ;
  extern struct gc_tag_struct *__gc_struct_Disjunct_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[9] ;
  void *struct_gc_frame[18] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((7 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  memset(& struct_gc_frame, 0, sizeof(struct_gc_frame));
  struct_gc_frame[0] = (void *)simple_gc_frame;
  struct_gc_frame[1] = (void *)((4 << 2) + 3);
  GC_set_variable_stack1(struct_gc_frame);
  simple_gc_frame[2] = (void *)(& d1);
  d1 = 0;
  simple_gc_frame[3] = (void *)(& d2);
  d2 = 0;
  simple_gc_frame[4] = (void *)(& d);
  d = 0;
  struct_gc_frame[2] = (void *)(& work_disjunct);
  struct_gc_frame[3] = (void *)__gc_struct_Disjunct_struct_tag;
  struct_gc_frame[4] = 0;
  struct_gc_frame[5] = 0;
  memset(& work_disjunct, 0, sizeof(work_disjunct));
  simple_gc_frame[5] = (void *)(& wd);
  wd = 0;
  struct_gc_frame[6] = (void *)(& work_connector1);
  struct_gc_frame[7] = (void *)__gc_struct_Connector_struct_tag;
  struct_gc_frame[8] = 0;
  struct_gc_frame[9] = 0;
  memset(& work_connector1, 0, sizeof(work_connector1));
  struct_gc_frame[10] = (void *)(& work_connector2);
  struct_gc_frame[11] = (void *)__gc_struct_Connector_struct_tag;
  struct_gc_frame[12] = 0;
  struct_gc_frame[13] = 0;
  memset(& work_connector2, 0, sizeof(work_connector2));
  simple_gc_frame[6] = (void *)(& c1);
  c1 = 0;
  simple_gc_frame[7] = (void *)(& c2);
  c2 = 0;
  struct_gc_frame[14] = (void *)(& work_connector3);
  struct_gc_frame[15] = (void *)__gc_struct_Connector_struct_tag;
  struct_gc_frame[16] = 0;
  struct_gc_frame[17] = 0;
  memset(& work_connector3, 0, sizeof(work_connector3));
  simple_gc_frame[8] = (void *)(& c3);
  c3 = 0;
  c1 = & work_connector1;
  c2 = & work_connector2;
  c3 = & work_connector3;
  wd = & work_disjunct;
  d1 = (Disjunct *)((void *)0);
  c1->next = (Connector *)((void *)0);
  c2->next = c3;
  c3->next = (Connector *)((void *)0);
  c3->priority = (char)2;
  c1->priority = c3->priority;
  c2->priority = (char)1;
  c3->multi = (char)0;
  c2->multi = c3->multi;
  c1->multi = c2->multi;
  wd->left = c1;
  wd->right = c2;
  wd->string = (char *)",";
  wd->next = (Disjunct *)((void *)0);
  wd->cost = (short)0;
  lab = 0;
  while (lab < LT_size) {
    d = *(label_table + lab);
    while ((unsigned int )d != (unsigned int )((void *)0)) {
      c3->string = d->string;
      c2->string = c3->string;
      c1->string = c2->string;
      c3->label = (short )lab;
      c2->label = c3->label;
      c1->label = c2->label;
      __cil_tmp13 = copy_disjunct(wd);
      d2 = __cil_tmp13;
      d2->next = d1;
      d1 = d2;
      d = d->next;
    }
    lab ++;
  }
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (d1);
  }
}
}
Disjunct *build_AND_disjunct_list(char *s ) 
{ int lab ;
  Disjunct *d_list ;
  Disjunct *d1 ;
  Disjunct *d3 ;
  Disjunct *d ;
  Disjunct *d_copy ;
  Connector *c1 ;
  Connector *c2 ;
  Connector *c3 ;
  void *tmp ;
  void *tmp___0 ;
  int tmp___1 ;
  int tmp___2 ;
  int tmp___3 ;
  Disjunct *__cil_tmp16 ;
  Disjunct *__cil_tmp17 ;
  void *__cil_tmp18 ;
  void *__cil_tmp19 ;
  int __cil_tmp20 ;
  int __cil_tmp21 ;
  int __cil_tmp22 ;
  extern struct gc_tag_struct *__gc_struct_Connector_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[13] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((11 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& d_list);
  d_list = 0;
  simple_gc_frame[3] = (void *)(& d1);
  d1 = 0;
  simple_gc_frame[4] = (void *)(& d3);
  d3 = 0;
  simple_gc_frame[5] = (void *)(& d);
  d = 0;
  simple_gc_frame[6] = (void *)(& d_copy);
  d_copy = 0;
  simple_gc_frame[7] = (void *)(& c1);
  c1 = 0;
  simple_gc_frame[8] = (void *)(& c2);
  c2 = 0;
  simple_gc_frame[9] = (void *)(& c3);
  c3 = 0;
  simple_gc_frame[10] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[11] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[12] = (void *)(& s);
  d_list = (Disjunct *)((void *)0);
  lab = 0;
  while (lab < LT_size) {
    d = *(label_table + lab);
    while ((unsigned int )d != (unsigned int )((void *)0)) {
      __cil_tmp16 = build_fat_link_substitutions(d);
      d1 = __cil_tmp16;
      __cil_tmp17 = copy_disjunct(d);
      d_copy = __cil_tmp17;
      d_copy->next = d1;
      d1 = d_copy;
      while ((unsigned int )d1 != (unsigned int )((void *)0)) {
        d3 = d1->next;
        __cil_tmp18 = GC_malloc(__gc_struct_Connector_struct_tag, (int )sizeof(Connector ));
        tmp = __cil_tmp18;
        c1 = (Connector *)tmp;
        __cil_tmp19 = GC_malloc(__gc_struct_Connector_struct_tag, (int )sizeof(Connector ));
        tmp___0 = __cil_tmp19;
        c2 = (Connector *)tmp___0;
        c1->next = (Connector *)((void *)0);
        c2->next = (Connector *)((void *)0);
        c2->priority = (char)2;
        c1->priority = c2->priority;
        c2->multi = (char)0;
        c1->multi = c2->multi;
        c2->string = d->string;
        c1->string = c2->string;
        c2->label = (short )lab;
        c1->label = c2->label;
        d1->string = s;
        if ((unsigned int )d1->right == (unsigned int )((void *)0)) {
          d1->right = c2;
        } else {
          c3 = d1->right;
          while ((unsigned int )c3->next != (unsigned int )((void *)0)) {
            c3 = c3->next;
          }
          c3->next = c2;
        }
        if ((unsigned int )d1->left == (unsigned int )((void *)0)) {
          d1->left = c1;
        } else {
          c3 = d1->left;
          while ((unsigned int )c3->next != (unsigned int )((void *)0)) {
            c3 = c3->next;
          }
          c3->next = c1;
        }
        d1->next = d_list;
        d_list = d1;
        d1 = d3;
      }
      d = d->next;
    }
    lab ++;
  }
  __cil_tmp20 = strcmp((char const   *)s, "and");
  tmp___3 = __cil_tmp20;
  if (tmp___3 == 0) {
    d1 = d_list;
    while ((unsigned int )d1 != (unsigned int )((void *)0)) {
      c1 = d1->right;
      while ((unsigned int )c1 != (unsigned int )((void *)0)) {
        if ((int )*(c1->string + 0) == 83) {
          if ((int )*(c1->string + 1) == 94) {
            c1->string = (char *)"Sp";
          } else {
            if ((int )*(c1->string + 1) == 115) {
              c1->string = (char *)"Sp";
            } else {
              if ((int )*(c1->string + 1) == 112) {
                c1->string = (char *)"Sp";
              } else {
                if ((int )*(c1->string + 1) == 0) {
                  c1->string = (char *)"Sp";
                }
              }
            }
          }
        }
        c1 = c1->next;
      }
      c1 = d1->left;
      while ((unsigned int )c1 != (unsigned int )((void *)0)) {
        if ((int )*(c1->string + 0) == 83) {
          if ((int )*(c1->string + 1) == 73) {
            if ((int )*(c1->string + 2) == 94) {
              c1->string = (char *)"SIp";
            } else {
              if ((int )*(c1->string + 2) == 115) {
                c1->string = (char *)"SIp";
              } else {
                if ((int )*(c1->string + 2) == 112) {
                  c1->string = (char *)"SIp";
                } else {
                  if ((int )*(c1->string + 2) == 0) {
                    c1->string = (char *)"SIp";
                  }
                }
              }
            }
          }
        }
        c1 = c1->next;
      }
      d1 = d1->next;
    }
  } else {
    __cil_tmp21 = strcmp((char const   *)s, "nor");
    tmp___1 = __cil_tmp21;
    if (tmp___1 == 0) {
      goto _L;
    } else {
      __cil_tmp22 = strcmp((char const   *)s, "or");
      tmp___2 = __cil_tmp22;
      if (tmp___2 == 0) {
        _L: 
        d1 = d_list;
        while ((unsigned int )d1 != (unsigned int )((void *)0)) {
          c1 = d1->right;
          while ((unsigned int )c1 != (unsigned int )((void *)0)) {
            if ((int )*(c1->string + 0) == 83) {
              if ((int )*(c1->string + 1) == 94) {
                c1->string = (char *)"S";
              } else {
                if ((int )*(c1->string + 1) == 115) {
                  c1->string = (char *)"S";
                } else {
                  if ((int )*(c1->string + 1) == 112) {
                    c1->string = (char *)"S";
                  }
                }
              }
            }
            c1 = c1->next;
          }
          c1 = d1->left;
          while ((unsigned int )c1 != (unsigned int )((void *)0)) {
            if ((int )*(c1->string + 0) == 83) {
              if ((int )*(c1->string + 1) == 73) {
                if ((int )*(c1->string + 2) == 94) {
                  c1->string = (char *)"SI";
                } else {
                  if ((int )*(c1->string + 2) == 115) {
                    c1->string = (char *)"SI";
                  } else {
                    if ((int )*(c1->string + 2) == 112) {
                      c1->string = (char *)"SI";
                    }
                  }
                }
              }
            }
            c1 = c1->next;
          }
          d1 = d1->next;
        }
      }
    }
  }
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (d_list);
  }
}
}
Image_node *image_array[250]  ;
int set_has_fat_down(void) 
{ int link ;
  int w ;
  int N_fat ;
  int __retres4 ;

  {
  N_fat = 0;
  w = 0;
  while (w < N_words) {
    has_fat_down[w] = (char)0;
    w ++;
  }
  link = 0;
  while (link < N_links) {
    if ((int )(link_array[link].lc)->priority == 2) {
      N_fat ++;
      has_fat_down[link_array[link].l] = (char)1;
    } else {
      if ((int )(link_array[link].rc)->priority == 2) {
        N_fat ++;
        has_fat_down[link_array[link].r] = (char)1;
      }
    }
    link ++;
  }
  __retres4 = N_fat > 0;
  return (__retres4);
}
}
void free_image_array(void) 
{ int w ;
  Image_node *in ;
  Image_node *inx ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& in);
  in = 0;
  simple_gc_frame[3] = (void *)(& inx);
  inx = 0;
  w = 0;
  while (w < N_words) {
    in = image_array[w];
    while ((unsigned int )in != (unsigned int )((void *)0)) {
      inx = in->next;
      in = inx;
    }
    w ++;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void build_image_array(void) 
{ int link ;
  int end ;
  int word ;
  Connector *this_end_con ;
  Connector *other_end_con ;
  Connector *upcon ;
  Connector *updiscon ;
  Connector *clist ;
  Disjunct *dis ;
  Disjunct *updis ;
  Image_node *in ;
  void *tmp ;
  void *__cil_tmp13 ;
  extern struct gc_tag_struct *__gc_struct_Image_node_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[11] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((9 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& this_end_con);
  this_end_con = 0;
  simple_gc_frame[3] = (void *)(& other_end_con);
  other_end_con = 0;
  simple_gc_frame[4] = (void *)(& upcon);
  upcon = 0;
  simple_gc_frame[5] = (void *)(& updiscon);
  updiscon = 0;
  simple_gc_frame[6] = (void *)(& clist);
  clist = 0;
  simple_gc_frame[7] = (void *)(& dis);
  dis = 0;
  simple_gc_frame[8] = (void *)(& updis);
  updis = 0;
  simple_gc_frame[9] = (void *)(& in);
  in = 0;
  simple_gc_frame[10] = (void *)(& tmp);
  tmp = 0;
  word = 0;
  while (word < N_words) {
    image_array[word] = (Image_node *)((void *)0);
    word ++;
  }
  end = -1;
  while (end <= 1) {
    link = 0;
    while (link < N_links) {
      if (end < 0) {
        word = link_array[link].l;
        if (! has_fat_down[word]) {
          goto __Cont;
        }
        this_end_con = link_array[link].lc;
        other_end_con = link_array[link].rc;
        dis = chosen_disjuncts[word];
        clist = dis->right;
      } else {
        word = link_array[link].r;
        if (! has_fat_down[word]) {
          goto __Cont;
        }
        this_end_con = link_array[link].rc;
        other_end_con = link_array[link].lc;
        dis = chosen_disjuncts[word];
        clist = dis->left;
      }
      if ((int )this_end_con->priority == 2) {
        goto __Cont;
      }
      if ((int )this_end_con->label != -1) {
        if ((int )this_end_con->label < 0) {
          goto __Cont;
        }
      }
      __cil_tmp13 = GC_malloc(__gc_struct_Image_node_struct_tag, (int )sizeof(Image_node ));
      tmp = __cil_tmp13;
      in = (Image_node *)tmp;
      in->next = image_array[word];
      image_array[word] = in;
      in->c = other_end_con;
      if ((int )this_end_con->priority == 1) {
        in->place = 0;
      } else {
        in->place = 1;
        if ((unsigned int )dis->left != (unsigned int )((void *)0)) {
          if ((int )(dis->left)->priority == 1) {
            upcon = dis->left;
          } else {
            goto _L;
          }
        } else {
          _L: 
          if ((unsigned int )dis->right != (unsigned int )((void *)0)) {
            if ((int )(dis->right)->priority == 1) {
              upcon = dis->right;
            } else {
              upcon = (Connector *)((void *)0);
            }
          } else {
            upcon = (Connector *)((void *)0);
          }
        }
        if ((unsigned int )upcon != (unsigned int )((void *)0)) {
          updis = *(label_table + (int )upcon->label);
          if (end > 0) {
            updiscon = updis->left;
          } else {
            updiscon = updis->right;
          }
          while ((unsigned int )updiscon != (unsigned int )((void *)0)) {
            (in->place) ++;
            updiscon = updiscon->next;
          }
        }
        while ((unsigned int )clist != (unsigned int )this_end_con) {
          if ((int )clist->label < 0) {
            (in->place) ++;
          }
          clist = clist->next;
        }
        in->place *= - end;
      }
      __Cont: 
      link ++;
    }
    end += 2;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
int strictly_smaller(char *s , char *t ) 
{ int strictness ;
  int __retres4 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& s);
  simple_gc_frame[3] = (void *)(& t);
  strictness = 0;
  while (1) {
    if ((int )*s != 0) {
      if (! ((int )*t != 0)) {
        break;
      }
    } else {
      break;
    }
    if ((int )*s == (int )*t) {
      goto __Cont;
    }
    if ((int )*t == 42) {
      strictness ++;
    } else {
      if ((int )*s == 94) {
        strictness ++;
      } else {
        __retres4 = 0;
        goto return_label;
      }
    }
    __Cont: 
    s ++;
    t ++;
  }
  if ((int )*s != 0) {
    printf((char const   * __restrict  )"Assertion failed: %s\n", "s and t should be the same length!");
    exit(1);
  } else {
    if ((int )*t != 0) {
      printf((char const   * __restrict  )"Assertion failed: %s\n", "s and t should be the same length!");
      exit(1);
    }
  }
  __retres4 = strictness > 0;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres4);
  }
}
}
Disjunct *find_subdisjunct(Disjunct *dis , int label ) 
{ Disjunct *d ;
  Connector *cx ;
  Connector *cy ;
  int tmp ;
  int tmp___0 ;
  int __cil_tmp8 ;
  int __cil_tmp9 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& d);
  d = 0;
  simple_gc_frame[3] = (void *)(& cx);
  cx = 0;
  simple_gc_frame[4] = (void *)(& cy);
  cy = 0;
  simple_gc_frame[5] = (void *)(& dis);
  d = *(label_table + label);
  while ((unsigned int )d != (unsigned int )((void *)0)) {
    cx = d->left;
    cy = dis->left;
    while ((unsigned int )cx != (unsigned int )((void *)0)) {
      __cil_tmp8 = strcmp((char const   *)cx->string, (char const   *)cy->string);
      tmp = __cil_tmp8;
      if (tmp != 0) {
        break;
      } else {
        if ((int )cx->multi != (int )cy->multi) {
          break;
        }
      }
      cx = cx->next;
      cy = cy->next;
    }
    if ((unsigned int )cx != (unsigned int )((void *)0)) {
      goto __Cont;
    }
    cx = d->right;
    cy = dis->right;
    while ((unsigned int )cx != (unsigned int )((void *)0)) {
      __cil_tmp9 = strcmp((char const   *)cx->string, (char const   *)cy->string);
      tmp___0 = __cil_tmp9;
      if (tmp___0 != 0) {
        break;
      } else {
        if ((int )cx->multi != (int )cy->multi) {
          break;
        }
      }
      cx = cx->next;
      cy = cy->next;
    }
    if ((unsigned int )cx == (unsigned int )((void *)0)) {
      break;
    }
    __Cont: 
    d = d->next;
  }
  if (! ((unsigned int )d != (unsigned int )((void *)0))) {
    printf((char const   * __restrict  )"Assertion failed: %s\n", "Never found subdisjunct");
    exit(1);
  }
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (d);
  }
}
}
int is_canonical_linkage(void) 
{ int w ;
  int d_label ;
  int place ;
  Connector *d_c ;
  Connector *c ;
  Connector dummy_connector ;
  Connector *upcon ;
  Disjunct *dis ;
  Disjunct *chosen_d ;
  Image_node *in ;
  int tmp ;
  Disjunct *tmp___0 ;
  int tmp___1 ;
  int tmp___2 ;
  int tmp___3 ;
  int __retres16 ;
  int __cil_tmp17 ;
  Disjunct *__cil_tmp18 ;
  int __cil_tmp19 ;
  int __cil_tmp20 ;
  int __cil_tmp21 ;
  extern struct gc_tag_struct *__gc_struct_Connector_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[9] ;
  void *struct_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((7 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  memset(& struct_gc_frame, 0, sizeof(struct_gc_frame));
  struct_gc_frame[0] = (void *)simple_gc_frame;
  struct_gc_frame[1] = (void *)((1 << 2) + 3);
  GC_set_variable_stack1(struct_gc_frame);
  simple_gc_frame[2] = (void *)(& d_c);
  d_c = 0;
  simple_gc_frame[3] = (void *)(& c);
  c = 0;
  struct_gc_frame[2] = (void *)(& dummy_connector);
  struct_gc_frame[3] = (void *)__gc_struct_Connector_struct_tag;
  struct_gc_frame[4] = 0;
  struct_gc_frame[5] = 0;
  memset(& dummy_connector, 0, sizeof(dummy_connector));
  simple_gc_frame[4] = (void *)(& upcon);
  upcon = 0;
  simple_gc_frame[5] = (void *)(& dis);
  dis = 0;
  simple_gc_frame[6] = (void *)(& chosen_d);
  chosen_d = 0;
  simple_gc_frame[7] = (void *)(& in);
  in = 0;
  simple_gc_frame[8] = (void *)(& tmp___0);
  tmp___0 = 0;
  d_label = 0;
  dummy_connector.priority = (char)1;
  build_image_array();
  w = 0;
  while (w < N_words) {
    if (! has_fat_down[w]) {
      goto __Cont;
    }
    chosen_d = chosen_disjuncts[w];
    d_c = chosen_d->left;
    while ((unsigned int )d_c != (unsigned int )((void *)0)) {
      if ((int )d_c->priority == 2) {
        d_label = (int )d_c->label;
        break;
      }
      d_c = d_c->next;
    }
    if (! ((unsigned int )d_c != (unsigned int )((void *)0))) {
      printf((char const   * __restrict  )"Assertion failed: %s\n", "Should have found the down link.");
      exit(1);
    }
    if ((unsigned int )chosen_d->left != (unsigned int )((void *)0)) {
      if ((int )(chosen_d->left)->priority == 1) {
        upcon = chosen_d->left;
      } else {
        goto _L;
      }
    } else {
      _L: 
      if ((unsigned int )chosen_d->right != (unsigned int )((void *)0)) {
        if ((int )(chosen_d->right)->priority == 1) {
          upcon = chosen_d->right;
        } else {
          upcon = (Connector *)((void *)0);
        }
      } else {
        upcon = (Connector *)((void *)0);
      }
    }
    dis = *(label_table + d_label);
    while ((unsigned int )dis != (unsigned int )((void *)0)) {
      __cil_tmp17 = strictly_smaller(dis->string, d_c->string);
      tmp = __cil_tmp17;
      if (! tmp) {
        goto __Cont___0;
      }
      in = image_array[w];
      while ((unsigned int )in != (unsigned int )((void *)0)) {
        place = in->place;
        if (place == 0) {
          if (! ((unsigned int )upcon != (unsigned int )((void *)0))) {
            printf((char const   * __restrict  )"Assertion failed: %s\n", "Should have found an up link");
            exit(1);
          }
          dummy_connector.label = upcon->label;
          if ((int )upcon->label == d_label) {
            dummy_connector.string = dis->string;
          } else {
            __cil_tmp18 = find_subdisjunct(dis, (int )upcon->label);
            tmp___0 = __cil_tmp18;
            dummy_connector.string = tmp___0->string;
          }
          __cil_tmp19 = match(& dummy_connector, in->c);
          tmp___1 = __cil_tmp19;
          if (! tmp___1) {
            break;
          }
        } else {
          if (place > 0) {
            c = dis->right;
            while (place > 1) {
              c = c->next;
              place --;
            }
            __cil_tmp20 = match(c, in->c);
            tmp___2 = __cil_tmp20;
            if (! tmp___2) {
              break;
            }
          } else {
            c = dis->left;
            while (place < -1) {
              c = c->next;
              place ++;
            }
            __cil_tmp21 = match(c, in->c);
            tmp___3 = __cil_tmp21;
            if (! tmp___3) {
              break;
            }
          }
        }
        in = in->next;
      }
      if ((unsigned int )in == (unsigned int )((void *)0)) {
        break;
      }
      __Cont___0: 
      dis = dis->next;
    }
    if ((unsigned int )dis != (unsigned int )((void *)0)) {
      break;
    }
    __Cont: 
    w ++;
  }
  free_image_array();
  __retres16 = w == N_words;
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres16);
  }
}
}
void compute_pp_link_array_connectors(void) 
{ int link ;
  int end ;
  int word ;
  int place ;
  Connector *this_end_con ;
  Connector *upcon ;
  Connector *updiscon ;
  Connector *clist ;
  Connector *con ;
  Connector *mycon ;
  Disjunct *dis ;
  Disjunct *updis ;
  Disjunct *mydis ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[11] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((9 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& this_end_con);
  this_end_con = 0;
  simple_gc_frame[3] = (void *)(& upcon);
  upcon = 0;
  simple_gc_frame[4] = (void *)(& updiscon);
  updiscon = 0;
  simple_gc_frame[5] = (void *)(& clist);
  clist = 0;
  simple_gc_frame[6] = (void *)(& con);
  con = 0;
  simple_gc_frame[7] = (void *)(& mycon);
  mycon = 0;
  simple_gc_frame[8] = (void *)(& dis);
  dis = 0;
  simple_gc_frame[9] = (void *)(& updis);
  updis = 0;
  simple_gc_frame[10] = (void *)(& mydis);
  mydis = 0;
  end = -1;
  while (end <= 1) {
    link = 0;
    while (link < N_links) {
      if (pp_link_array[link].l == -1) {
        goto __Cont;
      }
      if (end < 0) {
        word = link_array[link].l;
        if (! has_fat_down[word]) {
          goto __Cont;
        }
        this_end_con = link_array[link].lc;
        dis = chosen_disjuncts[word];
        mydis = chosen_disjuncts[pp_link_array[link].l];
        clist = dis->right;
      } else {
        word = link_array[link].r;
        if (! has_fat_down[word]) {
          goto __Cont;
        }
        this_end_con = link_array[link].rc;
        dis = chosen_disjuncts[word];
        mydis = chosen_disjuncts[pp_link_array[link].r];
        clist = dis->left;
      }
      if ((int )this_end_con->label != -1) {
        goto __Cont;
      }
      place = 0;
      if ((unsigned int )dis->left != (unsigned int )((void *)0)) {
        if ((int )(dis->left)->priority == 1) {
          upcon = dis->left;
        } else {
          goto _L;
        }
      } else {
        _L: 
        if ((unsigned int )dis->right != (unsigned int )((void *)0)) {
          if ((int )(dis->right)->priority == 1) {
            upcon = dis->right;
          } else {
            upcon = (Connector *)((void *)0);
          }
        } else {
          upcon = (Connector *)((void *)0);
        }
      }
      if ((unsigned int )upcon != (unsigned int )((void *)0)) {
        updis = *(label_table + (int )upcon->label);
        if (end > 0) {
          updiscon = updis->left;
        } else {
          updiscon = updis->right;
        }
        while ((unsigned int )updiscon != (unsigned int )((void *)0)) {
          place ++;
          updiscon = updiscon->next;
        }
      }
      while ((unsigned int )clist != (unsigned int )this_end_con) {
        if ((int )clist->label < 0) {
          place ++;
        }
        clist = clist->next;
      }
      if ((unsigned int )mydis->left != (unsigned int )((void *)0)) {
        if ((int )(mydis->left)->priority == 1) {
          mycon = mydis->left;
        } else {
          goto _L___0;
        }
      } else {
        _L___0: 
        if ((unsigned int )mydis->right != (unsigned int )((void *)0)) {
          if ((int )(mydis->right)->priority == 1) {
            mycon = mydis->right;
          } else {
            printf((char const   * __restrict  )"word = %d\n", word);
            printf((char const   * __restrict  )"fat link: [%d, %d]\n", link_array[link].l,
                   link_array[link].r);
            printf((char const   * __restrict  )"thin link: [%d, %d]\n", pp_link_array[link].l,
                   pp_link_array[link].r);
            printf((char const   * __restrict  )"Assertion failed: %s\n", "There should be a fat UP link here");
            exit(1);
          }
        } else {
          printf((char const   * __restrict  )"word = %d\n", word);
          printf((char const   * __restrict  )"fat link: [%d, %d]\n", link_array[link].l,
                 link_array[link].r);
          printf((char const   * __restrict  )"thin link: [%d, %d]\n", pp_link_array[link].l,
                 pp_link_array[link].r);
          printf((char const   * __restrict  )"Assertion failed: %s\n", "There should be a fat UP link here");
          exit(1);
        }
      }
      dis = *(label_table + (int )mycon->label);
      while ((unsigned int )dis != (unsigned int )((void *)0)) {
        if ((unsigned int )dis->string == (unsigned int )mycon->string) {
          break;
        }
        dis = dis->next;
      }
      if (! ((unsigned int )dis != (unsigned int )((void *)0))) {
        printf((char const   * __restrict  )"Assertion failed: %s\n", "Should have found this connector string");
        exit(1);
      }
      if (end < 0) {
        con = dis->right;
        while (place > 0) {
          place --;
          con = con->next;
        }
        pp_link_array[link].lc = con;
      } else {
        con = dis->left;
        while (place > 0) {
          place --;
          con = con->next;
        }
        pp_link_array[link].rc = con;
      }
      __Cont: 
      link ++;
    }
    end += 2;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
#pragma merger(0,"merge/build-disjuncts.i","")
X_node *build_word_expressions(char *s ) ;
int maxcost_of_sentence(void) ;
void build_sentence_disjuncts(int cost_cutoff ) ;
Disjunct *build_disjuncts_for_dict_node(Dict_node *dn ) ;
void print_disjunct_list(Disjunct *c ) ;
Exp *copy_Exp(Exp *e ) ;
Tconnector *copy_Tconnectors(Tconnector *c ) 
{ Tconnector *c1 ;
  void *tmp ;
  Tconnector *__retres4 ;
  void *__cil_tmp5 ;
  Tconnector *__cil_tmp6 ;
  extern struct gc_tag_struct *__gc_struct_Tconnector_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& c1);
  c1 = 0;
  simple_gc_frame[3] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[4] = (void *)(& __retres4);
  __retres4 = 0;
  simple_gc_frame[5] = (void *)(& c);
  if ((unsigned int )c == (unsigned int )((void *)0)) {
    __retres4 = (Tconnector *)((void *)0);
    goto return_label;
  }
  __cil_tmp5 = GC_malloc(__gc_struct_Tconnector_struct_tag, (int )sizeof(Tconnector ));
  tmp = __cil_tmp5;
  c1 = (Tconnector *)tmp;
  *c1 = *c;
  __cil_tmp6 = copy_Tconnectors(c->next);
  c1->next = __cil_tmp6;
  __retres4 = c1;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres4);
  }
}
}
void free_Tconnectors(Tconnector *e ) 
{ Tconnector *n ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& n);
  n = 0;
  simple_gc_frame[3] = (void *)(& e);
  while ((unsigned int )e != (unsigned int )((void *)0)) {
    n = e->next;
    e = n;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void free_clause_list(Clause *c ) 
{ Clause *c1 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& c1);
  c1 = 0;
  simple_gc_frame[3] = (void *)(& c);
  while ((unsigned int )c != (unsigned int )((void *)0)) {
    c1 = c->next;
    free_Tconnectors(c->c);
    c = c1;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
Clause *copy_clause(Clause *d ) 
{ Clause *d1 ;
  void *tmp ;
  Clause *__retres4 ;
  void *__cil_tmp5 ;
  Tconnector *__cil_tmp6 ;
  extern struct gc_tag_struct *__gc_struct_clause_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& d1);
  d1 = 0;
  simple_gc_frame[3] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[4] = (void *)(& __retres4);
  __retres4 = 0;
  simple_gc_frame[5] = (void *)(& d);
  if ((unsigned int )d == (unsigned int )((void *)0)) {
    __retres4 = (Clause *)((void *)0);
    goto return_label;
  }
  __cil_tmp5 = GC_malloc(__gc_struct_clause_struct_tag, (int )sizeof(Clause ));
  tmp = __cil_tmp5;
  d1 = (Clause *)tmp;
  *d1 = *d;
  d1->next = (Clause *)((void *)0);
  __cil_tmp6 = copy_Tconnectors(d->c);
  d1->c = __cil_tmp6;
  __retres4 = d1;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres4);
  }
}
}
Tconnector *Treverse(Tconnector *e ) 
{ Tconnector *head ;
  Tconnector *x ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& head);
  head = 0;
  simple_gc_frame[3] = (void *)(& x);
  x = 0;
  simple_gc_frame[4] = (void *)(& e);
  head = (Tconnector *)((void *)0);
  while ((unsigned int )e != (unsigned int )((void *)0)) {
    x = e->next;
    e->next = head;
    head = e;
    e = x;
  }
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (head);
  }
}
}
Connector *reverse(Connector *e ) 
{ Connector *head ;
  Connector *x ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& head);
  head = 0;
  simple_gc_frame[3] = (void *)(& x);
  x = 0;
  simple_gc_frame[4] = (void *)(& e);
  head = (Connector *)((void *)0);
  while ((unsigned int )e != (unsigned int )((void *)0)) {
    x = e->next;
    e->next = head;
    head = e;
    e = x;
  }
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (head);
  }
}
}
Tconnector *catenate(Tconnector *e1 , Tconnector *e2 ) 
{ Tconnector *e ;
  Tconnector *head ;
  void *tmp ;
  void *tmp___0 ;
  Tconnector *tmp___1 ;
  void *__cil_tmp8 ;
  void *__cil_tmp9 ;
  Tconnector *__cil_tmp10 ;
  extern struct gc_tag_struct *__gc_struct_Tconnector_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[9] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((7 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& e);
  e = 0;
  simple_gc_frame[3] = (void *)(& head);
  head = 0;
  simple_gc_frame[4] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[5] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[6] = (void *)(& tmp___1);
  tmp___1 = 0;
  simple_gc_frame[7] = (void *)(& e1);
  simple_gc_frame[8] = (void *)(& e2);
  head = (Tconnector *)((void *)0);
  while ((unsigned int )e1 != (unsigned int )((void *)0)) {
    __cil_tmp8 = GC_malloc(__gc_struct_Tconnector_struct_tag, (int )sizeof(Tconnector ));
    tmp = __cil_tmp8;
    e = (Tconnector *)tmp;
    *e = *e1;
    e->next = head;
    head = e;
    e1 = e1->next;
  }
  while ((unsigned int )e2 != (unsigned int )((void *)0)) {
    __cil_tmp9 = GC_malloc(__gc_struct_Tconnector_struct_tag, (int )sizeof(Tconnector ));
    tmp___0 = __cil_tmp9;
    e = (Tconnector *)tmp___0;
    *e = *e2;
    e->next = head;
    head = e;
    e2 = e2->next;
  }
  __cil_tmp10 = Treverse(head);
  tmp___1 = __cil_tmp10;
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (tmp___1);
  }
}
}
Tconnector *build_terminal(Exp *e ) 
{ Tconnector *c ;
  void *tmp ;
  void *__cil_tmp4 ;
  extern struct gc_tag_struct *__gc_struct_Tconnector_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& c);
  c = 0;
  simple_gc_frame[3] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[4] = (void *)(& e);
  __cil_tmp4 = GC_malloc(__gc_struct_Tconnector_struct_tag, (int )sizeof(Tconnector ));
  tmp = __cil_tmp4;
  c = (Tconnector *)tmp;
  c->string = e->u.string;
  c->multi = e->multi;
  c->dir = e->dir;
  c->next = (Tconnector *)((void *)0);
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (c);
  }
}
}
int maxcost_of_expression(Exp *e ) 
{ E_list *e_list ;
  int m ;
  int m1 ;
  int __retres5 ;
  int __cil_tmp6 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& e_list);
  e_list = 0;
  simple_gc_frame[3] = (void *)(& e);
  m = 0;
  if ((int )e->type == 1) {
    goto _L;
  } else {
    if ((int )e->type == 0) {
      _L: 
      e_list = e->u.l;
      while ((unsigned int )e_list != (unsigned int )((void *)0)) {
        __cil_tmp6 = maxcost_of_expression(e_list->e);
        m1 = __cil_tmp6;
        if (m > m1) {
          m = m;
        } else {
          m = m1;
        }
        e_list = e_list->next;
      }
    }
  }
  __retres5 = m + (int )e->cost;
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres5);
  }
}
}
int maxcost_of_sentence(void) 
{ X_node *x ;
  int w ;
  int m ;
  int m1 ;
  int __cil_tmp5 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& x);
  x = 0;
  m = 0;
  w = 0;
  while (w < N_words) {
    x = sentence[w].x;
    while ((unsigned int )x != (unsigned int )((void *)0)) {
      __cil_tmp5 = maxcost_of_expression(x->exp);
      m1 = __cil_tmp5;
      if (m > m1) {
        m = m;
      } else {
        m = m1;
      }
      x = x->next;
    }
    w ++;
  }
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (m);
  }
}
}
Clause *build_clause(Exp *e , int cost_cutoff ) 
{ Clause *c ;
  Clause *c1 ;
  Clause *c2 ;
  Clause *c3 ;
  Clause *c4 ;
  Clause *c_head ;
  E_list *e_list ;
  void *tmp ;
  void *tmp___0 ;
  void *tmp___1 ;
  void *__cil_tmp13 ;
  Clause *__cil_tmp14 ;
  void *__cil_tmp15 ;
  Tconnector *__cil_tmp16 ;
  Clause *__cil_tmp17 ;
  void *__cil_tmp18 ;
  Tconnector *__cil_tmp19 ;
  extern struct gc_tag_struct *__gc_struct_clause_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[13] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((11 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& c);
  c = 0;
  simple_gc_frame[3] = (void *)(& c1);
  c1 = 0;
  simple_gc_frame[4] = (void *)(& c2);
  c2 = 0;
  simple_gc_frame[5] = (void *)(& c3);
  c3 = 0;
  simple_gc_frame[6] = (void *)(& c4);
  c4 = 0;
  simple_gc_frame[7] = (void *)(& c_head);
  c_head = 0;
  simple_gc_frame[8] = (void *)(& e_list);
  e_list = 0;
  simple_gc_frame[9] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[10] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[11] = (void *)(& tmp___1);
  tmp___1 = 0;
  simple_gc_frame[12] = (void *)(& e);
  c = (Clause *)((void *)0);
  if (! ((unsigned int )e != (unsigned int )((void *)0))) {
    printf((char const   * __restrict  )"Assertion failed: %s\n", "build_clause called with null parameter");
    exit(1);
  }
  if ((int )e->type == 1) {
    __cil_tmp13 = GC_malloc(__gc_struct_clause_struct_tag, (int )sizeof(Clause ));
    tmp = __cil_tmp13;
    c1 = (Clause *)tmp;
    c1->c = (Tconnector *)((void *)0);
    c1->next = (Clause *)((void *)0);
    c1->cost = 0;
    c1->maxcost = 0;
    e_list = e->u.l;
    while ((unsigned int )e_list != (unsigned int )((void *)0)) {
      __cil_tmp14 = build_clause(e_list->e, cost_cutoff);
      c2 = __cil_tmp14;
      c_head = (Clause *)((void *)0);
      c3 = c1;
      while ((unsigned int )c3 != (unsigned int )((void *)0)) {
        c4 = c2;
        while ((unsigned int )c4 != (unsigned int )((void *)0)) {
          __cil_tmp15 = GC_malloc(__gc_struct_clause_struct_tag, (int )sizeof(Clause ));
          tmp___0 = __cil_tmp15;
          c = (Clause *)tmp___0;
          c->cost = c3->cost + c4->cost;
          if (c3->maxcost > c4->maxcost) {
            c->maxcost = c3->maxcost;
          } else {
            c->maxcost = c4->maxcost;
          }
          __cil_tmp16 = catenate(c3->c, c4->c);
          c->c = __cil_tmp16;
          c->next = c_head;
          c_head = c;
          c4 = c4->next;
        }
        c3 = c3->next;
      }
      free_clause_list(c1);
      free_clause_list(c2);
      c1 = c_head;
      e_list = e_list->next;
    }
    c = c1;
  } else {
    if ((int )e->type == 0) {
      c = (Clause *)((void *)0);
      e_list = e->u.l;
      while ((unsigned int )e_list != (unsigned int )((void *)0)) {
        __cil_tmp17 = build_clause(e_list->e, cost_cutoff);
        c1 = __cil_tmp17;
        while ((unsigned int )c1 != (unsigned int )((void *)0)) {
          c3 = c1->next;
          c1->next = c;
          c = c1;
          c1 = c3;
        }
        e_list = e_list->next;
      }
    } else {
      if ((int )e->type == 2) {
        __cil_tmp18 = GC_malloc(__gc_struct_clause_struct_tag, (int )sizeof(Clause ));
        tmp___1 = __cil_tmp18;
        c = (Clause *)tmp___1;
        __cil_tmp19 = build_terminal(e);
        c->c = __cil_tmp19;
        c->cost = 0;
        c->maxcost = 0;
        c->next = (Clause *)((void *)0);
      } else {
        printf((char const   * __restrict  )"Assertion failed: %s\n", "an expression node with no type");
        exit(1);
      }
    }
  }
  c1 = c;
  while ((unsigned int )c1 != (unsigned int )((void *)0)) {
    c1->cost += (int )e->cost;
    c1->maxcost += (int )e->cost;
    c1 = c1->next;
  }
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (c);
  }
}
}
void print_connector_list(Connector *e ) 
{ void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& e);
  while ((unsigned int )e != (unsigned int )((void *)0)) {
    printf((char const   * __restrict  )"%s", e->string);
    if ((int )e->label != -1) {
      printf((char const   * __restrict  )"%3d", e->label);
    } else {
      printf((char const   * __restrict  )"   ");
    }
    if ((unsigned int )e->next != (unsigned int )((void *)0)) {
      printf((char const   * __restrict  )" ");
    }
    e = e->next;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void print_Tconnector_list(Tconnector *e ) 
{ void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& e);
  while ((unsigned int )e != (unsigned int )((void *)0)) {
    if (e->multi) {
      printf((char const   * __restrict  )"@");
    }
    printf((char const   * __restrict  )"%s", e->string);
    printf((char const   * __restrict  )"%c", e->dir);
    if ((unsigned int )e->next != (unsigned int )((void *)0)) {
      printf((char const   * __restrict  )" ");
    }
    e = e->next;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void print_clause_list(Clause *c ) 
{ void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& c);
  while ((unsigned int )c != (unsigned int )((void *)0)) {
    printf((char const   * __restrict  )"  Clause: ");
    printf((char const   * __restrict  )"(%2d, %2d)", c->cost, c->maxcost);
    print_Tconnector_list(c->c);
    printf((char const   * __restrict  )"\n");
    c = c->next;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void print_disjunct_list(Disjunct *c ) 
{ void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& c);
  while ((unsigned int )c != (unsigned int )((void *)0)) {
    printf((char const   * __restrict  )"%10s: ", c->string);
    printf((char const   * __restrict  )"(%2d)", c->cost);
    print_connector_list(c->left);
    printf((char const   * __restrict  )" <--> ");
    print_connector_list(c->right);
    printf((char const   * __restrict  )"\n");
    c = c->next;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
Connector *extract_connectors(Tconnector *e , int c ) 
{ Connector *e1 ;
  void *tmp ;
  Connector *tmp___0 ;
  Connector *__retres6 ;
  void *__cil_tmp7 ;
  Connector *__cil_tmp8 ;
  Connector *__cil_tmp9 ;
  extern struct gc_tag_struct *__gc_struct_Connector_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[7] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((5 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& e1);
  e1 = 0;
  simple_gc_frame[3] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[4] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[5] = (void *)(& __retres6);
  __retres6 = 0;
  simple_gc_frame[6] = (void *)(& e);
  if ((unsigned int )e == (unsigned int )((void *)0)) {
    __retres6 = (Connector *)((void *)0);
    goto return_label;
  }
  if ((int )e->dir == c) {
    __cil_tmp7 = GC_malloc(__gc_struct_Connector_struct_tag, (int )sizeof(Connector ));
    tmp = __cil_tmp7;
    e1 = (Connector *)tmp;
    __cil_tmp8 = extract_connectors(e->next, c);
    e1->next = __cil_tmp8;
    e1->multi = e->multi;
    e1->string = e->string;
    e1->label = (short)-1;
    e1->priority = (char)0;
    e1->word = (short)0;
    __retres6 = e1;
    goto return_label;
  } else {
    __cil_tmp9 = extract_connectors(e->next, c);
    tmp___0 = __cil_tmp9;
    __retres6 = tmp___0;
    goto return_label;
  }
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres6);
  }
}
}
Disjunct *build_disjunct(Clause *cl , char *string , int cost_cutoff ) 
{ Disjunct *dis ;
  Disjunct *ndis ;
  void *tmp ;
  Connector *tmp___0 ;
  Connector *tmp___1 ;
  void *__cil_tmp9 ;
  Connector *__cil_tmp10 ;
  Connector *__cil_tmp11 ;
  Connector *__cil_tmp12 ;
  Connector *__cil_tmp13 ;
  extern struct gc_tag_struct *__gc_struct_Disjunct_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[9] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((7 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& dis);
  dis = 0;
  simple_gc_frame[3] = (void *)(& ndis);
  ndis = 0;
  simple_gc_frame[4] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[5] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[6] = (void *)(& tmp___1);
  tmp___1 = 0;
  simple_gc_frame[7] = (void *)(& cl);
  simple_gc_frame[8] = (void *)(& string);
  dis = (Disjunct *)((void *)0);
  while ((unsigned int )cl != (unsigned int )((void *)0)) {
    if (cl->maxcost <= cost_cutoff) {
      __cil_tmp9 = GC_malloc(__gc_struct_Disjunct_struct_tag, (int )sizeof(Disjunct ));
      tmp = __cil_tmp9;
      ndis = (Disjunct *)tmp;
      __cil_tmp10 = extract_connectors(cl->c, '-');
      tmp___0 = __cil_tmp10;
      __cil_tmp11 = reverse(tmp___0);
      ndis->left = __cil_tmp11;
      __cil_tmp12 = extract_connectors(cl->c, '+');
      tmp___1 = __cil_tmp12;
      __cil_tmp13 = reverse(tmp___1);
      ndis->right = __cil_tmp13;
      ndis->string = string;
      ndis->cost = (short )cl->cost;
      ndis->next = dis;
      dis = ndis;
    }
    cl = cl->next;
  }
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (dis);
  }
}
}
Disjunct *build_disjuncts_for_X_node(X_node *x , int cost_cutoff ) 
{ Clause *c ;
  Disjunct *dis ;
  Clause *__cil_tmp5 ;
  Disjunct *__cil_tmp6 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& c);
  c = 0;
  simple_gc_frame[3] = (void *)(& dis);
  dis = 0;
  simple_gc_frame[4] = (void *)(& x);
  __cil_tmp5 = build_clause(x->exp, cost_cutoff);
  c = __cil_tmp5;
  __cil_tmp6 = build_disjunct(c, x->string, cost_cutoff);
  dis = __cil_tmp6;
  free_clause_list(c);
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (dis);
  }
}
}
Disjunct *build_disjuncts_for_dict_node(Dict_node *dn ) 
{ Clause *c ;
  Disjunct *dis ;
  Clause *__cil_tmp4 ;
  Disjunct *__cil_tmp5 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& c);
  c = 0;
  simple_gc_frame[3] = (void *)(& dis);
  dis = 0;
  simple_gc_frame[4] = (void *)(& dn);
  __cil_tmp4 = build_clause(dn->exp, 1000);
  c = __cil_tmp4;
  __cil_tmp5 = build_disjunct(c, dn->string, 1000);
  dis = __cil_tmp5;
  free_clause_list(c);
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (dis);
  }
}
}
X_node *build_word_expressions(char *s ) 
{ Dict_node *dn ;
  X_node *x ;
  X_node *y ;
  void *tmp ;
  Dict_node *__cil_tmp6 ;
  void *__cil_tmp7 ;
  Exp *__cil_tmp8 ;
  extern struct gc_tag_struct *__gc_struct_X_node_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[7] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((5 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& dn);
  dn = 0;
  simple_gc_frame[3] = (void *)(& x);
  x = 0;
  simple_gc_frame[4] = (void *)(& y);
  y = 0;
  simple_gc_frame[5] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[6] = (void *)(& s);
  __cil_tmp6 = dictionary_lookup(s);
  dn = __cil_tmp6;
  x = (X_node *)((void *)0);
  while ((unsigned int )dn != (unsigned int )((void *)0)) {
    __cil_tmp7 = GC_malloc(__gc_struct_X_node_struct_tag, (int )sizeof(X_node ));
    tmp = __cil_tmp7;
    y = (X_node *)tmp;
    y->next = x;
    x = y;
    __cil_tmp8 = copy_Exp(dn->exp);
    x->exp = __cil_tmp8;
    x->string = dn->string;
    dn = dn->right;
  }
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (x);
  }
}
}
void build_sentence_disjuncts(int cost_cutoff ) 
{ Disjunct *d ;
  X_node *x ;
  int w ;
  Disjunct *tmp ;
  Disjunct *__cil_tmp6 ;
  Disjunct *__cil_tmp7 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& d);
  d = 0;
  simple_gc_frame[3] = (void *)(& x);
  x = 0;
  simple_gc_frame[4] = (void *)(& tmp);
  tmp = 0;
  w = 0;
  while (w < N_words) {
    d = (Disjunct *)((void *)0);
    x = sentence[w].x;
    while ((unsigned int )x != (unsigned int )((void *)0)) {
      __cil_tmp6 = build_disjuncts_for_X_node(x, cost_cutoff);
      tmp = __cil_tmp6;
      __cil_tmp7 = catenate_disjuncts(tmp, d);
      d = __cil_tmp7;
      x = x->next;
    }
    sentence[w].d = d;
    w ++;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
#pragma merger(0,"merge/extract-links.i","")
int maxlinklength ;
int table_lookup(int lw , int rw , Connector *le , Connector *re , int cost ) ;
void extract_links(int index___0 , int cost ) ;
Match_node *form_match_list(int w , Connector *lc , int lw , Connector *rc , int rw ) ;
void put_match_list(Match_node *m ) ;
char forgiving  ;
void issue_link(Disjunct *ld , Disjunct *rd , int lw , int rw , Connector *lc , Connector *rc ) 
{ void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& ld);
  simple_gc_frame[3] = (void *)(& rd);
  simple_gc_frame[4] = (void *)(& lc);
  simple_gc_frame[5] = (void *)(& rc);
  link_array[N_links].l = lw;
  link_array[N_links].r = rw;
  link_array[N_links].lc = lc;
  link_array[N_links].rc = rc;
  N_links ++;
  chosen_disjuncts[lw] = ld;
  chosen_disjuncts[rw] = rd;

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
int magic(int lw , int rw , Connector *le , Connector *re , int cost ) 
{ int count___0 ;
  int __retres7 ;
  int __cil_tmp8 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& le);
  simple_gc_frame[3] = (void *)(& re);
  if (cost < 0) {
    __retres7 = 0;
    goto return_label;
  }
  __cil_tmp8 = table_lookup(lw, rw, le, re, cost);
  count___0 = __cil_tmp8;
  if (count___0 < 0) {
    __retres7 = 0;
    goto return_label;
  } else {
    __retres7 = count___0;
    goto return_label;
  }
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres7);
  }
}
}
void list_links(Disjunct *ld , Disjunct *rd , int lw , int rw , Connector *le , Connector *re ,
                int cost , int index___0 ) 
{ Disjunct *d ;
  int leftcount ;
  int rightcount ;
  int total ;
  int i ;
  int x ;
  int delta ;
  int lml ;
  int lmr ;
  int rml ;
  int rmr ;
  int lc ;
  int rc ;
  int lindex ;
  int rindex___0 ;
  int lcost ;
  int rcost ;
  int w ;
  int start_word ;
  int end_word ;
  Match_node *m ;
  Match_node *m1 ;
  int tmp ;
  int tmp___0 ;
  int tmp___1 ;
  int tmp___2 ;
  int tmp___3 ;
  int tmp___4 ;
  int tmp___5 ;
  int tmp___6 ;
  int tmp___7 ;
  int tmp___8 ;
  int __cil_tmp41 ;
  int __cil_tmp42 ;
  Match_node *__cil_tmp43 ;
  int __cil_tmp44 ;
  int __cil_tmp45 ;
  int __cil_tmp46 ;
  int __cil_tmp47 ;
  int __cil_tmp48 ;
  int __cil_tmp49 ;
  int __cil_tmp50 ;
  int __cil_tmp51 ;
  int __cil_tmp52 ;
  int __cil_tmp53 ;
  int __cil_tmp54 ;
  int __cil_tmp55 ;
  int __cil_tmp56 ;
  int __cil_tmp57 ;
  int __cil_tmp58 ;
  int __cil_tmp59 ;
  int __cil_tmp60 ;
  int __cil_tmp61 ;
  int __cil_tmp62 ;
  int __cil_tmp63 ;
  int __cil_tmp64 ;
  int __cil_tmp65 ;
  int __cil_tmp66 ;
  int __cil_tmp67 ;
  int __cil_tmp68 ;
  int __cil_tmp69 ;
  int __cil_tmp70 ;
  int __cil_tmp71 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[9] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((7 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& d);
  d = 0;
  simple_gc_frame[3] = (void *)(& m);
  m = 0;
  simple_gc_frame[4] = (void *)(& m1);
  m1 = 0;
  simple_gc_frame[5] = (void *)(& ld);
  simple_gc_frame[6] = (void *)(& rd);
  simple_gc_frame[7] = (void *)(& le);
  simple_gc_frame[8] = (void *)(& re);
  lml = 0;
  lmr = 0;
  rml = 0;
  rmr = 0;
  if (rw == 1 + lw) {
    if ((unsigned int )le == (unsigned int )((void *)0)) {
      if ((unsigned int )re == (unsigned int )((void *)0)) {
        if (! (index___0 == 0)) {
          printf((char const   * __restrict  )"Assertion failed: %s\n", "Error encountered while extracting links.");
          exit(1);
        }
      } else {
        printf((char const   * __restrict  )"Assertion failed: %s\n", "Error encountered while extracting links.");
        exit(1);
      }
    } else {
      printf((char const   * __restrict  )"Assertion failed: %s\n", "Error encountered while extracting links.");
      exit(1);
    }

    goto return_label;
  }
  if (cost < 0) {

    goto return_label;
  }
  if ((unsigned int )le == (unsigned int )((void *)0)) {
    if ((unsigned int )re == (unsigned int )((void *)0)) {
      total = 0;
      w = lw + 1;
      d = sentence[w].d;
      while ((unsigned int )d != (unsigned int )((void *)0)) {
        if ((unsigned int )d->left == (unsigned int )((void *)0)) {
          __cil_tmp41 = magic(w, rw, d->right, re, cost - 1);
          i = __cil_tmp41;
          total += i;
          if (total - i <= index___0) {
            if (total > index___0) {
              list_links(d, rd, w, rw, d->right, re, cost - 1, (index___0 - total) + i);
            }
          }
        }
        d = d->next;
      }
      __cil_tmp42 = magic(w, rw, (Connector *)((void *)0), (Connector *)((void *)0),
                          cost - 1);
      i = __cil_tmp42;
      total += i;
      if (total - i <= index___0) {
        if (total > index___0) {
          list_links((Disjunct *)((void *)0), rd, w, rw, (Connector *)((void *)0),
                     re, cost - 1, (index___0 - total) + i);
        }
      }

      goto return_label;
    }
  }
  total = 0;
  if ((unsigned int )le == (unsigned int )((void *)0)) {
    start_word = lw + 1;
  } else {
    start_word = (int )le->word;
  }
  if ((unsigned int )re == (unsigned int )((void *)0)) {
    if (rw - 1 < lw + maxlinklength) {
      end_word = rw - 1;
    } else {
      end_word = lw + maxlinklength;
    }
  } else {
    end_word = (int )re->word;
  }
  w = start_word;
  while (w <= end_word) {
    __cil_tmp43 = form_match_list(w, le, lw, re, rw);
    m = __cil_tmp43;
    m1 = m;
    while ((unsigned int )m != (unsigned int )((void *)0)) {
      d = m->d;
      lcost = 0;
      while (lcost <= cost) {
        rcost = cost - lcost;
        if ((unsigned int )le != (unsigned int )((void *)0)) {
          if ((unsigned int )d->left != (unsigned int )((void *)0)) {
            __cil_tmp44 = match(le, d->left);
            tmp___2 = __cil_tmp44;
            if (tmp___2) {
              lml = (int )le->multi;
              lmr = (int )(d->left)->multi;
              __cil_tmp45 = magic(lw, w, le->next, (d->left)->next, lcost);
              leftcount = __cil_tmp45;
              if (lml) {
                __cil_tmp46 = magic(lw, w, le, (d->left)->next, lcost);
                tmp = __cil_tmp46;
                leftcount += tmp;
              }
              if (lmr) {
                __cil_tmp47 = magic(lw, w, le->next, d->left, lcost);
                tmp___0 = __cil_tmp47;
                leftcount += tmp___0;
              }
              if (lml) {
                if (lmr) {
                  __cil_tmp48 = magic(lw, w, le, d->left, lcost);
                  tmp___1 = __cil_tmp48;
                  leftcount += tmp___1;
                }
              }
            } else {
              leftcount = 0;
            }
          } else {
            leftcount = 0;
          }
        } else {
          leftcount = 0;
        }
        if ((unsigned int )d->right != (unsigned int )((void *)0)) {
          if ((unsigned int )re != (unsigned int )((void *)0)) {
            __cil_tmp49 = match(d->right, re);
            tmp___6 = __cil_tmp49;
            if (tmp___6) {
              rml = (int )(d->right)->multi;
              rmr = (int )re->multi;
              __cil_tmp50 = magic(w, rw, (d->right)->next, re->next, rcost);
              rightcount = __cil_tmp50;
              if (rml) {
                __cil_tmp51 = magic(w, rw, d->right, re->next, rcost);
                tmp___3 = __cil_tmp51;
                rightcount += tmp___3;
              }
              if (rmr) {
                __cil_tmp52 = magic(w, rw, (d->right)->next, re, rcost);
                tmp___4 = __cil_tmp52;
                rightcount += tmp___4;
              }
              if (rml) {
                if (rmr) {
                  __cil_tmp53 = magic(w, rw, d->right, re, rcost);
                  tmp___5 = __cil_tmp53;
                  rightcount += tmp___5;
                }
              }
            } else {
              rightcount = 0;
            }
          } else {
            rightcount = 0;
          }
        } else {
          rightcount = 0;
        }
        i = leftcount * rightcount;
        total += i;
        if (total - i <= index___0) {
          if (total > index___0) {
            x = (index___0 - total) + i;
            lindex = x / rightcount;
            rindex___0 = x % rightcount;
            lc = 0;
            __cil_tmp54 = magic(lw, w, le->next, (d->left)->next, lcost);
            delta = __cil_tmp54;
            lc += delta;
            if (lc > lindex) {
              issue_link(ld, d, lw, w, le, d->left);
              list_links(ld, d, lw, w, le->next, (d->left)->next, lcost, (lindex - lc) + delta);
            }
            if (lml) {
              __cil_tmp55 = magic(lw, w, le, (d->left)->next, lcost);
              delta = __cil_tmp55;
            } else {
              delta = 0;
            }
            lc += delta;
            if (lc - delta <= lindex) {
              if (lc > lindex) {
                issue_link(ld, d, lw, w, le, d->left);
                list_links(ld, d, lw, w, le, (d->left)->next, lcost, (lindex - lc) + delta);
              }
            }
            if (lmr) {
              __cil_tmp56 = magic(lw, w, le->next, d->left, lcost);
              delta = __cil_tmp56;
            } else {
              delta = 0;
            }
            lc += delta;
            if (lc - delta <= lindex) {
              if (lc > lindex) {
                issue_link(ld, d, lw, w, le, d->left);
                list_links(ld, d, lw, w, le->next, d->left, lcost, (lindex - lc) + delta);
              }
            }
            if (lml) {
              if (lmr) {
                __cil_tmp57 = magic(lw, w, le, d->left, lcost);
                delta = __cil_tmp57;
              } else {
                delta = 0;
              }
            } else {
              delta = 0;
            }
            lc += delta;
            if (lc - delta <= lindex) {
              if (lc > lindex) {
                issue_link(ld, d, lw, w, le, d->left);
                list_links(ld, d, lw, w, le, d->left, lcost, (lindex - lc) + delta);
              }
            }
            rc = 0;
            __cil_tmp58 = magic(w, rw, (d->right)->next, re->next, rcost);
            delta = __cil_tmp58;
            rc += delta;
            if (rc > rindex___0) {
              issue_link(d, rd, w, rw, d->right, re);
              list_links(d, rd, w, rw, (d->right)->next, re->next, rcost, (rindex___0 - rc) + delta);
            }
            if (rml) {
              __cil_tmp59 = magic(w, rw, d->right, re->next, rcost);
              delta = __cil_tmp59;
            } else {
              delta = 0;
            }
            rc += delta;
            if (rc - delta <= rindex___0) {
              if (rc > rindex___0) {
                issue_link(d, rd, w, rw, d->right, re);
                list_links(d, rd, w, rw, d->right, re->next, rcost, (rindex___0 - rc) + delta);
              }
            }
            if (rmr) {
              __cil_tmp60 = magic(w, rw, (d->right)->next, re, rcost);
              delta = __cil_tmp60;
            } else {
              delta = 0;
            }
            rc += delta;
            if (rc - delta <= rindex___0) {
              if (rc > rindex___0) {
                issue_link(d, rd, w, rw, d->right, re);
                list_links(d, rd, w, rw, (d->right)->next, re, rcost, (rindex___0 - rc) + delta);
              }
            }
            if (rml) {
              if (rmr) {
                __cil_tmp61 = magic(w, rw, d->right, re, rcost);
                delta = __cil_tmp61;
              } else {
                delta = 0;
              }
            } else {
              delta = 0;
            }
            rc += delta;
            if (rc - delta <= rindex___0) {
              if (rc > rindex___0) {
                issue_link(d, rd, w, rw, d->right, re);
                list_links(d, rd, w, rw, d->right, re, rcost, (rindex___0 - rc) + delta);
              }
            }
          }
        }
        if (leftcount > 0) {
          __cil_tmp62 = magic(w, rw, d->right, re, rcost);
          tmp___7 = __cil_tmp62;
          i = leftcount * tmp___7;
        } else {
          i = 0;
        }
        total += i;
        if (total - i <= index___0) {
          if (total > index___0) {
            x = (index___0 - total) + i;
            lindex = x % leftcount;
            rindex___0 = x / leftcount;
            lc = 0;
            __cil_tmp63 = magic(lw, w, le->next, (d->left)->next, lcost);
            delta = __cil_tmp63;
            lc += delta;
            if (lc > lindex) {
              issue_link(ld, d, lw, w, le, d->left);
              list_links(ld, d, lw, w, le->next, (d->left)->next, lcost, (lindex - lc) + delta);
            }
            if (lml) {
              __cil_tmp64 = magic(lw, w, le, (d->left)->next, lcost);
              delta = __cil_tmp64;
            } else {
              delta = 0;
            }
            lc += delta;
            if (lc - delta <= lindex) {
              if (lc > lindex) {
                issue_link(ld, d, lw, w, le, d->left);
                list_links(ld, d, lw, w, le, (d->left)->next, lcost, (lindex - lc) + delta);
              }
            }
            if (lmr) {
              __cil_tmp65 = magic(lw, w, le->next, d->left, lcost);
              delta = __cil_tmp65;
            } else {
              delta = 0;
            }
            lc += delta;
            if (lc - delta <= lindex) {
              if (lc > lindex) {
                issue_link(ld, d, lw, w, le, d->left);
                list_links(ld, d, lw, w, le->next, d->left, lcost, (lindex - lc) + delta);
              }
            }
            if (lml) {
              if (lmr) {
                __cil_tmp66 = magic(lw, w, le, d->left, lcost);
                delta = __cil_tmp66;
              } else {
                delta = 0;
              }
            } else {
              delta = 0;
            }
            lc += delta;
            if (lc - delta <= lindex) {
              if (lc > lindex) {
                issue_link(ld, d, lw, w, le, d->left);
                list_links(ld, d, lw, w, le, d->left, lcost, (lindex - lc) + delta);
              }
            }
            list_links(d, rd, w, rw, d->right, re, rcost, rindex___0);
          }
        }
        if ((unsigned int )le == (unsigned int )((void *)0)) {
          if (rightcount > 0) {
            __cil_tmp67 = magic(lw, w, le, d->left, lcost);
            tmp___8 = __cil_tmp67;
            i = rightcount * tmp___8;
          } else {
            i = 0;
          }
        } else {
          i = 0;
        }
        total += i;
        if (total - i <= index___0) {
          if (total > index___0) {
            x = (index___0 - total) + i;
            rindex___0 = x % rightcount;
            lindex = x / rightcount;
            rc = 0;
            __cil_tmp68 = magic(w, rw, (d->right)->next, re->next, rcost);
            delta = __cil_tmp68;
            rc += delta;
            if (rc > rindex___0) {
              issue_link(d, rd, w, rw, d->right, re);
              list_links(d, rd, w, rw, (d->right)->next, re->next, rcost, (rindex___0 - rc) + delta);
            }
            if (rml) {
              __cil_tmp69 = magic(w, rw, d->right, re->next, rcost);
              delta = __cil_tmp69;
            } else {
              delta = 0;
            }
            rc += delta;
            if (rc - delta <= rindex___0) {
              if (rc > rindex___0) {
                issue_link(d, rd, w, rw, d->right, re);
                list_links(d, rd, w, rw, d->right, re->next, rcost, (rindex___0 - rc) + delta);
              }
            }
            if (rmr) {
              __cil_tmp70 = magic(w, rw, (d->right)->next, re, rcost);
              delta = __cil_tmp70;
            } else {
              delta = 0;
            }
            rc += delta;
            if (rc - delta <= rindex___0) {
              if (rc > rindex___0) {
                issue_link(d, rd, w, rw, d->right, re);
                list_links(d, rd, w, rw, (d->right)->next, re, rcost, (rindex___0 - rc) + delta);
              }
            }
            if (rml) {
              if (rmr) {
                __cil_tmp71 = magic(w, rw, d->right, re, rcost);
                delta = __cil_tmp71;
              } else {
                delta = 0;
              }
            } else {
              delta = 0;
            }
            rc += delta;
            if (rc - delta <= rindex___0) {
              if (rc > rindex___0) {
                issue_link(d, rd, w, rw, d->right, re);
                list_links(d, rd, w, rw, d->right, re, rcost, (rindex___0 - rc) + delta);
              }
            }
            list_links(ld, d, lw, w, le, d->left, lcost, lindex);
          }
        }
        lcost ++;
      }
      m = m->next;
    }
    put_match_list(m1);
    w ++;
  }

  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void initialize_links(void) 
{ int i ;

  {
  i = 0;
  while (i < N_words) {
    chosen_disjuncts[i] = (Disjunct *)((void *)0);
    i ++;
  }

  return;
}
}
void extract_links(int index___0 , int cost ) 
{ Disjunct *dis ;
  int total ;
  int c ;
  int __cil_tmp6 ;
  int __cil_tmp7 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& dis);
  dis = 0;
  c = 0;
  N_links = 0;
  total = 0;
  initialize_links();
  dis = sentence[0].d;
  while ((unsigned int )dis != (unsigned int )((void *)0)) {
    if ((unsigned int )dis->left == (unsigned int )((void *)0)) {
      __cil_tmp6 = magic(0, N_words, dis->right, (Connector *)((void *)0), cost);
      c = __cil_tmp6;
      total += c;
      if (total > index___0) {
        break;
      }
    }
    dis = dis->next;
  }
  if (total > index___0) {
    list_links(dis, (Disjunct *)((void *)0), 0, N_words, dis->right, (Connector *)((void *)0),
               cost, (index___0 - total) + c);
  } else {
    __cil_tmp7 = magic(0, N_words, (Connector *)((void *)0), (Connector *)((void *)0),
                       cost);
    c = __cil_tmp7;
    total += c;
    list_links((Disjunct *)((void *)0), (Disjunct *)((void *)0), 0, N_words, (Connector *)((void *)0),
               (Connector *)((void *)0), cost, (index___0 - total) + c);
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
#pragma merger(0,"merge/fast-match.i","")
void init_fast_matcher(void) ;
void free_fast_matcher(void) ;
static int match_cost  ;
int left_disjunct_list_length(Disjunct *d ) 
{ int i ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& d);
  i = 0;
  while ((unsigned int )d != (unsigned int )((void *)0)) {
    if ((unsigned int )d->left != (unsigned int )((void *)0)) {
      i ++;
    }
    d = d->next;
  }
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (i);
  }
}
}
int right_disjunct_list_length(Disjunct *d ) 
{ int i ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& d);
  i = 0;
  while ((unsigned int )d != (unsigned int )((void *)0)) {
    if ((unsigned int )d->right != (unsigned int )((void *)0)) {
      i ++;
    }
    d = d->next;
  }
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (i);
  }
}
}
static int l_table_size[250]  ;
static int r_table_size[250]  ;
static Match_node **l_table[250]  ;
static Match_node **r_table[250]  ;
static Match_node *mn_free_list  =    (Match_node *)((void *)0);
Match_node *get_match_node(void) 
{ Match_node *m ;
  void *tmp ;
  void *__cil_tmp3 ;
  extern struct gc_tag_struct *__gc_struct_Match_node_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& m);
  m = 0;
  simple_gc_frame[3] = (void *)(& tmp);
  tmp = 0;
  if ((unsigned int )mn_free_list != (unsigned int )((void *)0)) {
    m = mn_free_list;
    mn_free_list = m->next;
  } else {
    __cil_tmp3 = GC_malloc(__gc_struct_Match_node_struct_tag, (int )sizeof(Match_node ));
    tmp = __cil_tmp3;
    m = (Match_node *)tmp;
  }
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (m);
  }
}
}
void put_match_list(Match_node *m ) 
{ Match_node *xm ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& xm);
  xm = 0;
  simple_gc_frame[3] = (void *)(& m);
  while ((unsigned int )m != (unsigned int )((void *)0)) {
    xm = m->next;
    m->next = mn_free_list;
    mn_free_list = m;
    m = xm;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void free_match_list(Match_node *t ) 
{ Match_node *xt ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& xt);
  xt = 0;
  simple_gc_frame[3] = (void *)(& t);
  while ((unsigned int )t != (unsigned int )((void *)0)) {
    xt = t->next;
    t = xt;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void free_fast_matcher(void) 
{ int w ;
  int i ;

  {
  if (verbosity > 1) {
    printf((char const   * __restrict  )"%d Match cost\n", match_cost);
  }
  w = 0;
  while (w < N_words) {
    i = 0;
    while (i < l_table_size[w]) {
      free_match_list(*(l_table[w] + i));
      i ++;
    }
    i = 0;
    while (i < r_table_size[w]) {
      free_match_list(*(r_table[w] + i));
      i ++;
    }
    w ++;
  }
  free_match_list(mn_free_list);
  mn_free_list = (Match_node *)((void *)0);

  return;
}
}
int fast_match_hash(Connector *c ) 
{ char *s ;
  int i ;
  unsigned short const   **tmp ;
  unsigned short const   **__cil_tmp5 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& s);
  s = 0;
  simple_gc_frame[3] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[4] = (void *)(& c);
  i = (int )randtable[(int )c->label & 255];
  s = c->string;
  while (1) {
    __cil_tmp5 = __ctype_b_loc();
    tmp = __cil_tmp5;
    if (! ((int const   )*(*tmp + (int )*s) & 256)) {
      break;
    }
    i = (int )((unsigned int )(i + (i << 1)) + randtable[((int )*s + i) & 255]);
    s ++;
  }
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (i);
  }
}
}
Match_node *add_to_right_table_list(Match_node *m , Match_node *l ) 
{ Match_node *__retres3 ;
  Match_node *__cil_tmp4 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& __retres3);
  __retres3 = 0;
  simple_gc_frame[3] = (void *)(& m);
  simple_gc_frame[4] = (void *)(& l);
  if ((unsigned int )l == (unsigned int )((void *)0)) {
    __retres3 = m;
    goto return_label;
  }
  if ((int )((m->d)->right)->word <= (int )((l->d)->right)->word) {
    m->next = l;
    __retres3 = m;
    goto return_label;
  } else {
    __cil_tmp4 = add_to_right_table_list(m, l->next);
    l->next = __cil_tmp4;
    __retres3 = l;
    goto return_label;
  }
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres3);
  }
}
}
Match_node *add_to_left_table_list(Match_node *m , Match_node *l ) 
{ Match_node *__retres3 ;
  Match_node *__cil_tmp4 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& __retres3);
  __retres3 = 0;
  simple_gc_frame[3] = (void *)(& m);
  simple_gc_frame[4] = (void *)(& l);
  if ((unsigned int )l == (unsigned int )((void *)0)) {
    __retres3 = m;
    goto return_label;
  }
  if ((int )((m->d)->left)->word >= (int )((l->d)->left)->word) {
    m->next = l;
    __retres3 = m;
    goto return_label;
  } else {
    __cil_tmp4 = add_to_left_table_list(m, l->next);
    l->next = __cil_tmp4;
    __retres3 = l;
    goto return_label;
  }
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres3);
  }
}
}
void put_into_match_table(int size , Match_node **t , Disjunct *d , Connector *c ,
                          int dir ) 
{ int h ;
  Match_node *m ;
  int tmp ;
  void *tmp___0 ;
  int __cil_tmp10 ;
  void *__cil_tmp11 ;
  Match_node *__cil_tmp12 ;
  Match_node *__cil_tmp13 ;
  extern struct gc_tag_struct *__gc_struct_Match_node_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[7] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((5 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& m);
  m = 0;
  simple_gc_frame[3] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[4] = (void *)(& t);
  simple_gc_frame[5] = (void *)(& d);
  simple_gc_frame[6] = (void *)(& c);
  __cil_tmp10 = fast_match_hash(c);
  tmp = __cil_tmp10;
  h = tmp & (size - 1);
  __cil_tmp11 = GC_malloc(__gc_struct_Match_node_struct_tag, (int )sizeof(Match_node ));
  tmp___0 = __cil_tmp11;
  m = (Match_node *)tmp___0;
  m->next = (Match_node *)((void *)0);
  m->d = d;
  if (dir == 1) {
    __cil_tmp12 = add_to_right_table_list(m, *(t + h));
    *(t + h) = __cil_tmp12;
  } else {
    __cil_tmp13 = add_to_left_table_list(m, *(t + h));
    *(t + h) = __cil_tmp13;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void init_fast_matcher(void) 
{ int w ;
  int len ;
  int size ;
  int i ;
  Match_node **t ;
  Disjunct *d ;
  void *tmp ;
  void *tmp___0 ;
  int __cil_tmp9 ;
  int __cil_tmp10 ;
  void *__cil_tmp11 ;
  int __cil_tmp12 ;
  int __cil_tmp13 ;
  void *__cil_tmp14 ;
  extern struct gc_tag_struct *__gcstandard_array_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& t);
  t = 0;
  simple_gc_frame[3] = (void *)(& d);
  d = 0;
  simple_gc_frame[4] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[5] = (void *)(& tmp___0);
  tmp___0 = 0;
  match_cost = 0;
  w = 0;
  while (w < N_words) {
    __cil_tmp9 = left_disjunct_list_length(sentence[w].d);
    len = __cil_tmp9;
    __cil_tmp10 = next_power_of_two_up(len);
    size = __cil_tmp10;
    l_table_size[w] = size;
    __cil_tmp11 = GC_malloc(__gcstandard_array_tag, (int )((unsigned int )size * sizeof(Match_node *)));
    tmp = __cil_tmp11;
    l_table[w] = (Match_node **)tmp;
    t = l_table[w];
    i = 0;
    while (i < size) {
      *(t + i) = (Match_node *)((void *)0);
      i ++;
    }
    d = sentence[w].d;
    while ((unsigned int )d != (unsigned int )((void *)0)) {
      if ((unsigned int )d->left != (unsigned int )((void *)0)) {
        put_into_match_table(size, t, d, d->left, -1);
      }
      d = d->next;
    }
    __cil_tmp12 = right_disjunct_list_length(sentence[w].d);
    len = __cil_tmp12;
    __cil_tmp13 = next_power_of_two_up(len);
    size = __cil_tmp13;
    r_table_size[w] = size;
    __cil_tmp14 = GC_malloc(__gcstandard_array_tag, (int )((unsigned int )size * sizeof(Match_node *)));
    tmp___0 = __cil_tmp14;
    r_table[w] = (Match_node **)tmp___0;
    t = r_table[w];
    i = 0;
    while (i < size) {
      *(t + i) = (Match_node *)((void *)0);
      i ++;
    }
    d = sentence[w].d;
    while ((unsigned int )d != (unsigned int )((void *)0)) {
      if ((unsigned int )d->right != (unsigned int )((void *)0)) {
        put_into_match_table(size, t, d, d->right, 1);
      }
      d = d->next;
    }
    w ++;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
Match_node *form_match_list(int w , Connector *lc , int lw , Connector *rc , int rw ) 
{ Match_node *ml ;
  Match_node *mr ;
  Match_node *mx ;
  Match_node *my ;
  Match_node *mz ;
  Match_node *front ;
  Match_node *free_later ;
  int tmp ;
  int tmp___0 ;
  Match_node *__retres15 ;
  int __cil_tmp16 ;
  int __cil_tmp17 ;
  Match_node *__cil_tmp18 ;
  Match_node *__cil_tmp19 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[12] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((10 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& ml);
  ml = 0;
  simple_gc_frame[3] = (void *)(& mr);
  mr = 0;
  simple_gc_frame[4] = (void *)(& mx);
  mx = 0;
  simple_gc_frame[5] = (void *)(& my);
  my = 0;
  simple_gc_frame[6] = (void *)(& mz);
  mz = 0;
  simple_gc_frame[7] = (void *)(& front);
  front = 0;
  simple_gc_frame[8] = (void *)(& free_later);
  free_later = 0;
  simple_gc_frame[9] = (void *)(& __retres15);
  __retres15 = 0;
  simple_gc_frame[10] = (void *)(& lc);
  simple_gc_frame[11] = (void *)(& rc);
  if ((unsigned int )lc != (unsigned int )((void *)0)) {
    __cil_tmp16 = fast_match_hash(lc);
    tmp = __cil_tmp16;
    ml = *(l_table[w] + (tmp & (l_table_size[w] - 1)));
  } else {
    ml = (Match_node *)((void *)0);
  }
  if ((unsigned int )rc != (unsigned int )((void *)0)) {
    __cil_tmp17 = fast_match_hash(rc);
    tmp___0 = __cil_tmp17;
    mr = *(r_table[w] + (tmp___0 & (r_table_size[w] - 1)));
  } else {
    mr = (Match_node *)((void *)0);
  }
  front = (Match_node *)((void *)0);
  mx = ml;
  while ((unsigned int )mx != (unsigned int )((void *)0)) {
    if ((int )((mx->d)->left)->word < lw) {
      break;
    }
    __cil_tmp18 = get_match_node();
    my = __cil_tmp18;
    my->d = mx->d;
    my->next = front;
    front = my;
    mx = mx->next;
  }
  ml = front;
  front = (Match_node *)((void *)0);
  mx = mr;
  while ((unsigned int )mx != (unsigned int )((void *)0)) {
    if ((int )((mx->d)->right)->word > rw) {
      break;
    }
    __cil_tmp19 = get_match_node();
    my = __cil_tmp19;
    my->d = mx->d;
    my->next = front;
    front = my;
    mx = mx->next;
  }
  mr = front;
  free_later = (Match_node *)((void *)0);
  front = (Match_node *)((void *)0);
  mx = mr;
  while ((unsigned int )mx != (unsigned int )((void *)0)) {
    mz = mx->next;
    match_cost ++;
    my = ml;
    while ((unsigned int )my != (unsigned int )((void *)0)) {
      match_cost ++;
      if ((unsigned int )mx->d == (unsigned int )my->d) {
        break;
      }
      my = my->next;
    }
    if ((unsigned int )my != (unsigned int )((void *)0)) {
      mx->next = free_later;
      free_later = mx;
    }
    if ((unsigned int )my == (unsigned int )((void *)0)) {
      mx->next = front;
      front = mx;
    }
    mx = mz;
  }
  mr = front;
  put_match_list(free_later);
  if ((unsigned int )mr == (unsigned int )((void *)0)) {
    __retres15 = ml;
    goto return_label;
  }
  mx = mr;
  while ((unsigned int )mx->next != (unsigned int )((void *)0)) {
    mx = mx->next;
  }
  mx->next = ml;
  __retres15 = mr;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres15);
  }
}
}
#pragma merger(0,"merge/idiom.i","")
extern  __attribute__((__nothrow__)) int sprintf(char * __restrict  __s , char const   * __restrict  __format 
                                                 , ...) ;
extern  __attribute__((__nothrow__)) int atoi(char const   *__nptr )  __attribute__((__pure__,
__nonnull__(1))) ;
int N_dict ;
Dict_node *dict_root ;
int line_number ;
Dict_node *insert_dict(Dict_node *n , Dict_node *new ) ;
void error(char *s ) ;
void insert_idiom(Dict_node *dn ) ;
int contains_underbar(char *s ) ;
int is_idiom_word(char *s ) ;
int contains_underbar(char *s ) 
{ int __retres2 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& s);
  while ((int )*s != 0) {
    if ((int )*s == 95) {
      __retres2 = 1;
      goto return_label;
    }
    s ++;
  }
  __retres2 = 0;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres2);
  }
}
}
int is_idiom_string(char *s ) 
{ char *t ;
  size_t tmp ;
  int __retres4 ;
  size_t __cil_tmp5 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& t);
  t = 0;
  simple_gc_frame[3] = (void *)(& s);
  t = s;
  while ((int )*t != 0) {
    if ((int )*t == 46) {
      __retres4 = 0;
      goto return_label;
    }
    t ++;
  }
  if ((int )*(s + 0) == 95) {
    __retres4 = 0;
    goto return_label;
  } else {
    __cil_tmp5 = strlen((char const   *)s);
    tmp = __cil_tmp5;
    if ((int )*(s + (tmp - 1U)) == 95) {
      __retres4 = 0;
      goto return_label;
    }
  }
  t = s;
  while ((int )*t != 0) {
    if ((int )*t == 95) {
      if ((int )*(t + 1) == 95) {
        __retres4 = 0;
        goto return_label;
      }
    }
    t ++;
  }
  __retres4 = 1;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres4);
  }
}
}
int is_number(char *s ) 
{ unsigned short const   **tmp ;
  int __retres3 ;
  unsigned short const   **__cil_tmp4 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[3] = (void *)(& s);
  while ((int )*s != 0) {
    __cil_tmp4 = __ctype_b_loc();
    tmp = __cil_tmp4;
    if (! ((int const   )*(*tmp + (int )*s) & 2048)) {
      __retres3 = 0;
      goto return_label;
    }
    s ++;
  }
  __retres3 = 1;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres3);
  }
}
}
int numberfy(char *s ) 
{ char *tmp ;
  char *tmp___0 ;
  int tmp___1 ;
  int tmp___2 ;
  int __retres6 ;
  int __cil_tmp7 ;
  int __cil_tmp8 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[3] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[4] = (void *)(& s);
  while (1) {
    if ((int )*s != 0) {
      if (! ((int )*s != 46)) {
        break;
      }
    } else {
      break;
    }
    s ++;
  }
  tmp = s;
  s ++;
  if ((int )*tmp != 46) {
    __retres6 = -1;
    goto return_label;
  }
  tmp___0 = s;
  s ++;
  if ((int )*tmp___0 != 73) {
    __retres6 = -1;
    goto return_label;
  }
  __cil_tmp7 = is_number(s);
  tmp___1 = __cil_tmp7;
  if (! tmp___1) {
    __retres6 = -1;
    goto return_label;
  }
  __cil_tmp8 = atoi((char const   *)s);
  tmp___2 = __cil_tmp8;
  __retres6 = tmp___2;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres6);
  }
}
}
int max_postfix_found(Dict_node *d ) 
{ int i ;
  int j ;
  int __cil_tmp4 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& d);
  i = 0;
  while ((unsigned int )d != (unsigned int )((void *)0)) {
    __cil_tmp4 = numberfy(d->string);
    j = __cil_tmp4;
    if (j > i) {
      i = j;
    }
    d = d->right;
  }
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (i);
  }
}
}
char *build_idiom_word_name(char *s ) 
{ char *new_s ;
  char *x ;
  int count___0 ;
  Dict_node *tmp ;
  int tmp___0 ;
  size_t tmp___1 ;
  void *tmp___2 ;
  Dict_node *__cil_tmp9 ;
  int __cil_tmp10 ;
  size_t __cil_tmp11 ;
  void *__cil_tmp12 ;
  extern struct gc_tag_struct *__gcstandard_atomic_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[7] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((5 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& new_s);
  new_s = 0;
  simple_gc_frame[3] = (void *)(& x);
  x = 0;
  simple_gc_frame[4] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[5] = (void *)(& tmp___2);
  tmp___2 = 0;
  simple_gc_frame[6] = (void *)(& s);
  __cil_tmp9 = dictionary_lookup(s);
  tmp = __cil_tmp9;
  __cil_tmp10 = max_postfix_found(tmp);
  tmp___0 = __cil_tmp10;
  count___0 = tmp___0 + 1;
  __cil_tmp11 = strlen((char const   *)s);
  tmp___1 = __cil_tmp11;
  __cil_tmp12 = GC_malloc(__gcstandard_atomic_tag, (int )(tmp___1 + 10U));
  tmp___2 = __cil_tmp12;
  x = (char *)tmp___2;
  new_s = x;
  while (1) {
    if ((int )*s != 0) {
      if (! ((int )*s != 46)) {
        break;
      }
    } else {
      break;
    }
    *x = *s;
    x ++;
    s ++;
  }
  sprintf((char * __restrict  )x, (char const   * __restrict  )".I%d", count___0);
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (new_s);
  }
}
}
Dict_node *make_idiom_Dict_nodes(char *s ) 
{ Dict_node *dn ;
  Dict_node *dn_new ;
  char *t ;
  int more ;
  void *tmp ;
  void *__cil_tmp7 ;
  extern struct gc_tag_struct *__gc_struct_Dict_node_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[7] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((5 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& dn);
  dn = 0;
  simple_gc_frame[3] = (void *)(& dn_new);
  dn_new = 0;
  simple_gc_frame[4] = (void *)(& t);
  t = 0;
  simple_gc_frame[5] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[6] = (void *)(& s);
  dn = (Dict_node *)((void *)0);
  while ((int )*s != 0) {
    t = s;
    while (1) {
      if ((int )*s != 0) {
        if (! ((int )*s != 95)) {
          break;
        }
      } else {
        break;
      }
      s ++;
    }
    if ((int )*s == 95) {
      more = 1;
      *s = (char )'\000';
    } else {
      more = 0;
    }
    __cil_tmp7 = GC_malloc(__gc_struct_Dict_node_struct_tag, (int )sizeof(Dict_node ));
    tmp = __cil_tmp7;
    dn_new = (Dict_node *)tmp;
    dn_new->right = dn;
    dn = dn_new;
    dn->string = t;
    dn->file = (Word_file *)((void *)0);
    if (more) {
      s ++;
    }
  }
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (dn);
  }
}
}
static char current_name[9]  = 
  {      (char )'A',      (char )'A',      (char )'A',      (char )'A', 
        (char )'A',      (char )'A',      (char )'A',      (char )'A', 
        (char )'\000'};
void increment_current_name(void) 
{ int i ;
  int carry ;

  {
  i = (int )((sizeof(current_name) - 1U) - 1U);
  carry = 1;
  while (carry == 1) {
    current_name[i] = (char )((int )current_name[i] + 1);
    if ((int )current_name[i] == 91) {
      current_name[i] = (char )'A';
      carry = 1;
    } else {
      carry = 0;
    }
    i --;
  }

  return;
}
}
char *generate_id_connector(void) 
{ unsigned int i ;
  char *t ;
  char *s ;
  void *tmp ;
  char *tmp___0 ;
  char *tmp___1 ;
  char *tmp___2 ;
  char *tmp___3 ;
  void *__cil_tmp9 ;
  extern struct gc_tag_struct *__gcstandard_atomic_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[9] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((7 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& t);
  t = 0;
  simple_gc_frame[3] = (void *)(& s);
  s = 0;
  simple_gc_frame[4] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[5] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[6] = (void *)(& tmp___1);
  tmp___1 = 0;
  simple_gc_frame[7] = (void *)(& tmp___2);
  tmp___2 = 0;
  simple_gc_frame[8] = (void *)(& tmp___3);
  tmp___3 = 0;
  i = 0U;
  while ((int )current_name[i] == 65) {
    i ++;
  }
  __cil_tmp9 = GC_malloc(__gcstandard_atomic_tag, (int )(((((sizeof(current_name) - 1U) - i) + 2U) + 1U) + 1U));
  tmp = __cil_tmp9;
  t = (char *)tmp;
  s = t;
  tmp___0 = t;
  t ++;
  *tmp___0 = (char )'I';
  tmp___1 = t;
  t ++;
  *tmp___1 = (char )'D';
  while (i < sizeof(current_name) - 1U) {
    tmp___2 = t;
    t ++;
    *tmp___2 = current_name[i];
    i ++;
  }
  tmp___3 = t;
  t ++;
  *tmp___3 = (char )'\000';
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (s);
  }
}
}
void insert_idiom(Dict_node *dn ) 
{ Exp *nc ;
  Exp *no ;
  Exp *n1 ;
  E_list *ell ;
  E_list *elr ;
  char *s ;
  int s_length ;
  Dict_node *dn_list ;
  Dict_node *xdn ;
  Dict_node *start_dn_list ;
  size_t tmp ;
  int tmp___0 ;
  void *tmp___1 ;
  void *tmp___2 ;
  void *tmp___3 ;
  void *tmp___4 ;
  void *tmp___5 ;
  void *tmp___6 ;
  void *tmp___7 ;
  void *tmp___8 ;
  void *tmp___9 ;
  void *tmp___10 ;
  void *tmp___11 ;
  void *tmp___12 ;
  size_t __cil_tmp26 ;
  int __cil_tmp27 ;
  Dict_node *__cil_tmp28 ;
  void *__cil_tmp29 ;
  char *__cil_tmp30 ;
  void *__cil_tmp31 ;
  void *__cil_tmp32 ;
  void *__cil_tmp33 ;
  void *__cil_tmp34 ;
  void *__cil_tmp35 ;
  void *__cil_tmp36 ;
  void *__cil_tmp37 ;
  char *__cil_tmp38 ;
  void *__cil_tmp39 ;
  char *__cil_tmp40 ;
  void *__cil_tmp41 ;
  void *__cil_tmp42 ;
  void *__cil_tmp43 ;
  char *__cil_tmp44 ;
  char *__cil_tmp45 ;
  Dict_node *__cil_tmp46 ;
  extern struct gc_tag_struct *__gc_struct_E_list_struct_tag ;
  extern struct gc_tag_struct *__gc_struct_Exp_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[24] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((22 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& nc);
  nc = 0;
  simple_gc_frame[3] = (void *)(& no);
  no = 0;
  simple_gc_frame[4] = (void *)(& n1);
  n1 = 0;
  simple_gc_frame[5] = (void *)(& ell);
  ell = 0;
  simple_gc_frame[6] = (void *)(& elr);
  elr = 0;
  simple_gc_frame[7] = (void *)(& s);
  s = 0;
  simple_gc_frame[8] = (void *)(& dn_list);
  dn_list = 0;
  simple_gc_frame[9] = (void *)(& xdn);
  xdn = 0;
  simple_gc_frame[10] = (void *)(& start_dn_list);
  start_dn_list = 0;
  simple_gc_frame[11] = (void *)(& tmp___1);
  tmp___1 = 0;
  simple_gc_frame[12] = (void *)(& tmp___2);
  tmp___2 = 0;
  simple_gc_frame[13] = (void *)(& tmp___3);
  tmp___3 = 0;
  simple_gc_frame[14] = (void *)(& tmp___4);
  tmp___4 = 0;
  simple_gc_frame[15] = (void *)(& tmp___5);
  tmp___5 = 0;
  simple_gc_frame[16] = (void *)(& tmp___6);
  tmp___6 = 0;
  simple_gc_frame[17] = (void *)(& tmp___7);
  tmp___7 = 0;
  simple_gc_frame[18] = (void *)(& tmp___8);
  tmp___8 = 0;
  simple_gc_frame[19] = (void *)(& tmp___9);
  tmp___9 = 0;
  simple_gc_frame[20] = (void *)(& tmp___10);
  tmp___10 = 0;
  simple_gc_frame[21] = (void *)(& tmp___11);
  tmp___11 = 0;
  simple_gc_frame[22] = (void *)(& tmp___12);
  tmp___12 = 0;
  simple_gc_frame[23] = (void *)(& dn);
  no = dn->exp;
  s = dn->string;
  __cil_tmp26 = strlen((char const   *)s);
  tmp = __cil_tmp26;
  s_length = (int )tmp;
  __cil_tmp27 = is_idiom_string(s);
  tmp___0 = __cil_tmp27;
  if (! tmp___0) {
    printf((char const   * __restrict  )"*** Word \"%s\" on line %d is not", s, line_number);
    printf((char const   * __restrict  )" a correctly formed idiom string.\n");
    printf((char const   * __restrict  )"    This word will be ignored\n");

    goto return_label;
  }
  __cil_tmp28 = make_idiom_Dict_nodes(s);
  start_dn_list = __cil_tmp28;
  dn_list = start_dn_list;
  if ((unsigned int )dn_list->right == (unsigned int )((void *)0)) {
    error((char *)"Idiom string with only one connector -- should have been caught");
  }
  __cil_tmp29 = GC_malloc(__gc_struct_Exp_struct_tag, (int )sizeof(Exp ));
  tmp___1 = __cil_tmp29;
  nc = (Exp *)tmp___1;
  __cil_tmp30 = generate_id_connector();
  nc->u.string = __cil_tmp30;
  GC_autotag_union(& nc->u, 1);
  nc->dir = (char )'-';
  nc->multi = (char)0;
  nc->type = (char)2;
  nc->cost = (unsigned char)0;
  __cil_tmp31 = GC_malloc(__gc_struct_Exp_struct_tag, (int )sizeof(Exp ));
  tmp___2 = __cil_tmp31;
  n1 = (Exp *)tmp___2;
  __cil_tmp32 = GC_malloc(__gc_struct_E_list_struct_tag, (int )sizeof(E_list ));
  tmp___3 = __cil_tmp32;
  ell = (E_list *)tmp___3;
  n1->u.l = ell;
  GC_autotag_union(& n1->u, 0);
  __cil_tmp33 = GC_malloc(__gc_struct_E_list_struct_tag, (int )sizeof(E_list ));
  tmp___4 = __cil_tmp33;
  elr = (E_list *)tmp___4;
  ell->next = elr;
  elr->next = (E_list *)((void *)0);
  ell->e = nc;
  elr->e = no;
  n1->type = (char)1;
  n1->cost = (unsigned char)0;
  dn_list->exp = n1;
  dn_list = dn_list->right;
  while ((unsigned int )dn_list->right != (unsigned int )((void *)0)) {
    __cil_tmp34 = GC_malloc(__gc_struct_Exp_struct_tag, (int )sizeof(Exp ));
    tmp___5 = __cil_tmp34;
    n1 = (Exp *)tmp___5;
    n1->u.string = (char *)((void *)0);
    GC_autotag_union(& n1->u, 1);
    n1->type = (char)1;
    n1->cost = (unsigned char)0;
    __cil_tmp35 = GC_malloc(__gc_struct_E_list_struct_tag, (int )sizeof(E_list ));
    tmp___6 = __cil_tmp35;
    ell = (E_list *)tmp___6;
    n1->u.l = ell;
    GC_autotag_union(& n1->u, 0);
    __cil_tmp36 = GC_malloc(__gc_struct_E_list_struct_tag, (int )sizeof(E_list ));
    tmp___7 = __cil_tmp36;
    elr = (E_list *)tmp___7;
    ell->next = elr;
    elr->next = (E_list *)((void *)0);
    __cil_tmp37 = GC_malloc(__gc_struct_Exp_struct_tag, (int )sizeof(Exp ));
    tmp___8 = __cil_tmp37;
    nc = (Exp *)tmp___8;
    __cil_tmp38 = generate_id_connector();
    nc->u.string = __cil_tmp38;
    GC_autotag_union(& nc->u, 1);
    nc->dir = (char )'+';
    nc->multi = (char)0;
    nc->type = (char)2;
    nc->cost = (unsigned char)0;
    elr->e = nc;
    increment_current_name();
    __cil_tmp39 = GC_malloc(__gc_struct_Exp_struct_tag, (int )sizeof(Exp ));
    tmp___9 = __cil_tmp39;
    nc = (Exp *)tmp___9;
    __cil_tmp40 = generate_id_connector();
    nc->u.string = __cil_tmp40;
    GC_autotag_union(& nc->u, 1);
    nc->dir = (char )'-';
    nc->multi = (char)0;
    nc->type = (char)2;
    nc->cost = (unsigned char)0;
    ell->e = nc;
    dn_list->exp = n1;
    dn_list = dn_list->right;
  }
  __cil_tmp41 = GC_malloc(__gc_struct_Exp_struct_tag, (int )sizeof(Exp ));
  tmp___10 = __cil_tmp41;
  nc = (Exp *)tmp___10;
  __cil_tmp42 = GC_malloc(__gc_struct_E_list_struct_tag, (int )sizeof(E_list ));
  tmp___11 = __cil_tmp42;
  ell = (E_list *)tmp___11;
  nc->u.l = ell;
  GC_autotag_union(& nc->u, 0);
  __cil_tmp43 = GC_malloc(__gc_struct_E_list_struct_tag, (int )sizeof(E_list ));
  tmp___12 = __cil_tmp43;
  elr = (E_list *)tmp___12;
  ell->next = elr;
  elr->next = (E_list *)((void *)0);
  elr->e = (Exp *)((void *)0);
  ell->e = elr->e;
  __cil_tmp44 = generate_id_connector();
  nc->u.string = __cil_tmp44;
  GC_autotag_union(& nc->u, 1);
  nc->dir = (char )'+';
  nc->multi = (char)0;
  nc->type = (char)2;
  nc->cost = (unsigned char)0;
  dn_list->exp = nc;
  increment_current_name();
  dn_list = start_dn_list;
  while ((unsigned int )dn_list != (unsigned int )((void *)0)) {
    xdn = dn_list->right;
    dn_list->right = (Dict_node *)((void *)0);
    dn_list->left = dn_list->right;
    __cil_tmp45 = build_idiom_word_name(dn_list->string);
    dn_list->string = __cil_tmp45;
    __cil_tmp46 = insert_dict(dict_root, dn_list);
    dict_root = __cil_tmp46;
    N_dict ++;
    dn_list = xdn;
  }

  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
int is_idiom_word(char *s ) 
{ int tmp ;
  int __retres3 ;
  int __cil_tmp4 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& s);
  __cil_tmp4 = numberfy(s);
  tmp = __cil_tmp4;
  __retres3 = tmp != -1;
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres3);
  }
}
}
#pragma merger(0,"merge/main.i","")
extern struct _IO_FILE *stdin ;
extern struct _IO_FILE *stderr ;
extern  __attribute__((__nothrow__)) int sscanf(char const   * __restrict  __s , char const   * __restrict  __format 
                                                , ...) ;
extern char *fgets(char * __restrict  __s , int __n , FILE * __restrict  __stream ) ;
extern  __attribute__((__nothrow__)) int tolower(int __c ) ;
extern  __attribute__((__nothrow__)) int toupper(int __c ) ;
extern  __attribute__((__nothrow__)) char *strncpy(char * __restrict  __dest , char const   * __restrict  __src ,
                                                   size_t __n )  __attribute__((__nonnull__(1,2))) ;
extern  __attribute__((__nothrow__)) int strncmp(char const   *__s1 , char const   *__s2 ,
                                                 size_t __n )  __attribute__((__pure__,
__nonnull__(1,2))) ;
extern  __attribute__((__nothrow__)) char *strchr(char const   *__s , int __c )  __attribute__((__pure__,
__nonnull__(1))) ;
 __attribute__((__nothrow__)) int strncasecmp(char const   *s1 , char const   *s2 ,
                                              size_t n )  __attribute__((__pure__,
__nonnull__(1,2))) ;
extern void qsort(void *__base , size_t __nmemb , size_t __size , int (*__compar)(void const   * ,
                                                                                  void const   * ) )  __attribute__((__nonnull__(1,4))) ;
void initialize_memory(void) ;
int postprocess_defined  ;
int unknown_word_defined  ;
int capitalized_word_defined  ;
int null_links ;
int screen_width ;
int display_short ;
int display_postscript ;
int display_word_subscripts ;
int display_link_subscripts ;
int display_walls ;
int echo_on ;
int www_mode ;
int just_one ;
int parse_cost  ;
int mark_cost  ;
int N_in_table  ;
int N_hash_lookups  ;
int work_in_hash_lookups  ;
int space_in_use  ;
int max_space_in_use  ;
char *deletable[250]  ;
void read_dictionary(void) ;
void open_dictionary(char *s ) ;
int boolean_dictionary_lookup(char *s ) ;
Dict_node *abridged_lookup(char *s ) ;
int delete_dictionary_words(char *s ) ;
void print_disjunct_counts(void) ;
void prune(void) ;
void power_prune(int mode ) ;
void free_X_nodes(X_node *x ) ;
void init_randtable(void) ;
void init_table(void) ;
void free_table(void) ;
int files_need_saving(void) ;
void save_files(void) ;
Disjunct *eliminate_duplicate_disjuncts(Disjunct *d ) ;
void print_sentence(FILE *fp , int w ) ;
void free_strings(void) ;
void free_lookup_list(void) ;
X_node *catenate_X_nodes(X_node *d1 , X_node *d2 ) ;
void construct_comma(void) ;
void construct_either(void) ;
void construct_neither(void) ;
void construct_notonlybut(void) ;
void construct_both(void) ;
int sentence_contains(char *s ) ;
int parse(int cost ) ;
void expression_prune(void) ;
void print_expression_sizes(void) ;
void compute_chosen_words(void) ;
void conjunction_prune(void) ;
int maxlinklength  =    250;
int null_link_search  =    1;
int use_unknown_word  =    1;
int verbosity  =    0;
int screen_width  =    79;
int display_short  =    1;
int display_on  =    1;
int display_links  =    0;
int display_bad  =    0;
int display_fat  =    0;
int display_multiple  =    1;
int display_postscript  =    0;
int display_word_subscripts  =    1;
int display_link_subscripts  =    1;
int display_walls  =    0;
int echo_on  =    0;
int www_mode  =    0;
int just_one  =    0;
int linkage_count_limit  =    5000;
int word_count_limit  =    250;
int null_links  =    1;
double cumulative_time  ;
int issue_sentence_word(char *s ) 
{ size_t tmp ;
  int __retres3 ;
  size_t __cil_tmp4 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& s);
  if ((int )*s == 0) {
    __retres3 = 1;
    goto return_label;
  }
  __cil_tmp4 = strlen((char const   *)s);
  tmp = __cil_tmp4;
  if (tmp >= 60U) {
    printf((char const   * __restrict  )"The word \"%s\" is too long.\n", s);
    printf((char const   * __restrict  )"A word can have a maximum of %d characters.\n",
           59);
    __retres3 = 0;
    goto return_label;
  }
  if (N_words == 250) {
    printf((char const   * __restrict  )"The sentence has too many words.\n");
    __retres3 = 0;
    goto return_label;
  }
  strcpy((char * __restrict  )(sentence[N_words].string), (char const   * __restrict  )s);
  N_words ++;
  __retres3 = 1;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres3);
  }
}
}
char *strip_left[3]  = {      (char *)"(",      (char *)"$",      (char *)((void *)0)};
char *strip_right[11]  = 
  {      (char *)")",      (char *)"%",      (char *)",",      (char *)".", 
        (char *)":",      (char *)";",      (char *)"?",      (char *)"!", 
        (char *)"\'",      (char *)"\'s",      (char *)((void *)0)};
int separate_word(char *w , char *wend , int is_first_word ) 
{ int i ;
  int len ;
  int n_stripped ;
  int stripped[10] ;
  char word[61] ;
  int tmp ;
  size_t tmp___0 ;
  size_t tmp___1 ;
  int tmp___2 ;
  int tmp___3 ;
  int tmp___4 ;
  int tmp___5 ;
  int tmp___6 ;
  int tmp___7 ;
  unsigned short const   **tmp___8 ;
  size_t tmp___9 ;
  int tmp___10 ;
  int tmp___11 ;
  int tmp___12 ;
  int __retres23 ;
  size_t __cil_tmp24 ;
  int __cil_tmp25 ;
  int __cil_tmp26 ;
  size_t __cil_tmp27 ;
  int __cil_tmp28 ;
  unsigned short const   **__cil_tmp29 ;
  int __cil_tmp30 ;
  int __cil_tmp31 ;
  int __cil_tmp32 ;
  int __cil_tmp33 ;
  size_t __cil_tmp34 ;
  int __cil_tmp35 ;
  int __cil_tmp36 ;
  int __cil_tmp37 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& tmp___8);
  tmp___8 = 0;
  simple_gc_frame[3] = (void *)(& w);
  simple_gc_frame[4] = (void *)(& wend);
  while (1) {
    i = 0;
    while ((unsigned int )strip_left[i] != (unsigned int )((void *)0)) {
      __cil_tmp24 = strlen((char const   *)strip_left[i]);
      tmp___1 = __cil_tmp24;
      __cil_tmp25 = strncmp((char const   *)w, (char const   *)strip_left[i], tmp___1);
      tmp___2 = __cil_tmp25;
      if (tmp___2 == 0) {
        __cil_tmp26 = issue_sentence_word(strip_left[i]);
        tmp = __cil_tmp26;
        if (! tmp) {
          __retres23 = 0;
          goto return_label;
        }
        __cil_tmp27 = strlen((char const   *)strip_left[i]);
        tmp___0 = __cil_tmp27;
        w += tmp___0;
        break;
      }
      i ++;
    }
    if ((unsigned int )strip_left[i] == (unsigned int )((void *)0)) {
      break;
    }
  }
  n_stripped = 0;
  while (n_stripped < 10) {
    strncpy((char * __restrict  )(word), (char const   * __restrict  )w, (unsigned int )(wend - w));
    word[wend - w] = (char )'\000';
    if ((unsigned int )wend == (unsigned int )w) {
      break;
    }
    __cil_tmp28 = boolean_dictionary_lookup(word);
    tmp___3 = __cil_tmp28;
    if (tmp___3) {
      break;
    }
    if (is_first_word) {
      __cil_tmp29 = __ctype_b_loc();
      tmp___8 = __cil_tmp29;
      if ((int const   )*(*tmp___8 + (int )word[0]) & 256) {
        __cil_tmp30 = tolower((int )word[0]);
        tmp___4 = __cil_tmp30;
        word[0] = (char )tmp___4;
        __cil_tmp31 = boolean_dictionary_lookup(word);
        tmp___6 = __cil_tmp31;
        if (tmp___6) {
          __cil_tmp32 = toupper((int )word[0]);
          tmp___5 = __cil_tmp32;
          word[0] = (char )tmp___5;
          break;
        }
        __cil_tmp33 = toupper((int )word[0]);
        tmp___7 = __cil_tmp33;
        word[0] = (char )tmp___7;
      }
    }
    i = 0;
    while ((unsigned int )strip_right[i] != (unsigned int )((void *)0)) {
      __cil_tmp34 = strlen((char const   *)strip_right[i]);
      tmp___9 = __cil_tmp34;
      len = (int )tmp___9;
      if (wend - w < len) {
        goto __Cont;
      }
      __cil_tmp35 = strncmp((char const   *)(wend - len), (char const   *)strip_right[i],
                            (unsigned int )len);
      tmp___10 = __cil_tmp35;
      if (tmp___10 == 0) {
        stripped[n_stripped] = i;
        wend -= len;
        break;
      }
      __Cont: 
      i ++;
    }
    if ((unsigned int )strip_right[i] == (unsigned int )((void *)0)) {
      break;
    }
    n_stripped ++;
  }
  if (n_stripped == 10) {
    printf((char const   * __restrict  )"\"%s\" is followed by too many punctuation marks.\n",
           word);
    __retres23 = 0;
    goto return_label;
  }
  __cil_tmp36 = issue_sentence_word(word);
  tmp___11 = __cil_tmp36;
  if (! tmp___11) {
    __retres23 = 0;
    goto return_label;
  }
  i = n_stripped - 1;
  while (i >= 0) {
    __cil_tmp37 = issue_sentence_word(strip_right[stripped[i]]);
    tmp___12 = __cil_tmp37;
    if (! tmp___12) {
      __retres23 = 0;
      goto return_label;
    }
    i --;
  }
  __retres23 = 1;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres23);
  }
}
}
int separate_sentence(char *s ) 
{ char *t ;
  int is_first ;
  int tmp ;
  unsigned short const   **tmp___0 ;
  unsigned short const   **tmp___1 ;
  int tmp___2 ;
  int tmp___3 ;
  int __retres9 ;
  int __cil_tmp10 ;
  unsigned short const   **__cil_tmp11 ;
  unsigned short const   **__cil_tmp12 ;
  int __cil_tmp13 ;
  int __cil_tmp14 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& t);
  t = 0;
  simple_gc_frame[3] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[4] = (void *)(& tmp___1);
  tmp___1 = 0;
  simple_gc_frame[5] = (void *)(& s);
  N_words = 0;
  if (left_wall_defined) {
    __cil_tmp10 = issue_sentence_word((char *)"LEFT-WALL");
    tmp = __cil_tmp10;
    if (! tmp) {
      __retres9 = 0;
      goto return_label;
    }
  }
  is_first = 1;
  while (1) {
    while (1) {
      __cil_tmp11 = __ctype_b_loc();
      tmp___0 = __cil_tmp11;
      if (! ((int const   )*(*tmp___0 + (int )*s) & 8192)) {
        if (! ((int )*s == 34)) {
          break;
        }
      }
      s ++;
    }
    if ((int )*s == 0) {
      break;
    }
    t = s;
    while (1) {
      __cil_tmp12 = __ctype_b_loc();
      tmp___1 = __cil_tmp12;
      if ((int const   )*(*tmp___1 + (int )*t) & 8192) {
        break;
      } else {
        if ((int )*t == 34) {
          break;
        } else {
          if ((int )*t == 0) {
            break;
          }
        }
      }
      t ++;
    }
    __cil_tmp13 = separate_word(s, t, is_first);
    tmp___2 = __cil_tmp13;
    if (! tmp___2) {
      __retres9 = 0;
      goto return_label;
    }
    is_first = 0;
    s = t;
    if ((int )*s == 0) {
      break;
    }
  }
  if (right_wall_defined) {
    __cil_tmp14 = issue_sentence_word((char *)"RIGHT-WALL");
    tmp___3 = __cil_tmp14;
    if (! tmp___3) {
      __retres9 = 0;
      goto return_label;
    }
  }
  __retres9 = N_words > left_wall_defined + right_wall_defined;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres9);
  }
}
}
int isnumber(char *s ) 
{ unsigned short const   **tmp ;
  unsigned short const   **tmp___0 ;
  int __retres4 ;
  unsigned short const   **__cil_tmp5 ;
  unsigned short const   **__cil_tmp6 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[3] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[4] = (void *)(& s);
  __cil_tmp5 = __ctype_b_loc();
  tmp = __cil_tmp5;
  if (! ((int const   )*(*tmp + (int )*s) & 2048)) {
    __retres4 = 0;
    goto return_label;
  }
  while ((int )*s != 0) {
    __cil_tmp6 = __ctype_b_loc();
    tmp___0 = __cil_tmp6;
    if (! ((int const   )*(*tmp___0 + (int )*s) & 2048)) {
      if ((int )*s != 46) {
        if ((int )*s != 44) {
          __retres4 = 0;
          goto return_label;
        }
      }
    }
    s ++;
  }
  __retres4 = 1;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres4);
  }
}
}
int ishyphenated(char *s ) 
{ int hyp ;
  int nonalpha ;
  unsigned short const   **tmp ;
  unsigned short const   **tmp___0 ;
  int tmp___1 ;
  int __retres7 ;
  unsigned short const   **__cil_tmp8 ;
  unsigned short const   **__cil_tmp9 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[3] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[4] = (void *)(& s);
  nonalpha = 0;
  hyp = nonalpha;
  if ((int )*s == 45) {
    __retres7 = 0;
    goto return_label;
  }
  while ((int )*s != 0) {
    __cil_tmp8 = __ctype_b_loc();
    tmp = __cil_tmp8;
    if (! ((int const   )*(*tmp + (int )*s) & 1024)) {
      __cil_tmp9 = __ctype_b_loc();
      tmp___0 = __cil_tmp9;
      if (! ((int const   )*(*tmp___0 + (int )*s) & 2048)) {
        if ((int )*s != 46) {
          if ((int )*s != 44) {
            if ((int )*s != 45) {
              __retres7 = 0;
              goto return_label;
            }
          }
        }
      }
    }
    if ((int )*s == 45) {
      hyp ++;
    }
    s ++;
  }
  if ((int )*(s - 1) != 45) {
    if (hyp > 0) {
      tmp___1 = 1;
    } else {
      tmp___1 = 0;
    }
  } else {
    tmp___1 = 0;
  }
  __retres7 = tmp___1;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres7);
  }
}
}
void free_sentence_disjuncts(void) 
{ int i ;

  {
  i = 0;
  while (i < N_words) {
    free_disjuncts(sentence[i].d);
    i ++;
  }

  return;
}
}
void free_sentence_expressions(void) 
{ int i ;

  {
  i = 0;
  while (i < N_words) {
    free_X_nodes(sentence[i].x);
    i ++;
  }

  return;
}
}
int special_string(int i , char *s ) 
{ X_node *e ;
  int tmp ;
  int __retres5 ;
  int __cil_tmp6 ;
  X_node *__cil_tmp7 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& e);
  e = 0;
  simple_gc_frame[3] = (void *)(& s);
  __cil_tmp6 = boolean_dictionary_lookup(s);
  tmp = __cil_tmp6;
  if (tmp) {
    __cil_tmp7 = build_word_expressions(s);
    sentence[i].x = __cil_tmp7;
    e = sentence[i].x;
    while ((unsigned int )e != (unsigned int )((void *)0)) {
      e->string = sentence[i].string;
      e = e->next;
    }
    __retres5 = 1;
    goto return_label;
  } else {
    printf((char const   * __restrict  )"To process this sentence your dictionary ");
    printf((char const   * __restrict  )"needs the word \"%s\".\n", s);
    __retres5 = 0;
    goto return_label;
  }
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres5);
  }
}
}
void handle_unknown_word(int i , char *s ) 
{ char *t ;
  X_node *d ;
  char str[61] ;
  size_t tmp ;
  void *tmp___0 ;
  size_t tmp___1 ;
  X_node *__cil_tmp9 ;
  char *__cil_tmp10 ;
  size_t __cil_tmp11 ;
  void *__cil_tmp12 ;
  size_t __cil_tmp13 ;
  extern struct gc_tag_struct *__gcstandard_atomic_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& t);
  t = 0;
  simple_gc_frame[3] = (void *)(& d);
  d = 0;
  simple_gc_frame[4] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[5] = (void *)(& s);
  __cil_tmp9 = build_word_expressions((char *)"UNKNOWN-WORD");
  sentence[i].x = __cil_tmp9;
  if ((unsigned int )sentence[i].x == (unsigned int )((void *)0)) {
    printf((char const   * __restrict  )"Assertion failed: %s\n", "UNKNOWN_WORD should have been there");
    exit(1);
  }
  d = sentence[i].x;
  while ((unsigned int )d != (unsigned int )((void *)0)) {
    __cil_tmp10 = strchr((char const   *)d->string, '.');
    t = __cil_tmp10;
    if ((unsigned int )t != (unsigned int )((void *)0)) {
      sprintf((char * __restrict  )(str), (char const   * __restrict  )"%.50s[?].%.5s",
              s, t + 1);
    } else {
      sprintf((char * __restrict  )(str), (char const   * __restrict  )"%.50s[?]",
              s);
    }
    __cil_tmp11 = strlen((char const   *)(str));
    tmp = __cil_tmp11;
    __cil_tmp12 = GC_malloc(__gcstandard_atomic_tag, (int )(tmp + 1U));
    tmp___0 = __cil_tmp12;
    t = (char *)tmp___0;
    __cil_tmp13 = strlen((char const   *)(str));
    tmp___1 = __cil_tmp13;
    free_this_string_later(t, (int )(tmp___1 + 1U));
    strcpy((char * __restrict  )t, (char const   * __restrict  )(str));
    d->string = t;
    d = d->next;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
int build_sentence_expressions(void) 
{ int i ;
  int first_word ;
  char *s ;
  char *t ;
  X_node *e ;
  int tmp ;
  int tmp___0 ;
  int tmp___1 ;
  int tmp___2 ;
  int tmp___3 ;
  unsigned short const   **tmp___4 ;
  int tmp___5 ;
  size_t tmp___6 ;
  void *tmp___7 ;
  size_t tmp___8 ;
  int tmp___9 ;
  int tmp___10 ;
  int tmp___11 ;
  int tmp___12 ;
  unsigned short const   **tmp___13 ;
  int __retres21 ;
  int __cil_tmp22 ;
  X_node *__cil_tmp23 ;
  unsigned short const   **__cil_tmp24 ;
  int __cil_tmp25 ;
  int __cil_tmp26 ;
  int __cil_tmp27 ;
  int __cil_tmp28 ;
  int __cil_tmp29 ;
  unsigned short const   **__cil_tmp30 ;
  size_t __cil_tmp31 ;
  void *__cil_tmp32 ;
  size_t __cil_tmp33 ;
  int __cil_tmp34 ;
  int __cil_tmp35 ;
  int __cil_tmp36 ;
  X_node *__cil_tmp37 ;
  X_node *__cil_tmp38 ;
  int __cil_tmp39 ;
  X_node *__cil_tmp40 ;
  extern struct gc_tag_struct *__gcstandard_atomic_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[8] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((6 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& s);
  s = 0;
  simple_gc_frame[3] = (void *)(& t);
  t = 0;
  simple_gc_frame[4] = (void *)(& e);
  e = 0;
  simple_gc_frame[5] = (void *)(& tmp___4);
  tmp___4 = 0;
  simple_gc_frame[6] = (void *)(& tmp___7);
  tmp___7 = 0;
  simple_gc_frame[7] = (void *)(& tmp___13);
  tmp___13 = 0;
  if (left_wall_defined) {
    first_word = 1;
  } else {
    first_word = 0;
  }
  i = 0;
  while (i < N_words) {
    s = sentence[i].string;
    __cil_tmp22 = boolean_dictionary_lookup(s);
    tmp___5 = __cil_tmp22;
    if (tmp___5) {
      __cil_tmp23 = build_word_expressions(s);
      sentence[i].x = __cil_tmp23;
    } else {
      __cil_tmp24 = __ctype_b_loc();
      tmp___4 = __cil_tmp24;
      if ((int const   )*(*tmp___4 + (int )*(s + 0)) & 256) {
        if (capitalized_word_defined) {
          __cil_tmp25 = special_string(i, (char *)"CAPITALIZED-WORDS");
          tmp = __cil_tmp25;
          if (! tmp) {
            __retres21 = 0;
            goto return_label;
          }
        } else {
          goto _L;
        }
      } else {
        _L: 
        __cil_tmp26 = isnumber(s);
        tmp___3 = __cil_tmp26;
        if (tmp___3) {
          __cil_tmp27 = special_string(i, (char *)"NUMBERS");
          tmp___0 = __cil_tmp27;
          if (! tmp___0) {
            __retres21 = 0;
            goto return_label;
          }
        } else {
          __cil_tmp28 = ishyphenated(s);
          tmp___2 = __cil_tmp28;
          if (tmp___2) {
            __cil_tmp29 = special_string(i, (char *)"HYPHENATED-WORDS");
            tmp___1 = __cil_tmp29;
            if (! tmp___1) {
              __retres21 = 0;
              goto return_label;
            }
          } else {
            if (unknown_word_defined) {
              if (use_unknown_word) {
                handle_unknown_word(i, s);
              } else {
                printf((char const   * __restrict  )"Assertion failed: %s\n", "I should have found that word.");
                exit(1);
              }
            } else {
              printf((char const   * __restrict  )"Assertion failed: %s\n", "I should have found that word.");
              exit(1);
            }
          }
        }
      }
    }
    i ++;
  }
  s = sentence[first_word].string;
  __cil_tmp30 = __ctype_b_loc();
  tmp___13 = __cil_tmp30;
  if ((int const   )*(*tmp___13 + (int )*(s + 0)) & 256) {
    __cil_tmp31 = strlen((char const   *)s);
    tmp___6 = __cil_tmp31;
    __cil_tmp32 = GC_malloc(__gcstandard_atomic_tag, (int )(tmp___6 + 1U));
    tmp___7 = __cil_tmp32;
    t = (char *)tmp___7;
    __cil_tmp33 = strlen((char const   *)s);
    tmp___8 = __cil_tmp33;
    free_this_string_later(t, (int )(tmp___8 + 1U));
    strcpy((char * __restrict  )t, (char const   * __restrict  )s);
    __cil_tmp34 = tolower((int )*(t + 0));
    tmp___9 = __cil_tmp34;
    *(t + 0) = (char )tmp___9;
    __cil_tmp35 = boolean_dictionary_lookup(t);
    tmp___12 = __cil_tmp35;
    if (tmp___12) {
      __cil_tmp36 = boolean_dictionary_lookup(s);
      tmp___11 = __cil_tmp36;
      if (tmp___11) {
        __cil_tmp37 = build_word_expressions(t);
        e = __cil_tmp37;
        __cil_tmp38 = catenate_X_nodes(sentence[first_word].x, e);
        sentence[first_word].x = __cil_tmp38;
      } else {
        __cil_tmp39 = tolower((int )*(s + 0));
        tmp___10 = __cil_tmp39;
        *(s + 0) = (char )tmp___10;
        __cil_tmp40 = build_word_expressions(s);
        e = __cil_tmp40;
        free_X_nodes(sentence[first_word].x);
        sentence[first_word].x = e;
      }
    }
  }
  __retres21 = 1;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres21);
  }
}
}
void print_statistics(void) 
{ 

  {
  printf((char const   * __restrict  )"\n");
  printf((char const   * __restrict  )"%d parse cost\n", parse_cost);
  printf((char const   * __restrict  )"%d mark cost\n", mark_cost);
  printf((char const   * __restrict  )"%d in hash table\n", N_in_table);
  printf((char const   * __restrict  )"%d hash lookups\n", N_hash_lookups);
  printf((char const   * __restrict  )"%f cost per lookup\n", (float )work_in_hash_lookups / (float )N_hash_lookups);
  printf((char const   * __restrict  )"%d maximum bytes ever in use\n", max_space_in_use);
  printf((char const   * __restrict  )"%d unreclaimed space\n", space_in_use);

  return;
}
}
void clean_up_string(char *s ) 
{ char *x ;
  char *y ;
  unsigned short const   **tmp ;
  unsigned short const   **__cil_tmp5 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& x);
  x = 0;
  simple_gc_frame[3] = (void *)(& y);
  y = 0;
  simple_gc_frame[4] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[5] = (void *)(& s);
  x = s;
  y = x;
  while ((int )*x != 0) {
    __cil_tmp5 = __ctype_b_loc();
    tmp = __cil_tmp5;
    if ((int const   )*(*tmp + (int )*x) & 8192) {
      x ++;
    } else {
      *y = *x;
      x ++;
      y ++;
    }
  }
  *y = (char )'\000';

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
struct __anonstruct_user_variable_28 user_variable[19]  = 
  {      {(char *)"verbosity", & verbosity, 0, (char *)"Level of detail to give about the computation"}, 
        {(char *)"width",
      & screen_width, 0, (char *)"The width of your screen"}, 
        {(char *)"limit", & linkage_count_limit, 0, (char *)"The maximum number of linkages processed"}, 
        {(char *)"graphics",
      & display_on, 1, (char *)"Graphical link display"}, 
        {(char *)"multiple", & display_multiple, 1, (char *)"Expansion of fat (conjunctive) linkages"}, 
        {(char *)"short",
      & display_short, 1, (char *)"Reduced height display"}, 
        {(char *)"postscript", & display_postscript, 1, (char *)"Generating of postscript data"}, 
        {(char *)"links",
      & display_links, 1, (char *)"Showing of complete link data"}, 
        {(char *)"bad", & display_bad, 1, (char *)"Showing of linkages failing postprocessing"}, 
        {(char *)"fat",
      & display_fat, 1, (char *)"Showing of fat (conjunctive) linkages"}, 
        {(char *)"lsubscripts", & display_link_subscripts, 1, (char *)"Showing of complete link labels"}, 
        {(char *)"wsubscripts",
      & display_word_subscripts, 1, (char *)"Showing of word subscripts"}, 
        {(char *)"walls", & display_walls, 1, (char *)"Always show the walls"}, 
        {(char *)"null", & null_link_search, 1, (char *)"Null link search"}, 
        {(char *)"unknown", & use_unknown_word, 1, (char *)"Using of the \"unknown word\" definition"}, 
        {(char *)"echo",
      & echo_on, 1, (char *)"Echoing of input sentence"}, 
        {(char *)"www", & www_mode, 1, (char *)"Suppression of prompt"}, 
        {(char *)"justone", & just_one, 1, (char *)"Displaying of just one linkage"}, 
        {(char *)"",
      (int *)((void *)0), 0, (char *)""}};
struct __anonstruct_user_command_29 user_command[5]  = {      {(char *)"quit", (char *)"Exit the system"}, 
        {(char *)"save", (char *)"Save your changes to the dictionary"}, 
        {(char *)"variables", (char *)"List user-settable variables and their functions"}, 
        {(char *)"help",
      (char *)"List the commands and what they do"}, 
        {(char *)((void *)0), (char *)((void *)0)}};
int is_numerical_rhs(char *s ) 
{ unsigned short const   **tmp ;
  int __retres3 ;
  unsigned short const   **__cil_tmp4 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[3] = (void *)(& s);
  if ((int )*s == 43) {
    s ++;
  } else {
    if ((int )*s == 45) {
      s ++;
    }
  }
  while (1) {
    __cil_tmp4 = __ctype_b_loc();
    tmp = __cil_tmp4;
    if (! ((int const   )*(*tmp + (int )*s) & 2048)) {
      __retres3 = 0;
      goto return_label;
    }
    s ++;
    if (! ((int )*s != 0)) {
      break;
    }
  }
  __retres3 = 1;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres3);
  }
}
}
void massage_variables(int j ) 
{ int i ;

  {
  i = 0;
  while ((unsigned int )user_variable[i].p != (unsigned int )((void *)0)) {
    if (user_variable[i].isboolean) {
      *(user_variable[i].p) = ! (! *(user_variable[i].p));
    }
    i ++;
  }
  if (! display_on) {
    if (display_multiple) {
      goto _L___0;
    } else {
      if (display_bad) {
        goto _L___0;
      } else {
        if (display_fat) {
          _L___0: 
          if ((unsigned int )user_variable[j].p == (unsigned int )(& display_on)) {
            display_fat = 0;
            display_bad = display_fat;
            display_multiple = display_bad;
          } else {
            display_on = 1;
          }
        } else {
          goto _L;
        }
      }
    }
  } else {
    _L: 
    if (display_on) {
      if (! display_multiple) {
        if (! display_bad) {
          if (! display_fat) {
            if ((unsigned int )user_variable[j].p == (unsigned int )(& display_on)) {
              display_multiple = 1;
            } else {
              display_on = 0;
            }
          }
        }
      }
    }
  }

  return;
}
}
void special_command(char *line ) 
{ char *x ;
  char *y ;
  char *s ;
  char myline[1000] ;
  int i ;
  int count___0 ;
  int j ;
  int k ;
  size_t tmp ;
  int tmp___0 ;
  size_t tmp___1 ;
  int tmp___2 ;
  char const   *tmp___3 ;
  int tmp___4 ;
  int tmp___5 ;
  int tmp___6 ;
  int tmp___7 ;
  int tmp___8 ;
  int tmp___9 ;
  int tmp___10 ;
  Dict_node *dn ;
  Disjunct *d1 ;
  Disjunct *d2 ;
  int len ;
  Dict_node *dn___0 ;
  Dict_node *dn1 ;
  int count___1 ;
  int tmp___11 ;
  Dict_node *dn___1 ;
  Dict_node *dn_new ;
  int tmp___12 ;
  int tmp___13 ;
  int tmp___14 ;
  int tmp___15 ;
  int tmp___16 ;
  int tmp___17 ;
  void *tmp___18 ;
  size_t tmp___19 ;
  void *tmp___20 ;
  size_t __cil_tmp41 ;
  int __cil_tmp42 ;
  size_t __cil_tmp43 ;
  int __cil_tmp44 ;
  int __cil_tmp45 ;
  int __cil_tmp46 ;
  int __cil_tmp47 ;
  int __cil_tmp48 ;
  int __cil_tmp49 ;
  int __cil_tmp50 ;
  int __cil_tmp51 ;
  Dict_node *__cil_tmp52 ;
  Disjunct *__cil_tmp53 ;
  Dict_node *__cil_tmp54 ;
  int __cil_tmp55 ;
  int __cil_tmp56 ;
  int __cil_tmp57 ;
  int __cil_tmp58 ;
  int __cil_tmp59 ;
  int __cil_tmp60 ;
  int __cil_tmp61 ;
  Dict_node *__cil_tmp62 ;
  Dict_node *__cil_tmp63 ;
  int __cil_tmp64 ;
  void *__cil_tmp65 ;
  size_t __cil_tmp66 ;
  void *__cil_tmp67 ;
  Dict_node *__cil_tmp68 ;
  extern struct gc_tag_struct *__gcstandard_atomic_tag ;
  extern struct gc_tag_struct *__gc_struct_Dict_node_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[16] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((14 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& x);
  x = 0;
  simple_gc_frame[3] = (void *)(& y);
  y = 0;
  simple_gc_frame[4] = (void *)(& s);
  s = 0;
  simple_gc_frame[5] = (void *)(& tmp___3);
  tmp___3 = 0;
  simple_gc_frame[6] = (void *)(& dn);
  dn = 0;
  simple_gc_frame[7] = (void *)(& d1);
  d1 = 0;
  simple_gc_frame[8] = (void *)(& d2);
  d2 = 0;
  simple_gc_frame[9] = (void *)(& dn___0);
  dn___0 = 0;
  simple_gc_frame[10] = (void *)(& dn1);
  dn1 = 0;
  simple_gc_frame[11] = (void *)(& dn___1);
  dn___1 = 0;
  simple_gc_frame[12] = (void *)(& dn_new);
  dn_new = 0;
  simple_gc_frame[13] = (void *)(& tmp___18);
  tmp___18 = 0;
  simple_gc_frame[14] = (void *)(& tmp___20);
  tmp___20 = 0;
  simple_gc_frame[15] = (void *)(& line);
  strncpy((char * __restrict  )(myline), (char const   * __restrict  )line, sizeof(myline));
  myline[sizeof(myline) - 1U] = (char )'\000';
  clean_up_string(myline);
  s = myline;
  s ++;
  k = -1;
  j = k;
  count___0 = 0;
  i = 0;
  while ((unsigned int )user_variable[i].p != (unsigned int )((void *)0)) {
    if (user_variable[i].isboolean) {
      __cil_tmp41 = strlen((char const   *)s);
      tmp = __cil_tmp41;
      __cil_tmp42 = strncasecmp((char const   *)s, (char const   *)user_variable[i].s,
                                tmp);
      tmp___0 = __cil_tmp42;
      if (tmp___0 == 0) {
        count___0 ++;
        j = i;
      }
    }
    i ++;
  }
  i = 0;
  while ((unsigned int )user_command[i].s != (unsigned int )((void *)0)) {
    __cil_tmp43 = strlen((char const   *)s);
    tmp___1 = __cil_tmp43;
    __cil_tmp44 = strncasecmp((char const   *)s, (char const   *)user_command[i].s,
                              tmp___1);
    tmp___2 = __cil_tmp44;
    if (tmp___2 == 0) {
      count___0 ++;
      k = i;
    }
    i ++;
  }
  if (count___0 > 1) {
    printf((char const   * __restrict  )"Ambiguous command.  Type \"!help\" or \"!variables\"\n");

    goto return_label;
  } else {
    if (count___0 == 1) {
      if (j >= 0) {
        *(user_variable[j].p) = ! *(user_variable[j].p);
        if (*(user_variable[j].p)) {
          tmp___3 = "on";
        } else {
          tmp___3 = "off";
        }
        printf((char const   * __restrict  )"%s turned %s.\n", user_variable[j].str,
               tmp___3);
        massage_variables(j);

        goto return_label;
      } else {
        strcpy((char * __restrict  )s, (char const   * __restrict  )user_command[k].s);
      }
    }
  }
  __cil_tmp45 = strcmp((char const   *)s, "quit");
  tmp___5 = __cil_tmp45;
  if (tmp___5 == 0) {
    __cil_tmp46 = files_need_saving();
    tmp___4 = __cil_tmp46;
    if (tmp___4) {
      printf((char const   * __restrict  )"You have changed some files and not saved them.\n");
      printf((char const   * __restrict  )"Either save your files with \"!save\" and then quit,\n");
      printf((char const   * __restrict  )"or get out without saving your files with control-C.\n");
    } else {
      exit(1);
    }

    goto return_label;
  }
  __cil_tmp47 = strncmp((char const   *)s, "mark", 4U);
  tmp___6 = __cil_tmp47;
  if (tmp___6 == 0) {
    printf((char const   * __restrict  )"mark: %s", line + 6);
    fflush(stdout);

    goto return_label;
  }
  __cil_tmp48 = strcmp((char const   *)s, "save");
  tmp___8 = __cil_tmp48;
  if (tmp___8 == 0) {
    __cil_tmp49 = files_need_saving();
    tmp___7 = __cil_tmp49;
    if (tmp___7) {
      save_files();
    } else {
      printf((char const   * __restrict  )"No changes to be saved.\n");
    }

    goto return_label;
  }
  __cil_tmp50 = strcmp((char const   *)s, "variables");
  tmp___9 = __cil_tmp50;
  if (tmp___9 == 0) {
    printf((char const   * __restrict  )" Variable     Controls                                      Value\n");
    printf((char const   * __restrict  )" --------     --------                                      -----\n");
    i = 0;
    while ((unsigned int )user_variable[i].p != (unsigned int )((void *)0)) {
      printf((char const   * __restrict  )" ");
      left_print_string(stdout, user_variable[i].s, (char *)"             ");
      left_print_string(stdout, user_variable[i].str, (char *)"                                              ");
      printf((char const   * __restrict  )"%5d", *(user_variable[i].p));
      if (user_variable[i].isboolean) {
        if (*(user_variable[i].p)) {
          printf((char const   * __restrict  )" (On)");
        } else {
          printf((char const   * __restrict  )" (Off)");
        }
      }
      printf((char const   * __restrict  )"\n");
      i ++;
    }
    printf((char const   * __restrict  )"\n");
    printf((char const   * __restrict  )"Toggle a boolean variable as in \"!links\", set a variable as in \"!width=100\".\n");

    goto return_label;
  }
  __cil_tmp51 = strcmp((char const   *)s, "help");
  tmp___10 = __cil_tmp51;
  if (tmp___10 == 0) {
    printf((char const   * __restrict  )"Special commands always begin with \"!\".  Command and variable names\n");
    printf((char const   * __restrict  )"can be abbreviated.  Here is a list of the commands:\n\n");
    i = 0;
    while ((unsigned int )user_command[i].s != (unsigned int )((void *)0)) {
      printf((char const   * __restrict  )" !");
      left_print_string(stdout, user_command[i].s, (char *)"                  ");
      left_print_string(stdout, user_command[i].str, (char *)"                                                    ");
      printf((char const   * __restrict  )"\n");
      i ++;
    }
    printf((char const   * __restrict  )"\n");
    printf((char const   * __restrict  )" !!<string>         Print all the dictionary words matching <string>.\n");
    printf((char const   * __restrict  )"                    Also print the number of disjuncts of each.\n");
    printf((char const   * __restrict  )"\n");
    printf((char const   * __restrict  )" !-<string>         Delete all the dictionary words matching <string>.\n");
    printf((char const   * __restrict  )"\n");
    printf((char const   * __restrict  )" !<string>=<word>   This indicates that a new word (<string>) is to be\n");
    printf((char const   * __restrict  )"                    added to the dictionary.  Its definition will be the\n");
    printf((char const   * __restrict  )"                    same as that of <word>, and, if appropriate, it will\n");
    printf((char const   * __restrict  )"                    be added to the word file of <word>.\n");
    printf((char const   * __restrict  )"\n");
    printf((char const   * __restrict  )" !<var>             Toggle the specified boolean variable.\n");
    printf((char const   * __restrict  )"\n");
    printf((char const   * __restrict  )" !<var>=<val>       Assign that value to that variable.\n");

    goto return_label;
  }
  if ((int )*(s + 0) == 33) {
    __cil_tmp52 = dictionary_lookup(s + 1);
    dn = __cil_tmp52;
    if ((unsigned int )dn == (unsigned int )((void *)0)) {
      printf((char const   * __restrict  )"    \"%s\" matches nothing in the dictionary.\n",
             s + 1);

      goto return_label;
    }
    printf((char const   * __restrict  )"Matches:\n");
    while ((unsigned int )dn != (unsigned int )((void *)0)) {
      len = 0;
      __cil_tmp53 = build_disjuncts_for_dict_node(dn);
      d1 = __cil_tmp53;
      d2 = d1;
      while ((unsigned int )d2 != (unsigned int )((void *)0)) {
        len ++;
        d2 = d2->next;
      }
      free_disjuncts(d1);
      printf((char const   * __restrict  )"          ");
      left_print_string(stdout, dn->string, (char *)"                  ");
      printf((char const   * __restrict  )" %5d  ", len);
      if ((unsigned int )dn->file != (unsigned int )((void *)0)) {
        printf((char const   * __restrict  )"<%s>", (dn->file)->file);
      }
      printf((char const   * __restrict  )"\n");
      dn = dn->right;
    }

    goto return_label;
  }
  if ((int )*s == 45) {
    __cil_tmp54 = abridged_lookup(s + 1);
    dn___0 = __cil_tmp54;
    count___1 = 0;
    if ((unsigned int )dn___0 == (unsigned int )((void *)0)) {
      printf((char const   * __restrict  )"    \"%s\" matches nothing in the dictionary.\n",
             s + 1);

      goto return_label;
    }
    dn1 = dn___0;
    while ((unsigned int )dn1 != (unsigned int )((void *)0)) {
      if ((unsigned int )dn1->file == (unsigned int )((void *)0)) {
        count___1 ++;
      }
      dn1 = dn1->right;
    }
    if (count___1 != 0) {
      printf((char const   * __restrict  )"Note: \"%s\" ", s + 1);
      printf((char const   * __restrict  )"matches the following words in the main dictionary:\n");
      dn1 = dn___0;
      while ((unsigned int )dn1 != (unsigned int )((void *)0)) {
        if ((unsigned int )dn1->file == (unsigned int )((void *)0)) {
          printf((char const   * __restrict  )" %s ", dn1->string);
        }
        dn1 = dn1->right;
      }
      printf((char const   * __restrict  )"\n");
    }
    printf((char const   * __restrict  )"Deleting:\n");
    dn1 = dn___0;
    while ((unsigned int )dn1 != (unsigned int )((void *)0)) {
      printf((char const   * __restrict  )" %s ", dn1->string);
      dn1 = dn1->right;
    }
    __cil_tmp55 = delete_dictionary_words(s + 1);
    tmp___11 = __cil_tmp55;
    if (! tmp___11) {
      printf((char const   * __restrict  )"Assertion failed: %s\n", "Attempt to delete a word not in the dictonary.");
      exit(1);
    }
    printf((char const   * __restrict  )"\n");

    goto return_label;
  }
  x = s;
  while (1) {
    if ((int )*x != 61) {
      if (! ((int )*x != 0)) {
        break;
      }
    } else {
      break;
    }
    x ++;
  }
  if ((int )*x == 61) {
    *x = (char )'\000';
    y = x + 1;
    x = s;
    __cil_tmp56 = is_numerical_rhs(y);
    tmp___14 = __cil_tmp56;
    if (tmp___14) {
      i = 0;
      while ((unsigned int )user_variable[i].p != (unsigned int )((void *)0)) {
        __cil_tmp57 = strcmp((char const   *)x, (char const   *)user_variable[i].s);
        tmp___12 = __cil_tmp57;
        if (tmp___12 == 0) {
          break;
        }
        i ++;
      }
      if ((unsigned int )user_variable[i].p == (unsigned int )((void *)0)) {
        printf((char const   * __restrict  )"There is no user variable called \"%s\".\n",
               x);
      } else {
        __cil_tmp58 = atoi((char const   *)y);
        *(user_variable[i].p) = __cil_tmp58;
        __cil_tmp59 = atoi((char const   *)y);
        tmp___13 = __cil_tmp59;
        printf((char const   * __restrict  )"%s set to %d\n", x, tmp___13);
        massage_variables(i);
      }

      goto return_label;
    }
    __cil_tmp60 = is_idiom_word(x);
    tmp___15 = __cil_tmp60;
    if (tmp___15) {
      printf((char const   * __restrict  )"    words ending \".Ix\" (x a number) ");
      printf((char const   * __restrict  )"are reserved for idioms\n");

      goto return_label;
    } else {
      __cil_tmp61 = is_idiom_word(y);
      tmp___16 = __cil_tmp61;
      if (tmp___16) {
        printf((char const   * __restrict  )"    words ending \".Ix\" (x a number) ");
        printf((char const   * __restrict  )"are reserved for idioms\n");

        goto return_label;
      }
    }
    __cil_tmp62 = abridged_lookup(x);
    dn___1 = __cil_tmp62;
    if ((unsigned int )dn___1 != (unsigned int )((void *)0)) {
      printf((char const   * __restrict  )"    \"%s\" matches words already in the dictionary:\n",
             s);
      while ((unsigned int )dn___1 != (unsigned int )((void *)0)) {
        printf((char const   * __restrict  )"%s ", dn___1->string);
        dn___1 = dn___1->right;
      }
      printf((char const   * __restrict  )"\n");

      goto return_label;
    }
    __cil_tmp63 = abridged_lookup(y);
    dn___1 = __cil_tmp63;
    if ((unsigned int )dn___1 == (unsigned int )((void *)0)) {
      printf((char const   * __restrict  )"    \"%s\" is not in the dictionary.\n",
             y);

      goto return_label;
    }
    if ((unsigned int )dn___1->right != (unsigned int )((void *)0)) {
      goto _L;
    } else {
      __cil_tmp64 = strcmp((char const   *)y, (char const   *)dn___1->string);
      tmp___17 = __cil_tmp64;
      if (tmp___17 != 0) {
        _L: 
        printf((char const   * __restrict  )"    Please be more precise.  \"%s\" matches:\n",
               y);
        while ((unsigned int )dn___1 != (unsigned int )((void *)0)) {
          printf((char const   * __restrict  )"%s ", dn___1->string);
          dn___1 = dn___1->right;
        }
        printf((char const   * __restrict  )"\n");

        goto return_label;
      }
    }
    if ((unsigned int )dn___1->file == (unsigned int )((void *)0)) {
      printf((char const   * __restrict  )"    \"%s\" is in the dictionary but not in a file.\n",
             y);
      printf((char const   * __restrict  )"    This word will not be saved.\n");
    }
    __cil_tmp65 = GC_malloc(__gc_struct_Dict_node_struct_tag, (int )sizeof(Dict_node ));
    tmp___18 = __cil_tmp65;
    dn_new = (Dict_node *)tmp___18;
    __cil_tmp66 = strlen((char const   *)x);
    tmp___19 = __cil_tmp66;
    __cil_tmp67 = GC_malloc(__gcstandard_atomic_tag, (int )(tmp___19 + 1U));
    tmp___20 = __cil_tmp67;
    dn_new->string = (char *)tmp___20;
    strcpy((char * __restrict  )dn_new->string, (char const   * __restrict  )x);
    dn_new->right = (Dict_node *)((void *)0);
    dn_new->left = dn_new->right;
    dn_new->file = dn___1->file;
    dn_new->exp = dn___1->exp;
    __cil_tmp68 = insert_dict(dict_root, dn_new);
    dict_root = __cil_tmp68;
    printf((char const   * __restrict  )"    \"%s\" added to the dictionary.\n", x);
    N_dict ++;
    if ((unsigned int )dn___1->file != (unsigned int )((void *)0)) {
      (dn___1->file)->changed = 1;
    }

    goto return_label;
  }
  printf((char const   * __restrict  )"Try \"!help\".\n");

  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
int sentence_in_dictionary(void) 
{ int w ;
  int ok_so_far ;
  char *s ;
  int tmp ;
  unsigned short const   **tmp___0 ;
  int tmp___1 ;
  int tmp___2 ;
  int __cil_tmp8 ;
  unsigned short const   **__cil_tmp9 ;
  int __cil_tmp10 ;
  int __cil_tmp11 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& s);
  s = 0;
  simple_gc_frame[3] = (void *)(& tmp___0);
  tmp___0 = 0;
  ok_so_far = 1;
  w = 0;
  while (w < N_words) {
    s = sentence[w].string;
    __cil_tmp8 = boolean_dictionary_lookup(s);
    tmp = __cil_tmp8;
    if (! tmp) {
      __cil_tmp9 = __ctype_b_loc();
      tmp___0 = __cil_tmp9;
      if ((int const   )*(*tmp___0 + (int )*(s + 0)) & 256) {
        if (! capitalized_word_defined) {
          goto _L;
        }
      } else {
        _L: 
        __cil_tmp10 = ishyphenated(s);
        tmp___1 = __cil_tmp10;
        if (! tmp___1) {
          __cil_tmp11 = isnumber(s);
          tmp___2 = __cil_tmp11;
          if (! tmp___2) {
            if (ok_so_far) {
              printf((char const   * __restrict  )"The following words are not in the dictionary:");
              ok_so_far = 0;
            }
            printf((char const   * __restrict  )" \"%s\"", sentence[w].string);
          }
        }
      }
    }
    w ++;
  }
  if (! ok_so_far) {
    printf((char const   * __restrict  )"\n");
  }
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (ok_so_far);
  }
}
}
int sentence_contains(char *s ) 
{ int w ;
  int tmp ;
  int __retres4 ;
  int __cil_tmp5 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& s);
  w = 0;
  while (w < N_words) {
    __cil_tmp5 = strcmp((char const   *)(sentence[w].string), (char const   *)s);
    tmp = __cil_tmp5;
    if (tmp == 0) {
      __retres4 = 1;
      goto return_label;
    }
    w ++;
  }
  __retres4 = 0;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres4);
  }
}
}
void set_is_conjunction(void) 
{ int w ;
  char *s ;
  int tmp ;
  int tmp___0 ;
  int tmp___1 ;
  int tmp___2 ;
  int tmp___3 ;
  int __cil_tmp8 ;
  int __cil_tmp9 ;
  int __cil_tmp10 ;
  int __cil_tmp11 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& s);
  s = 0;
  w = 0;
  while (w < N_words) {
    s = sentence[w].string;
    __cil_tmp8 = strcmp((char const   *)s, "and");
    tmp = __cil_tmp8;
    if (tmp == 0) {
      tmp___3 = 1;
    } else {
      __cil_tmp9 = strcmp((char const   *)s, "or");
      tmp___0 = __cil_tmp9;
      if (tmp___0 == 0) {
        tmp___3 = 1;
      } else {
        __cil_tmp10 = strcmp((char const   *)s, "but");
        tmp___1 = __cil_tmp10;
        if (tmp___1 == 0) {
          tmp___3 = 1;
        } else {
          __cil_tmp11 = strcmp((char const   *)s, "nor");
          tmp___2 = __cil_tmp11;
          if (tmp___2 == 0) {
            tmp___3 = 1;
          } else {
            tmp___3 = 0;
          }
        }
      }
    }
    is_conjunction[w] = (char )tmp___3;
    w ++;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
int sentence_contains_conjunction(void) 
{ int w ;
  int __retres2 ;

  {
  w = 0;
  while (w < N_words) {
    if (is_conjunction[w]) {
      __retres2 = 1;
      goto return_label;
    }
    w ++;
  }
  __retres2 = 0;
  return_label: /* CIL Label */ 
  return (__retres2);
}
}
int conj_in_range(int lw , int rw ) 
{ int __retres3 ;

  {
  while (lw <= rw) {
    if (is_conjunction[lw]) {
      __retres3 = 1;
      goto return_label;
    }
    lw ++;
  }
  __retres3 = 0;
  return_label: /* CIL Label */ 
  return (__retres3);
}
}
void build_deletable(void) 
{ int i ;
  int j ;
  int k ;
  void *tmp ;
  int tmp___0 ;
  int tmp___1 ;
  int tmp___2 ;
  int tmp___3 ;
  int tmp___4 ;
  int tmp___5 ;
  int tmp___6 ;
  int tmp___7 ;
  int tmp___8 ;
  int tmp___9 ;
  int tmp___10 ;
  void *__cil_tmp16 ;
  int __cil_tmp17 ;
  int __cil_tmp18 ;
  int __cil_tmp19 ;
  int __cil_tmp20 ;
  int __cil_tmp21 ;
  int __cil_tmp22 ;
  int __cil_tmp23 ;
  int __cil_tmp24 ;
  int __cil_tmp25 ;
  int __cil_tmp26 ;
  extern struct gc_tag_struct *__gcstandard_atomic_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& tmp);
  tmp = 0;
  i = 0;
  while (i < N_words) {
    __cil_tmp16 = GC_malloc(__gcstandard_atomic_tag, N_words + 1);
    tmp = __cil_tmp16;
    deletable[i] = (char *)tmp;
    j = 0;
    while (1) {
      if (i + maxlinklength < N_words) {
        tmp___10 = i + maxlinklength;
      } else {
        tmp___10 = N_words;
      }
      if (! (j <= tmp___10)) {
        break;
      }
      if (null_links) {
        *(deletable[i] + j) = (char)1;
      } else {
        if (j == i + 1) {
          *(deletable[i] + j) = (char)1;
        } else {
          if (j > i + 2) {
            if (is_conjunction[i + 1]) {
              *(deletable[i] + j) = (char)1;
            } else {
              if (is_conjunction[j - 1]) {
                *(deletable[i] + j) = (char)1;
              } else {
                __cil_tmp17 = strcmp(",", (char const   *)(sentence[i + 1].string));
                tmp___6 = __cil_tmp17;
                if (tmp___6 == 0) {
                  __cil_tmp18 = conj_in_range(i + 2, j - 1);
                  tmp___7 = __cil_tmp18;
                  if (tmp___7) {
                    *(deletable[i] + j) = (char)1;
                  } else {
                    goto _L___0;
                  }
                } else {
                  _L___0: 
                  __cil_tmp19 = strcmp(",", (char const   *)(sentence[j - 1].string));
                  tmp___8 = __cil_tmp19;
                  if (tmp___8 == 0) {
                    __cil_tmp20 = conj_in_range(j, N_words - 1);
                    tmp___9 = __cil_tmp20;
                    if (tmp___9) {
                      *(deletable[i] + j) = (char)1;
                    } else {
                      goto _L;
                    }
                  } else {
                    goto _L;
                  }
                }
              }
            }
          } else {
            _L: 
            if (j > i) {
              k = i + 1;
              while (k < j) {
                __cil_tmp21 = strcmp("either", (char const   *)(sentence[k].string));
                tmp___0 = __cil_tmp21;
                if (tmp___0 == 0) {
                  goto __Cont;
                } else {
                  __cil_tmp22 = strcmp("neither", (char const   *)(sentence[k].string));
                  tmp___1 = __cil_tmp22;
                  if (tmp___1 == 0) {
                    goto __Cont;
                  } else {
                    __cil_tmp23 = strcmp("both", (char const   *)(sentence[k].string));
                    tmp___2 = __cil_tmp23;
                    if (tmp___2 == 0) {
                      goto __Cont;
                    } else {
                      __cil_tmp24 = strcmp("not", (char const   *)(sentence[k].string));
                      tmp___3 = __cil_tmp24;
                      if (tmp___3 == 0) {
                        goto __Cont;
                      }
                    }
                  }
                }
                __cil_tmp25 = strcmp("only", (char const   *)(sentence[k].string));
                tmp___4 = __cil_tmp25;
                if (tmp___4 == 0) {
                  if (k > i + 1) {
                    __cil_tmp26 = strcmp("not", (char const   *)(sentence[k - 1].string));
                    tmp___5 = __cil_tmp26;
                    if (tmp___5 == 0) {
                      goto __Cont;
                    }
                  }
                }
                break;
                __Cont: 
                k ++;
              }
              *(deletable[i] + j) = (char )(k == j);
            } else {
              *(deletable[i] + j) = (char)0;
            }
          }
        }
      }
      j ++;
    }
    i ++;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void free_deletable(void) 
{ int w ;

  {
  w = 0;
  while (w < N_words) {
    w ++;
  }

  return;
}
}
void install_fat_connectors(void) 
{ int i ;
  Disjunct *tmp ;
  Disjunct *tmp___0 ;
  Disjunct *tmp___1 ;
  int tmp___2 ;
  Disjunct *__cil_tmp6 ;
  Disjunct *__cil_tmp7 ;
  Disjunct *__cil_tmp8 ;
  Disjunct *__cil_tmp9 ;
  int __cil_tmp10 ;
  Disjunct *__cil_tmp11 ;
  Disjunct *__cil_tmp12 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[3] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[4] = (void *)(& tmp___1);
  tmp___1 = 0;
  i = 0;
  while (i < N_words) {
    if (is_conjunction[i]) {
      __cil_tmp6 = build_AND_disjunct_list(sentence[i].string);
      tmp = __cil_tmp6;
      __cil_tmp7 = catenate_disjuncts(sentence[i].d, tmp);
      sentence[i].d = __cil_tmp7;
    } else {
      __cil_tmp8 = explode_disjunct_list(sentence[i].d);
      tmp___0 = __cil_tmp8;
      __cil_tmp9 = catenate_disjuncts(sentence[i].d, tmp___0);
      sentence[i].d = __cil_tmp9;
      __cil_tmp10 = strcmp((char const   *)(sentence[i].string), ",");
      tmp___2 = __cil_tmp10;
      if (tmp___2 == 0) {
        __cil_tmp11 = build_COMMA_disjunct_list();
        tmp___1 = __cil_tmp11;
        __cil_tmp12 = catenate_disjuncts(sentence[i].d, tmp___1);
        sentence[i].d = __cil_tmp12;
      }
    }
    i ++;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
int compare_parse(Linkage_info *p1 , Linkage_info *p2 ) 
{ int __retres3 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& p1);
  simple_gc_frame[3] = (void *)(& p2);
  if ((int )p1->N_violations != (int )p2->N_violations) {
    __retres3 = (int )p1->N_violations - (int )p2->N_violations;
    goto return_label;
  } else {
    if ((int )p1->disjunct_cost != (int )p2->disjunct_cost) {
      __retres3 = (int )p1->disjunct_cost - (int )p2->disjunct_cost;
      goto return_label;
    } else {
      if ((int )p1->and_cost != (int )p2->and_cost) {
        __retres3 = (int )p1->and_cost - (int )p2->and_cost;
        goto return_label;
      } else {
        __retres3 = (int )p1->link_cost - (int )p2->link_cost;
        goto return_label;
      }
    }
  }
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres3);
  }
}
}
void clear_time(void) 
{ 

  {

  return;
}
}
void print_time(char *s ) 
{ void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& s);
  if (verbosity > 1) {
    printf((char const   * __restrict  )"++++%s\n", s);
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void print_total_time(void) 
{ 

  {

  return;
}
}
void first_prepare_to_parse(void) 
{ 

  {
  if (echo_on) {
    print_sentence(stdout, 2);
  }
  if (verbosity > 2) {
    printf((char const   * __restrict  )"Raw expression sizes:\n");
    print_expression_sizes();
  }
  expression_prune();
  print_time((char *)"Done expression pruning");

  return;
}
}
void prepare_to_parse(int cost_cutoff ) 
{ int i ;
  int tmp ;
  Disjunct *__cil_tmp4 ;
  int __cil_tmp5 ;
  Disjunct *__cil_tmp6 ;

  {
  build_sentence_disjuncts(cost_cutoff);
  if (verbosity > 2) {
    printf((char const   * __restrict  )"After expanding expressions into disjuncts:");
    print_disjunct_counts();
  }
  print_time((char *)"Built disjuncts");
  i = 0;
  while (i < N_words) {
    __cil_tmp4 = eliminate_duplicate_disjuncts(sentence[i].d);
    sentence[i].d = __cil_tmp4;
    i ++;
  }
  print_time((char *)"Eliminated duplicate disjuncts");
  if (verbosity > 2) {
    printf((char const   * __restrict  )"\nAfter expression pruning and duplicate elimination:\n");
    print_disjunct_counts();
  }
  set_is_conjunction();
  __cil_tmp5 = sentence_contains_conjunction();
  tmp = __cil_tmp5;
  if (tmp) {
    build_deletable();
    power_prune(1);
    if (verbosity > 2) {
      printf((char const   * __restrict  )"\nAfter Gentle power pruning:\n");
      print_disjunct_counts();
    }
    print_time((char *)"Finished gentle power pruning");
    mark_cost = 0;
    work_in_hash_lookups = mark_cost;
    N_hash_lookups = work_in_hash_lookups;
    N_in_table = N_hash_lookups;
    conjunction_prune();
    if (verbosity > 2) {
      printf((char const   * __restrict  )"\nAfter conjunction pruning:\n");
      print_disjunct_counts();
      print_statistics();
    }
    free_deletable();
    print_time((char *)"Done conjunction pruning");
    build_conjunction_tables();
    install_fat_connectors();
    construct_either();
    construct_neither();
    construct_notonlybut();
    construct_both();
    construct_comma();
    if (verbosity > 2) {
      printf((char const   * __restrict  )"After conjunctions, disjuncts counts:\n");
      print_disjunct_counts();
    }
    print_time((char *)"Constructed fat disjuncts");
    prune();
    print_time((char *)"Pruned fat disjuncts");
    i = 0;
    while (i < N_words) {
      __cil_tmp6 = eliminate_duplicate_disjuncts(sentence[i].d);
      sentence[i].d = __cil_tmp6;
      i ++;
    }
    if (verbosity > 2) {
      printf((char const   * __restrict  )"After pruning and duplicate elimination:\n");
      print_disjunct_counts();
    }
    print_time((char *)"Eliminated duplicate disjuncts (again)");
    if (verbosity > 2) {
      print_AND_statistics();
    }
  }
  power_prune(0);
  if (verbosity > 2) {
    printf((char const   * __restrict  )"\nAfter power-pruning:\n");
    print_disjunct_counts();
  }
  print_time((char *)"Ruthlessly power pruned");
  parse_cost = 0;
  work_in_hash_lookups = parse_cost;
  N_hash_lookups = work_in_hash_lookups;
  N_in_table = N_hash_lookups;
  init_fast_matcher();
  init_table();
  print_time((char *)"Initialized fast matcher and hash table");

  return;
}
}
void unprepare_parse(void) 
{ int tmp ;
  int __cil_tmp2 ;

  {
  free_sentence_disjuncts();
  __cil_tmp2 = sentence_contains_conjunction();
  tmp = __cil_tmp2;
  if (tmp) {
    free_AND_tables();
  }
  free_fast_matcher();
  free_table();

  return;
}
}
void final_unprepare_parse(void) 
{ 

  {
  free_sentence_expressions();
  free_strings();
  free_lookup_list();

  return;
}
}
int compute_linkage_arrays(int index___0 , int cost ) 
{ int tmp ;
  int __cil_tmp4 ;

  {
  extract_links(index___0, cost);
  __cil_tmp4 = set_has_fat_down();
  tmp = __cil_tmp4;
  return (tmp);
}
}
void summary_line(int N_canonical_linkages , int N_valid_linkages , char *stagen ,
                  int give_up ) 
{ void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& stagen);
  if (N_canonical_linkages == 0) {
    if (give_up) {
      printf((char const   * __restrict  )"Not accepted (no linkage exists) at %s",
             stagen);
    } else {
      printf((char const   * __restrict  )"No linkages at %s", stagen);
    }
  } else {
    if (N_canonical_linkages == 1) {
      if (N_valid_linkages == 0) {
        if (give_up) {
          printf((char const   * __restrict  )"Not accepted (unique linkage with P.P. violation) at %s",
                 stagen);
        } else {
          printf((char const   * __restrict  )"Unique linkage with P.P. violation at %s",
                 stagen);
        }
      } else {
        printf((char const   * __restrict  )"Accepted at %s", stagen);
      }
    } else {
      if (N_valid_linkages == 0) {
        if (give_up) {
          printf((char const   * __restrict  )"Not accepted (%d linkages, all with P.P. violations) at %s",
                 N_canonical_linkages, stagen);
        } else {
          printf((char const   * __restrict  )"%d linkages (all with P.P. violations) at %s",
                 N_canonical_linkages, stagen);
        }
      } else {
        printf((char const   * __restrict  )"Accepted (%d linkages, %d with no P.P. violations) at %s",
               N_canonical_linkages, N_valid_linkages, stagen);
      }
    }
  }
  if (display_bad) {
    printf((char const   * __restrict  )" (shown above)\n\n");
  } else {
    printf((char const   * __restrict  )"\n");
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
static char answer[100]  ;
char *stage_name(int phase , int cost_cutoff , int null_count ) 
{ int stage ;
  char *__retres5 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& __retres5);
  __retres5 = 0;
  if (phase == 0) {
    if (cost_cutoff <= 1) {
      stage = 1;
    } else {
      stage = 2;
    }
    sprintf((char * __restrict  )(answer), (char const   * __restrict  )"stage %d",
            stage);
  } else {
    sprintf((char * __restrict  )(answer), (char const   * __restrict  )"null count %d",
            null_count);
  }
  __retres5 = answer;
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres5);
  }
}
}
void loop(void) 
{ int i ;
  int N_to_display ;
  int index___0 ;
  int N_linkages ;
  int N_canonical_linkages ;
  int N_valid_linkages ;
  int has_fatlinks ;
  Linkage_info *linkage ;
  char line[1500] ;
  char message[80] ;
  int line_set ;
  int cost_cutoff ;
  int old_cost_cutoff ;
  int maxcost ;
  int success ;
  int give_up ;
  int phase ;
  int just_entered_phase_1 ;
  int null_count ;
  char *stagen ;
  char *tmp ;
  size_t tmp___0 ;
  int tmp___1 ;
  int tmp___2 ;
  int tmp___3 ;
  void *tmp___4 ;
  int tmp___5 ;
  char *tmp___6 ;
  unsigned short const   **tmp___7 ;
  char *__cil_tmp30 ;
  size_t __cil_tmp31 ;
  int __cil_tmp32 ;
  int __cil_tmp33 ;
  int __cil_tmp34 ;
  int __cil_tmp35 ;
  char *__cil_tmp36 ;
  int __cil_tmp37 ;
  int __cil_tmp38 ;
  void *__cil_tmp39 ;
  int __cil_tmp40 ;
  int __cil_tmp41 ;
  Linkage_info __cil_tmp42 ;
  Linkage_info __cil_tmp43 ;
  int __cil_tmp44 ;
  char *__cil_tmp45 ;
  unsigned short const   **__cil_tmp46 ;
  extern struct gc_tag_struct *__gc_tarray_struct_Linkage_info_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[8] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((6 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& linkage);
  linkage = 0;
  simple_gc_frame[3] = (void *)(& stagen);
  stagen = 0;
  simple_gc_frame[4] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[5] = (void *)(& tmp___4);
  tmp___4 = 0;
  simple_gc_frame[6] = (void *)(& tmp___6);
  tmp___6 = 0;
  simple_gc_frame[7] = (void *)(& tmp___7);
  tmp___7 = 0;
  linkage = (Linkage_info *)((void *)0);
  line_set = 0;
  while (1) {
    null_links = 0;
    free_lookup_list();
    free_strings();
    max_space_in_use = 0;
    space_in_use = 0;
    clear_time();
    if (! line_set) {
      if (! www_mode) {
        printf((char const   * __restrict  )"> ");
      }
      if (www_mode) {
        fflush(stdout);
      }
      __cil_tmp30 = fgets((char * __restrict  )(line), 1500, (FILE * __restrict  )stdin);
      tmp = __cil_tmp30;
      if ((unsigned int )tmp == (unsigned int )((void *)0)) {
        exit(1);
      }
    }
    line_set = 0;
    __cil_tmp31 = strlen((char const   *)(line));
    tmp___0 = __cil_tmp31;
    if ((int )line[tmp___0 - 1U] != 10) {
      printf((char const   * __restrict  )"Your sentence is too long\n");
      goto __Cont;
    }
    if ((int )line[0] == 33) {
      special_command(line);
      goto __Cont;
    }
    __cil_tmp32 = separate_sentence(line);
    tmp___1 = __cil_tmp32;
    if (! tmp___1) {
      goto __Cont;
    }
    if ((N_words - left_wall_defined) - right_wall_defined > word_count_limit) {
      printf((char const   * __restrict  )"Try a sentence with at most %d words.\n",
             word_count_limit);
      goto __Cont;
    }
    if (unknown_word_defined) {
      if (! use_unknown_word) {
        goto _L;
      }
    } else {
      _L: 
      __cil_tmp33 = sentence_in_dictionary();
      tmp___2 = __cil_tmp33;
      if (! tmp___2) {
        goto __Cont;
      }
    }
    __cil_tmp34 = build_sentence_expressions();
    tmp___3 = __cil_tmp34;
    if (! tmp___3) {
      goto __Cont;
    }
    __cil_tmp35 = maxcost_of_sentence();
    maxcost = __cil_tmp35;
    print_time((char *)"Constructed disjunct expressions");
    first_prepare_to_parse();
    old_cost_cutoff = 1;
    prepare_to_parse(1);
    phase = 0;
    give_up = 0;
    success = give_up;
    cost_cutoff = 0;
    null_count = 0;
    while (1) {
      if (success) {
        break;
      } else {
        if (give_up) {
          break;
        }
      }
      just_entered_phase_1 = 0;
      if (phase == 0) {
        if (cost_cutoff == 0) {
          cost_cutoff = 1;
        } else {
          if (cost_cutoff == 1) {
            if (maxcost > 1) {
              cost_cutoff = maxcost;
            } else {
              phase = 1;
              null_links = 1;
              cost_cutoff = 1000;
              just_entered_phase_1 = 1;
            }
          } else {
            phase = 1;
            null_links = 1;
            cost_cutoff = 1000;
            just_entered_phase_1 = 1;
          }
        }
        if (cost_cutoff == maxcost) {
          if (! null_link_search) {
            give_up = 1;
          }
        }
      } else {
        null_count ++;
        give_up = null_count >= N_words - 1;
      }
      if (verbosity > 2) {
        if (phase == 0) {
          printf((char const   * __restrict  )"Cost cutoff: %d\n", cost_cutoff);
        }
      }
      if (cost_cutoff != old_cost_cutoff) {
        unprepare_parse();
        prepare_to_parse(cost_cutoff);
        old_cost_cutoff = cost_cutoff;
      }
      if (just_entered_phase_1) {
        null_count = 1;
      }
      __cil_tmp36 = stage_name(phase, cost_cutoff, null_count);
      stagen = __cil_tmp36;
      if (phase == 0) {
        __cil_tmp37 = parse(0);
        N_linkages = __cil_tmp37;
      } else {
        __cil_tmp38 = parse(null_count);
        N_linkages = __cil_tmp38;
      }
      if (N_linkages > linkage_count_limit) {
        printf((char const   * __restrict  )"Warning: only the first %d of %d linkages will be considered.\n",
               linkage_count_limit, N_linkages);
        N_linkages = linkage_count_limit;
      }
      sprintf((char * __restrict  )(message), (char const   * __restrict  )"Counted %d linkges",
              N_linkages);
      print_time(message);
      N_valid_linkages = 0;
      N_canonical_linkages = N_valid_linkages;
      if (N_linkages != 0) {
        __cil_tmp39 = GC_malloc(__gc_tarray_struct_Linkage_info_struct_tag, (int )((unsigned int )N_linkages * sizeof(Linkage_info )));
        tmp___4 = __cil_tmp39;
        linkage = (Linkage_info *)tmp___4;
        index___0 = 0;
        while (index___0 < N_linkages) {
          __cil_tmp40 = compute_linkage_arrays(index___0, null_count);
          has_fatlinks = __cil_tmp40;
          if (has_fatlinks) {
            __cil_tmp41 = is_canonical_linkage();
            tmp___5 = __cil_tmp41;
            if (! tmp___5) {
              goto __Cont___0;
            }
            __cil_tmp42 = analyze_fat_linkage(0);
            *(linkage + N_canonical_linkages) = __cil_tmp42;
          } else {
            __cil_tmp43 = analyze_thin_linkage(0);
            *(linkage + N_canonical_linkages) = __cil_tmp43;
          }
          if ((int )(linkage + N_canonical_linkages)->N_violations == 0) {
            N_valid_linkages ++;
          }
          (linkage + N_canonical_linkages)->index = index___0;
          N_canonical_linkages ++;
          __Cont___0: 
          index___0 ++;
        }
        qsort((void *)linkage, (unsigned int )N_canonical_linkages, sizeof(Linkage_info ),
              (int (*)(void const   * , void const   * ))(& compare_parse));
      }
      if (N_canonical_linkages == 0) {
        if (N_linkages > 0) {
          if (N_linkages < linkage_count_limit) {
            printf((char const   * __restrict  )"Assertion failed: %s\n", "None of the linkages is canonical");
            exit(1);
          }
        }
      }
      print_time((char *)"Postprocessed all linkages");
      line_set = 0;
      success = N_valid_linkages > 0;
      if (! display_bad) {
        summary_line(N_canonical_linkages, N_valid_linkages, stagen, give_up);
      }
      if (display_bad) {
        N_to_display = N_canonical_linkages;
      } else {
        N_to_display = N_valid_linkages;
      }
      if (display_on) {
        index___0 = 0;
        while (index___0 < N_to_display) {
          __cil_tmp44 = compute_linkage_arrays((linkage + index___0)->index, null_count);
          has_fatlinks = __cil_tmp44;
          compute_chosen_words();
          if (N_canonical_linkages > 1) {
            printf((char const   * __restrict  )"  Linkage %d", index___0 + 1);
          } else {
            printf((char const   * __restrict  )"  Unique linkage");
          }
          if ((int )(linkage + index___0)->N_violations > 0) {
            printf((char const   * __restrict  )" (bad), ");
          } else {
            printf((char const   * __restrict  )", ");
          }
          printf((char const   * __restrict  )"cost vector = (%d, %d, %d)\n", (linkage + index___0)->disjunct_cost,
                 (linkage + index___0)->and_cost, (linkage + index___0)->link_cost);
          if (has_fatlinks) {
            analyze_fat_linkage(1);
          } else {
            analyze_thin_linkage(1);
          }
          if (index___0 == N_to_display - 1) {
            break;
          }
          if (just_one) {
            break;
          }
          if (www_mode) {
            goto __Cont___1;
          }
          if (! display_bad) {
            printf((char const   * __restrict  )"(press return for another)\n");
            printf((char const   * __restrict  )"> ");
            __cil_tmp45 = fgets((char * __restrict  )(line), 1500, (FILE * __restrict  )stdin);
            tmp___6 = __cil_tmp45;
            if ((unsigned int )tmp___6 == (unsigned int )((void *)0)) {
              exit(1);
            }
            i = 0;
            while ((int )line[i] != 0) {
              __cil_tmp46 = __ctype_b_loc();
              tmp___7 = __cil_tmp46;
              if (! ((int const   )*(*tmp___7 + (int )line[i]) & 8192)) {
                break;
              }
              i ++;
            }
            if ((int )line[i] != 0) {
              line_set = 1;
              break;
            }
          }
          __Cont___1: 
          index___0 ++;
        }
      }
      if (display_bad) {
        summary_line(N_canonical_linkages, N_valid_linkages, stagen, give_up);
      }
      if (N_linkages != 0) {
      }
    }
    print_time((char *)"Displayed linkages");
    unprepare_parse();
    final_unprepare_parse();
    print_time((char *)"Freed all data structures");
    if (verbosity > 2) {
      print_statistics();
    }
    if (space_in_use != 0) {
      printf((char const   * __restrict  )"Warning: %d bytes of space leaked.\n",
             space_in_use);
    }
    print_total_time();
    __Cont: ;
  }
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void batch_process(void) 
{ int i ;
  int N_linkages ;
  int N_canonical_linkages ;
  int N_valid_linkages ;
  int index___0 ;
  int has_fatlinks ;
  Linkage_info *linkage ;
  char s[1500] ;
  int errors ;
  int mc ;
  int cost_cutoff ;
  int old_cost_cutoff ;
  int maxcost ;
  int last_pass ;
  char *tmp ;
  size_t tmp___0 ;
  unsigned short const   **tmp___1 ;
  int tmp___2 ;
  int tmp___3 ;
  int tmp___4 ;
  void *tmp___5 ;
  int tmp___6 ;
  char *tmp___7 ;
  char *tmp___8 ;
  char *tmp___9 ;
  char *tmp___10 ;
  char *tmp___11 ;
  char *tmp___12 ;
  char *tmp___13 ;
  char *tmp___14 ;
  char *tmp___15 ;
  char *tmp___16 ;
  char *__cil_tmp33 ;
  size_t __cil_tmp34 ;
  unsigned short const   **__cil_tmp35 ;
  int __cil_tmp36 ;
  int __cil_tmp37 ;
  int __cil_tmp38 ;
  int __cil_tmp39 ;
  int __cil_tmp40 ;
  void *__cil_tmp41 ;
  int __cil_tmp42 ;
  int __cil_tmp43 ;
  Linkage_info __cil_tmp44 ;
  Linkage_info __cil_tmp45 ;
  char *__cil_tmp46 ;
  char *__cil_tmp47 ;
  char *__cil_tmp48 ;
  char *__cil_tmp49 ;
  int __cil_tmp50 ;
  char *__cil_tmp51 ;
  char *__cil_tmp52 ;
  int __cil_tmp53 ;
  char *__cil_tmp54 ;
  char *__cil_tmp55 ;
  int __cil_tmp56 ;
  char *__cil_tmp57 ;
  char *__cil_tmp58 ;
  int __cil_tmp59 ;
  extern struct gc_tag_struct *__gc_tarray_struct_Linkage_info_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[16] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((14 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& linkage);
  linkage = 0;
  simple_gc_frame[3] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[4] = (void *)(& tmp___1);
  tmp___1 = 0;
  simple_gc_frame[5] = (void *)(& tmp___5);
  tmp___5 = 0;
  simple_gc_frame[6] = (void *)(& tmp___7);
  tmp___7 = 0;
  simple_gc_frame[7] = (void *)(& tmp___8);
  tmp___8 = 0;
  simple_gc_frame[8] = (void *)(& tmp___9);
  tmp___9 = 0;
  simple_gc_frame[9] = (void *)(& tmp___10);
  tmp___10 = 0;
  simple_gc_frame[10] = (void *)(& tmp___11);
  tmp___11 = 0;
  simple_gc_frame[11] = (void *)(& tmp___12);
  tmp___12 = 0;
  simple_gc_frame[12] = (void *)(& tmp___13);
  tmp___13 = 0;
  simple_gc_frame[13] = (void *)(& tmp___14);
  tmp___14 = 0;
  simple_gc_frame[14] = (void *)(& tmp___15);
  tmp___15 = 0;
  simple_gc_frame[15] = (void *)(& tmp___16);
  tmp___16 = 0;
  linkage = (Linkage_info *)((void *)0);
  null_links = 0;
  errors = 0;
  while (1) {
    free_lookup_list();
    free_strings();
    max_space_in_use = 0;
    space_in_use = 0;
    clear_time();
    __cil_tmp33 = fgets((char * __restrict  )(s), 1500, (FILE * __restrict  )stdin);
    tmp = __cil_tmp33;
    if ((unsigned int )tmp == (unsigned int )((void *)0)) {
      break;
    }
    __cil_tmp34 = strlen((char const   *)(s));
    tmp___0 = __cil_tmp34;
    if ((int )s[tmp___0 - 1U] != 10) {
      printf((char const   * __restrict  )"Sentence too long\n");
      goto __Cont;
    }
    i = 0;
    while (1) {
      __cil_tmp35 = __ctype_b_loc();
      tmp___1 = __cil_tmp35;
      if (! ((int const   )*(*tmp___1 + (int )s[i]) & 8192)) {
        break;
      }
      i ++;
    }
    if ((int )s[i] == 37) {
      goto __Cont;
    }
    if ((int )s[i] == 0) {
      goto __Cont;
    }
    if ((int )s[i] == 42) {
      mc = (int )s[i];
      s[i] = (char )' ';
    } else {
      if ((int )s[i] == 43) {
        mc = (int )s[i];
        s[i] = (char )' ';
      } else {
        if ((int )s[i] == 35) {
          mc = (int )s[i];
          s[i] = (char )' ';
        } else {
          if ((int )s[i] == 58) {
            mc = (int )s[i];
            s[i] = (char )' ';
          } else {
            if ((int )s[i] == 45) {
              mc = (int )s[i];
              s[i] = (char )' ';
            } else {
              mc = ' ';
            }
          }
        }
      }
    }
    if ((int )s[0] == 33) {
      special_command(s);
      goto __Cont;
    }
    __cil_tmp36 = separate_sentence(s);
    tmp___2 = __cil_tmp36;
    if (! tmp___2) {
      goto __Cont;
    }
    if (unknown_word_defined) {
      if (! use_unknown_word) {
        goto _L;
      }
    } else {
      _L: 
      __cil_tmp37 = sentence_in_dictionary();
      tmp___3 = __cil_tmp37;
      if (! tmp___3) {
        errors ++;
        printf((char const   * __restrict  )"--- in the following sentence:\n");
        printf((char const   * __restrict  )"%c ", mc);
        print_sentence(stdout, 2);
        printf((char const   * __restrict  )"\n");
        goto __Cont;
      }
    }
    __cil_tmp38 = build_sentence_expressions();
    tmp___4 = __cil_tmp38;
    if (! tmp___4) {
      errors ++;
      goto __Cont;
    }
    __cil_tmp39 = maxcost_of_sentence();
    maxcost = __cil_tmp39;
    print_time((char *)"Constructed disjunct expressions");
    if (echo_on) {
      printf((char const   * __restrict  )"%c ", mc);
    }
    first_prepare_to_parse();
    last_pass = 0;
    cost_cutoff = 0;
    old_cost_cutoff = 1;
    prepare_to_parse(1);
    while (! last_pass) {
      if (cost_cutoff == 0) {
        cost_cutoff = 1;
      } else {
        if (cost_cutoff == 1) {
          if (maxcost > 1) {
            cost_cutoff = maxcost;
          }
        }
      }
      last_pass = cost_cutoff >= maxcost;
      if (verbosity > 2) {
        printf((char const   * __restrict  )"Cost cutoff: %d  maxcost: %d\n", cost_cutoff,
               maxcost);
      }
      if (cost_cutoff != old_cost_cutoff) {
        unprepare_parse();
        prepare_to_parse(cost_cutoff);
        old_cost_cutoff = cost_cutoff;
      }
      __cil_tmp40 = parse(0);
      N_linkages = __cil_tmp40;
      print_time((char *)"Counted linkages");
      N_valid_linkages = 0;
      N_canonical_linkages = N_valid_linkages;
      if (N_linkages != 0) {
        __cil_tmp41 = GC_malloc(__gc_tarray_struct_Linkage_info_struct_tag, (int )((unsigned int )N_linkages * sizeof(Linkage_info )));
        tmp___5 = __cil_tmp41;
        linkage = (Linkage_info *)tmp___5;
        index___0 = 0;
        while (1) {
          if (index___0 < N_linkages) {
            if (! (N_valid_linkages == 0)) {
              break;
            }
          } else {
            break;
          }
          __cil_tmp42 = compute_linkage_arrays(index___0, 0);
          has_fatlinks = __cil_tmp42;
          if (has_fatlinks) {
            __cil_tmp43 = is_canonical_linkage();
            tmp___6 = __cil_tmp43;
            if (! tmp___6) {
              goto __Cont___0;
            }
            __cil_tmp44 = analyze_fat_linkage(0);
            *(linkage + N_canonical_linkages) = __cil_tmp44;
          } else {
            __cil_tmp45 = analyze_thin_linkage(0);
            *(linkage + N_canonical_linkages) = __cil_tmp45;
          }
          if ((int )(linkage + N_canonical_linkages)->N_violations == 0) {
            N_valid_linkages ++;
          }
          (linkage + N_canonical_linkages)->index = index___0;
          N_canonical_linkages ++;
          __Cont___0: 
          index___0 ++;
        }
        qsort((void *)linkage, (unsigned int )N_canonical_linkages, sizeof(Linkage_info ),
              (int (*)(void const   * , void const   * ))(& compare_parse));
      }
      print_time((char *)"Postprocessed some linkages");
      if (N_canonical_linkages == 0) {
        if (! (mc == 42)) {
          if (! (mc == 35)) {
            if (last_pass) {
              errors ++;
              if (! echo_on) {
                __cil_tmp46 = stage_name(0, cost_cutoff, 0);
                tmp___7 = __cil_tmp46;
                printf((char const   * __restrict  )"--- No linkage for (%s): ", tmp___7);
                if (echo_on) {
                  printf((char const   * __restrict  )"%c ", mc);
                }
                print_sentence(stdout, 13);
              } else {
                __cil_tmp47 = stage_name(0, cost_cutoff, 0);
                tmp___8 = __cil_tmp47;
                printf((char const   * __restrict  )"--- No linkage for this (%s)\n",
                       tmp___8);
              }
            }
          }
        }
      } else {
        if (N_valid_linkages == 0) {
          if (! (mc == 43)) {
            if (! (mc == 42)) {
              if (last_pass) {
                if (N_canonical_linkages == 1) {
                  __cil_tmp48 = stage_name(0, cost_cutoff, 0);
                  tmp___9 = __cil_tmp48;
                  printf((char const   * __restrict  )"--- unique linkage, with post-processing violation (%s)\n",
                         tmp___9);
                } else {
                  printf((char const   * __restrict  )"--- %d linkages", N_canonical_linkages);
                  printf((char const   * __restrict  )", all with post-processing violations");
                  __cil_tmp49 = stage_name(0, cost_cutoff, 0);
                  tmp___10 = __cil_tmp49;
                  printf((char const   * __restrict  )" (%s)\n", tmp___10);
                }
                errors ++;
                __cil_tmp50 = compute_linkage_arrays((linkage + 0)->index, 0);
                has_fatlinks = __cil_tmp50;
                compute_chosen_words();
                if (has_fatlinks) {
                  analyze_fat_linkage(1);
                } else {
                  analyze_thin_linkage(1);
                }
              }
            }
          }
        } else {
          if (mc == 43) {
            goto _L___1;
          } else {
            if (mc == 42) {
              goto _L___1;
            } else {
              if (mc == 35) {
                _L___1: 
                errors ++;
                if (! echo_on) {
                  __cil_tmp51 = stage_name(0, cost_cutoff, 0);
                  tmp___11 = __cil_tmp51;
                  printf((char const   * __restrict  )"--- %s Input: ", tmp___11);
                  printf((char const   * __restrict  )"%c ", mc);
                  print_sentence(stdout, 13);
                } else {
                  __cil_tmp52 = stage_name(0, cost_cutoff, 0);
                  tmp___12 = __cil_tmp52;
                  printf((char const   * __restrict  )"--- Accepted %s:\n", tmp___12);
                }
                last_pass = 1;
                __cil_tmp53 = compute_linkage_arrays((linkage + 0)->index, 0);
                has_fatlinks = __cil_tmp53;
                compute_chosen_words();
                if (has_fatlinks) {
                  analyze_fat_linkage(1);
                } else {
                  analyze_thin_linkage(1);
                }
              } else {
                if ((int )(linkage + 0)->disjunct_cost == 0) {
                  if (mc == 58) {
                    errors ++;
                    if (! echo_on) {
                      __cil_tmp54 = stage_name(0, cost_cutoff, 0);
                      tmp___13 = __cil_tmp54;
                      printf((char const   * __restrict  )"--- %s Input:  ", tmp___13);
                      printf((char const   * __restrict  )"%c ", mc);
                      print_sentence(stdout, 13);
                    } else {
                      __cil_tmp55 = stage_name(0, cost_cutoff, 0);
                      tmp___14 = __cil_tmp55;
                      printf((char const   * __restrict  )"--- Accepted %s:\n", tmp___14);
                    }
                    last_pass = 1;
                    printf((char const   * __restrict  )"p.p. violations: %d, disjunct cost: %d\n",
                           (linkage + 0)->N_violations, (linkage + 0)->disjunct_cost);
                    __cil_tmp56 = compute_linkage_arrays((linkage + 0)->index, 0);
                    has_fatlinks = __cil_tmp56;
                    compute_chosen_words();
                    if (has_fatlinks) {
                      analyze_fat_linkage(1);
                    } else {
                      analyze_thin_linkage(1);
                    }
                  } else {
                    goto _L___0;
                  }
                } else {
                  _L___0: 
                  if (cost_cutoff == 1) {
                    if (mc == 45) {
                      errors ++;
                      if (! echo_on) {
                        __cil_tmp57 = stage_name(0, cost_cutoff, 0);
                        tmp___15 = __cil_tmp57;
                        printf((char const   * __restrict  )"--- %s Input: ", tmp___15);
                        printf((char const   * __restrict  )"%c ", mc);
                        print_sentence(stdout, 13);
                      } else {
                        __cil_tmp58 = stage_name(0, cost_cutoff, 0);
                        tmp___16 = __cil_tmp58;
                        printf((char const   * __restrict  )"--- Accepted %s:\n",
                               tmp___16);
                      }
                      last_pass = 1;
                      __cil_tmp59 = compute_linkage_arrays((linkage + 0)->index, 0);
                      has_fatlinks = __cil_tmp59;
                      compute_chosen_words();
                      if (has_fatlinks) {
                        analyze_fat_linkage(1);
                      } else {
                        analyze_thin_linkage(1);
                      }
                    } else {
                      last_pass = 1;
                    }
                  } else {
                    last_pass = 1;
                  }
                }
              }
            }
          }
        }
      }
      if (N_linkages != 0) {
      }
    }
    fflush(stdout);
    print_time((char *)"Displayed linkages");
    unprepare_parse();
    final_unprepare_parse();
    print_time((char *)"Freed all data structures");
    if (verbosity > 2) {
      print_statistics();
    }
    if (space_in_use != 0) {
      printf((char const   * __restrict  )"Warning: %d bytes of space leaked.\n",
             space_in_use);
    }
    print_total_time();
    __Cont: ;
  }
  if (errors == 0) {
    printf((char const   * __restrict  )"No errors!\n");
  } else {
    if (errors == 1) {
      printf((char const   * __restrict  )"One error.\n");
    } else {
      printf((char const   * __restrict  )"%d errors.\n", errors);
    }
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
int main(int argc , char **argv ) 
{ int batch ;
  int prob ;
  int i ;
  int tmp ;
  int tmp___0 ;
  int tmp___1 ;
  int tmp___2 ;
  int tmp___3 ;
  int tmp___4 ;
  int tmp___5 ;
  int __retres13 ;
  int __cil_tmp14 ;
  int __cil_tmp15 ;
  int __cil_tmp16 ;
  int __cil_tmp17 ;
  int __cil_tmp18 ;
  int __cil_tmp19 ;
  int __cil_tmp20 ;
  int __cil_tmp21 ;
  int __cil_tmp22 ;
  int __cil_tmp23 ;
  int __cil_tmp24 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_initialize();
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& argv);
  initialize_memory();
  prob = 0;
  batch = 0;
  i = 2;
  while (1) {
    if (i < argc) {
      if (! (! prob)) {
        break;
      }
    } else {
      break;
    }
    __cil_tmp14 = strcmp((char const   *)*(argv + i), "-wordlimit");
    tmp___5 = __cil_tmp14;
    if (tmp___5 == 0) {
      if (i == argc - 1) {
        tmp___0 = 1;
      } else {
        __cil_tmp15 = sscanf((char const   * __restrict  )*(argv + (i + 1)), (char const   * __restrict  )"%d",
                             & word_count_limit);
        tmp = __cil_tmp15;
        if (tmp != 1) {
          tmp___0 = 1;
        } else {
          tmp___0 = 0;
        }
      }
      prob = tmp___0;
      i ++;
    } else {
      __cil_tmp16 = strcmp((char const   *)*(argv + i), "-linklimit");
      tmp___4 = __cil_tmp16;
      if (tmp___4 == 0) {
        if (i == argc - 1) {
          tmp___2 = 1;
        } else {
          __cil_tmp17 = sscanf((char const   * __restrict  )*(argv + (i + 1)), (char const   * __restrict  )"%d",
                               & linkage_count_limit);
          tmp___1 = __cil_tmp17;
          if (tmp___1 != 1) {
            tmp___2 = 1;
          } else {
            tmp___2 = 0;
          }
        }
        prob = tmp___2;
        i ++;
      } else {
        __cil_tmp18 = strcmp((char const   *)*(argv + i), "-batch");
        tmp___3 = __cil_tmp18;
        if (tmp___3 == 0) {
          batch = 1;
        }
      }
    }
    i ++;
  }
  if (argc < 2) {
    fprintf((FILE * __restrict  )stderr, (char const   * __restrict  )"Usage: %s dictionary-file [-batch] [-wordlimit number] [-linklimit number]\n",
            *(argv + 0));
    exit(1);
  } else {
    if (prob) {
      fprintf((FILE * __restrict  )stderr, (char const   * __restrict  )"Usage: %s dictionary-file [-batch] [-wordlimit number] [-linklimit number]\n",
              *(argv + 0));
      exit(1);
    }
  }
  open_dictionary(*(argv + 1));
  printf((char const   * __restrict  )"\n Reading the dictionary files: ");
  read_dictionary();
  printf((char const   * __restrict  )"\n %d words stored in %d bytes\n\n\n", N_dict,
         space_in_use);
  printf((char const   * __restrict  )"Welcome to the Link Parser -- Version 2.1\n\n");
  printf((char const   * __restrict  )"          ");
  printf((char const   * __restrict  )"Copyright (C) 1991-1995 Daniel Sleator and Davy Temperley\n\n");
  init_randtable();
  __cil_tmp19 = boolean_dictionary_lookup((char *)"LEFT-WALL");
  left_wall_defined = __cil_tmp19;
  __cil_tmp20 = boolean_dictionary_lookup((char *)"RIGHT-WALL");
  right_wall_defined = __cil_tmp20;
  __cil_tmp21 = boolean_dictionary_lookup((char *)"POSTPROCESS");
  postprocess_defined = __cil_tmp21;
  __cil_tmp22 = boolean_dictionary_lookup((char *)"ANDABLE-CONNECTORS");
  andable_defined = __cil_tmp22;
  __cil_tmp23 = boolean_dictionary_lookup((char *)"UNKNOWN-WORD");
  unknown_word_defined = __cil_tmp23;
  __cil_tmp24 = boolean_dictionary_lookup((char *)"CAPITALIZED-WORDS");
  capitalized_word_defined = __cil_tmp24;
  if (andable_defined) {
    init_andable_hash_table();
  }
  if (batch) {
    printf((char const   * __restrict  )"Processing sentences in batch mode\n");
    printf((char const   * __restrict  )"\n");
    batch_process();
  } else {
    printf((char const   * __restrict  )"Type your sentence and press Return ");
    printf((char const   * __restrict  )"(\"!help\" for options).\n");
    printf((char const   * __restrict  )"\n");
    loop();
  }
  __retres13 = 0;
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres13);
  }
}
}
#pragma merger(0,"merge/massage.i","")
Disjunct *glom_comma_connector(Disjunct *d ) 
{ Disjunct *d_list ;
  Disjunct *d1 ;
  Disjunct *d2 ;
  Connector *c ;
  Connector *c1 ;
  void *tmp ;
  Disjunct *tmp___0 ;
  Disjunct *__cil_tmp9 ;
  void *__cil_tmp10 ;
  Disjunct *__cil_tmp11 ;
  extern struct gc_tag_struct *__gc_struct_Connector_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[10] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((8 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& d_list);
  d_list = 0;
  simple_gc_frame[3] = (void *)(& d1);
  d1 = 0;
  simple_gc_frame[4] = (void *)(& d2);
  d2 = 0;
  simple_gc_frame[5] = (void *)(& c);
  c = 0;
  simple_gc_frame[6] = (void *)(& c1);
  c1 = 0;
  simple_gc_frame[7] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[8] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[9] = (void *)(& d);
  d_list = (Disjunct *)((void *)0);
  d1 = d;
  while ((unsigned int )d1 != (unsigned int )((void *)0)) {
    if ((unsigned int )d1->left == (unsigned int )((void *)0)) {
      goto __Cont;
    }
    c = d1->left;
    while ((unsigned int )c->next != (unsigned int )((void *)0)) {
      c = c->next;
    }
    if ((int )c->label < 0) {
      goto __Cont;
    }
    __cil_tmp9 = copy_disjunct(d1);
    d2 = __cil_tmp9;
    d2->next = d_list;
    d_list = d2;
    __cil_tmp10 = GC_malloc(__gc_struct_Connector_struct_tag, (int )sizeof(Connector ));
    tmp = __cil_tmp10;
    c1 = (Connector *)tmp;
    c1->string = (char *)"";
    c1->label = (short)-2;
    c1->priority = (char)0;
    c1->multi = (char)0;
    c1->next = (Connector *)((void *)0);
    c->next = c1;
    __Cont: 
    d1 = d1->next;
  }
  __cil_tmp11 = catenate_disjuncts(d, d_list);
  tmp___0 = __cil_tmp11;
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (tmp___0);
  }
}
}
Disjunct *glom_aux_connector(Disjunct *d , int label , int necessary ) 
{ Disjunct *d_list ;
  Disjunct *d1 ;
  Disjunct *d2 ;
  Connector *c ;
  Connector *c1 ;
  Connector *c2 ;
  void *tmp ;
  Disjunct *tmp___0 ;
  Disjunct *__cil_tmp12 ;
  void *__cil_tmp13 ;
  Disjunct *__cil_tmp14 ;
  extern struct gc_tag_struct *__gc_struct_Connector_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[11] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((9 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& d_list);
  d_list = 0;
  simple_gc_frame[3] = (void *)(& d1);
  d1 = 0;
  simple_gc_frame[4] = (void *)(& d2);
  d2 = 0;
  simple_gc_frame[5] = (void *)(& c);
  c = 0;
  simple_gc_frame[6] = (void *)(& c1);
  c1 = 0;
  simple_gc_frame[7] = (void *)(& c2);
  c2 = 0;
  simple_gc_frame[8] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[9] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[10] = (void *)(& d);
  d_list = (Disjunct *)((void *)0);
  d1 = d;
  while ((unsigned int )d1 != (unsigned int )((void *)0)) {
    if ((unsigned int )d1->left == (unsigned int )((void *)0)) {
      goto __Cont;
    }
    c = d1->left;
    while ((unsigned int )c->next != (unsigned int )((void *)0)) {
      c = c->next;
    }
    if ((int )c->label < 0) {
      goto __Cont;
    }
    if (! necessary) {
      __cil_tmp12 = copy_disjunct(d1);
      d2 = __cil_tmp12;
      d2->next = d_list;
      d_list = d2;
    }
    __cil_tmp13 = GC_malloc(__gc_struct_Connector_struct_tag, (int )sizeof(Connector ));
    tmp = __cil_tmp13;
    c1 = (Connector *)tmp;
    c1->string = (char *)"";
    c1->label = (short )label;
    c1->priority = (char)0;
    c1->multi = (char)0;
    c1->next = c;
    if ((unsigned int )d1->left == (unsigned int )c) {
      d1->left = c1;
    } else {
      c2 = d1->left;
      while ((unsigned int )c2->next != (unsigned int )c) {
        c2 = c2->next;
      }
      c2->next = c1;
    }
    __Cont: 
    d1 = d1->next;
  }
  __cil_tmp14 = catenate_disjuncts(d, d_list);
  tmp___0 = __cil_tmp14;
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (tmp___0);
  }
}
}
Disjunct *add_one_connector(int label , int dir , char *cs , Disjunct *d ) 
{ Connector *c ;
  void *tmp ;
  void *__cil_tmp7 ;
  extern struct gc_tag_struct *__gc_struct_Connector_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& c);
  c = 0;
  simple_gc_frame[3] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[4] = (void *)(& cs);
  simple_gc_frame[5] = (void *)(& d);
  __cil_tmp7 = GC_malloc(__gc_struct_Connector_struct_tag, (int )sizeof(Connector ));
  tmp = __cil_tmp7;
  c = (Connector *)tmp;
  c->string = cs;
  c->label = (short )label;
  c->priority = (char)0;
  c->multi = (char)0;
  c->next = (Connector *)((void *)0);
  if (dir == 43) {
    c->next = d->right;
    d->right = c;
  } else {
    c->next = d->left;
    d->left = c;
  }
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (d);
  }
}
}
Disjunct *special_disjunct(int label , int dir , char *cs , char *ds ) 
{ Disjunct *d1 ;
  Connector *c ;
  void *tmp ;
  void *tmp___0 ;
  void *__cil_tmp9 ;
  void *__cil_tmp10 ;
  extern struct gc_tag_struct *__gc_struct_Connector_struct_tag ;
  extern struct gc_tag_struct *__gc_struct_Disjunct_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[8] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((6 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& d1);
  d1 = 0;
  simple_gc_frame[3] = (void *)(& c);
  c = 0;
  simple_gc_frame[4] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[5] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[6] = (void *)(& cs);
  simple_gc_frame[7] = (void *)(& ds);
  __cil_tmp9 = GC_malloc(__gc_struct_Disjunct_struct_tag, (int )sizeof(Disjunct ));
  tmp = __cil_tmp9;
  d1 = (Disjunct *)tmp;
  d1->cost = (short)0;
  d1->string = ds;
  d1->next = (Disjunct *)((void *)0);
  __cil_tmp10 = GC_malloc(__gc_struct_Connector_struct_tag, (int )sizeof(Connector ));
  tmp___0 = __cil_tmp10;
  c = (Connector *)tmp___0;
  c->string = cs;
  c->label = (short )label;
  c->priority = (char)0;
  c->multi = (char)0;
  c->next = (Connector *)((void *)0);
  if (dir == 43) {
    d1->left = (Connector *)((void *)0);
    d1->right = c;
  } else {
    d1->right = (Connector *)((void *)0);
    d1->left = c;
  }
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (d1);
  }
}
}
void construct_comma(void) 
{ int w ;
  Disjunct *tmp ;
  int tmp___0 ;
  int __cil_tmp4 ;
  Disjunct *__cil_tmp5 ;
  Disjunct *__cil_tmp6 ;
  Disjunct *__cil_tmp7 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& tmp);
  tmp = 0;
  w = 0;
  while (w < N_words - 1) {
    __cil_tmp4 = strcmp((char const   *)(sentence[w].string), ",");
    tmp___0 = __cil_tmp4;
    if (tmp___0 == 0) {
      if (is_conjunction[w + 1]) {
        __cil_tmp5 = special_disjunct(-2, '+', (char *)"", (char *)",");
        tmp = __cil_tmp5;
        __cil_tmp6 = catenate_disjuncts(tmp, sentence[w].d);
        sentence[w].d = __cil_tmp6;
        __cil_tmp7 = glom_comma_connector(sentence[w + 1].d);
        sentence[w + 1].d = __cil_tmp7;
      }
    }
    w ++;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void construct_either(void) 
{ int w ;
  int tmp ;
  int tmp___0 ;
  Disjunct *tmp___1 ;
  int tmp___2 ;
  int __cil_tmp6 ;
  int __cil_tmp7 ;
  Disjunct *__cil_tmp8 ;
  Disjunct *__cil_tmp9 ;
  int __cil_tmp10 ;
  Disjunct *__cil_tmp11 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& tmp___1);
  tmp___1 = 0;
  __cil_tmp6 = sentence_contains((char *)"either");
  tmp = __cil_tmp6;
  if (! tmp) {

    goto return_label;
  }
  w = 0;
  while (w < N_words) {
    __cil_tmp7 = strcmp((char const   *)(sentence[w].string), "either");
    tmp___0 = __cil_tmp7;
    if (tmp___0 != 0) {
      goto __Cont;
    }
    __cil_tmp8 = special_disjunct(-3, '+', (char *)"", (char *)"either");
    tmp___1 = __cil_tmp8;
    __cil_tmp9 = catenate_disjuncts(tmp___1, sentence[w].d);
    sentence[w].d = __cil_tmp9;
    __Cont: 
    w ++;
  }
  w = 0;
  while (w < N_words) {
    __cil_tmp10 = strcmp((char const   *)(sentence[w].string), "or");
    tmp___2 = __cil_tmp10;
    if (tmp___2 != 0) {
      goto __Cont___0;
    }
    __cil_tmp11 = glom_aux_connector(sentence[w].d, -3, 0);
    sentence[w].d = __cil_tmp11;
    __Cont___0: 
    w ++;
  }

  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void construct_neither(void) 
{ int w ;
  int tmp ;
  int tmp___0 ;
  int tmp___1 ;
  Disjunct *tmp___2 ;
  int tmp___3 ;
  int __cil_tmp7 ;
  int __cil_tmp8 ;
  int __cil_tmp9 ;
  Disjunct *__cil_tmp10 ;
  Disjunct *__cil_tmp11 ;
  int __cil_tmp12 ;
  Disjunct *__cil_tmp13 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& tmp___2);
  tmp___2 = 0;
  __cil_tmp7 = sentence_contains((char *)"neither");
  tmp___0 = __cil_tmp7;
  if (! tmp___0) {
    w = 0;
    while (w < N_words) {
      __cil_tmp8 = strcmp((char const   *)(sentence[w].string), "nor");
      tmp = __cil_tmp8;
      if (tmp != 0) {
        goto __Cont;
      }
      free_disjuncts(sentence[w].d);
      sentence[w].d = (Disjunct *)((void *)0);
      __Cont: 
      w ++;
    }

    goto return_label;
  }
  w = 0;
  while (w < N_words) {
    __cil_tmp9 = strcmp((char const   *)(sentence[w].string), "neither");
    tmp___1 = __cil_tmp9;
    if (tmp___1 != 0) {
      goto __Cont___0;
    }
    __cil_tmp10 = special_disjunct(-4, '+', (char *)"", (char *)"neither");
    tmp___2 = __cil_tmp10;
    __cil_tmp11 = catenate_disjuncts(tmp___2, sentence[w].d);
    sentence[w].d = __cil_tmp11;
    __Cont___0: 
    w ++;
  }
  w = 0;
  while (w < N_words) {
    __cil_tmp12 = strcmp((char const   *)(sentence[w].string), "nor");
    tmp___3 = __cil_tmp12;
    if (tmp___3 != 0) {
      goto __Cont___1;
    }
    __cil_tmp13 = glom_aux_connector(sentence[w].d, -4, 1);
    sentence[w].d = __cil_tmp13;
    __Cont___1: 
    w ++;
  }

  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void construct_notonlybut(void) 
{ int w ;
  Disjunct *d ;
  int tmp ;
  int tmp___0 ;
  Disjunct *tmp___1 ;
  Disjunct *tmp___2 ;
  int tmp___3 ;
  int tmp___4 ;
  int __cil_tmp9 ;
  int __cil_tmp10 ;
  Disjunct *__cil_tmp11 ;
  Disjunct *__cil_tmp12 ;
  int __cil_tmp13 ;
  Disjunct *__cil_tmp14 ;
  Disjunct *__cil_tmp15 ;
  Disjunct *__cil_tmp16 ;
  Disjunct *__cil_tmp17 ;
  Disjunct *__cil_tmp18 ;
  int __cil_tmp19 ;
  Disjunct *__cil_tmp20 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& d);
  d = 0;
  simple_gc_frame[3] = (void *)(& tmp___1);
  tmp___1 = 0;
  simple_gc_frame[4] = (void *)(& tmp___2);
  tmp___2 = 0;
  __cil_tmp9 = sentence_contains((char *)"not");
  tmp = __cil_tmp9;
  if (! tmp) {

    goto return_label;
  }
  w = 0;
  while (w < N_words) {
    __cil_tmp10 = strcmp((char const   *)(sentence[w].string), "not");
    tmp___0 = __cil_tmp10;
    if (tmp___0 != 0) {
      goto __Cont;
    }
    __cil_tmp11 = special_disjunct(-5, '+', (char *)"", (char *)"not");
    tmp___1 = __cil_tmp11;
    __cil_tmp12 = catenate_disjuncts(tmp___1, sentence[w].d);
    sentence[w].d = __cil_tmp12;
    if (w < N_words - 1) {
      __cil_tmp13 = strcmp((char const   *)(sentence[w + 1].string), "only");
      tmp___3 = __cil_tmp13;
      if (tmp___3 == 0) {
        __cil_tmp14 = special_disjunct(-6, '-', (char *)"", (char *)"only");
        tmp___2 = __cil_tmp14;
        __cil_tmp15 = catenate_disjuncts(tmp___2, sentence[w + 1].d);
        sentence[w + 1].d = __cil_tmp15;
        __cil_tmp16 = special_disjunct(-6, '+', (char *)"", (char *)"not");
        d = __cil_tmp16;
        __cil_tmp17 = add_one_connector(-5, '+', (char *)"", d);
        d = __cil_tmp17;
        __cil_tmp18 = catenate_disjuncts(d, sentence[w].d);
        sentence[w].d = __cil_tmp18;
      }
    }
    __Cont: 
    w ++;
  }
  w = 0;
  while (w < N_words) {
    __cil_tmp19 = strcmp((char const   *)(sentence[w].string), "but");
    tmp___4 = __cil_tmp19;
    if (tmp___4 != 0) {
      goto __Cont___0;
    }
    __cil_tmp20 = glom_aux_connector(sentence[w].d, -5, 1);
    sentence[w].d = __cil_tmp20;
    __Cont___0: 
    w ++;
  }

  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void construct_both(void) 
{ int w ;
  int tmp ;
  int tmp___0 ;
  Disjunct *tmp___1 ;
  int tmp___2 ;
  int __cil_tmp6 ;
  int __cil_tmp7 ;
  Disjunct *__cil_tmp8 ;
  Disjunct *__cil_tmp9 ;
  int __cil_tmp10 ;
  Disjunct *__cil_tmp11 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& tmp___1);
  tmp___1 = 0;
  __cil_tmp6 = sentence_contains((char *)"both");
  tmp = __cil_tmp6;
  if (! tmp) {

    goto return_label;
  }
  w = 0;
  while (w < N_words) {
    __cil_tmp7 = strcmp((char const   *)(sentence[w].string), "both");
    tmp___0 = __cil_tmp7;
    if (tmp___0 != 0) {
      goto __Cont;
    }
    __cil_tmp8 = special_disjunct(-7, '+', (char *)"", (char *)"both");
    tmp___1 = __cil_tmp8;
    __cil_tmp9 = catenate_disjuncts(tmp___1, sentence[w].d);
    sentence[w].d = __cil_tmp9;
    __Cont: 
    w ++;
  }
  w = 0;
  while (w < N_words) {
    __cil_tmp10 = strcmp((char const   *)(sentence[w].string), "and");
    tmp___2 = __cil_tmp10;
    if (tmp___2 != 0) {
      goto __Cont___0;
    }
    __cil_tmp11 = glom_aux_connector(sentence[w].d, -7, 0);
    sentence[w].d = __cil_tmp11;
    __Cont___0: 
    w ++;
  }

  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
#pragma merger(0,"merge/parse.i","")
int count(int lw , int rw , Connector *le , Connector *re , int cost ) ;
int prune_match(Connector *a , Connector *b ) ;
int match(Connector *a , Connector *b ) 
{ char *s ;
  char *t ;
  int x ;
  int y ;
  unsigned short const   **tmp ;
  unsigned short const   **tmp___0 ;
  int __retres9 ;
  unsigned short const   **__cil_tmp10 ;
  unsigned short const   **__cil_tmp11 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[8] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((6 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& s);
  s = 0;
  simple_gc_frame[3] = (void *)(& t);
  t = 0;
  simple_gc_frame[4] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[5] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[6] = (void *)(& a);
  simple_gc_frame[7] = (void *)(& b);
  if ((int )a->label != (int )b->label) {
    __retres9 = 0;
    goto return_label;
  }
  x = (int )a->priority;
  y = (int )b->priority;
  s = a->string;
  t = b->string;
  while (1) {
    __cil_tmp10 = __ctype_b_loc();
    tmp = __cil_tmp10;
    if (! ((int const   )*(*tmp + (int )*s) & 256)) {
      __cil_tmp11 = __ctype_b_loc();
      tmp___0 = __cil_tmp11;
      if (! ((int const   )*(*tmp___0 + (int )*t) & 256)) {
        break;
      }
    }
    if ((int )*s != (int )*t) {
      __retres9 = 0;
      goto return_label;
    }
    s ++;
    t ++;
  }
  if (x == 0) {
    if (y == 0) {
      while (1) {
        if ((int )*s != 0) {
          if (! ((int )*t != 0)) {
            break;
          }
        } else {
          break;
        }
        if ((int )*s == 42) {
          s ++;
          t ++;
        } else {
          if ((int )*t == 42) {
            s ++;
            t ++;
          } else {
            if ((int )*s == (int )*t) {
              if ((int )*s != 94) {
                s ++;
                t ++;
              } else {
                __retres9 = 0;
                goto return_label;
              }
            } else {
              __retres9 = 0;
              goto return_label;
            }
          }
        }
      }
      __retres9 = 1;
      goto return_label;
    } else {
      goto _L___0;
    }
  } else {
    _L___0: 
    if (x == 1) {
      if (y == 2) {
        while (1) {
          if ((int )*s != 0) {
            if (! ((int )*t != 0)) {
              break;
            }
          } else {
            break;
          }
          if ((int )*s == (int )*t) {
            s ++;
            t ++;
          } else {
            if ((int )*s == 42) {
              s ++;
              t ++;
            } else {
              if ((int )*t == 94) {
                s ++;
                t ++;
              } else {
                __retres9 = 0;
                goto return_label;
              }
            }
          }
        }
        __retres9 = 1;
        goto return_label;
      } else {
        goto _L;
      }
    } else {
      _L: 
      if (y == 1) {
        if (x == 2) {
          while (1) {
            if ((int )*s != 0) {
              if (! ((int )*t != 0)) {
                break;
              }
            } else {
              break;
            }
            if ((int )*s == (int )*t) {
              s ++;
              t ++;
            } else {
              if ((int )*t == 42) {
                s ++;
                t ++;
              } else {
                if ((int )*s == 94) {
                  s ++;
                  t ++;
                } else {
                  __retres9 = 0;
                  goto return_label;
                }
              }
            }
          }
          __retres9 = 1;
          goto return_label;
        } else {
          __retres9 = 0;
          goto return_label;
        }
      } else {
        __retres9 = 0;
        goto return_label;
      }
    }
  }
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres9);
  }
}
}
static int table_size  ;
static Table_connector **table  ;
void init_table(void) 
{ int i ;
  void *tmp ;
  void *__cil_tmp3 ;
  extern struct gc_tag_struct *__gcstandard_array_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& tmp);
  tmp = 0;
  if (N_words >= 10) {
    table_size = 1 << 16;
  } else {
    if (N_words >= 4) {
      table_size = 1 << ((6 * (N_words - 4)) / 6 + 4);
    } else {
      table_size = 1 << 4;
    }
  }
  __cil_tmp3 = GC_malloc(__gcstandard_array_tag, (int )((unsigned int )table_size * sizeof(Table_connector *)));
  tmp = __cil_tmp3;
  table = (Table_connector **)tmp;
  i = 0;
  while (i < table_size) {
    *(table + i) = (Table_connector *)((void *)0);
    i ++;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
int hash(int lw , int rw , Connector *le , Connector *re , int cost ) 
{ int i ;
  int __retres7 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& le);
  simple_gc_frame[3] = (void *)(& re);
  i = 0;
  i = (int )((unsigned int )(i + (i << 1)) + randtable[(lw + i) & 255]);
  i = (int )((unsigned int )(i + (i << 1)) + randtable[(rw + i) & 255]);
  i = (int )((unsigned int )(i + (i << 1)) + randtable[((long )le + (long )i) % (long )(table_size + 1) & 255L]);
  i = (int )((unsigned int )(i + (i << 1)) + randtable[((long )re + (long )i) % (long )(table_size + 1) & 255L]);
  i = (int )((unsigned int )(i + (i << 1)) + randtable[(cost + i) & 255]);
  __retres7 = i & (table_size - 1);
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres7);
  }
}
}
void free_table(void) 
{ int i ;
  Table_connector *t ;
  Table_connector *x ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& t);
  t = 0;
  simple_gc_frame[3] = (void *)(& x);
  x = 0;
  i = 0;
  while (i < table_size) {
    t = *(table + i);
    while ((unsigned int )t != (unsigned int )((void *)0)) {
      x = t->next;
      t = x;
    }
    i ++;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
Table_connector *table_pointer(int lw , int rw , Connector *le , Connector *re , int cost ) 
{ Table_connector *t ;
  int tmp ;
  Table_connector *__retres8 ;
  int __cil_tmp9 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& t);
  t = 0;
  simple_gc_frame[3] = (void *)(& __retres8);
  __retres8 = 0;
  simple_gc_frame[4] = (void *)(& le);
  simple_gc_frame[5] = (void *)(& re);
  N_hash_lookups ++;
  work_in_hash_lookups ++;
  __cil_tmp9 = hash(lw, rw, le, re, cost);
  tmp = __cil_tmp9;
  t = *(table + tmp);
  while ((unsigned int )t != (unsigned int )((void *)0)) {
    work_in_hash_lookups ++;
    if ((int )t->lw == lw) {
      if ((int )t->rw == rw) {
        if ((unsigned int )t->le == (unsigned int )le) {
          if ((unsigned int )t->re == (unsigned int )re) {
            if ((int )t->cost == cost) {
              __retres8 = t;
              goto return_label;
            }
          }
        }
      }
    }
    t = t->next;
  }
  __retres8 = (Table_connector *)((void *)0);
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres8);
  }
}
}
int table_lookup(int lw , int rw , Connector *le , Connector *re , int cost ) 
{ Table_connector *t ;
  Table_connector *tmp ;
  int __retres8 ;
  Table_connector *__cil_tmp9 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& t);
  t = 0;
  simple_gc_frame[3] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[4] = (void *)(& le);
  simple_gc_frame[5] = (void *)(& re);
  __cil_tmp9 = table_pointer(lw, rw, le, re, cost);
  tmp = __cil_tmp9;
  t = tmp;
  if ((unsigned int )t == (unsigned int )((void *)0)) {
    __retres8 = -1;
    goto return_label;
  } else {
    __retres8 = t->count;
    goto return_label;
  }
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres8);
  }
}
}
Table_connector *table_store(int lw , int rw , Connector *le , Connector *re , int cost ,
                             int count___0 ) 
{ Table_connector *t ;
  Table_connector *n ;
  int h ;
  void *tmp ;
  void *__cil_tmp11 ;
  int __cil_tmp12 ;
  extern struct gc_tag_struct *__gc_struct_Table_connector_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[7] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((5 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& t);
  t = 0;
  simple_gc_frame[3] = (void *)(& n);
  n = 0;
  simple_gc_frame[4] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[5] = (void *)(& le);
  simple_gc_frame[6] = (void *)(& re);
  N_in_table ++;
  __cil_tmp11 = GC_malloc(__gc_struct_Table_connector_tag, (int )sizeof(Table_connector ));
  tmp = __cil_tmp11;
  n = (Table_connector *)tmp;
  n->count = count___0;
  n->lw = (short )lw;
  n->rw = (short )rw;
  n->le = le;
  n->re = re;
  n->cost = (short )cost;
  __cil_tmp12 = hash(lw, rw, le, re, cost);
  h = __cil_tmp12;
  t = *(table + h);
  n->next = t;
  *(table + h) = n;
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (n);
  }
}
}
void table_update(int lw , int rw , Connector *le , Connector *re , int cost , int count___0 ) 
{ Table_connector *t ;
  Table_connector *tmp ;
  Table_connector *__cil_tmp9 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& t);
  t = 0;
  simple_gc_frame[3] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[4] = (void *)(& le);
  simple_gc_frame[5] = (void *)(& re);
  __cil_tmp9 = table_pointer(lw, rw, le, re, cost);
  tmp = __cil_tmp9;
  t = tmp;
  if (! ((unsigned int )t != (unsigned int )((void *)0))) {
    printf((char const   * __restrict  )"Assertion failed: %s\n", "This entry is supposed to be in the table.");
    exit(1);
  }
  t->count = count___0;

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
int pseudocount(int lw , int rw , Connector *le , Connector *re , int cost ) 
{ int count___0 ;
  int __retres7 ;
  int __cil_tmp8 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& le);
  simple_gc_frame[3] = (void *)(& re);
  __cil_tmp8 = table_lookup(lw, rw, le, re, cost);
  count___0 = __cil_tmp8;
  if (count___0 == 0) {
    __retres7 = 0;
    goto return_label;
  } else {
    __retres7 = 1;
    goto return_label;
  }
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres7);
  }
}
}
int count(int lw , int rw , Connector *le , Connector *re , int cost ) 
{ Disjunct *d ;
  int total ;
  int pseudototal ;
  int start_word ;
  int end_word ;
  int w ;
  int leftcount ;
  int rightcount ;
  int lcost ;
  int rcost ;
  int Lmatch ;
  int Rmatch ;
  Match_node *m ;
  Match_node *m1 ;
  Table_connector *t ;
  int tmp ;
  int tmp___0 ;
  int tmp___1 ;
  int tmp___2 ;
  int tmp___3 ;
  int tmp___4 ;
  int tmp___5 ;
  int tmp___6 ;
  int tmp___7 ;
  int tmp___8 ;
  int tmp___9 ;
  int tmp___10 ;
  int tmp___11 ;
  int tmp___12 ;
  int tmp___13 ;
  int tmp___14 ;
  int tmp___15 ;
  int tmp___16 ;
  int tmp___17 ;
  int tmp___18 ;
  int __retres41 ;
  Table_connector *__cil_tmp42 ;
  Table_connector *__cil_tmp43 ;
  Match_node *__cil_tmp44 ;
  int __cil_tmp45 ;
  int __cil_tmp46 ;
  int __cil_tmp47 ;
  int __cil_tmp48 ;
  int __cil_tmp49 ;
  int __cil_tmp50 ;
  int __cil_tmp51 ;
  int __cil_tmp52 ;
  int __cil_tmp53 ;
  int __cil_tmp54 ;
  int __cil_tmp55 ;
  int __cil_tmp56 ;
  int __cil_tmp57 ;
  int __cil_tmp58 ;
  int __cil_tmp59 ;
  int __cil_tmp60 ;
  int __cil_tmp61 ;
  int __cil_tmp62 ;
  int __cil_tmp63 ;
  int __cil_tmp64 ;
  int __cil_tmp65 ;
  int __cil_tmp66 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[8] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((6 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& d);
  d = 0;
  simple_gc_frame[3] = (void *)(& m);
  m = 0;
  simple_gc_frame[4] = (void *)(& m1);
  m1 = 0;
  simple_gc_frame[5] = (void *)(& t);
  t = 0;
  simple_gc_frame[6] = (void *)(& le);
  simple_gc_frame[7] = (void *)(& re);
  if (cost < 0) {
    __retres41 = 0;
    goto return_label;
  }
  __cil_tmp42 = table_pointer(lw, rw, le, re, cost);
  t = __cil_tmp42;
  if ((unsigned int )t == (unsigned int )((void *)0)) {
    __cil_tmp43 = table_store(lw, rw, le, re, cost, 0);
    t = __cil_tmp43;
  } else {
    __retres41 = t->count;
    goto return_label;
  }
  if (rw == 1 + lw) {
    if ((unsigned int )le == (unsigned int )((void *)0)) {
      if ((unsigned int )re == (unsigned int )((void *)0)) {
        if (cost == 0) {
          t->count = 1;
        } else {
          t->count = 0;
        }
      } else {
        t->count = 0;
      }
    } else {
      t->count = 0;
    }
    __retres41 = t->count;
    goto return_label;
  }
  if ((unsigned int )le == (unsigned int )((void *)0)) {
    if ((unsigned int )re == (unsigned int )((void *)0)) {
      if (cost == (rw - lw) - 1) {
        t->count = 1;
      } else {
        t->count = 0;
      }
      __retres41 = t->count;
      goto return_label;
    }
  }
  if ((unsigned int )le == (unsigned int )((void *)0)) {
    start_word = lw + 1;
  } else {
    start_word = (int )le->word;
  }
  if ((unsigned int )re == (unsigned int )((void *)0)) {
    if (rw - 1 < lw + maxlinklength) {
      end_word = rw - 1;
    } else {
      end_word = lw + maxlinklength;
    }
  } else {
    end_word = (int )re->word;
  }
  total = 0;
  w = start_word;
  while (w <= end_word) {
    __cil_tmp44 = form_match_list(w, le, lw, re, rw);
    m = __cil_tmp44;
    m1 = m;
    while ((unsigned int )m != (unsigned int )((void *)0)) {
      d = m->d;
      lcost = 0;
      while (lcost <= cost) {
        rcost = cost - lcost;
        if ((unsigned int )le != (unsigned int )((void *)0)) {
          if ((unsigned int )d->left != (unsigned int )((void *)0)) {
            __cil_tmp45 = match(le, d->left);
            tmp = __cil_tmp45;
            if (tmp) {
              tmp___0 = 1;
            } else {
              tmp___0 = 0;
            }
          } else {
            tmp___0 = 0;
          }
        } else {
          tmp___0 = 0;
        }
        Lmatch = tmp___0;
        if ((unsigned int )d->right != (unsigned int )((void *)0)) {
          if ((unsigned int )re != (unsigned int )((void *)0)) {
            __cil_tmp46 = match(d->right, re);
            tmp___1 = __cil_tmp46;
            if (tmp___1) {
              tmp___2 = 1;
            } else {
              tmp___2 = 0;
            }
          } else {
            tmp___2 = 0;
          }
        } else {
          tmp___2 = 0;
        }
        Rmatch = tmp___2;
        leftcount = 0;
        rightcount = leftcount;
        if (Lmatch) {
          __cil_tmp47 = pseudocount(lw, w, le->next, (d->left)->next, lcost);
          leftcount = __cil_tmp47;
          if (le->multi) {
            __cil_tmp48 = pseudocount(lw, w, le, (d->left)->next, lcost);
            tmp___3 = __cil_tmp48;
            leftcount += tmp___3;
          }
          if ((d->left)->multi) {
            __cil_tmp49 = pseudocount(lw, w, le->next, d->left, lcost);
            tmp___4 = __cil_tmp49;
            leftcount += tmp___4;
          }
          if (le->multi) {
            if ((d->left)->multi) {
              __cil_tmp50 = pseudocount(lw, w, le, d->left, lcost);
              tmp___5 = __cil_tmp50;
              leftcount += tmp___5;
            }
          }
        }
        if (Rmatch) {
          __cil_tmp51 = pseudocount(w, rw, (d->right)->next, re->next, rcost);
          rightcount = __cil_tmp51;
          if ((d->right)->multi) {
            __cil_tmp52 = pseudocount(w, rw, d->right, re->next, rcost);
            tmp___6 = __cil_tmp52;
            rightcount += tmp___6;
          }
          if (re->multi) {
            __cil_tmp53 = pseudocount(w, rw, (d->right)->next, re, rcost);
            tmp___7 = __cil_tmp53;
            rightcount += tmp___7;
          }
          if ((d->right)->multi) {
            if (re->multi) {
              __cil_tmp54 = pseudocount(w, rw, d->right, re, rcost);
              tmp___8 = __cil_tmp54;
              rightcount += tmp___8;
            }
          }
        }
        pseudototal = leftcount * rightcount;
        if (leftcount > 0) {
          __cil_tmp55 = pseudocount(w, rw, d->right, re, rcost);
          tmp___9 = __cil_tmp55;
          pseudototal += leftcount * tmp___9;
        }
        if ((unsigned int )le == (unsigned int )((void *)0)) {
          if (rightcount > 0) {
            __cil_tmp56 = pseudocount(lw, w, le, d->left, lcost);
            tmp___10 = __cil_tmp56;
            pseudototal += rightcount * tmp___10;
          }
        }
        if (pseudototal != 0) {
          leftcount = 0;
          rightcount = leftcount;
          if (Lmatch) {
            __cil_tmp57 = count(lw, w, le->next, (d->left)->next, lcost);
            leftcount = __cil_tmp57;
            if (le->multi) {
              __cil_tmp58 = count(lw, w, le, (d->left)->next, lcost);
              tmp___11 = __cil_tmp58;
              leftcount += tmp___11;
            }
            if ((d->left)->multi) {
              __cil_tmp59 = count(lw, w, le->next, d->left, lcost);
              tmp___12 = __cil_tmp59;
              leftcount += tmp___12;
            }
            if (le->multi) {
              if ((d->left)->multi) {
                __cil_tmp60 = count(lw, w, le, d->left, lcost);
                tmp___13 = __cil_tmp60;
                leftcount += tmp___13;
              }
            }
          }
          if (Rmatch) {
            __cil_tmp61 = count(w, rw, (d->right)->next, re->next, rcost);
            rightcount = __cil_tmp61;
            if ((d->right)->multi) {
              __cil_tmp62 = count(w, rw, d->right, re->next, rcost);
              tmp___14 = __cil_tmp62;
              rightcount += tmp___14;
            }
            if (re->multi) {
              __cil_tmp63 = count(w, rw, (d->right)->next, re, rcost);
              tmp___15 = __cil_tmp63;
              rightcount += tmp___15;
            }
            if ((d->right)->multi) {
              if (re->multi) {
                __cil_tmp64 = count(w, rw, d->right, re, rcost);
                tmp___16 = __cil_tmp64;
                rightcount += tmp___16;
              }
            }
          }
          total += leftcount * rightcount;
          if (leftcount > 0) {
            __cil_tmp65 = count(w, rw, d->right, re, rcost);
            tmp___17 = __cil_tmp65;
            total += leftcount * tmp___17;
          }
          if ((unsigned int )le == (unsigned int )((void *)0)) {
            if (rightcount > 0) {
              __cil_tmp66 = count(lw, w, le, d->left, lcost);
              tmp___18 = __cil_tmp66;
              total += rightcount * tmp___18;
            }
          }
        }
        lcost ++;
      }
      m = m->next;
    }
    put_match_list(m1);
    w ++;
  }
  t->count = total;
  __retres41 = total;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres41);
  }
}
}
int parse(int cost ) 
{ Disjunct *dis ;
  int total ;
  int tmp ;
  int tmp___0 ;
  int __cil_tmp6 ;
  int __cil_tmp7 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& dis);
  dis = 0;
  total = 0;
  dis = sentence[0].d;
  while ((unsigned int )dis != (unsigned int )((void *)0)) {
    if ((unsigned int )dis->left == (unsigned int )((void *)0)) {
      __cil_tmp6 = count(0, N_words, dis->right, (Connector *)((void *)0), cost);
      tmp = __cil_tmp6;
      total += tmp;
    }
    dis = dis->next;
  }
  __cil_tmp7 = count(0, N_words, (Connector *)((void *)0), (Connector *)((void *)0),
                     cost);
  tmp___0 = __cil_tmp7;
  total += tmp___0;
  if (verbosity > 1) {
    printf((char const   * __restrict  )"Total count with cost %d:   %d\n", cost,
           total);
  }
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (total);
  }
}
}
int region_valid(int lw , int rw , Connector *le , Connector *re ) 
{ Disjunct *d ;
  int left_valid ;
  int right_valid ;
  int found ;
  int i ;
  int start_word ;
  int end_word ;
  int w ;
  Match_node *m ;
  Match_node *m1 ;
  int tmp ;
  int tmp___0 ;
  int tmp___1 ;
  int tmp___2 ;
  int tmp___3 ;
  int tmp___4 ;
  int tmp___5 ;
  int tmp___6 ;
  int tmp___7 ;
  int tmp___8 ;
  int tmp___9 ;
  int tmp___10 ;
  int tmp___11 ;
  int tmp___12 ;
  int __retres29 ;
  int __cil_tmp30 ;
  Match_node *__cil_tmp31 ;
  int __cil_tmp32 ;
  int __cil_tmp33 ;
  int __cil_tmp34 ;
  int __cil_tmp35 ;
  int __cil_tmp36 ;
  int __cil_tmp37 ;
  int __cil_tmp38 ;
  int __cil_tmp39 ;
  int __cil_tmp40 ;
  int __cil_tmp41 ;
  int __cil_tmp42 ;
  int __cil_tmp43 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[7] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((5 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& d);
  d = 0;
  simple_gc_frame[3] = (void *)(& m);
  m = 0;
  simple_gc_frame[4] = (void *)(& m1);
  m1 = 0;
  simple_gc_frame[5] = (void *)(& le);
  simple_gc_frame[6] = (void *)(& re);
  __cil_tmp30 = table_lookup(lw, rw, le, re, 0);
  i = __cil_tmp30;
  if (i >= 0) {
    __retres29 = i;
    goto return_label;
  }
  if ((unsigned int )le == (unsigned int )((void *)0)) {
    if ((unsigned int )re == (unsigned int )((void *)0)) {
      if (*(deletable[lw] + rw)) {
        table_store(lw, rw, le, re, 0, 1);
        __retres29 = 1;
        goto return_label;
      }
    }
  }
  if ((unsigned int )le == (unsigned int )((void *)0)) {
    start_word = lw + 1;
  } else {
    start_word = (int )le->word;
  }
  if ((unsigned int )re == (unsigned int )((void *)0)) {
    if (rw - 1 < lw + maxlinklength) {
      end_word = rw - 1;
    } else {
      end_word = lw + maxlinklength;
    }
  } else {
    end_word = (int )re->word;
  }
  found = 0;
  w = start_word;
  while (w <= end_word) {
    __cil_tmp31 = form_match_list(w, le, lw, re, rw);
    m = __cil_tmp31;
    m1 = m;
    while ((unsigned int )m != (unsigned int )((void *)0)) {
      d = m->d;
      mark_cost ++;
      if ((unsigned int )le != (unsigned int )((void *)0)) {
        if ((unsigned int )d->left != (unsigned int )((void *)0)) {
          __cil_tmp32 = prune_match(le, d->left);
          tmp = __cil_tmp32;
          if (tmp) {
            __cil_tmp33 = region_valid(lw, w, le->next, (d->left)->next);
            tmp___0 = __cil_tmp33;
            if (tmp___0) {
              tmp___4 = 1;
            } else {
              if (le->multi) {
                __cil_tmp34 = region_valid(lw, w, le, (d->left)->next);
                tmp___1 = __cil_tmp34;
                if (tmp___1) {
                  tmp___4 = 1;
                } else {
                  goto _L___0;
                }
              } else {
                _L___0: 
                if ((d->left)->multi) {
                  __cil_tmp35 = region_valid(lw, w, le->next, d->left);
                  tmp___2 = __cil_tmp35;
                  if (tmp___2) {
                    tmp___4 = 1;
                  } else {
                    goto _L;
                  }
                } else {
                  _L: 
                  if (le->multi) {
                    if ((d->left)->multi) {
                      __cil_tmp36 = region_valid(lw, w, le, d->left);
                      tmp___3 = __cil_tmp36;
                      if (tmp___3) {
                        tmp___4 = 1;
                      } else {
                        tmp___4 = 0;
                      }
                    } else {
                      tmp___4 = 0;
                    }
                  } else {
                    tmp___4 = 0;
                  }
                }
              }
            }
          } else {
            tmp___4 = 0;
          }
        } else {
          tmp___4 = 0;
        }
      } else {
        tmp___4 = 0;
      }
      left_valid = tmp___4;
      if (left_valid) {
        __cil_tmp37 = region_valid(w, rw, d->right, re);
        tmp___5 = __cil_tmp37;
        if (tmp___5) {
          found = 1;
          break;
        }
      }
      if ((unsigned int )d->right != (unsigned int )((void *)0)) {
        if ((unsigned int )re != (unsigned int )((void *)0)) {
          __cil_tmp38 = prune_match(d->right, re);
          tmp___6 = __cil_tmp38;
          if (tmp___6) {
            __cil_tmp39 = region_valid(w, rw, (d->right)->next, re->next);
            tmp___7 = __cil_tmp39;
            if (tmp___7) {
              tmp___11 = 1;
            } else {
              if ((d->right)->multi) {
                __cil_tmp40 = region_valid(w, rw, d->right, re->next);
                tmp___8 = __cil_tmp40;
                if (tmp___8) {
                  tmp___11 = 1;
                } else {
                  goto _L___2;
                }
              } else {
                _L___2: 
                if (re->multi) {
                  __cil_tmp41 = region_valid(w, rw, (d->right)->next, re);
                  tmp___9 = __cil_tmp41;
                  if (tmp___9) {
                    tmp___11 = 1;
                  } else {
                    goto _L___1;
                  }
                } else {
                  _L___1: 
                  if ((d->right)->multi) {
                    if (re->multi) {
                      __cil_tmp42 = region_valid(w, rw, d->right, re);
                      tmp___10 = __cil_tmp42;
                      if (tmp___10) {
                        tmp___11 = 1;
                      } else {
                        tmp___11 = 0;
                      }
                    } else {
                      tmp___11 = 0;
                    }
                  } else {
                    tmp___11 = 0;
                  }
                }
              }
            }
          } else {
            tmp___11 = 0;
          }
        } else {
          tmp___11 = 0;
        }
      } else {
        tmp___11 = 0;
      }
      right_valid = tmp___11;
      if (left_valid) {
        if (right_valid) {
          found = 1;
          break;
        } else {
          goto _L___3;
        }
      } else {
        _L___3: 
        if (right_valid) {
          __cil_tmp43 = region_valid(lw, w, le, d->left);
          tmp___12 = __cil_tmp43;
          if (tmp___12) {
            found = 1;
            break;
          }
        }
      }
      m = m->next;
    }
    put_match_list(m1);
    if (found != 0) {
      break;
    }
    w ++;
  }
  table_store(lw, rw, le, re, 0, found);
  __retres29 = found;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres29);
  }
}
}
void mark_region(int lw , int rw , Connector *le , Connector *re ) 
{ Disjunct *d ;
  int left_valid ;
  int right_valid ;
  int i ;
  int start_word ;
  int end_word ;
  int w ;
  Match_node *m ;
  Match_node *m1 ;
  int tmp ;
  int tmp___0 ;
  int tmp___1 ;
  int tmp___2 ;
  int tmp___3 ;
  int tmp___4 ;
  int tmp___5 ;
  int tmp___6 ;
  int tmp___7 ;
  int tmp___8 ;
  int tmp___9 ;
  int tmp___10 ;
  int tmp___11 ;
  int tmp___12 ;
  int tmp___13 ;
  int __cil_tmp29 ;
  int __cil_tmp30 ;
  Match_node *__cil_tmp31 ;
  int __cil_tmp32 ;
  int __cil_tmp33 ;
  int __cil_tmp34 ;
  int __cil_tmp35 ;
  int __cil_tmp36 ;
  int __cil_tmp37 ;
  int __cil_tmp38 ;
  int __cil_tmp39 ;
  int __cil_tmp40 ;
  int __cil_tmp41 ;
  int __cil_tmp42 ;
  int __cil_tmp43 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[7] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((5 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& d);
  d = 0;
  simple_gc_frame[3] = (void *)(& m);
  m = 0;
  simple_gc_frame[4] = (void *)(& m1);
  m1 = 0;
  simple_gc_frame[5] = (void *)(& le);
  simple_gc_frame[6] = (void *)(& re);
  __cil_tmp29 = region_valid(lw, rw, le, re);
  i = __cil_tmp29;
  if (i == 0) {

    goto return_label;
  } else {
    if (i == 2) {

      goto return_label;
    }
  }
  table_update(lw, rw, le, re, 0, 2);
  if ((unsigned int )le == (unsigned int )((void *)0)) {
    if ((unsigned int )re == (unsigned int )((void *)0)) {
      if (null_links) {
        if (rw != 1 + lw) {
          w = lw + 1;
          d = sentence[w].d;
          while ((unsigned int )d != (unsigned int )((void *)0)) {
            if ((unsigned int )d->left == (unsigned int )((void *)0)) {
              __cil_tmp30 = region_valid(w, rw, d->right, (Connector *)((void *)0));
              tmp = __cil_tmp30;
              if (tmp) {
                d->marked = (char)1;
                mark_region(w, rw, d->right, (Connector *)((void *)0));
              }
            }
            d = d->next;
          }
          mark_region(w, rw, (Connector *)((void *)0), (Connector *)((void *)0));

          goto return_label;
        }
      }
    }
  }
  if ((unsigned int )le == (unsigned int )((void *)0)) {
    start_word = lw + 1;
  } else {
    start_word = (int )le->word;
  }
  if ((unsigned int )re == (unsigned int )((void *)0)) {
    if (rw - 1 < lw + maxlinklength) {
      end_word = rw - 1;
    } else {
      end_word = lw + maxlinklength;
    }
  } else {
    end_word = (int )re->word;
  }
  w = start_word;
  while (w <= end_word) {
    __cil_tmp31 = form_match_list(w, le, lw, re, rw);
    m = __cil_tmp31;
    m1 = m;
    while ((unsigned int )m != (unsigned int )((void *)0)) {
      d = m->d;
      mark_cost ++;
      if ((unsigned int )le != (unsigned int )((void *)0)) {
        if ((unsigned int )d->left != (unsigned int )((void *)0)) {
          __cil_tmp32 = prune_match(le, d->left);
          tmp___0 = __cil_tmp32;
          if (tmp___0) {
            __cil_tmp33 = region_valid(lw, w, le->next, (d->left)->next);
            tmp___1 = __cil_tmp33;
            if (tmp___1) {
              tmp___5 = 1;
            } else {
              if (le->multi) {
                __cil_tmp34 = region_valid(lw, w, le, (d->left)->next);
                tmp___2 = __cil_tmp34;
                if (tmp___2) {
                  tmp___5 = 1;
                } else {
                  goto _L___0;
                }
              } else {
                _L___0: 
                if ((d->left)->multi) {
                  __cil_tmp35 = region_valid(lw, w, le->next, d->left);
                  tmp___3 = __cil_tmp35;
                  if (tmp___3) {
                    tmp___5 = 1;
                  } else {
                    goto _L;
                  }
                } else {
                  _L: 
                  if (le->multi) {
                    if ((d->left)->multi) {
                      __cil_tmp36 = region_valid(lw, w, le, d->left);
                      tmp___4 = __cil_tmp36;
                      if (tmp___4) {
                        tmp___5 = 1;
                      } else {
                        tmp___5 = 0;
                      }
                    } else {
                      tmp___5 = 0;
                    }
                  } else {
                    tmp___5 = 0;
                  }
                }
              }
            }
          } else {
            tmp___5 = 0;
          }
        } else {
          tmp___5 = 0;
        }
      } else {
        tmp___5 = 0;
      }
      left_valid = tmp___5;
      if ((unsigned int )d->right != (unsigned int )((void *)0)) {
        if ((unsigned int )re != (unsigned int )((void *)0)) {
          __cil_tmp37 = prune_match(d->right, re);
          tmp___6 = __cil_tmp37;
          if (tmp___6) {
            __cil_tmp38 = region_valid(w, rw, (d->right)->next, re->next);
            tmp___7 = __cil_tmp38;
            if (tmp___7) {
              tmp___11 = 1;
            } else {
              if ((d->right)->multi) {
                __cil_tmp39 = region_valid(w, rw, d->right, re->next);
                tmp___8 = __cil_tmp39;
                if (tmp___8) {
                  tmp___11 = 1;
                } else {
                  goto _L___2;
                }
              } else {
                _L___2: 
                if (re->multi) {
                  __cil_tmp40 = region_valid(w, rw, (d->right)->next, re);
                  tmp___9 = __cil_tmp40;
                  if (tmp___9) {
                    tmp___11 = 1;
                  } else {
                    goto _L___1;
                  }
                } else {
                  _L___1: 
                  if ((d->right)->multi) {
                    if (re->multi) {
                      __cil_tmp41 = region_valid(w, rw, d->right, re);
                      tmp___10 = __cil_tmp41;
                      if (tmp___10) {
                        tmp___11 = 1;
                      } else {
                        tmp___11 = 0;
                      }
                    } else {
                      tmp___11 = 0;
                    }
                  } else {
                    tmp___11 = 0;
                  }
                }
              }
            }
          } else {
            tmp___11 = 0;
          }
        } else {
          tmp___11 = 0;
        }
      } else {
        tmp___11 = 0;
      }
      right_valid = tmp___11;
      if (left_valid) {
        __cil_tmp42 = region_valid(w, rw, d->right, re);
        tmp___12 = __cil_tmp42;
        if (tmp___12) {
          d->marked = (char)1;
          mark_region(w, rw, d->right, re);
          mark_region(lw, w, le->next, (d->left)->next);
          if (le->multi) {
            mark_region(lw, w, le, (d->left)->next);
          }
          if ((d->left)->multi) {
            mark_region(lw, w, le->next, d->left);
          }
          if (le->multi) {
            if ((d->left)->multi) {
              mark_region(lw, w, le, d->left);
            }
          }
        }
      }
      if (right_valid) {
        __cil_tmp43 = region_valid(lw, w, le, d->left);
        tmp___13 = __cil_tmp43;
        if (tmp___13) {
          d->marked = (char)1;
          mark_region(lw, w, le, d->left);
          mark_region(w, rw, (d->right)->next, re->next);
          if ((d->right)->multi) {
            mark_region(w, rw, d->right, re->next);
          }
          if (re->multi) {
            mark_region(w, rw, (d->right)->next, re);
          }
          if ((d->right)->multi) {
            if (re->multi) {
              mark_region(w, rw, d->right, re);
            }
          }
        }
      }
      if (left_valid) {
        if (right_valid) {
          d->marked = (char)1;
          mark_region(lw, w, le->next, (d->left)->next);
          if (le->multi) {
            mark_region(lw, w, le, (d->left)->next);
          }
          if ((d->left)->multi) {
            mark_region(lw, w, le->next, d->left);
          }
          if (le->multi) {
            if ((d->left)->multi) {
              mark_region(lw, w, le, d->left);
            }
          }
          mark_region(w, rw, (d->right)->next, re->next);
          if ((d->right)->multi) {
            mark_region(w, rw, d->right, re->next);
          }
          if (re->multi) {
            mark_region(w, rw, (d->right)->next, re);
          }
          if ((d->right)->multi) {
            if (re->multi) {
              mark_region(w, rw, d->right, re);
            }
          }
        }
      }
      m = m->next;
    }
    put_match_list(m1);
    w ++;
  }

  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void conjunction_prune(void) 
{ Disjunct *d ;
  Disjunct *d_head ;
  Disjunct *dx ;
  int w ;
  int tmp ;
  int __cil_tmp6 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& d);
  d = 0;
  simple_gc_frame[3] = (void *)(& d_head);
  d_head = 0;
  simple_gc_frame[4] = (void *)(& dx);
  dx = 0;
  w = 0;
  while (w < N_words) {
    d = sentence[w].d;
    while ((unsigned int )d != (unsigned int )((void *)0)) {
      d->marked = (char)0;
      d = d->next;
    }
    w ++;
  }
  init_fast_matcher();
  init_table();
  d = sentence[0].d;
  while ((unsigned int )d != (unsigned int )((void *)0)) {
    if ((unsigned int )d->left == (unsigned int )((void *)0)) {
      __cil_tmp6 = region_valid(0, N_words, d->right, (Connector *)((void *)0));
      tmp = __cil_tmp6;
      if (tmp) {
        mark_region(0, N_words, d->right, (Connector *)((void *)0));
        d->marked = (char)1;
      }
    }
    d = d->next;
  }
  w = 0;
  while (w < N_words) {
    d_head = (Disjunct *)((void *)0);
    d = sentence[w].d;
    while ((unsigned int )d != (unsigned int )((void *)0)) {
      dx = d->next;
      if (d->marked) {
        d->next = d_head;
        d_head = d;
      } else {
        d->next = (Disjunct *)((void *)0);
        free_disjuncts(d);
      }
      d = dx;
    }
    sentence[w].d = d_head;
    w ++;
  }
  free_fast_matcher();
  free_table();

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
#pragma merger(0,"merge/post-process.i","")
static char *domain_starter_links[38]  = 
  {      (char *)"W",      (char *)"Ce",      (char *)"Cs",      (char *)"Ca", 
        (char *)"Cc",      (char *)"Ci",      (char *)"R*",      (char *)"Re", 
        (char *)"RSe",      (char *)"Mr",      (char *)"QI#d",      (char *)"Mv", 
        (char *)"Jr",      (char *)"Mj",      (char *)"Qd",      (char *)"TOn", 
        (char *)"TOi",      (char *)"Mg",      (char *)"MVi",      (char *)"Ss#d", 
        (char *)"Bsd",      (char *)"ER",      (char *)"Z",      (char *)"Ma", 
        (char *)"SIs#g",      (char *)"BIqx",      (char *)"MX#p",      (char *)"MX#a", 
        (char *)"MX#r",      (char *)"MX#j",      (char *)"MV#o",      (char *)"MV#p", 
        (char *)"Eq",      (char *)"COq",      (char *)"CP",      (char *)"AFd", 
        (char *)"PFc",      (char *)((void *)0)};
static char *urfl_domain_starter_links[4]  = {      (char *)"TOo",      (char *)"I#j",      (char *)"Pa##j",      (char *)((void *)0)};
static char *urfl_only_domain_starter_links[4]  = {      (char *)"SFsx",      (char *)"Ss#g",      (char *)"COp",      (char *)((void *)0)};
CDNP CDNP_array[44]  = 
  {      {(char *)"Ce", 'e'}, 
        {(char *)"R", 'r'}, 
        {(char *)"Re", 'r'}, 
        {(char *)"W", 'm'}, 
        {(char *)"RSe", 'e'}, 
        {(char *)"Cs", 's'}, 
        {(char *)"Ca", 's'}, 
        {(char *)"Jr", 'e'}, 
        {(char *)"Mr", 'r'}, 
        {(char *)"Cc", 's'}, 
        {(char *)"Mv", 'e'}, 
        {(char *)"QI#d", 's'}, 
        {(char *)"BIqx", 's'}, 
        {(char *)"TOn", 'e'}, 
        {(char *)"TOi", 'e'}, 
        {(char *)"MVi", 'e'}, 
        {(char *)"MV#o", 's'}, 
        {(char *)"MV#p", 's'}, 
        {(char *)"AFd", 's'}, 
        {(char *)"PFc", 's'}, 
        {(char *)"Mg", 'e'}, 
        {(char *)"Mj", 'j'}, 
        {(char *)"Qd", 'm'}, 
        {(char *)"MX#j", 'j'}, 
        {(char *)"TOo", 'x'}, 
        {(char *)"I#j", 'x'}, 
        {(char *)"Pa##j", 'x'}, 
        {(char *)"COp", 'd'}, 
        {(char *)"SFsx", 'd'}, 
        {(char *)"Ss#g", 'd'}, 
        {(char *)"SIs#g", 's'}, 
        {(char *)"Ss#d", 's'}, 
        {(char *)"Bsd", 's'}, 
        {(char *)"ER", 's'}, 
        {(char *)"Z", 's'}, 
        {(char *)"Ma", 'e'}, 
        {(char *)"MX#p", 'e'}, 
        {(char *)"Ci", 'e'}, 
        {(char *)"MX#a", 'e'}, 
        {(char *)"Eq", 'e'}, 
        {(char *)"COq", 'e'}, 
        {(char *)"CP", 'd'}, 
        {(char *)"MX#r", 'r'}, 
        {(char *)((void *)0), 0}};
static char *domain_contains_links[21]  = 
  {      (char *)"Mg",      (char *)"Mx",      (char *)"Bsd",      (char *)"MX#a", 
        (char *)"Ma",      (char *)"Mv",      (char *)"MX#r",      (char *)"Ss#d", 
        (char *)"CP",      (char *)"Ws",      (char *)"Wq",      (char *)"Qd", 
        (char *)"Mj",      (char *)"Wj",      (char *)"Wi",      (char *)"MX#j", 
        (char *)"AFd",      (char *)"PFc",      (char *)"Jr",      (char *)"Wd", 
        (char *)((void *)0)};
static char *ignore_these_links[2]  = {      (char *)"Xca",      (char *)((void *)0)};
static char *must_be_connected_without[8]  = 
  {      (char *)"R*",      (char *)"Re",      (char *)"TOt",      (char *)"EXx", 
        (char *)"HA",      (char *)"SFsic",      (char *)"Jr",      (char *)((void *)0)};
static char *restricted_links[22]  = 
  {      (char *)"B#*",      (char *)"D##w",      (char *)"B#w",      (char *)"B#d", 
        (char *)"AFh",      (char *)"MVt",      (char *)"Xx",      (char *)"HL", 
        (char *)"SFsic",      (char *)"AFd",      (char *)"Bc",      (char *)"CX", 
        (char *)"CP",      (char *)"EAh",      (char *)"H",      (char *)"HA", 
        (char *)"PFc",      (char *)"B#j",      (char *)"Wd",      (char *)"PF", 
        (char *)"Z",      (char *)((void *)0)};
int ppmatch(char *s , char *t ) 
{ char c ;
  unsigned short const   **tmp ;
  unsigned short const   **tmp___0 ;
  int __retres6 ;
  unsigned short const   **__cil_tmp7 ;
  unsigned short const   **__cil_tmp8 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[3] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[4] = (void *)(& s);
  simple_gc_frame[5] = (void *)(& t);
  while (1) {
    __cil_tmp7 = __ctype_b_loc();
    tmp = __cil_tmp7;
    if (! ((int const   )*(*tmp + (int )*s) & 256)) {
      __cil_tmp8 = __ctype_b_loc();
      tmp___0 = __cil_tmp8;
      if (! ((int const   )*(*tmp___0 + (int )*t) & 256)) {
        break;
      }
    }
    if ((int )*s != (int )*t) {
      __retres6 = 0;
      goto return_label;
    }
    s ++;
    t ++;
  }
  while ((int )*s != 0) {
    if ((int )*s != 35) {
      if ((int )*t == 0) {
        c = (char )'*';
      } else {
        c = *t;
      }
      if ((int )*s != (int )c) {
        __retres6 = 0;
        goto return_label;
      }
    }
    s ++;
    t ++;
  }
  __retres6 = 1;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres6);
  }
}
}
int find_domain_name(char *string ) 
{ int i ;
  int tmp ;
  int __retres4 ;
  int __cil_tmp5 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& string);
  i = 0;
  while ((unsigned int )CDNP_array[i].string != (unsigned int )((void *)0)) {
    __cil_tmp5 = ppmatch(CDNP_array[i].string, string);
    tmp = __cil_tmp5;
    if (tmp) {
      __retres4 = CDNP_array[i].n;
      goto return_label;
    }
    i ++;
  }
  __retres4 = 0;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres4);
  }
}
}
static Domain domain_array[497]  ;
static int N_domains  ;
static int N_domain_trees  ;
static List_o_links *word_links___0[250]  ;
void print_domain(int d ) 
{ List_o_links *lol ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& lol);
  lol = 0;
  lol = domain_array[d].lol;
  while ((unsigned int )lol != (unsigned int )((void *)0)) {
    print_a_link(stdout, lol->link);
    lol = lol->next;
  }
  printf((char const   * __restrict  )"\n");

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void print_domains(void) 
{ int d ;

  {
  d = 0;
  while (d < N_domains) {
    printf((char const   * __restrict  )"domain %d \"%s\"\n", d, domain_array[d].string);
    print_domain(d);
    d ++;
  }

  return;
}
}
int post_process_match(char *s , char *t ) 
{ unsigned short const   **tmp ;
  unsigned short const   **tmp___0 ;
  int __retres5 ;
  unsigned short const   **__cil_tmp6 ;
  unsigned short const   **__cil_tmp7 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[3] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[4] = (void *)(& s);
  simple_gc_frame[5] = (void *)(& t);
  while (1) {
    __cil_tmp6 = __ctype_b_loc();
    tmp = __cil_tmp6;
    if (! ((int const   )*(*tmp + (int )*s) & 256)) {
      __cil_tmp7 = __ctype_b_loc();
      tmp___0 = __cil_tmp7;
      if (! ((int const   )*(*tmp___0 + (int )*t) & 256)) {
        break;
      }
    }
    if ((int )*s != (int )*t) {
      __retres5 = 0;
      goto return_label;
    }
    s ++;
    t ++;
  }
  while (1) {
    if ((int )*s != 0) {
      if (! ((int )*t != 0)) {
        break;
      }
    } else {
      break;
    }
    if ((int )*s == 42) {
      s ++;
      t ++;
    } else {
      if ((int )*t == 42) {
        s ++;
        t ++;
      } else {
        if ((int )*s == (int )*t) {
          if ((int )*s != 94) {
            s ++;
            t ++;
          } else {
            __retres5 = 0;
            goto return_label;
          }
        } else {
          __retres5 = 0;
          goto return_label;
        }
      }
    }
  }
  __retres5 = 1;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres5);
  }
}
}
int match_in_list(char *s , char **a ) 
{ int i ;
  int tmp ;
  int __retres5 ;
  int __cil_tmp6 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& s);
  simple_gc_frame[3] = (void *)(& a);
  i = 0;
  while ((unsigned int )*(a + i) != (unsigned int )((void *)0)) {
    __cil_tmp6 = post_process_match(s, *(a + i));
    tmp = __cil_tmp6;
    if (tmp) {
      __retres5 = 1;
      goto return_label;
    }
    i ++;
  }
  __retres5 = 0;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres5);
  }
}
}
int string_in_list(char *s , char **a ) 
{ int i ;
  int tmp ;
  int __retres5 ;
  int __cil_tmp6 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& s);
  simple_gc_frame[3] = (void *)(& a);
  i = 0;
  while ((unsigned int )*(a + i) != (unsigned int )((void *)0)) {
    __cil_tmp6 = ppmatch(*(a + i), s);
    tmp = __cil_tmp6;
    if (tmp) {
      __retres5 = 1;
      goto return_label;
    }
    i ++;
  }
  __retres5 = 0;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres5);
  }
}
}
void build_graph(void) 
{ int i ;
  int link ;
  List_o_links *lol ;
  int tmp ;
  void *tmp___0 ;
  void *tmp___1 ;
  int __cil_tmp7 ;
  void *__cil_tmp8 ;
  void *__cil_tmp9 ;
  extern struct gc_tag_struct *__gc_struct_List_o_links_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& lol);
  lol = 0;
  simple_gc_frame[3] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[4] = (void *)(& tmp___1);
  tmp___1 = 0;
  i = 0;
  while (i < N_words) {
    word_links___0[i] = (List_o_links *)((void *)0);
    i ++;
  }
  link = 0;
  while (link < N_links) {
    if (pp_link_array[link].l == -1) {
      goto __Cont;
    }
    __cil_tmp7 = string_in_list(pp_link_array[link].name, ignore_these_links);
    tmp = __cil_tmp7;
    if (tmp) {
      goto __Cont;
    }
    __cil_tmp8 = GC_malloc(__gc_struct_List_o_links_struct_tag, (int )sizeof(List_o_links ));
    tmp___0 = __cil_tmp8;
    lol = (List_o_links *)tmp___0;
    lol->next = word_links___0[pp_link_array[link].l];
    word_links___0[pp_link_array[link].l] = lol;
    lol->link = link;
    lol->word = pp_link_array[link].r;
    __cil_tmp9 = GC_malloc(__gc_struct_List_o_links_struct_tag, (int )sizeof(List_o_links ));
    tmp___1 = __cil_tmp9;
    lol = (List_o_links *)tmp___1;
    lol->next = word_links___0[pp_link_array[link].r];
    word_links___0[pp_link_array[link].r] = lol;
    lol->link = link;
    lol->word = pp_link_array[link].l;
    __Cont: 
    link ++;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void add_link_to_domain(int link ) 
{ List_o_links *lol ;
  void *tmp ;
  void *__cil_tmp4 ;
  extern struct gc_tag_struct *__gc_struct_List_o_links_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& lol);
  lol = 0;
  simple_gc_frame[3] = (void *)(& tmp);
  tmp = 0;
  __cil_tmp4 = GC_malloc(__gc_struct_List_o_links_struct_tag, (int )sizeof(List_o_links ));
  tmp = __cil_tmp4;
  lol = (List_o_links *)tmp;
  lol->next = domain_array[N_domains].lol;
  domain_array[N_domains].lol = lol;
  (domain_array[N_domains].size) ++;
  lol->link = link;

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
static int visited___0[250]  ;
void depth_first_search(int w , int root , int start_link ) 
{ List_o_links *lol ;
  int tmp ;
  int __cil_tmp6 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& lol);
  lol = 0;
  visited___0[w] = 1;
  lol = word_links___0[w];
  while ((unsigned int )lol != (unsigned int )((void *)0)) {
    if (lol->word < w) {
      if (lol->link != start_link) {
        add_link_to_domain(lol->link);
      }
    }
    lol = lol->next;
  }
  lol = word_links___0[w];
  while ((unsigned int )lol != (unsigned int )((void *)0)) {
    if (! visited___0[lol->word]) {
      if (lol->word != root) {
        if (lol->word < root) {
          if (lol->word < w) {
            __cil_tmp6 = string_in_list(pp_link_array[lol->link].name, restricted_links);
            tmp = __cil_tmp6;
            if (! tmp) {
              depth_first_search(lol->word, root, start_link);
            }
          } else {
            depth_first_search(lol->word, root, start_link);
          }
        } else {
          depth_first_search(lol->word, root, start_link);
        }
      }
    }
    lol = lol->next;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void bad_depth_first_search(int w , int root , int start_link ) 
{ List_o_links *lol ;
  int tmp ;
  int __cil_tmp6 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& lol);
  lol = 0;
  visited___0[w] = 1;
  lol = word_links___0[w];
  while ((unsigned int )lol != (unsigned int )((void *)0)) {
    if (lol->word < w) {
      if (lol->link != start_link) {
        if (w != root) {
          add_link_to_domain(lol->link);
        }
      }
    }
    lol = lol->next;
  }
  lol = word_links___0[w];
  while ((unsigned int )lol != (unsigned int )((void *)0)) {
    if (! visited___0[lol->word]) {
      if (w == root) {
        if (! (lol->word < w)) {
          goto _L;
        }
      } else {
        _L: 
        if (lol->word < root) {
          if (lol->word < w) {
            __cil_tmp6 = string_in_list(pp_link_array[lol->link].name, restricted_links);
            tmp = __cil_tmp6;
            if (! tmp) {
              bad_depth_first_search(lol->word, root, start_link);
            }
          } else {
            bad_depth_first_search(lol->word, root, start_link);
          }
        } else {
          bad_depth_first_search(lol->word, root, start_link);
        }
      }
    }
    lol = lol->next;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void d_depth_first_search(int w , int root , int right , int start_link ) 
{ List_o_links *lol ;
  int tmp ;
  int __cil_tmp7 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& lol);
  lol = 0;
  visited___0[w] = 1;
  lol = word_links___0[w];
  while ((unsigned int )lol != (unsigned int )((void *)0)) {
    if (lol->word < w) {
      if (lol->link != start_link) {
        if (w != root) {
          add_link_to_domain(lol->link);
        }
      }
    }
    lol = lol->next;
  }
  lol = word_links___0[w];
  while ((unsigned int )lol != (unsigned int )((void *)0)) {
    if (! visited___0[lol->word]) {
      if (w == root) {
        if (! (lol->word >= right)) {
          goto _L___0;
        }
      } else {
        _L___0: 
        if (w == root) {
          if (! (lol->word < root)) {
            goto _L;
          }
        } else {
          _L: 
          if (lol->word < root) {
            if (lol->word < w) {
              __cil_tmp7 = string_in_list(pp_link_array[lol->link].name, restricted_links);
              tmp = __cil_tmp7;
              if (! tmp) {
                d_depth_first_search(lol->word, root, right, start_link);
              }
            } else {
              d_depth_first_search(lol->word, root, right, start_link);
            }
          } else {
            d_depth_first_search(lol->word, root, right, start_link);
          }
        }
      }
    }
    lol = lol->next;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
int domain_compare(Domain *d1 , Domain *d2 ) 
{ int __retres3 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& d1);
  simple_gc_frame[3] = (void *)(& d2);
  __retres3 = d1->size - d2->size;
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres3);
  }
}
}
void build_domains(void) 
{ int link ;
  int i ;
  int d ;
  char *s ;
  int tmp ;
  int tmp___0 ;
  int tmp___1 ;
  int tmp___2 ;
  int tmp___3 ;
  int __cil_tmp10 ;
  int __cil_tmp11 ;
  int __cil_tmp12 ;
  int __cil_tmp13 ;
  int __cil_tmp14 ;
  int __cil_tmp15 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& s);
  s = 0;
  N_domains = 0;
  link = 0;
  while (link < N_links) {
    if (pp_link_array[link].l == -1) {
      goto __Cont;
    }
    __cil_tmp10 = string_in_list(pp_link_array[link].name, ignore_these_links);
    tmp = __cil_tmp10;
    if (tmp) {
      goto __Cont;
    }
    s = pp_link_array[link].name;
    __cil_tmp11 = string_in_list(s, domain_starter_links);
    tmp___3 = __cil_tmp11;
    if (tmp___3) {
      i = 0;
      while (i < N_words) {
        visited___0[i] = 0;
        i ++;
      }
      domain_array[N_domains].string = s;
      domain_array[N_domains].lol = (List_o_links *)((void *)0);
      domain_array[N_domains].size = 0;
      domain_array[N_domains].start_link = link;
      __cil_tmp12 = string_in_list(s, domain_contains_links);
      tmp___0 = __cil_tmp12;
      if (tmp___0) {
        add_link_to_domain(link);
      }
      depth_first_search(pp_link_array[link].r, pp_link_array[link].l, link);
      N_domains ++;
    } else {
      __cil_tmp13 = string_in_list(s, urfl_domain_starter_links);
      tmp___2 = __cil_tmp13;
      if (tmp___2) {
        i = 0;
        while (i < N_words) {
          visited___0[i] = 0;
          i ++;
        }
        domain_array[N_domains].string = s;
        domain_array[N_domains].lol = (List_o_links *)((void *)0);
        domain_array[N_domains].size = 0;
        domain_array[N_domains].start_link = link;
        add_link_to_domain(link);
        bad_depth_first_search(pp_link_array[link].r, pp_link_array[link].l, link);
        N_domains ++;
      } else {
        __cil_tmp14 = string_in_list(s, urfl_only_domain_starter_links);
        tmp___1 = __cil_tmp14;
        if (tmp___1) {
          i = 0;
          while (i < N_words) {
            visited___0[i] = 0;
            i ++;
          }
          domain_array[N_domains].string = s;
          domain_array[N_domains].lol = (List_o_links *)((void *)0);
          domain_array[N_domains].size = 0;
          domain_array[N_domains].start_link = link;
          d_depth_first_search(pp_link_array[link].l, pp_link_array[link].l, pp_link_array[link].r,
                               link);
          N_domains ++;
        }
      }
    }
    __Cont: 
    link ++;
  }
  qsort((void *)(domain_array), (unsigned int )N_domains, sizeof(Domain ), (int (*)(void const   * ,
                                                                                    void const   * ))(& domain_compare));
  d = 0;
  while (d < N_domains) {
    __cil_tmp15 = find_domain_name(domain_array[d].string);
    i = __cil_tmp15;
    if (i == 0) {
      printf((char const   * __restrict  )"something wrong with domain name %s\n",
             domain_array[d].string);
      exit(1);
    }
    domain_array[d].type = i;
    d ++;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
int contained_in(Domain *d1 , Domain *d2 ) 
{ char mark[497] ;
  List_o_links *lol ;
  int i ;
  int __retres6 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& lol);
  lol = 0;
  simple_gc_frame[3] = (void *)(& d1);
  simple_gc_frame[4] = (void *)(& d2);
  i = 0;
  while (i < N_links) {
    mark[i] = (char)0;
    i ++;
  }
  lol = d2->lol;
  while ((unsigned int )lol != (unsigned int )((void *)0)) {
    mark[lol->link] = (char)1;
    lol = lol->next;
  }
  lol = d1->lol;
  while ((unsigned int )lol != (unsigned int )((void *)0)) {
    if (! mark[lol->link]) {
      __retres6 = 0;
      goto return_label;
    }
    lol = lol->next;
  }
  __retres6 = 1;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres6);
  }
}
}
int link_in_domain(int link , Domain *d ) 
{ List_o_links *lol ;
  int __retres4 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& lol);
  lol = 0;
  simple_gc_frame[3] = (void *)(& d);
  lol = d->lol;
  while ((unsigned int )lol != (unsigned int )((void *)0)) {
    if (lol->link == link) {
      __retres4 = 1;
      goto return_label;
    }
    lol = lol->next;
  }
  __retres4 = 0;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres4);
  }
}
}
int check_domain_nesting(void) 
{ Domain *d1 ;
  Domain *d2 ;
  int counts[4] ;
  char mark[497] ;
  List_o_links *lol ;
  int i ;
  int __retres7 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& d1);
  d1 = 0;
  simple_gc_frame[3] = (void *)(& d2);
  d2 = 0;
  simple_gc_frame[4] = (void *)(& lol);
  lol = 0;
  d1 = domain_array;
  while ((unsigned int )d1 < (unsigned int )(domain_array + N_domains)) {
    d2 = d1 + 1;
    while ((unsigned int )d2 < (unsigned int )(domain_array + N_domains)) {
      i = 0;
      while (i < N_links) {
        mark[i] = (char)0;
        i ++;
      }
      lol = d2->lol;
      while ((unsigned int )lol != (unsigned int )((void *)0)) {
        mark[lol->link] = (char)1;
        lol = lol->next;
      }
      lol = d1->lol;
      while ((unsigned int )lol != (unsigned int )((void *)0)) {
        mark[lol->link] = (char )((int )mark[lol->link] + 2);
        lol = lol->next;
      }
      counts[3] = 0;
      counts[2] = counts[3];
      counts[1] = counts[2];
      counts[0] = counts[1];
      i = 0;
      while (i < N_links) {
        (counts[(int )mark[i]]) ++;
        i ++;
      }
      if (counts[1] > 0) {
        if (counts[2] > 0) {
          if (counts[3] > 0) {
            __retres7 = 0;
            goto return_label;
          }
        }
      }
      d2 ++;
    }
    d1 ++;
  }
  __retres7 = 1;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres7);
  }
}
}
void build_domain_forest(void) 
{ int d ;
  int d1 ;
  int link ;
  D_tree_leaf *dtl ;
  int tmp ;
  void *tmp___0 ;
  int tmp___1 ;
  int __cil_tmp8 ;
  int __cil_tmp9 ;
  void *__cil_tmp10 ;
  extern struct gc_tag_struct *__gc_struct_d_tree_leaf_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& dtl);
  dtl = 0;
  simple_gc_frame[3] = (void *)(& tmp___0);
  tmp___0 = 0;
  if (N_domains > 0) {
    domain_array[N_domains - 1].parent = (Domain *)((void *)0);
  }
  N_domain_trees = 1;
  d = 0;
  while (d < N_domains - 1) {
    d1 = d + 1;
    while (d1 < N_domains) {
      __cil_tmp8 = contained_in(& domain_array[d], & domain_array[d1]);
      tmp = __cil_tmp8;
      if (tmp) {
        domain_array[d].parent = & domain_array[d1];
        break;
      }
      d1 ++;
    }
    if (d1 == N_domains) {
      domain_array[d].parent = (Domain *)((void *)0);
      N_domain_trees ++;
    }
    d ++;
  }
  d = 0;
  while (d < N_domains) {
    domain_array[d].child = (D_tree_leaf *)((void *)0);
    d ++;
  }
  link = 0;
  while (link < N_links) {
    if (pp_link_array[link].l == -1) {
      goto __Cont;
    }
    d = 0;
    while (d < N_domains) {
      __cil_tmp9 = link_in_domain(link, & domain_array[d]);
      tmp___1 = __cil_tmp9;
      if (tmp___1) {
        __cil_tmp10 = GC_malloc(__gc_struct_d_tree_leaf_struct_tag, (int )sizeof(D_tree_leaf ));
        tmp___0 = __cil_tmp10;
        dtl = (D_tree_leaf *)tmp___0;
        dtl->link = link;
        dtl->parent = & domain_array[d];
        dtl->next = domain_array[d].child;
        domain_array[d].child = dtl;
        break;
      }
      d ++;
    }
    __Cont: 
    link ++;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void free_list_o_links(List_o_links *lol ) 
{ List_o_links *xlol ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& xlol);
  xlol = 0;
  simple_gc_frame[3] = (void *)(& lol);
  while ((unsigned int )lol != (unsigned int )((void *)0)) {
    xlol = lol->next;
    lol = xlol;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void free_D_tree_leaves(D_tree_leaf *dtl ) 
{ D_tree_leaf *xdtl ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& xdtl);
  xdtl = 0;
  simple_gc_frame[3] = (void *)(& dtl);
  while ((unsigned int )dtl != (unsigned int )((void *)0)) {
    xdtl = dtl->next;
    dtl = xdtl;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void free_post_processing_structures(void) 
{ int w ;
  int d ;

  {
  w = 0;
  while (w < N_words) {
    free_list_o_links(word_links___0[w]);
    w ++;
  }
  d = 0;
  while (d < N_domains) {
    free_list_o_links(domain_array[d].lol);
    free_D_tree_leaves(domain_array[d].child);
    d ++;
  }

  return;
}
}
void print_domain_tree(void) 
{ int d ;
  D_tree_leaf *dtl ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& dtl);
  dtl = 0;
  printf((char const   * __restrict  )"Domain     It\'s parent \n");
  d = 0;
  while (d < N_domains - 1) {
    printf((char const   * __restrict  )" %3d        %3d\n", d, domain_array[d].parent - domain_array);
    d ++;
  }
  d = 0;
  while (d < N_domains) {
    printf((char const   * __restrict  )"Link children of domain %d:\n", d);
    dtl = domain_array[d].child;
    while ((unsigned int )dtl != (unsigned int )((void *)0)) {
      print_a_link(stdout, dtl->link);
      dtl = dtl->next;
    }
    d ++;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
int CCG_rule(void) 
{ int d ;
  int t ;
  int __retres3 ;

  {
  d = 0;
  while (d < N_domains) {
    if (domain_array[d].type == 99) {
      if ((unsigned int )domain_array[d].parent != (unsigned int )((void *)0)) {
        t = (domain_array[d].parent)->type;
        if (t != 103) {
          if (t != 99) {
            __retres3 = 0;
            goto return_label;
          }
        }
      }
    }
    d ++;
  }
  __retres3 = 1;
  return_label: /* CIL Label */ 
  return (__retres3);
}
}
int domain_bounded(int d_type ) 
{ int d ;
  int lw ;
  List_o_links *lol ;
  int __retres5 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& lol);
  lol = 0;
  d = 0;
  while (d < N_domains) {
    if (domain_array[d].type != d_type) {
      goto __Cont;
    }
    lw = pp_link_array[domain_array[d].start_link].l;
    lol = domain_array[d].lol;
    while ((unsigned int )lol != (unsigned int )((void *)0)) {
      if (pp_link_array[lol->link].l < lw) {
        __retres5 = 0;
        goto return_label;
      }
      lol = lol->next;
    }
    __Cont: 
    d ++;
  }
  __retres5 = 1;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres5);
  }
}
}
int link_inhabits(char *link_name , int d_type ) 
{ int d ;
  D_tree_leaf *c ;
  int tmp ;
  int __retres6 ;
  int __cil_tmp7 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& c);
  c = 0;
  simple_gc_frame[3] = (void *)(& link_name);
  d = 0;
  while (d < N_domains) {
    c = domain_array[d].child;
    while ((unsigned int )c != (unsigned int )((void *)0)) {
      __cil_tmp7 = ppmatch(link_name, pp_link_array[c->link].name);
      tmp = __cil_tmp7;
      if (tmp) {
        if (domain_array[d].type != d_type) {
          __retres6 = 0;
          goto return_label;
        }
      }
      c = c->next;
    }
    d ++;
  }
  __retres6 = 1;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres6);
  }
}
}
int group_type_contains(int d_type , char *link_name ) 
{ int d ;
  D_tree_leaf *c ;
  int tmp ;
  int __retres6 ;
  int __cil_tmp7 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& c);
  c = 0;
  simple_gc_frame[3] = (void *)(& link_name);
  d = 0;
  while (d < N_domains) {
    if (domain_array[d].type != d_type) {
      goto __Cont;
    }
    c = domain_array[d].child;
    while ((unsigned int )c != (unsigned int )((void *)0)) {
      __cil_tmp7 = ppmatch(link_name, pp_link_array[c->link].name);
      tmp = __cil_tmp7;
      if (tmp) {
        break;
      }
      c = c->next;
    }
    if ((unsigned int )c == (unsigned int )((void *)0)) {
      __retres6 = 0;
      goto return_label;
    }
    __Cont: 
    d ++;
  }
  __retres6 = 1;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres6);
  }
}
}
int group_type_contains_all(int d_type , char **name_list ) 
{ int i ;
  int tmp ;
  int __retres5 ;
  int __cil_tmp6 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& name_list);
  i = 0;
  while ((unsigned int )*(name_list + i) != (unsigned int )((void *)0)) {
    __cil_tmp6 = group_type_contains(d_type, *(name_list + i));
    tmp = __cil_tmp6;
    if (! tmp) {
      __retres5 = 0;
      goto return_label;
    }
    i ++;
  }
  __retres5 = 1;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres5);
  }
}
}
int group_type_contains_one(int d_type , char **name_list ) 
{ int d ;
  int i ;
  int count___0 ;
  D_tree_leaf *c ;
  int tmp ;
  int __retres8 ;
  int __cil_tmp9 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& c);
  c = 0;
  simple_gc_frame[3] = (void *)(& name_list);
  d = 0;
  while (d < N_domains) {
    if (domain_array[d].type != d_type) {
      goto __Cont;
    }
    count___0 = 0;
    i = 0;
    while ((unsigned int )*(name_list + i) != (unsigned int )((void *)0)) {
      c = domain_array[d].child;
      while ((unsigned int )c != (unsigned int )((void *)0)) {
        __cil_tmp9 = ppmatch(*(name_list + i), pp_link_array[c->link].name);
        tmp = __cil_tmp9;
        if (tmp) {
          count___0 ++;
        }
        c = c->next;
      }
      i ++;
    }
    if (count___0 != 1) {
      __retres8 = 0;
      goto return_label;
    }
    __Cont: 
    d ++;
  }
  __retres8 = 1;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres8);
  }
}
}
int contains_none(char *selector , char **incompat ) 
{ D_tree_leaf *dtl ;
  int d ;
  int tmp ;
  int tmp___0 ;
  int __retres7 ;
  int __cil_tmp8 ;
  int __cil_tmp9 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& dtl);
  dtl = 0;
  simple_gc_frame[3] = (void *)(& selector);
  simple_gc_frame[4] = (void *)(& incompat);
  d = 0;
  while (d < N_domains) {
    dtl = domain_array[d].child;
    while ((unsigned int )dtl != (unsigned int )((void *)0)) {
      __cil_tmp8 = ppmatch(selector, pp_link_array[dtl->link].name);
      tmp = __cil_tmp8;
      if (tmp) {
        break;
      }
      dtl = dtl->next;
    }
    if ((unsigned int )dtl != (unsigned int )((void *)0)) {
      dtl = domain_array[d].child;
      while ((unsigned int )dtl != (unsigned int )((void *)0)) {
        __cil_tmp9 = string_in_list(pp_link_array[dtl->link].name, incompat);
        tmp___0 = __cil_tmp9;
        if (tmp___0) {
          __retres7 = 0;
          goto return_label;
        }
        dtl = dtl->next;
      }
    }
    d ++;
  }
  __retres7 = 1;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres7);
  }
}
}
int ordering_constraint(char *X , char *Y ) 
{ D_tree_leaf *dtl ;
  int d ;
  int leftmost_y ;
  int rightmost_x ;
  int tmp ;
  int tmp___0 ;
  int __retres9 ;
  int __cil_tmp10 ;
  int __cil_tmp11 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& dtl);
  dtl = 0;
  simple_gc_frame[3] = (void *)(& X);
  simple_gc_frame[4] = (void *)(& Y);
  d = 0;
  while (d < N_domains) {
    leftmost_y = N_words;
    rightmost_x = -1;
    dtl = domain_array[d].child;
    while ((unsigned int )dtl != (unsigned int )((void *)0)) {
      __cil_tmp10 = strcmp((char const   *)pp_link_array[dtl->link].name, (char const   *)Y);
      tmp___0 = __cil_tmp10;
      if (tmp___0 == 0) {
        if (leftmost_y > pp_link_array[dtl->link].r) {
          leftmost_y = pp_link_array[dtl->link].r;
        }
      } else {
        __cil_tmp11 = strcmp((char const   *)pp_link_array[dtl->link].name, (char const   *)X);
        tmp = __cil_tmp11;
        if (tmp == 0) {
          if (rightmost_x < pp_link_array[dtl->link].r) {
            rightmost_x = pp_link_array[dtl->link].r;
          }
        }
      }
      dtl = dtl->next;
    }
    if (leftmost_y <= rightmost_x) {
      __retres9 = 0;
      goto return_label;
    }
    d ++;
  }
  __retres9 = 1;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres9);
  }
}
}
int contains_one(char *selector , char **required ) 
{ D_tree_leaf *dtl ;
  int d ;
  int count___0 ;
  int tmp ;
  int tmp___0 ;
  int __retres8 ;
  int __cil_tmp9 ;
  int __cil_tmp10 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& dtl);
  dtl = 0;
  simple_gc_frame[3] = (void *)(& selector);
  simple_gc_frame[4] = (void *)(& required);
  d = 0;
  while (d < N_domains) {
    dtl = domain_array[d].child;
    while ((unsigned int )dtl != (unsigned int )((void *)0)) {
      __cil_tmp9 = ppmatch(selector, pp_link_array[dtl->link].name);
      tmp = __cil_tmp9;
      if (tmp) {
        break;
      }
      dtl = dtl->next;
    }
    if ((unsigned int )dtl != (unsigned int )((void *)0)) {
      count___0 = 0;
      dtl = domain_array[d].child;
      while ((unsigned int )dtl != (unsigned int )((void *)0)) {
        __cil_tmp10 = string_in_list(pp_link_array[dtl->link].name, required);
        tmp___0 = __cil_tmp10;
        if (tmp___0) {
          count___0 ++;
        }
        dtl = dtl->next;
      }
      if (count___0 < 1) {
        __retres8 = 0;
        goto return_label;
      }
    }
    d ++;
  }
  __retres8 = 1;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres8);
  }
}
}
void connectivity_dfs(int w , char **s ) 
{ List_o_links *lol ;
  int tmp ;
  int __cil_tmp5 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& lol);
  lol = 0;
  simple_gc_frame[3] = (void *)(& s);
  visited___0[w] = 1;
  lol = word_links___0[w];
  while ((unsigned int )lol != (unsigned int )((void *)0)) {
    if (! visited___0[lol->word]) {
      __cil_tmp5 = string_in_list(pp_link_array[lol->link].name, s);
      tmp = __cil_tmp5;
      if (! tmp) {
        connectivity_dfs(lol->word, s);
      }
    }
    lol = lol->next;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void mark_reachable_words(int w ) 
{ List_o_links *lol ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& lol);
  lol = 0;
  if (visited___0[w]) {

    goto return_label;
  }
  visited___0[w] = 1;
  lol = word_links___0[w];
  while ((unsigned int )lol != (unsigned int )((void *)0)) {
    mark_reachable_words(lol->word);
    lol = lol->next;
  }

  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
int is_connected_without(char **s ) 
{ int i ;
  int __retres3 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& s);
  i = 0;
  while (i < N_words) {
    visited___0[i] = 0;
    i ++;
  }
  mark_reachable_words(0);
  i = 0;
  while (i < N_words) {
    visited___0[i] = ! visited___0[i];
    i ++;
  }
  connectivity_dfs(0, s);
  i = 0;
  while (i < N_words) {
    if (visited___0[i] == 0) {
      __retres3 = 0;
      goto return_label;
    }
    i ++;
  }
  __retres3 = 1;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres3);
  }
}
}
int is_connected(void) 
{ int i ;
  int __retres2 ;

  {
  i = 0;
  while (i < N_words) {
    visited___0[i] = (unsigned int )word_links___0[i] == (unsigned int )((void *)0);
    i ++;
  }
  mark_reachable_words(0);
  i = 0;
  while (i < N_words) {
    if (! visited___0[i]) {
      __retres2 = 0;
      goto return_label;
    }
    i ++;
  }
  __retres2 = 1;
  return_label: /* CIL Label */ 
  return (__retres2);
}
}
static char *incompat_with_THi[13]  = 
  {      (char *)"I*",      (char *)"PP*",      (char *)"TO*",      (char *)"Pa*", 
        (char *)"Pam",      (char *)"S",      (char *)"SI",      (char *)"Pg*", 
        (char *)"Pv*",      (char *)"LE*",      (char *)"AFd*",      (char *)"MVta", 
        (char *)((void *)0)};
static char *SFiSFIi[4]  = {      (char *)"SFsi",      (char *)"SFIsi",      (char *)"OXi",      (char *)((void *)0)};
static char *Necessary_for_SF[12]  = 
  {      (char *)"TOi",      (char *)"THi",      (char *)"QIi",      (char *)"TSi", 
        (char *)"O#i",      (char *)"Ci",      (char *)"THb",      (char *)"COqi", 
        (char *)"CPi",      (char *)"Eqi",      (char *)"AFdi",      (char *)((void *)0)};
static char *Necessary_for_MVt[15]  = 
  {      (char *)"Dm#m",      (char *)"EAm",      (char *)"EEm",      (char *)"MVm", 
        (char *)"Pam",      (char *)"Pafm",      (char *)"AFm",      (char *)"EB#m", 
        (char *)"MVb",      (char *)"Om",      (char *)"Mam",      (char *)"Am", 
        (char *)"Jm",      (char *)"Ds*m",      (char *)((void *)0)};
static char *Nec_for_MVz[6]  = {      (char *)"D##y",      (char *)"EAy",      (char *)"EEy",      (char *)"MVy", 
        (char *)"EB#y",      (char *)((void *)0)};
static char *Opt[7]  = {      (char *)"Opt",      (char *)"Omt",      (char *)"O*t",      (char *)"Bp#t", 
        (char *)"B*#t",      (char *)"Bc#t",      (char *)((void *)0)};
static char *Ost[7]  = {      (char *)"O*t",      (char *)"Ost",      (char *)"Omt",      (char *)"Bs#t", 
        (char *)"B*#t",      (char *)"Bc#t",      (char *)((void *)0)};
static char *Oxt[3]  = {      (char *)"O#t",      (char *)"B##t",      (char *)((void *)0)};
static char *Nec_for_BIh[3]  = {      (char *)"Ss#b",      (char *)"SIs#b",      (char *)((void *)0)};
static char *Nec_for_THb[5]  = {      (char *)"S##t",      (char *)"SI##t",      (char *)"SFsi",      (char *)"SFIsi", 
        (char *)((void *)0)};
static char *Nec_for_BIq[7]  = {      (char *)"S##q",      (char *)"SI##q",      (char *)"SFsi",      (char *)"Ss#b", 
        (char *)"SFIsi",      (char *)"SIs#b",      (char *)((void *)0)};
static char *Necessary_for_Thcom[2]  = {      (char *)"TH",      (char *)((void *)0)};
static char *Necessary_for_Tvcom[2]  = {      (char *)"TOi*",      (char *)((void *)0)};
static char *Necessary_for_Tocom[3]  = {      (char *)"TO**",      (char *)"TOf*",      (char *)((void *)0)};
static char *Necessary_for_Tvcom_Trans[2]  = {      (char *)"TOt*",      (char *)((void *)0)};
static char *MVm[2]  = {      (char *)"MVm",      (char *)((void *)0)};
static char *MV[3]  = {      (char *)"MVa",      (char *)"MVp",      (char *)((void *)0)};
static char *EBmm[3]  = {      (char *)"EB#m",      (char *)"EB#y",      (char *)((void *)0)};
static char *Pa_or_Paf[3]  = {      (char *)"Pa*",      (char *)"Paf*",      (char *)((void *)0)};
static char *Nec_for_MVto[8]  = 
  {      (char *)"D##m",      (char *)"D##y",      (char *)"Om",      (char *)"Oy", 
        (char *)"Jm",      (char *)"Jy",      (char *)"Am",      (char *)((void *)0)};
static char *Nec_for_MVtp[12]  = 
  {      (char *)"EEm",      (char *)"MVb",      (char *)"Dm#m",      (char *)"EEy", 
        (char *)"D##y",      (char *)"MVm",      (char *)"Om",      (char *)"Oy", 
        (char *)"Jm",      (char *)"Jy",      (char *)"Am",      (char *)((void *)0)};
static char *Nec_for_MVta[9]  = 
  {      (char *)"Pam",      (char *)"Pafm",      (char *)"EAm",      (char *)"Ds*m", 
        (char *)"EAy",      (char *)"AFm",      (char *)"Mam",      (char *)"Am", 
        (char *)((void *)0)};
static char *Nec_for_Cc[6]  = {      (char *)"EEm",      (char *)"EEy",      (char *)"MVm",      (char *)"MVb", 
        (char *)"MVy",      (char *)((void *)0)};
static char *Nec_for_Mc[2]  = {      (char *)"Dm#m",      (char *)((void *)0)};
static char *Nec_for_Sp_com[7]  = {      (char *)"Dmcm",      (char *)"Dmcy",      (char *)"Om",      (char *)"Oy", 
        (char *)"Jm",      (char *)"Jy",      (char *)((void *)0)};
static char *Nec_for_Ss_com[8]  = 
  {      (char *)"Dmum",      (char *)"Dmuy",      (char *)"Om",      (char *)"Oy", 
        (char *)"Jm",      (char *)"Jy",      (char *)"Ds*y",      (char *)((void *)0)};
static char *Nec_for_S_com[7]  = {      (char *)"Dm#m",      (char *)"D##y",      (char *)"Om",      (char *)"Oy", 
        (char *)"Jm",      (char *)"Jy",      (char *)((void *)0)};
static char *Nec_for_Inv[5]  = {      (char *)"Wq",      (char *)"Qd",      (char *)"CQ",      (char *)"PFc", 
        (char *)((void *)0)};
static char *Incompat_with_Ws[4]  = {      (char *)"B#m",      (char *)"Ca",      (char *)"BT",      (char *)((void *)0)};
static char *Nec_for_Ws_2[4]  = {      (char *)"D##w",      (char *)"S##w",      (char *)"H",      (char *)((void *)0)};
static char *Nec_for_Wq[3]  = {      (char *)"SI",      (char *)"SFI",      (char *)((void *)0)};
static char *Nec_for_Ma[13]  = 
  {      (char *)"TO",      (char *)"TOf",      (char *)"TH",      (char *)"MVp", 
        (char *)"TOt",      (char *)"QI",      (char *)"OF",      (char *)"MVt", 
        (char *)"MVz",      (char *)"MVh",      (char *)"Ytm",      (char *)"Ya", 
        (char *)((void *)0)};
static char *Nec_for_Ia[3]  = {      (char *)"B#m",      (char *)"B#w",      (char *)((void *)0)};
static char *Jr[2]  = {      (char *)"Jr",      (char *)((void *)0)};
static char *Nec_for_Jr[2]  = {      (char *)"B#j",      (char *)((void *)0)};
static char *Nec_for_j[3]  = {      (char *)"JQ",      (char *)"Jw",      (char *)((void *)0)};
static char *Mj_or_Wj[4]  = {      (char *)"Mj",      (char *)"Wj",      (char *)"MX#j",      (char *)((void *)0)};
static char *Nec_for_Qe[2]  = {      (char *)"EEh",      (char *)((void *)0)};
static char *Nec_for_EAh[7]  = {      (char *)"AF",      (char *)"Bsm",      (char *)"B*m",      (char *)"Qe", 
        (char *)"Ca",      (char *)"AFm",      (char *)((void *)0)};
static char *ZZ[2]  = {      (char *)"ZZ",      (char *)((void *)0)};
static char *Nec_for_MVh[4]  = {      (char *)"EExk",      (char *)"EAxk",      (char *)"D##k",      (char *)((void *)0)};
static char *Incompat_with_MXsr[2]  = {      (char *)"Sp#w",      (char *)((void *)0)};
static char *Incompat_with_MXpr[3]  = {      (char *)"Ss#w",      (char *)"S#iw",      (char *)((void *)0)};
static char *illegal_S_types[7]  = {      (char *)"Spxi",      (char *)"Spi*",      (char *)"Spit",      (char *)"Spiq", 
        (char *)"Spib",      (char *)"Spiw",      (char *)((void *)0)};
static char *illegal_SI_types[6]  = {      (char *)"SIpxi",      (char *)"SIpi*",      (char *)"SIpit",      (char *)"SIpiq", 
        (char *)"SIpib",      (char *)((void *)0)};
void free_PP_node(PP_node *p ) 
{ D_type_list *dtl ;
  D_type_list *dtlx ;
  Violation_list *v ;
  Violation_list *vx ;
  int i ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[7] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((5 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& dtl);
  dtl = 0;
  simple_gc_frame[3] = (void *)(& dtlx);
  dtlx = 0;
  simple_gc_frame[4] = (void *)(& v);
  v = 0;
  simple_gc_frame[5] = (void *)(& vx);
  vx = 0;
  simple_gc_frame[6] = (void *)(& p);
  i = 0;
  while (i < N_links) {
    dtl = *(p->d_type_array + i);
    while ((unsigned int )dtl != (unsigned int )((void *)0)) {
      dtlx = dtl->next;
      dtl = dtlx;
    }
    i ++;
  }
  if (N_links > 0) {
  }
  v = p->v;
  while ((unsigned int )v != (unsigned int )((void *)0)) {
    vx = v->next;
    v = vx;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
D_type_list **build_type_array(void) 
{ D_type_list **array ;
  D_type_list *dtl ;
  int d ;
  int i ;
  List_o_links *lol ;
  void *tmp ;
  void *tmp___0 ;
  void *__cil_tmp8 ;
  void *__cil_tmp9 ;
  extern struct gc_tag_struct *__gc_struct_D_type_list_struct_tag ;
  extern struct gc_tag_struct *__gcstandard_array_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[7] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((5 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& array);
  array = 0;
  simple_gc_frame[3] = (void *)(& dtl);
  dtl = 0;
  simple_gc_frame[4] = (void *)(& lol);
  lol = 0;
  simple_gc_frame[5] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[6] = (void *)(& tmp___0);
  tmp___0 = 0;
  array = (D_type_list **)((void *)0);
  if (N_links > 0) {
    __cil_tmp8 = GC_malloc(__gcstandard_array_tag, (int )((unsigned int )N_links * sizeof(D_type_list *)));
    tmp = __cil_tmp8;
    array = (D_type_list **)tmp;
  }
  i = 0;
  while (i < N_links) {
    *(array + i) = (D_type_list *)((void *)0);
    i ++;
  }
  d = 0;
  while (d < N_domains) {
    lol = domain_array[d].lol;
    while ((unsigned int )lol != (unsigned int )((void *)0)) {
      __cil_tmp9 = GC_malloc(__gc_struct_D_type_list_struct_tag, (int )sizeof(D_type_list ));
      tmp___0 = __cil_tmp9;
      dtl = (D_type_list *)tmp___0;
      dtl->next = *(array + lol->link);
      *(array + lol->link) = dtl;
      dtl->type = domain_array[d].type;
      lol = lol->next;
    }
    d ++;
  }
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (array);
  }
}
}
PP_node *bogus_pp_node(void) 
{ PP_node *pp_return ;
  int link ;
  void *tmp ;
  void *tmp___0 ;
  void *__cil_tmp5 ;
  void *__cil_tmp6 ;
  extern struct gc_tag_struct *__gcstandard_array_tag ;
  extern struct gc_tag_struct *__gc_struct_PP_node_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& pp_return);
  pp_return = 0;
  simple_gc_frame[3] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[4] = (void *)(& tmp___0);
  tmp___0 = 0;
  __cil_tmp5 = GC_malloc(__gc_struct_PP_node_struct_tag, (int )sizeof(PP_node ));
  tmp = __cil_tmp5;
  pp_return = (PP_node *)tmp;
  __cil_tmp6 = GC_malloc(__gcstandard_array_tag, (int )((unsigned int )N_links * sizeof(D_type_list *)));
  tmp___0 = __cil_tmp6;
  pp_return->d_type_array = (D_type_list **)tmp___0;
  link = 0;
  while (link < N_links) {
    *(pp_return->d_type_array + link) = (D_type_list *)((void *)0);
    link ++;
  }
  pp_return->v = (Violation_list *)((void *)0);
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (pp_return);
  }
}
}
Violation_list *issue_violation(Violation_list *v , char *string ) 
{ Violation_list *v1 ;
  void *tmp ;
  void *__cil_tmp5 ;
  extern struct gc_tag_struct *__gc_struct_Violation_list_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& v1);
  v1 = 0;
  simple_gc_frame[3] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[4] = (void *)(& v);
  simple_gc_frame[5] = (void *)(& string);
  __cil_tmp5 = GC_malloc(__gc_struct_Violation_list_struct_tag, (int )sizeof(Violation_list ));
  tmp = __cil_tmp5;
  v1 = (Violation_list *)tmp;
  v1->string = string;
  v1->next = v;
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (v1);
  }
}
}
PP_node *post_process(void) 
{ Violation_list *v ;
  PP_node *pp_return ;
  PP_node *tmp ;
  void *tmp___0 ;
  int tmp___1 ;
  int tmp___2 ;
  int tmp___3 ;
  int tmp___4 ;
  int tmp___5 ;
  int tmp___6 ;
  int tmp___7 ;
  int tmp___8 ;
  int tmp___9 ;
  int tmp___10 ;
  int tmp___11 ;
  int tmp___12 ;
  int tmp___13 ;
  int tmp___14 ;
  int tmp___15 ;
  int tmp___16 ;
  int tmp___17 ;
  int tmp___18 ;
  int tmp___19 ;
  int tmp___20 ;
  int tmp___21 ;
  int tmp___22 ;
  int tmp___23 ;
  int tmp___24 ;
  int tmp___25 ;
  int tmp___26 ;
  int tmp___27 ;
  int tmp___28 ;
  int tmp___29 ;
  int tmp___30 ;
  int tmp___31 ;
  int tmp___32 ;
  int tmp___33 ;
  int tmp___34 ;
  int tmp___35 ;
  int tmp___36 ;
  int tmp___37 ;
  int tmp___38 ;
  int tmp___39 ;
  int tmp___40 ;
  int tmp___41 ;
  int tmp___42 ;
  int tmp___43 ;
  int tmp___44 ;
  int tmp___45 ;
  int tmp___46 ;
  int tmp___47 ;
  int tmp___48 ;
  int tmp___49 ;
  int tmp___50 ;
  int tmp___51 ;
  int tmp___52 ;
  int tmp___53 ;
  int tmp___54 ;
  int tmp___55 ;
  int tmp___56 ;
  int tmp___57 ;
  int tmp___58 ;
  int tmp___59 ;
  int tmp___60 ;
  int tmp___61 ;
  int tmp___62 ;
  int tmp___63 ;
  int tmp___64 ;
  int tmp___65 ;
  int tmp___66 ;
  int tmp___67 ;
  int tmp___68 ;
  int tmp___69 ;
  int tmp___70 ;
  int tmp___71 ;
  int tmp___72 ;
  int tmp___73 ;
  int tmp___74 ;
  int tmp___75 ;
  int tmp___76 ;
  int tmp___77 ;
  int tmp___78 ;
  int tmp___79 ;
  int tmp___80 ;
  int tmp___81 ;
  int tmp___82 ;
  int tmp___83 ;
  PP_node *__retres88 ;
  PP_node *__cil_tmp89 ;
  void *__cil_tmp90 ;
  int __cil_tmp91 ;
  Violation_list *__cil_tmp92 ;
  int __cil_tmp93 ;
  Violation_list *__cil_tmp94 ;
  int __cil_tmp95 ;
  Violation_list *__cil_tmp96 ;
  int __cil_tmp97 ;
  Violation_list *__cil_tmp98 ;
  int __cil_tmp99 ;
  Violation_list *__cil_tmp100 ;
  int __cil_tmp101 ;
  Violation_list *__cil_tmp102 ;
  int __cil_tmp103 ;
  Violation_list *__cil_tmp104 ;
  int __cil_tmp105 ;
  Violation_list *__cil_tmp106 ;
  int __cil_tmp107 ;
  Violation_list *__cil_tmp108 ;
  int __cil_tmp109 ;
  Violation_list *__cil_tmp110 ;
  int __cil_tmp111 ;
  Violation_list *__cil_tmp112 ;
  int __cil_tmp113 ;
  Violation_list *__cil_tmp114 ;
  int __cil_tmp115 ;
  Violation_list *__cil_tmp116 ;
  int __cil_tmp117 ;
  Violation_list *__cil_tmp118 ;
  int __cil_tmp119 ;
  Violation_list *__cil_tmp120 ;
  int __cil_tmp121 ;
  Violation_list *__cil_tmp122 ;
  int __cil_tmp123 ;
  Violation_list *__cil_tmp124 ;
  int __cil_tmp125 ;
  Violation_list *__cil_tmp126 ;
  int __cil_tmp127 ;
  Violation_list *__cil_tmp128 ;
  int __cil_tmp129 ;
  Violation_list *__cil_tmp130 ;
  int __cil_tmp131 ;
  Violation_list *__cil_tmp132 ;
  int __cil_tmp133 ;
  Violation_list *__cil_tmp134 ;
  int __cil_tmp135 ;
  Violation_list *__cil_tmp136 ;
  int __cil_tmp137 ;
  Violation_list *__cil_tmp138 ;
  int __cil_tmp139 ;
  Violation_list *__cil_tmp140 ;
  int __cil_tmp141 ;
  Violation_list *__cil_tmp142 ;
  int __cil_tmp143 ;
  Violation_list *__cil_tmp144 ;
  int __cil_tmp145 ;
  Violation_list *__cil_tmp146 ;
  int __cil_tmp147 ;
  Violation_list *__cil_tmp148 ;
  int __cil_tmp149 ;
  Violation_list *__cil_tmp150 ;
  int __cil_tmp151 ;
  Violation_list *__cil_tmp152 ;
  int __cil_tmp153 ;
  Violation_list *__cil_tmp154 ;
  int __cil_tmp155 ;
  Violation_list *__cil_tmp156 ;
  int __cil_tmp157 ;
  Violation_list *__cil_tmp158 ;
  int __cil_tmp159 ;
  Violation_list *__cil_tmp160 ;
  int __cil_tmp161 ;
  Violation_list *__cil_tmp162 ;
  int __cil_tmp163 ;
  Violation_list *__cil_tmp164 ;
  int __cil_tmp165 ;
  Violation_list *__cil_tmp166 ;
  int __cil_tmp167 ;
  Violation_list *__cil_tmp168 ;
  int __cil_tmp169 ;
  Violation_list *__cil_tmp170 ;
  int __cil_tmp171 ;
  Violation_list *__cil_tmp172 ;
  int __cil_tmp173 ;
  Violation_list *__cil_tmp174 ;
  int __cil_tmp175 ;
  Violation_list *__cil_tmp176 ;
  int __cil_tmp177 ;
  Violation_list *__cil_tmp178 ;
  int __cil_tmp179 ;
  Violation_list *__cil_tmp180 ;
  int __cil_tmp181 ;
  Violation_list *__cil_tmp182 ;
  int __cil_tmp183 ;
  Violation_list *__cil_tmp184 ;
  int __cil_tmp185 ;
  Violation_list *__cil_tmp186 ;
  int __cil_tmp187 ;
  Violation_list *__cil_tmp188 ;
  int __cil_tmp189 ;
  Violation_list *__cil_tmp190 ;
  int __cil_tmp191 ;
  Violation_list *__cil_tmp192 ;
  int __cil_tmp193 ;
  Violation_list *__cil_tmp194 ;
  int __cil_tmp195 ;
  Violation_list *__cil_tmp196 ;
  int __cil_tmp197 ;
  Violation_list *__cil_tmp198 ;
  int __cil_tmp199 ;
  Violation_list *__cil_tmp200 ;
  int __cil_tmp201 ;
  Violation_list *__cil_tmp202 ;
  int __cil_tmp203 ;
  Violation_list *__cil_tmp204 ;
  int __cil_tmp205 ;
  Violation_list *__cil_tmp206 ;
  int __cil_tmp207 ;
  Violation_list *__cil_tmp208 ;
  int __cil_tmp209 ;
  Violation_list *__cil_tmp210 ;
  int __cil_tmp211 ;
  Violation_list *__cil_tmp212 ;
  int __cil_tmp213 ;
  Violation_list *__cil_tmp214 ;
  int __cil_tmp215 ;
  Violation_list *__cil_tmp216 ;
  int __cil_tmp217 ;
  Violation_list *__cil_tmp218 ;
  int __cil_tmp219 ;
  Violation_list *__cil_tmp220 ;
  int __cil_tmp221 ;
  Violation_list *__cil_tmp222 ;
  int __cil_tmp223 ;
  Violation_list *__cil_tmp224 ;
  int __cil_tmp225 ;
  Violation_list *__cil_tmp226 ;
  int __cil_tmp227 ;
  Violation_list *__cil_tmp228 ;
  int __cil_tmp229 ;
  Violation_list *__cil_tmp230 ;
  int __cil_tmp231 ;
  Violation_list *__cil_tmp232 ;
  int __cil_tmp233 ;
  Violation_list *__cil_tmp234 ;
  int __cil_tmp235 ;
  Violation_list *__cil_tmp236 ;
  int __cil_tmp237 ;
  Violation_list *__cil_tmp238 ;
  int __cil_tmp239 ;
  Violation_list *__cil_tmp240 ;
  int __cil_tmp241 ;
  Violation_list *__cil_tmp242 ;
  int __cil_tmp243 ;
  Violation_list *__cil_tmp244 ;
  int __cil_tmp245 ;
  Violation_list *__cil_tmp246 ;
  int __cil_tmp247 ;
  Violation_list *__cil_tmp248 ;
  int __cil_tmp249 ;
  Violation_list *__cil_tmp250 ;
  int __cil_tmp251 ;
  Violation_list *__cil_tmp252 ;
  int __cil_tmp253 ;
  Violation_list *__cil_tmp254 ;
  int __cil_tmp255 ;
  Violation_list *__cil_tmp256 ;
  D_type_list **__cil_tmp257 ;
  extern struct gc_tag_struct *__gc_struct_PP_node_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[7] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((5 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& v);
  v = 0;
  simple_gc_frame[3] = (void *)(& pp_return);
  pp_return = 0;
  simple_gc_frame[4] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[5] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[6] = (void *)(& __retres88);
  __retres88 = 0;
  if (! postprocess_defined) {
    __cil_tmp89 = bogus_pp_node();
    tmp = __cil_tmp89;
    __retres88 = tmp;
    goto return_label;
  }
  __cil_tmp90 = GC_malloc(__gc_struct_PP_node_struct_tag, (int )sizeof(PP_node ));
  tmp___0 = __cil_tmp90;
  pp_return = (PP_node *)tmp___0;
  build_graph();
  build_domains();
  build_domain_forest();
  v = (Violation_list *)((void *)0);
  __cil_tmp91 = is_connected_without(must_be_connected_without);
  tmp___1 = __cil_tmp91;
  if (! tmp___1) {
    __cil_tmp92 = issue_violation(v, (char *)"Connectivity violation");
    v = __cil_tmp92;
    goto done_checking;
  }
  __cil_tmp93 = is_connected();
  tmp___2 = __cil_tmp93;
  if (! tmp___2) {
    __cil_tmp94 = issue_violation(v, (char *)"Connectivity violation");
    v = __cil_tmp94;
    goto done_checking;
  }
  __cil_tmp95 = domain_bounded('s');
  tmp___3 = __cil_tmp95;
  if (! tmp___3) {
    __cil_tmp96 = issue_violation(v, (char *)"Unbounded s domain");
    v = __cil_tmp96;
    goto done_checking;
  }
  __cil_tmp97 = domain_bounded('r');
  tmp___4 = __cil_tmp97;
  if (! tmp___4) {
    __cil_tmp98 = issue_violation(v, (char *)"Unbounded r domain");
    v = __cil_tmp98;
    goto done_checking;
  }
  __cil_tmp99 = contains_one((char *)"SI#*", Nec_for_Inv);
  tmp___5 = __cil_tmp99;
  if (! tmp___5) {
    __cil_tmp100 = issue_violation(v, (char *)"question inversion violated");
    v = __cil_tmp100;
    goto done_checking;
  }
  __cil_tmp101 = contains_one((char *)"SI#i", Nec_for_Inv);
  tmp___6 = __cil_tmp101;
  if (! tmp___6) {
    __cil_tmp102 = issue_violation(v, (char *)"question inversion violated");
    v = __cil_tmp102;
    goto done_checking;
  }
  __cil_tmp103 = contains_one((char *)"SI#x", Nec_for_Inv);
  tmp___7 = __cil_tmp103;
  if (! tmp___7) {
    __cil_tmp104 = issue_violation(v, (char *)"question inversion violated");
    v = __cil_tmp104;
    goto done_checking;
  }
  __cil_tmp105 = contains_one((char *)"SFI##*", Nec_for_Inv);
  tmp___8 = __cil_tmp105;
  if (! tmp___8) {
    __cil_tmp106 = issue_violation(v, (char *)"question inversion violated");
    v = __cil_tmp106;
    goto done_checking;
  }
  __cil_tmp107 = contains_none((char *)"Ws", Incompat_with_Ws);
  tmp___9 = __cil_tmp107;
  if (! tmp___9) {
    __cil_tmp108 = issue_violation(v, (char *)"question inversion violated");
    v = __cil_tmp108;
    goto done_checking;
  }
  __cil_tmp109 = contains_one((char *)"Ws", Nec_for_Ws_2);
  tmp___10 = __cil_tmp109;
  if (! tmp___10) {
    __cil_tmp110 = issue_violation(v, (char *)"question inversion violated");
    v = __cil_tmp110;
    goto done_checking;
  }
  __cil_tmp111 = contains_one((char *)"I#a", Nec_for_Ia);
  tmp___11 = __cil_tmp111;
  if (! tmp___11) {
    __cil_tmp112 = issue_violation(v, (char *)"incorrect use of \'to\'");
    v = __cil_tmp112;
    goto done_checking;
  }
  __cil_tmp113 = contains_one((char *)"Wq", Nec_for_Wq);
  tmp___12 = __cil_tmp113;
  if (! tmp___12) {
    __cil_tmp114 = issue_violation(v, (char *)"question inversion violated");
    v = __cil_tmp114;
    goto done_checking;
  }
  __cil_tmp115 = contains_one((char *)"Qd", Nec_for_Wq);
  tmp___13 = __cil_tmp115;
  if (! tmp___13) {
    __cil_tmp116 = issue_violation(v, (char *)"question inversion violated");
    v = __cil_tmp116;
    goto done_checking;
  }
  __cil_tmp117 = contains_one((char *)"PFc", Nec_for_Wq);
  tmp___14 = __cil_tmp117;
  if (! tmp___14) {
    __cil_tmp118 = issue_violation(v, (char *)"question inversion violated");
    v = __cil_tmp118;
    goto done_checking;
  }
  __cil_tmp119 = contains_one((char *)"Mj", Nec_for_j);
  tmp___15 = __cil_tmp119;
  if (! tmp___15) {
    __cil_tmp120 = issue_violation(v, (char *)"misuse of question word");
    v = __cil_tmp120;
    goto done_checking;
  }
  __cil_tmp121 = contains_one((char *)"MX#j", Nec_for_j);
  tmp___16 = __cil_tmp121;
  if (! tmp___16) {
    __cil_tmp122 = issue_violation(v, (char *)"misuse of question word");
    v = __cil_tmp122;
    goto done_checking;
  }
  __cil_tmp123 = contains_one((char *)"Wj", Nec_for_j);
  tmp___17 = __cil_tmp123;
  if (! tmp___17) {
    __cil_tmp124 = issue_violation(v, (char *)"misuse of question word");
    v = __cil_tmp124;
    goto done_checking;
  }
  __cil_tmp125 = contains_one((char *)"JQ", Mj_or_Wj);
  tmp___18 = __cil_tmp125;
  if (! tmp___18) {
    __cil_tmp126 = issue_violation(v, (char *)"misuse of preposition");
    v = __cil_tmp126;
    goto done_checking;
  }
  __cil_tmp127 = contains_one((char *)"Jw", Mj_or_Wj);
  tmp___19 = __cil_tmp127;
  if (! tmp___19) {
    __cil_tmp128 = issue_violation(v, (char *)"misuse of preposition");
    v = __cil_tmp128;
    goto done_checking;
  }
  __cil_tmp129 = contains_one((char *)"B#j", Jr);
  tmp___20 = __cil_tmp129;
  if (! tmp___20) {
    __cil_tmp130 = issue_violation(v, (char *)"A B*j must have a Jr");
    v = __cil_tmp130;
    goto done_checking;
  }
  __cil_tmp131 = contains_one((char *)"Jr", Nec_for_Jr);
  tmp___21 = __cil_tmp131;
  if (! tmp___21) {
    __cil_tmp132 = issue_violation(v, (char *)"A Jr must have an B*j");
    v = __cil_tmp132;
    goto done_checking;
  }
  __cil_tmp133 = contains_one((char *)"EAh", Nec_for_EAh);
  tmp___22 = __cil_tmp133;
  if (! tmp___22) {
    __cil_tmp134 = issue_violation(v, (char *)"Incorrect use of \'how\'");
    v = __cil_tmp134;
    goto done_checking;
  }
  __cil_tmp135 = contains_one((char *)"EEh", Nec_for_EAh);
  tmp___23 = __cil_tmp135;
  if (! tmp___23) {
    __cil_tmp136 = issue_violation(v, (char *)"Incorrect use of \'how\'");
    v = __cil_tmp136;
    goto done_checking;
  }
  __cil_tmp137 = contains_one((char *)"Qe", Nec_for_Qe);
  tmp___24 = __cil_tmp137;
  if (! tmp___24) {
    __cil_tmp138 = issue_violation(v, (char *)"Incorrect use of adverb");
    v = __cil_tmp138;
    goto done_checking;
  }
  __cil_tmp139 = contains_one((char *)"THi", SFiSFIi);
  tmp___25 = __cil_tmp139;
  if (! tmp___25) {
    __cil_tmp140 = issue_violation(v, (char *)"THi rule 1 violated");
    v = __cil_tmp140;
    goto done_checking;
  }
  __cil_tmp141 = contains_one((char *)"TSi", SFiSFIi);
  tmp___26 = __cil_tmp141;
  if (! tmp___26) {
    __cil_tmp142 = issue_violation(v, (char *)"TSi rule 1 violated");
    v = __cil_tmp142;
    goto done_checking;
  }
  __cil_tmp143 = contains_one((char *)"QIi", SFiSFIi);
  tmp___27 = __cil_tmp143;
  if (! tmp___27) {
    __cil_tmp144 = issue_violation(v, (char *)"QIi rule 1 violated");
    v = __cil_tmp144;
    goto done_checking;
  }
  __cil_tmp145 = contains_one((char *)"TOi", SFiSFIi);
  tmp___28 = __cil_tmp145;
  if (! tmp___28) {
    __cil_tmp146 = issue_violation(v, (char *)"TV rule 1 violated");
    v = __cil_tmp146;
    goto done_checking;
  }
  __cil_tmp147 = contains_one((char *)"Ci", SFiSFIi);
  tmp___29 = __cil_tmp147;
  if (! tmp___29) {
    __cil_tmp148 = issue_violation(v, (char *)"Ci rule 1 violated");
    v = __cil_tmp148;
    goto done_checking;
  }
  __cil_tmp149 = contains_one((char *)"COqi", SFiSFIi);
  tmp___30 = __cil_tmp149;
  if (! tmp___30) {
    __cil_tmp150 = issue_violation(v, (char *)"It rules violated");
    v = __cil_tmp150;
    goto done_checking;
  }
  __cil_tmp151 = contains_one((char *)"CPi", SFiSFIi);
  tmp___31 = __cil_tmp151;
  if (! tmp___31) {
    __cil_tmp152 = issue_violation(v, (char *)"It rules violated");
    v = __cil_tmp152;
    goto done_checking;
  }
  __cil_tmp153 = contains_one((char *)"Eqi", SFiSFIi);
  tmp___32 = __cil_tmp153;
  if (! tmp___32) {
    __cil_tmp154 = issue_violation(v, (char *)"It rules violated");
    v = __cil_tmp154;
    goto done_checking;
  }
  __cil_tmp155 = contains_one((char *)"LEi", SFiSFIi);
  tmp___33 = __cil_tmp155;
  if (! tmp___33) {
    __cil_tmp156 = issue_violation(v, (char *)"THi rule 1 violated");
    v = __cil_tmp156;
    goto done_checking;
  }
  __cil_tmp157 = contains_one((char *)"MVti", SFiSFIi);
  tmp___34 = __cil_tmp157;
  if (! tmp___34) {
    __cil_tmp158 = issue_violation(v, (char *)"THi rule 1 violated");
    v = __cil_tmp158;
    goto done_checking;
  }
  __cil_tmp159 = contains_one((char *)"AFdi", SFiSFIi);
  tmp___35 = __cil_tmp159;
  if (! tmp___35) {
    __cil_tmp160 = issue_violation(v, (char *)"THi rule 1 violated");
    v = __cil_tmp160;
    goto done_checking;
  }
  __cil_tmp161 = contains_one((char *)"O#i", SFiSFIi);
  tmp___36 = __cil_tmp161;
  if (! tmp___36) {
    __cil_tmp162 = issue_violation(v, (char *)"O#i rule 1 violated");
    v = __cil_tmp162;
    goto done_checking;
  }
  __cil_tmp163 = contains_none((char *)"SF", incompat_with_THi);
  tmp___37 = __cil_tmp163;
  if (! tmp___37) {
    __cil_tmp164 = issue_violation(v, (char *)"There rule 1 violated");
    v = __cil_tmp164;
    goto done_checking;
  }
  __cil_tmp165 = contains_none((char *)"SFI", incompat_with_THi);
  tmp___38 = __cil_tmp165;
  if (! tmp___38) {
    __cil_tmp166 = issue_violation(v, (char *)"There rule 1 violated");
    v = __cil_tmp166;
    goto done_checking;
  }
  __cil_tmp167 = contains_none((char *)"OX", incompat_with_THi);
  tmp___39 = __cil_tmp167;
  if (! tmp___39) {
    __cil_tmp168 = issue_violation(v, (char *)"OXt rule 1 violated");
    v = __cil_tmp168;
    goto done_checking;
  }
  __cil_tmp169 = contains_one((char *)"SFst", Ost);
  tmp___40 = __cil_tmp169;
  if (! tmp___40) {
    __cil_tmp170 = issue_violation(v, (char *)"There rule 2 violated");
    v = __cil_tmp170;
    goto done_checking;
  }
  __cil_tmp171 = contains_one((char *)"SFIst", Ost);
  tmp___41 = __cil_tmp171;
  if (! tmp___41) {
    __cil_tmp172 = issue_violation(v, (char *)"There rule 2 violated");
    v = __cil_tmp172;
    goto done_checking;
  }
  __cil_tmp173 = contains_one((char *)"SFp", Opt);
  tmp___42 = __cil_tmp173;
  if (! tmp___42) {
    __cil_tmp174 = issue_violation(v, (char *)"There rule 2 violated");
    v = __cil_tmp174;
    goto done_checking;
  }
  __cil_tmp175 = contains_one((char *)"SFIp", Opt);
  tmp___43 = __cil_tmp175;
  if (! tmp___43) {
    __cil_tmp176 = issue_violation(v, (char *)"There rule 2 violated");
    v = __cil_tmp176;
    goto done_checking;
  }
  __cil_tmp177 = contains_one((char *)"OXt", Oxt);
  tmp___44 = __cil_tmp177;
  if (! tmp___44) {
    __cil_tmp178 = issue_violation(v, (char *)"There rule 2 violated");
    v = __cil_tmp178;
    goto done_checking;
  }
  __cil_tmp179 = contains_one((char *)"SFsi*", Necessary_for_SF);
  tmp___45 = __cil_tmp179;
  if (! tmp___45) {
    __cil_tmp180 = issue_violation(v, (char *)"It rule violated");
    v = __cil_tmp180;
    goto done_checking;
  }
  __cil_tmp181 = contains_one((char *)"SFIsi", Necessary_for_SF);
  tmp___46 = __cil_tmp181;
  if (! tmp___46) {
    __cil_tmp182 = issue_violation(v, (char *)"It rule violated");
    v = __cil_tmp182;
    goto done_checking;
  }
  __cil_tmp183 = contains_one((char *)"THb", Nec_for_THb);
  tmp___47 = __cil_tmp183;
  if (! tmp___47) {
    __cil_tmp184 = issue_violation(v, (char *)"be-that rule violated");
    v = __cil_tmp184;
    goto done_checking;
  }
  __cil_tmp185 = contains_one((char *)"BIh", Nec_for_BIh);
  tmp___48 = __cil_tmp185;
  if (! tmp___48) {
    __cil_tmp186 = issue_violation(v, (char *)"be-complement rule violated");
    v = __cil_tmp186;
    goto done_checking;
  }
  __cil_tmp187 = contains_one((char *)"BIq", Nec_for_BIq);
  tmp___49 = __cil_tmp187;
  if (! tmp___49) {
    __cil_tmp188 = issue_violation(v, (char *)"be-complement rule violated");
    v = __cil_tmp188;
    goto done_checking;
  }
  __cil_tmp189 = contains_one((char *)"OXi", Necessary_for_SF);
  tmp___50 = __cil_tmp189;
  if (! tmp___50) {
    __cil_tmp190 = issue_violation(v, (char *)"SF rule violated");
    v = __cil_tmp190;
    goto done_checking;
  }
  __cil_tmp191 = contains_one((char *)"MVt", Necessary_for_MVt);
  tmp___51 = __cil_tmp191;
  if (! tmp___51) {
    __cil_tmp192 = issue_violation(v, (char *)"Than rule violated");
    v = __cil_tmp192;
    goto done_checking;
  }
  __cil_tmp193 = contains_one((char *)"MVz", Nec_for_MVz);
  tmp___52 = __cil_tmp193;
  if (! tmp___52) {
    __cil_tmp194 = issue_violation(v, (char *)"As rule violated");
    v = __cil_tmp194;
    goto done_checking;
  }
  __cil_tmp195 = contains_one((char *)"MV#a", Nec_for_MVta);
  tmp___53 = __cil_tmp195;
  if (! tmp___53) {
    __cil_tmp196 = issue_violation(v, (char *)"bad use of comparative");
    v = __cil_tmp196;
    goto done_checking;
  }
  __cil_tmp197 = contains_one((char *)"MV#i", Nec_for_MVta);
  tmp___54 = __cil_tmp197;
  if (! tmp___54) {
    __cil_tmp198 = issue_violation(v, (char *)"bad use of comparative");
    v = __cil_tmp198;
    goto done_checking;
  }
  __cil_tmp199 = contains_one((char *)"MV#o", Nec_for_MVto);
  tmp___55 = __cil_tmp199;
  if (! tmp___55) {
    __cil_tmp200 = issue_violation(v, (char *)"bad use of comparative");
    v = __cil_tmp200;
    goto done_checking;
  }
  __cil_tmp201 = contains_one((char *)"MV#p", Nec_for_MVtp);
  tmp___56 = __cil_tmp201;
  if (! tmp___56) {
    __cil_tmp202 = issue_violation(v, (char *)"bad use of comparative");
    v = __cil_tmp202;
    goto done_checking;
  }
  __cil_tmp203 = contains_one((char *)"Pafc", EBmm);
  tmp___57 = __cil_tmp203;
  if (! tmp___57) {
    __cil_tmp204 = issue_violation(v, (char *)"Than-adj 1 violated");
    v = __cil_tmp204;
    goto done_checking;
  }
  __cil_tmp205 = contains_one((char *)"Pafc", Pa_or_Paf);
  tmp___58 = __cil_tmp205;
  if (! tmp___58) {
    __cil_tmp206 = issue_violation(v, (char *)"Than-adj 2 violated");
    v = __cil_tmp206;
    goto done_checking;
  }
  __cil_tmp207 = contains_one((char *)"MVat", MVm);
  tmp___59 = __cil_tmp207;
  if (! tmp___59) {
    __cil_tmp208 = issue_violation(v, (char *)"Than-adv 1 violated");
    v = __cil_tmp208;
    goto done_checking;
  }
  __cil_tmp209 = contains_one((char *)"MVpt", MVm);
  tmp___60 = __cil_tmp209;
  if (! tmp___60) {
    __cil_tmp210 = issue_violation(v, (char *)"Than-prep 1 violated");
    v = __cil_tmp210;
    goto done_checking;
  }
  __cil_tmp211 = contains_one((char *)"MVat", MV);
  tmp___61 = __cil_tmp211;
  if (! tmp___61) {
    __cil_tmp212 = issue_violation(v, (char *)"Than-adv 2 violated");
    v = __cil_tmp212;
    goto done_checking;
  }
  __cil_tmp213 = contains_one((char *)"MVpt", MV);
  tmp___62 = __cil_tmp213;
  if (! tmp___62) {
    __cil_tmp214 = issue_violation(v, (char *)"Than-prep 2 violated");
    v = __cil_tmp214;
    goto done_checking;
  }
  __cil_tmp215 = contains_one((char *)"U#t", Nec_for_MVto);
  tmp___63 = __cil_tmp215;
  if (! tmp___63) {
    __cil_tmp216 = issue_violation(v, (char *)"Than-obj 2 violated");
    v = __cil_tmp216;
    goto done_checking;
  }
  __cil_tmp217 = contains_one((char *)"Cc", Nec_for_Cc);
  tmp___64 = __cil_tmp217;
  if (! tmp___64) {
    __cil_tmp218 = issue_violation(v, (char *)"Cc violated");
    v = __cil_tmp218;
    goto done_checking;
  }
  __cil_tmp219 = contains_one((char *)"Mc", Nec_for_Mc);
  tmp___65 = __cil_tmp219;
  if (! tmp___65) {
    __cil_tmp220 = issue_violation(v, (char *)"Mc violated");
    v = __cil_tmp220;
    goto done_checking;
  }
  __cil_tmp221 = contains_one((char *)"Sp#c", Nec_for_Sp_com);
  tmp___66 = __cil_tmp221;
  if (! tmp___66) {
    __cil_tmp222 = issue_violation(v, (char *)"Sp_com violated");
    v = __cil_tmp222;
    goto done_checking;
  }
  __cil_tmp223 = contains_one((char *)"Ss#c", Nec_for_Ss_com);
  tmp___67 = __cil_tmp223;
  if (! tmp___67) {
    __cil_tmp224 = issue_violation(v, (char *)"Ss_com violated");
    v = __cil_tmp224;
    goto done_checking;
  }
  __cil_tmp225 = contains_one((char *)"S*ic", Nec_for_Ss_com);
  tmp___68 = __cil_tmp225;
  if (! tmp___68) {
    __cil_tmp226 = issue_violation(v, (char *)"Ss_com violated");
    v = __cil_tmp226;
    goto done_checking;
  }
  __cil_tmp227 = contains_one((char *)"S##c", Nec_for_S_com);
  tmp___69 = __cil_tmp227;
  if (! tmp___69) {
    __cil_tmp228 = issue_violation(v, (char *)"S_com violated");
    v = __cil_tmp228;
    goto done_checking;
  }
  __cil_tmp229 = contains_one((char *)"THc", Necessary_for_Thcom);
  tmp___70 = __cil_tmp229;
  if (! tmp___70) {
    __cil_tmp230 = issue_violation(v, (char *)"That-comparative rule violated");
    v = __cil_tmp230;
    goto done_checking;
  }
  __cil_tmp231 = contains_one((char *)"TOfc", Necessary_for_Tocom);
  tmp___71 = __cil_tmp231;
  if (! tmp___71) {
    __cil_tmp232 = issue_violation(v, (char *)"To-comparative rule violated");
    v = __cil_tmp232;
    goto done_checking;
  }
  __cil_tmp233 = contains_one((char *)"TOic", Necessary_for_Tvcom);
  tmp___72 = __cil_tmp233;
  if (! tmp___72) {
    __cil_tmp234 = issue_violation(v, (char *)"To-comparative rule violated");
    v = __cil_tmp234;
    goto done_checking;
  }
  __cil_tmp235 = contains_one((char *)"TOtc", Necessary_for_Tvcom_Trans);
  tmp___73 = __cil_tmp235;
  if (! tmp___73) {
    __cil_tmp236 = issue_violation(v, (char *)"To-comparative rule violated");
    v = __cil_tmp236;
    goto done_checking;
  }
  __cil_tmp237 = contains_one((char *)"Ma*", Nec_for_Ma);
  tmp___74 = __cil_tmp237;
  if (! tmp___74) {
    __cil_tmp238 = issue_violation(v, (char *)"bad use of adjective");
    v = __cil_tmp238;
    goto done_checking;
  }
  __cil_tmp239 = contains_one((char *)"Mam", Nec_for_Ma);
  tmp___75 = __cil_tmp239;
  if (! tmp___75) {
    __cil_tmp240 = issue_violation(v, (char *)"bad use of adjective");
    v = __cil_tmp240;
    goto done_checking;
  }
  __cil_tmp241 = contains_one((char *)"MX#a", Nec_for_Ma);
  tmp___76 = __cil_tmp241;
  if (! tmp___76) {
    __cil_tmp242 = issue_violation(v, (char *)"bad use of adjective");
    v = __cil_tmp242;
    goto done_checking;
  }
  __cil_tmp243 = contains_one((char *)"Ixd", ZZ);
  tmp___77 = __cil_tmp243;
  if (! tmp___77) {
    __cil_tmp244 = issue_violation(v, (char *)"Can\'t use \"do\" with that verb");
    v = __cil_tmp244;
    goto done_checking;
  }
  __cil_tmp245 = contains_one((char *)"Oxn", ZZ);
  tmp___78 = __cil_tmp245;
  if (! tmp___78) {
    __cil_tmp246 = issue_violation(v, (char *)"Can\'t use a tag word after a pronoun");
    v = __cil_tmp246;
    goto done_checking;
  }
  __cil_tmp247 = contains_none((char *)"S", illegal_S_types);
  tmp___79 = __cil_tmp247;
  if (! tmp___79) {
    __cil_tmp248 = issue_violation(v, (char *)"bad n-v agreement");
    v = __cil_tmp248;
    goto done_checking;
  }
  __cil_tmp249 = contains_none((char *)"SI", illegal_SI_types);
  tmp___80 = __cil_tmp249;
  if (! tmp___80) {
    __cil_tmp250 = issue_violation(v, (char *)"bad n-v agreement");
    v = __cil_tmp250;
    goto done_checking;
  }
  __cil_tmp251 = contains_one((char *)"MVh", Nec_for_MVh);
  tmp___81 = __cil_tmp251;
  if (! tmp___81) {
    __cil_tmp252 = issue_violation(v, (char *)"Incorrect use of that");
    v = __cil_tmp252;
    goto done_checking;
  }
  __cil_tmp253 = contains_none((char *)"MXsr", Incompat_with_MXsr);
  tmp___82 = __cil_tmp253;
  if (! tmp___82) {
    __cil_tmp254 = issue_violation(v, (char *)"Bad n-v agreement");
    v = __cil_tmp254;
    goto done_checking;
  }
  __cil_tmp255 = contains_none((char *)"MXpr", Incompat_with_MXpr);
  tmp___83 = __cil_tmp255;
  if (! tmp___83) {
    __cil_tmp256 = issue_violation(v, (char *)"Bad n-v agreement");
    v = __cil_tmp256;
    goto done_checking;
  }
  done_checking: 
  __cil_tmp257 = build_type_array();
  pp_return->d_type_array = __cil_tmp257;
  pp_return->v = v;
  free_post_processing_structures();
  __retres88 = pp_return;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres88);
  }
}
}
#pragma merger(0,"merge/print.i","")
extern int _IO_putc(int __c , _IO_FILE *__fp ) ;
static int center[250]  ;
static int N_words_to_print  ;
void set_centers(int print_word_0 ) 
{ int i ;
  int len ;
  int tot ;
  size_t tmp ;
  size_t __cil_tmp6 ;

  {
  tot = 0;
  if (print_word_0) {
    i = 0;
  } else {
    i = 1;
  }
  while (i < N_words_to_print) {
    __cil_tmp6 = strlen((char const   *)chosen_words[i]);
    tmp = __cil_tmp6;
    len = (int )tmp;
    center[i] = tot + len / 2;
    tot += len + 1;
    i ++;
  }

  return;
}
}
static int link_heights[497]  ;
static int row_starts[250]  ;
static int N_rows  ;
void print_postscript_data(FILE *fp , int print_word_0 , int print_word_N ) 
{ int link ;
  int i ;
  int j ;
  int d ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& fp);
  if (print_word_0) {
    d = 0;
  } else {
    d = 1;
  }
  i = 0;
  fprintf((FILE * __restrict  )fp, (char const   * __restrict  )"[");
  j = d;
  while (j < N_words_to_print) {
    if (i % 7 == 0) {
      if (i > 0) {
        fprintf((FILE * __restrict  )fp, (char const   * __restrict  )"\n");
      }
    }
    i ++;
    fprintf((FILE * __restrict  )fp, (char const   * __restrict  )"(%s)", chosen_words[j]);
    j ++;
  }
  fprintf((FILE * __restrict  )fp, (char const   * __restrict  )"]");
  fprintf((FILE * __restrict  )fp, (char const   * __restrict  )"\n");
  fprintf((FILE * __restrict  )fp, (char const   * __restrict  )"[");
  j = 0;
  link = 0;
  while (link < N_links) {
    if (! print_word_0) {
      if (pp_link_array[link].l == 0) {
        goto __Cont;
      }
    }
    if (! print_word_N) {
      if (pp_link_array[link].r == N_words - 1) {
        goto __Cont;
      }
    }
    if (pp_link_array[link].l == -1) {
      goto __Cont;
    }
    if (j % 5 == 0) {
      if (j > 0) {
        fprintf((FILE * __restrict  )fp, (char const   * __restrict  )"\n");
      }
    }
    j ++;
    fprintf((FILE * __restrict  )fp, (char const   * __restrict  )"[%d %d %d", pp_link_array[link].l - d,
            pp_link_array[link].r - d, link_heights[link]);
    if ((int )(pp_link_array[link].lc)->label < 0) {
      fprintf((FILE * __restrict  )fp, (char const   * __restrict  )" (%s)]", pp_link_array[link].name);
    } else {
      fprintf((FILE * __restrict  )fp, (char const   * __restrict  )" ()]");
    }
    __Cont: 
    link ++;
  }
  fprintf((FILE * __restrict  )fp, (char const   * __restrict  )"]");
  fprintf((FILE * __restrict  )fp, (char const   * __restrict  )"\n");
  fprintf((FILE * __restrict  )fp, (char const   * __restrict  )"[");
  j = 0;
  while (j < N_rows) {
    fprintf((FILE * __restrict  )fp, (char const   * __restrict  )"%d ", row_starts[j]);
    j ++;
  }
  fprintf((FILE * __restrict  )fp, (char const   * __restrict  )"]\n");

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void compute_chosen_words(void) 
{ int i ;
  int l ;
  char *s ;
  char *t ;
  char *u ;
  size_t tmp ;
  void *tmp___0 ;
  size_t tmp___1 ;
  void *tmp___2 ;
  int tmp___3 ;
  size_t __cil_tmp11 ;
  void *__cil_tmp12 ;
  int __cil_tmp13 ;
  size_t __cil_tmp14 ;
  void *__cil_tmp15 ;
  extern struct gc_tag_struct *__gcstandard_atomic_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[7] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((5 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& s);
  s = 0;
  simple_gc_frame[3] = (void *)(& t);
  t = 0;
  simple_gc_frame[4] = (void *)(& u);
  u = 0;
  simple_gc_frame[5] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[6] = (void *)(& tmp___2);
  tmp___2 = 0;
  i = 0;
  while (i < N_words) {
    chosen_words[i] = sentence[i].string;
    if ((unsigned int )chosen_disjuncts[i] == (unsigned int )((void *)0)) {
      t = chosen_words[i];
      __cil_tmp11 = strlen((char const   *)t);
      tmp = __cil_tmp11;
      l = (int )(tmp + 2U);
      __cil_tmp12 = GC_malloc(__gcstandard_atomic_tag, l + 1);
      tmp___0 = __cil_tmp12;
      s = (char *)tmp___0;
      sprintf((char * __restrict  )s, (char const   * __restrict  )"[%s]", t);
      free_this_string_later(s, l + 1);
      chosen_words[i] = s;
    } else {
      if (display_word_subscripts) {
        t = (chosen_disjuncts[i])->string;
        __cil_tmp13 = is_idiom_word(t);
        tmp___3 = __cil_tmp13;
        if (tmp___3) {
          __cil_tmp14 = strlen((char const   *)t);
          tmp___1 = __cil_tmp14;
          l = (int )tmp___1;
          __cil_tmp15 = GC_malloc(__gcstandard_atomic_tag, l + 1);
          tmp___2 = __cil_tmp15;
          s = (char *)tmp___2;
          free_this_string_later(s, l + 1);
          strcpy((char * __restrict  )s, (char const   * __restrict  )t);
          u = s;
          while ((int )*u != 46) {
            u ++;
          }
          *u = (char )'\000';
          chosen_words[i] = s;
        } else {
          chosen_words[i] = t;
        }
      }
    }
    i ++;
  }
  if (left_wall_defined) {
    chosen_words[0] = (char *)"/////";
  }
  if (right_wall_defined) {
    chosen_words[N_words - 1] = (char *)"/////";
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
static char picture[30][1500]  ;
static char xpicture[30][1500]  ;
void print_links_graphically(FILE *fp ) 
{ int i ;
  int j ;
  int k ;
  int cl ;
  int cr ;
  int row ;
  int top_row ;
  int width ;
  int flag ;
  char *t ;
  char *s ;
  int print_word_0 ;
  int print_word_N ;
  int N_wall_connectors ;
  int suppressor_used ;
  char connector___0[50] ;
  int line_len ;
  int link_length ;
  int tmp ;
  int tmp___0 ;
  int tmp___1 ;
  int tmp___2 ;
  unsigned short const   **tmp___3 ;
  unsigned short const   **tmp___4 ;
  size_t tmp___5 ;
  unsigned short const   **tmp___6 ;
  char *tmp___7 ;
  char *tmp___8 ;
  char *tmp___9 ;
  char *tmp___10 ;
  unsigned short const   **tmp___11 ;
  char *tmp___12 ;
  char *tmp___13 ;
  char *tmp___14 ;
  size_t tmp___15 ;
  size_t tmp___16 ;
  int tmp___17 ;
  int __cil_tmp39 ;
  int __cil_tmp40 ;
  unsigned short const   **__cil_tmp41 ;
  unsigned short const   **__cil_tmp42 ;
  size_t __cil_tmp43 ;
  unsigned short const   **__cil_tmp44 ;
  unsigned short const   **__cil_tmp45 ;
  size_t __cil_tmp46 ;
  size_t __cil_tmp47 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[16] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((14 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& t);
  t = 0;
  simple_gc_frame[3] = (void *)(& s);
  s = 0;
  simple_gc_frame[4] = (void *)(& tmp___3);
  tmp___3 = 0;
  simple_gc_frame[5] = (void *)(& tmp___4);
  tmp___4 = 0;
  simple_gc_frame[6] = (void *)(& tmp___6);
  tmp___6 = 0;
  simple_gc_frame[7] = (void *)(& tmp___7);
  tmp___7 = 0;
  simple_gc_frame[8] = (void *)(& tmp___8);
  tmp___8 = 0;
  simple_gc_frame[9] = (void *)(& tmp___9);
  tmp___9 = 0;
  simple_gc_frame[10] = (void *)(& tmp___10);
  tmp___10 = 0;
  simple_gc_frame[11] = (void *)(& tmp___11);
  tmp___11 = 0;
  simple_gc_frame[12] = (void *)(& tmp___12);
  tmp___12 = 0;
  simple_gc_frame[13] = (void *)(& tmp___13);
  tmp___13 = 0;
  simple_gc_frame[14] = (void *)(& tmp___14);
  tmp___14 = 0;
  simple_gc_frame[15] = (void *)(& fp);
  print_word_0 = 0;
  print_word_N = 0;
  N_wall_connectors = 0;
  if (left_wall_defined) {
    suppressor_used = 0;
    j = 0;
    while (j < N_links) {
      if (pp_link_array[j].l == 0) {
        N_wall_connectors ++;
        __cil_tmp39 = strcmp((char const   *)(pp_link_array[j].lc)->string, "xxxxxxx");
        tmp = __cil_tmp39;
        if (tmp == 0) {
          suppressor_used = 1;
        }
      }
      j ++;
    }
    if (! suppressor_used) {
      tmp___0 = 1;
    } else {
      if (N_wall_connectors > 1) {
        tmp___0 = 1;
      } else {
        if (display_walls) {
          tmp___0 = 1;
        } else {
          tmp___0 = 0;
        }
      }
    }
    print_word_0 = tmp___0;
  } else {
    print_word_0 = 1;
  }
  N_wall_connectors = 0;
  if (right_wall_defined) {
    suppressor_used = 0;
    j = 0;
    while (j < N_links) {
      if (pp_link_array[j].r == N_words - 1) {
        N_wall_connectors ++;
        __cil_tmp40 = strcmp((char const   *)(pp_link_array[j].lc)->string, "RW");
        tmp___1 = __cil_tmp40;
        if (tmp___1 == 0) {
          suppressor_used = 1;
        }
      }
      j ++;
    }
    if (! suppressor_used) {
      tmp___2 = 1;
    } else {
      if (N_wall_connectors > 1) {
        tmp___2 = 1;
      } else {
        if (display_walls) {
          tmp___2 = 1;
        } else {
          tmp___2 = 0;
        }
      }
    }
    print_word_N = tmp___2;
  } else {
    print_word_N = 1;
  }
  N_words_to_print = N_words;
  if (! print_word_N) {
    N_words_to_print --;
  }
  set_centers(print_word_0);
  line_len = center[N_words_to_print - 1] + 1;
  k = 0;
  while (k < 30) {
    j = 0;
    while (j < line_len) {
      picture[k][j] = (char )' ';
      j ++;
    }
    picture[k][line_len] = (char )'\000';
    k ++;
  }
  top_row = 0;
  link_length = 1;
  while (link_length < N_words_to_print) {
    j = 0;
    while (j < N_links) {
      if (pp_link_array[j].l == -1) {
        goto __Cont;
      }
      if (pp_link_array[j].r - pp_link_array[j].l != link_length) {
        goto __Cont;
      }
      if (! print_word_0) {
        if (pp_link_array[j].l == 0) {
          goto __Cont;
        }
      }
      if (! print_word_N) {
        if (pp_link_array[j].r == N_words - 1) {
          goto __Cont;
        }
      }
      cl = center[pp_link_array[j].l];
      cr = center[pp_link_array[j].r];
      row = 0;
      while (row < 30) {
        k = cl + 1;
        while (k < cr) {
          if ((int )picture[row][k] != 32) {
            break;
          }
          k ++;
        }
        if (k == cr) {
          break;
        }
        row ++;
      }
      link_heights[j] = row;
      if (2 * row + 2 > 29) {
        fprintf((FILE * __restrict  )fp, (char const   * __restrict  )"The diagram is too high.\n");

        goto return_label;
      }
      if (row > top_row) {
        top_row = row;
      }
      picture[row][cl] = (char )'+';
      picture[row][cr] = (char )'+';
      k = cl + 1;
      while (k < cr) {
        picture[row][k] = (char )'-';
        k ++;
      }
      s = pp_link_array[j].name;
      if (display_link_subscripts) {
        __cil_tmp41 = __ctype_b_loc();
        tmp___3 = __cil_tmp41;
        if (! ((int const   )*(*tmp___3 + (int )*s) & 1024)) {
          s = (char *)"";
        }
      } else {
        __cil_tmp42 = __ctype_b_loc();
        tmp___4 = __cil_tmp42;
        if (! ((int const   )*(*tmp___4 + (int )*s) & 256)) {
          s = (char *)"";
        }
      }
      strncpy((char * __restrict  )(connector___0), (char const   * __restrict  )s,
              49U);
      connector___0[49] = (char )'\000';
      k = 0;
      if (display_link_subscripts) {
        __cil_tmp43 = strlen((char const   *)(connector___0));
        tmp___5 = __cil_tmp43;
        k = (int )tmp___5;
      } else {
        t = connector___0;
        while (1) {
          __cil_tmp44 = __ctype_b_loc();
          tmp___6 = __cil_tmp44;
          if (! ((int const   )*(*tmp___6 + (int )*t) & 256)) {
            break;
          }
          k ++;
          t ++;
        }
      }
      if (((cl + cr) - k) / 2 + 1 <= cl) {
        t = (picture[row] + cl) + 1;
      } else {
        t = (picture[row] + ((cl + cr) - k) / 2) + 1;
      }
      s = connector___0;
      if (display_link_subscripts) {
        while (1) {
          if ((int )*s != 0) {
            if (! ((int )*t == 45)) {
              break;
            }
          } else {
            break;
          }
          tmp___7 = t;
          t ++;
          tmp___8 = s;
          s ++;
          *tmp___7 = *tmp___8;
        }
      } else {
        while (1) {
          __cil_tmp45 = __ctype_b_loc();
          tmp___11 = __cil_tmp45;
          if ((int const   )*(*tmp___11 + (int )*s) & 256) {
            if (! ((int )*t == 45)) {
              break;
            }
          } else {
            break;
          }
          tmp___9 = t;
          t ++;
          tmp___10 = s;
          s ++;
          *tmp___9 = *tmp___10;
        }
      }
      k = 0;
      while (k < row) {
        if ((int )picture[k][cl] == 32) {
          picture[k][cl] = (char )'|';
        }
        if ((int )picture[k][cr] == 32) {
          picture[k][cr] = (char )'|';
        }
        k ++;
      }
      __Cont: 
      j ++;
    }
    link_length ++;
  }
  s = xpicture[0];
  if (print_word_0) {
    k = 0;
  } else {
    k = 1;
  }
  while (k < N_words_to_print) {
    t = chosen_words[k];
    i = 0;
    while ((int )*t != 0) {
      tmp___12 = s;
      s ++;
      tmp___13 = t;
      t ++;
      *tmp___12 = *tmp___13;
      i ++;
    }
    tmp___14 = s;
    s ++;
    *tmp___14 = (char )' ';
    k ++;
  }
  *s = (char )'\000';
  if (display_short) {
    k = 0;
    while ((int )picture[0][k] != 0) {
      if ((int )picture[0][k] == 43) {
        xpicture[1][k] = (char )'|';
      } else {
        if ((int )picture[0][k] == 124) {
          xpicture[1][k] = (char )'|';
        } else {
          xpicture[1][k] = (char )' ';
        }
      }
      k ++;
    }
    xpicture[1][k] = (char )'\000';
    row = 0;
    while (row <= top_row) {
      strcpy((char * __restrict  )(xpicture[row + 2]), (char const   * __restrict  )(picture[row]));
      row ++;
    }
    top_row += 2;
  } else {
    row = 0;
    while (row <= top_row) {
      strcpy((char * __restrict  )(xpicture[2 * row + 2]), (char const   * __restrict  )(picture[row]));
      k = 0;
      while ((int )picture[row][k] != 0) {
        if ((int )picture[row][k] == 43) {
          xpicture[2 * row + 1][k] = (char )'|';
        } else {
          if ((int )picture[row][k] == 124) {
            xpicture[2 * row + 1][k] = (char )'|';
          } else {
            xpicture[2 * row + 1][k] = (char )' ';
          }
        }
        k ++;
      }
      xpicture[2 * row + 1][k] = (char )'\000';
      row ++;
    }
    top_row = 2 * top_row + 2;
  }
  if (print_word_0) {
    i = 0;
  } else {
    i = 1;
  }
  k = 0;
  N_rows = 0;
  row_starts[N_rows] = 0;
  N_rows ++;
  while (i < N_words_to_print) {
    _IO_putc('\n', fp);
    width = 0;
    while (1) {
      __cil_tmp46 = strlen((char const   *)chosen_words[i]);
      tmp___15 = __cil_tmp46;
      width = (int )((unsigned int )width + (tmp___15 + 1U));
      i ++;
      if (i < N_words_to_print) {
        __cil_tmp47 = strlen((char const   *)chosen_words[i]);
        tmp___16 = __cil_tmp47;
        if (! ((width + (int )tmp___16) + 1 < screen_width)) {
          break;
        }
      } else {
        break;
      }
    }
    row_starts[N_rows] = i - ! print_word_0;
    if (i < N_words_to_print) {
      N_rows ++;
    }
    row = top_row;
    while (row >= 0) {
      flag = 1;
      j = k;
      while (1) {
        if (flag) {
          if (j < k + width) {
            if (! ((int )xpicture[row][j] != 0)) {
              break;
            }
          } else {
            break;
          }
        } else {
          break;
        }
        if (flag) {
          if ((int )xpicture[row][j] == 32) {
            tmp___17 = 1;
          } else {
            tmp___17 = 0;
          }
        } else {
          tmp___17 = 0;
        }
        flag = tmp___17;
        j ++;
      }
      if (! flag) {
        j = k;
        while (1) {
          if (j < k + width) {
            if (! ((int )xpicture[row][j] != 0)) {
              break;
            }
          } else {
            break;
          }
          _IO_putc((int )xpicture[row][j], fp);
          j ++;
        }
        _IO_putc('\n', fp);
      }
      row --;
    }
    _IO_putc('\n', fp);
    k += width;
  }
  if (display_postscript) {
    print_postscript_data(fp, print_word_0, print_word_N);
  }

  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void print_disjunct_counts(void) 
{ int i ;
  int c ;
  Disjunct *d ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& d);
  d = 0;
  i = 0;
  while (i < N_words) {
    c = 0;
    d = sentence[i].d;
    while ((unsigned int )d != (unsigned int )((void *)0)) {
      c ++;
      d = d->next;
    }
    printf((char const   * __restrict  )"%s(%d) ", sentence[i].string, c);
    i ++;
  }
  printf((char const   * __restrict  )"\n\n");

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void print_expression_sizes(void) 
{ X_node *x ;
  int w ;
  int size ;
  int tmp ;
  int __cil_tmp5 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& x);
  x = 0;
  w = 0;
  while (w < N_words) {
    size = 0;
    x = sentence[w].x;
    while ((unsigned int )x != (unsigned int )((void *)0)) {
      __cil_tmp5 = size_of_expression(x->exp);
      tmp = __cil_tmp5;
      size += tmp;
      x = x->next;
    }
    printf((char const   * __restrict  )"%s[%d] ", sentence[w].string, size);
    w ++;
  }
  printf((char const   * __restrict  )"\n\n");

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void print_sentence(FILE *fp , int w ) 
{ int i ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& fp);
  if (left_wall_defined) {
    i = 1;
  } else {
    i = 0;
  }
  if (w == 0) {
    i += w;
  }
  while (i < N_words - right_wall_defined) {
    fprintf((FILE * __restrict  )fp, (char const   * __restrict  )"%s ", sentence[i].string);
    i ++;
  }
  fprintf((FILE * __restrict  )fp, (char const   * __restrict  )"\n");

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
#pragma merger(0,"merge/prune.i","")
void free_connectors(Connector *e ) ;
void free_Exp(Exp *e ) ;
void free_E_list(E_list *l ) ;
int prune_match(Connector *a , Connector *b ) 
{ char *s ;
  char *t ;
  int x ;
  int y ;
  unsigned short const   **tmp ;
  unsigned short const   **tmp___0 ;
  int __retres9 ;
  unsigned short const   **__cil_tmp10 ;
  unsigned short const   **__cil_tmp11 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[8] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((6 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& s);
  s = 0;
  simple_gc_frame[3] = (void *)(& t);
  t = 0;
  simple_gc_frame[4] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[5] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[6] = (void *)(& a);
  simple_gc_frame[7] = (void *)(& b);
  if ((int )a->label != (int )b->label) {
    __retres9 = 0;
    goto return_label;
  }
  x = (int )a->priority;
  y = (int )b->priority;
  s = a->string;
  t = b->string;
  while (1) {
    __cil_tmp10 = __ctype_b_loc();
    tmp = __cil_tmp10;
    if (! ((int const   )*(*tmp + (int )*s) & 256)) {
      __cil_tmp11 = __ctype_b_loc();
      tmp___0 = __cil_tmp11;
      if (! ((int const   )*(*tmp___0 + (int )*t) & 256)) {
        break;
      }
    }
    if ((int )*s != (int )*t) {
      __retres9 = 0;
      goto return_label;
    }
    s ++;
    t ++;
  }
  if (x == 0) {
    if (y == 0) {
      if ((int )*(a->string) == 83) {
        if ((int )*s == 115) {
          goto _L___0;
        } else {
          if ((int )*s == 112) {
            _L___0: 
            if ((int )*t == 112) {
              goto _L;
            } else {
              if ((int )*t == 115) {
                _L: 
                if ((unsigned int )(s - 1) == (unsigned int )a->string) {
                  __retres9 = 1;
                  goto return_label;
                } else {
                  if ((unsigned int )(s - 2) == (unsigned int )a->string) {
                    if ((int )*(s - 1) == 73) {
                      __retres9 = 1;
                      goto return_label;
                    }
                  }
                }
              }
            }
          }
        }
      }
      while (1) {
        if ((int )*s != 0) {
          if (! ((int )*t != 0)) {
            break;
          }
        } else {
          break;
        }
        if ((int )*s == 42) {
          s ++;
          t ++;
        } else {
          if ((int )*t == 42) {
            s ++;
            t ++;
          } else {
            if ((int )*s == (int )*t) {
              if ((int )*s != 94) {
                s ++;
                t ++;
              } else {
                __retres9 = 0;
                goto return_label;
              }
            } else {
              __retres9 = 0;
              goto return_label;
            }
          }
        }
      }
      __retres9 = 1;
      goto return_label;
    } else {
      goto _L___2;
    }
  } else {
    _L___2: 
    if (x == 1) {
      if (y == 2) {
        while (1) {
          if ((int )*s != 0) {
            if (! ((int )*t != 0)) {
              break;
            }
          } else {
            break;
          }
          if ((int )*s == (int )*t) {
            s ++;
            t ++;
          } else {
            if ((int )*s == 42) {
              s ++;
              t ++;
            } else {
              if ((int )*t == 94) {
                s ++;
                t ++;
              } else {
                __retres9 = 0;
                goto return_label;
              }
            }
          }
        }
        __retres9 = 1;
        goto return_label;
      } else {
        goto _L___1;
      }
    } else {
      _L___1: 
      if (y == 1) {
        if (x == 2) {
          while (1) {
            if ((int )*s != 0) {
              if (! ((int )*t != 0)) {
                break;
              }
            } else {
              break;
            }
            if ((int )*s == (int )*t) {
              s ++;
              t ++;
            } else {
              if ((int )*t == 42) {
                s ++;
                t ++;
              } else {
                if ((int )*s == 94) {
                  s ++;
                  t ++;
                } else {
                  __retres9 = 0;
                  goto return_label;
                }
              }
            }
          }
          __retres9 = 1;
          goto return_label;
        } else {
          __retres9 = 0;
          goto return_label;
        }
      } else {
        __retres9 = 0;
        goto return_label;
      }
    }
  }
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres9);
  }
}
}
static int s_table_size  ;
static Connector **table___0  ;
void free_S(void) 
{ int i ;

  {
  i = 0;
  while (i < s_table_size) {
    if ((unsigned int )*(table___0 + i) == (unsigned int )((void *)0)) {
      goto __Cont;
    }
    free_connectors(*(table___0 + i));
    *(table___0 + i) = (Connector *)((void *)0);
    __Cont: 
    i ++;
  }

  return;
}
}
int hash_S(Connector *c ) 
{ char *s ;
  int i ;
  unsigned short const   **tmp ;
  int __retres5 ;
  unsigned short const   **__cil_tmp6 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& s);
  s = 0;
  simple_gc_frame[3] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[4] = (void *)(& c);
  i = (int )c->label;
  s = c->string;
  while (1) {
    __cil_tmp6 = __ctype_b_loc();
    tmp = __cil_tmp6;
    if (! ((int const   )*(*tmp + (int )*s) & 256)) {
      break;
    }
    i = (int )((unsigned int )(i + (i << 1)) + randtable[((int )*s + i) & 255]);
    s ++;
  }
  __retres5 = i & (s_table_size - 1);
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres5);
  }
}
}
void insert_S(Connector *c ) 
{ int h ;
  Connector *e ;
  int tmp ;
  void *tmp___0 ;
  int __cil_tmp6 ;
  int __cil_tmp7 ;
  void *__cil_tmp8 ;
  extern struct gc_tag_struct *__gc_struct_Connector_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& e);
  e = 0;
  simple_gc_frame[3] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[4] = (void *)(& c);
  __cil_tmp6 = hash_S(c);
  h = __cil_tmp6;
  e = *(table___0 + h);
  while ((unsigned int )e != (unsigned int )((void *)0)) {
    __cil_tmp7 = strcmp((char const   *)c->string, (char const   *)e->string);
    tmp = __cil_tmp7;
    if (tmp == 0) {
      if ((int )c->label == (int )e->label) {
        if ((int )c->priority == (int )e->priority) {

          goto return_label;
        }
      }
    }
    e = e->next;
  }
  __cil_tmp8 = GC_malloc(__gc_struct_Connector_struct_tag, (int )sizeof(Connector ));
  tmp___0 = __cil_tmp8;
  e = (Connector *)tmp___0;
  *e = *c;
  e->next = *(table___0 + h);
  *(table___0 + h) = e;

  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void zero_S(void) 
{ int i ;

  {
  i = 0;
  while (i < s_table_size) {
    *(table___0 + i) = (Connector *)((void *)0);
    i ++;
  }

  return;
}
}
void init_S(Connector *c ) 
{ int h ;
  Connector *c1 ;
  void *tmp ;
  int __cil_tmp5 ;
  void *__cil_tmp6 ;
  extern struct gc_tag_struct *__gc_struct_Connector_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& c1);
  c1 = 0;
  simple_gc_frame[3] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[4] = (void *)(& c);
  while ((unsigned int )c != (unsigned int )((void *)0)) {
    __cil_tmp5 = hash_S(c);
    h = __cil_tmp5;
    __cil_tmp6 = GC_malloc(__gc_struct_Connector_struct_tag, (int )sizeof(Connector ));
    tmp = __cil_tmp6;
    c1 = (Connector *)tmp;
    *c1 = *c;
    c1->next = *(table___0 + h);
    *(table___0 + h) = c1;
    c = c->next;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
int matches_S(Connector *c , int dir ) 
{ int h ;
  Connector *e ;
  int tmp ;
  int tmp___0 ;
  int __retres7 ;
  int __cil_tmp8 ;
  int __cil_tmp9 ;
  int __cil_tmp10 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& e);
  e = 0;
  simple_gc_frame[3] = (void *)(& c);
  __cil_tmp8 = hash_S(c);
  h = __cil_tmp8;
  if (dir == 45) {
    e = *(table___0 + h);
    while ((unsigned int )e != (unsigned int )((void *)0)) {
      __cil_tmp9 = prune_match(e, c);
      tmp = __cil_tmp9;
      if (tmp) {
        __retres7 = 1;
        goto return_label;
      }
      e = e->next;
    }
  } else {
    e = *(table___0 + h);
    while ((unsigned int )e != (unsigned int )((void *)0)) {
      __cil_tmp10 = prune_match(c, e);
      tmp___0 = __cil_tmp10;
      if (tmp___0) {
        __retres7 = 1;
        goto return_label;
      }
      e = e->next;
    }
  }
  __retres7 = 0;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres7);
  }
}
}
void clean_up(int w ) 
{ Disjunct head_disjunct ;
  Disjunct *d ;
  Disjunct *d1 ;
  extern struct gc_tag_struct *__gc_struct_Disjunct_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;
  void *struct_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  memset(& struct_gc_frame, 0, sizeof(struct_gc_frame));
  struct_gc_frame[0] = (void *)simple_gc_frame;
  struct_gc_frame[1] = (void *)((1 << 2) + 3);
  GC_set_variable_stack1(struct_gc_frame);
  struct_gc_frame[2] = (void *)(& head_disjunct);
  struct_gc_frame[3] = (void *)__gc_struct_Disjunct_struct_tag;
  struct_gc_frame[4] = 0;
  struct_gc_frame[5] = 0;
  memset(& head_disjunct, 0, sizeof(head_disjunct));
  simple_gc_frame[2] = (void *)(& d);
  d = 0;
  simple_gc_frame[3] = (void *)(& d1);
  d1 = 0;
  d = & head_disjunct;
  d->next = sentence[w].d;
  while ((unsigned int )d->next != (unsigned int )((void *)0)) {
    if ((unsigned int )(d->next)->left == (unsigned int )((void *)0)) {
      if ((unsigned int )(d->next)->right == (unsigned int )((void *)0)) {
        d1 = d->next;
        d->next = d1->next;
      } else {
        d = d->next;
      }
    } else {
      d = d->next;
    }
  }
  sentence[w].d = head_disjunct.next;

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
int count_disjuncts(Disjunct *d ) 
{ int count___0 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& d);
  count___0 = 0;
  while ((unsigned int )d != (unsigned int )((void *)0)) {
    count___0 ++;
    d = d->next;
  }
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (count___0);
  }
}
}
int count_disjuncts_in_sentence(void) 
{ int w ;
  int count___0 ;
  int tmp ;
  int __cil_tmp4 ;

  {
  count___0 = 0;
  w = 0;
  while (w < N_words) {
    __cil_tmp4 = count_disjuncts(sentence[w].d);
    tmp = __cil_tmp4;
    count___0 += tmp;
    w ++;
  }
  return (count___0);
}
}
void prune(void) 
{ int N_deleted ;
  Disjunct *d ;
  Connector *e ;
  int w ;
  int tmp ;
  void *tmp___0 ;
  int tmp___1 ;
  int tmp___2 ;
  int __cil_tmp9 ;
  int __cil_tmp10 ;
  void *__cil_tmp11 ;
  int __cil_tmp12 ;
  int __cil_tmp13 ;
  extern struct gc_tag_struct *__gcstandard_array_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& d);
  d = 0;
  simple_gc_frame[3] = (void *)(& e);
  e = 0;
  simple_gc_frame[4] = (void *)(& tmp___0);
  tmp___0 = 0;
  __cil_tmp9 = count_disjuncts_in_sentence();
  tmp = __cil_tmp9;
  __cil_tmp10 = next_power_of_two_up(tmp);
  s_table_size = __cil_tmp10;
  __cil_tmp11 = GC_malloc(__gcstandard_array_tag, (int )((unsigned int )s_table_size * sizeof(Connector *)));
  tmp___0 = __cil_tmp11;
  table___0 = (Connector **)tmp___0;
  zero_S();
  N_deleted = 1;
  while (1) {
    w = 0;
    while (w < N_words) {
      d = sentence[w].d;
      while ((unsigned int )d != (unsigned int )((void *)0)) {
        e = d->left;
        while ((unsigned int )e != (unsigned int )((void *)0)) {
          __cil_tmp12 = matches_S(e, '-');
          tmp___1 = __cil_tmp12;
          if (! tmp___1) {
            break;
          }
          e = e->next;
        }
        if ((unsigned int )e != (unsigned int )((void *)0)) {
          N_deleted ++;
          free_connectors(d->left);
          free_connectors(d->right);
          d->right = (Connector *)((void *)0);
          d->left = d->right;
        }
        d = d->next;
      }
      clean_up(w);
      d = sentence[w].d;
      while ((unsigned int )d != (unsigned int )((void *)0)) {
        e = d->right;
        while ((unsigned int )e != (unsigned int )((void *)0)) {
          insert_S(e);
          e = e->next;
        }
        d = d->next;
      }
      w ++;
    }
    if (verbosity > 2) {
      printf((char const   * __restrict  )"l->r pass removed %d\n", N_deleted);
      print_disjunct_counts();
    }
    free_S();
    if (N_deleted == 0) {
      break;
    }
    N_deleted = 0;
    w = N_words - 1;
    while (w >= 0) {
      d = sentence[w].d;
      while ((unsigned int )d != (unsigned int )((void *)0)) {
        e = d->right;
        while ((unsigned int )e != (unsigned int )((void *)0)) {
          __cil_tmp13 = matches_S(e, '+');
          tmp___2 = __cil_tmp13;
          if (! tmp___2) {
            break;
          }
          e = e->next;
        }
        if ((unsigned int )e != (unsigned int )((void *)0)) {
          N_deleted ++;
          free_connectors(d->left);
          free_connectors(d->right);
          d->right = (Connector *)((void *)0);
          d->left = d->right;
        }
        d = d->next;
      }
      clean_up(w);
      d = sentence[w].d;
      while ((unsigned int )d != (unsigned int )((void *)0)) {
        e = d->left;
        while ((unsigned int )e != (unsigned int )((void *)0)) {
          insert_S(e);
          e = e->next;
        }
        d = d->next;
      }
      w --;
    }
    if (verbosity > 2) {
      printf((char const   * __restrict  )"r->l pass removed %d\n", N_deleted);
      print_disjunct_counts();
    }
    free_S();
    if (N_deleted == 0) {
      break;
    }
    N_deleted = 0;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
static int dup_table_size  ;
static Disjunct **dup_table  ;
int string_hash(char *s , int i ) 
{ int __retres3 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& s);
  while ((int )*s != 0) {
    i = (int )((unsigned int )(i + (i << 1)) + randtable[((int )*s + i) & 255]);
    s ++;
  }
  __retres3 = i & (dup_table_size - 1);
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres3);
  }
}
}
int old_hash_disjunct(Disjunct *d ) 
{ int i ;
  Connector *e ;
  int tmp ;
  int __cil_tmp5 ;
  int __cil_tmp6 ;
  int __cil_tmp7 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& e);
  e = 0;
  simple_gc_frame[3] = (void *)(& d);
  i = 0;
  e = d->left;
  while ((unsigned int )e != (unsigned int )((void *)0)) {
    __cil_tmp5 = string_hash(e->string, i);
    i = __cil_tmp5;
    e = e->next;
  }
  e = d->right;
  while ((unsigned int )e != (unsigned int )((void *)0)) {
    __cil_tmp6 = string_hash(e->string, i);
    i = __cil_tmp6;
    e = e->next;
  }
  __cil_tmp7 = string_hash(d->string, i);
  tmp = __cil_tmp7;
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (tmp);
  }
}
}
int connectors_equal_prune(Connector *c1 , Connector *c2 ) 
{ int tmp ;
  int tmp___0 ;
  int __cil_tmp5 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& c1);
  simple_gc_frame[3] = (void *)(& c2);
  if ((int )c1->label == (int )c2->label) {
    if ((int )c1->multi == (int )c2->multi) {
      if ((int )c1->priority == (int )c2->priority) {
        __cil_tmp5 = strcmp((char const   *)c1->string, (char const   *)c2->string);
        tmp = __cil_tmp5;
        if (tmp == 0) {
          tmp___0 = 1;
        } else {
          tmp___0 = 0;
        }
      } else {
        tmp___0 = 0;
      }
    } else {
      tmp___0 = 0;
    }
  } else {
    tmp___0 = 0;
  }
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (tmp___0);
  }
}
}
int disjuncts_equal(Disjunct *d1 , Disjunct *d2 ) 
{ Connector *e1 ;
  Connector *e2 ;
  int tmp ;
  int tmp___0 ;
  int tmp___1 ;
  int __retres8 ;
  int __cil_tmp9 ;
  int __cil_tmp10 ;
  int __cil_tmp11 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& e1);
  e1 = 0;
  simple_gc_frame[3] = (void *)(& e2);
  e2 = 0;
  simple_gc_frame[4] = (void *)(& d1);
  simple_gc_frame[5] = (void *)(& d2);
  e1 = d1->left;
  e2 = d2->left;
  while (1) {
    if ((unsigned int )e1 != (unsigned int )((void *)0)) {
      if (! ((unsigned int )e2 != (unsigned int )((void *)0))) {
        break;
      }
    } else {
      break;
    }
    __cil_tmp9 = connectors_equal_prune(e1, e2);
    tmp = __cil_tmp9;
    if (! tmp) {
      break;
    }
    e1 = e1->next;
    e2 = e2->next;
  }
  if ((unsigned int )e1 != (unsigned int )((void *)0)) {
    __retres8 = 0;
    goto return_label;
  } else {
    if ((unsigned int )e2 != (unsigned int )((void *)0)) {
      __retres8 = 0;
      goto return_label;
    }
  }
  e1 = d1->right;
  e2 = d2->right;
  while (1) {
    if ((unsigned int )e1 != (unsigned int )((void *)0)) {
      if (! ((unsigned int )e2 != (unsigned int )((void *)0))) {
        break;
      }
    } else {
      break;
    }
    __cil_tmp10 = connectors_equal_prune(e1, e2);
    tmp___0 = __cil_tmp10;
    if (! tmp___0) {
      break;
    }
    e1 = e1->next;
    e2 = e2->next;
  }
  if ((unsigned int )e1 != (unsigned int )((void *)0)) {
    __retres8 = 0;
    goto return_label;
  } else {
    if ((unsigned int )e2 != (unsigned int )((void *)0)) {
      __retres8 = 0;
      goto return_label;
    }
  }
  __cil_tmp11 = strcmp((char const   *)d1->string, (char const   *)d2->string);
  tmp___1 = __cil_tmp11;
  __retres8 = tmp___1 == 0;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres8);
  }
}
}
Disjunct *eliminate_duplicate_disjuncts(Disjunct *d ) 
{ int i ;
  int h ;
  int count___0 ;
  Disjunct *dn ;
  Disjunct *dx ;
  int tmp ;
  void *tmp___0 ;
  int tmp___1 ;
  int __cil_tmp10 ;
  int __cil_tmp11 ;
  void *__cil_tmp12 ;
  int __cil_tmp13 ;
  int __cil_tmp14 ;
  extern struct gc_tag_struct *__gcstandard_array_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& dn);
  dn = 0;
  simple_gc_frame[3] = (void *)(& dx);
  dx = 0;
  simple_gc_frame[4] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[5] = (void *)(& d);
  count___0 = 0;
  __cil_tmp10 = count_disjuncts(d);
  tmp = __cil_tmp10;
  __cil_tmp11 = next_power_of_two_up(2 * tmp);
  dup_table_size = __cil_tmp11;
  __cil_tmp12 = GC_malloc(__gcstandard_array_tag, (int )((unsigned int )dup_table_size * sizeof(Disjunct *)));
  tmp___0 = __cil_tmp12;
  dup_table = (Disjunct **)tmp___0;
  i = 0;
  while (i < dup_table_size) {
    *(dup_table + i) = (Disjunct *)((void *)0);
    i ++;
  }
  while ((unsigned int )d != (unsigned int )((void *)0)) {
    dn = d->next;
    __cil_tmp13 = old_hash_disjunct(d);
    h = __cil_tmp13;
    dx = *(dup_table + h);
    while ((unsigned int )dx != (unsigned int )((void *)0)) {
      __cil_tmp14 = disjuncts_equal(dx, d);
      tmp___1 = __cil_tmp14;
      if (tmp___1) {
        break;
      }
      dx = dx->next;
    }
    if ((unsigned int )dx == (unsigned int )((void *)0)) {
      d->next = *(dup_table + h);
      *(dup_table + h) = d;
    } else {
      d->next = (Disjunct *)((void *)0);
      if ((int )d->cost < (int )dx->cost) {
        dx->cost = d->cost;
      }
      free_disjuncts(d);
      count___0 ++;
    }
    d = dn;
  }
  i = 0;
  while (i < dup_table_size) {
    dn = *(dup_table + i);
    while ((unsigned int )dn != (unsigned int )((void *)0)) {
      dx = dn->next;
      dn->next = d;
      d = dn;
      dn = dx;
    }
    i ++;
  }
  if (verbosity > 2) {
    if (count___0 != 0) {
      printf((char const   * __restrict  )"killed %d duplicates\n", count___0);
    }
  }
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (d);
  }
}
}
int size_of_sentence_expressions(void) 
{ X_node *x ;
  int w ;
  int size ;
  int tmp ;
  int __cil_tmp5 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& x);
  x = 0;
  size = 0;
  w = 0;
  while (w < N_words) {
    x = sentence[w].x;
    while ((unsigned int )x != (unsigned int )((void *)0)) {
      __cil_tmp5 = size_of_expression(x->exp);
      tmp = __cil_tmp5;
      size += tmp;
      x = x->next;
    }
    w ++;
  }
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (size);
  }
}
}
int and_purge_E_list(E_list *l ) ;
E_list *or_purge_E_list(E_list *l ) ;
Exp *purge_Exp(Exp *e ) 
{ int tmp ;
  Exp *__retres3 ;
  int __cil_tmp4 ;
  E_list *__cil_tmp5 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& __retres3);
  __retres3 = 0;
  simple_gc_frame[3] = (void *)(& e);
  if ((int )e->type == 2) {
    if ((unsigned int )e->u.string == (unsigned int )((void *)0)) {
      __retres3 = (Exp *)((void *)0);
      goto return_label;
    } else {
      __retres3 = e;
      goto return_label;
    }
  }
  if ((int )e->type == 1) {
    __cil_tmp4 = and_purge_E_list(e->u.l);
    tmp = __cil_tmp4;
    if (tmp == 0) {
      __retres3 = (Exp *)((void *)0);
      goto return_label;
    }
  } else {
    __cil_tmp5 = or_purge_E_list(e->u.l);
    e->u.l = __cil_tmp5;
    GC_autotag_union(& e->u, 0);
    if ((unsigned int )e->u.l == (unsigned int )((void *)0)) {
      __retres3 = (Exp *)((void *)0);
      goto return_label;
    }
  }
  __retres3 = e;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres3);
  }
}
}
int and_purge_E_list(E_list *l ) 
{ int tmp ;
  int __retres3 ;
  Exp *__cil_tmp4 ;
  int __cil_tmp5 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& l);
  if ((unsigned int )l == (unsigned int )((void *)0)) {
    __retres3 = 1;
    goto return_label;
  }
  __cil_tmp4 = purge_Exp(l->e);
  l->e = __cil_tmp4;
  if ((unsigned int )l->e == (unsigned int )((void *)0)) {
    free_E_list(l->next);
    __retres3 = 0;
    goto return_label;
  }
  __cil_tmp5 = and_purge_E_list(l->next);
  tmp = __cil_tmp5;
  if (tmp == 0) {
    free_Exp(l->e);
    __retres3 = 0;
    goto return_label;
  }
  __retres3 = 1;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres3);
  }
}
}
E_list *or_purge_E_list(E_list *l ) 
{ E_list *el ;
  E_list *__retres3 ;
  Exp *__cil_tmp4 ;
  E_list *__cil_tmp5 ;
  E_list *__cil_tmp6 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& el);
  el = 0;
  simple_gc_frame[3] = (void *)(& __retres3);
  __retres3 = 0;
  simple_gc_frame[4] = (void *)(& l);
  if ((unsigned int )l == (unsigned int )((void *)0)) {
    __retres3 = (E_list *)((void *)0);
    goto return_label;
  }
  __cil_tmp4 = purge_Exp(l->e);
  l->e = __cil_tmp4;
  if ((unsigned int )l->e == (unsigned int )((void *)0)) {
    __cil_tmp5 = or_purge_E_list(l->next);
    el = __cil_tmp5;
    __retres3 = el;
    goto return_label;
  }
  __cil_tmp6 = or_purge_E_list(l->next);
  l->next = __cil_tmp6;
  __retres3 = l;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres3);
  }
}
}
int mark_dead_connectors(Exp *e , int dir ) 
{ Connector dummy ;
  int count___0 ;
  E_list *l ;
  int tmp ;
  int tmp___0 ;
  int __cil_tmp8 ;
  int __cil_tmp9 ;
  extern struct gc_tag_struct *__gc_struct_Connector_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;
  void *struct_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  memset(& struct_gc_frame, 0, sizeof(struct_gc_frame));
  struct_gc_frame[0] = (void *)simple_gc_frame;
  struct_gc_frame[1] = (void *)((1 << 2) + 3);
  GC_set_variable_stack1(struct_gc_frame);
  struct_gc_frame[2] = (void *)(& dummy);
  struct_gc_frame[3] = (void *)__gc_struct_Connector_struct_tag;
  struct_gc_frame[4] = 0;
  struct_gc_frame[5] = 0;
  memset(& dummy, 0, sizeof(dummy));
  simple_gc_frame[2] = (void *)(& l);
  l = 0;
  simple_gc_frame[3] = (void *)(& e);
  dummy.label = (short)-1;
  dummy.priority = (char)0;
  count___0 = 0;
  if ((int )e->type == 2) {
    if ((int )e->dir == dir) {
      dummy.string = e->u.string;
      __cil_tmp8 = matches_S(& dummy, dir);
      tmp = __cil_tmp8;
      if (! tmp) {
        e->u.string = (char *)((void *)0);
        GC_autotag_union(& e->u, 1);
        count___0 ++;
      }
    }
  } else {
    l = e->u.l;
    while ((unsigned int )l != (unsigned int )((void *)0)) {
      __cil_tmp9 = mark_dead_connectors(l->e, dir);
      tmp___0 = __cil_tmp9;
      count___0 += tmp___0;
      l = l->next;
    }
  }
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (count___0);
  }
}
}
void insert_connectors(Exp *e , int dir ) 
{ Connector dummy ;
  E_list *l ;
  extern struct gc_tag_struct *__gc_struct_Connector_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;
  void *struct_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  memset(& struct_gc_frame, 0, sizeof(struct_gc_frame));
  struct_gc_frame[0] = (void *)simple_gc_frame;
  struct_gc_frame[1] = (void *)((1 << 2) + 3);
  GC_set_variable_stack1(struct_gc_frame);
  struct_gc_frame[2] = (void *)(& dummy);
  struct_gc_frame[3] = (void *)__gc_struct_Connector_struct_tag;
  struct_gc_frame[4] = 0;
  struct_gc_frame[5] = 0;
  memset(& dummy, 0, sizeof(dummy));
  simple_gc_frame[2] = (void *)(& l);
  l = 0;
  simple_gc_frame[3] = (void *)(& e);
  dummy.label = (short)-1;
  dummy.priority = (char)0;
  if ((int )e->type == 2) {
    if ((int )e->dir == dir) {
      dummy.string = e->u.string;
      insert_S(& dummy);
    }
  } else {
    l = e->u.l;
    while ((unsigned int )l != (unsigned int )((void *)0)) {
      insert_connectors(l->e, dir);
      l = l->next;
    }
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void clean_up_expressions(int w ) 
{ X_node head_node ;
  X_node *d ;
  X_node *d1 ;
  extern struct gc_tag_struct *__gc_struct_X_node_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;
  void *struct_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  memset(& struct_gc_frame, 0, sizeof(struct_gc_frame));
  struct_gc_frame[0] = (void *)simple_gc_frame;
  struct_gc_frame[1] = (void *)((1 << 2) + 3);
  GC_set_variable_stack1(struct_gc_frame);
  struct_gc_frame[2] = (void *)(& head_node);
  struct_gc_frame[3] = (void *)__gc_struct_X_node_struct_tag;
  struct_gc_frame[4] = 0;
  struct_gc_frame[5] = 0;
  memset(& head_node, 0, sizeof(head_node));
  simple_gc_frame[2] = (void *)(& d);
  d = 0;
  simple_gc_frame[3] = (void *)(& d1);
  d1 = 0;
  d = & head_node;
  d->next = sentence[w].x;
  while ((unsigned int )d->next != (unsigned int )((void *)0)) {
    if ((unsigned int )(d->next)->exp == (unsigned int )((void *)0)) {
      d1 = d->next;
      d->next = d1->next;
    } else {
      d = d->next;
    }
  }
  sentence[w].x = head_node.next;

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void expression_prune(void) 
{ int N_deleted ;
  X_node *x ;
  int w ;
  int tmp ;
  void *tmp___0 ;
  int tmp___1 ;
  int tmp___2 ;
  int __cil_tmp8 ;
  int __cil_tmp9 ;
  void *__cil_tmp10 ;
  int __cil_tmp11 ;
  Exp *__cil_tmp12 ;
  int __cil_tmp13 ;
  Exp *__cil_tmp14 ;
  extern struct gc_tag_struct *__gcstandard_array_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& x);
  x = 0;
  simple_gc_frame[3] = (void *)(& tmp___0);
  tmp___0 = 0;
  __cil_tmp8 = size_of_sentence_expressions();
  tmp = __cil_tmp8;
  __cil_tmp9 = next_power_of_two_up(tmp);
  s_table_size = __cil_tmp9;
  __cil_tmp10 = GC_malloc(__gcstandard_array_tag, (int )((unsigned int )s_table_size * sizeof(Connector *)));
  tmp___0 = __cil_tmp10;
  table___0 = (Connector **)tmp___0;
  zero_S();
  N_deleted = 1;
  while (1) {
    w = 0;
    while (w < N_words) {
      x = sentence[w].x;
      while ((unsigned int )x != (unsigned int )((void *)0)) {
        __cil_tmp11 = mark_dead_connectors(x->exp, '-');
        tmp___1 = __cil_tmp11;
        N_deleted += tmp___1;
        x = x->next;
      }
      x = sentence[w].x;
      while ((unsigned int )x != (unsigned int )((void *)0)) {
        __cil_tmp12 = purge_Exp(x->exp);
        x->exp = __cil_tmp12;
        x = x->next;
      }
      clean_up_expressions(w);
      x = sentence[w].x;
      while ((unsigned int )x != (unsigned int )((void *)0)) {
        insert_connectors(x->exp, '+');
        x = x->next;
      }
      w ++;
    }
    if (verbosity > 2) {
      printf((char const   * __restrict  )"l->r pass removed %d\n", N_deleted);
      print_expression_sizes();
    }
    free_S();
    if (N_deleted == 0) {
      break;
    }
    N_deleted = 0;
    w = N_words - 1;
    while (w >= 0) {
      x = sentence[w].x;
      while ((unsigned int )x != (unsigned int )((void *)0)) {
        __cil_tmp13 = mark_dead_connectors(x->exp, '+');
        tmp___2 = __cil_tmp13;
        N_deleted += tmp___2;
        x = x->next;
      }
      x = sentence[w].x;
      while ((unsigned int )x != (unsigned int )((void *)0)) {
        __cil_tmp14 = purge_Exp(x->exp);
        x->exp = __cil_tmp14;
        x = x->next;
      }
      clean_up_expressions(w);
      x = sentence[w].x;
      while ((unsigned int )x != (unsigned int )((void *)0)) {
        insert_connectors(x->exp, '-');
        x = x->next;
      }
      w --;
    }
    if (verbosity > 2) {
      printf((char const   * __restrict  )"r->l pass removed %d\n", N_deleted);
      print_expression_sizes();
    }
    free_S();
    if (N_deleted == 0) {
      break;
    }
    N_deleted = 0;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
static int power_cost  ;
static int power_prune_mode  ;
int left_connector_count(Disjunct *d ) 
{ Connector *c ;
  int i ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& c);
  c = 0;
  simple_gc_frame[3] = (void *)(& d);
  i = 0;
  while ((unsigned int )d != (unsigned int )((void *)0)) {
    c = d->left;
    while ((unsigned int )c != (unsigned int )((void *)0)) {
      i ++;
      c = c->next;
    }
    d = d->next;
  }
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (i);
  }
}
}
int right_connector_count(Disjunct *d ) 
{ Connector *c ;
  int i ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& c);
  c = 0;
  simple_gc_frame[3] = (void *)(& d);
  i = 0;
  while ((unsigned int )d != (unsigned int )((void *)0)) {
    c = d->right;
    while ((unsigned int )c != (unsigned int )((void *)0)) {
      i ++;
      c = c->next;
    }
    d = d->next;
  }
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (i);
  }
}
}
static int l_table_size___0[250]  ;
static int r_table_size___0[250]  ;
static C_list **l_table___0[250]  ;
static C_list **r_table___0[250]  ;
void free_C_list(C_list *t ) 
{ C_list *xt ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& xt);
  xt = 0;
  simple_gc_frame[3] = (void *)(& t);
  while ((unsigned int )t != (unsigned int )((void *)0)) {
    xt = t->next;
    t = xt;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void free_power_tables(void) 
{ int w ;
  int i ;

  {
  w = 0;
  while (w < N_words) {
    i = 0;
    while (i < l_table_size___0[w]) {
      free_C_list(*(l_table___0[w] + i));
      i ++;
    }
    i = 0;
    while (i < r_table_size___0[w]) {
      free_C_list(*(r_table___0[w] + i));
      i ++;
    }
    w ++;
  }

  return;
}
}
int power_hash(Connector *c ) 
{ char *s ;
  int i ;
  unsigned short const   **tmp ;
  unsigned short const   **__cil_tmp5 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& s);
  s = 0;
  simple_gc_frame[3] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[4] = (void *)(& c);
  i = (int )randtable[(int )c->label & 255];
  s = c->string;
  while (1) {
    __cil_tmp5 = __ctype_b_loc();
    tmp = __cil_tmp5;
    if (! ((int const   )*(*tmp + (int )*s) & 256)) {
      break;
    }
    i = (int )((unsigned int )(i + (i << 1)) + randtable[((int )*s + i) & 255]);
    s ++;
  }
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (i);
  }
}
}
void put_into_power_table(int size , C_list **t , Connector *c , int shal ) 
{ int h ;
  C_list *m ;
  int tmp ;
  void *tmp___0 ;
  int __cil_tmp9 ;
  void *__cil_tmp10 ;
  extern struct gc_tag_struct *__gc_struct_c_list_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& m);
  m = 0;
  simple_gc_frame[3] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[4] = (void *)(& t);
  simple_gc_frame[5] = (void *)(& c);
  __cil_tmp9 = power_hash(c);
  tmp = __cil_tmp9;
  h = tmp & (size - 1);
  __cil_tmp10 = GC_malloc(__gc_struct_c_list_struct_tag, (int )sizeof(C_list ));
  tmp___0 = __cil_tmp10;
  m = (C_list *)tmp___0;
  m->next = *(t + h);
  *(t + h) = m;
  m->c = c;
  m->shallow = shal;

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
int set_dist_fields(Connector *c , int w , int delta ) 
{ int i ;
  int tmp ;
  int __retres6 ;
  int __cil_tmp7 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& c);
  if ((unsigned int )c == (unsigned int )((void *)0)) {
    __retres6 = w;
    goto return_label;
  }
  __cil_tmp7 = set_dist_fields(c->next, w, delta);
  tmp = __cil_tmp7;
  i = tmp + delta;
  c->word = (short )i;
  __retres6 = i;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres6);
  }
}
}
void init_power(void) 
{ int w ;
  int len ;
  int size ;
  int i ;
  C_list **t ;
  Disjunct *d ;
  Disjunct *xd ;
  Disjunct *head ;
  Connector *c ;
  int tmp ;
  int tmp___0 ;
  void *tmp___1 ;
  void *tmp___2 ;
  int __cil_tmp14 ;
  int __cil_tmp15 ;
  int __cil_tmp16 ;
  int __cil_tmp17 ;
  void *__cil_tmp18 ;
  int __cil_tmp19 ;
  int __cil_tmp20 ;
  void *__cil_tmp21 ;
  extern struct gc_tag_struct *__gcstandard_array_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[9] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((7 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& t);
  t = 0;
  simple_gc_frame[3] = (void *)(& d);
  d = 0;
  simple_gc_frame[4] = (void *)(& xd);
  xd = 0;
  simple_gc_frame[5] = (void *)(& head);
  head = 0;
  simple_gc_frame[6] = (void *)(& c);
  c = 0;
  simple_gc_frame[7] = (void *)(& tmp___1);
  tmp___1 = 0;
  simple_gc_frame[8] = (void *)(& tmp___2);
  tmp___2 = 0;
  w = 0;
  while (w < N_words) {
    head = (Disjunct *)((void *)0);
    d = sentence[w].d;
    while ((unsigned int )d != (unsigned int )((void *)0)) {
      xd = d->next;
      __cil_tmp14 = set_dist_fields(d->left, w, -1);
      tmp = __cil_tmp14;
      if (tmp < 0) {
        d->next = (Disjunct *)((void *)0);
        free_disjuncts(d);
      } else {
        __cil_tmp15 = set_dist_fields(d->right, w, 1);
        tmp___0 = __cil_tmp15;
        if (tmp___0 >= N_words) {
          d->next = (Disjunct *)((void *)0);
          free_disjuncts(d);
        } else {
          d->next = head;
          head = d;
        }
      }
      d = xd;
    }
    sentence[w].d = head;
    w ++;
  }
  w = 0;
  while (w < N_words) {
    __cil_tmp16 = left_connector_count(sentence[w].d);
    len = __cil_tmp16;
    __cil_tmp17 = next_power_of_two_up(len);
    size = __cil_tmp17;
    l_table_size___0[w] = size;
    __cil_tmp18 = GC_malloc(__gcstandard_array_tag, (int )((unsigned int )size * sizeof(C_list *)));
    tmp___1 = __cil_tmp18;
    l_table___0[w] = (C_list **)tmp___1;
    t = l_table___0[w];
    i = 0;
    while (i < size) {
      *(t + i) = (C_list *)((void *)0);
      i ++;
    }
    d = sentence[w].d;
    while ((unsigned int )d != (unsigned int )((void *)0)) {
      c = d->left;
      if ((unsigned int )c != (unsigned int )((void *)0)) {
        put_into_power_table(size, t, c, 1);
        c = c->next;
        while ((unsigned int )c != (unsigned int )((void *)0)) {
          put_into_power_table(size, t, c, 0);
          c = c->next;
        }
      }
      d = d->next;
    }
    __cil_tmp19 = right_connector_count(sentence[w].d);
    len = __cil_tmp19;
    __cil_tmp20 = next_power_of_two_up(len);
    size = __cil_tmp20;
    r_table_size___0[w] = size;
    __cil_tmp21 = GC_malloc(__gcstandard_array_tag, (int )((unsigned int )size * sizeof(C_list *)));
    tmp___2 = __cil_tmp21;
    r_table___0[w] = (C_list **)tmp___2;
    t = r_table___0[w];
    i = 0;
    while (i < size) {
      *(t + i) = (C_list *)((void *)0);
      i ++;
    }
    d = sentence[w].d;
    while ((unsigned int )d != (unsigned int )((void *)0)) {
      c = d->right;
      if ((unsigned int )c != (unsigned int )((void *)0)) {
        put_into_power_table(size, t, c, 1);
        c = c->next;
        while ((unsigned int )c != (unsigned int )((void *)0)) {
          put_into_power_table(size, t, c, 0);
          c = c->next;
        }
      }
      d = d->next;
    }
    w ++;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void clean_table(int size , C_list **t ) 
{ int i ;
  C_list *m ;
  C_list *xm ;
  C_list *head ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& m);
  m = 0;
  simple_gc_frame[3] = (void *)(& xm);
  xm = 0;
  simple_gc_frame[4] = (void *)(& head);
  head = 0;
  simple_gc_frame[5] = (void *)(& t);
  i = 0;
  while (i < size) {
    head = (C_list *)((void *)0);
    m = *(t + i);
    while ((unsigned int )m != (unsigned int )((void *)0)) {
      xm = m->next;
      if ((int )(m->c)->word != 251) {
        m->next = head;
        head = m;
      } else {
      }
      m = xm;
    }
    *(t + i) = head;
    i ++;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
int possible_connection(Connector *lc , Connector *rc , int lshallow , int rshallow ,
                        int lword , int rword ) 
{ int tmp ;
  int tmp___0 ;
  int __retres9 ;
  int __cil_tmp10 ;
  int __cil_tmp11 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& lc);
  simple_gc_frame[3] = (void *)(& rc);
  if (! lshallow) {
    if (! rshallow) {
      __retres9 = 0;
      goto return_label;
    }
  }
  if ((int )lc->word > rword) {
    __retres9 = 0;
    goto return_label;
  } else {
    if ((int )rc->word < lword) {
      __retres9 = 0;
      goto return_label;
    }
  }
  if (power_prune_mode == 0) {
    if (lword == rword - 1) {
      if ((unsigned int )lc->next == (unsigned int )((void *)0)) {
        if (! ((unsigned int )rc->next == (unsigned int )((void *)0))) {
          __retres9 = 0;
          goto return_label;
        }
      } else {
        __retres9 = 0;
        goto return_label;
      }
    } else {
      if (! null_links) {
        if ((unsigned int )lc->next == (unsigned int )((void *)0)) {
          if ((unsigned int )rc->next == (unsigned int )((void *)0)) {
            if (! lc->multi) {
              if (! rc->multi) {
                __retres9 = 0;
                goto return_label;
              }
            }
          }
        }
      }
    }
    __cil_tmp10 = match(lc, rc);
    tmp = __cil_tmp10;
    __retres9 = tmp;
    goto return_label;
  } else {
    if (lword == rword - 1) {
      if ((unsigned int )lc->next == (unsigned int )((void *)0)) {
        if (! ((unsigned int )rc->next == (unsigned int )((void *)0))) {
          __retres9 = 0;
          goto return_label;
        }
      } else {
        __retres9 = 0;
        goto return_label;
      }
    } else {
      if (! null_links) {
        if ((unsigned int )lc->next == (unsigned int )((void *)0)) {
          if ((unsigned int )rc->next == (unsigned int )((void *)0)) {
            if (! lc->multi) {
              if (! rc->multi) {
                if (! *(deletable[lword] + rword)) {
                  __retres9 = 0;
                  goto return_label;
                }
              }
            }
          }
        }
      }
    }
    __cil_tmp11 = prune_match(lc, rc);
    tmp___0 = __cil_tmp11;
    __retres9 = tmp___0;
    goto return_label;
  }
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres9);
  }
}
}
int right_table_search(int w , Connector *c , int shallow , int word_c ) 
{ int size ;
  int h ;
  C_list *cl ;
  int tmp ;
  int tmp___0 ;
  int __retres10 ;
  int __cil_tmp11 ;
  int __cil_tmp12 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& cl);
  cl = 0;
  simple_gc_frame[3] = (void *)(& c);
  size = r_table_size___0[w];
  __cil_tmp11 = power_hash(c);
  tmp = __cil_tmp11;
  h = tmp & (size - 1);
  cl = *(r_table___0[w] + h);
  while ((unsigned int )cl != (unsigned int )((void *)0)) {
    __cil_tmp12 = possible_connection(cl->c, c, cl->shallow, shallow, w, word_c);
    tmp___0 = __cil_tmp12;
    if (tmp___0) {
      __retres10 = 1;
      goto return_label;
    }
    cl = cl->next;
  }
  __retres10 = 0;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres10);
  }
}
}
int left_table_search(int w , Connector *c , int shallow , int word_c ) 
{ int size ;
  int h ;
  C_list *cl ;
  int tmp ;
  int tmp___0 ;
  int __retres10 ;
  int __cil_tmp11 ;
  int __cil_tmp12 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& cl);
  cl = 0;
  simple_gc_frame[3] = (void *)(& c);
  size = l_table_size___0[w];
  __cil_tmp11 = power_hash(c);
  tmp = __cil_tmp11;
  h = tmp & (size - 1);
  cl = *(l_table___0[w] + h);
  while ((unsigned int )cl != (unsigned int )((void *)0)) {
    __cil_tmp12 = possible_connection(c, cl->c, shallow, cl->shallow, word_c, w);
    tmp___0 = __cil_tmp12;
    if (tmp___0) {
      __retres10 = 1;
      goto return_label;
    }
    cl = cl->next;
  }
  __retres10 = 0;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres10);
  }
}
}
static int N_changed  ;
int ok_cwords(Connector *c ) 
{ int __retres2 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& c);
  while ((unsigned int )c != (unsigned int )((void *)0)) {
    if ((int )c->word == 251) {
      __retres2 = 0;
      goto return_label;
    }
    if ((int )c->word >= N_words) {
      __retres2 = 0;
      goto return_label;
    }
    c = c->next;
  }
  __retres2 = 1;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres2);
  }
}
}
int left_connector_list_update(Connector *c , int word_c , int w , int shallow ) 
{ int n ;
  int foundmatch ;
  int tmp ;
  int tmp___0 ;
  int tmp___1 ;
  int __retres10 ;
  int __cil_tmp11 ;
  int __cil_tmp12 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& c);
  if ((unsigned int )c == (unsigned int )((void *)0)) {
    __retres10 = w;
    goto return_label;
  }
  __cil_tmp11 = left_connector_list_update(c->next, word_c, w, 0);
  tmp = __cil_tmp11;
  n = tmp - 1;
  if ((int )c->word < n) {
    n = (int )c->word;
  }
  foundmatch = 0;
  while (1) {
    if (n >= 0) {
      if (! (w - n <= maxlinklength)) {
        break;
      }
    } else {
      break;
    }
    power_cost ++;
    __cil_tmp12 = right_table_search(n, c, shallow, word_c);
    tmp___0 = __cil_tmp12;
    if (tmp___0) {
      foundmatch = 1;
      break;
    }
    n --;
  }
  if (n < (int )c->word) {
    c->word = (short )n;
    N_changed ++;
  }
  if (foundmatch) {
    tmp___1 = n;
  } else {
    tmp___1 = -1;
  }
  __retres10 = tmp___1;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres10);
  }
}
}
int right_connector_list_update(Connector *c , int word_c , int w , int shallow ) 
{ int n ;
  int foundmatch ;
  int tmp ;
  int tmp___0 ;
  int tmp___1 ;
  int __retres10 ;
  int __cil_tmp11 ;
  int __cil_tmp12 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& c);
  if ((unsigned int )c == (unsigned int )((void *)0)) {
    __retres10 = w;
    goto return_label;
  }
  __cil_tmp11 = right_connector_list_update(c->next, word_c, w, 0);
  tmp = __cil_tmp11;
  n = tmp + 1;
  if ((int )c->word > n) {
    n = (int )c->word;
  }
  foundmatch = 0;
  while (1) {
    if (n < N_words) {
      if (! (n - w <= maxlinklength)) {
        break;
      }
    } else {
      break;
    }
    power_cost ++;
    __cil_tmp12 = left_table_search(n, c, shallow, word_c);
    tmp___0 = __cil_tmp12;
    if (tmp___0) {
      foundmatch = 1;
      break;
    }
    n ++;
  }
  if (n > (int )c->word) {
    c->word = (short )n;
    N_changed ++;
  }
  if (foundmatch) {
    tmp___1 = n;
  } else {
    tmp___1 = N_words;
  }
  __retres10 = tmp___1;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres10);
  }
}
}
void power_prune(int mode ) 
{ Disjunct *d ;
  Disjunct *free_later ;
  Disjunct *dx ;
  Disjunct *nd ;
  Connector *c ;
  int w ;
  int N_deleted ;
  int tmp ;
  int tmp___0 ;
  int __cil_tmp11 ;
  int __cil_tmp12 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[7] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((5 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& d);
  d = 0;
  simple_gc_frame[3] = (void *)(& free_later);
  free_later = 0;
  simple_gc_frame[4] = (void *)(& dx);
  dx = 0;
  simple_gc_frame[5] = (void *)(& nd);
  nd = 0;
  simple_gc_frame[6] = (void *)(& c);
  c = 0;
  power_prune_mode = mode;
  init_power();
  power_cost = 0;
  free_later = (Disjunct *)((void *)0);
  N_changed = 1;
  N_deleted = 0;
  while (1) {
    w = 0;
    while (w < N_words) {
      d = sentence[w].d;
      while ((unsigned int )d != (unsigned int )((void *)0)) {
        if ((unsigned int )d->left == (unsigned int )((void *)0)) {
          goto __Cont;
        }
        __cil_tmp11 = left_connector_list_update(d->left, w, w, 1);
        tmp = __cil_tmp11;
        if (tmp < 0) {
          c = d->left;
          while ((unsigned int )c != (unsigned int )((void *)0)) {
            c->word = (short)251;
            c = c->next;
          }
          c = d->right;
          while ((unsigned int )c != (unsigned int )((void *)0)) {
            c->word = (short)251;
            c = c->next;
          }
          N_deleted ++;
        }
        __Cont: 
        d = d->next;
      }
      clean_table(r_table_size___0[w], r_table___0[w]);
      nd = (Disjunct *)((void *)0);
      d = sentence[w].d;
      while ((unsigned int )d != (unsigned int )((void *)0)) {
        dx = d->next;
        if ((unsigned int )d->left != (unsigned int )((void *)0)) {
          if ((int )(d->left)->word == 251) {
            d->next = free_later;
            free_later = d;
          } else {
            d->next = nd;
            nd = d;
          }
        } else {
          d->next = nd;
          nd = d;
        }
        d = dx;
      }
      sentence[w].d = nd;
      w ++;
    }
    if (verbosity > 2) {
      printf((char const   * __restrict  )"l->r pass changed %d and deleted %d\n",
             N_changed, N_deleted);
    }
    if (N_changed == 0) {
      break;
    }
    N_deleted = 0;
    N_changed = N_deleted;
    w = N_words - 1;
    while (w >= 0) {
      d = sentence[w].d;
      while ((unsigned int )d != (unsigned int )((void *)0)) {
        if ((unsigned int )d->right == (unsigned int )((void *)0)) {
          goto __Cont___0;
        }
        __cil_tmp12 = right_connector_list_update(d->right, w, w, 1);
        tmp___0 = __cil_tmp12;
        if (tmp___0 >= N_words) {
          c = d->right;
          while ((unsigned int )c != (unsigned int )((void *)0)) {
            c->word = (short)251;
            c = c->next;
          }
          c = d->left;
          while ((unsigned int )c != (unsigned int )((void *)0)) {
            c->word = (short)251;
            c = c->next;
          }
          N_deleted ++;
        }
        __Cont___0: 
        d = d->next;
      }
      clean_table(l_table_size___0[w], l_table___0[w]);
      nd = (Disjunct *)((void *)0);
      d = sentence[w].d;
      while ((unsigned int )d != (unsigned int )((void *)0)) {
        dx = d->next;
        if ((unsigned int )d->right != (unsigned int )((void *)0)) {
          if ((int )(d->right)->word == 251) {
            d->next = free_later;
            free_later = d;
          } else {
            d->next = nd;
            nd = d;
          }
        } else {
          d->next = nd;
          nd = d;
        }
        d = dx;
      }
      sentence[w].d = nd;
      w --;
    }
    if (verbosity > 2) {
      printf((char const   * __restrict  )"r->l pass changed %d and deleted %d\n",
             N_changed, N_deleted);
    }
    if (N_changed == 0) {
      break;
    }
    N_deleted = 0;
    N_changed = N_deleted;
  }
  free_disjuncts(free_later);
  free_power_tables();
  if (verbosity > 2) {
    printf((char const   * __restrict  )"%d power prune cost:\n", power_cost);
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
#pragma merger(0,"merge/read-dict.i","")
extern FILE *fopen(char const   * __restrict  __filename , char const   * __restrict  __modes ) ;
extern int fgetc(FILE *__stream ) ;
extern  __attribute__((__nothrow__)) char *strrchr(char const   *__s , int __c )  __attribute__((__pure__,
__nonnull__(1))) ;
void print_dictionary_data(void) ;
void print_expression(Exp *n ) ;
int boolean_abridged_lookup(char *s ) ;
Dict_node *read_word_file(Dict_node *dn , char *filename ) ;
int N_dict  =    0;
Dict_node *dict_root  =    (Dict_node *)((void *)0);
static char token[50]  ;
static int is_special  ;
int line_number  =    1;
static FILE *dict_file  ;
void advance(void) ;
void error(char *s ) 
{ int i ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& s);
  printf((char const   * __restrict  )"\nError in dictionary file: %s\n", s);
  printf((char const   * __restrict  )"line %d, tokens = ", line_number);
  i = 0;
  while (1) {
    if (i < 5) {
      if (! ((int )token[0] != 0)) {
        break;
      }
    } else {
      break;
    }
    printf((char const   * __restrict  )" \"%s\"", token);
    advance();
    i ++;
  }
  printf((char const   * __restrict  )"\n");
  exit(1);
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void warning(char *s ) 
{ void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& s);
  printf((char const   * __restrict  )"\nWarning: %s\n", s);
  printf((char const   * __restrict  )"line %d, current token = \"%s\"\n", line_number,
         token);

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
int get_character(int quote_mode ) 
{ int c ;
  int __cil_tmp3 ;
  int __cil_tmp4 ;

  {
  __cil_tmp3 = fgetc(dict_file);
  c = __cil_tmp3;
  if (c == 37) {
    if (! quote_mode) {
      while (1) {
        if (c != -1) {
          if (! (c != 10)) {
            break;
          }
        } else {
          break;
        }
        __cil_tmp4 = fgetc(dict_file);
        c = __cil_tmp4;
      }
    }
  }
  if (c == 10) {
    line_number ++;
  }
  return (c);
}
}
static int already_got_it  =    '\000';
void advance(void) 
{ int c ;
  int i ;
  int quote_mode ;
  char *tmp ;
  unsigned short const   **tmp___0 ;
  unsigned short const   **tmp___1 ;
  char *tmp___2 ;
  unsigned short const   **tmp___3 ;
  char *__cil_tmp9 ;
  int __cil_tmp10 ;
  unsigned short const   **__cil_tmp11 ;
  unsigned short const   **__cil_tmp12 ;
  char *__cil_tmp13 ;
  unsigned short const   **__cil_tmp14 ;
  int __cil_tmp15 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[7] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((5 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[3] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[4] = (void *)(& tmp___1);
  tmp___1 = 0;
  simple_gc_frame[5] = (void *)(& tmp___2);
  tmp___2 = 0;
  simple_gc_frame[6] = (void *)(& tmp___3);
  tmp___3 = 0;
  is_special = 0;
  if (already_got_it != 0) {
    __cil_tmp9 = strchr("(){};[]&|:", already_got_it);
    tmp = __cil_tmp9;
    is_special = (unsigned int )tmp != (unsigned int )((void *)0);
    if (already_got_it == -1) {
      token[0] = (char )'\000';
    } else {
      token[0] = (char )already_got_it;
      token[1] = (char )'\000';
    }
    already_got_it = '\000';

    goto return_label;
  }
  while (1) {
    __cil_tmp10 = get_character(0);
    c = __cil_tmp10;
    __cil_tmp11 = __ctype_b_loc();
    tmp___0 = __cil_tmp11;
    if (! ((int const   )*(*tmp___0 + c) & 8192)) {
      break;
    }
  }
  quote_mode = 0;
  i = 0;
  while (1) {
    if (i > 49) {
      error((char *)"Token too long");

      goto return_label;
    }
    if (quote_mode) {
      if (c == 34) {
        quote_mode = 0;
        token[i] = (char )'\000';

        goto return_label;
      }
      __cil_tmp12 = __ctype_b_loc();
      tmp___1 = __cil_tmp12;
      if ((int const   )*(*tmp___1 + c) & 8192) {
        error((char *)"White space inside of token");

        goto return_label;
      }
      token[i] = (char )c;
      i ++;
    } else {
      __cil_tmp13 = strchr("(){};[]&|:", c);
      tmp___2 = __cil_tmp13;
      if ((unsigned int )tmp___2 != (unsigned int )((void *)0)) {
        if (i == 0) {
          token[0] = (char )c;
          token[1] = (char )'\000';
          is_special = 1;

          goto return_label;
        }
        token[i] = (char )'\000';
        already_got_it = c;

        goto return_label;
      }
      if (c == -1) {
        if (i == 0) {
          token[0] = (char )'\000';

          goto return_label;
        }
        token[i] = (char )'\000';
        already_got_it = c;

        goto return_label;
      }
      __cil_tmp14 = __ctype_b_loc();
      tmp___3 = __cil_tmp14;
      if ((int const   )*(*tmp___3 + c) & 8192) {
        token[i] = (char )'\000';

        goto return_label;
      }
      if (c == 34) {
        quote_mode = 1;
      } else {
        token[i] = (char )c;
        i ++;
      }
    }
    __cil_tmp15 = get_character(quote_mode);
    c = __cil_tmp15;
  }
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
int is_equal(int c ) 
{ int tmp ;

  {
  if (is_special) {
    if (c == (int )token[0]) {
      if ((int )token[1] == 0) {
        tmp = 1;
      } else {
        tmp = 0;
      }
    } else {
      tmp = 0;
    }
  } else {
    tmp = 0;
  }
  return (tmp);
}
}
char *copy_string(char *str ) 
{ char *s ;
  size_t tmp ;
  void *tmp___0 ;
  size_t __cil_tmp5 ;
  void *__cil_tmp6 ;
  extern struct gc_tag_struct *__gcstandard_atomic_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& s);
  s = 0;
  simple_gc_frame[3] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[4] = (void *)(& str);
  __cil_tmp5 = strlen((char const   *)str);
  tmp = __cil_tmp5;
  __cil_tmp6 = GC_malloc(__gcstandard_atomic_tag, (int )(tmp + 1U));
  tmp___0 = __cil_tmp6;
  s = (char *)tmp___0;
  strcpy((char * __restrict  )s, (char const   * __restrict  )str);
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (s);
  }
}
}
void check_connector(char *s ) 
{ int i ;
  size_t tmp ;
  unsigned short const   **tmp___0 ;
  unsigned short const   **tmp___1 ;
  size_t __cil_tmp6 ;
  unsigned short const   **__cil_tmp7 ;
  unsigned short const   **__cil_tmp8 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[3] = (void *)(& tmp___1);
  tmp___1 = 0;
  simple_gc_frame[4] = (void *)(& s);
  __cil_tmp6 = strlen((char const   *)s);
  tmp = __cil_tmp6;
  i = (int )tmp;
  if (i < 1) {
    error((char *)"Expecting a connector.");
  }
  i = (int )*(s + (i - 1));
  if (i != 43) {
    if (i != 45) {
      error((char *)"A connector must end in a \"+\" or \"-\".");
    }
  }
  if ((int )*s == 64) {
    s ++;
  }
  __cil_tmp7 = __ctype_b_loc();
  tmp___0 = __cil_tmp7;
  if (! ((int const   )*(*tmp___0 + (int )*s) & 256)) {
    error((char *)"The first letter of a connector must be in [A--Z].");
  }
  if ((int )*s == 73) {
    if ((int )*(s + 1) == 68) {
      error((char *)"Connectors beginning with \"ID\" are forbidden");
    }
  }
  while (*(s + 1)) {
    __cil_tmp8 = __ctype_b_loc();
    tmp___1 = __cil_tmp8;
    if (! ((int const   )*(*tmp___1 + (int )*s) & 8)) {
      if ((int )*s != 42) {
        if ((int )*s != 94) {
          error((char *)"All letters of a connector must be alpha-numeric.");
        }
      }
    }
    s ++;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
Exp *make_unary_node(Exp *e ) ;
Exp *connector(void) 
{ Exp *n ;
  Dict_node *dn ;
  int i ;
  size_t tmp ;
  int tmp___0 ;
  void *tmp___1 ;
  size_t __cil_tmp7 ;
  Dict_node *__cil_tmp8 ;
  int __cil_tmp9 ;
  Exp *__cil_tmp10 ;
  void *__cil_tmp11 ;
  char *__cil_tmp12 ;
  char *__cil_tmp13 ;
  extern struct gc_tag_struct *__gc_struct_Exp_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& n);
  n = 0;
  simple_gc_frame[3] = (void *)(& dn);
  dn = 0;
  simple_gc_frame[4] = (void *)(& tmp___1);
  tmp___1 = 0;
  __cil_tmp7 = strlen((char const   *)(token));
  tmp = __cil_tmp7;
  i = (int )(tmp - 1U);
  if ((int )token[i] != 43) {
    if ((int )token[i] != 45) {
      __cil_tmp8 = abridged_lookup(token);
      dn = __cil_tmp8;
      while (1) {
        if ((unsigned int )dn != (unsigned int )((void *)0)) {
          __cil_tmp9 = strcmp((char const   *)dn->string, (char const   *)(token));
          tmp___0 = __cil_tmp9;
          if (! (tmp___0 != 0)) {
            break;
          }
        } else {
          break;
        }
        dn = dn->right;
      }
      if ((unsigned int )dn == (unsigned int )((void *)0)) {
        printf((char const   * __restrict  )"\nPerhaps missing + or - in a connector.\n");
        printf((char const   * __restrict  )"Or perhaps you forgot the suffix on a word.\n");
        error((char *)"Or perhaps a word is used before it is defined\n");
      }
      __cil_tmp10 = make_unary_node(dn->exp);
      n = __cil_tmp10;
    } else {
      goto _L;
    }
  } else {
    _L: 
    check_connector(token);
    __cil_tmp11 = GC_malloc(__gc_struct_Exp_struct_tag, (int )sizeof(Exp ));
    tmp___1 = __cil_tmp11;
    n = (Exp *)tmp___1;
    n->dir = token[i];
    token[i] = (char )'\000';
    if ((int )token[0] == 64) {
      __cil_tmp12 = copy_string(token + 1);
      n->u.string = __cil_tmp12;
      GC_autotag_union(& n->u, 1);
      n->multi = (char)1;
    } else {
      __cil_tmp13 = copy_string(token);
      n->u.string = __cil_tmp13;
      GC_autotag_union(& n->u, 1);
      n->multi = (char)0;
    }
    n->type = (char)2;
    n->cost = (unsigned char)0;
  }
  advance();
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (n);
  }
}
}
Exp *make_unary_node(Exp *e ) 
{ Exp *n ;
  void *tmp ;
  void *tmp___0 ;
  void *__cil_tmp5 ;
  void *__cil_tmp6 ;
  extern struct gc_tag_struct *__gc_struct_E_list_struct_tag ;
  extern struct gc_tag_struct *__gc_struct_Exp_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& n);
  n = 0;
  simple_gc_frame[3] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[4] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[5] = (void *)(& e);
  __cil_tmp5 = GC_malloc(__gc_struct_Exp_struct_tag, (int )sizeof(Exp ));
  tmp = __cil_tmp5;
  n = (Exp *)tmp;
  n->type = (char)1;
  n->cost = (unsigned char)0;
  __cil_tmp6 = GC_malloc(__gc_struct_E_list_struct_tag, (int )sizeof(E_list ));
  tmp___0 = __cil_tmp6;
  n->u.l = (E_list *)tmp___0;
  GC_autotag_union(& n->u, 0);
  (n->u.l)->next = (E_list *)((void *)0);
  GC_autotag_union(& n->u, 0);
  (n->u.l)->e = e;
  GC_autotag_union(& n->u, 0);
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (n);
  }
}
}
Exp *make_zeroary_node(void) 
{ Exp *n ;
  void *tmp ;
  void *__cil_tmp3 ;
  extern struct gc_tag_struct *__gc_struct_Exp_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& n);
  n = 0;
  simple_gc_frame[3] = (void *)(& tmp);
  tmp = 0;
  __cil_tmp3 = GC_malloc(__gc_struct_Exp_struct_tag, (int )sizeof(Exp ));
  tmp = __cil_tmp3;
  n = (Exp *)tmp;
  n->type = (char)1;
  n->cost = (unsigned char)0;
  n->u.l = (E_list *)((void *)0);
  GC_autotag_union(& n->u, 0);
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (n);
  }
}
}
Exp *make_optional_node(Exp *e ) 
{ Exp *n ;
  E_list *el ;
  E_list *elx ;
  void *tmp ;
  void *tmp___0 ;
  void *tmp___1 ;
  void *__cil_tmp8 ;
  void *__cil_tmp9 ;
  Exp *__cil_tmp10 ;
  void *__cil_tmp11 ;
  extern struct gc_tag_struct *__gc_struct_E_list_struct_tag ;
  extern struct gc_tag_struct *__gc_struct_Exp_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[9] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((7 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& n);
  n = 0;
  simple_gc_frame[3] = (void *)(& el);
  el = 0;
  simple_gc_frame[4] = (void *)(& elx);
  elx = 0;
  simple_gc_frame[5] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[6] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[7] = (void *)(& tmp___1);
  tmp___1 = 0;
  simple_gc_frame[8] = (void *)(& e);
  __cil_tmp8 = GC_malloc(__gc_struct_Exp_struct_tag, (int )sizeof(Exp ));
  tmp = __cil_tmp8;
  n = (Exp *)tmp;
  n->type = (char)0;
  n->cost = (unsigned char)0;
  __cil_tmp9 = GC_malloc(__gc_struct_E_list_struct_tag, (int )sizeof(E_list ));
  tmp___0 = __cil_tmp9;
  el = (E_list *)tmp___0;
  n->u.l = el;
  GC_autotag_union(& n->u, 0);
  __cil_tmp10 = make_zeroary_node();
  el->e = __cil_tmp10;
  __cil_tmp11 = GC_malloc(__gc_struct_E_list_struct_tag, (int )sizeof(E_list ));
  tmp___1 = __cil_tmp11;
  elx = (E_list *)tmp___1;
  el->next = elx;
  elx->next = (E_list *)((void *)0);
  elx->e = e;
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (n);
  }
}
}
Exp *expression(void) ;
Exp *restricted_expression(int and_ok , int or_ok ) ;
Exp *expression(void) 
{ Exp *tmp ;
  Exp *__cil_tmp2 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& tmp);
  tmp = 0;
  __cil_tmp2 = restricted_expression(1, 1);
  tmp = __cil_tmp2;
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (tmp);
  }
}
}
Exp *restricted_expression(int and_ok , int or_ok ) 
{ Exp *nl ;
  Exp *nr ;
  Exp *n ;
  E_list *ell ;
  E_list *elr ;
  int tmp ;
  int tmp___0 ;
  int tmp___1 ;
  int tmp___2 ;
  int tmp___3 ;
  int tmp___4 ;
  int tmp___5 ;
  int tmp___6 ;
  void *tmp___7 ;
  void *tmp___8 ;
  void *tmp___9 ;
  void *tmp___10 ;
  void *tmp___11 ;
  void *tmp___12 ;
  int tmp___13 ;
  int tmp___14 ;
  int tmp___15 ;
  int tmp___16 ;
  Exp *__retres26 ;
  int __cil_tmp27 ;
  Exp *__cil_tmp28 ;
  int __cil_tmp29 ;
  int __cil_tmp30 ;
  Exp *__cil_tmp31 ;
  int __cil_tmp32 ;
  Exp *__cil_tmp33 ;
  int __cil_tmp34 ;
  Exp *__cil_tmp35 ;
  int __cil_tmp36 ;
  Exp *__cil_tmp37 ;
  int __cil_tmp38 ;
  Exp *__cil_tmp39 ;
  int __cil_tmp40 ;
  Exp *__cil_tmp41 ;
  int __cil_tmp42 ;
  int __cil_tmp43 ;
  Exp *__cil_tmp44 ;
  void *__cil_tmp45 ;
  void *__cil_tmp46 ;
  void *__cil_tmp47 ;
  int __cil_tmp48 ;
  int __cil_tmp49 ;
  Exp *__cil_tmp50 ;
  void *__cil_tmp51 ;
  void *__cil_tmp52 ;
  void *__cil_tmp53 ;
  extern struct gc_tag_struct *__gc_struct_E_list_struct_tag ;
  extern struct gc_tag_struct *__gc_struct_Exp_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[14] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((12 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& nl);
  nl = 0;
  simple_gc_frame[3] = (void *)(& nr);
  nr = 0;
  simple_gc_frame[4] = (void *)(& n);
  n = 0;
  simple_gc_frame[5] = (void *)(& ell);
  ell = 0;
  simple_gc_frame[6] = (void *)(& elr);
  elr = 0;
  simple_gc_frame[7] = (void *)(& tmp___7);
  tmp___7 = 0;
  simple_gc_frame[8] = (void *)(& tmp___8);
  tmp___8 = 0;
  simple_gc_frame[9] = (void *)(& tmp___9);
  tmp___9 = 0;
  simple_gc_frame[10] = (void *)(& tmp___10);
  tmp___10 = 0;
  simple_gc_frame[11] = (void *)(& tmp___11);
  tmp___11 = 0;
  simple_gc_frame[12] = (void *)(& tmp___12);
  tmp___12 = 0;
  simple_gc_frame[13] = (void *)(& __retres26);
  __retres26 = 0;
  nl = (Exp *)((void *)0);
  __cil_tmp27 = is_equal('(');
  tmp___6 = __cil_tmp27;
  if (tmp___6) {
    advance();
    __cil_tmp28 = expression();
    nl = __cil_tmp28;
    __cil_tmp29 = is_equal(')');
    tmp = __cil_tmp29;
    if (! tmp) {
      error((char *)"Expecting a \")\".");
    }
    advance();
  } else {
    __cil_tmp30 = is_equal('{');
    tmp___5 = __cil_tmp30;
    if (tmp___5) {
      advance();
      __cil_tmp31 = expression();
      nl = __cil_tmp31;
      __cil_tmp32 = is_equal('}');
      tmp___0 = __cil_tmp32;
      if (! tmp___0) {
        error((char *)"Expecting a \"}\".");
      }
      advance();
      __cil_tmp33 = make_optional_node(nl);
      nl = __cil_tmp33;
    } else {
      __cil_tmp34 = is_equal('[');
      tmp___4 = __cil_tmp34;
      if (tmp___4) {
        advance();
        __cil_tmp35 = expression();
        nl = __cil_tmp35;
        __cil_tmp36 = is_equal(']');
        tmp___1 = __cil_tmp36;
        if (! tmp___1) {
          error((char *)"Expecting a \"]\".");
        }
        advance();
        nl->cost = (unsigned char )((int )nl->cost + 1);
      } else {
        if (! is_special) {
          __cil_tmp37 = connector();
          nl = __cil_tmp37;
        } else {
          __cil_tmp38 = is_equal(')');
          tmp___2 = __cil_tmp38;
          if (tmp___2) {
            __cil_tmp39 = make_zeroary_node();
            nl = __cil_tmp39;
          } else {
            __cil_tmp40 = is_equal(']');
            tmp___3 = __cil_tmp40;
            if (tmp___3) {
              __cil_tmp41 = make_zeroary_node();
              nl = __cil_tmp41;
            } else {
              error((char *)"Connector, \"(\", \"[\", or \"{\" expected.");
            }
          }
        }
      }
    }
  }
  __cil_tmp42 = is_equal('&');
  tmp___15 = __cil_tmp42;
  if (tmp___15) {
    goto _L___0;
  } else {
    __cil_tmp43 = strcmp((char const   *)(token), "and");
    tmp___16 = __cil_tmp43;
    if (tmp___16 == 0) {
      _L___0: 
      if (! and_ok) {
        warning((char *)"\"and\" and \"or\" at the same level in an expression");
      }
      advance();
      __cil_tmp44 = restricted_expression(1, 0);
      nr = __cil_tmp44;
      __cil_tmp45 = GC_malloc(__gc_struct_Exp_struct_tag, (int )sizeof(Exp ));
      tmp___7 = __cil_tmp45;
      n = (Exp *)tmp___7;
      __cil_tmp46 = GC_malloc(__gc_struct_E_list_struct_tag, (int )sizeof(E_list ));
      tmp___8 = __cil_tmp46;
      ell = (E_list *)tmp___8;
      n->u.l = ell;
      GC_autotag_union(& n->u, 0);
      __cil_tmp47 = GC_malloc(__gc_struct_E_list_struct_tag, (int )sizeof(E_list ));
      tmp___9 = __cil_tmp47;
      elr = (E_list *)tmp___9;
      ell->next = elr;
      elr->next = (E_list *)((void *)0);
      ell->e = nl;
      elr->e = nr;
      n->type = (char)1;
      n->cost = (unsigned char)0;
    } else {
      __cil_tmp48 = is_equal('|');
      tmp___13 = __cil_tmp48;
      if (tmp___13) {
        goto _L;
      } else {
        __cil_tmp49 = strcmp((char const   *)(token), "or");
        tmp___14 = __cil_tmp49;
        if (tmp___14 == 0) {
          _L: 
          if (! or_ok) {
            warning((char *)"\"and\" and \"or\" at the same level in an expression");
          }
          advance();
          __cil_tmp50 = restricted_expression(0, 1);
          nr = __cil_tmp50;
          __cil_tmp51 = GC_malloc(__gc_struct_Exp_struct_tag, (int )sizeof(Exp ));
          tmp___10 = __cil_tmp51;
          n = (Exp *)tmp___10;
          __cil_tmp52 = GC_malloc(__gc_struct_E_list_struct_tag, (int )sizeof(E_list ));
          tmp___11 = __cil_tmp52;
          ell = (E_list *)tmp___11;
          n->u.l = ell;
          GC_autotag_union(& n->u, 0);
          __cil_tmp53 = GC_malloc(__gc_struct_E_list_struct_tag, (int )sizeof(E_list ));
          tmp___12 = __cil_tmp53;
          elr = (E_list *)tmp___12;
          ell->next = elr;
          elr->next = (E_list *)((void *)0);
          ell->e = nl;
          elr->e = nr;
          n->type = (char)0;
          n->cost = (unsigned char)0;
        } else {
          __retres26 = nl;
          goto return_label;
        }
      }
    }
  }
  __retres26 = n;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres26);
  }
}
}
int dict_compare(char *s , char *t ) 
{ int tmp ;
  int tmp___0 ;
  int __retres5 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& s);
  simple_gc_frame[3] = (void *)(& t);
  while (1) {
    if ((int )*s != 0) {
      if (! ((int )*s == (int )*t)) {
        break;
      }
    } else {
      break;
    }
    s ++;
    t ++;
  }
  if ((int )*s == 46) {
    tmp = 1;
  } else {
    tmp = (int )*s << 1;
  }
  if ((int )*t == 46) {
    tmp___0 = 1;
  } else {
    tmp___0 = (int )*t << 1;
  }
  __retres5 = tmp - tmp___0;
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres5);
  }
}
}
Dict_node *insert_dict(Dict_node *n , Dict_node *new ) 
{ int comp ;
  Dict_node *__retres4 ;
  int __cil_tmp5 ;
  Dict_node *__cil_tmp6 ;
  Dict_node *__cil_tmp7 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& __retres4);
  __retres4 = 0;
  simple_gc_frame[3] = (void *)(& n);
  simple_gc_frame[4] = (void *)(& new);
  if ((unsigned int )n == (unsigned int )((void *)0)) {
    __retres4 = new;
    goto return_label;
  }
  __cil_tmp5 = dict_compare(new->string, n->string);
  comp = __cil_tmp5;
  if (comp < 0) {
    __cil_tmp6 = insert_dict(n->left, new);
    n->left = __cil_tmp6;
  } else {
    if (comp > 0) {
      __cil_tmp7 = insert_dict(n->right, new);
      n->right = __cil_tmp7;
    } else {
      printf((char const   * __restrict  )"\"%s\"\n", new->string);
      error((char *)"The word shown above has been multiply defined");
    }
  }
  __retres4 = n;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres4);
  }
}
}
void insert_list(Dict_node *p , int l ) 
{ Dict_node *dn ;
  Dict_node *dnx ;
  Dict_node *dn_second_half ;
  int k ;
  int i ;
  int tmp ;
  int tmp___0 ;
  int __cil_tmp10 ;
  int __cil_tmp11 ;
  Dict_node *__cil_tmp12 ;
  Dict_node *__cil_tmp13 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& dn);
  dn = 0;
  simple_gc_frame[3] = (void *)(& dnx);
  dnx = 0;
  simple_gc_frame[4] = (void *)(& dn_second_half);
  dn_second_half = 0;
  simple_gc_frame[5] = (void *)(& p);
  if (l == 0) {

    goto return_label;
  }
  k = (l - 1) / 2;
  dn = p;
  i = 0;
  while (i < k) {
    dn = dn->left;
    i ++;
  }
  dn_second_half = dn->left;
  dn->right = (Dict_node *)((void *)0);
  dn->left = dn->right;
  __cil_tmp10 = contains_underbar(dn->string);
  tmp___0 = __cil_tmp10;
  if (tmp___0) {
    insert_idiom(dn);
  } else {
    __cil_tmp11 = is_idiom_word(dn->string);
    tmp = __cil_tmp11;
    if (tmp) {
      printf((char const   * __restrict  )"*** Word \"%s\" found near line %d.\n",
             dn->string, line_number);
      printf((char const   * __restrict  )"    Words ending \".Ix\" (x a number) are reserved for idioms.\n");
      printf((char const   * __restrict  )"    This word will be ignored.\n");
    } else {
      __cil_tmp12 = abridged_lookup(dn->string);
      dnx = __cil_tmp12;
      if ((unsigned int )dnx != (unsigned int )((void *)0)) {
        printf((char const   * __restrict  )"*** The word \"%s\"", dn->string);
        printf((char const   * __restrict  )" found near line %d matches the following words:\n",
               line_number);
        while ((unsigned int )dnx != (unsigned int )((void *)0)) {
          printf((char const   * __restrict  )" %s", dnx->string);
          dnx = dnx->right;
        }
        printf((char const   * __restrict  )"\n    This word will be ignored.\n");
      } else {
        __cil_tmp13 = insert_dict(dict_root, dn);
        dict_root = __cil_tmp13;
        N_dict ++;
      }
    }
  }
  insert_list(p, k);
  insert_list(dn_second_half, (l - k) - 1);

  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void read_entry(void) 
{ Exp *n ;
  int i ;
  Dict_node *dn_new ;
  Dict_node *dnx ;
  Dict_node *dn ;
  void *tmp ;
  int tmp___0 ;
  int tmp___1 ;
  int __cil_tmp9 ;
  Dict_node *__cil_tmp10 ;
  void *__cil_tmp11 ;
  char *__cil_tmp12 ;
  Exp *__cil_tmp13 ;
  int __cil_tmp14 ;
  extern struct gc_tag_struct *__gc_struct_Dict_node_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[7] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((5 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& n);
  n = 0;
  simple_gc_frame[3] = (void *)(& dn_new);
  dn_new = 0;
  simple_gc_frame[4] = (void *)(& dnx);
  dnx = 0;
  simple_gc_frame[5] = (void *)(& dn);
  dn = 0;
  simple_gc_frame[6] = (void *)(& tmp);
  tmp = 0;
  dn = (Dict_node *)((void *)0);
  while (1) {
    __cil_tmp9 = is_equal(':');
    tmp___0 = __cil_tmp9;
    if (tmp___0) {
      break;
    }
    if (is_special) {
      error((char *)"I expected a word but didn\'t get it.");
    }
    if ((int )token[0] == 47) {
      __cil_tmp10 = read_word_file(dn, token);
      dn = __cil_tmp10;
    } else {
      __cil_tmp11 = GC_malloc(__gc_struct_Dict_node_struct_tag, (int )sizeof(Dict_node ));
      tmp = __cil_tmp11;
      dn_new = (Dict_node *)tmp;
      dn_new->left = dn;
      dn = dn_new;
      dn->file = (Word_file *)((void *)0);
      __cil_tmp12 = copy_string(token);
      dn->string = __cil_tmp12;
    }
    advance();
  }
  advance();
  __cil_tmp13 = expression();
  n = __cil_tmp13;
  __cil_tmp14 = is_equal(';');
  tmp___1 = __cil_tmp14;
  if (! tmp___1) {
    error((char *)"Expecting \";\" at the end of an entry.");
  }
  advance();
  i = 0;
  dnx = dn;
  while ((unsigned int )dnx != (unsigned int )((void *)0)) {
    dnx->exp = n;
    i ++;
    dnx = dnx->left;
  }
  insert_list(dn, i);

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void print_expression(Exp *n ) 
{ E_list *el ;
  int i ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& el);
  el = 0;
  simple_gc_frame[3] = (void *)(& n);
  if ((unsigned int )n == (unsigned int )((void *)0)) {
    printf((char const   * __restrict  )"NULL expression");

    goto return_label;
  }
  if ((int )n->type == 2) {
    i = 0;
    while (i < (int )n->cost) {
      printf((char const   * __restrict  )"[");
      i ++;
    }
    printf((char const   * __restrict  )"%s%c", n->u.string, n->dir);
    i = 0;
    while (i < (int )n->cost) {
      printf((char const   * __restrict  )"] ");
      i ++;
    }
  } else {
    i = 0;
    while (i < (int )n->cost) {
      printf((char const   * __restrict  )"[");
      i ++;
    }
    if ((int )n->cost == 0) {
      printf((char const   * __restrict  )"(");
    }
    if ((int )n->type == 1) {
      printf((char const   * __restrict  )"& ");
    }
    if ((int )n->type == 0) {
      printf((char const   * __restrict  )"or ");
    }
    el = n->u.l;
    while ((unsigned int )el != (unsigned int )((void *)0)) {
      print_expression(el->e);
      el = el->next;
    }
    i = 0;
    while (i < (int )n->cost) {
      printf((char const   * __restrict  )"] ");
      i ++;
    }
    if ((int )n->cost == 0) {
      printf((char const   * __restrict  )") ");
    }
  }

  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void rprint_dictionary_data(Dict_node *n ) 
{ void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& n);
  if ((unsigned int )n == (unsigned int )((void *)0)) {

    goto return_label;
  }
  rprint_dictionary_data(n->left);
  printf((char const   * __restrict  )"%s: ", n->string);
  print_expression(n->exp);
  printf((char const   * __restrict  )"\n");
  rprint_dictionary_data(n->right);

  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void print_dictionary_data(void) 
{ 

  {
  rprint_dictionary_data(dict_root);

  return;
}
}
void read_dictionary(void) 
{ 

  {
  advance();
  while ((int )token[0] != 0) {
    read_entry();
  }

  return;
}
}
int dict_match(char *s , char *t ) 
{ int tmp ;
  int tmp___0 ;
  int __retres5 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& s);
  simple_gc_frame[3] = (void *)(& t);
  while (1) {
    if ((int )*s != 0) {
      if (! ((int )*s == (int )*t)) {
        break;
      }
    } else {
      break;
    }
    s ++;
    t ++;
  }
  if ((int )*s == 42) {
    __retres5 = 0;
    goto return_label;
  } else {
    if ((int )*t == 42) {
      __retres5 = 0;
      goto return_label;
    }
  }
  if ((int )*s == 46) {
    tmp = '\000';
  } else {
    tmp = (int )*s;
  }
  if ((int )*t == 46) {
    tmp___0 = '\000';
  } else {
    tmp___0 = (int )*t;
  }
  __retres5 = tmp - tmp___0;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres5);
  }
}
}
int true_dict_match(char *s , char *t ) 
{ char *ds ;
  char *dt ;
  unsigned short const   **tmp ;
  unsigned short const   **tmp___0 ;
  size_t tmp___1 ;
  int tmp___2 ;
  size_t tmp___3 ;
  int tmp___4 ;
  int tmp___5 ;
  int __retres12 ;
  char *__cil_tmp13 ;
  char *__cil_tmp14 ;
  unsigned short const   **__cil_tmp15 ;
  unsigned short const   **__cil_tmp16 ;
  size_t __cil_tmp17 ;
  int __cil_tmp18 ;
  size_t __cil_tmp19 ;
  int __cil_tmp20 ;
  int __cil_tmp21 ;
  int __cil_tmp22 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[8] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((6 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& ds);
  ds = 0;
  simple_gc_frame[3] = (void *)(& dt);
  dt = 0;
  simple_gc_frame[4] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[5] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[6] = (void *)(& s);
  simple_gc_frame[7] = (void *)(& t);
  __cil_tmp13 = strrchr((char const   *)s, '.');
  ds = __cil_tmp13;
  __cil_tmp14 = strrchr((char const   *)t, '.');
  dt = __cil_tmp14;
  if ((unsigned int )dt != (unsigned int )((void *)0)) {
    if ((int )*(dt + 1) == 0) {
      dt = (char *)((void *)0);
    } else {
      __cil_tmp15 = __ctype_b_loc();
      tmp = __cil_tmp15;
      if ((int const   )*(*tmp + (int )*(dt + 1)) & 2048) {
        dt = (char *)((void *)0);
      }
    }
  }
  if ((unsigned int )ds != (unsigned int )((void *)0)) {
    if ((int )*(ds + 1) == 0) {
      ds = (char *)((void *)0);
    } else {
      __cil_tmp16 = __ctype_b_loc();
      tmp___0 = __cil_tmp16;
      if ((int const   )*(*tmp___0 + (int )*(ds + 1)) & 2048) {
        ds = (char *)((void *)0);
      }
    }
  }
  if ((unsigned int )dt == (unsigned int )((void *)0)) {
    if ((unsigned int )ds != (unsigned int )((void *)0)) {
      __cil_tmp17 = strlen((char const   *)t);
      tmp___1 = __cil_tmp17;
      if ((int )tmp___1 > ds - s) {
        __retres12 = 0;
        goto return_label;
      }
      __cil_tmp18 = strncmp((char const   *)s, (char const   *)t, (unsigned int )(ds - s));
      tmp___2 = __cil_tmp18;
      __retres12 = tmp___2 == 0;
      goto return_label;
    } else {
      goto _L;
    }
  } else {
    _L: 
    if ((unsigned int )dt != (unsigned int )((void *)0)) {
      if ((unsigned int )ds == (unsigned int )((void *)0)) {
        __cil_tmp19 = strlen((char const   *)s);
        tmp___3 = __cil_tmp19;
        if ((int )tmp___3 > dt - t) {
          __retres12 = 0;
          goto return_label;
        }
        __cil_tmp20 = strncmp((char const   *)s, (char const   *)t, (unsigned int )(dt - t));
        tmp___4 = __cil_tmp20;
        __retres12 = tmp___4 == 0;
        goto return_label;
      } else {
        __cil_tmp21 = strcmp((char const   *)s, (char const   *)t);
        tmp___5 = __cil_tmp21;
        __retres12 = tmp___5 == 0;
        goto return_label;
      }
    } else {
      __cil_tmp22 = strcmp((char const   *)s, (char const   *)t);
      tmp___5 = __cil_tmp22;
      __retres12 = tmp___5 == 0;
      goto return_label;
    }
  }
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres12);
  }
}
}
static Dict_node *lookup_list  =    (Dict_node *)((void *)0);
void prune_lookup_list(char *s ) 
{ Dict_node *dn ;
  Dict_node *dnx ;
  Dict_node *dn_new ;
  int tmp ;
  int __cil_tmp6 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& dn);
  dn = 0;
  simple_gc_frame[3] = (void *)(& dnx);
  dnx = 0;
  simple_gc_frame[4] = (void *)(& dn_new);
  dn_new = 0;
  simple_gc_frame[5] = (void *)(& s);
  dn_new = (Dict_node *)((void *)0);
  dn = lookup_list;
  while ((unsigned int )dn != (unsigned int )((void *)0)) {
    dnx = dn->right;
    __cil_tmp6 = true_dict_match(dn->string, s);
    tmp = __cil_tmp6;
    if (tmp) {
      dn->right = dn_new;
      dn_new = dn;
    } else {
    }
    dn = dnx;
  }
  lookup_list = (Dict_node *)((void *)0);
  dn = dn_new;
  while ((unsigned int )dn != (unsigned int )((void *)0)) {
    dnx = dn->right;
    dn->right = lookup_list;
    lookup_list = dn;
    dn = dnx;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void free_lookup_list(void) 
{ Dict_node *n ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& n);
  n = 0;
  while ((unsigned int )lookup_list != (unsigned int )((void *)0)) {
    n = lookup_list->right;
    lookup_list = n;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void rdictionary_lookup(Dict_node *dn , char *s ) 
{ int m ;
  Dict_node *dn_new ;
  void *tmp ;
  int __cil_tmp6 ;
  void *__cil_tmp7 ;
  extern struct gc_tag_struct *__gc_struct_Dict_node_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& dn_new);
  dn_new = 0;
  simple_gc_frame[3] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[4] = (void *)(& dn);
  simple_gc_frame[5] = (void *)(& s);
  if ((unsigned int )dn == (unsigned int )((void *)0)) {

    goto return_label;
  }
  __cil_tmp6 = dict_match(s, dn->string);
  m = __cil_tmp6;
  if (m >= 0) {
    rdictionary_lookup(dn->right, s);
  }
  if (m == 0) {
    __cil_tmp7 = GC_malloc(__gc_struct_Dict_node_struct_tag, (int )sizeof(Dict_node ));
    tmp = __cil_tmp7;
    dn_new = (Dict_node *)tmp;
    *dn_new = *dn;
    dn_new->right = lookup_list;
    lookup_list = dn_new;
  }
  if (m <= 0) {
    rdictionary_lookup(dn->left, s);
  }

  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
Dict_node *dictionary_lookup(char *s ) 
{ void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& s);
  free_lookup_list();
  rdictionary_lookup(dict_root, s);
  prune_lookup_list(s);
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (lookup_list);
  }
}
}
int boolean_dictionary_lookup(char *s ) 
{ Dict_node *tmp ;
  int __retres3 ;
  Dict_node *__cil_tmp4 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[3] = (void *)(& s);
  __cil_tmp4 = dictionary_lookup(s);
  tmp = __cil_tmp4;
  __retres3 = (unsigned int )tmp != (unsigned int )((void *)0);
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres3);
  }
}
}
void rabridged_lookup(Dict_node *dn , char *s ) 
{ int m ;
  Dict_node *dn_new ;
  void *tmp ;
  int tmp___0 ;
  int __cil_tmp7 ;
  int __cil_tmp8 ;
  void *__cil_tmp9 ;
  extern struct gc_tag_struct *__gc_struct_Dict_node_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& dn_new);
  dn_new = 0;
  simple_gc_frame[3] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[4] = (void *)(& dn);
  simple_gc_frame[5] = (void *)(& s);
  if ((unsigned int )dn == (unsigned int )((void *)0)) {

    goto return_label;
  }
  __cil_tmp7 = dict_match(s, dn->string);
  m = __cil_tmp7;
  if (m >= 0) {
    rabridged_lookup(dn->right, s);
  }
  if (m == 0) {
    __cil_tmp8 = is_idiom_word(dn->string);
    tmp___0 = __cil_tmp8;
    if (! tmp___0) {
      __cil_tmp9 = GC_malloc(__gc_struct_Dict_node_struct_tag, (int )sizeof(Dict_node ));
      tmp = __cil_tmp9;
      dn_new = (Dict_node *)tmp;
      *dn_new = *dn;
      dn_new->right = lookup_list;
      lookup_list = dn_new;
    }
  }
  if (m <= 0) {
    rabridged_lookup(dn->left, s);
  }

  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
Dict_node *abridged_lookup(char *s ) 
{ void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& s);
  free_lookup_list();
  rabridged_lookup(dict_root, s);
  prune_lookup_list(s);
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (lookup_list);
  }
}
}
int boolean_abridged_lookup(char *s ) 
{ Dict_node *tmp ;
  int __retres3 ;
  Dict_node *__cil_tmp4 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[3] = (void *)(& s);
  __cil_tmp4 = abridged_lookup(s);
  tmp = __cil_tmp4;
  __retres3 = (unsigned int )tmp != (unsigned int )((void *)0);
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres3);
  }
}
}
static Dict_node *parent  ;
static Dict_node *to_be_deleted  ;
int find_one_non_idiom_node(Dict_node *p , Dict_node *dn , char *s ) 
{ int m ;
  int tmp ;
  int tmp___0 ;
  int tmp___1 ;
  int __retres8 ;
  int __cil_tmp9 ;
  int __cil_tmp10 ;
  int __cil_tmp11 ;
  int __cil_tmp12 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& p);
  simple_gc_frame[3] = (void *)(& dn);
  simple_gc_frame[4] = (void *)(& s);
  if ((unsigned int )dn == (unsigned int )((void *)0)) {
    __retres8 = 0;
    goto return_label;
  }
  __cil_tmp9 = dict_match(s, dn->string);
  m = __cil_tmp9;
  if (m <= 0) {
    __cil_tmp10 = find_one_non_idiom_node(dn, dn->left, s);
    tmp = __cil_tmp10;
    if (tmp) {
      __retres8 = 1;
      goto return_label;
    }
  }
  if (m == 0) {
    __cil_tmp11 = is_idiom_word(dn->string);
    tmp___0 = __cil_tmp11;
    if (! tmp___0) {
      to_be_deleted = dn;
      parent = p;
      __retres8 = 1;
      goto return_label;
    }
  }
  if (m >= 0) {
    __cil_tmp12 = find_one_non_idiom_node(dn, dn->right, s);
    tmp___1 = __cil_tmp12;
    if (tmp___1) {
      __retres8 = 1;
      goto return_label;
    }
  }
  __retres8 = 0;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres8);
  }
}
}
void set_parent_of_node(Dict_node *p , Dict_node *del , Dict_node *new ) 
{ void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& p);
  simple_gc_frame[3] = (void *)(& del);
  simple_gc_frame[4] = (void *)(& new);
  if ((unsigned int )p == (unsigned int )((void *)0)) {
    dict_root = new;
  } else {
    if ((unsigned int )p->left == (unsigned int )del) {
      p->left = new;
    } else {
      if ((unsigned int )p->right == (unsigned int )del) {
        p->right = new;
      } else {
        printf((char const   * __restrict  )"Assertion failed: %s\n", "Dictionary broken?");
        exit(1);
      }
    }
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
int delete_dictionary_words(char *s ) 
{ Dict_node *pred ;
  Dict_node *pred_parent ;
  int tmp ;
  int tmp___0 ;
  int __retres6 ;
  int __cil_tmp7 ;
  int __cil_tmp8 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& pred);
  pred = 0;
  simple_gc_frame[3] = (void *)(& pred_parent);
  pred_parent = 0;
  simple_gc_frame[4] = (void *)(& s);
  __cil_tmp7 = find_one_non_idiom_node((Dict_node *)((void *)0), dict_root, s);
  tmp = __cil_tmp7;
  if (! tmp) {
    __retres6 = 0;
    goto return_label;
  }
  while (1) {
    if ((unsigned int )to_be_deleted->file != (unsigned int )((void *)0)) {
      (to_be_deleted->file)->changed = 1;
    }
    if ((unsigned int )to_be_deleted->left == (unsigned int )((void *)0)) {
      set_parent_of_node(parent, to_be_deleted, to_be_deleted->right);
    } else {
      pred_parent = to_be_deleted;
      pred = to_be_deleted->left;
      while ((unsigned int )pred->right != (unsigned int )((void *)0)) {
        pred_parent = pred;
        pred = pred->right;
      }
      to_be_deleted->string = pred->string;
      to_be_deleted->file = pred->file;
      to_be_deleted->exp = pred->exp;
      set_parent_of_node(pred_parent, pred, pred->left);
    }
    __cil_tmp8 = find_one_non_idiom_node((Dict_node *)((void *)0), dict_root, s);
    tmp___0 = __cil_tmp8;
    if (! tmp___0) {
      __retres6 = 1;
      goto return_label;
    }
  }
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres6);
  }
}
}
void open_dictionary(char *s ) 
{ FILE *__cil_tmp2 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& s);
  __cil_tmp2 = fopen((char const   * __restrict  )s, (char const   * __restrict  )"r");
  dict_file = __cil_tmp2;
  if ((unsigned int )dict_file == (unsigned int )((void *)0)) {
    printf((char const   * __restrict  )"Cannot open file %s\n", s);
    exit(1);
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
#pragma merger(0,"merge/strncasecmp.i","")
 __attribute__((__nothrow__)) int strncasecmp(char const   *s1 , char const   *s2 ,
                                              size_t n )  __attribute__((__pure__,
__nonnull__(1,2))) ;
int strncasecmp(char const   *s1 , char const   *s2 , size_t n ) 
{ char const   *i ;
  char const   *j ;
  char ui ;
  char uj ;
  size_t tmp ;
  int tmp___0 ;
  int tmp___1 ;
  int __retres11 ;
  int __cil_tmp12 ;
  int __cil_tmp13 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& i);
  i = 0;
  simple_gc_frame[3] = (void *)(& j);
  j = 0;
  simple_gc_frame[4] = (void *)(& s1);
  simple_gc_frame[5] = (void *)(& s2);
  i = s1;
  j = s2;
  while (1) {
    if ((int const   )*i != 0) {
      if (! ((int const   )*j != 0)) {
        break;
      }
    } else {
      break;
    }
    tmp = n;
    n --;
    if (tmp == 0U) {
      __retres11 = 0;
      goto return_label;
    }
    __cil_tmp12 = toupper((int )*i);
    tmp___0 = __cil_tmp12;
    ui = (char )tmp___0;
    __cil_tmp13 = toupper((int )*j);
    tmp___1 = __cil_tmp13;
    uj = (char )tmp___1;
    if ((int )ui < (int )uj) {
      __retres11 = -1;
      goto return_label;
    } else {
      if ((int )ui > (int )uj) {
        __retres11 = 1;
        goto return_label;
      }
    }
    i ++;
    j ++;
  }
  if (*i) {
    __retres11 = -1;
    goto return_label;
  }
  if (*j) {
    __retres11 = 1;
    goto return_label;
  }
  __retres11 = 0;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres11);
  }
}
}
#pragma merger(0,"merge/utilities.i","")
extern  __attribute__((__nothrow__)) int rand(void) ;
extern  __attribute__((__nothrow__)) void srand(unsigned int __seed ) ;
Connector *copy_connectors(Connector *c ) ;
int upper_case_match(char *s , char *t ) ;
void free_connectors(Connector *e ) 
{ Connector *n ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& n);
  n = 0;
  simple_gc_frame[3] = (void *)(& e);
  while ((unsigned int )e != (unsigned int )((void *)0)) {
    n = e->next;
    e = n;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void free_disjuncts(Disjunct *c ) 
{ Disjunct *c1 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& c1);
  c1 = 0;
  simple_gc_frame[3] = (void *)(& c);
  while ((unsigned int )c != (unsigned int )((void *)0)) {
    c1 = c->next;
    free_connectors(c->left);
    free_connectors(c->right);
    c = c1;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void free_X_nodes(X_node *x ) 
{ X_node *y ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& y);
  y = 0;
  simple_gc_frame[3] = (void *)(& x);
  while ((unsigned int )x != (unsigned int )((void *)0)) {
    y = x->next;
    free_Exp(x->exp);
    x = y;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void free_Exp(Exp *e ) 
{ void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& e);
  if ((int )e->type != 2) {
    free_E_list(e->u.l);
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void free_E_list(E_list *l ) 
{ void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& l);
  if ((unsigned int )l == (unsigned int )((void *)0)) {

    goto return_label;
  }
  free_E_list(l->next);
  free_Exp(l->e);

  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
int size_of_expression(Exp *e ) 
{ int size ;
  E_list *l ;
  int tmp ;
  int __retres5 ;
  int __cil_tmp6 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& l);
  l = 0;
  simple_gc_frame[3] = (void *)(& e);
  if ((int )e->type == 2) {
    __retres5 = 1;
    goto return_label;
  }
  size = 0;
  l = e->u.l;
  while ((unsigned int )l != (unsigned int )((void *)0)) {
    __cil_tmp6 = size_of_expression(l->e);
    tmp = __cil_tmp6;
    size += tmp;
    l = l->next;
  }
  __retres5 = size;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres5);
  }
}
}
void init_randtable(void) 
{ int i ;
  int tmp ;
  int __cil_tmp3 ;

  {
  srand(10U);
  i = 0;
  while (i < 256) {
    __cil_tmp3 = rand();
    tmp = __cil_tmp3;
    randtable[i] = (unsigned int )tmp;
    i ++;
  }

  return;
}
}
E_list *copy_E_list(E_list *l ) ;
Exp *copy_Exp(Exp *e ) 
{ Exp *n ;
  void *tmp ;
  Exp *__retres4 ;
  void *__cil_tmp5 ;
  E_list *__cil_tmp6 ;
  extern struct gc_tag_struct *__gc_struct_Exp_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& n);
  n = 0;
  simple_gc_frame[3] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[4] = (void *)(& __retres4);
  __retres4 = 0;
  simple_gc_frame[5] = (void *)(& e);
  if ((unsigned int )e == (unsigned int )((void *)0)) {
    __retres4 = (Exp *)((void *)0);
    goto return_label;
  }
  __cil_tmp5 = GC_malloc(__gc_struct_Exp_struct_tag, (int )sizeof(Exp ));
  tmp = __cil_tmp5;
  n = (Exp *)tmp;
  *n = *e;
  if ((int )e->type != 2) {
    __cil_tmp6 = copy_E_list(e->u.l);
    n->u.l = __cil_tmp6;
    GC_autotag_union(& n->u, 0);
  } else {
    n->u.string = n->u.string;
    GC_autotag_union(& n->u, 1);
  }
  __retres4 = n;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres4);
  }
}
}
E_list *copy_E_list(E_list *l ) 
{ E_list *nl ;
  void *tmp ;
  E_list *__retres4 ;
  void *__cil_tmp5 ;
  E_list *__cil_tmp6 ;
  Exp *__cil_tmp7 ;
  extern struct gc_tag_struct *__gc_struct_E_list_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& nl);
  nl = 0;
  simple_gc_frame[3] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[4] = (void *)(& __retres4);
  __retres4 = 0;
  simple_gc_frame[5] = (void *)(& l);
  if ((unsigned int )l == (unsigned int )((void *)0)) {
    __retres4 = (E_list *)((void *)0);
    goto return_label;
  }
  __cil_tmp5 = GC_malloc(__gc_struct_E_list_struct_tag, (int )sizeof(E_list ));
  tmp = __cil_tmp5;
  nl = (E_list *)tmp;
  *nl = *l;
  __cil_tmp6 = copy_E_list(l->next);
  nl->next = __cil_tmp6;
  __cil_tmp7 = copy_Exp(l->e);
  nl->e = __cil_tmp7;
  __retres4 = nl;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres4);
  }
}
}
Connector *copy_connectors(Connector *c ) 
{ Connector *c1 ;
  void *tmp ;
  Connector *__retres4 ;
  void *__cil_tmp5 ;
  Connector *__cil_tmp6 ;
  extern struct gc_tag_struct *__gc_struct_Connector_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& c1);
  c1 = 0;
  simple_gc_frame[3] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[4] = (void *)(& __retres4);
  __retres4 = 0;
  simple_gc_frame[5] = (void *)(& c);
  if ((unsigned int )c == (unsigned int )((void *)0)) {
    __retres4 = (Connector *)((void *)0);
    goto return_label;
  }
  __cil_tmp5 = GC_malloc(__gc_struct_Connector_struct_tag, (int )sizeof(Connector ));
  tmp = __cil_tmp5;
  c1 = (Connector *)tmp;
  *c1 = *c;
  __cil_tmp6 = copy_connectors(c->next);
  c1->next = __cil_tmp6;
  __retres4 = c1;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres4);
  }
}
}
Disjunct *copy_disjunct(Disjunct *d ) 
{ Disjunct *d1 ;
  void *tmp ;
  Disjunct *__retres4 ;
  void *__cil_tmp5 ;
  Connector *__cil_tmp6 ;
  Connector *__cil_tmp7 ;
  extern struct gc_tag_struct *__gc_struct_Disjunct_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& d1);
  d1 = 0;
  simple_gc_frame[3] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[4] = (void *)(& __retres4);
  __retres4 = 0;
  simple_gc_frame[5] = (void *)(& d);
  if ((unsigned int )d == (unsigned int )((void *)0)) {
    __retres4 = (Disjunct *)((void *)0);
    goto return_label;
  }
  __cil_tmp5 = GC_malloc(__gc_struct_Disjunct_struct_tag, (int )sizeof(Disjunct ));
  tmp = __cil_tmp5;
  d1 = (Disjunct *)tmp;
  *d1 = *d;
  d1->next = (Disjunct *)((void *)0);
  __cil_tmp6 = copy_connectors(d->left);
  d1->left = __cil_tmp6;
  __cil_tmp7 = copy_connectors(d->right);
  d1->right = __cil_tmp7;
  __retres4 = d1;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres4);
  }
}
}
static String_node *string_list  =    (String_node *)((void *)0);
void free_this_string_later(char *s , int size ) 
{ String_node *sn ;
  void *tmp ;
  void *__cil_tmp5 ;
  extern struct gc_tag_struct *__gc_struct_string_node_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& sn);
  sn = 0;
  simple_gc_frame[3] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[4] = (void *)(& s);
  __cil_tmp5 = GC_malloc(__gc_struct_string_node_struct_tag, (int )sizeof(String_node ));
  tmp = __cil_tmp5;
  sn = (String_node *)tmp;
  sn->next = string_list;
  string_list = sn;
  sn->string = s;
  sn->size = size;

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void free_strings(void) 
{ String_node *sn ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& sn);
  sn = 0;
  while ((unsigned int )string_list != (unsigned int )((void *)0)) {
    sn = string_list->next;
    string_list = sn;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
Disjunct *catenate_disjuncts(Disjunct *d1 , Disjunct *d2 ) 
{ Disjunct *dis ;
  Disjunct *__retres4 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& dis);
  dis = 0;
  simple_gc_frame[3] = (void *)(& __retres4);
  __retres4 = 0;
  simple_gc_frame[4] = (void *)(& d1);
  simple_gc_frame[5] = (void *)(& d2);
  dis = d1;
  if ((unsigned int )d1 == (unsigned int )((void *)0)) {
    __retres4 = d2;
    goto return_label;
  }
  if ((unsigned int )d2 == (unsigned int )((void *)0)) {
    __retres4 = d1;
    goto return_label;
  }
  while ((unsigned int )dis->next != (unsigned int )((void *)0)) {
    dis = dis->next;
  }
  dis->next = d2;
  __retres4 = d1;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres4);
  }
}
}
X_node *catenate_X_nodes(X_node *d1 , X_node *d2 ) 
{ X_node *dis ;
  X_node *__retres4 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[6] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((4 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& dis);
  dis = 0;
  simple_gc_frame[3] = (void *)(& __retres4);
  __retres4 = 0;
  simple_gc_frame[4] = (void *)(& d1);
  simple_gc_frame[5] = (void *)(& d2);
  dis = d1;
  if ((unsigned int )d1 == (unsigned int )((void *)0)) {
    __retres4 = d2;
    goto return_label;
  }
  if ((unsigned int )d2 == (unsigned int )((void *)0)) {
    __retres4 = d1;
    goto return_label;
  }
  while ((unsigned int )dis->next != (unsigned int )((void *)0)) {
    dis = dis->next;
  }
  dis->next = d2;
  __retres4 = d1;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres4);
  }
}
}
int next_power_of_two_up(int i ) 
{ int j ;

  {
  j = 1;
  while (j < i) {
    j <<= 1;
  }
  return (j);
}
}
int upper_case_match(char *s , char *t ) 
{ unsigned short const   **tmp ;
  unsigned short const   **tmp___0 ;
  unsigned short const   **tmp___1 ;
  unsigned short const   **tmp___2 ;
  int tmp___3 ;
  int __retres8 ;
  unsigned short const   **__cil_tmp9 ;
  unsigned short const   **__cil_tmp10 ;
  unsigned short const   **__cil_tmp11 ;
  unsigned short const   **__cil_tmp12 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[8] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((6 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[3] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[4] = (void *)(& tmp___1);
  tmp___1 = 0;
  simple_gc_frame[5] = (void *)(& tmp___2);
  tmp___2 = 0;
  simple_gc_frame[6] = (void *)(& s);
  simple_gc_frame[7] = (void *)(& t);
  while (1) {
    __cil_tmp9 = __ctype_b_loc();
    tmp = __cil_tmp9;
    if (! ((int const   )*(*tmp + (int )*s) & 256)) {
      __cil_tmp10 = __ctype_b_loc();
      tmp___0 = __cil_tmp10;
      if (! ((int const   )*(*tmp___0 + (int )*t) & 256)) {
        break;
      }
    }
    if ((int )*s != (int )*t) {
      __retres8 = 0;
      goto return_label;
    }
    s ++;
    t ++;
  }
  __cil_tmp11 = __ctype_b_loc();
  tmp___1 = __cil_tmp11;
  if ((int const   )*(*tmp___1 + (int )*s) & 256) {
    tmp___3 = 0;
  } else {
    __cil_tmp12 = __ctype_b_loc();
    tmp___2 = __cil_tmp12;
    if ((int const   )*(*tmp___2 + (int )*t) & 256) {
      tmp___3 = 0;
    } else {
      tmp___3 = 1;
    }
  }
  __retres8 = tmp___3;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres8);
  }
}
}
void left_print_string(FILE *fp , char *s , char *t ) 
{ int i ;
  int j ;
  int k ;
  size_t tmp ;
  size_t tmp___0 ;
  size_t __cil_tmp9 ;
  size_t __cil_tmp10 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& fp);
  simple_gc_frame[3] = (void *)(& s);
  simple_gc_frame[4] = (void *)(& t);
  __cil_tmp9 = strlen((char const   *)t);
  tmp = __cil_tmp9;
  j = (int )tmp;
  __cil_tmp10 = strlen((char const   *)s);
  tmp___0 = __cil_tmp10;
  k = (int )tmp___0;
  i = 0;
  while (i < j) {
    if (i < k) {
      fprintf((FILE * __restrict  )fp, (char const   * __restrict  )"%c", *(s + i));
    } else {
      fprintf((FILE * __restrict  )fp, (char const   * __restrict  )"%c", *(t + i));
    }
    i ++;
  }

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
#pragma merger(0,"merge/word-file.i","")
extern int _IO_getc(_IO_FILE *__fp ) ;
extern int fclose(FILE *__stream ) ;
static Word_file *word_file_header  =    (Word_file *)((void *)0);
char *get_a_word(FILE *fp ) 
{ char word[60] ;
  char *s ;
  int c ;
  int j ;
  unsigned short const   **tmp ;
  unsigned short const   **tmp___0 ;
  size_t tmp___1 ;
  void *tmp___2 ;
  char *__retres10 ;
  int __cil_tmp11 ;
  unsigned short const   **__cil_tmp12 ;
  unsigned short const   **__cil_tmp13 ;
  int __cil_tmp14 ;
  size_t __cil_tmp15 ;
  void *__cil_tmp16 ;
  extern struct gc_tag_struct *__gcstandard_atomic_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[8] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((6 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& s);
  s = 0;
  simple_gc_frame[3] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[4] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[5] = (void *)(& tmp___2);
  tmp___2 = 0;
  simple_gc_frame[6] = (void *)(& __retres10);
  __retres10 = 0;
  simple_gc_frame[7] = (void *)(& fp);
  while (1) {
    __cil_tmp11 = _IO_getc(fp);
    c = __cil_tmp11;
    if (c != -1) {
      __cil_tmp12 = __ctype_b_loc();
      tmp = __cil_tmp12;
      if (! ((int const   )*(*tmp + c) & 8192)) {
        break;
      }
    } else {
      break;
    }
  }
  if (c == -1) {
    __retres10 = (char *)((void *)0);
    goto return_label;
  }
  j = 0;
  while (1) {
    if (j < 60) {
      __cil_tmp13 = __ctype_b_loc();
      tmp___0 = __cil_tmp13;
      if ((int const   )*(*tmp___0 + c) & 8192) {
        break;
      } else {
        if (! (c != -1)) {
          break;
        }
      }
    } else {
      break;
    }
    word[j] = (char )c;
    __cil_tmp14 = _IO_getc(fp);
    c = __cil_tmp14;
    j ++;
  }
  if (j == 60) {
    error((char *)"The dictionary contains a word that is too long.");
  }
  word[j] = (char )'\000';
  __cil_tmp15 = strlen((char const   *)(word));
  tmp___1 = __cil_tmp15;
  __cil_tmp16 = GC_malloc(__gcstandard_atomic_tag, (int )(tmp___1 + 1U));
  tmp___2 = __cil_tmp16;
  s = (char *)tmp___2;
  strcpy((char * __restrict  )s, (char const   * __restrict  )(word));
  __retres10 = s;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres10);
  }
}
}
Dict_node *read_word_file(Dict_node *dn , char *filename ) 
{ Dict_node *dn_new ;
  Word_file *wf ;
  FILE *fp ;
  char *s ;
  char file_name_copy[60] ;
  void *tmp ;
  void *tmp___0 ;
  FILE *__cil_tmp10 ;
  void *__cil_tmp11 ;
  char *__cil_tmp12 ;
  void *__cil_tmp13 ;
  extern struct gc_tag_struct *__gc_struct_Dict_node_struct_tag ;
  extern struct gc_tag_struct *__gc_struct_Word_file_struct_tag ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[10] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((8 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& dn_new);
  dn_new = 0;
  simple_gc_frame[3] = (void *)(& wf);
  wf = 0;
  simple_gc_frame[4] = (void *)(& fp);
  fp = 0;
  simple_gc_frame[5] = (void *)(& s);
  s = 0;
  simple_gc_frame[6] = (void *)(& tmp);
  tmp = 0;
  simple_gc_frame[7] = (void *)(& tmp___0);
  tmp___0 = 0;
  simple_gc_frame[8] = (void *)(& dn);
  simple_gc_frame[9] = (void *)(& filename);
  strcpy((char * __restrict  )(file_name_copy), (char const   * __restrict  )(filename + 1));
  __cil_tmp10 = fopen((char const   * __restrict  )(file_name_copy), (char const   * __restrict  )"r");
  fp = __cil_tmp10;
  if ((unsigned int )fp == (unsigned int )((void *)0)) {
    printf((char const   * __restrict  )"\nCannot open file %s\n", file_name_copy);
    exit(1);
  }
  printf((char const   * __restrict  )"*");
  fflush(stdout);
  __cil_tmp11 = GC_malloc(__gc_struct_Word_file_struct_tag, (int )sizeof(Word_file ));
  tmp = __cil_tmp11;
  wf = (Word_file *)tmp;
  strcpy((char * __restrict  )(wf->file), (char const   * __restrict  )(file_name_copy));
  wf->changed = 0;
  wf->next = word_file_header;
  word_file_header = wf;
  while (1) {
    __cil_tmp12 = get_a_word(fp);
    s = __cil_tmp12;
    if (! ((unsigned int )s != (unsigned int )((void *)0))) {
      break;
    }
    __cil_tmp13 = GC_malloc(__gc_struct_Dict_node_struct_tag, (int )sizeof(Dict_node ));
    tmp___0 = __cil_tmp13;
    dn_new = (Dict_node *)tmp___0;
    dn_new->left = dn;
    dn = dn_new;
    dn->string = s;
    dn->file = wf;
  }
  fclose(fp);
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (dn);
  }
}
}
int xwhere_in_line  ;
void routput_dictionary(Dict_node *dn , FILE *fp , Word_file *wf ) 
{ size_t tmp ;
  size_t tmp___0 ;
  size_t __cil_tmp6 ;
  size_t __cil_tmp7 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& dn);
  simple_gc_frame[3] = (void *)(& fp);
  simple_gc_frame[4] = (void *)(& wf);
  if ((unsigned int )dn == (unsigned int )((void *)0)) {

    goto return_label;
  }
  routput_dictionary(dn->left, fp, wf);
  if ((unsigned int )dn->file == (unsigned int )wf) {
    __cil_tmp6 = strlen((char const   *)dn->string);
    tmp = __cil_tmp6;
    if ((unsigned int )xwhere_in_line + tmp > 70U) {
      xwhere_in_line = 0;
      fprintf((FILE * __restrict  )fp, (char const   * __restrict  )"\n");
    }
    __cil_tmp7 = strlen((char const   *)dn->string);
    tmp___0 = __cil_tmp7;
    xwhere_in_line = (int )((unsigned int )xwhere_in_line + (tmp___0 + 1U));
    fprintf((FILE * __restrict  )fp, (char const   * __restrict  )"%s ", dn->string);
  }
  routput_dictionary(dn->right, fp, wf);

  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void output_dictionary(Dict_node *dn , FILE *fp , Word_file *wf ) 
{ void **GC_last_variable_stack ;
  void *simple_gc_frame[5] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((3 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& dn);
  simple_gc_frame[3] = (void *)(& fp);
  simple_gc_frame[4] = (void *)(& wf);
  xwhere_in_line = 0;
  routput_dictionary(dn, fp, wf);
  fprintf((FILE * __restrict  )fp, (char const   * __restrict  )"\n");

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void save_files(void) 
{ Word_file *wf ;
  FILE *fp ;
  FILE *__cil_tmp3 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& wf);
  wf = 0;
  simple_gc_frame[3] = (void *)(& fp);
  fp = 0;
  wf = word_file_header;
  while ((unsigned int )wf != (unsigned int )((void *)0)) {
    if (wf->changed) {
      __cil_tmp3 = fopen((char const   * __restrict  )(wf->file), (char const   * __restrict  )"w");
      fp = __cil_tmp3;
      if ((unsigned int )fp == (unsigned int )((void *)0)) {
        printf((char const   * __restrict  )"\nCannot open %s. Gee, this shouldn\'t happen.\n",
               wf->file);
        printf((char const   * __restrict  )"file not saved\n");

        goto return_label;
      }
      printf((char const   * __restrict  )"   saving file \"%s\"\n", wf->file);
      output_dictionary(dict_root, fp, wf);
      fclose(fp);
      wf->changed = 0;
    }
    wf = wf->next;
  }

  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
int files_need_saving(void) 
{ Word_file *wf ;
  int __retres2 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& wf);
  wf = 0;
  wf = word_file_header;
  while ((unsigned int )wf != (unsigned int )((void *)0)) {
    if (wf->changed) {
      __retres2 = 1;
      goto return_label;
    }
    wf = wf->next;
  }
  __retres2 = 0;
  return_label: /* CIL Label */ 
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres2);
  }
}
}
#pragma merger(0,"merge/xalloc.i","")
extern  __attribute__((__nothrow__)) void *malloc(size_t __size )  __attribute__((__malloc__)) ;
extern  __attribute__((__nothrow__, __noreturn__)) void abort(void) ;
SIZET largest_block  ;
char *end_of_array  ;
char *start_of_array  ;
char *last_block  ;
void initialize_memory(void) 
{ SIZET i ;
  SIZET j ;
  void *tmp ;
  void *__cil_tmp4 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[3] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((1 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& tmp);
  tmp = 0;
  if ((sizeof(Align ) & (sizeof(Align ) - 1U)) != 0U) {
    fprintf((FILE * __restrict  )stderr, (char const   * __restrict  )"sizeof(Align) is not a power of 2.\n");
    exit(1);
  }
  i = 0U;
  j = 1U;
  while (i < j) {
    largest_block = i;
    i = j;
    j = 2U * j + 1U;
  }
  largest_block &= ~ (sizeof(Align ) - 1U);
  largest_block += - sizeof(Nuggie );
  __cil_tmp4 = malloc((31457280U * sizeof(char *)) / 4U);
  tmp = __cil_tmp4;
  start_of_array = (char *)tmp;
  if ((unsigned int )start_of_array == (unsigned int )((void *)0)) {
    fprintf((FILE * __restrict  )stderr, (char const   * __restrict  )"Not enough memory for base pool.\n");
    exit(1);
  }
  end_of_array = start_of_array + (((sizeof(Nuggie ) + sizeof(Align )) - 1U) & ~ (sizeof(Align ) - 1U));
  ((Nuggie *)(end_of_array - sizeof(Nuggie )))->size = 0U;
  max_space_in_use = 0;
  space_in_use = 0;
  last_block = (char *)((void *)0);

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
void *xalloc(int size ) 
{ char *old_end_of_array ;
  void *__retres3 ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& old_end_of_array);
  old_end_of_array = 0;
  simple_gc_frame[3] = (void *)(& __retres3);
  __retres3 = 0;
  if ((unsigned int )size > largest_block) {
    fprintf((FILE * __restrict  )stderr, (char const   * __restrict  )"Attempt to allocate too big a block (more than %d bytes)\n",
            largest_block);
    abort();
    exit(1);
  }
  old_end_of_array = end_of_array;
  end_of_array += ((((unsigned int )size + sizeof(Nuggie )) + sizeof(Align )) - 1U) & ~ (sizeof(Align ) - 1U);
  ((Nuggie *)(end_of_array - sizeof(Nuggie )))->size = (unsigned int )(end_of_array - old_end_of_array);
  ((Nuggie *)(end_of_array - sizeof(Nuggie )))->size &= 4294967294U;
  ((Nuggie *)(old_end_of_array - sizeof(Nuggie )))->size |= 1U;
  last_block = old_end_of_array;
  if ((unsigned int )(end_of_array - start_of_array) > (31457280U * sizeof(char *)) / 4U) {
    fprintf((FILE * __restrict  )stderr, (char const   * __restrict  )"Ran out of space.  Memory requested so far: %d bytes\n",
            end_of_array - start_of_array);
    exit(1);
  }
  space_in_use += size;
  if (space_in_use > max_space_in_use) {
    max_space_in_use = space_in_use;
  }
  __retres3 = (void *)old_end_of_array;
  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return (__retres3);
  }
}
}
void x_free(char *p , int size ) 
{ char *q ;
  void **GC_last_variable_stack ;
  void *simple_gc_frame[4] ;

  {
  GC_last_variable_stack = GC_get_variable_stack1();
  memset(& simple_gc_frame, 0, sizeof(simple_gc_frame));
  simple_gc_frame[0] = (void *)GC_last_variable_stack;
  simple_gc_frame[1] = (void *)((2 << 2) + 0);
  GC_set_variable_stack1(simple_gc_frame);
  simple_gc_frame[2] = (void *)(& q);
  q = 0;
  simple_gc_frame[3] = (void *)(& p);
  ((Nuggie *)(p - sizeof(Nuggie )))->size &= 4294967294U;
  if ((unsigned int )p == (unsigned int )last_block) {
    while (1) {
      q = p - (((Nuggie *)(p - sizeof(Nuggie )))->size & 4294967294U);
      if ((unsigned int )q == (unsigned int )p) {
        last_block = (char *)((void *)0);
        end_of_array = p;
        break;
      }
      if (((Nuggie *)(q - sizeof(Nuggie )))->size & 1U) {
        last_block = q;
        end_of_array = p;
        break;
      }
      p = q;
    }
  }
  space_in_use -= size;

  {
  GC_set_variable_stack1(GC_last_variable_stack);
  return;
  }
}
}
static void __gc_repair_struct_domain_struct(void *x ) 
{ struct domain_struct *mark2 ;

  {
  mark2 = (struct domain_struct *)x;
  GC_repair((void *)(& mark2->string));
  {

  }
  GC_repair((void *)(& mark2->lol));
  {

  }
  {

  }
  GC_repair((void *)(& mark2->child));
  GC_repair((void *)(& mark2->parent));
  return;
}
}
static void __gc_mark_struct_domain_struct(void *x ) 
{ struct domain_struct *mark2 ;

  {
  mark2 = (struct domain_struct *)x;
  GC_mark((void *)mark2->string);
  {

  }
  GC_mark((void *)mark2->lol);
  {

  }
  {

  }
  GC_mark((void *)mark2->child);
  GC_mark((void *)mark2->parent);
  return;
}
}
static void __gc_repair_struct_connector_domain_name_pair_struct(void *x ) 
{ struct connector_domain_name_pair_struct *mark2 ;

  {
  mark2 = (struct connector_domain_name_pair_struct *)x;
  GC_repair((void *)(& mark2->string));
  {

  }
  return;
}
}
static void __gc_mark_struct_connector_domain_name_pair_struct(void *x ) 
{ struct connector_domain_name_pair_struct *mark2 ;

  {
  mark2 = (struct connector_domain_name_pair_struct *)x;
  GC_mark((void *)mark2->string);
  {

  }
  return;
}
}
static void __gc_repair_struct___anonstruct_user_command_29(void *x ) 
{ struct __anonstruct_user_command_29 *mark2 ;

  {
  mark2 = (struct __anonstruct_user_command_29 *)x;
  GC_repair((void *)(& mark2->s));
  GC_repair((void *)(& mark2->str));
  return;
}
}
static void __gc_mark_struct___anonstruct_user_command_29(void *x ) 
{ struct __anonstruct_user_command_29 *mark2 ;

  {
  mark2 = (struct __anonstruct_user_command_29 *)x;
  GC_mark((void *)mark2->s);
  GC_mark((void *)mark2->str);
  return;
}
}
static void __gc_repair_struct___anonstruct_user_variable_28(void *x ) 
{ struct __anonstruct_user_variable_28 *mark2 ;

  {
  mark2 = (struct __anonstruct_user_variable_28 *)x;
  GC_repair((void *)(& mark2->s));
  GC_repair((void *)(& mark2->p));
  {

  }
  GC_repair((void *)(& mark2->str));
  return;
}
}
static void __gc_mark_struct___anonstruct_user_variable_28(void *x ) 
{ struct __anonstruct_user_variable_28 *mark2 ;

  {
  mark2 = (struct __anonstruct_user_variable_28 *)x;
  GC_mark((void *)mark2->s);
  GC_mark((void *)mark2->p);
  {

  }
  GC_mark((void *)mark2->str);
  return;
}
}
static void __gc_repair_struct_patch_element_struct(void *x ) 
{ struct patch_element_struct *mark2 ;

  {
  mark2 = (struct patch_element_struct *)x;
  {

  }
  {

  }
  {

  }
  {

  }
  return;
}
}
static void __gc_mark_struct_patch_element_struct(void *x ) 
{ struct patch_element_struct *mark2 ;

  {
  mark2 = (struct patch_element_struct *)x;
  {

  }
  {

  }
  {

  }
  {

  }
  return;
}
}
static void __gc_repair_struct_Link_struct(void *x ) 
{ struct Link_struct *mark2 ;

  {
  mark2 = (struct Link_struct *)x;
  {

  }
  {

  }
  GC_repair((void *)(& mark2->lc));
  GC_repair((void *)(& mark2->rc));
  GC_repair((void *)(& mark2->name));
  return;
}
}
static void __gc_mark_struct_Link_struct(void *x ) 
{ struct Link_struct *mark2 ;

  {
  mark2 = (struct Link_struct *)x;
  {

  }
  {

  }
  GC_mark((void *)mark2->lc);
  GC_mark((void *)mark2->rc);
  GC_mark((void *)mark2->name);
  return;
}
}
static void __gc_repair_struct_Word_struct(void *x ) 
{ struct Word_struct *mark2 ;
  int __cil_tmp3 ;

  {
  mark2 = (struct Word_struct *)x;
  {
  __cil_tmp3 = 0;
  while (__cil_tmp3 < 60) {
    __cil_tmp3 ++;
  }
  }
  GC_repair((void *)(& mark2->x));
  GC_repair((void *)(& mark2->d));
  return;
}
}
static void __gc_mark_struct_Word_struct(void *x ) 
{ struct Word_struct *mark2 ;
  int __cil_tmp3 ;

  {
  mark2 = (struct Word_struct *)x;
  {
  __cil_tmp3 = 0;
  while (__cil_tmp3 < 60) {
    __cil_tmp3 ++;
  }
  }
  GC_mark((void *)mark2->x);
  GC_mark((void *)mark2->d);
  return;
}
}
static void __gc_repair_struct_Word_file_struct(void *x ) 
{ struct Word_file_struct *mark2 ;
  int __cil_tmp3 ;

  {
  mark2 = (struct Word_file_struct *)x;
  {
  __cil_tmp3 = 0;
  while (__cil_tmp3 < 60) {
    __cil_tmp3 ++;
  }
  }
  {

  }
  GC_repair((void *)(& mark2->next));
  return;
}
}
static void __gc_mark_struct_Word_file_struct(void *x ) 
{ struct Word_file_struct *mark2 ;
  int __cil_tmp3 ;

  {
  mark2 = (struct Word_file_struct *)x;
  {
  __cil_tmp3 = 0;
  while (__cil_tmp3 < 60) {
    __cil_tmp3 ++;
  }
  }
  {

  }
  GC_mark((void *)mark2->next);
  return;
}
}
static void __gc_repair_struct_string_node_struct(void *x ) 
{ struct string_node_struct *mark2 ;

  {
  mark2 = (struct string_node_struct *)x;
  GC_repair((void *)(& mark2->string));
  {

  }
  GC_repair((void *)(& mark2->next));
  return;
}
}
static void __gc_mark_struct_string_node_struct(void *x ) 
{ struct string_node_struct *mark2 ;

  {
  mark2 = (struct string_node_struct *)x;
  GC_mark((void *)mark2->string);
  {

  }
  GC_mark((void *)mark2->next);
  return;
}
}
static void __gc_repair_struct_c_list_struct(void *x ) 
{ struct c_list_struct *mark2 ;

  {
  mark2 = (struct c_list_struct *)x;
  GC_repair((void *)(& mark2->c));
  {

  }
  GC_repair((void *)(& mark2->next));
  return;
}
}
static void __gc_mark_struct_c_list_struct(void *x ) 
{ struct c_list_struct *mark2 ;

  {
  mark2 = (struct c_list_struct *)x;
  GC_mark((void *)mark2->c);
  {

  }
  GC_mark((void *)mark2->next);
  return;
}
}
static void __gc_repair_struct_Violation_list_struct(void *x ) 
{ struct Violation_list_struct *mark2 ;

  {
  mark2 = (struct Violation_list_struct *)x;
  GC_repair((void *)(& mark2->next));
  GC_repair((void *)(& mark2->string));
  return;
}
}
static void __gc_mark_struct_Violation_list_struct(void *x ) 
{ struct Violation_list_struct *mark2 ;

  {
  mark2 = (struct Violation_list_struct *)x;
  GC_mark((void *)mark2->next);
  GC_mark((void *)mark2->string);
  return;
}
}
static void __gc_repair_struct_D_type_list_struct(void *x ) 
{ struct D_type_list_struct *mark2 ;

  {
  mark2 = (struct D_type_list_struct *)x;
  GC_repair((void *)(& mark2->next));
  {

  }
  return;
}
}
static void __gc_mark_struct_D_type_list_struct(void *x ) 
{ struct D_type_list_struct *mark2 ;

  {
  mark2 = (struct D_type_list_struct *)x;
  GC_mark((void *)mark2->next);
  {

  }
  return;
}
}
static void __gc_repair_struct_d_tree_leaf_struct(void *x ) 
{ struct d_tree_leaf_struct *mark2 ;

  {
  mark2 = (struct d_tree_leaf_struct *)x;
  GC_repair((void *)(& mark2->parent));
  {

  }
  GC_repair((void *)(& mark2->next));
  return;
}
}
static void __gc_mark_struct_d_tree_leaf_struct(void *x ) 
{ struct d_tree_leaf_struct *mark2 ;

  {
  mark2 = (struct d_tree_leaf_struct *)x;
  GC_mark((void *)mark2->parent);
  {

  }
  GC_mark((void *)mark2->next);
  return;
}
}
static void __gc_repair_struct_Table_connector(void *x ) 
{ struct Table_connector *mark2 ;

  {
  mark2 = (struct Table_connector *)x;
  {

  }
  {

  }
  GC_repair((void *)(& mark2->le));
  GC_repair((void *)(& mark2->re));
  {

  }
  {

  }
  GC_repair((void *)(& mark2->next));
  return;
}
}
static void __gc_mark_struct_Table_connector(void *x ) 
{ struct Table_connector *mark2 ;

  {
  mark2 = (struct Table_connector *)x;
  {

  }
  {

  }
  GC_mark((void *)mark2->le);
  GC_mark((void *)mark2->re);
  {

  }
  {

  }
  GC_mark((void *)mark2->next);
  return;
}
}
static void __gc_repair_struct_Linkage_info_struct(void *x ) 
{ struct Linkage_info_struct *mark2 ;

  {
  mark2 = (struct Linkage_info_struct *)x;
  {

  }
  {

  }
  {

  }
  {

  }
  {

  }
  {

  }
  return;
}
}
static void __gc_mark_struct_Linkage_info_struct(void *x ) 
{ struct Linkage_info_struct *mark2 ;

  {
  mark2 = (struct Linkage_info_struct *)x;
  {

  }
  {

  }
  {

  }
  {

  }
  {

  }
  {

  }
  return;
}
}
static void __gc_repair_struct_E_list_struct(void *x ) 
{ struct E_list_struct *mark2 ;

  {
  mark2 = (struct E_list_struct *)x;
  GC_repair((void *)(& mark2->next));
  GC_repair((void *)(& mark2->e));
  return;
}
}
static void __gc_mark_struct_E_list_struct(void *x ) 
{ struct E_list_struct *mark2 ;

  {
  mark2 = (struct E_list_struct *)x;
  GC_mark((void *)mark2->next);
  GC_mark((void *)mark2->e);
  return;
}
}
static void __gc_repair_struct_Exp_struct(void *x ) 
{ struct Exp_struct *mark2 ;
  int __cil_tmp3 ;

  {
  mark2 = (struct Exp_struct *)x;
  {

  }
  {

  }
  {

  }
  {

  }
  {
  __cil_tmp3 = GC_get_autotagged_case(& mark2->u);
  switch (__cil_tmp3) {
  case 0: 
  {
  GC_repair((void *)(& mark2->u.l));
  break;
  }
  case 1: 
  {
  GC_repair((void *)(& mark2->u.string));
  break;
  }
  }
  }
  return;
}
}
static void __gc_mark_struct_Exp_struct(void *x ) 
{ struct Exp_struct *mark2 ;
  int __cil_tmp3 ;

  {
  mark2 = (struct Exp_struct *)x;
  {

  }
  {

  }
  {

  }
  {

  }
  {
  __cil_tmp3 = GC_get_autotagged_case(& mark2->u);
  switch (__cil_tmp3) {
  case 0: 
  {
  GC_mark((void *)mark2->u.l);
  break;
  }
  case 1: 
  {
  GC_mark((void *)mark2->u.string);
  break;
  }
  }
  }
  return;
}
}
static void __gc_repair_struct_Dict_node_struct(void *x ) 
{ struct Dict_node_struct *mark2 ;

  {
  mark2 = (struct Dict_node_struct *)x;
  GC_repair((void *)(& mark2->string));
  GC_repair((void *)(& mark2->file));
  GC_repair((void *)(& mark2->exp));
  GC_repair((void *)(& mark2->left));
  GC_repair((void *)(& mark2->right));
  return;
}
}
static void __gc_mark_struct_Dict_node_struct(void *x ) 
{ struct Dict_node_struct *mark2 ;

  {
  mark2 = (struct Dict_node_struct *)x;
  GC_mark((void *)mark2->string);
  GC_mark((void *)mark2->file);
  GC_mark((void *)mark2->exp);
  GC_mark((void *)mark2->left);
  GC_mark((void *)mark2->right);
  return;
}
}
static void __gc_repair_struct_Match_node_struct(void *x ) 
{ struct Match_node_struct *mark2 ;

  {
  mark2 = (struct Match_node_struct *)x;
  GC_repair((void *)(& mark2->next));
  GC_repair((void *)(& mark2->d));
  return;
}
}
static void __gc_mark_struct_Match_node_struct(void *x ) 
{ struct Match_node_struct *mark2 ;

  {
  mark2 = (struct Match_node_struct *)x;
  GC_mark((void *)mark2->next);
  GC_mark((void *)mark2->d);
  return;
}
}
static void __gc_repair_struct_X_node_struct(void *x ) 
{ struct X_node_struct *mark2 ;

  {
  mark2 = (struct X_node_struct *)x;
  GC_repair((void *)(& mark2->string));
  GC_repair((void *)(& mark2->exp));
  GC_repair((void *)(& mark2->next));
  return;
}
}
static void __gc_mark_struct_X_node_struct(void *x ) 
{ struct X_node_struct *mark2 ;

  {
  mark2 = (struct X_node_struct *)x;
  GC_mark((void *)mark2->string);
  GC_mark((void *)mark2->exp);
  GC_mark((void *)mark2->next);
  return;
}
}
static void __gc_repair_struct_clause_struct(void *x ) 
{ struct clause_struct *mark2 ;

  {
  mark2 = (struct clause_struct *)x;
  GC_repair((void *)(& mark2->next));
  {

  }
  {

  }
  GC_repair((void *)(& mark2->c));
  return;
}
}
static void __gc_mark_struct_clause_struct(void *x ) 
{ struct clause_struct *mark2 ;

  {
  mark2 = (struct clause_struct *)x;
  GC_mark((void *)mark2->next);
  {

  }
  {

  }
  GC_mark((void *)mark2->c);
  return;
}
}
static void __gc_repair_struct_Tconnector_struct(void *x ) 
{ struct Tconnector_struct *mark2 ;

  {
  mark2 = (struct Tconnector_struct *)x;
  {

  }
  {

  }
  GC_repair((void *)(& mark2->next));
  GC_repair((void *)(& mark2->string));
  return;
}
}
static void __gc_mark_struct_Tconnector_struct(void *x ) 
{ struct Tconnector_struct *mark2 ;

  {
  mark2 = (struct Tconnector_struct *)x;
  {

  }
  {

  }
  GC_mark((void *)mark2->next);
  GC_mark((void *)mark2->string);
  return;
}
}
static void __gc_repair_struct_Image_node_struct(void *x ) 
{ struct Image_node_struct *mark2 ;

  {
  mark2 = (struct Image_node_struct *)x;
  GC_repair((void *)(& mark2->next));
  GC_repair((void *)(& mark2->c));
  {

  }
  return;
}
}
static void __gc_mark_struct_Image_node_struct(void *x ) 
{ struct Image_node_struct *mark2 ;

  {
  mark2 = (struct Image_node_struct *)x;
  GC_mark((void *)mark2->next);
  GC_mark((void *)mark2->c);
  {

  }
  return;
}
}
static void __gc_repair_struct_Disjunct_struct(void *x ) 
{ struct Disjunct_struct *mark2 ;

  {
  mark2 = (struct Disjunct_struct *)x;
  GC_repair((void *)(& mark2->next));
  {

  }
  {

  }
  GC_repair((void *)(& mark2->string));
  GC_repair((void *)(& mark2->left));
  GC_repair((void *)(& mark2->right));
  return;
}
}
static void __gc_mark_struct_Disjunct_struct(void *x ) 
{ struct Disjunct_struct *mark2 ;

  {
  mark2 = (struct Disjunct_struct *)x;
  GC_mark((void *)mark2->next);
  {

  }
  {

  }
  GC_mark((void *)mark2->string);
  GC_mark((void *)mark2->left);
  GC_mark((void *)mark2->right);
  return;
}
}
static void __gc_repair_struct_label_node_struct(void *x ) 
{ struct label_node_struct *mark2 ;

  {
  mark2 = (struct label_node_struct *)x;
  {

  }
  GC_repair((void *)(& mark2->next));
  return;
}
}
static void __gc_mark_struct_label_node_struct(void *x ) 
{ struct label_node_struct *mark2 ;

  {
  mark2 = (struct label_node_struct *)x;
  {

  }
  GC_mark((void *)mark2->next);
  return;
}
}
static void __gc_repair_struct_Connector_struct(void *x ) 
{ struct Connector_struct *mark2 ;

  {
  mark2 = (struct Connector_struct *)x;
  {

  }
  {

  }
  {

  }
  {

  }
  GC_repair((void *)(& mark2->next));
  GC_repair((void *)(& mark2->string));
  return;
}
}
static void __gc_mark_struct_Connector_struct(void *x ) 
{ struct Connector_struct *mark2 ;

  {
  mark2 = (struct Connector_struct *)x;
  {

  }
  {

  }
  {

  }
  {

  }
  GC_mark((void *)mark2->next);
  GC_mark((void *)mark2->string);
  return;
}
}
static void __gc_repair_struct_PP_node_struct(void *x ) 
{ struct PP_node_struct *mark2 ;

  {
  mark2 = (struct PP_node_struct *)x;
  GC_repair((void *)(& mark2->d_type_array));
  GC_repair((void *)(& mark2->v));
  return;
}
}
static void __gc_mark_struct_PP_node_struct(void *x ) 
{ struct PP_node_struct *mark2 ;

  {
  mark2 = (struct PP_node_struct *)x;
  GC_mark((void *)mark2->d_type_array);
  GC_mark((void *)mark2->v);
  return;
}
}
static void __gc_repair_struct_Links_to_patch_struct(void *x ) 
{ struct Links_to_patch_struct *mark2 ;

  {
  mark2 = (struct Links_to_patch_struct *)x;
  GC_repair((void *)(& mark2->next));
  {

  }
  {

  }
  {

  }
  return;
}
}
static void __gc_mark_struct_Links_to_patch_struct(void *x ) 
{ struct Links_to_patch_struct *mark2 ;

  {
  mark2 = (struct Links_to_patch_struct *)x;
  GC_mark((void *)mark2->next);
  {

  }
  {

  }
  {

  }
  return;
}
}
static void __gc_repair_struct_DIS_node_struct(void *x ) 
{ struct DIS_node_struct *mark2 ;

  {
  mark2 = (struct DIS_node_struct *)x;
  GC_repair((void *)(& mark2->cl));
  GC_repair((void *)(& mark2->lol));
  {

  }
  return;
}
}
static void __gc_mark_struct_DIS_node_struct(void *x ) 
{ struct DIS_node_struct *mark2 ;

  {
  mark2 = (struct DIS_node_struct *)x;
  GC_mark((void *)mark2->cl);
  GC_mark((void *)mark2->lol);
  {

  }
  return;
}
}
static void __gc_repair_struct_CON_list_struct(void *x ) 
{ struct CON_list_struct *mark2 ;

  {
  mark2 = (struct CON_list_struct *)x;
  GC_repair((void *)(& mark2->next));
  GC_repair((void *)(& mark2->cn));
  return;
}
}
static void __gc_mark_struct_CON_list_struct(void *x ) 
{ struct CON_list_struct *mark2 ;

  {
  mark2 = (struct CON_list_struct *)x;
  GC_mark((void *)mark2->next);
  GC_mark((void *)mark2->cn);
  return;
}
}
static void __gc_repair_struct_CON_node_struct(void *x ) 
{ struct CON_node_struct *mark2 ;

  {
  mark2 = (struct CON_node_struct *)x;
  GC_repair((void *)(& mark2->dl));
  GC_repair((void *)(& mark2->current));
  {

  }
  return;
}
}
static void __gc_mark_struct_CON_node_struct(void *x ) 
{ struct CON_node_struct *mark2 ;

  {
  mark2 = (struct CON_node_struct *)x;
  GC_mark((void *)mark2->dl);
  GC_mark((void *)mark2->current);
  {

  }
  return;
}
}
static void __gc_repair_struct_DIS_list_struct(void *x ) 
{ struct DIS_list_struct *mark2 ;

  {
  mark2 = (struct DIS_list_struct *)x;
  GC_repair((void *)(& mark2->next));
  GC_repair((void *)(& mark2->dn));
  return;
}
}
static void __gc_mark_struct_DIS_list_struct(void *x ) 
{ struct DIS_list_struct *mark2 ;

  {
  mark2 = (struct DIS_list_struct *)x;
  GC_mark((void *)mark2->next);
  GC_mark((void *)mark2->dn);
  return;
}
}
static void __gc_repair_struct_List_o_links_struct(void *x ) 
{ struct List_o_links_struct *mark2 ;

  {
  mark2 = (struct List_o_links_struct *)x;
  {

  }
  {

  }
  {

  }
  GC_repair((void *)(& mark2->next));
  return;
}
}
static void __gc_mark_struct_List_o_links_struct(void *x ) 
{ struct List_o_links_struct *mark2 ;

  {
  mark2 = (struct List_o_links_struct *)x;
  {

  }
  {

  }
  {

  }
  GC_mark((void *)mark2->next);
  return;
}
}
static void __gc_repair_tarray_struct_Linkage_info_struct(void *x ) 
{ extern struct gc_tag_struct *__gc_struct_Linkage_info_struct_tag ;
  struct Linkage_info_struct *mark3 ;
  void **end4 ;
  int __cil_tmp5 ;

  {
  __cil_tmp5 = 0;
  mark3 = (struct Linkage_info_struct *)x;
  end4 = (void **)GC_find_end_of_object(mark3);
  while ((unsigned int )((void **)(mark3 + __cil_tmp5) < end4)) {
    {
    __gc_repair_struct_Linkage_info_struct((void *)((void **)(mark3 + __cil_tmp5)));
    __cil_tmp5 ++;
    }
  }
}
}
static void __gc_mark_tarray_struct_Linkage_info_struct(void *x ) 
{ extern struct gc_tag_struct *__gc_struct_Linkage_info_struct_tag ;
  struct Linkage_info_struct *mark3 ;
  void **end4 ;
  int __cil_tmp5 ;

  {
  __cil_tmp5 = 0;
  mark3 = (struct Linkage_info_struct *)x;
  end4 = (void **)GC_find_end_of_object(mark3);
  while ((unsigned int )((void **)(mark3 + __cil_tmp5) < end4)) {
    {
    __gc_mark_struct_Linkage_info_struct((void *)((void **)(mark3 + __cil_tmp5)));
    __cil_tmp5 ++;
    }
  }
}
}
void GC_init_33767c2873e8db8279a6ae3cc5369571(void) 
{ int __cil_tmp1 ;
  int __cil_tmp2 ;
  int __cil_tmp3 ;
  int __cil_tmp4 ;
  int __cil_tmp5 ;
  int __cil_tmp6 ;
  int __cil_tmp7 ;
  int __cil_tmp8 ;
  int __cil_tmp9 ;
  int __cil_tmp10 ;
  int __cil_tmp11 ;
  int __cil_tmp12 ;
  int __cil_tmp13 ;
  int __cil_tmp14 ;
  int __cil_tmp15 ;
  int __cil_tmp16 ;
  int __cil_tmp17 ;
  int __cil_tmp18 ;
  int __cil_tmp19 ;
  int __cil_tmp20 ;
  int __cil_tmp21 ;
  int __cil_tmp22 ;
  int __cil_tmp23 ;
  int __cil_tmp24 ;
  int __cil_tmp25 ;
  int __cil_tmp26 ;
  int __cil_tmp27 ;
  int __cil_tmp28 ;
  int __cil_tmp29 ;
  int __cil_tmp30 ;
  int __cil_tmp31 ;
  int __cil_tmp32 ;
  int __cil_tmp33 ;
  int __cil_tmp34 ;
  int __cil_tmp35 ;
  int __cil_tmp36 ;
  int __cil_tmp37 ;
  int __cil_tmp38 ;
  int __cil_tmp39 ;
  int __cil_tmp40 ;
  int __cil_tmp41 ;
  int __cil_tmp42 ;
  int __cil_tmp43 ;
  int __cil_tmp44 ;
  int __cil_tmp45 ;
  int __cil_tmp46 ;
  int __cil_tmp47 ;
  int __cil_tmp48 ;
  int __cil_tmp49 ;
  extern struct gc_tag_struct *__gc_struct_domain_struct_tag ;
  int __cil_tmp51 ;
  int __cil_tmp52 ;
  int __cil_tmp53 ;
  int __cil_tmp54 ;
  int __cil_tmp55 ;
  extern struct gc_tag_struct *__gc_struct_connector_domain_name_pair_struct_tag ;
  int __cil_tmp57 ;
  int __cil_tmp58 ;
  int __cil_tmp59 ;
  int __cil_tmp60 ;
  extern struct gc_tag_struct *__gc_struct___anonstruct_user_command_29_tag ;
  int __cil_tmp62 ;
  extern struct gc_tag_struct *__gc_struct___anonstruct_user_variable_28_tag ;
  int __cil_tmp64 ;
  int __cil_tmp65 ;
  int __cil_tmp66 ;
  int __cil_tmp67 ;
  int __cil_tmp68 ;
  int __cil_tmp69 ;
  int __cil_tmp70 ;
  int __cil_tmp71 ;
  extern struct gc_tag_struct *__gc_struct_patch_element_struct_tag ;
  int __cil_tmp73 ;
  int __cil_tmp74 ;
  int __cil_tmp75 ;
  int __cil_tmp76 ;
  extern struct gc_tag_struct *__gc_struct_Link_struct_tag ;
  int __cil_tmp78 ;
  int __cil_tmp79 ;
  extern struct gc_tag_struct *__gc_struct_Word_struct_tag ;
  extern struct gc_tag_struct *__gc_struct_Word_file_struct_tag ;
  extern struct gc_tag_struct *__gc_struct_string_node_struct_tag ;
  extern struct gc_tag_struct *__gc_struct_c_list_struct_tag ;
  extern struct gc_tag_struct *__gc_struct_Violation_list_struct_tag ;
  extern struct gc_tag_struct *__gc_struct_D_type_list_struct_tag ;
  extern struct gc_tag_struct *__gc_struct_d_tree_leaf_struct_tag ;
  extern struct gc_tag_struct *__gc_struct_Table_connector_tag ;
  extern struct gc_tag_struct *__gc_struct_Linkage_info_struct_tag ;
  extern struct gc_tag_struct *__gc_struct_E_list_struct_tag ;
  extern struct gc_tag_struct *__gc_struct_Exp_struct_tag ;
  extern struct gc_tag_struct *__gc_struct_Dict_node_struct_tag ;
  extern struct gc_tag_struct *__gc_struct_Match_node_struct_tag ;
  extern struct gc_tag_struct *__gc_struct_X_node_struct_tag ;
  extern struct gc_tag_struct *__gc_struct_clause_struct_tag ;
  extern struct gc_tag_struct *__gc_struct_Tconnector_struct_tag ;
  extern struct gc_tag_struct *__gc_struct_Image_node_struct_tag ;
  extern struct gc_tag_struct *__gc_struct_Disjunct_struct_tag ;
  extern struct gc_tag_struct *__gc_struct_label_node_struct_tag ;
  extern struct gc_tag_struct *__gc_struct_Connector_struct_tag ;
  extern struct gc_tag_struct *__gc_struct_PP_node_struct_tag ;
  extern struct gc_tag_struct *__gc_struct_Links_to_patch_struct_tag ;
  extern struct gc_tag_struct *__gc_struct_DIS_node_struct_tag ;
  extern struct gc_tag_struct *__gc_struct_CON_list_struct_tag ;
  extern struct gc_tag_struct *__gc_struct_CON_node_struct_tag ;
  extern struct gc_tag_struct *__gc_struct_DIS_list_struct_tag ;
  extern struct gc_tag_struct *__gc_struct_List_o_links_struct_tag ;
  extern struct gc_tag_struct *__gc_tarray_struct_Linkage_info_struct_tag ;

  {
  __gc_struct_domain_struct_tag = GC_init_tag(__gc_mark_struct_domain_struct, __gc_repair_struct_domain_struct);
  __gc_struct_connector_domain_name_pair_struct_tag = GC_init_tag(__gc_mark_struct_connector_domain_name_pair_struct,
                                                                  __gc_repair_struct_connector_domain_name_pair_struct);
  __gc_struct___anonstruct_user_command_29_tag = GC_init_tag(__gc_mark_struct___anonstruct_user_command_29,
                                                             __gc_repair_struct___anonstruct_user_command_29);
  __gc_struct___anonstruct_user_variable_28_tag = GC_init_tag(__gc_mark_struct___anonstruct_user_variable_28,
                                                              __gc_repair_struct___anonstruct_user_variable_28);
  __gc_struct_patch_element_struct_tag = GC_init_tag(__gc_mark_struct_patch_element_struct,
                                                     __gc_repair_struct_patch_element_struct);
  __gc_struct_Link_struct_tag = GC_init_tag(__gc_mark_struct_Link_struct, __gc_repair_struct_Link_struct);
  __gc_struct_Word_struct_tag = GC_init_tag(__gc_mark_struct_Word_struct, __gc_repair_struct_Word_struct);
  __gc_struct_Word_file_struct_tag = GC_init_tag(__gc_mark_struct_Word_file_struct,
                                                 __gc_repair_struct_Word_file_struct);
  __gc_struct_string_node_struct_tag = GC_init_tag(__gc_mark_struct_string_node_struct,
                                                   __gc_repair_struct_string_node_struct);
  __gc_struct_c_list_struct_tag = GC_init_tag(__gc_mark_struct_c_list_struct, __gc_repair_struct_c_list_struct);
  __gc_struct_Violation_list_struct_tag = GC_init_tag(__gc_mark_struct_Violation_list_struct,
                                                      __gc_repair_struct_Violation_list_struct);
  __gc_struct_D_type_list_struct_tag = GC_init_tag(__gc_mark_struct_D_type_list_struct,
                                                   __gc_repair_struct_D_type_list_struct);
  __gc_struct_d_tree_leaf_struct_tag = GC_init_tag(__gc_mark_struct_d_tree_leaf_struct,
                                                   __gc_repair_struct_d_tree_leaf_struct);
  __gc_struct_Table_connector_tag = GC_init_tag(__gc_mark_struct_Table_connector,
                                                __gc_repair_struct_Table_connector);
  __gc_struct_Linkage_info_struct_tag = GC_init_tag(__gc_mark_struct_Linkage_info_struct,
                                                    __gc_repair_struct_Linkage_info_struct);
  __gc_struct_E_list_struct_tag = GC_init_tag(__gc_mark_struct_E_list_struct, __gc_repair_struct_E_list_struct);
  __gc_struct_Exp_struct_tag = GC_init_tag(__gc_mark_struct_Exp_struct, __gc_repair_struct_Exp_struct);
  __gc_struct_Dict_node_struct_tag = GC_init_tag(__gc_mark_struct_Dict_node_struct,
                                                 __gc_repair_struct_Dict_node_struct);
  __gc_struct_Match_node_struct_tag = GC_init_tag(__gc_mark_struct_Match_node_struct,
                                                  __gc_repair_struct_Match_node_struct);
  __gc_struct_X_node_struct_tag = GC_init_tag(__gc_mark_struct_X_node_struct, __gc_repair_struct_X_node_struct);
  __gc_struct_clause_struct_tag = GC_init_tag(__gc_mark_struct_clause_struct, __gc_repair_struct_clause_struct);
  __gc_struct_Tconnector_struct_tag = GC_init_tag(__gc_mark_struct_Tconnector_struct,
                                                  __gc_repair_struct_Tconnector_struct);
  __gc_struct_Image_node_struct_tag = GC_init_tag(__gc_mark_struct_Image_node_struct,
                                                  __gc_repair_struct_Image_node_struct);
  __gc_struct_Disjunct_struct_tag = GC_init_tag(__gc_mark_struct_Disjunct_struct,
                                                __gc_repair_struct_Disjunct_struct);
  __gc_struct_label_node_struct_tag = GC_init_tag(__gc_mark_struct_label_node_struct,
                                                  __gc_repair_struct_label_node_struct);
  __gc_struct_Connector_struct_tag = GC_init_tag(__gc_mark_struct_Connector_struct,
                                                 __gc_repair_struct_Connector_struct);
  __gc_struct_PP_node_struct_tag = GC_init_tag(__gc_mark_struct_PP_node_struct, __gc_repair_struct_PP_node_struct);
  __gc_struct_Links_to_patch_struct_tag = GC_init_tag(__gc_mark_struct_Links_to_patch_struct,
                                                      __gc_repair_struct_Links_to_patch_struct);
  __gc_struct_DIS_node_struct_tag = GC_init_tag(__gc_mark_struct_DIS_node_struct,
                                                __gc_repair_struct_DIS_node_struct);
  __gc_struct_CON_list_struct_tag = GC_init_tag(__gc_mark_struct_CON_list_struct,
                                                __gc_repair_struct_CON_list_struct);
  __gc_struct_CON_node_struct_tag = GC_init_tag(__gc_mark_struct_CON_node_struct,
                                                __gc_repair_struct_CON_node_struct);
  __gc_struct_DIS_list_struct_tag = GC_init_tag(__gc_mark_struct_DIS_list_struct,
                                                __gc_repair_struct_DIS_list_struct);
  __gc_struct_List_o_links_struct_tag = GC_init_tag(__gc_mark_struct_List_o_links_struct,
                                                    __gc_repair_struct_List_o_links_struct);
  __gc_tarray_struct_Linkage_info_struct_tag = GC_init_tag(__gc_mark_tarray_struct_Linkage_info_struct,
                                                           __gc_repair_tarray_struct_Linkage_info_struct);
  memset(& last_block, 0, sizeof(last_block));
  GC_add_root((void *)(& last_block));
  memset(& start_of_array, 0, sizeof(start_of_array));
  GC_add_root((void *)(& start_of_array));
  memset(& end_of_array, 0, sizeof(end_of_array));
  GC_add_root((void *)(& end_of_array));
  GC_add_root((void *)(& word_file_header));
  GC_add_root((void *)(& string_list));
  memset(& to_be_deleted, 0, sizeof(to_be_deleted));
  GC_add_root((void *)(& to_be_deleted));
  memset(& parent, 0, sizeof(parent));
  GC_add_root((void *)(& parent));
  GC_add_root((void *)(& lookup_list));
  memset(& dict_file, 0, sizeof(dict_file));
  GC_add_root((void *)(& dict_file));
  GC_add_root((void *)(& dict_root));
  memset(& r_table___0, 0, sizeof(r_table___0));
  __cil_tmp1 = 0;
  while (__cil_tmp1 < 250) {
    GC_add_root((void *)(& r_table___0[__cil_tmp1]));
    __cil_tmp1 ++;
  }
  memset(& l_table___0, 0, sizeof(l_table___0));
  __cil_tmp2 = 0;
  while (__cil_tmp2 < 250) {
    GC_add_root((void *)(& l_table___0[__cil_tmp2]));
    __cil_tmp2 ++;
  }
  memset(& dup_table, 0, sizeof(dup_table));
  GC_add_root((void *)(& dup_table));
  memset(& table___0, 0, sizeof(table___0));
  GC_add_root((void *)(& table___0));
  __cil_tmp3 = 0;
  while (__cil_tmp3 < 6) {
    GC_add_root((void *)(& illegal_SI_types[__cil_tmp3]));
    __cil_tmp3 ++;
  }
  __cil_tmp4 = 0;
  while (__cil_tmp4 < 7) {
    GC_add_root((void *)(& illegal_S_types[__cil_tmp4]));
    __cil_tmp4 ++;
  }
  __cil_tmp5 = 0;
  while (__cil_tmp5 < 3) {
    GC_add_root((void *)(& Incompat_with_MXpr[__cil_tmp5]));
    __cil_tmp5 ++;
  }
  __cil_tmp6 = 0;
  while (__cil_tmp6 < 2) {
    GC_add_root((void *)(& Incompat_with_MXsr[__cil_tmp6]));
    __cil_tmp6 ++;
  }
  __cil_tmp7 = 0;
  while (__cil_tmp7 < 4) {
    GC_add_root((void *)(& Nec_for_MVh[__cil_tmp7]));
    __cil_tmp7 ++;
  }
  __cil_tmp8 = 0;
  while (__cil_tmp8 < 2) {
    GC_add_root((void *)(& ZZ[__cil_tmp8]));
    __cil_tmp8 ++;
  }
  __cil_tmp9 = 0;
  while (__cil_tmp9 < 7) {
    GC_add_root((void *)(& Nec_for_EAh[__cil_tmp9]));
    __cil_tmp9 ++;
  }
  __cil_tmp10 = 0;
  while (__cil_tmp10 < 2) {
    GC_add_root((void *)(& Nec_for_Qe[__cil_tmp10]));
    __cil_tmp10 ++;
  }
  __cil_tmp11 = 0;
  while (__cil_tmp11 < 4) {
    GC_add_root((void *)(& Mj_or_Wj[__cil_tmp11]));
    __cil_tmp11 ++;
  }
  __cil_tmp12 = 0;
  while (__cil_tmp12 < 3) {
    GC_add_root((void *)(& Nec_for_j[__cil_tmp12]));
    __cil_tmp12 ++;
  }
  __cil_tmp13 = 0;
  while (__cil_tmp13 < 2) {
    GC_add_root((void *)(& Nec_for_Jr[__cil_tmp13]));
    __cil_tmp13 ++;
  }
  __cil_tmp14 = 0;
  while (__cil_tmp14 < 2) {
    GC_add_root((void *)(& Jr[__cil_tmp14]));
    __cil_tmp14 ++;
  }
  __cil_tmp15 = 0;
  while (__cil_tmp15 < 3) {
    GC_add_root((void *)(& Nec_for_Ia[__cil_tmp15]));
    __cil_tmp15 ++;
  }
  __cil_tmp16 = 0;
  while (__cil_tmp16 < 13) {
    GC_add_root((void *)(& Nec_for_Ma[__cil_tmp16]));
    __cil_tmp16 ++;
  }
  __cil_tmp17 = 0;
  while (__cil_tmp17 < 3) {
    GC_add_root((void *)(& Nec_for_Wq[__cil_tmp17]));
    __cil_tmp17 ++;
  }
  __cil_tmp18 = 0;
  while (__cil_tmp18 < 4) {
    GC_add_root((void *)(& Nec_for_Ws_2[__cil_tmp18]));
    __cil_tmp18 ++;
  }
  __cil_tmp19 = 0;
  while (__cil_tmp19 < 4) {
    GC_add_root((void *)(& Incompat_with_Ws[__cil_tmp19]));
    __cil_tmp19 ++;
  }
  __cil_tmp20 = 0;
  while (__cil_tmp20 < 5) {
    GC_add_root((void *)(& Nec_for_Inv[__cil_tmp20]));
    __cil_tmp20 ++;
  }
  __cil_tmp21 = 0;
  while (__cil_tmp21 < 7) {
    GC_add_root((void *)(& Nec_for_S_com[__cil_tmp21]));
    __cil_tmp21 ++;
  }
  __cil_tmp22 = 0;
  while (__cil_tmp22 < 8) {
    GC_add_root((void *)(& Nec_for_Ss_com[__cil_tmp22]));
    __cil_tmp22 ++;
  }
  __cil_tmp23 = 0;
  while (__cil_tmp23 < 7) {
    GC_add_root((void *)(& Nec_for_Sp_com[__cil_tmp23]));
    __cil_tmp23 ++;
  }
  __cil_tmp24 = 0;
  while (__cil_tmp24 < 2) {
    GC_add_root((void *)(& Nec_for_Mc[__cil_tmp24]));
    __cil_tmp24 ++;
  }
  __cil_tmp25 = 0;
  while (__cil_tmp25 < 6) {
    GC_add_root((void *)(& Nec_for_Cc[__cil_tmp25]));
    __cil_tmp25 ++;
  }
  __cil_tmp26 = 0;
  while (__cil_tmp26 < 9) {
    GC_add_root((void *)(& Nec_for_MVta[__cil_tmp26]));
    __cil_tmp26 ++;
  }
  __cil_tmp27 = 0;
  while (__cil_tmp27 < 12) {
    GC_add_root((void *)(& Nec_for_MVtp[__cil_tmp27]));
    __cil_tmp27 ++;
  }
  __cil_tmp28 = 0;
  while (__cil_tmp28 < 8) {
    GC_add_root((void *)(& Nec_for_MVto[__cil_tmp28]));
    __cil_tmp28 ++;
  }
  __cil_tmp29 = 0;
  while (__cil_tmp29 < 3) {
    GC_add_root((void *)(& Pa_or_Paf[__cil_tmp29]));
    __cil_tmp29 ++;
  }
  __cil_tmp30 = 0;
  while (__cil_tmp30 < 3) {
    GC_add_root((void *)(& EBmm[__cil_tmp30]));
    __cil_tmp30 ++;
  }
  __cil_tmp31 = 0;
  while (__cil_tmp31 < 3) {
    GC_add_root((void *)(& MV[__cil_tmp31]));
    __cil_tmp31 ++;
  }
  __cil_tmp32 = 0;
  while (__cil_tmp32 < 2) {
    GC_add_root((void *)(& MVm[__cil_tmp32]));
    __cil_tmp32 ++;
  }
  __cil_tmp33 = 0;
  while (__cil_tmp33 < 2) {
    GC_add_root((void *)(& Necessary_for_Tvcom_Trans[__cil_tmp33]));
    __cil_tmp33 ++;
  }
  __cil_tmp34 = 0;
  while (__cil_tmp34 < 3) {
    GC_add_root((void *)(& Necessary_for_Tocom[__cil_tmp34]));
    __cil_tmp34 ++;
  }
  __cil_tmp35 = 0;
  while (__cil_tmp35 < 2) {
    GC_add_root((void *)(& Necessary_for_Tvcom[__cil_tmp35]));
    __cil_tmp35 ++;
  }
  __cil_tmp36 = 0;
  while (__cil_tmp36 < 2) {
    GC_add_root((void *)(& Necessary_for_Thcom[__cil_tmp36]));
    __cil_tmp36 ++;
  }
  __cil_tmp37 = 0;
  while (__cil_tmp37 < 7) {
    GC_add_root((void *)(& Nec_for_BIq[__cil_tmp37]));
    __cil_tmp37 ++;
  }
  __cil_tmp38 = 0;
  while (__cil_tmp38 < 5) {
    GC_add_root((void *)(& Nec_for_THb[__cil_tmp38]));
    __cil_tmp38 ++;
  }
  __cil_tmp39 = 0;
  while (__cil_tmp39 < 3) {
    GC_add_root((void *)(& Nec_for_BIh[__cil_tmp39]));
    __cil_tmp39 ++;
  }
  __cil_tmp40 = 0;
  while (__cil_tmp40 < 3) {
    GC_add_root((void *)(& Oxt[__cil_tmp40]));
    __cil_tmp40 ++;
  }
  __cil_tmp41 = 0;
  while (__cil_tmp41 < 7) {
    GC_add_root((void *)(& Ost[__cil_tmp41]));
    __cil_tmp41 ++;
  }
  __cil_tmp42 = 0;
  while (__cil_tmp42 < 7) {
    GC_add_root((void *)(& Opt[__cil_tmp42]));
    __cil_tmp42 ++;
  }
  __cil_tmp43 = 0;
  while (__cil_tmp43 < 6) {
    GC_add_root((void *)(& Nec_for_MVz[__cil_tmp43]));
    __cil_tmp43 ++;
  }
  __cil_tmp44 = 0;
  while (__cil_tmp44 < 15) {
    GC_add_root((void *)(& Necessary_for_MVt[__cil_tmp44]));
    __cil_tmp44 ++;
  }
  __cil_tmp45 = 0;
  while (__cil_tmp45 < 12) {
    GC_add_root((void *)(& Necessary_for_SF[__cil_tmp45]));
    __cil_tmp45 ++;
  }
  __cil_tmp46 = 0;
  while (__cil_tmp46 < 4) {
    GC_add_root((void *)(& SFiSFIi[__cil_tmp46]));
    __cil_tmp46 ++;
  }
  __cil_tmp47 = 0;
  while (__cil_tmp47 < 13) {
    GC_add_root((void *)(& incompat_with_THi[__cil_tmp47]));
    __cil_tmp47 ++;
  }
  memset(& word_links___0, 0, sizeof(word_links___0));
  __cil_tmp48 = 0;
  while (__cil_tmp48 < 250) {
    GC_add_root((void *)(& word_links___0[__cil_tmp48]));
    __cil_tmp48 ++;
  }
  memset(& domain_array, 0, sizeof(domain_array));
  __cil_tmp49 = 0;
  while (__cil_tmp49 < 497) {
    GC_add_root_tagged((void *)(& domain_array[__cil_tmp49]), __gc_struct_domain_struct_tag,
                       sizeof(domain_array[__cil_tmp49]));
    __cil_tmp49 ++;
  }
  __cil_tmp51 = 0;
  while (__cil_tmp51 < 22) {
    GC_add_root((void *)(& restricted_links[__cil_tmp51]));
    __cil_tmp51 ++;
  }
  __cil_tmp52 = 0;
  while (__cil_tmp52 < 8) {
    GC_add_root((void *)(& must_be_connected_without[__cil_tmp52]));
    __cil_tmp52 ++;
  }
  __cil_tmp53 = 0;
  while (__cil_tmp53 < 2) {
    GC_add_root((void *)(& ignore_these_links[__cil_tmp53]));
    __cil_tmp53 ++;
  }
  __cil_tmp54 = 0;
  while (__cil_tmp54 < 21) {
    GC_add_root((void *)(& domain_contains_links[__cil_tmp54]));
    __cil_tmp54 ++;
  }
  __cil_tmp55 = 0;
  while (__cil_tmp55 < 44) {
    GC_add_root_tagged((void *)(& CDNP_array[__cil_tmp55]), __gc_struct_connector_domain_name_pair_struct_tag,
                       sizeof(CDNP_array[__cil_tmp55]));
    __cil_tmp55 ++;
  }
  __cil_tmp57 = 0;
  while (__cil_tmp57 < 4) {
    GC_add_root((void *)(& urfl_only_domain_starter_links[__cil_tmp57]));
    __cil_tmp57 ++;
  }
  __cil_tmp58 = 0;
  while (__cil_tmp58 < 4) {
    GC_add_root((void *)(& urfl_domain_starter_links[__cil_tmp58]));
    __cil_tmp58 ++;
  }
  __cil_tmp59 = 0;
  while (__cil_tmp59 < 38) {
    GC_add_root((void *)(& domain_starter_links[__cil_tmp59]));
    __cil_tmp59 ++;
  }
  memset(& table, 0, sizeof(table));
  GC_add_root((void *)(& table));
  __cil_tmp60 = 0;
  while (__cil_tmp60 < 5) {
    GC_add_root_tagged((void *)(& user_command[__cil_tmp60]), __gc_struct___anonstruct_user_command_29_tag,
                       sizeof(user_command[__cil_tmp60]));
    __cil_tmp60 ++;
  }
  __cil_tmp62 = 0;
  while (__cil_tmp62 < 19) {
    GC_add_root_tagged((void *)(& user_variable[__cil_tmp62]), __gc_struct___anonstruct_user_variable_28_tag,
                       sizeof(user_variable[__cil_tmp62]));
    __cil_tmp62 ++;
  }
  __cil_tmp64 = 0;
  while (__cil_tmp64 < 11) {
    GC_add_root((void *)(& strip_right[__cil_tmp64]));
    __cil_tmp64 ++;
  }
  __cil_tmp65 = 0;
  while (__cil_tmp65 < 3) {
    GC_add_root((void *)(& strip_left[__cil_tmp65]));
    __cil_tmp65 ++;
  }
  memset(& deletable, 0, sizeof(deletable));
  __cil_tmp66 = 0;
  while (__cil_tmp66 < 250) {
    GC_add_root((void *)(& deletable[__cil_tmp66]));
    __cil_tmp66 ++;
  }
  GC_add_root((void *)(& mn_free_list));
  memset(& r_table, 0, sizeof(r_table));
  __cil_tmp67 = 0;
  while (__cil_tmp67 < 250) {
    GC_add_root((void *)(& r_table[__cil_tmp67]));
    __cil_tmp67 ++;
  }
  memset(& l_table, 0, sizeof(l_table));
  __cil_tmp68 = 0;
  while (__cil_tmp68 < 250) {
    GC_add_root((void *)(& l_table[__cil_tmp68]));
    __cil_tmp68 ++;
  }
  memset(& image_array, 0, sizeof(image_array));
  __cil_tmp69 = 0;
  while (__cil_tmp69 < 250) {
    GC_add_root((void *)(& image_array[__cil_tmp69]));
    __cil_tmp69 ++;
  }
  memset(& andable_hash_table, 0, sizeof(andable_hash_table));
  GC_add_root((void *)(& andable_hash_table));
  memset(& label_table, 0, sizeof(label_table));
  GC_add_root((void *)(& label_table));
  memset(& hash_table, 0, sizeof(hash_table));
  __cil_tmp70 = 0;
  while (__cil_tmp70 < 1 << 10) {
    GC_add_root((void *)(& hash_table[__cil_tmp70]));
    __cil_tmp70 ++;
  }
  memset(& patch_array, 0, sizeof(patch_array));
  __cil_tmp71 = 0;
  while (__cil_tmp71 < 497) {
    GC_add_root_tagged((void *)(& patch_array[__cil_tmp71]), __gc_struct_patch_element_struct_tag,
                       sizeof(patch_array[__cil_tmp71]));
    __cil_tmp71 ++;
  }
  memset(& word_links, 0, sizeof(word_links));
  __cil_tmp73 = 0;
  while (__cil_tmp73 < 250) {
    GC_add_root((void *)(& word_links[__cil_tmp73]));
    __cil_tmp73 ++;
  }
  memset(& chosen_disjuncts, 0, sizeof(chosen_disjuncts));
  __cil_tmp74 = 0;
  while (__cil_tmp74 < 250) {
    GC_add_root((void *)(& chosen_disjuncts[__cil_tmp74]));
    __cil_tmp74 ++;
  }
  memset(& chosen_words, 0, sizeof(chosen_words));
  __cil_tmp75 = 0;
  while (__cil_tmp75 < 250) {
    GC_add_root((void *)(& chosen_words[__cil_tmp75]));
    __cil_tmp75 ++;
  }
  memset(& pp_link_array, 0, sizeof(pp_link_array));
  __cil_tmp76 = 0;
  while (__cil_tmp76 < 497) {
    GC_add_root_tagged((void *)(& pp_link_array[__cil_tmp76]), __gc_struct_Link_struct_tag,
                       sizeof(pp_link_array[__cil_tmp76]));
    __cil_tmp76 ++;
  }
  memset(& link_array, 0, sizeof(link_array));
  __cil_tmp78 = 0;
  while (__cil_tmp78 < 497) {
    GC_add_root_tagged((void *)(& link_array[__cil_tmp78]), __gc_struct_Link_struct_tag,
                       sizeof(link_array[__cil_tmp78]));
    __cil_tmp78 ++;
  }
  memset(& sentence, 0, sizeof(sentence));
  __cil_tmp79 = 0;
  while (__cil_tmp79 < 250) {
    GC_add_root_tagged((void *)(& sentence[__cil_tmp79]), __gc_struct_Word_struct_tag,
                       sizeof(sentence[__cil_tmp79]));
    __cil_tmp79 ++;
  }
}
}

