I'm 5'11" with a 33" inseam (measured using a book and ruler against the wall method) and chose a medium. I would say with my inseam it's border line and most would recommend a size large. My seatpost is at the max height to get the correct leg extension, which is fine, but on the ragged edge.
For my XC racing setup, I have a 100mm stem and I'm probably sitting a bit to scrunched up / upright. I could correct my position by going with an even longer stem, but that would feel a little weird to me on that size frame. I ultimately chose medium because I grew up racing BMX and am at home with having a bike I can flick around at will. If you're not doing tight, twisty, and pump-like trail conditions, the larger frame would probably be better and more stable. In addition, if you don't have pretty good handling skills, you'll probably feel a little out of control at times. I'm also racing BMX again now with a small 20" wheeled bike, so I get a lot of practice from a technical perspective.
So, it all depends on your preference for stability vs. maneuverability and to some degree intended purpose (tight, twisty, lots of fast trail changes vs. non-technical, flat, slower flowing):
Large = more stable, easier to fit to be stretched out, slower response to rider inputs
Medium = faster response/handling, more "flickable", less stable. lower center of gravity
One final thought, with the head tube angle being so slack, you need weight over the front end for any cornering that isn't sloping downward. This is more easily accomplished on a medium than a large.