So far this is my understanding of ileafs:
leaf points to a block.
(void *)leaf + btree->sb->blocksize = dict (i.e. the start of the next block).
dict indexes starts at 0 and goes to -leaf->count. (indexing inums from leaf->ibase to leaf->ibase + leaf->count).
dict entries are u16 offsets from leaf->table to the start of that inum's attrs.
The zeroth entry is "fake" and the offset is always zero.
The size of that inum's attrs is its offset - the offset of the next inum's attrs.