input stringlengths 16 454k | output stringlengths 13 350k | function_name stringlengths 1 100 | repo_name stringlengths 6 43 | category stringclasses 76
values | sample_id stringlengths 22 88 | decompiler stringclasses 1
value | opt_level stringclasses 1
value |
|---|---|---|---|---|---|---|---|
void fa_dot(FILE *out, fa *fa) {
const char *v2;
int i;
state *s;
state *s_0;
trans *t;
re_str str;
unsigned long v8;
v8 = __readfsqword(0x28u);
fwrite("digraph {\n rankdir=LR;", 1u, 0x17u, out);
for (s = fa->initial; s; s = s->next) {
if ((*((_BYTE *)s + 16) & 1) != 0)
fprintf(out, "\"%... | void fa_dot(FILE *out, struct fa *fa) {
fprintf(out, "digraph {\n rankdir=LR;");
list_for_each(s, fa->initial) {
if (s->accept) {
fprintf(out, "\"%p\" [shape=doublecircle];\n", s);
} else {
fprintf(out, "\"%p\" [shape=circle];\n", s);
... | fa_dot | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
void fa_dot_debug(fa *fa, const char *tag) {
int v2;
char *fname;
const char *dot_dir;
FILE *fp;
unsigned long v6;
v6 = __readfsqword(0x28u);
dot_dir = getenv("FA_DOT_DIR");
if (dot_dir) {
v2 = count_34++;
if (asprintf(&fname, "%s/fa_%02d_%s.dot", dot_dir, v2, tag) != -1) {
fp = fopen(fna... | ATTRIBUTE_UNUSED
static void fa_dot_debug(struct fa *fa, const char *tag) {
const char *dot_dir;
static int count = 0;
int r;
char *fname;
FILE *fp;
if ((dot_dir = getenv(FA_DOT_DIR)) == NULL)
return;
r = asprintf(&fnam... | fa_dot_debug | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
int fa_enumerate(fa *fa, int limit, char ***words) {
char **v4;
int result;
int i;
state *s;
enum_intl ei;
unsigned long v10;
v10 = __readfsqword(0x28u);
result = -1;
*words = 0;
memset(&ei, 0, sizeof(ei));
ei.bsize = 8;
ei.limit = limit;
if (mem_alloc_n(&ei.words, 8u, limit) < 0 ||
mem... | int fa_enumerate(struct fa *fa, int limit, char ***words) {
struct enum_intl ei;
int result = -1;
*words = NULL;
MEMZERO(&ei, 1);
ei.bsize = 8;
ei.limit = limit;
F(ALLOC_N(ei.words, limit));
F(ALLOC_N(ei.buf, ei.bsize));
... | fa_enumerate | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
int fa_enumerate_intl(state *s, enum_intl *ei, int pos) {
char **v4;
int result;
int i;
trans *t;
result = -1;
if (ei->bsize > pos + 1 ||
(ei->bsize *= 2LL, mem_realloc_n(&ei->buf, 1u, ei->bsize) >= 0)) {
ei->buf[pos] = 0;
for (t = s->trans; t - s->trans < s->tused; ++t) {
if ((*((_BYTE... | static int fa_enumerate_intl(struct state *s, struct enum_intl *ei,
int pos) {
int result = -1;
if (ei->bsize <= pos + 1) {
ei->bsize *= 2;
F(REALLOC_N(ei->buf, ei->bsize));
}
ei->buf[pos] = '\0';
fo... | fa_enumerate_intl | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
int fa_equals(fa *fa1, fa *fa2) {
int c1;
if (!fa1 || !fa2)
return -1;
c1 = fa_contains(fa1, fa2);
if (c1 < 0)
return -1;
if (c1)
return fa_contains(fa2, fa1);
return 0;
} | int fa_equals(struct fa *fa1, struct fa *fa2) {
if (fa1 == NULL || fa2 == NULL)
return -1;
int c1 = fa_contains(fa1, fa2);
if (c1 < 0)
return -1;
if (c1 == 0)
return 0;
return fa_contains(fa2, fa1);
} | fa_equals | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
int fa_example(fa *fa, char **example, size_t *example_len) {
re_str **v3;
unsigned int v4;
char c;
int i;
int toind;
re_str *word;
state_set *worklist;
re_str *str;
trans *t;
state_set *path;
re_str *ps_0;
state *s;
re_str *ps;
re_str *w;
word = 0;
worklist = 0;
*example = 0;
*exam... | int fa_example(struct fa *fa, char **example, size_t *example_len) {
struct re_str *word = NULL;
struct state_set *path = NULL, *worklist = NULL;
struct re_str *str = NULL;
*example = NULL;
*example_len = 0;
sort_transition_intervals(fa);
p... | fa_example | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
int fa_expand_char_ranges(const char *regexp, size_t regexp_len,
char **newregexp, size_t *newregexp_len) {
int result;
re *re;
re_str str;
re_parse parse;
unsigned long v11;
v11 = __readfsqword(0x28u);
*newregexp = 0;
memset(&parse, 0, sizeof(parse));
parse.rx = regexp;
p... | int fa_expand_char_ranges(const char *regexp, size_t regexp_len,
char **newregexp, size_t *newregexp_len) {
int result;
struct re *re = NULL;
struct re_parse parse;
struct re_str str;
*newregexp = NULL;
MEMZERO(&parse,... | fa_expand_char_ranges | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
int fa_expand_nocase(const char *regexp, size_t regexp_len, char **newregexp,
size_t *newregexp_len) {
int v5;
int result;
int r;
re *re;
re_str str;
re_parse parse;
unsigned long v13;
v13 = __readfsqword(0x28u);
*newregexp = 0;
memset(&parse, 0, sizeof(parse));
parse.rx = re... | int fa_expand_nocase(const char *regexp, size_t regexp_len,
char **newregexp, size_t *newregexp_len) {
int result, r;
struct re *re = NULL;
struct re_parse parse;
struct re_str str;
*newregexp = NULL;
MEMZERO(&parse, 1);
... | fa_expand_nocase | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
void fa_free(fa *fa) {
if (fa) {
gut(fa);
free(fa);
}
} | void fa_free(struct fa *fa) {
if (fa == NULL)
return;
gut(fa);
free(fa);
} | fa_free | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
fa *fa_from_re(re *re) {
fa *fa2;
fa *result;
fa *fa;
unsigned long v5;
v5 = __readfsqword(0x28u);
result = 0;
switch (re->type) {
case re_type_UNION:
result = fa_from_re(re->exp1);
if (!result)
goto error;
fa2 = fa_from_re(re->exp2);
if (!fa2 || union_in_place(result, &fa2) < 0)
... | static struct fa *fa_from_re(struct re *re) {
struct fa *result = NULL;
switch (re->type) {
case UNION: {
result = fa_from_re(re->exp1);
if (result == NULL)
goto error;
struct fa *fa2 = fa_from_re(re->exp2);
if (fa2 == ... | fa_from_re | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
fa *fa_intersect(fa *fa1, fa *fa2) {
bool v3;
uchar v4;
uchar max;
char v6;
bool v7;
uchar min;
int n1;
int b2;
int n2;
fa *fa;
state_set *worklist;
state_triple_hash *newstates;
state *r;
state *s;
state *p2;
state *p1;
trans *t1;
trans *t2;
fa = 0;
worklist = 0;
newstates = ... | struct fa *fa_intersect(struct fa *fa1, struct fa *fa2) {
int ret;
struct fa *fa = NULL;
struct state_set *worklist = NULL;
state_triple_hash *newstates = NULL;
if (fa1 == fa2)
return fa_clone(fa1);
if (fa_is_basic(fa1, FA_EMPTY) || fa_is_... | fa_intersect | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
int fa_is_basic(fa *fa, unsigned int basic) {
trans *t1;
trans *t2;
trans *t;
switch (basic) {
case 0u:
return (*((_BYTE *)fa->initial + 16) & 1) == 0 && !fa->initial->tused;
case 1u:
return (*((_BYTE *)fa->initial + 16) & 1) != 0 && !fa->initial->tused;
case 2u:
if ((*((_BYTE *)fa->initial +... | int fa_is_basic(struct fa *fa, unsigned int basic) {
if (basic == FA_EMPTY) {
return !fa->initial->accept && fa->initial->tused == 0;
} else if (basic == FA_EPSILON) {
return fa->initial->accept && fa->initial->tused == 0;
} else if (basic == FA_TOTAL) {
... | fa_is_basic | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
bool fa_is_deterministic(fa *fa) { return (*((_BYTE *)fa + 8) & 1) != 0; } | bool fa_is_deterministic(struct fa *fa) { return fa->deterministic; } | fa_is_deterministic | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
int fa_is_nocase(fa *fa) { return (*((_BYTE *)fa + 8) & 4) != 0; } | int fa_is_nocase(struct fa *fa) { return fa->nocase; } | fa_is_nocase | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
fa *fa_iter(fa *fa, int min, int max) {
int maxa;
int mina;
fa *cfa2;
fa *cfa_0;
state *s;
state *s_0;
fa *cfa3;
fa *cfa;
unsigned long v12;
mina = min;
v12 = __readfsqword(0x28u);
if (min < 0)
mina = 0;
if (mina > max && max != -1)
return fa_make_empty();
if (max == -1) {
cfa2 ... | struct fa *fa_iter(struct fa *fa, int min, int max) {
int r;
if (min < 0)
min = 0;
if (min > max && max != -1) {
return fa_make_empty();
}
if (max == -1) {
struct fa *sfa = fa_star(fa);
if (min == 0)
... | fa_iter | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
int fa_json(FILE *out, fa *fa) {
int v2;
int v3;
char first;
char firsta;
int list_size;
int num_states;
int it;
int result;
hash_val_t *list_hashes;
state *s;
state *s_0;
trans *t;
state *s_1;
unsigned long v16;
v16 = __readfsqword(0x28u);
list_hashes = 0;
list_size = 100;
num_stat... | int fa_json(FILE *out, struct fa *fa) {
hash_val_t *list_hashes = NULL;
int list_size = 100;
int num_states = 0;
int it;
char first = true;
int result = -1;
fprintf(out, "{\n\t\"final\": [");
F(ALLOC_N(list_hashes, list_size));
... | fa_json | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
fa *fa_make_basic(unsigned int basic) {
fa *fa;
if (!basic)
return fa_make_empty();
if (basic == 1)
return fa_make_epsilon();
if (basic != 2)
return 0;
fa = fa_make_epsilon();
if (add_new_trans(fa->initial, fa->initial, 0, 0xFFu) < 0) {
fa_free(fa);
return 0;
}
return fa;
} | struct fa *fa_make_basic(unsigned int basic) {
int r;
if (basic == FA_EMPTY) {
return fa_make_empty();
} else if (basic == FA_EPSILON) {
return fa_make_epsilon();
} else if (basic == FA_TOTAL) {
struct fa *fa = fa_make_epsilon();
... | fa_make_basic | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
fa *fa_make_char(uchar c) {
fa *fa;
state *s;
state *t;
fa = fa_make_empty();
if (!fa)
return 0;
s = fa->initial;
t = add_state(fa, 1);
if (t && add_new_trans(s, t, c, c) >= 0) {
*((_BYTE *)fa + 8) |= 1u;
*((_BYTE *)fa + 8) |= 2u;
return fa;
} else {
fa_free(fa);
return 0;
}... | static struct fa *fa_make_char(uchar c) {
struct fa *fa = fa_make_empty();
if (!fa)
return NULL;
struct state *s = fa->initial;
struct state *t = add_state(fa, 1);
int r;
if (t == NULL)
goto error;
r = add_new_tran... | fa_make_char | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
fa *fa_make_char_set(bitset *cset, int negate) {
int from;
int to;
fa *fa;
state *s;
state *t;
fa = fa_make_empty();
if (!fa)
return 0;
s = fa->initial;
t = add_state(fa, 1);
from = 0;
if (t) {
while (from <= 255) {
while (from <= 255 && negate == bitset_get(cset, from))
++f... | static struct fa *fa_make_char_set(bitset *cset, int negate) {
struct fa *fa = fa_make_empty();
if (!fa)
return NULL;
struct state *s = fa->initial;
struct state *t = add_state(fa, 1);
int from = 0;
int r;
if (t == NULL)
... | fa_make_char_set | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
fa *fa_make_empty() {
fa *fa[2];
fa[1] = (fa *)__readfsqword(0x28u);
if (mem_alloc_n(fa, 0x10u, 1u) < 0)
return 0;
if (add_state(fa[0], 0))
return fa[0];
fa_free(fa[0]);
return 0;
} | static struct fa *fa_make_empty(void) {
struct fa *fa;
if (ALLOC(fa) < 0)
return NULL;
if (add_state(fa, 0) == NULL) {
fa_free(fa);
return NULL;
}
return fa;
} | fa_make_empty | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
fa *fa_make_epsilon() {
fa *fa;
fa = fa_make_empty();
if (fa) {
*((_BYTE *)fa->initial + 16) |= 1u;
*((_BYTE *)fa + 8) |= 1u;
*((_BYTE *)fa + 8) |= 2u;
}
return fa;
} | static struct fa *fa_make_epsilon(void) {
struct fa *fa = fa_make_empty();
if (fa) {
fa->initial->accept = 1;
fa->deterministic = 1;
fa->minimal = 1;
}
return fa;
} | fa_make_epsilon | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
void fa_merge(fa *fa1, fa **fa2) {
state *_p;
if (fa1->initial) {
for (_p = fa1->initial; _p->next; _p = _p->next)
;
_p->next = (*fa2)->initial;
} else {
fa1->initial = (*fa2)->initial;
}
free(*fa2);
*fa2 = 0;
} | static void fa_merge(struct fa *fa1, struct fa **fa2) {
list_append(fa1->initial, (*fa2)->initial);
free(*fa2);
*fa2 = NULL;
} | fa_merge | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
int fa_minimize(fa *fa) {
int r;
if (!fa)
return -1;
if ((*((_BYTE *)fa + 8) & 2) != 0)
return 0;
if (fa_minimization_algorithm == 1)
r = minimize_brzozowski(fa);
else
r = minimize_hopcroft(fa);
if (!r)
*((_BYTE *)fa + 8) |= 2u;
return r;
} | int fa_minimize(struct fa *fa) {
int r;
if (fa == NULL)
return -1;
if (fa->minimal)
return 0;
if (fa_minimization_algorithm == FA_MIN_BRZOZOWSKI) {
r = minimize_brzozowski(fa);
} else {
r = minimize_hopcroft(fa)... | fa_minimize | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
fa *fa_minus(fa *fa1, fa *fa2) {
fa *cfa2;
fa *result;
if (!fa1 || !fa2)
return 0;
if (fa_is_basic(fa1, 0) || fa1 == fa2)
return fa_make_empty();
if (fa_is_basic(fa2, 0))
return fa_clone(fa1);
cfa2 = fa_complement(fa2);
if (!cfa2)
return 0;
result = fa_intersect(fa1, cfa2);
fa_free(cf... | struct fa *fa_minus(struct fa *fa1, struct fa *fa2) {
if (fa1 == NULL || fa2 == NULL)
return NULL;
if (fa_is_basic(fa1, FA_EMPTY) || fa1 == fa2)
return fa_make_empty();
if (fa_is_basic(fa2, FA_EMPTY))
return fa_clone(fa1);
struct fa *c... | fa_minus | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
int fa_nocase(fa *fa) {
char v2;
uchar v3;
int i;
int tused;
uchar lc_min;
uchar lc_max;
state *s;
trans *t;
if (!fa || (*((_BYTE *)fa + 8) & 4) != 0)
return 0;
*((_BYTE *)fa + 8) |= 4u;
for (s = fa->initial; s; s = s->next) {
tused = s->tused;
for (i = 0; i < tused; ++i) {
t = ... | int fa_nocase(struct fa *fa) {
if (fa == NULL || fa->nocase)
return 0;
fa->nocase = 1;
list_for_each(s, fa->initial) {
int tused = s->tused;
for (int i = 0; i < tused; i++) {
struct trans *t = s->trans + i;
int lc_mi... | fa_nocase | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
fa *fa_overlap(fa *fa1, fa *fa2) {
fa *fa2a;
fa *fa1a;
fa *fa;
fa *eps;
fa *result;
state_set *map;
state_set *mapa;
fa = 0;
eps = 0;
result = 0;
if (!fa1 || !fa2)
return 0;
fa1a = fa_clone(fa1);
fa2a = fa_clone(fa2);
if (fa1a) {
if (fa2a) {
if (determinize(fa1a, 0) >= 0 && ac... | struct fa *fa_overlap(struct fa *fa1, struct fa *fa2) {
struct fa *fa = NULL, *eps = NULL, *result = NULL;
struct state_set *map = NULL;
if (fa1 == NULL || fa2 == NULL)
return NULL;
fa1 = fa_clone(fa1);
fa2 = fa_clone(fa2);
if (fa1 == NULL... | fa_overlap | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
int fa_restrict_alphabet(const char *regexp, size_t regexp_len,
char **newregexp, size_t *newregexp_len, char from,
char to) {
int result;
re *re;
re_str str;
re_parse parse;
unsigned long v15;
v15 = __readfsqword(0x28u);
*newregexp = 0;
memset(&parse, ... | int fa_restrict_alphabet(const char *regexp, size_t regexp_len,
char **newregexp, size_t *newregexp_len,
char from, char to) {
int result;
struct re *re = NULL;
struct re_parse parse;
struct re_str str;
... | fa_restrict_alphabet | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
state_set *fa_reverse(fa *fa) {
int i;
int i_0;
int j;
int i_1;
int *tused;
state_set *accept;
state_set *all;
state *s;
state *s_0;
trans *t;
unsigned long v12;
v12 = __readfsqword(0x28u);
accept = 0;
all = fa_states(fa);
if (!all)
goto error;
accept = fa_accept_states(fa);
if (!... | static struct state_set *fa_reverse(struct fa *fa) {
struct state_set *all = NULL;
struct state_set *accept = NULL;
int r;
all = fa_states(fa);
E(all == NULL);
accept = fa_accept_states(fa);
E(accept == NULL);
F(state_set_init_dat... | fa_reverse | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
fa *fa_star(fa *fa) {
fa *faa;
state *p;
state *s;
faa = fa_clone(fa);
if (!faa)
return 0;
s = add_state(faa, 1);
if (s && add_epsilon_trans(s, faa->initial) >= 0) {
set_initial(faa, s);
for (p = faa->initial->next; p; p = p->next) {
if ((*((_BYTE *)p + 16) & 1) != 0 && add_epsilon_tran... | static struct fa *fa_star(struct fa *fa) {
struct state *s;
int r;
fa = fa_clone(fa);
if (fa == NULL)
return NULL;
s = add_state(fa, 1);
if (s == NULL)
goto error;
r = add_epsilon_trans(s, fa->initial);
... | fa_star | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
state *fa_state_initial(fa *fa) { return fa->initial; } | struct state *fa_state_initial(struct fa *fa) { return fa->initial; } | fa_state_initial | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
bool fa_state_is_accepting(state *st) { return (*((_BYTE *)st + 16) & 1) != 0; } | bool fa_state_is_accepting(struct state *st) { return st->accept; } | fa_state_is_accepting | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
state *fa_state_next(state *st) { return st->next; } | struct state *fa_state_next(struct state *st) { return st->next; } | fa_state_next | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
size_t fa_state_num_trans(state *st) { return st->tused; } | size_t fa_state_num_trans(struct state *st) { return st->tused; } | fa_state_num_trans | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
int fa_state_trans(state *st, size_t i, state **to, unsigned char *min,
unsigned char *max) {
if (i >= st->tused)
return -1;
*to = st->trans[i].to;
*min = st->trans[i].min;
*max = st->trans[i].max;
return 0;
} | int fa_state_trans(struct state *st, size_t i, struct state **to,
unsigned char *min, unsigned char *max) {
if (st->tused <= i)
return -1;
(*to) = st->trans[i].to;
(*min) = st->trans[i].min;
(*max) = st->trans[i].max;
retur... | fa_state_trans | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
state_set *fa_states(fa *fa) {
int r;
state *s;
state_set *visited;
visited = state_set_init(-1, 0);
r = mark_reachable(fa);
if (visited && r >= 0) {
for (s = fa->initial; s; s = s->next) {
if ((*((_BYTE *)s + 16) & 4) != 0 && state_set_push(visited, s) < 0)
goto error;
}
return v... | static struct state_set *fa_states(struct fa *fa) {
struct state_set *visited = state_set_init(-1, S_NONE);
int r;
r = mark_reachable(fa);
E(visited == NULL || r < 0);
list_for_each(s, fa->initial) {
if (s->reachable)
F(state_set_push(... | fa_states | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
fa *fa_union(fa *fa1, fa *fa2) {
fa *fa2a;
fa *fa1a;
fa1a = fa_clone(fa1);
fa2a = fa_clone(fa2);
if (fa1a && fa2a && union_in_place(fa1a, &fa2a) >= 0)
return fa1a;
fa_free(fa1a);
fa_free(fa2a);
return 0;
} | struct fa *fa_union(struct fa *fa1, struct fa *fa2) {
fa1 = fa_clone(fa1);
fa2 = fa_clone(fa2);
if (fa1 == NULL || fa2 == NULL)
goto error;
F(union_in_place(fa1, &fa2));
return fa1;
error:
fa_free(fa1);
fa_free(fa2);
... | fa_union | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
bitset *first_chars(fa *fa) {
int i;
uint c;
bitset *bs;
state *s;
bs = bitset_init(0x100u);
s = fa->initial;
if (!bs)
return 0;
for (i = 0; i < s->tused; ++i) {
for (c = s->trans[i].min; c <= s->trans[i].max; ++c)
bitset_set(bs, c);
}
return bs;
} | static bitset *first_chars(struct fa *fa) {
bitset *bs = bitset_init(UCHAR_NUM);
struct state *s = fa->initial;
if (bs == NULL)
return NULL;
for (int i = 0; i < s->tused; i++) {
for (uint c = s->trans[i].min; c <= s->trans[i].max; c++)
... | first_chars | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
void free_re(re *re) {
re *v1;
re *exp2;
re *exp1;
if (re) {
if (re->ref)
__assert_fail("re->ref == 0", "fa.c", 0xC26u, "free_re");
if (re->type > (unsigned int)re_type_CONCAT) {
if (re->type == re_type_ITER) {
if (re->exp1 && re->exp1->ref != -1) {
if (!re->exp1->ref)
... | static void free_re(struct re *re) {
if (re == NULL)
return;
assert(re->ref == 0);
if (re->type == UNION || re->type == CONCAT) {
re_unref(re->exp1);
re_unref(re->exp2);
} else if (re->type == ITER) {
re_unref(re->exp);
... | free_re | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
void free_re_str(re_str *str) {
if (str) {
release_re_str(str);
free(str);
}
} | static void free_re_str(struct re_str *str) {
if (str == NULL)
return;
release_re_str(str);
FREE(str);
} | free_re_str | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
void free_trans(state *s) {
free(s->trans);
s->trans = 0;
s->tsize = 0;
s->tused = s->tsize;
} | static void free_trans(struct state *s) {
free(s->trans);
s->trans = NULL;
s->tused = s->tsize = 0;
} | free_trans | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
void freea(void *p) {
if (((unsigned char)p & 0xF) != 0)
abort();
if (((unsigned char)p & 0x10) != 0)
free((char *)p - (unsigned char)*((char *)p - 1));
} | void freea(void *p) {
if ((uintptr_t)p & (sa_alignment_max - 1)) {
abort();
}
if ((uintptr_t)p & sa_alignment_max) {
void *mem = (char *)p - ((small_t *)p)[-1];
free(mem);
}
} | freea | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
int glthread_rwlock_init_for_glibc(pthread_rwlock_t *lock) {
int err;
int erra;
pthread_rwlockattr_t attributes;
unsigned long v5;
v5 = __readfsqword(0x28u);
err = pthread_rwlockattr_init(&attributes);
if (err)
return err;
erra = pthread_rwlockattr_setkind_np(&attributes, 2);
if (!erra)
erra ... | int glthread_rwlock_init_for_glibc(pthread_rwlock_t *lock) {
pthread_rwlockattr_t attributes;
int err;
err = pthread_rwlockattr_init(&attributes);
if (err != 0)
return err;
err = pthread_rwlockattr_setkind_np(
&attributes, PTHREAD_RWLO... | glthread_rwlock_init_for_glibc | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
void grow_table(hash_t *hash) {
hashcount_t hash_chain;
hnode_t *low_chain;
hnode_t *high_chain;
hnode_t *hptr;
hnode_t **newtable;
hash_val_t hash_mask;
hash_val_t exposed_bit;
hnode_t *hash_next;
if (2 * hash->hash_nchains <= hash->hash_nchains)
__assert_fail("2 * hash->nchains > hash->nchains"... | static void grow_table(hash_t *hash) {
hnode_t **newtable;
assert(2 * hash->nchains > hash->nchains);
newtable =
realloc(hash->table, sizeof *newtable * hash->nchains * 2);
if (newtable) {
hash_val_t mask = (hash->mask << 1) | 1;
ha... | grow_table | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
void gut(fa *fa) {
state *s;
state *_p;
for (s = fa->initial; s; s = s->next)
free_trans(s);
while (fa->initial) {
_p = fa->initial;
fa->initial = fa->initial->next;
free(_p);
}
fa->initial = 0;
} | static void gut(struct fa *fa) {
list_for_each(s, fa->initial) { free_trans(s); }
list_free(fa->initial);
fa->initial = NULL;
} | gut | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
bool hard_locale(int category) {
char hard;
char *p;
hard = 1;
p = setlocale(category, 0);
if (p && (!strcmp(p, "C") || !strcmp(p, "POSIX")))
return 0;
return hard;
} | bool hard_locale(int category) {
bool hard = true;
char const *p = setlocale(category, NULL);
if (p) {
if (2 <= GLIBC_VERSION) {
if (strcmp(p, "C") == 0 || strcmp(p, "POSIX") == 0)
hard = false;
} else {
char *loc... | hard_locale | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
int hash_alloc_insert(hash_t *hash, const void *hash_key, void *hash_data) {
hnode_t *node;
node = hash->hash_allocnode(hash->hash_context);
if (!node)
return -1;
hnode_init(node, hash_data);
hash_insert(hash, node, hash_key);
return 0;
} | int hash_alloc_insert(hash_t *hash, const void *key, void *data) {
hnode_t *node = hash->allocnode(hash->context);
if (node) {
hnode_init(node, data);
hash_insert(hash, node, key);
return 0;
}
return -1;
} | hash_alloc_insert | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
int hash_comp_default(const void *key1, const void *key2) {
return strcmp((const char *)key1, (const char *)key2);
} | static int hash_comp_default(const void *key1, const void *key2) {
return strcmp(key1, key2);
} | hash_comp_default | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
hashcount_t hash_count(hash_t *hash) { return hash->hash_nodecount; } | hashcount_t hash_count(hash_t *hash) { return hash->nodecount; } | hash_count | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
hash_t *hash_create(hashcount_t hash_maxcount, hash_comp_t compfun,
hash_fun_t hashfun) {
int (*v3)(const void *, const void *);
hash_val_t (*v4)(const void *);
hash_t *hash;
if (!hash_val_t_bit)
compute_bits();
hash = (hash_t *)malloc(0x68u);
if (!hash)
return 0;
hash->hash_t... | hash_t *hash_create(hashcount_t maxcount, hash_comp_t compfun,
hash_fun_t hashfun) {
hash_t *hash;
if (hash_val_t_bit == 0)
compute_bits();
hash = malloc(sizeof *hash);
if (hash) {
hash->table = malloc(sizeof *hash->ta... | hash_create | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
hnode_t *hash_delete(hash_t *hash, hnode_t *node) {
hnode_t *hptr;
hash_val_t hash_chain;
if (!hash_val_t_bit)
__assert_fail("hash_val_t_bit != 0", "hash.c", 0x264u, "hash_delete");
if (hash->hash_dynamic && hash->hash_nodecount <= hash->hash_lowmark &&
hash->hash_nodecount > 0x10)
shrink_table(h... | hnode_t *hash_delete(hash_t *hash, hnode_t *node) {
hash_val_t chain;
hnode_t *hptr;
expensive_assert(hash_lookup(hash, node->key) == node);
assert(hash_val_t_bit != 0);
if (hash->dynamic && hash->nodecount <= hash->lowmark &&
hash->nodecount > INI... | hash_delete | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
void hash_delete_free(hash_t *hash, hnode_t *node) {
hash_delete(hash, node);
hash->hash_freenode(node, hash->hash_context);
} | void hash_delete_free(hash_t *hash, hnode_t *node) {
hash_delete(hash, node);
hash->freenode(node, hash->context);
} | hash_delete_free | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
void hash_destroy(hash_t *hash) {
if (!hash_val_t_bit)
__assert_fail("hash_val_t_bit != 0", "hash.c", 0x18Cu, "hash_destroy");
if (hash->hash_nodecount)
__assert_fail("hash_isempty(hash)", "hash.c", 0x18Du, "hash_destroy");
free(hash->hash_table);
free(hash);
} | void hash_destroy(hash_t *hash) {
assert(hash_val_t_bit != 0);
assert(hash_isempty(hash));
free(hash->table);
free(hash);
} | hash_destroy | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
void hash_free(hash_t *hash) {
hash_free_nodes(hash);
hash_destroy(hash);
} | void hash_free(hash_t *hash) {
#ifdef KAZLIB_OBSOLESCENT_DEBUG
assert("call to obsolescent function hash_free()" && 0);
#endif
hash_free_nodes(hash);
hash_destroy(hash);
} | hash_free | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
void hash_free_nodes(hash_t *hash) {
hnode_t *node;
hashcount_t hash_chain;
hnode_t *hash_next;
for (hash_chain = 0; hash_chain < hash->hash_nchains; ++hash_chain) {
for (node = hash->hash_table[hash_chain]; node; node = hash_next) {
hash_next = node->hash_next;
hash->hash_freenode(node, hash->... | void hash_free_nodes(hash_t *hash) {
hnode_t *node, *next;
hash_val_t chain;
for (chain = 0; chain < hash->nchains; chain++) {
node = hash->table[chain];
while (node != NULL) {
next = node->next;
hash->freenode(node, hash->context... | hash_free_nodes | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
hash_val_t hash_fun_default(const void *hash_key) {
_BYTE *v1;
hash_val_t acc;
hash_val_t acca;
hash_val_t accb;
hash_val_t accc;
acc = 0;
while (*(_BYTE *)hash_key) {
acca = randbox_0[(*(_BYTE *)hash_key + (_BYTE)acc) & 0xF] ^ acc;
accb = (2 * (_DWORD)acca) | (unsigned int)(acca >> 31);
v1 =... | static hash_val_t hash_fun_default(const void *key) {
static unsigned long randbox[] = {
0x49848f1bU, 0xe6255dbaU, 0x36da5bdcU, 0x47bf94e9U,
0x8cbcce22U, 0x559fc06aU, 0xd268f536U, 0xe10af79aU,
0xc1af4d69U, 0x1d2917b5U, 0xec4c304dU, 0x9ee5016cU,
0x69... | hash_fun_default | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
hash_t *hash_init(hash_t *hash, hashcount_t hash_maxcount, hash_comp_t compfun,
hash_fun_t hashfun, hnode_t **hash_table,
hashcount_t hash_nchains) {
int (*v6)(const void *, const void *);
hash_val_t (*v7)(const void *);
if (!hash_val_t_bit)
compute_bits();
if (!is_power... | hash_t *hash_init(hash_t *hash, hashcount_t maxcount,
hash_comp_t compfun, hash_fun_t hashfun,
hnode_t **table, hashcount_t nchains) {
if (hash_val_t_bit == 0)
compute_bits();
assert(is_power_of_two(nchains));
hash->ta... | hash_init | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
void hash_insert(hash_t *hash, hnode_t *node, const void *hash_key) {
hash_val_t v3;
hash_val_t hash_chain;
if (!hash_val_t_bit)
__assert_fail("hash_val_t_bit != 0", "hash.c", 0x21Au, "hash_insert");
if (node->hash_next)
__assert_fail("node->next == NULL", "hash.c", 0x21Bu, "hash_insert");
if (hash->... | void hash_insert(hash_t *hash, hnode_t *node, const void *key) {
hash_val_t hkey, chain;
assert(hash_val_t_bit != 0);
assert(node->next == NULL);
assert(hash->nodecount < hash->maxcount);
expensive_assert(hash_lookup(hash, key) == NULL);
if (hash->dyna... | hash_insert | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
int hash_isempty(hash_t *hash) { return hash->hash_nodecount == 0; } | int hash_isempty(hash_t *hash) { return hash->nodecount == 0; } | hash_isempty | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
int hash_isfull(hash_t *hash) {
return hash->hash_nodecount == hash->hash_maxcount;
} | int hash_isfull(hash_t *hash) {
return hash->nodecount == hash->maxcount;
} | hash_isfull | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
hnode_t *hash_lookup(hash_t *hash, const void *hash_key) {
hnode_t *nptr;
hash_val_t hash_hkey;
hash_hkey = hash->hash_function(hash_key);
for (nptr = hash->hash_table[hash_hkey & hash->hash_mask]; nptr;
nptr = nptr->hash_next) {
if (hash_hkey == nptr->hash_hkey &&
!hash->hash_compare(nptr->... | hnode_t *hash_lookup(hash_t *hash, const void *key) {
hash_val_t hkey, chain;
hnode_t *nptr;
hkey = hash->function(key);
chain = hkey & hash->mask;
for (nptr = hash->table[chain]; nptr; nptr = nptr->next) {
if (nptr->hkey == hkey && hash->compare(npt... | hash_lookup | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
void hash_scan_begin(hscan_t *scan, hash_t *hash) {
hash_val_t hash_chain;
hashcount_t hash_nchains;
hash_nchains = hash->hash_nchains;
scan->hash_table = hash;
for (hash_chain = 0;
hash_chain < hash_nchains && !hash->hash_table[hash_chain]; ++hash_chain)
;
if (hash_chain >= hash_nchains) {
... | void hash_scan_begin(hscan_t *scan, hash_t *hash) {
hash_val_t nchains = hash->nchains;
hash_val_t chain;
scan->table = hash;
for (chain = 0; chain < nchains && hash->table[chain] == 0; chain++)
;
if (chain < nchains) {
scan->chain = ch... | hash_scan_begin | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
hnode_t *hash_scan_delete(hash_t *hash, hnode_t *node) {
hnode_t *hptr;
hash_val_t hash_chain;
if (!hash_val_t_bit)
__assert_fail("hash_val_t_bit != 0", "hash.c", 0x29Cu, "hash_scan_delete");
hash_chain = node->hash_hkey & hash->hash_mask;
hptr = hash->hash_table[hash_chain];
if (hptr == node) {
ha... | hnode_t *hash_scan_delete(hash_t *hash, hnode_t *node) {
hash_val_t chain;
hnode_t *hptr;
expensive_assert(hash_lookup(hash, node->key) == node);
assert(hash_val_t_bit != 0);
chain = node->hkey & hash->mask;
hptr = hash->table[chain];
if (h... | hash_scan_delete | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
void hash_scan_delfree(hash_t *hash, hnode_t *node) {
hash_scan_delete(hash, node);
hash->hash_freenode(node, hash->hash_context);
} | void hash_scan_delfree(hash_t *hash, hnode_t *node) {
hash_scan_delete(hash, node);
hash->freenode(node, hash->context);
} | hash_scan_delfree | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
hnode_t *hash_scan_next(hscan_t *scan) {
hash_val_t hash_chain;
hnode_t *hash_next;
hash_t *hash;
hashcount_t hash_nchains;
hash_next = scan->hash_next;
hash = scan->hash_table;
hash_chain = scan->hash_chain + 1;
hash_nchains = scan->hash_table->hash_nchains;
if (!hash_val_t_bit)
__assert_fail("h... | hnode_t *hash_scan_next(hscan_t *scan) {
hnode_t *next = scan->next;
hash_t *hash = scan->table;
hash_val_t chain = scan->chain + 1;
hash_val_t nchains = hash->nchains;
assert(hash_val_t_bit != 0);
if (next) {
if (next->next) {
... | hash_scan_next | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
void hash_set_allocator(hash_t *hash, hnode_alloc_t al_0, hnode_free_t fr,
void *hash_context) {
hnode_t *(*v4)(void *);
void (*v5)(hnode_t *, void *);
if (hash->hash_nodecount)
__assert_fail("hash_count(hash) == 0", "hash.c", 0x15Au,
"hash_set_allocator");
if (al_... | void hash_set_allocator(hash_t *hash, hnode_alloc_t al,
hnode_free_t fr, void *context) {
assert(hash_count(hash) == 0);
hash->allocnode = al ? al : hnode_alloc;
hash->freenode = fr ? fr : hnode_free;
hash->context = context;
} | hash_set_allocator | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
hashcount_t hash_size(hash_t *hash) { return hash->hash_nchains; } | hashcount_t hash_size(hash_t *hash) { return hash->nchains; } | hash_size | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
int hash_verify(hash_t *hash) {
hashcount_t count;
hashcount_t hash_chain;
hnode_t *hptr;
count = 0;
if (!hash->hash_dynamic)
goto LABEL_8;
if (hash->hash_lowmark >= hash->hash_highmark)
return 0;
if (!is_power_of_two(hash->hash_highmark))
return 0;
if (!is_power_of_two(hash->hash_lowmark))... | int hash_verify(hash_t *hash) {
hashcount_t count = 0;
hash_val_t chain;
hnode_t *hptr;
if (hash->dynamic) {
if (hash->lowmark >= hash->highmark)
return 0;
if (!is_power_of_two(hash->highmark))
return 0;
if... | hash_verify | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
hnode_t *hnode_alloc(void *hash_context) { return (hnode_t *)malloc(0x20u); } | static hnode_t *hnode_alloc(ATTRIBUTE_UNUSED void *context) {
return malloc(sizeof *hnode_alloc(NULL));
} | hnode_alloc | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
hnode_t *hnode_create(void *hash_data) {
hnode_t *node;
node = (hnode_t *)malloc(0x20u);
if (node) {
node->hash_data = hash_data;
node->hash_next = 0;
}
return node;
} | hnode_t *hnode_create(void *data) {
hnode_t *node = malloc(sizeof *node);
if (node) {
node->data = data;
node->next = NULL;
}
return node;
} | hnode_create | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
void hnode_destroy(hnode_t *hnode) { free(hnode); } | void hnode_destroy(hnode_t *hnode) { free(hnode); } | hnode_destroy | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
void hnode_free(hnode_t *node, void *hash_context) { free(node); } | static void hnode_free(hnode_t *node, ATTRIBUTE_UNUSED void *context) {
free(node);
} | hnode_free | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
void *hnode_get(hnode_t *node) { return node->hash_data; } | void *hnode_get(hnode_t *node) { return node->data; } | hnode_get | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
const void *hnode_getkey(hnode_t *node) { return node->hash_key; } | const void *hnode_getkey(hnode_t *node) { return node->key; } | hnode_getkey | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
hnode_t *hnode_init(hnode_t *hnode, void *hash_data) {
hnode->hash_data = hash_data;
hnode->hash_next = 0;
return hnode;
} | hnode_t *hnode_init(hnode_t *hnode, void *data) {
hnode->data = data;
hnode->next = NULL;
return hnode;
} | hnode_init | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
void hnode_put(hnode_t *node, void *hash_data) { node->hash_data = hash_data; } | void hnode_put(hnode_t *node, void *data) { node->data = data; } | hnode_put | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
int is_power_of_two(hash_val_t arg) {
hash_val_t arga;
arga = arg;
if (!arg)
return 0;
while ((arga & 1) == 0)
arga >>= 1;
return arga == 1;
} | static int is_power_of_two(hash_val_t arg) {
if (arg == 0)
return 0;
while ((arg & 1) == 0)
arg >>= 1;
return (arg == 1);
} | is_power_of_two | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
int is_splittable(fa *fa1, fa *fa2) {
unsigned char result;
bitset *alpha1;
bitset *first2;
bitset *alpha2;
bitset *last1;
alpha1 = 0;
first2 = 0;
result = 1;
alpha2 = alphabet(fa2);
last1 = last_chars(fa1);
if (alpha2 && last1) {
if (bitset_disjoint(last1, alpha2, 0x100u)) {
result = 1... | static int is_splittable(struct fa *fa1, struct fa *fa2) {
bitset *alpha1 = NULL;
bitset *alpha2 = NULL;
bitset *last1 = NULL;
bitset *first2 = NULL;
bool result = -1;
alpha2 = alphabet(fa2);
last1 = last_chars(fa1);
if (alpha2 == ... | is_splittable | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
bitset *last_chars(fa *fa) {
int i;
uint c;
state *s;
bitset *bs;
bs = bitset_init(0x100u);
if (!bs)
return 0;
for (s = fa->initial; s; s = s->next) {
for (i = 0; i < s->tused; ++i) {
if ((*((_BYTE *)s->trans[i].to + 16) & 1) != 0) {
for (c = s->trans[i].min; c <= s->trans[i].max; +... | static bitset *last_chars(struct fa *fa) {
bitset *bs = bitset_init(UCHAR_NUM);
if (bs == NULL)
return NULL;
list_for_each(s, fa->initial) {
for (int i = 0; i < s->tused; i++) {
if (s->trans[i].to->accept) {
for (uint c = s->tr... | last_chars | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
char *last_component(const char *name) {
bool saw_slash;
const char *p;
saw_slash = 0;
while (*name == 47)
++name;
for (p = name; *p; ++p) {
if (*p == 47) {
saw_slash = 1;
} else if (saw_slash) {
name = p;
saw_slash = 0;
}
}
return (char *)name;
} | char *last_component(char const *name) {
char const *base = name + FILE_SYSTEM_PREFIX_LEN(name);
char const *p;
bool saw_slash = false;
while (ISSLASH(*base))
base++;
for (p = base; *p; p++) {
if (ISSLASH(*p))
saw_slash = ... | last_component | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
const char *locale_charset() {
char *codeset;
codeset = nl_langinfo(14);
if (!codeset)
codeset = (char *)&unk_2E819;
if (!*codeset)
return "ASCII";
return codeset;
} | STATIC
#endif
const char *locale_charset(void) {
const char *codeset;
#if HAVE_LANGINFO_CODESET || defined WINDOWS_NATIVE || defined OS2
#if HAVE_LANGINFO_CODESET
codeset = nl_langinfo(CODESET);
#ifdef __CYGWIN__
if (codeset != NULL && strcmp(codeset, "US-ASCII") == 0) {
... | locale_charset | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
re *make_re(re_type type) {
re *re[2];
re[1] = (re *)__readfsqword(0x28u);
if (!ref_make_ref(re, 0x20u, 0))
re[0]->type = type;
return re[0];
} | static struct re *make_re(enum re_type type) {
struct re *re;
if (make_ref(re) == 0)
re->type = type;
return re;
} | make_re | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
re *make_re_binop(re_type type, re *exp1, re *exp2) {
re *re;
re = make_re(type);
if (re) {
re->exp1 = exp1;
re->exp2 = exp2;
} else {
if (exp1 && exp1->ref != -1) {
if (!exp1->ref)
__assert_fail("(exp1)->ref > 0", "fa.c", 0xCB3u, "make_re_binop");
if (!--exp1->ref)
free... | static struct re *make_re_binop(enum re_type type, struct re *exp1,
struct re *exp2) {
struct re *re = make_re(type);
if (re) {
re->exp1 = exp1;
re->exp2 = exp2;
} else {
re_unref(exp1);
re_unre... | make_re_binop | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
re *make_re_char(uchar c) {
re *re;
re = make_re(re_type_CHAR);
if (re)
re->negate = c;
return re;
} | static struct re *make_re_char(uchar c) {
struct re *re = make_re(CHAR);
if (re)
re->c = c;
return re;
} | make_re_char | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
re *make_re_char_set(bool negate, bool no_ranges) {
re *re;
re = make_re(re_type_CSET);
if (re) {
re->negate = negate;
*((_BYTE *)&re->3 + 16) = no_ranges | *(_BYTE *)(&re->3 + 1) & 0xFE;
re->exp2 = (re *)bitset_init(0x100u);
if (!re->exp2) {
if (re->ref != -1) {
if (!re->ref)
... | static struct re *make_re_char_set(bool negate, bool no_ranges) {
struct re *re = make_re(CSET);
if (re) {
re->negate = negate;
re->no_ranges = no_ranges;
re->cset = bitset_init(UCHAR_NUM);
if (re->cset == NULL)
re_unref(re);
... | make_re_char_set | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
re *make_re_rep(re *exp, int min, int max) {
re *re;
re = make_re(re_type_ITER);
if (re) {
re->exp1 = exp;
re->min = min;
re->max = max;
} else if (exp && exp->ref != -1) {
if (!exp->ref)
__assert_fail("(exp)->ref > 0", "fa.c", 0xCA7u, "make_re_rep");
if (!--exp->ref)
free_re(ex... | static struct re *make_re_rep(struct re *exp, int min, int max) {
struct re *re = make_re(ITER);
if (re) {
re->exp = exp;
re->min = min;
re->max = max;
} else {
re_unref(exp);
}
return re;
} | make_re_rep | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
re_str *make_re_str(const char *s) {
re_str *v2;
re_str *v3;
re_str *str[3];
str[1] = (re_str *)__readfsqword(0x28u);
if (mem_alloc_n(str, 0x10u, 1u) < 0)
return 0;
if (!s)
return str[0];
v2 = str[0];
v2->rx = strdup(s);
v3 = str[0];
v3->len = strlen(s);
if (str[0]->rx)
return str[0];... | static struct re_str *make_re_str(const char *s) {
struct re_str *str;
if (ALLOC(str) < 0)
return NULL;
if (s != NULL) {
str->rx = strdup(s);
str->len = strlen(s);
if (str->rx == NULL) {
FREE(str);
return... | make_re_str | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
state *make_state() {
state *v1;
state *s[3];
s[1] = (state *)__readfsqword(0x28u);
if (mem_alloc_n(s, 0x30u, 1u) == -1)
return 0;
v1 = s[0];
v1->hash = ptr_hash(s[0]);
return s[0];
} | static struct state *make_state(void) {
struct state *s;
if (ALLOC(s) == -1)
return NULL;
s->hash = ptr_hash(s);
return s;
} | make_state | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
int mark_live(fa *fa) {
bool v1;
int changed;
state *s;
state *s_0;
trans *t;
if (mark_reachable(fa) < 0)
return -1;
for (s = fa->initial; s; s = s->next) {
v1 = (*((_BYTE *)s + 16) & 4) != 0 && (*((_BYTE *)s + 16) & 1) != 0;
*((_BYTE *)s + 16) = (2 * v1) | *((_BYTE *)s + 16) & 0xFD;
}
do... | ATTRIBUTE_RETURN_CHECK
static int mark_live(struct fa *fa) {
int changed;
F(mark_reachable(fa));
list_for_each(s, fa->initial) {
s->live = s->reachable && s->accept;
}
do {
changed = 0;
list_for_each(s, fa->initial... | mark_live | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
int mark_reachable(fa *fa) {
int result;
state *s;
state *s_0;
trans *t;
state_set *worklist;
worklist = state_set_init(-1, 0);
result = -1;
if (worklist) {
for (s = fa->initial; s; s = s->next)
*((_BYTE *)s + 16) &= ~4u;
*((_BYTE *)fa->initial + 16) |= 4u;
for (s_0 = fa->initial; s_0... | ATTRIBUTE_RETURN_CHECK
static int mark_reachable(struct fa *fa) {
struct state_set *worklist = state_set_init(-1, S_NONE);
int result = -1;
E(worklist == NULL);
list_for_each(s, fa->initial) { s->reachable = 0; }
fa->initial->reachable = 1;
f... | mark_reachable | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
bool match(re_parse *parse, char m) {
if (!more(parse))
return 0;
if (m != *parse->rx)
return 0;
++parse->rx;
return 1;
} | static bool match(struct re_parse *parse, char m) {
if (!more(parse))
return false;
if (*parse->rx == m) {
parse->rx += 1;
return true;
}
return false;
} | match | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
char *mdir_name(const char *file) {
size_t length;
char *dir;
length = dir_len(file);
dir = (char *)malloc((length == 0) + length + 1);
if (!dir)
return 0;
memcpy(dir, file, length);
if (!length) {
length = 1;
*dir = 46;
}
dir[length] = 0;
return dir;
} | char *mdir_name(char const *file) {
size_t length = dir_len(file);
bool append_dot =
(length == 0 || (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE &&
length == FILE_SYSTEM_PREFIX_LEN(file) &&
file[2] != '\0' && !ISSLASH(fil... | mdir_name | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
int mem_alloc_n(void *ptrptr, size_t size, size_t count) {
if (size && count) {
*(_QWORD *)ptrptr = calloc(count, size);
if (*(_QWORD *)ptrptr)
return 0;
else
return -1;
} else {
*(_QWORD *)ptrptr = 0;
return 0;
}
} | int mem_alloc_n(void *ptrptr, size_t size, size_t count) {
if (AUGEAS_UNLIKELY(size == 0 || count == 0)) {
*(void **)ptrptr = NULL;
return 0;
}
*(void **)ptrptr = calloc(count, size);
if (AUGEAS_UNLIKELY(*(void **)ptrptr == NULL))
retur... | mem_alloc_n | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
int mem_realloc_n(void *ptrptr, size_t size, size_t count) {
void *tmp;
if (size && count) {
if (is_mul_ok(size, count)) {
tmp = realloc(*(void **)ptrptr, count * size);
if (tmp) {
*(_QWORD *)ptrptr = tmp;
return 0;
} else {
return -1;
}
} else {
*__err... | int mem_realloc_n(void *ptrptr, size_t size, size_t count) {
void *tmp;
if (AUGEAS_UNLIKELY(size == 0 || count == 0)) {
free(*(void **)ptrptr);
*(void **)ptrptr = NULL;
return 0;
}
if (AUGEAS_UNLIKELY(xalloc_oversized(count, size))) {
... | mem_realloc_n | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
int minimize_brzozowski(fa *fa) {
state_set *set;
state_set *seta;
set = fa_reverse(fa);
if (!set)
return -1;
if (determinize(fa, set) < 0)
return -1;
state_set_free(set);
seta = fa_reverse(fa);
if (!seta || determinize(fa, seta) < 0)
return -1;
state_set_free(seta);
return 0;
} | static int minimize_brzozowski(struct fa *fa) {
struct state_set *set;
set = fa_reverse(fa);
E(set == NULL);
F(determinize(fa, set));
state_set_free(set);
set = fa_reverse(fa);
E(set == NULL);
F(determinize(fa, set));
s... | minimize_brzozowski | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
int minimize_hopcroft(fa *fa) {
state_set **v2;
state_set **v3;
state_set **v4;
state_list_node **v5;
int v6;
state_list_node **v7;
int nsigma;
int result;
unsigned int nstates;
int q;
int x;
int q_0;
int j;
int x_0;
int j_0;
int x_1;
int q_1;
int x_2;
int j_1;
int k;
int ref;
... | static int minimize_hopcroft(struct fa *fa) {
struct state_set *states = NULL;
uchar *sigma = NULL;
struct state_set **reverse = NULL;
bitset *reverse_nonempty = NULL;
struct state_set **partition = NULL;
unsigned int *block = NULL;
struct sta... | minimize_hopcroft | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
void *mmalloca(size_t n) {
char *mem;
if (n + 32 < n)
return 0;
mem = (char *)malloc(n + 32);
if (!mem)
return 0;
byte_9[((unsigned long)(mem + 16) & 0xFFFFFFFFFFFFFFE0LL) + 6] =
(((_BYTE)mem + 16) & 0xE0) + 16 - (_BYTE)mem;
return (void *)(((unsigned long)(mem + 16) & 0xFFFFFFFFFFFFFFE0LL) +... | void *mmalloca(size_t n) {
#if HAVE_ALLOCA
size_t nplus = n + sizeof(small_t) + 2 * sa_alignment_max - 1;
if (nplus >= n) {
char *mem = (char *)malloc(nplus);
if (mem != NULL) {
char *p = (char *)((((uintptr_t)mem + sizeof(small_t) +
... | mmalloca | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
bool more(re_parse *parse) { return parse->rx < parse->rend; } | static bool more(struct re_parse *parse) {
return parse->rx < parse->rend;
} | more | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
bool next(re_parse *parse, char *c) {
if (!more(parse))
return 0;
*c = *parse->rx++;
return 1;
} | static bool next(struct re_parse *parse, char *c) {
if (!more(parse))
return false;
*c = *parse->rx;
parse->rx += 1;
return true;
} | next | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
int pair_cmp(const void *key1, const void *key2) {
return memcmp(key1, key2, 0x10u);
} | static int pair_cmp(const void *key1, const void *key2) {
return memcmp(key1, key2, 2 * sizeof(struct state *));
} | pair_cmp | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
hash_val_t pair_hash(const void *key) {
return *(_QWORD *)(*(_QWORD *)key + 8LL) +
*(_QWORD *)(*((_QWORD *)key + 1) + 8LL);
} | static hash_val_t pair_hash(const void *key) {
register struct state *const *pair = key;
return pair[0]->hash + pair[1]->hash;
} | pair_hash | augeas-1.12.0 | app-admin | O0/app-admin/augeas-1.12.0/libfa.so.1.5.3 | ida | O0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.