Complex sentence: Debouching from the pass, they re-joined the unscathed van and main divisions, commanded by John and Andronikos Angelos, Constantine Makrodoukas and Andronikos Lapardas, who had constructed a fortified encampment.
Split into simpler sentences: Debouching from the pass they re-joined the unscathed van and main divisions, commanded by John and Andronikos Angelos, Constantine Makrodoukas and Andronikos Lapardas. Whilst the rest of the army had been uder attack the troops of the van and main divisions had constructed a fortified encampment.