build_fadt(GArray *table_data, BIOSLinker *linker, AcpiPmInfo *pm,

           unsigned facs_tbl_offset, unsigned dsdt_tbl_offset,

           const char *oem_id, const char *oem_table_id)

{

    AcpiFadtDescriptorRev1 *fadt = acpi_data_push(table_data, sizeof(*fadt));

    unsigned fw_ctrl_offset = (char *)&fadt->firmware_ctrl - table_data->data;

    unsigned dsdt_entry_offset = (char *)&fadt->dsdt - table_data->data;



    /* FACS address to be filled by Guest linker */

    bios_linker_loader_add_pointer(linker,

        ACPI_BUILD_TABLE_FILE, fw_ctrl_offset, sizeof(fadt->firmware_ctrl),

        ACPI_BUILD_TABLE_FILE, facs_tbl_offset);



    /* DSDT address to be filled by Guest linker */

    fadt_setup(fadt, pm);

    bios_linker_loader_add_pointer(linker,

        ACPI_BUILD_TABLE_FILE, dsdt_entry_offset, sizeof(fadt->dsdt),

        ACPI_BUILD_TABLE_FILE, dsdt_tbl_offset);



    build_header(linker, table_data,

                 (void *)fadt, "FACP", sizeof(*fadt), 1, oem_id, oem_table_id);

}

build_fadt(GArray *table_data, BIOSLinker *linker, AcpiPmInfo *pm,

           unsigned facs_tbl_offset, unsigned dsdt_tbl_offset,

           const char *oem_id, const char *oem_table_id)

{

    AcpiFadtDescriptorRev1 *fadt = acpi_data_push(table_data, sizeof(*fadt));

    unsigned fw_ctrl_offset = (char *)&fadt->firmware_ctrl - table_data->data;

    unsigned dsdt_entry_offset = (char *)&fadt->dsdt - table_data->data;



    

    bios_linker_loader_add_pointer(linker,

        ACPI_BUILD_TABLE_FILE, fw_ctrl_offset, sizeof(fadt->firmware_ctrl),

        ACPI_BUILD_TABLE_FILE, facs_tbl_offset);



    

    fadt_setup(fadt, pm);

    bios_linker_loader_add_pointer(linker,

        ACPI_BUILD_TABLE_FILE, dsdt_entry_offset, sizeof(fadt->dsdt),

        ACPI_BUILD_TABLE_FILE, dsdt_tbl_offset);



    build_header(linker, table_data,

                 (void *)fadt, "FACP", sizeof(*fadt), 1, oem_id, oem_table_id);

}

FUNC_0(GArray *VAR_0, BIOSLinker *VAR_1, AcpiPmInfo *VAR_2,

           unsigned VAR_3, unsigned VAR_4,

           const char *VAR_5, const char *VAR_6)

{

    AcpiFadtDescriptorRev1 *fadt = acpi_data_push(VAR_0, sizeof(*fadt));

    unsigned VAR_7 = (char *)&fadt->firmware_ctrl - VAR_0->data;

    unsigned VAR_8 = (char *)&fadt->dsdt - VAR_0->data;



    

    bios_linker_loader_add_pointer(VAR_1,

        ACPI_BUILD_TABLE_FILE, VAR_7, sizeof(fadt->firmware_ctrl),

        ACPI_BUILD_TABLE_FILE, VAR_3);



    

    fadt_setup(fadt, VAR_2);

    bios_linker_loader_add_pointer(VAR_1,

        ACPI_BUILD_TABLE_FILE, VAR_8, sizeof(fadt->dsdt),

        ACPI_BUILD_TABLE_FILE, VAR_4);



    build_header(VAR_1, VAR_0,

                 (void *)fadt, "FACP", sizeof(*fadt), 1, VAR_5, VAR_6);

}

FUNC_0(GArray *VAR_0, BIOSLinker *VAR_1, AcpiPmInfo *VAR_2,
unsigned VAR_3, unsigned VAR_4,
const char *VAR_5, const char *VAR_6)
{ AcpiFadtDescriptorRev1 *fadt = acpi_data_push(VAR_0, sizeof(*fadt)); unsigned VAR_7 = (char *)&fadt->firmware_ctrl - VAR_0->data; unsigned VAR_8 = (char *)&fadt->dsdt - VAR_0->data; bios_linker_loader_add_pointer(VAR_1,
ACPI_BUILD_TABLE_FILE, VAR_7, sizeof(fadt->firmware_ctrl),
ACPI_BUILD_TABLE_FILE, VAR_3); fadt_setup(fadt, VAR_2); bios_linker_loader_add_pointer(VAR_1,
ACPI_BUILD_TABLE_FILE, VAR_8, sizeof(fadt->dsdt),
ACPI_BUILD_TABLE_FILE, VAR_4); build_header(VAR_1, VAR_0,
(void *)fadt, "FACP", sizeof(*fadt), 1, VAR_5, VAR_6); }