
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 that circle $M$ passes through $A(\sqrt{2},-\sqrt{2})$, $B(10,4)$, and the center of circle $M$ lies on the line $y=x$.  
$(1)$ Find the standard equation of circle $M$.  
$(2)$ A line $m$ passing through the point $(0,-4)$ intersects circle $M$ to form a chord of length $4\sqrt{5}$. Find the equation of line $m$.

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