#define asconst_VECTOR_SIZE 64
#define asconst_XMM_SIZE 16
#define asconst_LR_SIZE 704
#define asconst_LR_RDX_OFFSET 0
#define asconst_LR_R8_OFFSET 8
#define asconst_LR_R9_OFFSET 16
#define asconst_LR_RCX_OFFSET 24
#define asconst_LR_RSI_OFFSET 32
#define asconst_LR_RDI_OFFSET 40
#define asconst_LR_RBP_OFFSET 48
#define asconst_LR_RSP_OFFSET 56
#define asconst_LR_XMM_OFFSET 64
#define asconst_LR_VECTOR_OFFSET 192
#define asconst_LRV_SIZE 208
#define asconst_LRV_RAX_OFFSET 0
#define asconst_LRV_RDX_OFFSET 8
#define asconst_LRV_XMM0_OFFSET 16
#define asconst_LRV_XMM1_OFFSET 32
#define asconst_LRV_ST0_OFFSET 48
#define asconst_LRV_ST1_OFFSET 64
#define asconst_LRV_VECTOR0_OFFSET 80
#define asconst_LRV_VECTOR1_OFFSET 144
#include "link.h"
#include <stddef.h>

#include <inttypes.h>

#include <stdio.h>

#include <bits/wordsize.h>

#if __WORDSIZE == 64

typedef uint64_t c_t;

#define U(n) UINT64_C (n)

#define PRI PRId64

#else

typedef uint32_t c_t;

#define U(n) UINT32_C (n)

#define PRI PRId32

#endif

static int do_test (void)
{
  int bad = 0, good = 0;

#define TEST(name, source, expr) \
  if (U (asconst_##name) != (c_t) (expr)) { ++bad; fprintf (stderr, "%s: %s is %" PRI " but %s is %"PRI "\n", source, #name, U (asconst_##name), #expr, (c_t) (expr)); } else ++good;

  TEST (VECTOR_SIZE, "../sysdeps/x86_64/link-defines.sym:5", sizeof (La_x86_64_vector))
  TEST (XMM_SIZE, "../sysdeps/x86_64/link-defines.sym:6", sizeof (La_x86_64_xmm))
  TEST (LR_SIZE, "../sysdeps/x86_64/link-defines.sym:8", sizeof (struct La_x86_64_regs))
  TEST (LR_RDX_OFFSET, "../sysdeps/x86_64/link-defines.sym:9", offsetof (struct La_x86_64_regs, lr_rdx))
  TEST (LR_R8_OFFSET, "../sysdeps/x86_64/link-defines.sym:10", offsetof (struct La_x86_64_regs, lr_r8))
  TEST (LR_R9_OFFSET, "../sysdeps/x86_64/link-defines.sym:11", offsetof (struct La_x86_64_regs, lr_r9))
  TEST (LR_RCX_OFFSET, "../sysdeps/x86_64/link-defines.sym:12", offsetof (struct La_x86_64_regs, lr_rcx))
  TEST (LR_RSI_OFFSET, "../sysdeps/x86_64/link-defines.sym:13", offsetof (struct La_x86_64_regs, lr_rsi))
  TEST (LR_RDI_OFFSET, "../sysdeps/x86_64/link-defines.sym:14", offsetof (struct La_x86_64_regs, lr_rdi))
  TEST (LR_RBP_OFFSET, "../sysdeps/x86_64/link-defines.sym:15", offsetof (struct La_x86_64_regs, lr_rbp))
  TEST (LR_RSP_OFFSET, "../sysdeps/x86_64/link-defines.sym:16", offsetof (struct La_x86_64_regs, lr_rsp))
  TEST (LR_XMM_OFFSET, "../sysdeps/x86_64/link-defines.sym:17", offsetof (struct La_x86_64_regs, lr_xmm))
  TEST (LR_VECTOR_OFFSET, "../sysdeps/x86_64/link-defines.sym:18", offsetof (struct La_x86_64_regs, lr_vector))
  TEST (LRV_SIZE, "../sysdeps/x86_64/link-defines.sym:20", sizeof (struct La_x86_64_retval))
  TEST (LRV_RAX_OFFSET, "../sysdeps/x86_64/link-defines.sym:21", offsetof (struct La_x86_64_retval, lrv_rax))
  TEST (LRV_RDX_OFFSET, "../sysdeps/x86_64/link-defines.sym:22", offsetof (struct La_x86_64_retval, lrv_rdx))
  TEST (LRV_XMM0_OFFSET, "../sysdeps/x86_64/link-defines.sym:23", offsetof (struct La_x86_64_retval, lrv_xmm0))
  TEST (LRV_XMM1_OFFSET, "../sysdeps/x86_64/link-defines.sym:24", offsetof (struct La_x86_64_retval, lrv_xmm1))
  TEST (LRV_ST0_OFFSET, "../sysdeps/x86_64/link-defines.sym:25", offsetof (struct La_x86_64_retval, lrv_st0))
  TEST (LRV_ST1_OFFSET, "../sysdeps/x86_64/link-defines.sym:26", offsetof (struct La_x86_64_retval, lrv_st1))
  TEST (LRV_VECTOR0_OFFSET, "../sysdeps/x86_64/link-defines.sym:27", offsetof (struct La_x86_64_retval, lrv_vector0))
  TEST (LRV_VECTOR1_OFFSET, "../sysdeps/x86_64/link-defines.sym:28", offsetof (struct La_x86_64_retval, lrv_vector1))
  printf ("%d errors in %d tests\n", bad, good + bad);
  return bad != 0 || good == 0;
}

#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"
