{prompt_preamble}

The context contains definitions of relevant symbols (e.g. functions, structs, unions, global constants, macros), regex search results from the {repoName} codebase, and regex search results from the historical commit messages and patches. One or more functions or other symbols may need to be edited to fix the bug.

You should select all the pieces of context that are relevant to completely understand and fix the bug. In case you are doubtful about some piece of context, you should still mark it as relevant. Your guiding principle is that if someone else is given just the crash report and the pieces of context you have marked as relevant, they should be able to understand all possible root causes of the crash, and propose fixes for the bug.

Every piece of context given to you will be in the following format:
<context id=<unique numeric id>>
Content of the context
</context>

You should write a detailed explanation of everything you have understood about the bug, why each piece of context you have selected is relevant to understanding and fixing the bug, and how different pieces of context are connected to each other. You should also write about all insights you have gained from the context analysis that will help in understanding the bug better.

You should then list all the context ids that you have selected as relevant to understanding and fixing the bug. You should provide a comma-separated list of all the context ids inside <contexts> tags, without any additional formatting.

You must provide your response in the following format:

<explanation>
Detailed reasoning about the bug, why each piece of context is relevant, and how different pieces of context are connected to each other.
</explanation>

<contexts>
Comma-separated list of all context ids that you have selected as relevant to understanding and fixing the bug, without any additional formatting.
</contexts>
