+ match_DspSimpleText();
+ if (match_u16(0x8018))
+ {
+ printf("18 80(%02x %02x %02x) ",
+ data[pos], data[pos + 1], data[pos + 2]);
+ pos += 3;
+ }
+ if (match_u16(0x8011))
+ {
+ printf("11 80(");
+ pos += 2;
+ for (size_t i = 0; i < 16; i++)
+ printf("%s%02x", i > 0 ? " " : "", data[pos++]);
+ printf(") ");
+ }
+ match_DspString();
+
+ int n_subcategories = get_u32();
+ if (n_subcategories)
+ assert (leaf_idx == 0);
+ else
+ {
+ assert (leaf_idx == *n_leaves);
+ ++*n_leaves;
+ }
+ for (int k = 0; k < n_subcategories; k++)
+ parse_category(level + 1, k, n_leaves);
+}
+
+static void
+parse_dimension(int i)
+{
+ printf ("%#x: dimension %d\n", pos, i);
+ if (i == 0)
+ {
+ match_zeros_assert(5);
+ }
+ else
+ {
+ match_zeros_assert(6);
+
+ int n_units16 = get_u32();
+ match_u16_assert(1);
+ for (int j = 0; j < n_units16; j++)
+ get_u16();
+
+ match_byte_assert(0);
+
+ int n_units32 = get_u32();
+ match_u16_assert(0);
+ for (int j = 0; j < n_units32; j++)
+ get_u32();
+
+ get_u16(); match_byte_assert(0);
+
+ get_u16(); match_byte_assert(0);
+ get_u16(); match_byte_assert(0);
+ match_u32_assert(0);
+ }
+
+ if (!match_u32(0))
+ match_u32_assert(1);
+
+ get_u16();
+ if (!match_u16(0xffff))
+ match_u16_assert(0x0e74);
+ match_byte_assert(0);
+ match_DspSimpleText();
+ match_DspString();
+
+ int n_leaves = 0;
+ int n_categories = get_u32();
+ for (int j = 0; j < n_categories; j++)
+ parse_category(1, j, &n_leaves);
+}
+
+static void skip_item(const char *name);
+
+static void
+parse_PMModelItemInfo(void)
+{
+ for (int i = 0; i < n_dims; i++)
+ parse_dimension(i);
+ printf("%#x: end of model\n", pos);
+
+ int n_units16 = get_u32();
+ match_u16_assert(0);
+ for (int j = 0; j < n_units16; j++)
+ get_u16();
+
+ n_units16 = get_u32();
+ match_u16_assert(1);
+ for (int j = 0; j < n_units16; j++)
+ get_u16();
+