static CheckasmFunc *get_func(const char *name, int length)

{

    CheckasmFunc *f, **f_ptr = &state.funcs;



    /* Search the tree for a matching node */

    while ((f = *f_ptr)) {

        int cmp = cmp_func_names(name, f->name);

        if (!cmp)

            return f;



        f_ptr = &f->child[(cmp > 0)];

    }



    /* Allocate and insert a new node into the tree */

    f = *f_ptr = checkasm_malloc(sizeof(CheckasmFunc) + length);

    memcpy(f->name, name, length+1);



    return f;

}

static CheckasmFunc *get_func(const char *name, int length)

{

    CheckasmFunc *f, **f_ptr = &state.funcs;



    

    while ((f = *f_ptr)) {

        int cmp = cmp_func_names(name, f->name);

        if (!cmp)

            return f;



        f_ptr = &f->child[(cmp > 0)];

    }



    

    f = *f_ptr = checkasm_malloc(sizeof(CheckasmFunc) + length);

    memcpy(f->name, name, length+1);



    return f;

}

static CheckasmFunc *FUNC_0(const char *name, int length)

{

    CheckasmFunc *f, **f_ptr = &state.funcs;



    

    while ((f = *f_ptr)) {

        int VAR_0 = cmp_func_names(name, f->name);

        if (!VAR_0)

            return f;



        f_ptr = &f->child[(VAR_0 > 0)];

    }



    

    f = *f_ptr = checkasm_malloc(sizeof(CheckasmFunc) + length);

    memcpy(f->name, name, length+1);



    return f;

}

static CheckasmFunc *FUNC_0(const char *name, int length)
{ CheckasmFunc *f, **f_ptr = &state.funcs; while ((f = *f_ptr)) { int VAR_0 = cmp_func_names(name, f->name); if (!VAR_0)
return f; f_ptr = &f->child[(VAR_0 > 0)]; } f = *f_ptr = checkasm_malloc(sizeof(CheckasmFunc) + length); memcpy(f->name, name, length+1); return f; }