Verb woes; two or three questions


I'm working on a translation and there's this one line I can get through but
can't get a handle on.

こんなヤツに負けおって いままで何のために練習 してきたと思っておる!

  * Problem 1 is that I can't figure out if this is one sentence or two sentences respectively ending on おって and おる.
  * Problem 2 follows if these are two sentences: what would the -て ending mean here? An answer to another question mentioned that the -て ending can mean that the line of thought hasn't ended yet and that's the only thing that seems to make sense.
  * Problem 3 is 何のために, because I can't make "for what" work. I've been  
wondering if it could translate as "for nothing" ("To think that all this time
[=until now] you've been training for nothing." But I worry I'm making a
mistake.

The context is a very angry coach raging at their star pupil for losing a
crucial match.

Thanks in advance!




> こんなヤツに負けおって いままで何のために練習してきたと思っておる！

  1. I would read it as two sentences, respectively ending with おって and おる.  
I think it's also possible to read it as one sentence, though.

  2. You can think of the て as indicating 非難 (reproach) or 不満 (complaint). For examples: <https://japanese.stackexchange.com/a/51775/9831>  
When you read it as one sentence, I think it'd also be possible to interpret
the て as indicating a reason or cause for the speaker to utter 「今まで何のために～～！」

  3. 何のために means "for what". The sentence is interrogative.  
何のために練習してきた？ "What have you been training for?"  
何のために練習してきたと思っておる？ "What do you think you've been training for?"

