Break down the 100+ line findUsedLabels method into focused, testable helpers:
- Add FindLabelsState class to encapsulate state management
- Extract updateAssemblyContext() for assembly block detection
- Extract processLabelDefinition() for label definition handling
- Extract processGlobalWeakDefinitions() for global/weak/alias processing
- Extract processLabelUsages() for complex directive filtering logic
- Extract resolveWeakUsages() for recursive weak usage propagation
- Refactor main method into clear orchestration flow
Benefits:
- Single responsibility principle: each helper has one clear purpose
- Improved testability: can unit test each concern in isolation
- Better maintainability: easier to understand and modify individual pieces
- Enhanced debuggability: easier to trace issues to specific functionality
- Preserved functionality: all 1759 tests pass including comprehensive filter tests
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>