Osaka battles through pain to beat Cibulkova in Madrid, Kyrgios exits