'xm' was not declared in this scope

Hello,
I’m new in Arduino ,I wanted to control leds with joystick, then I tried to verify the code this error (‘xm’ was not declared in this scope)showed of and I don’t know how to fix it.Please help.

joystick.ino (1 KB)

you reference xm in a number of functions, e.g. setup(), but you have not defined it

Here is the code formatted and in code tags

int yled1 = 3;
int yled2 = 5;
int xled1 = 6;
int xled2 = 9;
int vrx = A0;
int vry = A1;

void setup()
{
  pinMode (yled1, OUTPUT);
  pinMode (yled2, OUTPUT);
  pinMode (xled2, OUTPUT);
  pinMode (xled1, OUTPUT);
  pinMode (vrx, INPUT);
  pinMode (vry, INPUT);
  xm = map(x, 530, 1023, 0, 255);
  Serial.begin(9600);
}

void loop()
{
  int x, y;
  x = analogRead (vrx);
  y = analogRead (vry);
  Serial.print ("vrx =  ");
  Serial.print (x, DEC);
  Serial.print ("    vry =  ");
  Serial.print (y, DEC);
  Serial.println ();
  delay(10);
  if (x >= 530)
  {
    digitalWrite(xled2, xm); //'xm' was not declared in this scope
  }
  else
  {
    digitalWrite(xled2, LOW);
  }
  if (x <= 520)
  {
    xmz = map(x, 0, 520, 0, 255);
    digitalWrite(xled1, xmz);
  }
  else
  {
    digitalWrite(xled1, LOW);
  }
  if (y >= 515)
  {
    xmy = map(y, 5, 1023, 0, 255);
    digitalWrite(yled2, xmy);
  }
  else
  {
    digitalWrite(yled2, LOW);
  }
  if (y <= 505)
  {
    xmzy = map(x, 0, 505, 0, 255);
    digitalWrite(yled1, xmzy);
  }
  else
  {
    digitalWrite(yled1, LOW);
  }
}

The error message does not lie.

In fact, xm is not declared anywhere

thx