static int write_note(struct memelfnote *men, int fd)

{

    struct elf_note en;



    en.n_namesz = men->namesz;

    en.n_type = men->type;

    en.n_descsz = men->datasz;



    bswap_note(&en);



    if (dump_write(fd, &en, sizeof(en)) != 0)

        return (-1);

    if (dump_write(fd, men->name, men->namesz_rounded) != 0)

        return (-1);

    if (dump_write(fd, men->data, men->datasz) != 0)

        return (-1);



    return (0);

}

static int write_note(struct memelfnote *men, int fd)

{

    struct elf_note en;



    en.n_namesz = men->namesz;

    en.n_type = men->type;

    en.n_descsz = men->datasz;



    bswap_note(&en);



    if (dump_write(fd, &en, sizeof(en)) != 0)

        return (-1);

    if (dump_write(fd, men->name, men->namesz_rounded) != 0)

        return (-1);

    if (dump_write(fd, men->data, men->datasz) != 0)

        return (-1);



    return (0);

}

static int FUNC_0(struct memelfnote *VAR_0, int VAR_1)

{

    struct elf_note VAR_2;



    VAR_2.n_namesz = VAR_0->namesz;

    VAR_2.n_type = VAR_0->type;

    VAR_2.n_descsz = VAR_0->datasz;



    bswap_note(&VAR_2);



    if (dump_write(VAR_1, &VAR_2, sizeof(VAR_2)) != 0)

        return (-1);

    if (dump_write(VAR_1, VAR_0->name, VAR_0->namesz_rounded) != 0)

        return (-1);

    if (dump_write(VAR_1, VAR_0->data, VAR_0->datasz) != 0)

        return (-1);



    return (0);

}

static int FUNC_0(struct memelfnote *VAR_0, int VAR_1)
{ struct elf_note VAR_2; VAR_2.n_namesz = VAR_0->namesz; VAR_2.n_type = VAR_0->type; VAR_2.n_descsz = VAR_0->datasz; bswap_note(&VAR_2); if (dump_write(VAR_1, &VAR_2, sizeof(VAR_2)) != 0)
return (-1); if (dump_write(VAR_1, VAR_0->name, VAR_0->namesz_rounded) != 0)
return (-1); if (dump_write(VAR_1, VAR_0->data, VAR_0->datasz) != 0)
return (-1); return (0); }