
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
In $\triangle ABC$, it is known that the sides opposite to angles $A$, $B$, and $C$ are $a$, $b$, and $c$ respectively, and that $a^2 + b^2 - c^2 = \sqrt{3}ab$.

$(1)$ Find the size of $\angle C$;

$(2)$ If $0 < A \leqslant \frac{2\pi}{3}$, and $m = 2\cos^2\frac{A}{2} - \sin B - 1$. Find the range of the real number $m$.

Present the answer in LaTex format: \boxed{Your answer}
user