void bios_linker_loader_alloc(GArray *linker,

                              const char *file,

                              uint32_t alloc_align,

                              bool alloc_fseg)

{

    BiosLinkerLoaderEntry entry;



    memset(&entry, 0, sizeof entry);

    strncpy(entry.alloc.file, file, sizeof entry.alloc.file - 1);

    entry.command = cpu_to_le32(BIOS_LINKER_LOADER_COMMAND_ALLOCATE);

    entry.alloc.align = cpu_to_le32(alloc_align);

    entry.alloc.zone = cpu_to_le32(alloc_fseg ?

                                    BIOS_LINKER_LOADER_ALLOC_ZONE_FSEG :

                                    BIOS_LINKER_LOADER_ALLOC_ZONE_HIGH);



    /* Alloc entries must come first, so prepend them */

    g_array_prepend_val(linker, entry);

}

void bios_linker_loader_alloc(GArray *linker,

                              const char *file,

                              uint32_t alloc_align,

                              bool alloc_fseg)

{

    BiosLinkerLoaderEntry entry;



    memset(&entry, 0, sizeof entry);

    strncpy(entry.alloc.file, file, sizeof entry.alloc.file - 1);

    entry.command = cpu_to_le32(BIOS_LINKER_LOADER_COMMAND_ALLOCATE);

    entry.alloc.align = cpu_to_le32(alloc_align);

    entry.alloc.zone = cpu_to_le32(alloc_fseg ?

                                    BIOS_LINKER_LOADER_ALLOC_ZONE_FSEG :

                                    BIOS_LINKER_LOADER_ALLOC_ZONE_HIGH);



    

    g_array_prepend_val(linker, entry);

}

void FUNC_0(GArray *VAR_0,

                              const char *VAR_1,

                              uint32_t VAR_2,

                              bool VAR_3)

{

    BiosLinkerLoaderEntry entry;



    memset(&entry, 0, sizeof entry);

    strncpy(entry.alloc.VAR_1, VAR_1, sizeof entry.alloc.VAR_1 - 1);

    entry.command = cpu_to_le32(BIOS_LINKER_LOADER_COMMAND_ALLOCATE);

    entry.alloc.align = cpu_to_le32(VAR_2);

    entry.alloc.zone = cpu_to_le32(VAR_3 ?

                                    BIOS_LINKER_LOADER_ALLOC_ZONE_FSEG :

                                    BIOS_LINKER_LOADER_ALLOC_ZONE_HIGH);



    

    g_array_prepend_val(VAR_0, entry);

}

void FUNC_0(GArray *VAR_0,
const char *VAR_1,
uint32_t VAR_2,
bool VAR_3)
{ BiosLinkerLoaderEntry entry; memset(&entry, 0, sizeof entry); strncpy(entry.alloc.VAR_1, VAR_1, sizeof entry.alloc.VAR_1 - 1); entry.command = cpu_to_le32(BIOS_LINKER_LOADER_COMMAND_ALLOCATE); entry.alloc.align = cpu_to_le32(VAR_2); entry.alloc.zone = cpu_to_le32(VAR_3 ?
BIOS_LINKER_LOADER_ALLOC_ZONE_FSEG :
BIOS_LINKER_LOADER_ALLOC_ZONE_HIGH); g_array_prepend_val(VAR_0, entry); }