Line 10 defines the named struct X_vtable, but it also creates a global variable of the same type, and initializes it.
_X_vtable.id is an integer that uniquely identifies a particular class. Here, I only used sequential integers. To avoid an accidental matches, it is best to use a hash value based on the class name.
_X_vtable.m1 is a pointer to X_m1. Note that the type of the data member must match that of the actual function. This is why vtable is a misnomer, it should be a structure!
_X_vtable.offset_m1 is an integer that represents the offset (in number of bytes) to adjust when this subroutine is called. This will be explained later.
_X_vtable.m2 is a pointer to X_m2.
_X_vtable.offset_m2 is similar to _X_vtable.offset_m1.
_YX_vtable is similar to _X_vtable. However, note that the order of methods is the same as the order of methods in _X_vtable. This is because Y is derived from X, and _YX_vtable tells how a Y object to behave like an X object. This is why _YX_vtable.offset_m1 is 8, it is because the beginning of the X portion of an Y object is 8 bytes after the beginning of the Y object. The other offsets are 0 because they are native to a Y object.