High-level synthesis of fine-grained weakly consistent C concurrency