+#if (BOOTLOADER_CAN_EXIT)
+# if (BOOTLOADER_LOOPCYCLES_TIMEOUT)
+# if (BOOTLOADER_LOOPCYCLES_TIMEOUT < 256)
+# if ((HAVE_UNPRECISEWAIT))
+volatile register uint8_t timeout_remaining __asm__("r2");
+# else
+static volatile uint8_t timeout_remaining;
+# endif
+# else
+static volatile uint16_t timeout_remaining;
+# endif
+# endif
+# if ((HAVE_UNPRECISEWAIT))
+/* here we have to assume we need to optimize for every byte */
+#define __REGISTER_stayinloader_initialValue 0xfe
+volatile register uint8_t stayinloader __asm__("r17");
+# else
+static volatile uint8_t stayinloader = 0xfe;
+# endif