I would checkout the frames TT, EHTT and standover rather than relying on the manufactures claimed size,
I have an inseam of 34" and ended up with a 17.5" (medium) frame,my XC bikes had a TT of around 23+" when I got my current bike which is aimed at more AM riding I tested a large with again a TT of around 23+" plus a 110mm stem and it felt right,however once I got the bike and started using it I began to realise that a smaller TT would be far better,I didn't what to go shorter on the stem as the steering is quick enough as it is,luckly they agreed a frame swap and I now have a TT of just over 22" with a 110mm stem, much more suited for what I'm using it for and very happy,yes I run a long seat post doesn't bother me plus I have loads of standover clearance,
so I recommend testing both sizes on the type of riding you intend to do with it.