
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 an ellipse $C: \frac{x^{2}}{a^{2}} + \frac{y^{2}}{b^{2}} = 1 (a > b > 0)$, whose left and right foci are $F_{1}$ and $F_{2}$ respectively, and the top vertex is $B$. If the perimeter of $\triangle BF_{1}F_{2}$ is $6$, and the distance from point $F_{1}$ to the line $BF_{2}$ is $b$.

$(1)$ Find the equation of ellipse $C$;  
$(2)$ Let $A_{1}, A_{2}$ be the two endpoints of the major axis of ellipse $C$, and point $P$ is any point on ellipse $C$ other than $A_{1}, A_{2}$. The line $A_{1}P$ intersects the line $x = m$ at point $M$. If the circle with diameter $MP$ passes through point $A_{2}$, find the value of the real number $m$.

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