Controlled LLM-based Reasoning for Clinical Trial Retrieval