BTW
@ispasov welcome to scubaboard. Yes the environment here is occasionally a bit too harsh (as you just discovered), but if you overcome the initial shock and with a bit of persistence you will get invaluable info and help.
Back to topic. Do you remember if the tank was aluminum or steel (steel are generally fatter, shorter and heavier than aluminum)? Steel tanks can get rust debris inside that can easily clog the valve, the filter or both (especially if there is no dip tube). That is more difficult to happen with aluminum tanks.
FYI I would have responded to your incident quite similarly to you (I hope). I would have given higher priority to the DM vs to any insta-buddy to seek help. After establishing shared air, I would try to see what was wrong with my reg on the way up - just in case it is something that can be fixed and I would also try to finish the safety stop (assuming this and any previous dives were not trivial). Yes the DM should've been monitoring his gas during all these, but since he also had to take care of the rest of the group, we can't blame him for that.
It can also be quite helpful to see the dive profile (depth vs time) so we can better see how all these unraveled.
About how to overcome such incidents in the future, you can consider the following: Get your own reg set. Learn how to regularly check/maintain it. Use appropriate backups (eg SPG, did you have one? what did it show? ). You need to get to know your normal breathing rate, so you can easily identify any irregularities. Eg these remaining ~100bar after 35mins dive time might be too many (indicating a problem with your AI reading) but we can't know that without knowning your depth profile and your normal breathing rate. Finally, I would add to dive with reputable centers ( yes I'm from Greece and I won't dive with any center that the owner doesn't dive regularly together with the divers/customers YMMV ).