This is a good example of what can be done in order to fight off a pirate attack. They definitely did not expect the ship to have armed security contractors on board that could also detect their approach.
You can see the contractors dishing out some serious fire power and it looks like it stopped the first boat and deterred the second from coming any closer. If they did manage to survive on the first boat they have some swimming to do as that boat has a bad case of bullet holes.