Complex sentence: According to army regulations, he was supposed to be executed, but Zhang, instead, allegedly sent him to the capital, Chang'an, and, while recommending execution, was hoping that Emperor Xuanzong would pardon An.
Split into simpler sentences: According to army regulations, he was supposed to be executed. Zhang allegedly sent him to the capital, Chang'an, and recommended execution, although he was hoping that Emperor Xuanzong would pardon An.