Introduced const float halfPi = PI / 2.0f; and const float triHalfPi = halfPi * 3; and used those to draw the rounded background. Introduced GLfloat xPlusWidth = x + width; and GLfloat yMinusHeight = y - height; and used those coordinates for the vertexData array.
Text, cleanup:
Declaration of local variables outside of loops. Fixed indentation.