I'm going to have to agree with The Dudes 10/22 pick for sure
So Ruger 10/22. great for small game, abundant cheap ammunition, can easily be suppressed via make shift methods, spare parts are everywhere!
DTA SRS. 4 calibers in one gun (barrel change over. 243 Win, .308 Win, .300 Win, .338 LM) Accurate, magazine fed, semi compact, sadly its definitely on the heavy side. I would have a Nightforce 5.5-22x NXS 56mm objective with a BORS on top. If i'm going to have to pick one barrel, it would be the 308. Easy to find and it still does the job!
As much as i would like to say an HK SL8-6 converted into a G36K, I'm going to have to go with a custom 14.5 M4 with an Aimpoint Comp4 and a 3x flip sight. Any Military/LE/Civi M16/M4 can swap parts around (well besides a full length upper and mid/car uppers. they need a different $10-$30 buffer), mags are cheap, amazingly durable, relatively maintenance free (if you do an upper budget build), but most of all, i have extensive training with the platform.
I don't think i would NEED a pistol in the end times. I would surely love one, but a small game, large game and intermediate rifle would better fill my survival needs. If i were to pick a sidearm, it would be an HK45. Rated as one of the most rugged and long lasting pistols. HK45 went twenty eight times as long without cleaning and still achieved ten times the industry standard for reliability according to pistol-training.com stress test.