Hey man cool post, I just bought my first bike a few months ago - a 1978 Yamaha XS500E, pretty similar to your bike, it's been in storage not running for 15 years, it's my first bike and I know pretty much nothing about bike engines either haha.
I was gonna post you some schematic links because I found them pretty useful but looks like someone beat me to it . If you can get a Haynes manual on your bike grab it they're awesome.
I tore the whole thing down in my garage and found the missing and broken parts, ordered what I needed from wreckers off ebay (because quite a few parts I wanted are now OBSOLETE and unavailable anywhere) I'm doing a rebore + new oversized pistons next week, might even chuck some pics and info up on a thread on here when it's done
Just wanted to say cool bike, keep us posted on progress and good luck!