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

#pragma once
#include <fu-input-stream.h>
/**
 * FuElfFileHeaderType:
 */
typedef enum {
    /**
     * FU_ELF_FILE_HEADER_TYPE_NONE:
     */
    FU_ELF_FILE_HEADER_TYPE_NONE = 0x00,
    /**
     * FU_ELF_FILE_HEADER_TYPE_REL:
     */
    FU_ELF_FILE_HEADER_TYPE_REL = 0x01,
    /**
     * FU_ELF_FILE_HEADER_TYPE_EXEC:
     */
    FU_ELF_FILE_HEADER_TYPE_EXEC = 0x02,
    /**
     * FU_ELF_FILE_HEADER_TYPE_DYN:
     */
    FU_ELF_FILE_HEADER_TYPE_DYN = 0x03,
    /**
     * FU_ELF_FILE_HEADER_TYPE_CORE:
     */
    FU_ELF_FILE_HEADER_TYPE_CORE = 0x04,
}  FuElfFileHeaderType;
/**
 * FuElfSectionHeaderType:
 */
typedef enum {
    /**
     * FU_ELF_SECTION_HEADER_TYPE_NULL:
     */
    FU_ELF_SECTION_HEADER_TYPE_NULL = 0x0,
    /**
     * FU_ELF_SECTION_HEADER_TYPE_PROGBITS:
     */
    FU_ELF_SECTION_HEADER_TYPE_PROGBITS = 0x1,
    /**
     * FU_ELF_SECTION_HEADER_TYPE_SYMTAB:
     */
    FU_ELF_SECTION_HEADER_TYPE_SYMTAB = 0x2,
    /**
     * FU_ELF_SECTION_HEADER_TYPE_STRTAB:
     */
    FU_ELF_SECTION_HEADER_TYPE_STRTAB = 0x3,
    /**
     * FU_ELF_SECTION_HEADER_TYPE_RELA:
     */
    FU_ELF_SECTION_HEADER_TYPE_RELA = 0x4,
    /**
     * FU_ELF_SECTION_HEADER_TYPE_HASH:
     */
    FU_ELF_SECTION_HEADER_TYPE_HASH = 0x5,
    /**
     * FU_ELF_SECTION_HEADER_TYPE_DYNAMIC:
     */
    FU_ELF_SECTION_HEADER_TYPE_DYNAMIC = 0x6,
    /**
     * FU_ELF_SECTION_HEADER_TYPE_NOTE:
     */
    FU_ELF_SECTION_HEADER_TYPE_NOTE = 0x7,
    /**
     * FU_ELF_SECTION_HEADER_TYPE_NOBITS:
     */
    FU_ELF_SECTION_HEADER_TYPE_NOBITS = 0x8,
    /**
     * FU_ELF_SECTION_HEADER_TYPE_REL:
     */
    FU_ELF_SECTION_HEADER_TYPE_REL = 0x9,
    /**
     * FU_ELF_SECTION_HEADER_TYPE_SHLIB:
     */
    FU_ELF_SECTION_HEADER_TYPE_SHLIB = 0x0a,
    /**
     * FU_ELF_SECTION_HEADER_TYPE_DYNSYM:
     */
    FU_ELF_SECTION_HEADER_TYPE_DYNSYM = 0x0b,
    /**
     * FU_ELF_SECTION_HEADER_TYPE_INIT_ARRAY:
     */
    FU_ELF_SECTION_HEADER_TYPE_INIT_ARRAY = 0x0e,
    /**
     * FU_ELF_SECTION_HEADER_TYPE_FINI_ARRAY:
     */
    FU_ELF_SECTION_HEADER_TYPE_FINI_ARRAY = 0x0f,
    /**
     * FU_ELF_SECTION_HEADER_TYPE_PREINIT_ARRAY:
     */
    FU_ELF_SECTION_HEADER_TYPE_PREINIT_ARRAY = 0x10,
    /**
     * FU_ELF_SECTION_HEADER_TYPE_GROUP:
     */
    FU_ELF_SECTION_HEADER_TYPE_GROUP = 0x11,
    /**
     * FU_ELF_SECTION_HEADER_TYPE_SYMTAB_SHNDX:
     */
    FU_ELF_SECTION_HEADER_TYPE_SYMTAB_SHNDX = 0x12,
    /**
     * FU_ELF_SECTION_HEADER_TYPE_NUM:
     */
    FU_ELF_SECTION_HEADER_TYPE_NUM = 0x13,
}  FuElfSectionHeaderType;
const gchar *fu_elf_section_header_type_to_string(FuElfSectionHeaderType val) G_GNUC_CONST;
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElfFileHeader64le;

