<commit_before>extern char *malloc(int);
extern int nondet();
extern int nondetnn();
extern void exit(int);

struct node_t {
   int value ;
   struct node_t *next ;
   int from_count ;
   struct node_t **to_nodes ;
   struct node_t **from_nodes ;
   int *coeffs ;
};
typedef struct node_t node_t;

struct graph_t {
   node_t *e_nodes ;
   node_t *h_nodes ;
};
typedef struct graph_t graph_t;

int gen_number(int range )
{
    int ndnn = nondetnn();

    if (ndnn < range)
        return ndnn;

    return 0;
}

node_t **make_table(int size )
{ node_t **retval ;
  void *tmp ;

  {
  tmp = malloc(size);
  retval = (node_t **)tmp;
  if (retval == 0) {
      // printf((char const   * __restrict  )"Assertion failure\n");
    exit(-1);
  }

  return (retval);
}
}

void fill_table(int size, node_t **table)
{ int i ;
  void *tmp ;
  int tmp___0 ;
  node_t *ttmp;

  {
  i = 0;
  while (i < size) {
      tmp = malloc(sizeof(node_t ));
    validptr(table + i);
    *(table + i) = (node_t *)tmp;
    tmp___0 = nondet();
    (*(table + i))->value = (int )tmp___0;
    (*(table + i))->from_count = 0;
    if (i > 0) {
        ttmp = *(table + i);
        validptr(table + i - 1);
        (*(table + (i - 1)))->next = ttmp;
    }
    i ++;
  }
  validptr(table + size - 1);
  (*(table + (size - 1)))->next = (struct node_t *)((void *)0);
  return;
}
}

void fill_from_fields(node_t *nodelist , int degree )
{ node_t *cur_node ;
  int j ;
  node_t *other_node ;

  cur_node = nodelist;
  while (cur_node) {
    j = 0;
    while (j < degree) {
        // validptr(cur_node->to_nodes + j);
      other_node = *(cur_node->to_nodes + j);
      // pmr: Surrender to dynamic checking here --- this requires serious smarts!
      // pmr: validptr(other_node->from_nodes + other_node->from_count);
      *(other_node->from_nodes + other_node->from_count) = cur_node;
      (other_node->from_count) ++;
      j ++;
    }
    cur_node = cur_node->next;
  }
  return;
}

void make_neighbors(node_t *nodelist , int tablesz , node_t **table , int degree )
{ node_t *cur_node ;
  node_t *other_node ;
  int j ;
  int k ;
  node_t **tmp ;
  int tmp___0 ;

  cur_node = nodelist;
  while (cur_node) {
      tmp = malloc(degree);
    cur_node->to_nodes = (node_t **)tmp;
    j = 0;
    while (j < degree) {
      while (1) {
        tmp___0 = gen_number(tablesz);<commit_msg>Note about more abysmal checks<commit_after>extern char *malloc(int);
extern int nondet();
extern int nondetnn();
extern void exit(int);

struct node_t {
   int value ;
   struct node_t *next ;
   int from_count ;
   struct node_t **to_nodes ;
   struct node_t **from_nodes ;
   int *coeffs ;
};
typedef struct node_t node_t;

struct graph_t {
   node_t *e_nodes ;
   node_t *h_nodes ;
};
typedef struct graph_t graph_t;

int gen_number(int range )
{
    int ndnn = nondetnn();

    if (ndnn < range)
        return ndnn;

    return 0;
}

node_t **make_table(int size )
{ node_t **retval ;
  void *tmp ;

  {
  tmp = malloc(size);
  retval = (node_t **)tmp;
  if (retval == 0) {
      // printf((char const   * __restrict  )"Assertion failure\n");
    exit(-1);
  }

  return (retval);
}
}

void fill_table(int size, node_t **table)
{ int i ;
  void *tmp ;
  int tmp___0 ;
  node_t *ttmp;

  {
  i = 0;
  while (i < size) {
      tmp = malloc(sizeof(node_t ));
    validptr(table + i);
    *(table + i) = (node_t *)tmp;
    tmp___0 = nondet();
    (*(table + i))->value = (int )tmp___0;
    (*(table + i))->from_count = 0;
    if (i > 0) {
        ttmp = *(table + i);
        validptr(table + i - 1);
        (*(table + (i - 1)))->next = ttmp;
    }
    i ++;
  }
  validptr(table + size - 1);
  (*(table + (size - 1)))->next = (struct node_t *)((void *)0);
  return;
}
}

void fill_from_fields(node_t *nodelist , int degree )
{ node_t *cur_node ;
  int j ;
  node_t *other_node ;

  cur_node = nodelist;
  while (cur_node) {
    j = 0;
    while (j < degree) {
        // pmr: For to_nodes, we only know
        //   to_nodes = 0 || (0 < to_nodes && to_nodes = BLOCK_BEGIN(to_nodes) && BLOCK_END(to_nodes) = BLOCK_BEGIN(to_nodes) + 333)
        // But this does does not check that to_nodes is not null
        // validptr(cur_node->to_nodes + j);
      other_node = *(cur_node->to_nodes + j);
      // pmr: Surrender to dynamic checking here --- this requires serious smarts!
      // pmr: validptr(other_node->from_nodes + other_node->from_count);
      *(other_node->from_nodes + other_node->from_count) = cur_node;
      (other_node->from_count) ++;
      j ++;
    }
    cur_node = cur_node->next;
  }
  return;
}

void make_neighbors(node_t *nodelist , int tablesz , node_t **table , int degree )
{ node_t *cur_node ;
  node_t *other_node ;
  int j ;
  int k ;
  node_t **tmp ;
  int tmp___0 ;

  cur_node = nodelist;
  while (cur_node) {
      tmp = malloc(degree);
    cur_node->to_nodes = (node_t **)tmp;
    j = 0;
    while (j < degree) {
      while (1) {
        tmp___0 = gen_number(tablesz);
{'fraction_non_alphanumeric': 0.1498285944746925, 'fraction_numerical': 0.008671103044968743, 'mean_word_length': 2.5942028985507246, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '310263', 'n_tokens_mistral': 1976, 'n_tokens_neox': 1890, 'n_words': 477}