/* Generated by the protocol buffer compiler.  DO NOT EDIT! */
/* Generated from: core-x86.proto */

#ifndef PROTOBUF_C_core_2dx86_2eproto__INCLUDED
#define PROTOBUF_C_core_2dx86_2eproto__INCLUDED

#include <protobuf-c/protobuf-c.h>

PROTOBUF_C__BEGIN_DECLS

#if PROTOBUF_C_VERSION_NUMBER < 1003000
# error This file was generated by a newer version of protobuf-c which is incompatible with your libprotobuf-c headers. Please update your headers.
#elif 1005002 < PROTOBUF_C_MIN_COMPILER_VERSION
# error This file was generated by an older version of protobuf-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protobuf-c.
#endif

#include "opts.pb-c.h"

typedef struct UserX86RegsEntry UserX86RegsEntry;
typedef struct UserX86CetEntry UserX86CetEntry;
typedef struct UserX86XsaveEntry UserX86XsaveEntry;
typedef struct UserX86FpregsEntry UserX86FpregsEntry;
typedef struct UserDescT UserDescT;
typedef struct ThreadInfoX86 ThreadInfoX86;


/* --- enums --- */

typedef enum _UserX86RegsMode {
  USER_X86_REGS_MODE__NATIVE = 1,
  USER_X86_REGS_MODE__COMPAT = 2
    PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(USER_X86_REGS_MODE)
} UserX86RegsMode;

/* --- messages --- */

/*
 * Reusing entry for both 64 and 32 bits register sets 
 */
struct  UserX86RegsEntry
{
  ProtobufCMessage base;
  uint64_t r15;
  uint64_t r14;
  uint64_t r13;
  uint64_t r12;
  uint64_t bp;
  uint64_t bx;
  uint64_t r11;
  uint64_t r10;
  uint64_t r9;
  uint64_t r8;
  uint64_t ax;
  uint64_t cx;
  uint64_t dx;
  uint64_t si;
  uint64_t di;
  uint64_t orig_ax;
  uint64_t ip;
  uint64_t cs;
  uint64_t flags;
  uint64_t sp;
  uint64_t ss;
  uint64_t fs_base;
  uint64_t gs_base;
  uint64_t ds;
  uint64_t es;
  uint64_t fs;
  uint64_t gs;
  protobuf_c_boolean has_mode;
  UserX86RegsMode mode;
};
#define USER_X86_REGS_ENTRY__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&user_x86_regs_entry__descriptor) \
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, USER_X86_REGS_MODE__NATIVE }


struct  UserX86CetEntry
{
  ProtobufCMessage base;
  uint64_t cet;
  uint64_t ssp;
};
#define USER_X86_CET_ENTRY__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&user_x86_cet_entry__descriptor) \
, 0, 0 }


struct  UserX86XsaveEntry
{
  ProtobufCMessage base;
  /*
   * standard xsave features 
   */
  uint64_t xstate_bv;
  /*
   * AVX components: 16x 256-bit ymm registers, hi 128 bits 
   */
  size_t n_ymmh_space;
  uint32_t *ymmh_space;
  /*
   * MPX components 
   */
  size_t n_bndreg_state;
  uint64_t *bndreg_state;
  size_t n_bndcsr_state;
  uint64_t *bndcsr_state;
  /*
   * AVX512 components: k0-k7, ZMM_Hi256, Hi16_ZMM  
   */
  size_t n_opmask_reg;
  uint64_t *opmask_reg;
  size_t n_zmm_upper;
  uint64_t *zmm_upper;
  size_t n_hi16_zmm;
  uint64_t *hi16_zmm;
  /*
   * Protected keys 
   */
  size_t n_pkru;
  uint32_t *pkru;
  /*
   * CET 
   */
  UserX86CetEntry *cet;
};
#define USER_X86_XSAVE_ENTRY__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&user_x86_xsave_entry__descriptor) \
, 0, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, NULL }


struct  UserX86FpregsEntry
{
  ProtobufCMessage base;
  /*
   * fxsave data 
   */
  uint32_t cwd;
  uint32_t swd;
  uint32_t twd;
  uint32_t fop;
  uint64_t rip;
  uint64_t rdp;
  uint32_t mxcsr;
  uint32_t mxcsr_mask;
  size_t n_st_space;
  uint32_t *st_space;
  size_t n_xmm_space;
  uint32_t *xmm_space;
  /*
   * Unused, but present for backward compatibility 
   */
  size_t n_padding;
  uint32_t *padding;
  /*
   * xsave extension 
   */
  UserX86XsaveEntry *xsave;
};
#define USER_X86_FPREGS_ENTRY__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&user_x86_fpregs_entry__descriptor) \
, 0, 0, 0, 0, 0, 0, 0, 0, 0,NULL, 0,NULL, 0,NULL, NULL }


struct  UserDescT
{
  ProtobufCMessage base;
  uint32_t entry_number;
  /*
   * this is for GDT, not for MSRs - 32-bit base 
   */
  uint32_t base_addr;
  uint32_t limit;
  protobuf_c_boolean seg_32bit;
  protobuf_c_boolean contents_h;
  protobuf_c_boolean contents_l;
  protobuf_c_boolean read_exec_only;
  protobuf_c_boolean limit_in_pages;
  protobuf_c_boolean seg_not_present;
  protobuf_c_boolean usable;
};
#define USER_DESC_T__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&user_desc_t__descriptor) \
, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0 }


struct  ThreadInfoX86
{
  ProtobufCMessage base;
  uint64_t clear_tid_addr;
  UserX86RegsEntry *gpregs;
  UserX86FpregsEntry *fpregs;
  size_t n_tls;
  UserDescT **tls;
};
#define THREAD_INFO_X86__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&thread_info_x86__descriptor) \
, 0, NULL, NULL, 0,NULL }


