Interrupts getting ignored

OK. This is a potential source of error:

void dec()
{
  chiran --;
  EEPROM.write(address, chiran);
  ang = false;
}
  1. chiran is declared as a (signed) int and your EEPROM.write can write only a single (unsigned) byte. It will cause a mess also if chiran goes negative. You should use EEPROM.put and EEPROM.get instead.

  2. The EEPROM has a limited lifetime (number of write operations). Writing to it in the loop() is not generally a good idea. Do you have to maintain the status of the system after it is switched off ?