/*
 * This file is auto-generated, do not modify!
 *
 * SPDX-License-Identifier: LGPL-2.1-or-later
 */

#pragma once
#include <fu-input-stream.h>
/**
 * FuPeCoffMachine:
 */
typedef enum {
    /**
     * FU_PE_COFF_MACHINE_UNKNOWN:
     */
    FU_PE_COFF_MACHINE_UNKNOWN,
    /**
     * FU_PE_COFF_MACHINE_ALPHA:
     */
    FU_PE_COFF_MACHINE_ALPHA = 0x184,
    /**
     * FU_PE_COFF_MACHINE_ALPHA64:
     */
    FU_PE_COFF_MACHINE_ALPHA64 = 0x284,
    /**
     * FU_PE_COFF_MACHINE_AM33:
     */
    FU_PE_COFF_MACHINE_AM33 = 0x1d3,
    /**
     * FU_PE_COFF_MACHINE_AMD64:
     */
    FU_PE_COFF_MACHINE_AMD64 = 0x8664,
    /**
     * FU_PE_COFF_MACHINE_ARM:
     */
    FU_PE_COFF_MACHINE_ARM = 0x1c0,
    /**
     * FU_PE_COFF_MACHINE_ARM64:
     */
    FU_PE_COFF_MACHINE_ARM64 = 0xaa64,
    /**
     * FU_PE_COFF_MACHINE_ARMNT:
     */
    FU_PE_COFF_MACHINE_ARMNT = 0x1c4,
    /**
     * FU_PE_COFF_MACHINE_EBC:
     */
    FU_PE_COFF_MACHINE_EBC = 0xebc,
    /**
     * FU_PE_COFF_MACHINE_I386:
     */
    FU_PE_COFF_MACHINE_I386 = 0x14c,
    /**
     * FU_PE_COFF_MACHINE_IA64:
     */
    FU_PE_COFF_MACHINE_IA64 = 0x200,
    /**
     * FU_PE_COFF_MACHINE_LOONGARCH32:
     */
    FU_PE_COFF_MACHINE_LOONGARCH32 = 0x6232,
    /**
     * FU_PE_COFF_MACHINE_LOONGARCH64:
     */
    FU_PE_COFF_MACHINE_LOONGARCH64 = 0x6264,
    /**
     * FU_PE_COFF_MACHINE_M32R:
     */
    FU_PE_COFF_MACHINE_M32R = 0x9041,
    /**
     * FU_PE_COFF_MACHINE_MIPS16:
     */
    FU_PE_COFF_MACHINE_MIPS16 = 0x266,
    /**
     * FU_PE_COFF_MACHINE_MIPSFPU:
     */
    FU_PE_COFF_MACHINE_MIPSFPU = 0x366,
    /**
     * FU_PE_COFF_MACHINE_MIPSFPU16:
     */
    FU_PE_COFF_MACHINE_MIPSFPU16 = 0x466,
    /**
     * FU_PE_COFF_MACHINE_POWERPC:
     */
    FU_PE_COFF_MACHINE_POWERPC = 0x1f0,
    /**
     * FU_PE_COFF_MACHINE_POWERPCFP:
     */
    FU_PE_COFF_MACHINE_POWERPCFP = 0x1f1,
    /**
     * FU_PE_COFF_MACHINE_R4000:
     */
    FU_PE_COFF_MACHINE_R4000 = 0x166,
    /**
     * FU_PE_COFF_MACHINE_RISCV32:
     */
    FU_PE_COFF_MACHINE_RISCV32 = 0x5032,
    /**
     * FU_PE_COFF_MACHINE_RISCV64:
     */
    FU_PE_COFF_MACHINE_RISCV64 = 0x5064,
    /**
     * FU_PE_COFF_MACHINE_RISCV128:
     */
    FU_PE_COFF_MACHINE_RISCV128 = 0x5128,
    /**
     * FU_PE_COFF_MACHINE_SH3:
     */
    FU_PE_COFF_MACHINE_SH3 = 0x1a2,
    /**
     * FU_PE_COFF_MACHINE_SH3DSP:
     */
    FU_PE_COFF_MACHINE_SH3DSP = 0x1a3,
    /**
     * FU_PE_COFF_MACHINE_SH4:
     */
    FU_PE_COFF_MACHINE_SH4 = 0x1a6,
    /**
     * FU_PE_COFF_MACHINE_SH5:
     */
    FU_PE_COFF_MACHINE_SH5 = 0x1a8,
    /**
     * FU_PE_COFF_MACHINE_THUMB:
     */
    FU_PE_COFF_MACHINE_THUMB = 0x1c2,
    /**
     * FU_PE_COFF_MACHINE_WCEMIPSV2:
     */
    FU_PE_COFF_MACHINE_WCEMIPSV2 = 0x169,
}  FuPeCoffMachine;
/**
 * FuPeCoffMagic:
 */
