Cyclomatic complexity is a measure of how many paths there are through a stretch of code. The cyclomatic complexity of routines should not be excessive, as complex code will be difficult to understand and maintain.
Refactor this routine so it runs more linearly, for example by reducing the number of times the control flow splits.