
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
Given the function $f(x) = ax^3 - 2ax^2 + b (a \neq 0)$ has a minimum value of $-2$ and a maximum value of $1$ on the interval $[-1,2]$.
$(1)$ Find the values of real numbers $a$ and $b$;
$(2)$ If the function $g(x) = f(x) - m$ has exactly three zeros, find the range of real number $m$.

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