typedef enum {
    /**
     * FU_PE_COFF_MAGIC_PE32:
     */
    FU_PE_COFF_MAGIC_PE32 = 0x10b,
    /**
     * FU_PE_COFF_MAGIC_PE32_PLUS:
     */
    FU_PE_COFF_MAGIC_PE32_PLUS = 0x20b,
}  FuPeCoffMagic;
/**
 * FuCoffSubsystem:
 */
typedef enum {
    /**
     * FU_COFF_SUBSYSTEM_UNKNOWN:
     */
    FU_COFF_SUBSYSTEM_UNKNOWN,
    /**
     * FU_COFF_SUBSYSTEM_NATIVE:
     */
    FU_COFF_SUBSYSTEM_NATIVE = 1,
    /**
     * FU_COFF_SUBSYSTEM_WINDOWS_GUI:
     */
    FU_COFF_SUBSYSTEM_WINDOWS_GUI = 2,
    /**
     * FU_COFF_SUBSYSTEM_WINDOWS_CUI:
     */
    FU_COFF_SUBSYSTEM_WINDOWS_CUI = 3,
    /**
     * FU_COFF_SUBSYSTEM_OS2_CUI:
     */
    FU_COFF_SUBSYSTEM_OS2_CUI = 5,
    /**
     * FU_COFF_SUBSYSTEM_POSIX_CUI:
     */
    FU_COFF_SUBSYSTEM_POSIX_CUI = 7,
    /**
     * FU_COFF_SUBSYSTEM_NATIVE_WINDOWS:
     */
    FU_COFF_SUBSYSTEM_NATIVE_WINDOWS = 8,
    /**
     * FU_COFF_SUBSYSTEM_WINDOWS_CE_GUI:
     */
    FU_COFF_SUBSYSTEM_WINDOWS_CE_GUI = 9,
    /**
     * FU_COFF_SUBSYSTEM_EFI_APPLICATION:
     */
    FU_COFF_SUBSYSTEM_EFI_APPLICATION = 10,
    /**
     * FU_COFF_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER:
     */
    FU_COFF_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER = 11,
    /**
     * FU_COFF_SUBSYSTEM_EFI_RUNTIME_DRIVER:
     */
    FU_COFF_SUBSYSTEM_EFI_RUNTIME_DRIVER = 12,
    /**
     * FU_COFF_SUBSYSTEM_EFI_ROM:
     */
    FU_COFF_SUBSYSTEM_EFI_ROM = 13,
    /**
     * FU_COFF_SUBSYSTEM_XBOX:
     */
    FU_COFF_SUBSYSTEM_XBOX = 14,
    /**
     * FU_COFF_SUBSYSTEM_WINDOWS_BOOT_APPLICATION:
     */
    FU_COFF_SUBSYSTEM_WINDOWS_BOOT_APPLICATION = 16,
}  FuCoffSubsystem;
const gchar *fu_coff_subsystem_to_string(FuCoffSubsystem val) G_GNUC_CONST;
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructPeDosHeader;

