Static analysis of low-level synchronization