/* UserX86RegsEntry methods */
void   user_x86_regs_entry__init
                     (UserX86RegsEntry         *message);
size_t user_x86_regs_entry__get_packed_size
                     (const UserX86RegsEntry   *message);
size_t user_x86_regs_entry__pack
                     (const UserX86RegsEntry   *message,
                      uint8_t             *out);
size_t user_x86_regs_entry__pack_to_buffer
                     (const UserX86RegsEntry   *message,
                      ProtobufCBuffer     *buffer);
UserX86RegsEntry *
       user_x86_regs_entry__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   user_x86_regs_entry__free_unpacked
                     (UserX86RegsEntry *message,
                      ProtobufCAllocator *allocator);
/* UserX86CetEntry methods */
void   user_x86_cet_entry__init
                     (UserX86CetEntry         *message);
size_t user_x86_cet_entry__get_packed_size
                     (const UserX86CetEntry   *message);
size_t user_x86_cet_entry__pack
                     (const UserX86CetEntry   *message,
                      uint8_t             *out);
size_t user_x86_cet_entry__pack_to_buffer
                     (const UserX86CetEntry   *message,
                      ProtobufCBuffer     *buffer);
UserX86CetEntry *
       user_x86_cet_entry__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   user_x86_cet_entry__free_unpacked
                     (UserX86CetEntry *message,
                      ProtobufCAllocator *allocator);
/* UserX86XsaveEntry methods */
void   user_x86_xsave_entry__init
                     (UserX86XsaveEntry         *message);
size_t user_x86_xsave_entry__get_packed_size
                     (const UserX86XsaveEntry   *message);
size_t user_x86_xsave_entry__pack
                     (const UserX86XsaveEntry   *message,
                      uint8_t             *out);
size_t user_x86_xsave_entry__pack_to_buffer
                     (const UserX86XsaveEntry   *message,
                      ProtobufCBuffer     *buffer);
UserX86XsaveEntry *
       user_x86_xsave_entry__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   user_x86_xsave_entry__free_unpacked
                     (UserX86XsaveEntry *message,
                      ProtobufCAllocator *allocator);
/* UserX86FpregsEntry methods */
void   user_x86_fpregs_entry__init
                     (UserX86FpregsEntry         *message);
size_t user_x86_fpregs_entry__get_packed_size
                     (const UserX86FpregsEntry   *message);
size_t user_x86_fpregs_entry__pack
                     (const UserX86FpregsEntry   *message,
                      uint8_t             *out);
size_t user_x86_fpregs_entry__pack_to_buffer
                     (const UserX86FpregsEntry   *message,
                      ProtobufCBuffer     *buffer);
UserX86FpregsEntry *
       user_x86_fpregs_entry__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   user_x86_fpregs_entry__free_unpacked
                     (UserX86FpregsEntry *message,
                      ProtobufCAllocator *allocator);
/* UserDescT methods */
void   user_desc_t__init
                     (UserDescT         *message);
size_t user_desc_t__get_packed_size
                     (const UserDescT   *message);
size_t user_desc_t__pack
                     (const UserDescT   *message,
                      uint8_t             *out);
size_t user_desc_t__pack_to_buffer
                     (const UserDescT   *message,
                      ProtobufCBuffer     *buffer);
UserDescT *
       user_desc_t__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   user_desc_t__free_unpacked
                     (UserDescT *message,
                      ProtobufCAllocator *allocator);
/* ThreadInfoX86 methods */
void   thread_info_x86__init
                     (ThreadInfoX86         *message);
size_t thread_info_x86__get_packed_size
                     (const ThreadInfoX86   *message);
size_t thread_info_x86__pack
                     (const ThreadInfoX86   *message,
                      uint8_t             *out);
size_t thread_info_x86__pack_to_buffer
                     (const ThreadInfoX86   *message,
                      ProtobufCBuffer     *buffer);
ThreadInfoX86 *
       thread_info_x86__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   thread_info_x86__free_unpacked
                     (ThreadInfoX86 *message,
                      ProtobufCAllocator *allocator);
/* --- per-message closures --- */

typedef void (*UserX86RegsEntry_Closure)
                 (const UserX86RegsEntry *message,
                  void *closure_data);
typedef void (*UserX86CetEntry_Closure)
                 (const UserX86CetEntry *message,
                  void *closure_data);
typedef void (*UserX86XsaveEntry_Closure)
                 (const UserX86XsaveEntry *message,
                  void *closure_data);
typedef void (*UserX86FpregsEntry_Closure)
                 (const UserX86FpregsEntry *message,
                  void *closure_data);
typedef void (*UserDescT_Closure)
                 (const UserDescT *message,
                  void *closure_data);
typedef void (*ThreadInfoX86_Closure)
                 (const ThreadInfoX86 *message,
                  void *closure_data);

/* --- services --- */


/* --- descriptors --- */

extern const ProtobufCEnumDescriptor    user_x86_regs_mode__descriptor;
extern const ProtobufCMessageDescriptor user_x86_regs_entry__descriptor;
extern const ProtobufCMessageDescriptor user_x86_cet_entry__descriptor;
extern const ProtobufCMessageDescriptor user_x86_xsave_entry__descriptor;
extern const ProtobufCMessageDescriptor user_x86_fpregs_entry__descriptor;
extern const ProtobufCMessageDescriptor user_desc_t__descriptor;
extern const ProtobufCMessageDescriptor thread_info_x86__descriptor;

PROTOBUF_C__END_DECLS


#endif  /* PROTOBUF_C_core_2dx86_2eproto__INCLUDED */
