<commit_before>#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <assert.h>
#include <string.h>

#ifdef __SPEC_HOOK___libc_start_main

extern "C" void __tern_prog_begin(void);  //  lib/runtime/helper.cpp
extern "C" void __tern_prog_end(void); //  lib/runtime/helper.cpp
//extern "C" void tern_exit(unsigned ins, int status); //  lib/runtime/runtime.cpp

typedef int (*main_type)(int, char**, char**);

struct arg_type
{
  char **argv;
  int (*main_func) (int, char **, char **);
};

main_type saved_init_func = NULL;
void tern_init_func(int argc, char **argv, char **env){
  if(saved_init_func)
    saved_init_func(argc, argv, env);
  __tern_prog_begin();
}

typedef void (*fini_type)(void*);
fini_type saved_fini_func = NULL;
void tern_fini_func(void* status) {<commit_msg>minor: remove commented tern_exit prototype since no need to hook exit()<commit_after>#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <assert.h>
#include <string.h>

#ifdef __SPEC_HOOK___libc_start_main

extern "C" void __tern_prog_begin(void);  //  lib/runtime/helper.cpp
extern "C" void __tern_prog_end(void); //  lib/runtime/helper.cpp

typedef int (*main_type)(int, char**, char**);

struct arg_type
{
  char **argv;
  int (*main_func) (int, char **, char **);
};

main_type saved_init_func = NULL;
void tern_init_func(int argc, char **argv, char **env){
  if(saved_init_func)
    saved_init_func(argc, argv, env);
  __tern_prog_begin();
}

typedef void (*fini_type)(void*);
fini_type saved_fini_func = NULL;
void tern_fini_func(void* status) {
{'fraction_non_alphanumeric': 0.15159235668789808, 'fraction_numerical': 0.0, 'mean_word_length': 5.491735537190083, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '5596188', 'n_tokens_mistral': 621, 'n_tokens_neox': 592, 'n_words': 138}