+static bool __attribute__((unused))
+match_u64(uint64_t x)
+{
+ if (get_u64() == x)
+ return true;
+ pos -= 8;
+ return false;
+}
+
+static void __attribute__((unused))
+match_u64_assert(uint64_t x, const char *where)
+{
+ unsigned long long int y = get_u64();
+ if (x != y)
+ {
+ fprintf(stderr, "%s: 0x%x: expected u64:%llu, got u64:%llu\n", where, pos - 8, x, y);
+ exit(1);
+ }
+}
+#define match_u64_assert(x) match_u64_assert(x, WHERE)
+
+static bool __attribute__((unused))
+match_be32(uint32_t x)
+{
+ if (get_be32() == x)
+ return true;
+ pos -= 4;
+ return false;
+}
+
+static void
+match_be32_assert(uint32_t x, const char *where)
+{
+ unsigned int y = get_be32();
+ if (x != y)
+ {
+ fprintf(stderr, "%s: 0x%x: expected be%u, got be%u\n", where, pos - 4, x, y);
+ exit(1);
+ }
+}
+#define match_be32_assert(x) match_be32_assert(x, WHERE)
+