Perhaps the easiest way to determine what mount a lens is is to have a set of factory-logo-equipped rear lens caps... Nikon-F,Pentax-K,Minolta manual focus,Olympus OM,Canon FD, m42 thread mount, Yashica/Contax being perhaps the seven most-common mounts. When you go to some off the beaten path pawnshop and sort through the boxes of accumulated, cast-off 35mm legacy lenses, a quick test-fit of the lens caps can easily show what mount a store-branded lens actually "is"....without the need for a lot of expertise in lens mounts.
Pendennis and I agree on the thought that the lens's current mount or fitting is likely m42 thread, also called universal thread mount, sometimes called "Pentax screw-mount"...what makes me think that is the red-lettered "M" switch and the appearance of the rear cap: shallow...like so,so many m42 thread caps. The Auto-M stopdown switch was super-common on m42 lenses.
BTW, you have not, yet, shown us the actual rear mount fitting, only the inside of the lens where the T-adpater fits on...you need to show the rear-most part of the lens, the part under the rear lens cap...if we are to be absolutely positive of what it is. Try turning the rear lens cap counter-clockwise with your left hand with the lens placed front-element down on the desk.