FuStructPeDosHeader *fu_struct_pe_dos_header_ref(FuStructPeDosHeader *st) G_GNUC_NON_NULL(1);
void fu_struct_pe_dos_header_unref(FuStructPeDosHeader *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructPeDosHeader, fu_struct_pe_dos_header_unref)
FuStructPeDosHeader *fu_struct_pe_dos_header_new(void) G_GNUC_WARN_UNUSED_RESULT;
FuStructPeDosHeader *fu_struct_pe_dos_header_parse_stream(GInputStream *stream, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
gboolean fu_struct_pe_dos_header_validate_stream(GInputStream *stream, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_pe_dos_header_get_cblp(const FuStructPeDosHeader *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_pe_dos_header_get_cp(const FuStructPeDosHeader *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_pe_dos_header_get_crlc(const FuStructPeDosHeader *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_pe_dos_header_get_cparhdr(const FuStructPeDosHeader *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_pe_dos_header_get_minalloc(const FuStructPeDosHeader *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_pe_dos_header_get_maxalloc(const FuStructPeDosHeader *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_pe_dos_header_get_sp(const FuStructPeDosHeader *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_pe_dos_header_get_lfarlc(const FuStructPeDosHeader *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_pe_dos_header_get_lfanew(const FuStructPeDosHeader *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_pe_dos_header_set_cblp(FuStructPeDosHeader *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_pe_dos_header_set_cp(FuStructPeDosHeader *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_pe_dos_header_set_crlc(FuStructPeDosHeader *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_pe_dos_header_set_cparhdr(FuStructPeDosHeader *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_pe_dos_header_set_minalloc(FuStructPeDosHeader *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_pe_dos_header_set_maxalloc(FuStructPeDosHeader *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_pe_dos_header_set_sp(FuStructPeDosHeader *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_pe_dos_header_set_lfarlc(FuStructPeDosHeader *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_pe_dos_header_set_lfanew(FuStructPeDosHeader *st, guint32 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_PE_DOS_HEADER_OFFSET_MAGIC 0x0
#define FU_STRUCT_PE_DOS_HEADER_OFFSET_CBLP 0x2
#define FU_STRUCT_PE_DOS_HEADER_OFFSET_CP 0x4
#define FU_STRUCT_PE_DOS_HEADER_OFFSET_CRLC 0x6
#define FU_STRUCT_PE_DOS_HEADER_OFFSET_CPARHDR 0x8
#define FU_STRUCT_PE_DOS_HEADER_OFFSET_MINALLOC 0xA
#define FU_STRUCT_PE_DOS_HEADER_OFFSET_MAXALLOC 0xC
#define FU_STRUCT_PE_DOS_HEADER_OFFSET_SP 0x10
#define FU_STRUCT_PE_DOS_HEADER_OFFSET_LFARLC 0x18
#define FU_STRUCT_PE_DOS_HEADER_OFFSET_LFANEW 0x3C
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_PE_DOS_HEADER_SIZE 0x80
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_PE_DOS_HEADER_DEFAULT_MAGIC 0x5A4D
#define FU_STRUCT_PE_DOS_HEADER_DEFAULT_CBLP 0x90
#define FU_STRUCT_PE_DOS_HEADER_DEFAULT_CP 0x3
#define FU_STRUCT_PE_DOS_HEADER_DEFAULT_CPARHDR 0x4
#define FU_STRUCT_PE_DOS_HEADER_DEFAULT_MAXALLOC 0xFFFF
#define FU_STRUCT_PE_DOS_HEADER_DEFAULT_SP 0xB8
#define FU_STRUCT_PE_DOS_HEADER_DEFAULT_LFARLC 0x40
#define FU_STRUCT_PE_DOS_HEADER_DEFAULT_LFANEW 0x80
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructPeCoffFileHeader;

FuStructPeCoffFileHeader *fu_struct_pe_coff_file_header_ref(FuStructPeCoffFileHeader *st) G_GNUC_NON_NULL(1);
void fu_struct_pe_coff_file_header_unref(FuStructPeCoffFileHeader *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructPeCoffFileHeader, fu_struct_pe_coff_file_header_unref)
FuStructPeCoffFileHeader *fu_struct_pe_coff_file_header_new(void) G_GNUC_WARN_UNUSED_RESULT;
FuStructPeCoffFileHeader *fu_struct_pe_coff_file_header_parse_stream(GInputStream *stream, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuPeCoffMachine fu_struct_pe_coff_file_header_get_machine(const FuStructPeCoffFileHeader *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_pe_coff_file_header_get_number_of_sections(const FuStructPeCoffFileHeader *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_pe_coff_file_header_get_pointer_to_symbol_table(const FuStructPeCoffFileHeader *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_pe_coff_file_header_get_number_of_symbols(const FuStructPeCoffFileHeader *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_pe_coff_file_header_get_size_of_optional_header(const FuStructPeCoffFileHeader *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_pe_coff_file_header_get_characteristics(const FuStructPeCoffFileHeader *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_pe_coff_file_header_set_machine(FuStructPeCoffFileHeader *st, FuPeCoffMachine value) G_GNUC_NON_NULL(1);
void fu_struct_pe_coff_file_header_set_number_of_sections(FuStructPeCoffFileHeader *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_pe_coff_file_header_set_pointer_to_symbol_table(FuStructPeCoffFileHeader *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_pe_coff_file_header_set_number_of_symbols(FuStructPeCoffFileHeader *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_pe_coff_file_header_set_size_of_optional_header(FuStructPeCoffFileHeader *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_pe_coff_file_header_set_characteristics(FuStructPeCoffFileHeader *st, guint16 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_PE_COFF_FILE_HEADER_OFFSET_SIGNATURE 0x0
#define FU_STRUCT_PE_COFF_FILE_HEADER_OFFSET_MACHINE 0x4
#define FU_STRUCT_PE_COFF_FILE_HEADER_OFFSET_NUMBER_OF_SECTIONS 0x6
#define FU_STRUCT_PE_COFF_FILE_HEADER_OFFSET_POINTER_TO_SYMBOL_TABLE 0xC
#define FU_STRUCT_PE_COFF_FILE_HEADER_OFFSET_NUMBER_OF_SYMBOLS 0x10
#define FU_STRUCT_PE_COFF_FILE_HEADER_OFFSET_SIZE_OF_OPTIONAL_HEADER 0x14
#define FU_STRUCT_PE_COFF_FILE_HEADER_OFFSET_CHARACTERISTICS 0x16
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_PE_COFF_FILE_HEADER_SIZE 0x18
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_PE_COFF_FILE_HEADER_DEFAULT_SIGNATURE 0x4550
#define FU_STRUCT_PE_COFF_FILE_HEADER_DEFAULT_MACHINE FU_PE_COFF_MACHINE_AMD64
#define FU_STRUCT_PE_COFF_FILE_HEADER_DEFAULT_SIZE_OF_OPTIONAL_HEADER 0xf0
#define FU_STRUCT_PE_COFF_FILE_HEADER_DEFAULT_CHARACTERISTICS 0x2022
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructPeCoffOptionalHeader64;

FuStructPeCoffOptionalHeader64 *fu_struct_pe_coff_optional_header64_ref(FuStructPeCoffOptionalHeader64 *st) G_GNUC_NON_NULL(1);
void fu_struct_pe_coff_optional_header64_unref(FuStructPeCoffOptionalHeader64 *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructPeCoffOptionalHeader64, fu_struct_pe_coff_optional_header64_unref)
FuStructPeCoffOptionalHeader64 *fu_struct_pe_coff_optional_header64_new(void) G_GNUC_WARN_UNUSED_RESULT;
FuStructPeCoffOptionalHeader64 *fu_struct_pe_coff_optional_header64_parse_stream(GInputStream *stream, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuPeCoffMagic fu_struct_pe_coff_optional_header64_get_magic(const FuStructPeCoffOptionalHeader64 *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_pe_coff_optional_header64_get_major_linker_version(const FuStructPeCoffOptionalHeader64 *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_pe_coff_optional_header64_get_minor_linker_version(const FuStructPeCoffOptionalHeader64 *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_pe_coff_optional_header64_get_size_of_code(const FuStructPeCoffOptionalHeader64 *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_pe_coff_optional_header64_get_size_of_initialized_data(const FuStructPeCoffOptionalHeader64 *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_pe_coff_optional_header64_get_size_of_uninitialized_data(const FuStructPeCoffOptionalHeader64 *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_pe_coff_optional_header64_get_addressofentrypoint(const FuStructPeCoffOptionalHeader64 *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_pe_coff_optional_header64_get_base_of_code(const FuStructPeCoffOptionalHeader64 *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint64 fu_struct_pe_coff_optional_header64_get_image_base(const FuStructPeCoffOptionalHeader64 *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_pe_coff_optional_header64_get_section_alignment(const FuStructPeCoffOptionalHeader64 *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_pe_coff_optional_header64_get_file_alignment(const FuStructPeCoffOptionalHeader64 *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_pe_coff_optional_header64_get_size_of_image(const FuStructPeCoffOptionalHeader64 *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_pe_coff_optional_header64_get_size_of_headers(const FuStructPeCoffOptionalHeader64 *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_pe_coff_optional_header64_get_checksum(const FuStructPeCoffOptionalHeader64 *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuCoffSubsystem fu_struct_pe_coff_optional_header64_get_subsystem(const FuStructPeCoffOptionalHeader64 *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_pe_coff_optional_header64_get_loader_flags(const FuStructPeCoffOptionalHeader64 *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_pe_coff_optional_header64_get_number_of_rva_and_sizes(const FuStructPeCoffOptionalHeader64 *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_pe_coff_optional_header64_get_certificate_table(const FuStructPeCoffOptionalHeader64 *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_pe_coff_optional_header64_get_size_of_certificate_table(const FuStructPeCoffOptionalHeader64 *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_pe_coff_optional_header64_get_debug_table(const FuStructPeCoffOptionalHeader64 *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_pe_coff_optional_header64_get_size_of_debug_table(const FuStructPeCoffOptionalHeader64 *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_pe_coff_optional_header64_set_magic(FuStructPeCoffOptionalHeader64 *st, FuPeCoffMagic value) G_GNUC_NON_NULL(1);
void fu_struct_pe_coff_optional_header64_set_major_linker_version(FuStructPeCoffOptionalHeader64 *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_pe_coff_optional_header64_set_minor_linker_version(FuStructPeCoffOptionalHeader64 *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_pe_coff_optional_header64_set_size_of_code(FuStructPeCoffOptionalHeader64 *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_pe_coff_optional_header64_set_size_of_initialized_data(FuStructPeCoffOptionalHeader64 *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_pe_coff_optional_header64_set_size_of_uninitialized_data(FuStructPeCoffOptionalHeader64 *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_pe_coff_optional_header64_set_addressofentrypoint(FuStructPeCoffOptionalHeader64 *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_pe_coff_optional_header64_set_base_of_code(FuStructPeCoffOptionalHeader64 *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_pe_coff_optional_header64_set_image_base(FuStructPeCoffOptionalHeader64 *st, guint64 value) G_GNUC_NON_NULL(1);
void fu_struct_pe_coff_optional_header64_set_section_alignment(FuStructPeCoffOptionalHeader64 *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_pe_coff_optional_header64_set_file_alignment(FuStructPeCoffOptionalHeader64 *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_pe_coff_optional_header64_set_size_of_image(FuStructPeCoffOptionalHeader64 *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_pe_coff_optional_header64_set_size_of_headers(FuStructPeCoffOptionalHeader64 *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_pe_coff_optional_header64_set_checksum(FuStructPeCoffOptionalHeader64 *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_pe_coff_optional_header64_set_subsystem(FuStructPeCoffOptionalHeader64 *st, FuCoffSubsystem value) G_GNUC_NON_NULL(1);
void fu_struct_pe_coff_optional_header64_set_loader_flags(FuStructPeCoffOptionalHeader64 *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_pe_coff_optional_header64_set_number_of_rva_and_sizes(FuStructPeCoffOptionalHeader64 *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_pe_coff_optional_header64_set_certificate_table(FuStructPeCoffOptionalHeader64 *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_pe_coff_optional_header64_set_size_of_certificate_table(FuStructPeCoffOptionalHeader64 *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_pe_coff_optional_header64_set_debug_table(FuStructPeCoffOptionalHeader64 *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_pe_coff_optional_header64_set_size_of_debug_table(FuStructPeCoffOptionalHeader64 *st, guint32 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_PE_COFF_OPTIONAL_HEADER64_OFFSET_MAGIC 0x0
#define FU_STRUCT_PE_COFF_OPTIONAL_HEADER64_OFFSET_MAJOR_LINKER_VERSION 0x2
#define FU_STRUCT_PE_COFF_OPTIONAL_HEADER64_OFFSET_MINOR_LINKER_VERSION 0x3
#define FU_STRUCT_PE_COFF_OPTIONAL_HEADER64_OFFSET_SIZE_OF_CODE 0x4
#define FU_STRUCT_PE_COFF_OPTIONAL_HEADER64_OFFSET_SIZE_OF_INITIALIZED_DATA 0x8
#define FU_STRUCT_PE_COFF_OPTIONAL_HEADER64_OFFSET_SIZE_OF_UNINITIALIZED_DATA 0xC
#define FU_STRUCT_PE_COFF_OPTIONAL_HEADER64_OFFSET_ADDRESSOFENTRYPOINT 0x10
#define FU_STRUCT_PE_COFF_OPTIONAL_HEADER64_OFFSET_BASE_OF_CODE 0x14
#define FU_STRUCT_PE_COFF_OPTIONAL_HEADER64_OFFSET_IMAGE_BASE 0x18
#define FU_STRUCT_PE_COFF_OPTIONAL_HEADER64_OFFSET_SECTION_ALIGNMENT 0x20
#define FU_STRUCT_PE_COFF_OPTIONAL_HEADER64_OFFSET_FILE_ALIGNMENT 0x24
#define FU_STRUCT_PE_COFF_OPTIONAL_HEADER64_OFFSET_SIZE_OF_IMAGE 0x38
#define FU_STRUCT_PE_COFF_OPTIONAL_HEADER64_OFFSET_SIZE_OF_HEADERS 0x3C
#define FU_STRUCT_PE_COFF_OPTIONAL_HEADER64_OFFSET_CHECKSUM 0x40
#define FU_STRUCT_PE_COFF_OPTIONAL_HEADER64_OFFSET_SUBSYSTEM 0x44
#define FU_STRUCT_PE_COFF_OPTIONAL_HEADER64_OFFSET_LOADER_FLAGS 0x68
#define FU_STRUCT_PE_COFF_OPTIONAL_HEADER64_OFFSET_NUMBER_OF_RVA_AND_SIZES 0x6C
#define FU_STRUCT_PE_COFF_OPTIONAL_HEADER64_OFFSET_CERTIFICATE_TABLE 0x90
#define FU_STRUCT_PE_COFF_OPTIONAL_HEADER64_OFFSET_SIZE_OF_CERTIFICATE_TABLE 0x94
#define FU_STRUCT_PE_COFF_OPTIONAL_HEADER64_OFFSET_DEBUG_TABLE 0x98
#define FU_STRUCT_PE_COFF_OPTIONAL_HEADER64_OFFSET_SIZE_OF_DEBUG_TABLE 0x9C
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_PE_COFF_OPTIONAL_HEADER64_SIZE 0xB0
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_PE_COFF_OPTIONAL_HEADER64_DEFAULT_MAGIC FU_PE_COFF_MAGIC_PE32_PLUS
#define FU_STRUCT_PE_COFF_OPTIONAL_HEADER64_DEFAULT_MAJOR_LINKER_VERSION 0x0e
#define FU_STRUCT_PE_COFF_OPTIONAL_HEADER64_DEFAULT_MINOR_LINKER_VERSION 0x0e
#define FU_STRUCT_PE_COFF_OPTIONAL_HEADER64_DEFAULT_SECTION_ALIGNMENT 0x200
#define FU_STRUCT_PE_COFF_OPTIONAL_HEADER64_DEFAULT_FILE_ALIGNMENT 0x200
#define FU_STRUCT_PE_COFF_OPTIONAL_HEADER64_DEFAULT_SUBSYSTEM FU_COFF_SUBSYSTEM_EFI_APPLICATION
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructPeCoffSymbol;

FuStructPeCoffSymbol *fu_struct_pe_coff_symbol_ref(FuStructPeCoffSymbol *st) G_GNUC_NON_NULL(1);
void fu_struct_pe_coff_symbol_unref(FuStructPeCoffSymbol *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructPeCoffSymbol, fu_struct_pe_coff_symbol_unref)

#ifndef __GI_SCANNER__
#define FU_STRUCT_PE_COFF_SYMBOL_OFFSET_NAME 0x0
#define FU_STRUCT_PE_COFF_SYMBOL_OFFSET_VALUE 0x8
#define FU_STRUCT_PE_COFF_SYMBOL_OFFSET_SECTION_NUMBER 0xC
#define FU_STRUCT_PE_COFF_SYMBOL_OFFSET_TYPE 0xE
#define FU_STRUCT_PE_COFF_SYMBOL_OFFSET_STORAGE_CLASS 0x10
#define FU_STRUCT_PE_COFF_SYMBOL_OFFSET_NUMBER_OF_AUX_SYMBOLS 0x11
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_PE_COFF_SYMBOL_SIZE_NAME 0x8
#define FU_STRUCT_PE_COFF_SYMBOL_N_ELEMENTS_NAME 8
#define FU_STRUCT_PE_COFF_SYMBOL_SIZE 0x12
#endif

#ifndef __GI_SCANNER__
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructPeCoffSection;

FuStructPeCoffSection *fu_struct_pe_coff_section_ref(FuStructPeCoffSection *st) G_GNUC_NON_NULL(1);
void fu_struct_pe_coff_section_unref(FuStructPeCoffSection *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructPeCoffSection, fu_struct_pe_coff_section_unref)
FuStructPeCoffSection *fu_struct_pe_coff_section_new(void) G_GNUC_WARN_UNUSED_RESULT;
FuStructPeCoffSection *fu_struct_pe_coff_section_parse_stream(GInputStream *stream, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
gchar *fu_struct_pe_coff_section_get_name(const FuStructPeCoffSection *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_pe_coff_section_get_virtual_size(const FuStructPeCoffSection *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_pe_coff_section_get_virtual_address(const FuStructPeCoffSection *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_pe_coff_section_get_size_of_raw_data(const FuStructPeCoffSection *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_pe_coff_section_get_pointer_to_raw_data(const FuStructPeCoffSection *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_pe_coff_section_get_characteristics(const FuStructPeCoffSection *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
gboolean fu_struct_pe_coff_section_set_name(FuStructPeCoffSection *st, const gchar *value, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_pe_coff_section_set_virtual_size(FuStructPeCoffSection *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_pe_coff_section_set_virtual_address(FuStructPeCoffSection *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_pe_coff_section_set_size_of_raw_data(FuStructPeCoffSection *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_pe_coff_section_set_pointer_to_raw_data(FuStructPeCoffSection *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_pe_coff_section_set_characteristics(FuStructPeCoffSection *st, guint32 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_PE_COFF_SECTION_OFFSET_NAME 0x0
#define FU_STRUCT_PE_COFF_SECTION_OFFSET_VIRTUAL_SIZE 0x8
#define FU_STRUCT_PE_COFF_SECTION_OFFSET_VIRTUAL_ADDRESS 0xC
#define FU_STRUCT_PE_COFF_SECTION_OFFSET_SIZE_OF_RAW_DATA 0x10
#define FU_STRUCT_PE_COFF_SECTION_OFFSET_POINTER_TO_RAW_DATA 0x14
#define FU_STRUCT_PE_COFF_SECTION_OFFSET_CHARACTERISTICS 0x24
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_PE_COFF_SECTION_SIZE_NAME 0x8
#define FU_STRUCT_PE_COFF_SECTION_N_ELEMENTS_NAME 8
#define FU_STRUCT_PE_COFF_SECTION_SIZE 0x28
#endif

#ifndef __GI_SCANNER__
#endif