FuStructElfFileHeader64le *fu_struct_elf_file_header64le_ref(FuStructElfFileHeader64le *st) G_GNUC_NON_NULL(1);
void fu_struct_elf_file_header64le_unref(FuStructElfFileHeader64le *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElfFileHeader64le, fu_struct_elf_file_header64le_unref)
FuStructElfFileHeader64le *fu_struct_elf_file_header64le_new(void) G_GNUC_WARN_UNUSED_RESULT;
FuStructElfFileHeader64le *fu_struct_elf_file_header64le_parse_stream(GInputStream *stream, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
gboolean fu_struct_elf_file_header64le_validate_stream(GInputStream *stream, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_elf_file_header64le_get_ei_osabi(const FuStructElfFileHeader64le *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_elf_file_header64le_get_ei_abiversion(const FuStructElfFileHeader64le *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuElfFileHeaderType fu_struct_elf_file_header64le_get_type(const FuStructElfFileHeader64le *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_elf_file_header64le_get_machine(const FuStructElfFileHeader64le *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint64 fu_struct_elf_file_header64le_get_entry(const FuStructElfFileHeader64le *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint64 fu_struct_elf_file_header64le_get_phoff(const FuStructElfFileHeader64le *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint64 fu_struct_elf_file_header64le_get_shoff(const FuStructElfFileHeader64le *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_elf_file_header64le_get_flags(const FuStructElfFileHeader64le *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_elf_file_header64le_get_ehsize(const FuStructElfFileHeader64le *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_elf_file_header64le_get_phentsize(const FuStructElfFileHeader64le *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_elf_file_header64le_get_phnum(const FuStructElfFileHeader64le *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_elf_file_header64le_get_shentsize(const FuStructElfFileHeader64le *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_elf_file_header64le_get_shnum(const FuStructElfFileHeader64le *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_elf_file_header64le_get_shstrndx(const FuStructElfFileHeader64le *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_elf_file_header64le_set_ei_osabi(FuStructElfFileHeader64le *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_elf_file_header64le_set_ei_abiversion(FuStructElfFileHeader64le *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_elf_file_header64le_set_type(FuStructElfFileHeader64le *st, FuElfFileHeaderType value) G_GNUC_NON_NULL(1);
void fu_struct_elf_file_header64le_set_machine(FuStructElfFileHeader64le *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_elf_file_header64le_set_entry(FuStructElfFileHeader64le *st, guint64 value) G_GNUC_NON_NULL(1);
void fu_struct_elf_file_header64le_set_phoff(FuStructElfFileHeader64le *st, guint64 value) G_GNUC_NON_NULL(1);
void fu_struct_elf_file_header64le_set_shoff(FuStructElfFileHeader64le *st, guint64 value) G_GNUC_NON_NULL(1);
void fu_struct_elf_file_header64le_set_flags(FuStructElfFileHeader64le *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_elf_file_header64le_set_ehsize(FuStructElfFileHeader64le *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_elf_file_header64le_set_phentsize(FuStructElfFileHeader64le *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_elf_file_header64le_set_phnum(FuStructElfFileHeader64le *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_elf_file_header64le_set_shentsize(FuStructElfFileHeader64le *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_elf_file_header64le_set_shnum(FuStructElfFileHeader64le *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_elf_file_header64le_set_shstrndx(FuStructElfFileHeader64le *st, guint16 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELF_FILE_HEADER64LE_OFFSET_EI_MAGIC 0x0
#define FU_STRUCT_ELF_FILE_HEADER64LE_OFFSET_EI_CLASS 0x4
#define FU_STRUCT_ELF_FILE_HEADER64LE_OFFSET_EI_DATA 0x5
#define FU_STRUCT_ELF_FILE_HEADER64LE_OFFSET_EI_VERSION 0x6
#define FU_STRUCT_ELF_FILE_HEADER64LE_OFFSET_EI_OSABI 0x7
#define FU_STRUCT_ELF_FILE_HEADER64LE_OFFSET_EI_ABIVERSION 0x8
#define FU_STRUCT_ELF_FILE_HEADER64LE_OFFSET_TYPE 0x10
#define FU_STRUCT_ELF_FILE_HEADER64LE_OFFSET_MACHINE 0x12
#define FU_STRUCT_ELF_FILE_HEADER64LE_OFFSET_VERSION 0x14
#define FU_STRUCT_ELF_FILE_HEADER64LE_OFFSET_ENTRY 0x18
#define FU_STRUCT_ELF_FILE_HEADER64LE_OFFSET_PHOFF 0x20
#define FU_STRUCT_ELF_FILE_HEADER64LE_OFFSET_SHOFF 0x28
#define FU_STRUCT_ELF_FILE_HEADER64LE_OFFSET_FLAGS 0x30
#define FU_STRUCT_ELF_FILE_HEADER64LE_OFFSET_EHSIZE 0x34
#define FU_STRUCT_ELF_FILE_HEADER64LE_OFFSET_PHENTSIZE 0x36
#define FU_STRUCT_ELF_FILE_HEADER64LE_OFFSET_PHNUM 0x38
#define FU_STRUCT_ELF_FILE_HEADER64LE_OFFSET_SHENTSIZE 0x3A
#define FU_STRUCT_ELF_FILE_HEADER64LE_OFFSET_SHNUM 0x3C
#define FU_STRUCT_ELF_FILE_HEADER64LE_OFFSET_SHSTRNDX 0x3E
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELF_FILE_HEADER64LE_SIZE_EI_MAGIC 0x4
#define FU_STRUCT_ELF_FILE_HEADER64LE_N_ELEMENTS_EI_MAGIC 4
#define FU_STRUCT_ELF_FILE_HEADER64LE_SIZE 0x40
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELF_FILE_HEADER64LE_DEFAULT_EI_MAGIC "\x7F\x45\x4C\x46"
#define FU_STRUCT_ELF_FILE_HEADER64LE_DEFAULT_EI_CLASS 0x2
#define FU_STRUCT_ELF_FILE_HEADER64LE_DEFAULT_EI_DATA 0x1
#define FU_STRUCT_ELF_FILE_HEADER64LE_DEFAULT_EI_VERSION 0x1
#define FU_STRUCT_ELF_FILE_HEADER64LE_DEFAULT_EI_OSABI 0x3
#define FU_STRUCT_ELF_FILE_HEADER64LE_DEFAULT_VERSION 0x1
#define FU_STRUCT_ELF_FILE_HEADER64LE_DEFAULT_PHOFF 64
#define FU_STRUCT_ELF_FILE_HEADER64LE_DEFAULT_EHSIZE 64
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructElfProgramHeader64le;

FuStructElfProgramHeader64le *fu_struct_elf_program_header64le_ref(FuStructElfProgramHeader64le *st) G_GNUC_NON_NULL(1);
void fu_struct_elf_program_header64le_unref(FuStructElfProgramHeader64le *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElfProgramHeader64le, fu_struct_elf_program_header64le_unref)
FuStructElfProgramHeader64le *fu_struct_elf_program_header64le_new(void) G_GNUC_WARN_UNUSED_RESULT;
FuStructElfProgramHeader64le *fu_struct_elf_program_header64le_parse_stream(GInputStream *stream, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_elf_program_header64le_get_flags(const FuStructElfProgramHeader64le *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint64 fu_struct_elf_program_header64le_get_offset(const FuStructElfProgramHeader64le *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint64 fu_struct_elf_program_header64le_get_vaddr(const FuStructElfProgramHeader64le *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint64 fu_struct_elf_program_header64le_get_paddr(const FuStructElfProgramHeader64le *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint64 fu_struct_elf_program_header64le_get_filesz(const FuStructElfProgramHeader64le *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint64 fu_struct_elf_program_header64le_get_memsz(const FuStructElfProgramHeader64le *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_elf_program_header64le_get_flags2(const FuStructElfProgramHeader64le *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint64 fu_struct_elf_program_header64le_get_align(const FuStructElfProgramHeader64le *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_elf_program_header64le_set_flags(FuStructElfProgramHeader64le *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_elf_program_header64le_set_offset(FuStructElfProgramHeader64le *st, guint64 value) G_GNUC_NON_NULL(1);
void fu_struct_elf_program_header64le_set_vaddr(FuStructElfProgramHeader64le *st, guint64 value) G_GNUC_NON_NULL(1);
void fu_struct_elf_program_header64le_set_paddr(FuStructElfProgramHeader64le *st, guint64 value) G_GNUC_NON_NULL(1);
void fu_struct_elf_program_header64le_set_filesz(FuStructElfProgramHeader64le *st, guint64 value) G_GNUC_NON_NULL(1);
void fu_struct_elf_program_header64le_set_memsz(FuStructElfProgramHeader64le *st, guint64 value) G_GNUC_NON_NULL(1);
void fu_struct_elf_program_header64le_set_flags2(FuStructElfProgramHeader64le *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_elf_program_header64le_set_align(FuStructElfProgramHeader64le *st, guint64 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELF_PROGRAM_HEADER64LE_OFFSET_FLAGS 0x0
#define FU_STRUCT_ELF_PROGRAM_HEADER64LE_OFFSET_OFFSET 0x4
#define FU_STRUCT_ELF_PROGRAM_HEADER64LE_OFFSET_VADDR 0xC
#define FU_STRUCT_ELF_PROGRAM_HEADER64LE_OFFSET_PADDR 0x14
#define FU_STRUCT_ELF_PROGRAM_HEADER64LE_OFFSET_FILESZ 0x1C
#define FU_STRUCT_ELF_PROGRAM_HEADER64LE_OFFSET_MEMSZ 0x24
#define FU_STRUCT_ELF_PROGRAM_HEADER64LE_OFFSET_FLAGS2 0x2C
#define FU_STRUCT_ELF_PROGRAM_HEADER64LE_OFFSET_ALIGN 0x30
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELF_PROGRAM_HEADER64LE_SIZE 0x38
#endif

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

FuStructElfSectionHeader64le *fu_struct_elf_section_header64le_ref(FuStructElfSectionHeader64le *st) G_GNUC_NON_NULL(1);
void fu_struct_elf_section_header64le_unref(FuStructElfSectionHeader64le *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructElfSectionHeader64le, fu_struct_elf_section_header64le_unref)
FuStructElfSectionHeader64le *fu_struct_elf_section_header64le_new(void) G_GNUC_WARN_UNUSED_RESULT;
FuStructElfSectionHeader64le *fu_struct_elf_section_header64le_parse_stream(GInputStream *stream, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_elf_section_header64le_get_name(const FuStructElfSectionHeader64le *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuElfSectionHeaderType fu_struct_elf_section_header64le_get_type(const FuStructElfSectionHeader64le *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint64 fu_struct_elf_section_header64le_get_flags(const FuStructElfSectionHeader64le *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint64 fu_struct_elf_section_header64le_get_addr(const FuStructElfSectionHeader64le *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint64 fu_struct_elf_section_header64le_get_offset(const FuStructElfSectionHeader64le *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint64 fu_struct_elf_section_header64le_get_size(const FuStructElfSectionHeader64le *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_elf_section_header64le_get_link(const FuStructElfSectionHeader64le *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_elf_section_header64le_get_info(const FuStructElfSectionHeader64le *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint64 fu_struct_elf_section_header64le_get_addralign(const FuStructElfSectionHeader64le *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint64 fu_struct_elf_section_header64le_get_entsize(const FuStructElfSectionHeader64le *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_elf_section_header64le_set_name(FuStructElfSectionHeader64le *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_elf_section_header64le_set_type(FuStructElfSectionHeader64le *st, FuElfSectionHeaderType value) G_GNUC_NON_NULL(1);
void fu_struct_elf_section_header64le_set_flags(FuStructElfSectionHeader64le *st, guint64 value) G_GNUC_NON_NULL(1);
void fu_struct_elf_section_header64le_set_addr(FuStructElfSectionHeader64le *st, guint64 value) G_GNUC_NON_NULL(1);
void fu_struct_elf_section_header64le_set_offset(FuStructElfSectionHeader64le *st, guint64 value) G_GNUC_NON_NULL(1);
void fu_struct_elf_section_header64le_set_size(FuStructElfSectionHeader64le *st, guint64 value) G_GNUC_NON_NULL(1);
void fu_struct_elf_section_header64le_set_link(FuStructElfSectionHeader64le *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_elf_section_header64le_set_info(FuStructElfSectionHeader64le *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_elf_section_header64le_set_addralign(FuStructElfSectionHeader64le *st, guint64 value) G_GNUC_NON_NULL(1);
void fu_struct_elf_section_header64le_set_entsize(FuStructElfSectionHeader64le *st, guint64 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELF_SECTION_HEADER64LE_OFFSET_NAME 0x0
#define FU_STRUCT_ELF_SECTION_HEADER64LE_OFFSET_TYPE 0x4
#define FU_STRUCT_ELF_SECTION_HEADER64LE_OFFSET_FLAGS 0x8
#define FU_STRUCT_ELF_SECTION_HEADER64LE_OFFSET_ADDR 0x10
#define FU_STRUCT_ELF_SECTION_HEADER64LE_OFFSET_OFFSET 0x18
#define FU_STRUCT_ELF_SECTION_HEADER64LE_OFFSET_SIZE 0x20
#define FU_STRUCT_ELF_SECTION_HEADER64LE_OFFSET_LINK 0x28
#define FU_STRUCT_ELF_SECTION_HEADER64LE_OFFSET_INFO 0x2C
#define FU_STRUCT_ELF_SECTION_HEADER64LE_OFFSET_ADDRALIGN 0x30
#define FU_STRUCT_ELF_SECTION_HEADER64LE_OFFSET_ENTSIZE 0x38
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ELF_SECTION_HEADER64LE_SIZE 0x40
#endif

#ifndef __GI_SCANNER__
#endif
