<commit_before>/*
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * Copyright (c) 2016, <NAME> <<EMAIL>>
 */

#include "evoasm.h"
#include "evoasm-util.h"
#include "evoasm-rand.h"

EVOASM_DECL_LOG_TAG("rand")

_EVOASM_DEF_ALLOC_FREE_FUNCS(prng)

void
evoasm_prng_init(evoasm_prng_t *prng, ...) {
  va_list args;
  unsigned i;
  va_start(args, prng);

  for(i = 0; i < EVOASM_PRNG_SEED_LEN; i++) {
    prng->state.data[i] = va_arg(args, uint64_t);
  }<commit_msg>Initialize prng_t.p<commit_after>/*
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * Copyright (c) 2016, <NAME> <<EMAIL>>
 */

#include "evoasm.h"
#include "evoasm-util.h"
#include "evoasm-rand.h"

EVOASM_DECL_LOG_TAG("rand")

_EVOASM_DEF_ALLOC_FREE_FUNCS(prng)

void
evoasm_prng_init(evoasm_prng_t *prng, ...) {
  va_list args;
  unsigned i;
  va_start(args, prng);

  for(i = 0; i < EVOASM_PRNG_SEED_LEN; i++) {
    prng->state.data[i] = va_arg(args, uint64_t);
  }

  prng->p = 0;

{'fraction_non_alphanumeric': 0.14489311163895488, 'fraction_numerical': 0.018210609659540775, 'mean_word_length': 3.842911877394636, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 12, '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': '7104225', 'n_tokens_mistral': 559, 'n_tokens_neox': 516, 'n_words': 133}