SHANGHAI (AP) For Novak Djokovic, there were no songs on stadium court at the Shanghai Masters on Saturday. Just a smashed racket, torn shirt, and a lot of frustration.

The top-ranked Serb struggled to control his errors - and his emotions - and was upset in the semifinals by Spain's Roberto Bautista Agut, 6-4, 6-4.

Andy Murray had his own anger issues in the other semifinal against Gilles Simon, but the second-seeded Scot regained his composure and pulled out a 6-4, 6-3 victory to advance to his 10th final of the year.

Djokovic, a three-time champion in Shanghai, was noticeably off his game for the second straight day after laboring to victory over German qualifier Mischa Zverev in the quarterfinals. He sprayed his groundstrokes and missed routine volleys, finishing with 29 unforced errors.

He was also a miserable 2-of-9 on break-point chances.

Against Zverev, Djokovic tried to stay calm by shrugging off errors and even humming a song to keep his anger from boiling over.

This new attitude was nowhere to be seen on Saturday, however.

Djokovic smashed his racket into bits after losing the first set - later grabbing a towel from a ballgirl to sweep up the pieces himself - and ripped his shirt open in anger during another point.

He also argued repeatedly with the chair umpire Carlos Bernardes over line calls and a time violation he received for changing his ripped shirt. He continued the exchange even after the match, and complained about it in his post-match news conference.

''(Bernardes) was the star of the show,'' he said. ''That's what he wanted to be today.''

Djokovic has talked repeatedly this week about trying to lessen the pressure he feels on court and rediscover his inner joy for the game after a couple of all-conquering years that have left him mentally exhausted. He acknowledged after Saturday's defeat that it's very much a work in progress.

''This is one of those days,'' Djokovic said. ''Things go in an opposite direction than you want them, but again, it's a lesson. Every day is a lesson.''

It's been a summer full of them for a player not accustomed to struggling: Following his victory at the French Open, he had a stunning loss to Sam Querrey at Wimbledon, an early exit at the Rio de Janeiro Olympics to Juan Martin del Potro and a demoralizing defeat in the U.S. Open final to Stan Wawrinka.

There have also been injuries to his elbow and wrist, yet another unfamiliar issue for the normally healthy Djokovic.

But he doesn't believe these challenges are insurmountable. Or that they'll lead to a deeper slide.

''I had to experience sooner or later this,'' he said. ''I knew I could not go on playing the highest level for so many years all the time, but it's good to experience this so I can hopefully get better in the period to come.''

Murray can empathize with what Djokovic is going through. And he's certain his rival will find a way to turn it around.

''I do think that after everything he's achieved and the kind of dominance that he's had, it takes so much effort and work to be making finals almost every single week for two years,'' Murray said. ''It's maybe normal if he's mentally a little tired or trying to find the next thing for him to achieve after what he did at the French Open.''

Murray struggled himself against Simon, dropping serve three times in the first set. He also griped repeatedly to the umpire about missed calls.

But he put distractions to the side and managed to break Simon six times to clinch the match in straight sets.

Murray hasn't dropped a set in his last 10 matches. He's also 2-0 against Bautista Agut.

Compared to some of his clay-loving Spanish compatriots, though, Bautista Agut is no slouch on hard courts. In fact, he has more victories on hard courts this year (37) than Murray (34), though Bautista Agut has played in more tournaments than Murray.

''I think because of his game style, he hits the ball very flat on both sides,'' Murray said. ''That's not typical for a Spaniard. I think that helps him.''