cdc2313.lss 99 KB
Newer Older
Prashant Patil's avatar
Prashant Patil committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622

cdc2313.elf:     file format elf32-avr

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .data         00000002  00800100  00000a12  00000aa6  2**0
                  CONTENTS, ALLOC, LOAD, DATA
  1 .text         00000a12  00000000  00000000  00000094  2**1
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  2 .bss          00000067  00800102  00800102  00000aa8  2**0
                  ALLOC
  3 .comment      00000030  00000000  00000000  00000aa8  2**0
                  CONTENTS, READONLY
  4 .note.gnu.avr.deviceinfo 0000003c  00000000  00000000  00000ad8  2**2
                  CONTENTS, READONLY
  5 .debug_aranges 000000a0  00000000  00000000  00000b18  2**3
                  CONTENTS, READONLY, DEBUGGING
  6 .debug_info   0000196a  00000000  00000000  00000bb8  2**0
                  CONTENTS, READONLY, DEBUGGING
  7 .debug_abbrev 00000d64  00000000  00000000  00002522  2**0
                  CONTENTS, READONLY, DEBUGGING
  8 .debug_line   000011f5  00000000  00000000  00003286  2**0
                  CONTENTS, READONLY, DEBUGGING
  9 .debug_frame  00000150  00000000  00000000  0000447c  2**2
                  CONTENTS, READONLY, DEBUGGING
 10 .debug_str    00000954  00000000  00000000  000045cc  2**0
                  CONTENTS, READONLY, DEBUGGING
 11 .debug_loc    00000c3d  00000000  00000000  00004f20  2**0
                  CONTENTS, READONLY, DEBUGGING
 12 .debug_ranges 00000080  00000000  00000000  00005b5d  2**0
                  CONTENTS, READONLY, DEBUGGING

Disassembly of section .text:

00000000 <__vectors>:
   0:	63 c0       	rjmp	.+198    	; 0xc8 <__ctors_end>
   2:	8c c2       	rjmp	.+1304   	; 0x51c <__vector_1>
   4:	7c c0       	rjmp	.+248    	; 0xfe <__bad_interrupt>
   6:	7b c0       	rjmp	.+246    	; 0xfe <__bad_interrupt>
   8:	7a c0       	rjmp	.+244    	; 0xfe <__bad_interrupt>
   a:	79 c0       	rjmp	.+242    	; 0xfe <__bad_interrupt>
   c:	78 c0       	rjmp	.+240    	; 0xfe <__bad_interrupt>
   e:	77 c0       	rjmp	.+238    	; 0xfe <__bad_interrupt>
  10:	76 c0       	rjmp	.+236    	; 0xfe <__bad_interrupt>
  12:	75 c0       	rjmp	.+234    	; 0xfe <__bad_interrupt>
  14:	74 c0       	rjmp	.+232    	; 0xfe <__bad_interrupt>
  16:	73 c0       	rjmp	.+230    	; 0xfe <__bad_interrupt>
  18:	72 c0       	rjmp	.+228    	; 0xfe <__bad_interrupt>
  1a:	71 c0       	rjmp	.+226    	; 0xfe <__bad_interrupt>
  1c:	70 c0       	rjmp	.+224    	; 0xfe <__bad_interrupt>
  1e:	6f c0       	rjmp	.+222    	; 0xfe <__bad_interrupt>
  20:	6e c0       	rjmp	.+220    	; 0xfe <__bad_interrupt>
  22:	6d c0       	rjmp	.+218    	; 0xfe <__bad_interrupt>
  24:	6c c0       	rjmp	.+216    	; 0xfe <__bad_interrupt>
  26:	6b c0       	rjmp	.+214    	; 0xfe <__bad_interrupt>
  28:	6a c0       	rjmp	.+212    	; 0xfe <__bad_interrupt>
  2a:	69 c0       	rjmp	.+210    	; 0xfe <__bad_interrupt>
  2c:	68 c0       	rjmp	.+208    	; 0xfe <__bad_interrupt>
  2e:	67 c0       	rjmp	.+206    	; 0xfe <__bad_interrupt>
  30:	66 c0       	rjmp	.+204    	; 0xfe <__bad_interrupt>
  32:	65 c0       	rjmp	.+202    	; 0xfe <__bad_interrupt>
  34:	64 c0       	rjmp	.+200    	; 0xfe <__bad_interrupt>
  36:	63 c0       	rjmp	.+198    	; 0xfe <__bad_interrupt>
  38:	62 c0       	rjmp	.+196    	; 0xfe <__bad_interrupt>
  3a:	61 c0       	rjmp	.+194    	; 0xfe <__bad_interrupt>

0000003c <__trampolines_end>:
  3c:	09 02       	muls	r16, r25
  3e:	43 00       	.word	0x0043	; ????
  40:	02 01       	movw	r0, r4
  42:	00 80       	ld	r0, Z
  44:	32 09       	sbc	r19, r2
  46:	04 00       	.word	0x0004	; ????
  48:	00 01       	movw	r0, r0
  4a:	02 02       	muls	r16, r18
  4c:	01 00       	.word	0x0001	; ????
  4e:	05 24       	eor	r0, r5
  50:	00 10       	cpse	r0, r0
  52:	01 04       	cpc	r0, r1
  54:	24 02       	muls	r18, r20
  56:	02 05       	cpc	r16, r2
  58:	24 06       	cpc	r2, r20
  5a:	00 01       	movw	r0, r0
  5c:	05 24       	eor	r0, r5
  5e:	01 03       	mulsu	r16, r17
  60:	01 07       	cpc	r16, r17
  62:	05 83       	std	Z+5, r16	; 0x05
  64:	03 08       	sbc	r0, r3
  66:	00 ff       	sbrs	r16, 0
  68:	09 04       	cpc	r0, r9
  6a:	01 00       	.word	0x0001	; ????
  6c:	02 0a       	sbc	r0, r18
  6e:	00 00       	nop
  70:	00 07       	cpc	r16, r16
  72:	05 01       	movw	r0, r10
  74:	02 08       	sbc	r0, r2
  76:	00 00       	nop
  78:	07 05       	cpc	r16, r7
  7a:	81 02       	muls	r24, r17
  7c:	08 00       	.word	0x0008	; ????
	...

0000007f <usbDescriptorDevice>:
  7f:	12 01 10 01 02 00 00 08 c0 16 e1 05 00 01 01 02     ................
  8f:	00 01                                               ..

00000091 <usbDescriptorStringDevice>:
  91:	10 03 55 00 53 00 42 00 2d 00 32 00 33 00 32 00     ..U.S.B.-.2.3.2.

000000a1 <usbDescriptorStringVendor>:
  a1:	22 03 77 00 77 00 77 00 2e 00 72 00 65 00 63 00     ".w.w.w...r.e.c.
  b1:	75 00 72 00 73 00 69 00 6f 00 6e 00 2e 00 6a 00     u.r.s.i.o.n...j.
  c1:	70 00                                               p.

000000c3 <usbDescriptorString0>:
  c3:	04 03 09 04 00                                      .....

000000c8 <__ctors_end>:
  c8:	11 24       	eor	r1, r1
  ca:	1f be       	out	0x3f, r1	; 63
  cc:	cf ef       	ldi	r28, 0xFF	; 255
  ce:	d1 e0       	ldi	r29, 0x01	; 1
  d0:	de bf       	out	0x3e, r29	; 62
  d2:	cd bf       	out	0x3d, r28	; 61

000000d4 <__do_copy_data>:
  d4:	11 e0       	ldi	r17, 0x01	; 1
  d6:	a0 e0       	ldi	r26, 0x00	; 0
  d8:	b1 e0       	ldi	r27, 0x01	; 1
  da:	e2 e1       	ldi	r30, 0x12	; 18
  dc:	fa e0       	ldi	r31, 0x0A	; 10
  de:	02 c0       	rjmp	.+4      	; 0xe4 <__do_copy_data+0x10>
  e0:	05 90       	lpm	r0, Z+
  e2:	0d 92       	st	X+, r0
  e4:	a2 30       	cpi	r26, 0x02	; 2
  e6:	b1 07       	cpc	r27, r17
  e8:	d9 f7       	brne	.-10     	; 0xe0 <__do_copy_data+0xc>

000000ea <__do_clear_bss>:
  ea:	21 e0       	ldi	r18, 0x01	; 1
  ec:	a2 e0       	ldi	r26, 0x02	; 2
  ee:	b1 e0       	ldi	r27, 0x01	; 1
  f0:	01 c0       	rjmp	.+2      	; 0xf4 <.do_clear_bss_start>

000000f2 <.do_clear_bss_loop>:
  f2:	1d 92       	st	X+, r1

000000f4 <.do_clear_bss_start>:
  f4:	a9 36       	cpi	r26, 0x69	; 105
  f6:	b2 07       	cpc	r27, r18
  f8:	e1 f7       	brne	.-8      	; 0xf2 <.do_clear_bss_loop>
  fa:	02 d4       	rcall	.+2052   	; 0x900 <main>
  fc:	88 c4       	rjmp	.+2320   	; 0xa0e <_exit>

000000fe <__bad_interrupt>:
  fe:	80 cf       	rjmp	.-256    	; 0x0 <__vectors>

00000100 <usbFunctionDescriptor>:


uchar usbFunctionDescriptor(usbRequest_t *rq)
{

    if(rq->wValue.bytes[1] == USBDESCR_DEVICE){
 100:	fc 01       	movw	r30, r24
 102:	83 81       	ldd	r24, Z+3	; 0x03
 104:	81 30       	cpi	r24, 0x01	; 1
 106:	49 f4       	brne	.+18     	; 0x11a <usbFunctionDescriptor+0x1a>
        usbMsgPtr = (uchar *)usbDescriptorDevice;
 108:	8f e7       	ldi	r24, 0x7F	; 127
 10a:	90 e0       	ldi	r25, 0x00	; 0
 10c:	90 93 42 01 	sts	0x0142, r25	; 0x800142 <usbMsgPtr+0x1>
 110:	80 93 41 01 	sts	0x0141, r24	; 0x800141 <usbMsgPtr>
        return usbDescriptorDevice[0];
 114:	80 91 7f 00 	lds	r24, 0x007F	; 0x80007f <__EEPROM_REGION_LENGTH__+0x7f007f>
 118:	08 95       	ret
    }else{  /* must be config descriptor */
        usbMsgPtr = (uchar *)configDescrCDC;
 11a:	8c e3       	ldi	r24, 0x3C	; 60
 11c:	90 e0       	ldi	r25, 0x00	; 0
 11e:	90 93 42 01 	sts	0x0142, r25	; 0x800142 <usbMsgPtr+0x1>
 122:	80 93 41 01 	sts	0x0141, r24	; 0x800141 <usbMsgPtr>
        return sizeof(configDescrCDC);
 126:	83 e4       	ldi	r24, 0x43	; 67
    }
}
 128:	08 95       	ret

0000012a <usbFunctionSetup>:

static uchar    sendEmptyFrame;
static uchar    modeBuffer[7];

uchar usbFunctionSetup(uchar data[8])
{
 12a:	fc 01       	movw	r30, r24
usbRequest_t    *rq = (void *)data;

    if((rq->bmRequestType & USBRQ_TYPE_MASK) == USBRQ_TYPE_CLASS){    /* class request type */
 12c:	80 81       	ld	r24, Z
 12e:	80 76       	andi	r24, 0x60	; 96
 130:	80 32       	cpi	r24, 0x20	; 32
 132:	79 f4       	brne	.+30     	; 0x152 <usbFunctionSetup+0x28>

        if( rq->bRequest==GET_LINE_CODING || rq->bRequest==SET_LINE_CODING ){
 134:	81 81       	ldd	r24, Z+1	; 0x01
 136:	90 ee       	ldi	r25, 0xE0	; 224
 138:	98 0f       	add	r25, r24
 13a:	92 30       	cpi	r25, 0x02	; 2
 13c:	40 f0       	brcs	.+16     	; 0x14e <usbFunctionSetup+0x24>
            return 0xff;
        /*    GET_LINE_CODING -> usbFunctionRead()    */
        /*    SET_LINE_CODING -> usbFunctionWrite()   */
        }
#ifdef USE_UART_CTRL
        if(rq->bRequest==SET_CONTROL_LINE_STATE){
 13e:	82 32       	cpi	r24, 0x22	; 34
 140:	41 f4       	brne	.+16     	; 0x152 <usbFunctionSetup+0x28>
            UART_CTRL_PORT	= (UART_CTRL_PORT&~(1<<UART_CTRL_DTR))|((rq->wValue.word&1)<<UART_CTRL_DTR);
 142:	82 81       	ldd	r24, Z+2	; 0x02
 144:	80 fd       	sbrc	r24, 0
 146:	c5 9a       	sbi	0x18, 5	; 24
 148:	80 ff       	sbrs	r24, 0
 14a:	c5 98       	cbi	0x18, 5	; 24
 14c:	02 c0       	rjmp	.+4      	; 0x152 <usbFunctionSetup+0x28>
usbRequest_t    *rq = (void *)data;

    if((rq->bmRequestType & USBRQ_TYPE_MASK) == USBRQ_TYPE_CLASS){    /* class request type */

        if( rq->bRequest==GET_LINE_CODING || rq->bRequest==SET_LINE_CODING ){
            return 0xff;
 14e:	8f ef       	ldi	r24, 0xFF	; 255
 150:	08 95       	ret
        if(rq->bRequest==SET_CONTROL_LINE_STATE){
            UART_CTRL_PORT	= (UART_CTRL_PORT&~(1<<UART_CTRL_DTR))|((rq->wValue.word&1)<<UART_CTRL_DTR);
        }
#endif
    }
    return 0;
 152:	80 e0       	ldi	r24, 0x00	; 0
}
 154:	08 95       	ret

00000156 <usbFunctionRead>:
/*---------------------------------------------------------------------------*/
/* usbFunctionRead -  GET_LINE_CODING                                       */
/*---------------------------------------------------------------------------*/

uchar usbFunctionRead( uchar *data, uchar len )
{
 156:	dc 01       	movw	r26, r24
    memcpy( data, modeBuffer, 7 );
 158:	97 e0       	ldi	r25, 0x07	; 7
 15a:	ed e1       	ldi	r30, 0x1D	; 29
 15c:	f1 e0       	ldi	r31, 0x01	; 1
 15e:	01 90       	ld	r0, Z+
 160:	0d 92       	st	X+, r0
 162:	9a 95       	dec	r25
 164:	e1 f7       	brne	.-8      	; 0x15e <usbFunctionRead+0x8>
    return 7;
}
 166:	87 e0       	ldi	r24, 0x07	; 7
 168:	08 95       	ret

0000016a <usbFunctionWrite>:
#define	BRMAX	38400
#define	BSTEP	((F_CPU>>3)/BRMAX)
#define	BRVAL	((unsigned)BSTEP*BRMAX/BRMIN)

uchar usbFunctionWrite( uchar *data, uchar len )
{
 16a:	fc 01       	movw	r30, r24
	usbWord_t	br;
	unsigned 	baudrate;
	uchar		i;

	//	set baudrate generator
	baudrate	= *(unsigned *)data;
 16c:	20 81       	ld	r18, Z
 16e:	31 81       	ldd	r19, Z+1	; 0x01
	for( i=0; baudrate; i++ )
 170:	90 e0       	ldi	r25, 0x00	; 0
 172:	21 15       	cp	r18, r1
 174:	31 05       	cpc	r19, r1
 176:	21 f0       	breq	.+8      	; 0x180 <usbFunctionWrite+0x16>
		baudrate	-= BRMIN;
 178:	28 55       	subi	r18, 0x58	; 88
 17a:	32 40       	sbci	r19, 0x02	; 2
	unsigned 	baudrate;
	uchar		i;

	//	set baudrate generator
	baudrate	= *(unsigned *)data;
	for( i=0; baudrate; i++ )
 17c:	9f 5f       	subi	r25, 0xFF	; 255
 17e:	f9 cf       	rjmp	.-14     	; 0x172 <usbFunctionWrite+0x8>
 180:	20 e4       	ldi	r18, 0x40	; 64
 182:	3d e0       	ldi	r19, 0x0D	; 13
		baudrate	-= BRMIN;
	for( br.word=BRVAL; i!=1; i>>=1 )
 184:	91 30       	cpi	r25, 0x01	; 1
 186:	21 f0       	breq	.+8      	; 0x190 <usbFunctionWrite+0x26>
		br.word	>>= 1;
 188:	36 95       	lsr	r19
 18a:	27 95       	ror	r18

	//	set baudrate generator
	baudrate	= *(unsigned *)data;
	for( i=0; baudrate; i++ )
		baudrate	-= BRMIN;
	for( br.word=BRVAL; i!=1; i>>=1 )
 18c:	96 95       	lsr	r25
 18e:	fa cf       	rjmp	.-12     	; 0x184 <usbFunctionWrite+0x1a>
		br.word	>>= 1;
	br.word--;
 190:	21 50       	subi	r18, 0x01	; 1
 192:	31 09       	sbc	r19, r1

#ifdef _AVR_IO441_H_
    UBRR0L	= br.bytes[0] << 1;
#else
    UBRR0L	= br.bytes[0];
 194:	20 93 81 00 	sts	0x0081, r18	; 0x800081 <__EEPROM_REGION_LENGTH__+0x7f0081>
    UBRR0H   = br.bytes[1];
 198:	30 93 82 00 	sts	0x0082, r19	; 0x800082 <__EEPROM_REGION_LENGTH__+0x7f0082>
    UCSR0A   = (1<<U2X0);
 19c:	82 e0       	ldi	r24, 0x02	; 2
 19e:	80 93 86 00 	sts	0x0086, r24	; 0x800086 <__EEPROM_REGION_LENGTH__+0x7f0086>
#endif
    UCSR0B	= (1<<RXEN0) | (1<<TXEN0);
 1a2:	88 e1       	ldi	r24, 0x18	; 24
 1a4:	80 93 85 00 	sts	0x0085, r24	; 0x800085 <__EEPROM_REGION_LENGTH__+0x7f0085>

    memcpy( modeBuffer, data, 7 );
 1a8:	97 e0       	ldi	r25, 0x07	; 7
 1aa:	ad e1       	ldi	r26, 0x1D	; 29
 1ac:	b1 e0       	ldi	r27, 0x01	; 1
 1ae:	01 90       	ld	r0, Z+
 1b0:	0d 92       	st	X+, r0
 1b2:	9a 95       	dec	r25
 1b4:	e1 f7       	brne	.-8      	; 0x1ae <usbFunctionWrite+0x44>
    return 1;
}
 1b6:	81 e0       	ldi	r24, 0x01	; 1
 1b8:	08 95       	ret

000001ba <usbFunctionWriteOut>:

static uchar    iwptr, uwptr, irptr;
static uchar    rx_buf[RX_SIZE], tx_buf[TX_SIZE];

void usbFunctionWriteOut( uchar *data, uchar len )
{
 1ba:	20 91 1b 01 	lds	r18, 0x011B	; 0x80011b <uwptr>

    /*  usb -> rs232c:  transmit char    */
    for( ; len; len-- ) {
 1be:	66 23       	and	r22, r22
 1c0:	61 f0       	breq	.+24     	; 0x1da <usbFunctionWriteOut+0x20>
        tx_buf[uwptr++] = *data++;
 1c2:	fc 01       	movw	r30, r24
 1c4:	31 91       	ld	r19, Z+
 1c6:	cf 01       	movw	r24, r30
 1c8:	e2 2f       	mov	r30, r18
 1ca:	f0 e0       	ldi	r31, 0x00	; 0
 1cc:	ee 5f       	subi	r30, 0xFE	; 254
 1ce:	fe 4f       	sbci	r31, 0xFE	; 254
 1d0:	30 83       	st	Z, r19
        uwptr	&= TX_MASK;
 1d2:	2f 5f       	subi	r18, 0xFF	; 255
 1d4:	2f 70       	andi	r18, 0x0F	; 15

void usbFunctionWriteOut( uchar *data, uchar len )
{

    /*  usb -> rs232c:  transmit char    */
    for( ; len; len-- ) {
 1d6:	61 50       	subi	r22, 0x01	; 1
 1d8:	f2 cf       	rjmp	.-28     	; 0x1be <usbFunctionWriteOut+0x4>
 1da:	20 93 1b 01 	sts	0x011B, r18	; 0x80011b <uwptr>
        tx_buf[uwptr++] = *data++;
        uwptr	&= TX_MASK;
    }

    /*  postpone receiving next data    */
   	usbDisableAllRequests();
 1de:	8f ef       	ldi	r24, 0xFF	; 255
 1e0:	80 93 43 01 	sts	0x0143, r24	; 0x800143 <usbRxLen>
 1e4:	08 95       	ret

000001e6 <usbGenericSetInterrupt>:
/* ------------------------------------------------------------------------- */

#if !USB_CFG_SUPPRESS_INTR_CODE
#if USB_CFG_HAVE_INTRIN_ENDPOINT
static void usbGenericSetInterrupt(uchar *data, uchar len, usbTxStatus_t *txStatus)
{
 1e6:	1f 93       	push	r17
 1e8:	cf 93       	push	r28
 1ea:	df 93       	push	r29
 1ec:	16 2f       	mov	r17, r22
 1ee:	ea 01       	movw	r28, r20

#if USB_CFG_IMPLEMENT_HALT
    if(usbTxLen1 == USBPID_STALL)
        return;
#endif
    if(txStatus->len & 0x10){   /* packet buffer was empty */
 1f0:	28 81       	ld	r18, Y
 1f2:	24 ff       	sbrs	r18, 4
 1f4:	05 c0       	rjmp	.+10     	; 0x200 <__stack+0x1>
        txStatus->buffer[0] ^= USBPID_DATA0 ^ USBPID_DATA1; /* toggle token */
 1f6:	39 81       	ldd	r19, Y+1	; 0x01
 1f8:	28 e8       	ldi	r18, 0x88	; 136
 1fa:	23 27       	eor	r18, r19
 1fc:	29 83       	std	Y+1, r18	; 0x01
 1fe:	02 c0       	rjmp	.+4      	; 0x204 <__stack+0x5>
    }else{
        txStatus->len = USBPID_NAK; /* avoid sending outdated (overwritten) interrupt data */
 200:	2a e5       	ldi	r18, 0x5A	; 90
 202:	28 83       	st	Y, r18
    }
    p = txStatus->buffer + 1;
    i = len;
 204:	21 2f       	mov	r18, r17
 206:	fc 01       	movw	r30, r24
    if(txStatus->len & 0x10){   /* packet buffer was empty */
        txStatus->buffer[0] ^= USBPID_DATA0 ^ USBPID_DATA1; /* toggle token */
    }else{
        txStatus->len = USBPID_NAK; /* avoid sending outdated (overwritten) interrupt data */
    }
    p = txStatus->buffer + 1;
 208:	ce 01       	movw	r24, r28
 20a:	02 96       	adiw	r24, 0x02	; 2
    i = len;
 20c:	dc 01       	movw	r26, r24
    do{                         /* if len == 0, we still copy 1 byte, but that's no problem */
        *p++ = *data++;
 20e:	31 91       	ld	r19, Z+
 210:	3d 93       	st	X+, r19
 212:	21 50       	subi	r18, 0x01	; 1
    }while(--i > 0);            /* loop control at the end is 2 bytes shorter than at beginning */
 214:	12 16       	cp	r1, r18
 216:	dc f3       	brlt	.-10     	; 0x20e <__stack+0xf>
    usbCrc16Append(&txStatus->buffer[1], len);
 218:	61 2f       	mov	r22, r17
 21a:	69 d1       	rcall	.+722    	; 0x4ee <usbCrc16Append>
    txStatus->len = len + 4;    /* len must be given including sync byte */
 21c:	1c 5f       	subi	r17, 0xFC	; 252
 21e:	18 83       	st	Y, r17
    DBG2(0x21 + (((int)txStatus >> 3) & 3), txStatus->buffer, len + 3);
}
 220:	df 91       	pop	r29
 222:	cf 91       	pop	r28
 224:	1f 91       	pop	r17
 226:	08 95       	ret

00000228 <usbSetInterrupt>:

USB_PUBLIC void usbSetInterrupt(uchar *data, uchar len)
{
    usbGenericSetInterrupt(data, len, &usbTxStatus1);
 228:	42 e3       	ldi	r20, 0x32	; 50
 22a:	51 e0       	ldi	r21, 0x01	; 1
 22c:	dc cf       	rjmp	.-72     	; 0x1e6 <usbGenericSetInterrupt>

0000022e <usbSetInterrupt3>:
#endif

#if USB_CFG_HAVE_INTRIN_ENDPOINT3
USB_PUBLIC void usbSetInterrupt3(uchar *data, uchar len)
{
    usbGenericSetInterrupt(data, len, &usbTxStatus3);
 22e:	4d e5       	ldi	r20, 0x5D	; 93
 230:	51 e0       	ldi	r21, 0x01	; 1
 232:	d9 cf       	rjmp	.-78     	; 0x1e6 <usbGenericSetInterrupt>

00000234 <usbPoll>:
}

/* ------------------------------------------------------------------------- */

USB_PUBLIC void usbPoll(void)
{
 234:	cf 93       	push	r28
 236:	df 93       	push	r29
schar   len;
uchar   i;

    len = usbRxLen - 3;
 238:	60 91 43 01 	lds	r22, 0x0143	; 0x800143 <usbRxLen>
 23c:	63 50       	subi	r22, 0x03	; 3
    if(len >= 0){
 23e:	67 fd       	sbrc	r22, 7
 240:	b3 c0       	rjmp	.+358    	; 0x3a8 <usbPoll+0x174>
 * need data integrity checks with this driver, check the CRC in your app
 * code and report errors back to the host. Since the ACK was already sent,
 * retries must be handled on application level.
 * unsigned crc = usbCrc16(buffer + 1, usbRxLen - 3);
 */
        usbProcessRx(usbRxBuf + USB_BUFSIZE + 1 - usbInputBufOffset, len);
 242:	80 91 40 01 	lds	r24, 0x0140	; 0x800140 <usbInputBufOffset>
 246:	cc e0       	ldi	r28, 0x0C	; 12
 248:	d0 e0       	ldi	r29, 0x00	; 0
 24a:	c8 1b       	sub	r28, r24
 24c:	d1 09       	sbc	r29, r1
 24e:	c9 5b       	subi	r28, 0xB9	; 185
 250:	de 4f       	sbci	r29, 0xFE	; 254
 * 0...0x0f for OUT on endpoint X
 */
    DBG2(0x10 + (usbRxToken & 0xf), data, len + 2); /* SETUP=1d, SETUP-DATA=11, OUTx=1x */
    USB_RX_USER_HOOK(data, len)
#if USB_CFG_IMPLEMENT_FN_WRITEOUT
    if(usbRxToken < 0x10){  /* OUT to endpoint != 0: endpoint number in usbRxToken */
 252:	80 91 3f 01 	lds	r24, 0x013F	; 0x80013f <usbRxToken>
 256:	80 31       	cpi	r24, 0x10	; 16
 258:	18 f4       	brcc	.+6      	; 0x260 <usbPoll+0x2c>
        usbFunctionWriteOut(data, len);
 25a:	ce 01       	movw	r24, r28
 25c:	ae df       	rcall	.-164    	; 0x1ba <usbFunctionWriteOut>
 25e:	9e c0       	rjmp	.+316    	; 0x39c <usbPoll+0x168>
        return;
    }
#endif
    if(usbRxToken == (uchar)USBPID_SETUP){
 260:	8d 32       	cpi	r24, 0x2D	; 45
 262:	09 f0       	breq	.+2      	; 0x266 <usbPoll+0x32>
 264:	8c c0       	rjmp	.+280    	; 0x37e <usbPoll+0x14a>
        if(len != 8)    /* Setup size must be always 8 bytes. Ignore otherwise. */
 266:	68 30       	cpi	r22, 0x08	; 8
 268:	09 f0       	breq	.+2      	; 0x26c <usbPoll+0x38>
 26a:	98 c0       	rjmp	.+304    	; 0x39c <usbPoll+0x168>
            return;
        usbMsgLen_t replyLen;
        usbTxBuf[0] = USBPID_DATA0;         /* initialize data toggling */
 26c:	83 ec       	ldi	r24, 0xC3	; 195
 26e:	80 93 27 01 	sts	0x0127, r24	; 0x800127 <usbTxBuf>
        usbTxLen = USBPID_NAK;              /* abort pending transmit */
 272:	8a e5       	ldi	r24, 0x5A	; 90
 274:	80 93 01 01 	sts	0x0101, r24	; 0x800101 <usbTxLen>
        usbMsgFlags = 0;
 278:	10 92 26 01 	sts	0x0126, r1	; 0x800126 <usbMsgFlags>
        uchar type = rq->bmRequestType & USBRQ_TYPE_MASK;
        if(type != USBRQ_TYPE_STANDARD){    /* standard requests are handled by driver */
 27c:	88 81       	ld	r24, Y
 27e:	80 76       	andi	r24, 0x60	; 96
 280:	19 f0       	breq	.+6      	; 0x288 <usbPoll+0x54>
            replyLen = usbFunctionSetup(data);
 282:	ce 01       	movw	r24, r28
 284:	52 df       	rcall	.-348    	; 0x12a <usbFunctionSetup>
 286:	68 c0       	rjmp	.+208    	; 0x358 <usbPoll+0x124>
 * standard requests instead of class and custom requests.
 */
static inline usbMsgLen_t usbDriverSetup(usbRequest_t *rq)
{
uchar   len  = 0, *dataPtr = usbTxBuf + 9;  /* there are 2 bytes free space at the end of the buffer */
uchar   value = rq->wValue.bytes[0];
 288:	9a 81       	ldd	r25, Y+2	; 0x02
#if USB_CFG_IMPLEMENT_HALT
uchar   index = rq->wIndex.bytes[0];
#endif

    dataPtr[0] = 0; /* default reply common to USBRQ_GET_STATUS and USBRQ_GET_INTERFACE */
 28a:	10 92 30 01 	sts	0x0130, r1	; 0x800130 <usbTxBuf+0x9>
    SWITCH_START(rq->bRequest)
 28e:	89 81       	ldd	r24, Y+1	; 0x01
    SWITCH_CASE(USBRQ_GET_STATUS)           /* 0 */
 290:	81 11       	cpse	r24, r1
 292:	06 c0       	rjmp	.+12     	; 0x2a0 <usbPoll+0x6c>
            dataPtr[0] =  USB_CFG_IS_SELF_POWERED;
#if USB_CFG_IMPLEMENT_HALT
        if(recipient == USBRQ_RCPT_ENDPOINT && index == 0x81)   /* request status for endpoint 1 */
            dataPtr[0] = usbTxLen1 == USBPID_STALL;
#endif
        dataPtr[1] = 0;
 294:	10 92 31 01 	sts	0x0131, r1	; 0x800131 <usbTxBuf+0xa>
/* usbDriverSetup() is similar to usbFunctionSetup(), but it's used for
 * standard requests instead of class and custom requests.
 */
static inline usbMsgLen_t usbDriverSetup(usbRequest_t *rq)
{
uchar   len  = 0, *dataPtr = usbTxBuf + 9;  /* there are 2 bytes free space at the end of the buffer */
 298:	20 e3       	ldi	r18, 0x30	; 48
 29a:	31 e0       	ldi	r19, 0x01	; 1
#if USB_CFG_IMPLEMENT_HALT
        if(recipient == USBRQ_RCPT_ENDPOINT && index == 0x81)   /* request status for endpoint 1 */
            dataPtr[0] = usbTxLen1 == USBPID_STALL;
#endif
        dataPtr[1] = 0;
        len = 2;
 29c:	82 e0       	ldi	r24, 0x02	; 2
 29e:	57 c0       	rjmp	.+174    	; 0x34e <usbPoll+0x11a>
        if(value == 0 && index == 0x81){    /* feature 0 == HALT for endpoint == 1 */
            usbTxLen1 = rq->bRequest == USBRQ_CLEAR_FEATURE ? USBPID_NAK : USBPID_STALL;
            usbResetDataToggling();
        }
#endif
    SWITCH_CASE(USBRQ_SET_ADDRESS)          /* 5 */
 2a0:	85 30       	cpi	r24, 0x05	; 5
 2a2:	19 f4       	brne	.+6      	; 0x2aa <usbPoll+0x76>
        usbNewDeviceAddr = value;
 2a4:	90 93 44 01 	sts	0x0144, r25	; 0x800144 <usbNewDeviceAddr>
 2a8:	4f c0       	rjmp	.+158    	; 0x348 <usbPoll+0x114>
        USB_SET_ADDRESS_HOOK();
    SWITCH_CASE(USBRQ_GET_DESCRIPTOR)       /* 6 */
 2aa:	86 30       	cpi	r24, 0x06	; 6
 2ac:	a9 f5       	brne	.+106    	; 0x318 <usbPoll+0xe4>
static inline usbMsgLen_t usbDriverDescriptor(usbRequest_t *rq)
{
usbMsgLen_t len = 0;
uchar       flags = USB_FLG_MSGPTR_IS_ROM;

    SWITCH_START(rq->wValue.bytes[1])
 2ae:	8b 81       	ldd	r24, Y+3	; 0x03
    SWITCH_CASE(USBDESCR_DEVICE)    /* 1 */
 2b0:	81 30       	cpi	r24, 0x01	; 1
 2b2:	41 f4       	brne	.+16     	; 0x2c4 <usbPoll+0x90>
        GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_DEVICE, usbDescriptorDevice)
 2b4:	8f e7       	ldi	r24, 0x7F	; 127
 2b6:	90 e0       	ldi	r25, 0x00	; 0
 2b8:	90 93 42 01 	sts	0x0142, r25	; 0x800142 <usbMsgPtr+0x1>
 2bc:	80 93 41 01 	sts	0x0141, r24	; 0x800141 <usbMsgPtr>
 2c0:	82 e1       	ldi	r24, 0x12	; 18
 2c2:	26 c0       	rjmp	.+76     	; 0x310 <usbPoll+0xdc>
    SWITCH_CASE(USBDESCR_CONFIG)    /* 2 */
 2c4:	82 30       	cpi	r24, 0x02	; 2
 2c6:	19 f4       	brne	.+6      	; 0x2ce <usbPoll+0x9a>
        GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_CONFIGURATION, usbDescriptorConfiguration)
 2c8:	ce 01       	movw	r24, r28
 2ca:	1a df       	rcall	.-460    	; 0x100 <usbFunctionDescriptor>
 2cc:	21 c0       	rjmp	.+66     	; 0x310 <usbPoll+0xdc>
    SWITCH_CASE(USBDESCR_STRING)    /* 3 */
 2ce:	83 30       	cpi	r24, 0x03	; 3
 2d0:	f1 f4       	brne	.+60     	; 0x30e <usbPoll+0xda>
        if(USB_CFG_DESCR_PROPS_STRINGS & USB_PROP_IS_RAM)
            flags = 0;
        len = usbFunctionDescriptor(rq);
#else   /* USB_CFG_DESCR_PROPS_STRINGS & USB_PROP_IS_DYNAMIC */
        SWITCH_START(rq->wValue.bytes[0])
        SWITCH_CASE(0)
 2d2:	91 11       	cpse	r25, r1
 2d4:	08 c0       	rjmp	.+16     	; 0x2e6 <usbPoll+0xb2>
            GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_STRING_0, usbDescriptorString0)
 2d6:	83 ec       	ldi	r24, 0xC3	; 195
 2d8:	90 e0       	ldi	r25, 0x00	; 0
 2da:	90 93 42 01 	sts	0x0142, r25	; 0x800142 <usbMsgPtr+0x1>
 2de:	80 93 41 01 	sts	0x0141, r24	; 0x800141 <usbMsgPtr>
 2e2:	84 e0       	ldi	r24, 0x04	; 4
 2e4:	15 c0       	rjmp	.+42     	; 0x310 <usbPoll+0xdc>
        SWITCH_CASE(1)
 2e6:	91 30       	cpi	r25, 0x01	; 1
 2e8:	41 f4       	brne	.+16     	; 0x2fa <usbPoll+0xc6>
            GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_STRING_VENDOR, usbDescriptorStringVendor)
 2ea:	81 ea       	ldi	r24, 0xA1	; 161
 2ec:	90 e0       	ldi	r25, 0x00	; 0
 2ee:	90 93 42 01 	sts	0x0142, r25	; 0x800142 <usbMsgPtr+0x1>
 2f2:	80 93 41 01 	sts	0x0141, r24	; 0x800141 <usbMsgPtr>
 2f6:	82 e2       	ldi	r24, 0x22	; 34
 2f8:	0b c0       	rjmp	.+22     	; 0x310 <usbPoll+0xdc>
        SWITCH_CASE(2)
 2fa:	92 30       	cpi	r25, 0x02	; 2
 2fc:	41 f4       	brne	.+16     	; 0x30e <usbPoll+0xda>
            GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_STRING_PRODUCT, usbDescriptorStringDevice)
 2fe:	81 e9       	ldi	r24, 0x91	; 145
 300:	90 e0       	ldi	r25, 0x00	; 0
 302:	90 93 42 01 	sts	0x0142, r25	; 0x800142 <usbMsgPtr+0x1>
 306:	80 93 41 01 	sts	0x0141, r24	; 0x800141 <usbMsgPtr>
 30a:	80 e1       	ldi	r24, 0x10	; 16
 30c:	01 c0       	rjmp	.+2      	; 0x310 <usbPoll+0xdc>
/* usbDriverDescriptor() is similar to usbFunctionDescriptor(), but used
 * internally for all types of descriptors.
 */
static inline usbMsgLen_t usbDriverDescriptor(usbRequest_t *rq)
{
usbMsgLen_t len = 0;
 30e:	80 e0       	ldi	r24, 0x00	; 0
    SWITCH_DEFAULT
        if(USB_CFG_DESCR_PROPS_UNKNOWN & USB_PROP_IS_DYNAMIC){
            len = usbFunctionDescriptor(rq);
        }
    SWITCH_END
    usbMsgFlags = flags;
 310:	90 e4       	ldi	r25, 0x40	; 64
 312:	90 93 26 01 	sts	0x0126, r25	; 0x800126 <usbMsgFlags>
 316:	20 c0       	rjmp	.+64     	; 0x358 <usbPoll+0x124>
        usbNewDeviceAddr = value;
        USB_SET_ADDRESS_HOOK();
    SWITCH_CASE(USBRQ_GET_DESCRIPTOR)       /* 6 */
        len = usbDriverDescriptor(rq);
        goto skipMsgPtrAssignment;
    SWITCH_CASE(USBRQ_GET_CONFIGURATION)    /* 8 */
 318:	88 30       	cpi	r24, 0x08	; 8
 31a:	79 f0       	breq	.+30     	; 0x33a <usbPoll+0x106>
        dataPtr = &usbConfiguration;  /* send current configuration value */
        len = 1;
    SWITCH_CASE(USBRQ_SET_CONFIGURATION)    /* 9 */
 31c:	89 30       	cpi	r24, 0x09	; 9
 31e:	19 f4       	brne	.+6      	; 0x326 <usbPoll+0xf2>
        usbConfiguration = value;
 320:	90 93 46 01 	sts	0x0146, r25	; 0x800146 <usbConfiguration>
 324:	11 c0       	rjmp	.+34     	; 0x348 <usbPoll+0x114>
        usbResetStall();
    SWITCH_CASE(USBRQ_GET_INTERFACE)        /* 10 */
 326:	8a 30       	cpi	r24, 0x0A	; 10
 328:	59 f0       	breq	.+22     	; 0x340 <usbPoll+0x10c>
        len = 1;
#if USB_CFG_HAVE_INTRIN_ENDPOINT && !USB_CFG_SUPPRESS_INTR_CODE
    SWITCH_CASE(USBRQ_SET_INTERFACE)        /* 11 */
 32a:	8b 30       	cpi	r24, 0x0B	; 11
 32c:	69 f4       	brne	.+26     	; 0x348 <usbPoll+0x114>
/* ------------------------------------------------------------------------- */

static inline void  usbResetDataToggling(void)
{
#if USB_CFG_HAVE_INTRIN_ENDPOINT && !USB_CFG_SUPPRESS_INTR_CODE
    USB_SET_DATATOKEN1(USB_INITIAL_DATATOKEN);  /* reset data toggling for interrupt endpoint */
 32e:	8b e4       	ldi	r24, 0x4B	; 75
 330:	80 93 33 01 	sts	0x0133, r24	; 0x800133 <usbTxStatus1+0x1>
#   if USB_CFG_HAVE_INTRIN_ENDPOINT3
    USB_SET_DATATOKEN3(USB_INITIAL_DATATOKEN);  /* reset data toggling for interrupt endpoint */
 334:	80 93 5e 01 	sts	0x015E, r24	; 0x80015e <usbTxStatus3+0x1>
 338:	07 c0       	rjmp	.+14     	; 0x348 <usbPoll+0x114>
        USB_SET_ADDRESS_HOOK();
    SWITCH_CASE(USBRQ_GET_DESCRIPTOR)       /* 6 */
        len = usbDriverDescriptor(rq);
        goto skipMsgPtrAssignment;
    SWITCH_CASE(USBRQ_GET_CONFIGURATION)    /* 8 */
        dataPtr = &usbConfiguration;  /* send current configuration value */
 33a:	26 e4       	ldi	r18, 0x46	; 70
 33c:	31 e0       	ldi	r19, 0x01	; 1
 33e:	02 c0       	rjmp	.+4      	; 0x344 <usbPoll+0x110>
/* usbDriverSetup() is similar to usbFunctionSetup(), but it's used for
 * standard requests instead of class and custom requests.
 */
static inline usbMsgLen_t usbDriverSetup(usbRequest_t *rq)
{
uchar   len  = 0, *dataPtr = usbTxBuf + 9;  /* there are 2 bytes free space at the end of the buffer */
 340:	20 e3       	ldi	r18, 0x30	; 48
 342:	31 e0       	ldi	r19, 0x01	; 1
        len = 1;
    SWITCH_CASE(USBRQ_SET_CONFIGURATION)    /* 9 */
        usbConfiguration = value;
        usbResetStall();
    SWITCH_CASE(USBRQ_GET_INTERFACE)        /* 10 */
        len = 1;
 344:	81 e0       	ldi	r24, 0x01	; 1
 346:	03 c0       	rjmp	.+6      	; 0x34e <usbPoll+0x11a>
/* usbDriverSetup() is similar to usbFunctionSetup(), but it's used for
 * standard requests instead of class and custom requests.
 */
static inline usbMsgLen_t usbDriverSetup(usbRequest_t *rq)
{
uchar   len  = 0, *dataPtr = usbTxBuf + 9;  /* there are 2 bytes free space at the end of the buffer */
 348:	20 e3       	ldi	r18, 0x30	; 48
 34a:	31 e0       	ldi	r19, 0x01	; 1
 34c:	80 e0       	ldi	r24, 0x00	; 0
        usbResetStall();
#endif
    SWITCH_DEFAULT                          /* 7=SET_DESCRIPTOR, 12=SYNC_FRAME */
        /* Should we add an optional hook here? */
    SWITCH_END
    usbMsgPtr = dataPtr;
 34e:	30 93 42 01 	sts	0x0142, r19	; 0x800142 <usbMsgPtr+0x1>
 352:	20 93 41 01 	sts	0x0141, r18	; 0x800141 <usbMsgPtr>
 356:	09 c0       	rjmp	.+18     	; 0x36a <usbPoll+0x136>
            replyLen = usbFunctionSetup(data);
        }else{
            replyLen = usbDriverSetup(rq);
        }
#if USB_CFG_IMPLEMENT_FN_READ || USB_CFG_IMPLEMENT_FN_WRITE
        if(replyLen == USB_NO_MSG){         /* use user-supplied read/write function */
 358:	8f 3f       	cpi	r24, 0xFF	; 255
 35a:	39 f4       	brne	.+14     	; 0x36a <usbPoll+0x136>
            /* do some conditioning on replyLen, but on IN transfers only */
            if((rq->bmRequestType & USBRQ_DIR_MASK) != USBRQ_DIR_HOST_TO_DEVICE){
 35c:	98 81       	ld	r25, Y
 35e:	97 fd       	sbrc	r25, 7
                if(sizeof(replyLen) < sizeof(rq->wLength.word)){ /* help compiler with optimizing */
                    replyLen = rq->wLength.bytes[0];
 360:	8e 81       	ldd	r24, Y+6	; 0x06
                }else{
                    replyLen = rq->wLength.word;
                }
            }
            usbMsgFlags = USB_FLG_USE_USER_RW;
 362:	90 e8       	ldi	r25, 0x80	; 128
 364:	90 93 26 01 	sts	0x0126, r25	; 0x800126 <usbMsgFlags>
 368:	07 c0       	rjmp	.+14     	; 0x378 <usbPoll+0x144>
        }else   /* The 'else' prevents that we limit a replyLen of USB_NO_MSG to the maximum transfer len. */
#endif
        if(sizeof(replyLen) < sizeof(rq->wLength.word)){ /* help compiler with optimizing */
            if(!rq->wLength.bytes[1] && replyLen > rq->wLength.bytes[0])    /* limit length to max */
 36a:	9f 81       	ldd	r25, Y+7	; 0x07
 36c:	91 11       	cpse	r25, r1
 36e:	04 c0       	rjmp	.+8      	; 0x378 <usbPoll+0x144>
 370:	9e 81       	ldd	r25, Y+6	; 0x06
 372:	98 17       	cp	r25, r24
 374:	08 f4       	brcc	.+2      	; 0x378 <usbPoll+0x144>
 376:	89 2f       	mov	r24, r25
                replyLen = rq->wLength.bytes[0];
        }else{
            if(replyLen > rq->wLength.word)     /* limit length to max */
                replyLen = rq->wLength.word;
        }
        usbMsgLen = replyLen;
 378:	80 93 00 01 	sts	0x0100, r24	; 0x800100 <__data_start>
 37c:	0f c0       	rjmp	.+30     	; 0x39c <usbPoll+0x168>
    }else{  /* usbRxToken must be USBPID_OUT, which means data phase of setup (control-out) */
#if USB_CFG_IMPLEMENT_FN_WRITE
        if(usbMsgFlags & USB_FLG_USE_USER_RW){
 37e:	80 91 26 01 	lds	r24, 0x0126	; 0x800126 <usbMsgFlags>
 382:	87 ff       	sbrs	r24, 7
 384:	0b c0       	rjmp	.+22     	; 0x39c <usbPoll+0x168>
            uchar rval = usbFunctionWrite(data, len);
 386:	ce 01       	movw	r24, r28
 388:	f0 de       	rcall	.-544    	; 0x16a <usbFunctionWrite>
            if(rval == 0xff){   /* an error occurred */
 38a:	8f 3f       	cpi	r24, 0xFF	; 255
 38c:	21 f4       	brne	.+8      	; 0x396 <usbPoll+0x162>
                usbTxLen = USBPID_STALL;
 38e:	8e e1       	ldi	r24, 0x1E	; 30
 390:	80 93 01 01 	sts	0x0101, r24	; 0x800101 <usbTxLen>
 394:	03 c0       	rjmp	.+6      	; 0x39c <usbPoll+0x168>
            }else if(rval != 0){    /* This was the final package */
 396:	81 11       	cpse	r24, r1
                usbMsgLen = 0;  /* answer with a zero-sized data packet */
 398:	10 92 00 01 	sts	0x0100, r1	; 0x800100 <__data_start>
 * retries must be handled on application level.
 * unsigned crc = usbCrc16(buffer + 1, usbRxLen - 3);
 */
        usbProcessRx(usbRxBuf + USB_BUFSIZE + 1 - usbInputBufOffset, len);
#if USB_CFG_HAVE_FLOWCONTROL
        if(usbRxLen > 0)    /* only mark as available if not inactivated */
 39c:	80 91 43 01 	lds	r24, 0x0143	; 0x800143 <usbRxLen>
 3a0:	18 16       	cp	r1, r24
 3a2:	14 f4       	brge	.+4      	; 0x3a8 <usbPoll+0x174>
            usbRxLen = 0;
 3a4:	10 92 43 01 	sts	0x0143, r1	; 0x800143 <usbRxLen>
#else
        usbRxLen = 0;       /* mark rx buffer as available */
#endif
    }
    if(usbTxLen & 0x10){    /* transmit system idle */
 3a8:	80 91 01 01 	lds	r24, 0x0101	; 0x800101 <usbTxLen>
 3ac:	84 ff       	sbrs	r24, 4
 3ae:	55 c0       	rjmp	.+170    	; 0x45a <__LOCK_REGION_LENGTH__+0x5a>
        if(usbMsgLen != USB_NO_MSG){    /* transmit data pending? */
 3b0:	80 91 00 01 	lds	r24, 0x0100	; 0x800100 <__data_start>
 3b4:	8f 3f       	cpi	r24, 0xFF	; 255
 3b6:	09 f4       	brne	.+2      	; 0x3ba <usbPoll+0x186>
 3b8:	50 c0       	rjmp	.+160    	; 0x45a <__LOCK_REGION_LENGTH__+0x5a>
 3ba:	c8 2f       	mov	r28, r24
 3bc:	89 30       	cpi	r24, 0x09	; 9
 3be:	08 f0       	brcs	.+2      	; 0x3c2 <usbPoll+0x18e>
 3c0:	c8 e0       	ldi	r28, 0x08	; 8
uchar       len;

    wantLen = usbMsgLen;
    if(wantLen > 8)
        wantLen = 8;
    usbMsgLen -= wantLen;
 3c2:	8c 1b       	sub	r24, r28
 3c4:	80 93 00 01 	sts	0x0100, r24	; 0x800100 <__data_start>
    usbTxBuf[0] ^= USBPID_DATA0 ^ USBPID_DATA1; /* DATA toggling */
 3c8:	90 91 27 01 	lds	r25, 0x0127	; 0x800127 <usbTxBuf>
 3cc:	88 e8       	ldi	r24, 0x88	; 136
 3ce:	89 27       	eor	r24, r25
 3d0:	80 93 27 01 	sts	0x0127, r24	; 0x800127 <usbTxBuf>
/* This function is similar to usbFunctionRead(), but it's also called for
 * data handled automatically by the driver (e.g. descriptor reads).
 */
static uchar usbDeviceRead(uchar *data, uchar len)
{
    if(len > 0){    /* don't bother app with 0 sized reads */
 3d4:	cc 23       	and	r28, r28
 3d6:	09 f4       	brne	.+2      	; 0x3da <usbPoll+0x1a6>
 3d8:	59 c0       	rjmp	.+178    	; 0x48c <__LOCK_REGION_LENGTH__+0x8c>
#if USB_CFG_IMPLEMENT_FN_READ
        if(usbMsgFlags & USB_FLG_USE_USER_RW){
 3da:	20 91 26 01 	lds	r18, 0x0126	; 0x800126 <usbMsgFlags>
 3de:	27 ff       	sbrs	r18, 7
 3e0:	08 c0       	rjmp	.+16     	; 0x3f2 <usbPoll+0x1be>
            len = usbFunctionRead(data, len);
 3e2:	6c 2f       	mov	r22, r28
 3e4:	88 e2       	ldi	r24, 0x28	; 40
 3e6:	91 e0       	ldi	r25, 0x01	; 1
 3e8:	b6 de       	rcall	.-660    	; 0x156 <usbFunctionRead>
 3ea:	c8 2f       	mov	r28, r24
    if(wantLen > 8)
        wantLen = 8;
    usbMsgLen -= wantLen;
    usbTxBuf[0] ^= USBPID_DATA0 ^ USBPID_DATA1; /* DATA toggling */
    len = usbDeviceRead(usbTxBuf + 1, wantLen);
    if(len <= 8){           /* valid data packet */
 3ec:	89 30       	cpi	r24, 0x09	; 9
 3ee:	78 f5       	brcc	.+94     	; 0x44e <__LOCK_REGION_LENGTH__+0x4e>
 3f0:	23 c0       	rjmp	.+70     	; 0x438 <__LOCK_REGION_LENGTH__+0x38>
        if(usbMsgFlags & USB_FLG_USE_USER_RW){
            len = usbFunctionRead(data, len);
        }else
#endif
        {
            uchar i = len, *r = usbMsgPtr;
 3f2:	80 91 41 01 	lds	r24, 0x0141	; 0x800141 <usbMsgPtr>
 3f6:	90 91 42 01 	lds	r25, 0x0142	; 0x800142 <usbMsgPtr+0x1>
            if(usbMsgFlags & USB_FLG_MSGPTR_IS_ROM){    /* ROM data */
 3fa:	26 ff       	sbrs	r18, 6
 3fc:	0a c0       	rjmp	.+20     	; 0x412 <__LOCK_REGION_LENGTH__+0x12>
 3fe:	a8 e2       	ldi	r26, 0x28	; 40
 400:	b1 e0       	ldi	r27, 0x01	; 1
 402:	fc 01       	movw	r30, r24
 404:	2c 2f       	mov	r18, r28
                do{
                    uchar c = USB_READ_FLASH(r);    /* assign to char size variable to enforce byte ops */
 406:	34 91       	lpm	r19, Z
                    *data++ = c;
 408:	3d 93       	st	X+, r19
                    r++;
 40a:	31 96       	adiw	r30, 0x01	; 1
                }while(--i);
 40c:	21 50       	subi	r18, 0x01	; 1
 40e:	d9 f7       	brne	.-10     	; 0x406 <__LOCK_REGION_LENGTH__+0x6>
 410:	08 c0       	rjmp	.+16     	; 0x422 <__LOCK_REGION_LENGTH__+0x22>
 412:	dc 01       	movw	r26, r24
 414:	e8 e2       	ldi	r30, 0x28	; 40
 416:	f1 e0       	ldi	r31, 0x01	; 1
            len = usbFunctionRead(data, len);
        }else
#endif
        {
            uchar i = len, *r = usbMsgPtr;
            if(usbMsgFlags & USB_FLG_MSGPTR_IS_ROM){    /* ROM data */
 418:	2c 2f       	mov	r18, r28
                    *data++ = c;
                    r++;
                }while(--i);
            }else{  /* RAM data */
                do{
                    *data++ = *r++;
 41a:	3d 91       	ld	r19, X+
 41c:	31 93       	st	Z+, r19
                }while(--i);
 41e:	21 50       	subi	r18, 0x01	; 1
 420:	e1 f7       	brne	.-8      	; 0x41a <__LOCK_REGION_LENGTH__+0x1a>
 422:	2f ef       	ldi	r18, 0xFF	; 255
 424:	2c 0f       	add	r18, r28
 426:	30 e0       	ldi	r19, 0x00	; 0
 428:	2f 5f       	subi	r18, 0xFF	; 255
 42a:	3f 4f       	sbci	r19, 0xFF	; 255
 42c:	82 0f       	add	r24, r18
 42e:	93 1f       	adc	r25, r19
            }
            usbMsgPtr = r;
 430:	90 93 42 01 	sts	0x0142, r25	; 0x800142 <usbMsgPtr+0x1>
 434:	80 93 41 01 	sts	0x0141, r24	; 0x800141 <usbMsgPtr>
        wantLen = 8;
    usbMsgLen -= wantLen;
    usbTxBuf[0] ^= USBPID_DATA0 ^ USBPID_DATA1; /* DATA toggling */
    len = usbDeviceRead(usbTxBuf + 1, wantLen);
    if(len <= 8){           /* valid data packet */
        usbCrc16Append(&usbTxBuf[1], len);
 438:	6c 2f       	mov	r22, r28
 43a:	88 e2       	ldi	r24, 0x28	; 40
 43c:	91 e0       	ldi	r25, 0x01	; 1
 43e:	57 d0       	rcall	.+174    	; 0x4ee <usbCrc16Append>
        len += 4;           /* length including sync byte */
 440:	cc 5f       	subi	r28, 0xFC	; 252
        if(len < 12)        /* a partial package identifies end of message */
 442:	cc 30       	cpi	r28, 0x0C	; 12
 444:	41 f0       	breq	.+16     	; 0x456 <__LOCK_REGION_LENGTH__+0x56>
            usbMsgLen = USB_NO_MSG;
 446:	8f ef       	ldi	r24, 0xFF	; 255
 448:	80 93 00 01 	sts	0x0100, r24	; 0x800100 <__data_start>
 44c:	04 c0       	rjmp	.+8      	; 0x456 <__LOCK_REGION_LENGTH__+0x56>
    }else{
        len = USBPID_STALL;   /* stall the endpoint */
        usbMsgLen = USB_NO_MSG;
 44e:	8f ef       	ldi	r24, 0xFF	; 255
 450:	80 93 00 01 	sts	0x0100, r24	; 0x800100 <__data_start>
        usbCrc16Append(&usbTxBuf[1], len);
        len += 4;           /* length including sync byte */
        if(len < 12)        /* a partial package identifies end of message */
            usbMsgLen = USB_NO_MSG;
    }else{
        len = USBPID_STALL;   /* stall the endpoint */
 454:	ce e1       	ldi	r28, 0x1E	; 30
        usbMsgLen = USB_NO_MSG;
    }
    usbTxLen = len;
 456:	c0 93 01 01 	sts	0x0101, r28	; 0x800101 <usbTxLen>
    if(usbTxLen & 0x10){    /* transmit system idle */
        if(usbMsgLen != USB_NO_MSG){    /* transmit data pending? */
            usbBuildTxBlock();
        }
    }
    for(i = 20; i > 0; i--){
 45a:	84 e1       	ldi	r24, 0x14	; 20
        uchar usbLineStatus = USBIN & USBMASK;
 45c:	96 b3       	in	r25, 0x16	; 22
        if(usbLineStatus != 0)  /* SE0 has ended */
 45e:	96 70       	andi	r25, 0x06	; 6
 460:	31 f4       	brne	.+12     	; 0x46e <__LOCK_REGION_LENGTH__+0x6e>
    if(usbTxLen & 0x10){    /* transmit system idle */
        if(usbMsgLen != USB_NO_MSG){    /* transmit data pending? */
            usbBuildTxBlock();
        }
    }
    for(i = 20; i > 0; i--){
 462:	81 50       	subi	r24, 0x01	; 1
 464:	d9 f7       	brne	.-10     	; 0x45c <__LOCK_REGION_LENGTH__+0x5c>
        uchar usbLineStatus = USBIN & USBMASK;
        if(usbLineStatus != 0)  /* SE0 has ended */
            goto isNotReset;
    }
    /* RESET condition, called multiple times during reset */
    usbNewDeviceAddr = 0;
 466:	10 92 44 01 	sts	0x0144, r1	; 0x800144 <usbNewDeviceAddr>
    usbDeviceAddr = 0;
 46a:	10 92 3e 01 	sts	0x013E, r1	; 0x80013e <usbDeviceAddr>

static inline void usbHandleResetHook(uchar notResetState)
{
#ifdef USB_RESET_HOOK
static uchar    wasReset;
uchar           isReset = !notResetState;
 46e:	c1 e0       	ldi	r28, 0x01	; 1
 470:	81 11       	cpse	r24, r1
 472:	c0 e0       	ldi	r28, 0x00	; 0

    if(wasReset != isReset){
 474:	90 91 25 01 	lds	r25, 0x0125	; 0x800125 <wasReset.1915>
 478:	c9 17       	cp	r28, r25
 47a:	71 f0       	breq	.+28     	; 0x498 <__LOCK_REGION_LENGTH__+0x98>
        USB_RESET_HOOK(isReset);
 47c:	88 23       	and	r24, r24
 47e:	19 f0       	breq	.+6      	; 0x486 <__LOCK_REGION_LENGTH__+0x86>
 480:	f8 94       	cli
 482:	c3 d1       	rcall	.+902    	; 0x80a <calibrateOscillator>
 484:	78 94       	sei
        wasReset = isReset;
 486:	c0 93 25 01 	sts	0x0125, r28	; 0x800125 <wasReset.1915>
    usbDeviceAddr = 0;
    usbResetStall();
    DBG1(0xff, 0, 0);
isNotReset:
    usbHandleResetHook(i);
}
 48a:	06 c0       	rjmp	.+12     	; 0x498 <__LOCK_REGION_LENGTH__+0x98>
        wantLen = 8;
    usbMsgLen -= wantLen;
    usbTxBuf[0] ^= USBPID_DATA0 ^ USBPID_DATA1; /* DATA toggling */
    len = usbDeviceRead(usbTxBuf + 1, wantLen);
    if(len <= 8){           /* valid data packet */
        usbCrc16Append(&usbTxBuf[1], len);
 48c:	60 e0       	ldi	r22, 0x00	; 0
 48e:	88 e2       	ldi	r24, 0x28	; 40
 490:	91 e0       	ldi	r25, 0x01	; 1
 492:	2d d0       	rcall	.+90     	; 0x4ee <usbCrc16Append>
        len += 4;           /* length including sync byte */
 494:	c4 e0       	ldi	r28, 0x04	; 4
 496:	d7 cf       	rjmp	.-82     	; 0x446 <__LOCK_REGION_LENGTH__+0x46>
    usbDeviceAddr = 0;
    usbResetStall();
    DBG1(0xff, 0, 0);
isNotReset:
    usbHandleResetHook(i);
}
 498:	df 91       	pop	r29
 49a:	cf 91       	pop	r28
 49c:	08 95       	ret

0000049e <usbInit>:
/* ------------------------------------------------------------------------- */

USB_PUBLIC void usbInit(void)
{
#if USB_INTR_CFG_SET != 0
    USB_INTR_CFG |= USB_INTR_CFG_SET;
 49e:	85 b7       	in	r24, 0x35	; 53
 4a0:	82 60       	ori	r24, 0x02	; 2
 4a2:	85 bf       	out	0x35, r24	; 53
#endif
#if USB_INTR_CFG_CLR != 0
    USB_INTR_CFG &= ~(USB_INTR_CFG_CLR);
#endif
    USB_INTR_ENABLE |= (1 << USB_INTR_ENABLE_BIT);
 4a4:	8b b7       	in	r24, 0x3b	; 59
 4a6:	80 64       	ori	r24, 0x40	; 64
 4a8:	8b bf       	out	0x3b, r24	; 59
/* ------------------------------------------------------------------------- */

static inline void  usbResetDataToggling(void)
{
#if USB_CFG_HAVE_INTRIN_ENDPOINT && !USB_CFG_SUPPRESS_INTR_CODE
    USB_SET_DATATOKEN1(USB_INITIAL_DATATOKEN);  /* reset data toggling for interrupt endpoint */
 4aa:	a2 e3       	ldi	r26, 0x32	; 50
 4ac:	b1 e0       	ldi	r27, 0x01	; 1
 4ae:	8b e4       	ldi	r24, 0x4B	; 75
 4b0:	11 96       	adiw	r26, 0x01	; 1
 4b2:	8c 93       	st	X, r24
 4b4:	11 97       	sbiw	r26, 0x01	; 1
#   if USB_CFG_HAVE_INTRIN_ENDPOINT3
    USB_SET_DATATOKEN3(USB_INITIAL_DATATOKEN);  /* reset data toggling for interrupt endpoint */
 4b6:	ed e5       	ldi	r30, 0x5D	; 93
 4b8:	f1 e0       	ldi	r31, 0x01	; 1
 4ba:	81 83       	std	Z+1, r24	; 0x01
    USB_INTR_CFG &= ~(USB_INTR_CFG_CLR);
#endif
    USB_INTR_ENABLE |= (1 << USB_INTR_ENABLE_BIT);
    usbResetDataToggling();
#if USB_CFG_HAVE_INTRIN_ENDPOINT && !USB_CFG_SUPPRESS_INTR_CODE
    usbTxLen1 = USBPID_NAK;
 4bc:	8a e5       	ldi	r24, 0x5A	; 90
 4be:	8c 93       	st	X, r24
#if USB_CFG_HAVE_INTRIN_ENDPOINT3
    usbTxLen3 = USBPID_NAK;
 4c0:	80 83       	st	Z, r24
 4c2:	08 95       	ret

000004c4 <usbCrc16>:
;   poly    r20+r21
;   scratch r23
;   resCrc  r24+r25 / r16+r17
;   ptr     X / Z
usbCrc16:
    mov     ptrL, argPtrL
 4c4:	a8 2f       	mov	r26, r24
    mov     ptrH, argPtrH
 4c6:	b9 2f       	mov	r27, r25
    ldi     resCrcL, 0
 4c8:	80 e0       	ldi	r24, 0x00	; 0
    ldi     resCrcH, 0
 4ca:	90 e0       	ldi	r25, 0x00	; 0
    ldi     polyL, lo8(0xa001)
 4cc:	41 e0       	ldi	r20, 0x01	; 1
    ldi     polyH, hi8(0xa001)
 4ce:	50 ea       	ldi	r21, 0xA0	; 160
    com     argLen      ; argLen = -argLen - 1: modified loop to ensure that carry is set
 4d0:	60 95       	com	r22
    ldi     bitCnt, 0   ; loop counter with starnd condition = end condition
 4d2:	30 e0       	ldi	r19, 0x00	; 0
    rjmp    usbCrcLoopEntry
 4d4:	09 c0       	rjmp	.+18     	; 0x4e8 <usbCrcLoopEntry>

000004d6 <usbCrcByteLoop>:
usbCrcByteLoop:
    ld      byte, ptr+
 4d6:	2d 91       	ld	r18, X+
    eor     resCrcL, byte
 4d8:	82 27       	eor	r24, r18

000004da <usbCrcBitLoop>:
usbCrcBitLoop:
    ror     resCrcH     ; carry is always set here (see brcs jumps to here)
 4da:	97 95       	ror	r25
    ror     resCrcL
 4dc:	87 95       	ror	r24
    brcs    usbCrcNoXor
 4de:	10 f0       	brcs	.+4      	; 0x4e4 <usbCrcNoXor>
    eor     resCrcL, polyL
 4e0:	84 27       	eor	r24, r20
    eor     resCrcH, polyH
 4e2:	95 27       	eor	r25, r21

000004e4 <usbCrcNoXor>:
usbCrcNoXor:
    subi    bitCnt, 224 ; (8 * 224) % 256 = 0; this loop iterates 8 times
 4e4:	30 5e       	subi	r19, 0xE0	; 224
    brcs    usbCrcBitLoop
 4e6:	c8 f3       	brcs	.-14     	; 0x4da <usbCrcBitLoop>

000004e8 <usbCrcLoopEntry>:
usbCrcLoopEntry:
    subi    argLen, -1
 4e8:	6f 5f       	subi	r22, 0xFF	; 255
    brcs    usbCrcByteLoop
 4ea:	a8 f3       	brcs	.-22     	; 0x4d6 <usbCrcByteLoop>

000004ec <usbCrcReady>:
usbCrcReady:
    ret
 4ec:	08 95       	ret

000004ee <usbCrc16Append>:

#endif /* USB_USE_FAST_CRC */

; extern unsigned usbCrc16Append(unsigned char *data, unsigned char len);
usbCrc16Append:
    rcall   usbCrc16
 4ee:	ea df       	rcall	.-44     	; 0x4c4 <usbCrc16>
    st      ptr+, resCrcL
 4f0:	8d 93       	st	X+, r24
    st      ptr+, resCrcH
 4f2:	9d 93       	st	X+, r25
    ret
 4f4:	08 95       	ret

000004f6 <usbMeasureFrameLength>:

; extern unsigned usbMeasurePacketLength(void);
; returns time between two idle strobes in multiples of 7 CPU clocks
.global usbMeasureFrameLength
usbMeasureFrameLength:
    ldi     cntH, 6         ; wait ~ 10 ms for D- == 0
 4f6:	a6 e0       	ldi	r26, 0x06	; 6
    clr     cnt16L
 4f8:	88 27       	eor	r24, r24
    clr     cnt16H
 4fa:	99 27       	eor	r25, r25

000004fc <usbMFTime16>:
usbMFTime16:
    dec     cntH
 4fc:	aa 95       	dec	r26
    breq    usbMFTimeout
 4fe:	69 f0       	breq	.+26     	; 0x51a <usbMFTimeout>

00000500 <usbMFWaitStrobe>:
usbMFWaitStrobe:            ; first wait for D- == 0 (idle strobe)
    sbiw    cnt16, 1        ;[0] [6]
 500:	01 97       	sbiw	r24, 0x01	; 1
    breq    usbMFTime16     ;[2]
 502:	e1 f3       	breq	.-8      	; 0x4fc <usbMFTime16>
    sbic    USBIN, USBMINUS ;[3]
 504:	b2 99       	sbic	0x16, 2	; 22
    rjmp    usbMFWaitStrobe ;[4]
 506:	fc cf       	rjmp	.-8      	; 0x500 <usbMFWaitStrobe>

00000508 <usbMFWaitIdle>:
usbMFWaitIdle:              ; then wait until idle again
    sbis    USBIN, USBMINUS ;1 wait for D- == 1
 508:	b2 9b       	sbis	0x16, 2	; 22
    rjmp    usbMFWaitIdle   ;2
 50a:	fe cf       	rjmp	.-4      	; 0x508 <usbMFWaitIdle>
    ldi     cnt16L, 1       ;1 represents cycles so far
 50c:	81 e0       	ldi	r24, 0x01	; 1
    clr     cnt16H          ;1
 50e:	99 27       	eor	r25, r25

00000510 <usbMFWaitLoop>:
usbMFWaitLoop:
    in      cntH, USBIN     ;[0] [7]
 510:	a6 b3       	in	r26, 0x16	; 22
    adiw    cnt16, 1        ;[1]
 512:	01 96       	adiw	r24, 0x01	; 1
    breq    usbMFTimeout    ;[3]
 514:	11 f0       	breq	.+4      	; 0x51a <usbMFTimeout>
    andi    cntH, USBMASK   ;[4]
 516:	a6 70       	andi	r26, 0x06	; 6
    brne    usbMFWaitLoop   ;[5]
 518:	d9 f7       	brne	.-10     	; 0x510 <usbMFWaitLoop>

0000051a <usbMFTimeout>:
usbMFTimeout:
#if resL != cnt16L
    mov     resL, cnt16L
    mov     resH, cnt16H
#endif
    ret
 51a:	08 95       	ret

0000051c <__vector_1>:
; when instruction starts


USB_INTR_VECTOR:
;order of registers pushed: YL, SREG [sofError], r0, YH, shift, x1, x2, x3, x4, cnt
    push    YL                  ;[-23] push only what is necessary to sync with edge ASAP
 51c:	cf 93       	push	r28
    in      YL, SREG            ;[-21]
 51e:	cf b7       	in	r28, 0x3f	; 63
    push    YL                  ;[-20]
 520:	cf 93       	push	r28

00000522 <waitForJ>:
;sync up with J to K edge during sync pattern -- use fastest possible loops
;The first part waits at most 1 bit long since we must be in sync pattern.
;YL is guarenteed to be < 0x80 because I flag is clear. When we jump to
;waitForJ, ensure that this prerequisite is met.
waitForJ:
    inc     YL
 522:	c3 95       	inc	r28
    sbis    USBIN, USBMINUS
 524:	b2 9b       	sbis	0x16, 2	; 22
    brne    waitForJ        ; just make sure we have ANY timeout
 526:	e9 f7       	brne	.-6      	; 0x522 <waitForJ>

00000528 <waitForK>:
waitForK:
;The following code results in a sampling window of < 1/4 bit which meets the spec.
    sbis    USBIN, USBMINUS     ;[-15]
 528:	b2 9b       	sbis	0x16, 2	; 22
    rjmp    foundK              ;[-14]
 52a:	0b c0       	rjmp	.+22     	; 0x542 <foundK>
    sbis    USBIN, USBMINUS
 52c:	b2 9b       	sbis	0x16, 2	; 22
    rjmp    foundK
 52e:	09 c0       	rjmp	.+18     	; 0x542 <foundK>
    sbis    USBIN, USBMINUS
 530:	b2 9b       	sbis	0x16, 2	; 22
    rjmp    foundK
 532:	07 c0       	rjmp	.+14     	; 0x542 <foundK>
    sbis    USBIN, USBMINUS
 534:	b2 9b       	sbis	0x16, 2	; 22
    rjmp    foundK
 536:	05 c0       	rjmp	.+10     	; 0x542 <foundK>
    sbis    USBIN, USBMINUS
 538:	b2 9b       	sbis	0x16, 2	; 22
    rjmp    foundK
 53a:	03 c0       	rjmp	.+6      	; 0x542 <foundK>
    sbis    USBIN, USBMINUS
 53c:	b2 9b       	sbis	0x16, 2	; 22
    rjmp    foundK
 53e:	01 c0       	rjmp	.+2      	; 0x542 <foundK>
    sts     usbSofCount, YL
#endif  /* USB_COUNT_SOF */
#ifdef USB_SOF_HOOK
    USB_SOF_HOOK
#endif
    rjmp    sofError
 540:	d8 c0       	rjmp	.+432    	; 0x6f2 <sofError>

00000542 <foundK>:
foundK:                         ;[-12]
;{3, 5} after falling D- edge, average delay: 4 cycles [we want 5 for center sampling]
;we have 1 bit time for setup purposes, then sample again. Numbers in brackets
;are cycles from center of first sync (double K) bit after the instruction
    push    r0                  ;[-12]
 542:	0f 92       	push	r0
;   [---]                       ;[-11]
    push    YH                  ;[-10]
 544:	df 93       	push	r29
;   [---]                       ;[-9]
    lds     YL, usbInputBufOffset;[-8]
 546:	c0 91 40 01 	lds	r28, 0x0140	; 0x800140 <usbInputBufOffset>
;   [---]                       ;[-7]
    clr     YH                  ;[-6]
 54a:	dd 27       	eor	r29, r29
    subi    YL, lo8(-(usbRxBuf));[-5] [rx loop init]
 54c:	c9 5b       	subi	r28, 0xB9	; 185
    sbci    YH, hi8(-(usbRxBuf));[-4] [rx loop init]
 54e:	de 4f       	sbci	r29, 0xFE	; 254
    mov     r0, x2              ;[-3] [rx loop init]
 550:	01 2e       	mov	r0, r17
    sbis    USBIN, USBMINUS     ;[-2] we want two bits K (sample 2 cycles too early)
 552:	b2 9b       	sbis	0x16, 2	; 22
    rjmp    haveTwoBitsK        ;[-1]
 554:	03 c0       	rjmp	.+6      	; 0x55c <haveTwoBitsK>
    pop     YH                  ;[0] undo the pushes from before
 556:	df 91       	pop	r29
    pop     r0                  ;[2]
 558:	0f 90       	pop	r0
    rjmp    waitForK            ;[4] this was not the end of sync, retry
 55a:	e6 cf       	rjmp	.-52     	; 0x528 <waitForK>

0000055c <haveTwoBitsK>:

;----------------------------------------------------------------------------
; push more registers and initialize values while we sample the first bits:
;----------------------------------------------------------------------------
haveTwoBitsK:               ;[1]
    push    shift           ;[1]
 55c:	2f 93       	push	r18
    push    x1              ;[3]
 55e:	0f 93       	push	r16
    push    x2              ;[5]
 560:	1f 93       	push	r17
    push    x3              ;[7]
 562:	4f 93       	push	r20
    ldi     shift, 0xff     ;[9] [rx loop init]
 564:	2f ef       	ldi	r18, 0xFF	; 255
    ori     x3, 0xff        ;[10] [rx loop init] == ser x3, clear zero flag
 566:	4f 6f       	ori	r20, 0xFF	; 255

    in      x1, USBIN       ;[11] <-- sample bit 0
 568:	06 b3       	in	r16, 0x16	; 22
    bst     x1, USBMINUS    ;[12]
 56a:	02 fb       	bst	r16, 2
    bld     shift, 0        ;[13]
 56c:	20 f9       	bld	r18, 0
    push    x4              ;[14] == phase
 56e:	5f 93       	push	r21
;   [---]                   ;[15]
    push    cnt             ;[16]
 570:	3f 93       	push	r19
;   [---]                   ;[17]
    ldi     phase, 0        ;[18] [rx loop init]
 572:	50 e0       	ldi	r21, 0x00	; 0
    ldi     cnt, USB_BUFSIZE;[19] [rx loop init]
 574:	3b e0       	ldi	r19, 0x0B	; 11
    rjmp    rxbit1          ;[20]
 576:	65 c0       	rjmp	.+202    	; 0x642 <rxbit1>

00000578 <continueWithBit5>:
bit 7: jump, fixup bitstuff
; 87 [+ 2] cycles
------------------------------------------------------------------
*/
continueWithBit5:
    in      x2, USBIN       ;[055] <-- bit 5
 578:	16 b3       	in	r17, 0x16	; 22
    eor     r0, x2          ;[056]
 57a:	01 26       	eor	r0, r17
    or      phase, r0       ;[057]
 57c:	50 29       	or	r21, r0
    sbrc    phase, USBMINUS ;[058]
 57e:	52 fd       	sbrc	r21, 2
    lpm                     ;[059] optional nop3; modifies r0
 580:	c8 95       	lpm
    in      phase, USBIN    ;[060] <-- phase
 582:	56 b3       	in	r21, 0x16	; 22
    eor     x1, x2          ;[061]
 584:	01 27       	eor	r16, r17
    bst     x1, USBMINUS    ;[062]
 586:	02 fb       	bst	r16, 2
    bld     shift, 5        ;[063]
 588:	25 f9       	bld	r18, 5
    andi    shift, 0x3f     ;[064]
 58a:	2f 73       	andi	r18, 0x3F	; 63
    in      x1, USBIN       ;[065] <-- bit 6
 58c:	06 b3       	in	r16, 0x16	; 22
    breq    unstuff5        ;[066] *** unstuff escape
 58e:	b1 f0       	breq	.+44     	; 0x5bc <unstuff5>
    eor     phase, x1       ;[067]
 590:	50 27       	eor	r21, r16
    eor     x2, x1          ;[068]
 592:	10 27       	eor	r17, r16
    bst     x2, USBMINUS    ;[069]
 594:	12 fb       	bst	r17, 2
    bld     shift, 6        ;[070]
 596:	26 f9       	bld	r18, 6

00000598 <didUnstuff6>:
didUnstuff6:                ;[   ]
    in      r0, USBIN       ;[071] <-- phase
 598:	06 b2       	in	r0, 0x16	; 22
    cpi     shift, 0x02     ;[072]
 59a:	22 30       	cpi	r18, 0x02	; 2
    brlo    unstuff6        ;[073] *** unstuff escape
 59c:	f0 f0       	brcs	.+60     	; 0x5da <unstuff6>

0000059e <didUnstuff5>:
didUnstuff5:                ;[   ]
    nop2                    ;[074]
 59e:	00 c0       	rjmp	.+0      	; 0x5a0 <didUnstuff5+0x2>
;   [---]                   ;[075]
    in      x2, USBIN       ;[076] <-- bit 7
 5a0:	16 b3       	in	r17, 0x16	; 22
    eor     x1, x2          ;[077]
 5a2:	01 27       	eor	r16, r17
    bst     x1, USBMINUS    ;[078]
 5a4:	02 fb       	bst	r16, 2
    bld     shift, 7        ;[079]
 5a6:	27 f9       	bld	r18, 7

000005a8 <didUnstuff7>:
didUnstuff7:                ;[   ]
    eor     r0, x2          ;[080]
 5a8:	01 26       	eor	r0, r17
    or      phase, r0       ;[081]
 5aa:	50 29       	or	r21, r0
    in      r0, USBIN       ;[082] <-- phase
 5ac:	06 b2       	in	r0, 0x16	; 22
    cpi     shift, 0x04     ;[083]
 5ae:	24 30       	cpi	r18, 0x04	; 4
    brsh    rxLoop          ;[084]
 5b0:	e8 f5       	brcc	.+122    	; 0x62c <rxLoop>

000005b2 <unstuff7>:
;   [---]                   ;[085]
unstuff7:                   ;[   ]
    andi    x3, ~0x80       ;[085]
 5b2:	4f 77       	andi	r20, 0x7F	; 127
    ori     shift, 0x80     ;[086]
 5b4:	20 68       	ori	r18, 0x80	; 128
    in      x2, USBIN       ;[087] <-- sample stuffed bit 7
 5b6:	16 b3       	in	r17, 0x16	; 22
    nop                     ;[088]
 5b8:	00 00       	nop
    rjmp    didUnstuff7     ;[089]
 5ba:	f6 cf       	rjmp	.-20     	; 0x5a8 <didUnstuff7>

000005bc <unstuff5>:
;   [---]                   ;[090]
                            ;[080]

unstuff5:                   ;[067]
    eor     phase, x1       ;[068]
 5bc:	50 27       	eor	r21, r16
    andi    x3, ~0x20       ;[069]
 5be:	4f 7d       	andi	r20, 0xDF	; 223
    ori     shift, 0x20     ;[070]
 5c0:	20 62       	ori	r18, 0x20	; 32
    in      r0, USBIN       ;[071] <-- phase
 5c2:	06 b2       	in	r0, 0x16	; 22
    mov     x2, x1          ;[072]
 5c4:	10 2f       	mov	r17, r16
    nop                     ;[073]
 5c6:	00 00       	nop
    nop2                    ;[074]
 5c8:	00 c0       	rjmp	.+0      	; 0x5ca <unstuff5+0xe>
;   [---]                   ;[075]
    in      x1, USBIN       ;[076] <-- bit 6
 5ca:	06 b3       	in	r16, 0x16	; 22
    eor     r0, x1          ;[077]
 5cc:	00 26       	eor	r0, r16
    or      phase, r0       ;[078]
 5ce:	50 29       	or	r21, r0
    eor     x2, x1          ;[079]
 5d0:	10 27       	eor	r17, r16
    bst     x2, USBMINUS    ;[080]
 5d2:	12 fb       	bst	r17, 2
    bld     shift, 6        ;[081] no need to check bitstuffing, we just had one
 5d4:	26 f9       	bld	r18, 6
    in      r0, USBIN       ;[082] <-- phase
 5d6:	06 b2       	in	r0, 0x16	; 22
    rjmp    didUnstuff5     ;[083]
 5d8:	e2 cf       	rjmp	.-60     	; 0x59e <didUnstuff5>

000005da <unstuff6>:
;   [---]                   ;[084]
                            ;[074]

unstuff6:                   ;[074]
    andi    x3, ~0x40       ;[075]
 5da:	4f 7b       	andi	r20, 0xBF	; 191
    in      x1, USBIN       ;[076] <-- bit 6 again
 5dc:	06 b3       	in	r16, 0x16	; 22
    ori     shift, 0x40     ;[077]
 5de:	20 64       	ori	r18, 0x40	; 64
    nop2                    ;[078]
 5e0:	00 c0       	rjmp	.+0      	; 0x5e2 <unstuff6+0x8>
;   [---]                   ;[079]
    rjmp    didUnstuff6     ;[080]
 5e2:	da cf       	rjmp	.-76     	; 0x598 <didUnstuff6>

000005e4 <unstuff0>:
;   [---]                   ;[081]
                            ;[071]

unstuff0:                   ;[013]
    eor     r0, x2          ;[014]
 5e4:	01 26       	eor	r0, r17
    or      phase, r0       ;[015]
 5e6:	50 29       	or	r21, r0
    andi    x2, USBMASK     ;[016] check for SE0
 5e8:	16 70       	andi	r17, 0x06	; 6
    in      r0, USBIN       ;[017] <-- phase
 5ea:	06 b2       	in	r0, 0x16	; 22
    breq    didUnstuff0     ;[018] direct jump to se0 would be too long
 5ec:	69 f1       	breq	.+90     	; 0x648 <didUnstuff0>
    andi    x3, ~0x01       ;[019]
 5ee:	4e 7f       	andi	r20, 0xFE	; 254
    ori     shift, 0x01     ;[020]
 5f0:	21 60       	ori	r18, 0x01	; 1
    mov     x1, x2          ;[021] mov existing sample
 5f2:	01 2f       	mov	r16, r17
    in      x2, USBIN       ;[022] <-- bit 1 again
 5f4:	16 b3       	in	r17, 0x16	; 22
    rjmp    didUnstuff0     ;[023]
 5f6:	28 c0       	rjmp	.+80     	; 0x648 <didUnstuff0>

000005f8 <unstuff1>:
;   [---]                   ;[024]
                            ;[014]

unstuff1:                   ;[024]
    eor     r0, x1          ;[025]
 5f8:	00 26       	eor	r0, r16
    or      phase, r0       ;[026]
 5fa:	50 29       	or	r21, r0
    andi    x3, ~0x02       ;[027]
 5fc:	4d 7f       	andi	r20, 0xFD	; 253
    in      r0, USBIN       ;[028] <-- phase
 5fe:	06 b2       	in	r0, 0x16	; 22
    ori     shift, 0x02     ;[029]
 600:	22 60       	ori	r18, 0x02	; 2
    mov     x2, x1          ;[030]
 602:	10 2f       	mov	r17, r16
    rjmp    didUnstuff1     ;[031]
 604:	29 c0       	rjmp	.+82     	; 0x658 <didUnstuff1>

00000606 <unstuff2>:
;   [---]                   ;[032]
                            ;[022]

unstuff2:                   ;[035]
    eor     r0, x2          ;[036]
 606:	01 26       	eor	r0, r17
    or      phase, r0       ;[037]
 608:	50 29       	or	r21, r0
    andi    x3, ~0x04       ;[038]
 60a:	4b 7f       	andi	r20, 0xFB	; 251
    in      r0, USBIN       ;[039] <-- phase
 60c:	06 b2       	in	r0, 0x16	; 22
    ori     shift, 0x04     ;[040]
 60e:	24 60       	ori	r18, 0x04	; 4
    mov     x1, x2          ;[041]
 610:	01 2f       	mov	r16, r17
    rjmp    didUnstuff2     ;[042]
 612:	2d c0       	rjmp	.+90     	; 0x66e <didUnstuff2>

00000614 <unstuff3>:
;   [---]                   ;[043]
                            ;[033]

unstuff3:                   ;[043]
    in      x2, USBIN       ;[044] <-- bit 3 again
 614:	16 b3       	in	r17, 0x16	; 22
    eor     r0, x2          ;[045]
 616:	01 26       	eor	r0, r17
    or      phase, r0       ;[046]
 618:	50 29       	or	r21, r0
    andi    x3, ~0x08       ;[047]
 61a:	47 7f       	andi	r20, 0xF7	; 247
    ori     shift, 0x08     ;[048]
 61c:	28 60       	ori	r18, 0x08	; 8
    nop                     ;[049]
 61e:	00 00       	nop
    in      r0, USBIN       ;[050] <-- phase
 620:	06 b2       	in	r0, 0x16	; 22
    rjmp    didUnstuff3     ;[051]
 622:	2e c0       	rjmp	.+92     	; 0x680 <didUnstuff3>

00000624 <unstuff4>:
;   [---]                   ;[052]
                            ;[042]

unstuff4:                   ;[053]
    andi    x3, ~0x10       ;[054]
 624:	4f 7e       	andi	r20, 0xEF	; 239
    in      x1, USBIN       ;[055] <-- bit 4 again
 626:	06 b3       	in	r16, 0x16	; 22
    ori     shift, 0x10     ;[056]
 628:	20 61       	ori	r18, 0x10	; 16
    rjmp    didUnstuff4     ;[057]
 62a:	30 c0       	rjmp	.+96     	; 0x68c <didUnstuff4>

0000062c <rxLoop>:
;   [---]                   ;[058]
                            ;[048]

rxLoop:                     ;[085]
    eor     x3, shift       ;[086] reconstruct: x3 is 0 at bit locations we changed, 1 at others
 62c:	42 27       	eor	r20, r18
    in      x1, USBIN       ;[000] <-- bit 0
 62e:	06 b3       	in	r16, 0x16	; 22
    st      y+, x3          ;[001]
 630:	49 93       	st	Y+, r20
;   [---]                   ;[002]
    eor     r0, x1          ;[003]
 632:	00 26       	eor	r0, r16
    or      phase, r0       ;[004]
 634:	50 29       	or	r21, r0
    eor     x2, x1          ;[005]
 636:	10 27       	eor	r17, r16
    in      r0, USBIN       ;[006] <-- phase
 638:	06 b2       	in	r0, 0x16	; 22
    ser     x3              ;[007]
 63a:	4f ef       	ldi	r20, 0xFF	; 255
    bst     x2, USBMINUS    ;[008]
 63c:	12 fb       	bst	r17, 2
    bld     shift, 0        ;[009]
 63e:	20 f9       	bld	r18, 0
    andi    shift, 0xf9     ;[010]
 640:	29 7f       	andi	r18, 0xF9	; 249

00000642 <rxbit1>:
rxbit1:                     ;[   ]
    in      x2, USBIN       ;[011] <-- bit 1
 642:	16 b3       	in	r17, 0x16	; 22
    breq    unstuff0        ;[012] *** unstuff escape
 644:	79 f2       	breq	.-98     	; 0x5e4 <unstuff0>
    andi    x2, USBMASK     ;[013] SE0 check for bit 1
 646:	16 70       	andi	r17, 0x06	; 6

00000648 <didUnstuff0>:
didUnstuff0:                ;[   ] Z only set if we detected SE0 in bitstuff
    breq    se0             ;[014]
 648:	59 f1       	breq	.+86     	; 0x6a0 <se0>
    eor     r0, x2          ;[015]
 64a:	01 26       	eor	r0, r17
    or      phase, r0       ;[016]
 64c:	50 29       	or	r21, r0
    in      r0, USBIN       ;[017] <-- phase
 64e:	06 b2       	in	r0, 0x16	; 22
    eor     x1, x2          ;[018]
 650:	01 27       	eor	r16, r17
    bst     x1, USBMINUS    ;[019]
 652:	02 fb       	bst	r16, 2
    bld     shift, 1        ;[020]
 654:	21 f9       	bld	r18, 1
    andi    shift, 0xf3     ;[021]
 656:	23 7f       	andi	r18, 0xF3	; 243

00000658 <didUnstuff1>:
didUnstuff1:                ;[   ]
    in      x1, USBIN       ;[022] <-- bit 2
 658:	06 b3       	in	r16, 0x16	; 22
    breq    unstuff1        ;[023] *** unstuff escape
 65a:	71 f2       	breq	.-100    	; 0x5f8 <unstuff1>
    eor     r0, x1          ;[024]
 65c:	00 26       	eor	r0, r16
    or      phase, r0       ;[025]
 65e:	50 29       	or	r21, r0
    subi    cnt, 1          ;[026] overflow check
 660:	31 50       	subi	r19, 0x01	; 1
    brcs    overflow        ;[027]
 662:	d0 f0       	brcs	.+52     	; 0x698 <overflow>
    in      r0, USBIN       ;[028] <-- phase
 664:	06 b2       	in	r0, 0x16	; 22
    eor     x2, x1          ;[029]
 666:	10 27       	eor	r17, r16
    bst     x2, USBMINUS    ;[030]
 668:	12 fb       	bst	r17, 2
    bld     shift, 2        ;[031]
 66a:	22 f9       	bld	r18, 2
    andi    shift, 0xe7     ;[032]
 66c:	27 7e       	andi	r18, 0xE7	; 231

0000066e <didUnstuff2>:
didUnstuff2:                ;[   ]
    in      x2, USBIN       ;[033] <-- bit 3
 66e:	16 b3       	in	r17, 0x16	; 22
    breq    unstuff2        ;[034] *** unstuff escape
 670:	51 f2       	breq	.-108    	; 0x606 <unstuff2>
    eor     r0, x2          ;[035]
 672:	01 26       	eor	r0, r17
    or      phase, r0       ;[036]
 674:	50 29       	or	r21, r0
    eor     x1, x2          ;[037]
 676:	01 27       	eor	r16, r17
    bst     x1, USBMINUS    ;[038]
 678:	02 fb       	bst	r16, 2
    in      r0, USBIN       ;[039] <-- phase
 67a:	06 b2       	in	r0, 0x16	; 22
    bld     shift, 3        ;[040]
 67c:	23 f9       	bld	r18, 3
    andi    shift, 0xcf     ;[041]
 67e:	2f 7c       	andi	r18, 0xCF	; 207

00000680 <didUnstuff3>:
didUnstuff3:                ;[   ]
    breq    unstuff3        ;[042] *** unstuff escape
 680:	49 f2       	breq	.-110    	; 0x614 <unstuff3>
    nop                     ;[043]
 682:	00 00       	nop
    in      x1, USBIN       ;[044] <-- bit 4
 684:	06 b3       	in	r16, 0x16	; 22
    eor     x2, x1          ;[045]
 686:	10 27       	eor	r17, r16
    bst     x2, USBMINUS    ;[046]
 688:	12 fb       	bst	r17, 2
    bld     shift, 4        ;[047]
 68a:	24 f9       	bld	r18, 4

0000068c <didUnstuff4>:
didUnstuff4:                ;[   ]
    eor     r0, x1          ;[048]
 68c:	00 26       	eor	r0, r16
    or      phase, r0       ;[049]
 68e:	50 29       	or	r21, r0
    in      r0, USBIN       ;[050] <-- phase
 690:	06 b2       	in	r0, 0x16	; 22
    andi    shift, 0x9f     ;[051]
 692:	2f 79       	andi	r18, 0x9F	; 159
    breq    unstuff4        ;[052] *** unstuff escape
 694:	39 f2       	breq	.-114    	; 0x624 <unstuff4>
    rjmp    continueWithBit5;[053]
 696:	70 cf       	rjmp	.-288    	; 0x578 <continueWithBit5>

00000698 <overflow>:
*/

#define token   x1

overflow:
    ldi     x2, 1<<USB_INTR_PENDING_BIT
 698:	10 e4       	ldi	r17, 0x40	; 64
    USB_STORE_PENDING(x2)       ; clear any pending interrupts
 69a:	1a bf       	out	0x3a, r17	; 58

0000069c <ignorePacket>:
ignorePacket:
    clr     token
 69c:	00 27       	eor	r16, r16
    rjmp    storeTokenAndReturn
 69e:	1c c0       	rjmp	.+56     	; 0x6d8 <storeTokenAndReturn>

000006a0 <se0>:
; Processing of received packet (numbers in brackets are cycles after center of SE0)
;----------------------------------------------------------------------------
;This is the only non-error exit point for the software receiver loop
;we don't check any CRCs here because there is no time left.
se0:
    subi    cnt, USB_BUFSIZE    ;[5]
 6a0:	3b 50       	subi	r19, 0x0B	; 11
    neg     cnt                 ;[6]
 6a2:	31 95       	neg	r19
    sub     YL, cnt             ;[7]
 6a4:	c3 1b       	sub	r28, r19
    sbci    YH, 0               ;[8]
 6a6:	d0 40       	sbci	r29, 0x00	; 0
    ldi     x2, 1<<USB_INTR_PENDING_BIT ;[9]
 6a8:	10 e4       	ldi	r17, 0x40	; 64
    USB_STORE_PENDING(x2)       ;[10] clear pending intr and check flag later. SE0 should be over.
 6aa:	1a bf       	out	0x3a, r17	; 58
    ld      token, y            ;[11]
 6ac:	08 81       	ld	r16, Y
    cpi     token, USBPID_DATA0 ;[13]
 6ae:	03 3c       	cpi	r16, 0xC3	; 195
    breq    handleData          ;[14]
 6b0:	21 f1       	breq	.+72     	; 0x6fa <handleData>
    cpi     token, USBPID_DATA1 ;[15]
 6b2:	0b 34       	cpi	r16, 0x4B	; 75
    breq    handleData          ;[16]
 6b4:	11 f1       	breq	.+68     	; 0x6fa <handleData>
    lds     shift, usbDeviceAddr;[17]
 6b6:	20 91 3e 01 	lds	r18, 0x013E	; 0x80013e <usbDeviceAddr>
    ldd     x2, y+1             ;[19] ADDR and 1 bit endpoint number
 6ba:	19 81       	ldd	r17, Y+1	; 0x01
    lsl     x2                  ;[21] shift out 1 bit endpoint number
 6bc:	11 0f       	add	r17, r17
    cpse    x2, shift           ;[22]
 6be:	12 13       	cpse	r17, r18
    rjmp    ignorePacket        ;[23]
 6c0:	ed cf       	rjmp	.-38     	; 0x69c <ignorePacket>
/* only compute endpoint number in x3 if required later */
#if USB_CFG_HAVE_INTRIN_ENDPOINT || USB_CFG_IMPLEMENT_FN_WRITEOUT
    ldd     x3, y+2             ;[24] endpoint number + crc
 6c2:	4a 81       	ldd	r20, Y+2	; 0x02
    rol     x3                  ;[26] shift in LSB of endpoint
 6c4:	44 1f       	adc	r20, r20
#endif
    cpi     token, USBPID_IN    ;[27]
 6c6:	09 36       	cpi	r16, 0x69	; 105
    breq    handleIn            ;[28]
 6c8:	69 f1       	breq	.+90     	; 0x724 <handleIn>
    cpi     token, USBPID_SETUP ;[29]
 6ca:	0d 32       	cpi	r16, 0x2D	; 45
    breq    handleSetupOrOut    ;[30]
 6cc:	11 f0       	breq	.+4      	; 0x6d2 <handleSetupOrOut>
    cpi     token, USBPID_OUT   ;[31]
 6ce:	01 3e       	cpi	r16, 0xE1	; 225
    brne    ignorePacket        ;[32] must be ack, nak or whatever
 6d0:	29 f7       	brne	.-54     	; 0x69c <ignorePacket>

000006d2 <handleSetupOrOut>:
;Setup and Out are followed by a data packet two bit times (16 cycles) after
;the end of SE0. The sync code allows up to 40 cycles delay from the start of
;the sync pattern until the first bit is sampled. That's a total of 56 cycles.
handleSetupOrOut:               ;[32]
#if USB_CFG_IMPLEMENT_FN_WRITEOUT   /* if we have data for endpoint != 0, set usbCurrentTok to address */
    andi    x3, 0xf             ;[32]
 6d2:	4f 70       	andi	r20, 0x0F	; 15
    breq    storeTokenAndReturn ;[33]
 6d4:	09 f0       	breq	.+2      	; 0x6d8 <storeTokenAndReturn>
    mov     token, x3           ;[34] indicate that this is endpoint x OUT
 6d6:	04 2f       	mov	r16, r20

000006d8 <storeTokenAndReturn>:
#endif
storeTokenAndReturn:
    sts     usbCurrentTok, token;[35]
 6d8:	00 93 45 01 	sts	0x0145, r16	; 0x800145 <usbCurrentTok>

000006dc <doReturn>:
doReturn:
    POP_STANDARD                ;[37] 12...16 cycles
 6dc:	3f 91       	pop	r19
 6de:	5f 91       	pop	r21
 6e0:	4f 91       	pop	r20
 6e2:	1f 91       	pop	r17
 6e4:	0f 91       	pop	r16
 6e6:	2f 91       	pop	r18
 6e8:	df 91       	pop	r29
 6ea:	0f 90       	pop	r0
    USB_LOAD_PENDING(YL)        ;[49]
 6ec:	ca b7       	in	r28, 0x3a	; 58
    sbrc    YL, USB_INTR_PENDING_BIT;[50] check whether data is already arriving
 6ee:	c6 fd       	sbrc	r28, 6
    rjmp    waitForJ            ;[51] save the pops and pushes -- a new interrupt is already pending
 6f0:	18 cf       	rjmp	.-464    	; 0x522 <waitForJ>

000006f2 <sofError>:
sofError:
    POP_RETI                    ;macro call
 6f2:	cf 91       	pop	r28
 6f4:	cf bf       	out	0x3f, r28	; 63
 6f6:	cf 91       	pop	r28
    reti
 6f8:	18 95       	reti

000006fa <handleData>:

handleData:
#if USB_CFG_CHECK_CRC
    CRC_CLEANUP_AND_CHECK       ; jumps to ignorePacket if CRC error
#endif
    lds     shift, usbCurrentTok;[18]
 6fa:	20 91 45 01 	lds	r18, 0x0145	; 0x800145 <usbCurrentTok>
    tst     shift               ;[20]
 6fe:	22 23       	and	r18, r18
    breq    doReturn            ;[21]
 700:	69 f3       	breq	.-38     	; 0x6dc <doReturn>
    lds     x2, usbRxLen        ;[22]
 702:	10 91 43 01 	lds	r17, 0x0143	; 0x800143 <usbRxLen>
    tst     x2                  ;[24]
 706:	11 23       	and	r17, r17
    brne    sendNakAndReti      ;[25]
 708:	d1 f5       	brne	.+116    	; 0x77e <sendNakAndReti>
; 2006-03-11: The following two lines fix a problem where the device was not
; recognized if usbPoll() was called less frequently than once every 4 ms.
    cpi     cnt, 4              ;[26] zero sized data packets are status phase only -- ignore and ack
 70a:	34 30       	cpi	r19, 0x04	; 4
    brmi    sendAckAndReti      ;[27] keep rx buffer clean -- we must not NAK next SETUP
 70c:	d2 f1       	brmi	.+116    	; 0x782 <sendAckAndReti>
#if USB_CFG_CHECK_DATA_TOGGLING
    sts     usbCurrentDataToken, token  ; store for checking by C code
#endif
    sts     usbRxLen, cnt       ;[28] store received data, swap buffers
 70e:	30 93 43 01 	sts	0x0143, r19	; 0x800143 <usbRxLen>
    sts     usbRxToken, shift   ;[30]
 712:	20 93 3f 01 	sts	0x013F, r18	; 0x80013f <usbRxToken>
    lds     x2, usbInputBufOffset;[32] swap buffers
 716:	10 91 40 01 	lds	r17, 0x0140	; 0x800140 <usbInputBufOffset>
    ldi     cnt, USB_BUFSIZE    ;[34]
 71a:	3b e0       	ldi	r19, 0x0B	; 11
    sub     cnt, x2             ;[35]
 71c:	31 1b       	sub	r19, r17
    sts     usbInputBufOffset, cnt;[36] buffers now swapped
 71e:	30 93 40 01 	sts	0x0140, r19	; 0x800140 <usbInputBufOffset>
    rjmp    sendAckAndReti      ;[38] 40 + 17 = 57 until SOP
 722:	2f c0       	rjmp	.+94     	; 0x782 <sendAckAndReti>

00000724 <handleIn>:

handleIn:
;We don't send any data as long as the C code has not processed the current
;input data and potentially updated the output data. That's more efficient
;in terms of code size than clearing the tx buffers when a packet is received.
    lds     x1, usbRxLen        ;[30]
 724:	00 91 43 01 	lds	r16, 0x0143	; 0x800143 <usbRxLen>
    cpi     x1, 1               ;[32] negative values are flow control, 0 means "buffer free"
 728:	01 30       	cpi	r16, 0x01	; 1
    brge    sendNakAndReti      ;[33] unprocessed input packet?
 72a:	4c f5       	brge	.+82     	; 0x77e <sendNakAndReti>
    ldi     x1, USBPID_NAK      ;[34] prepare value for usbTxLen
 72c:	0a e5       	ldi	r16, 0x5A	; 90
#if USB_CFG_HAVE_INTRIN_ENDPOINT
    andi    x3, 0xf             ;[35] x3 contains endpoint
 72e:	4f 70       	andi	r20, 0x0F	; 15
#if USB_CFG_SUPPRESS_INTR_CODE
    brne    sendNakAndReti      ;[36]
#else
    brne    handleIn1           ;[36]
 730:	49 f4       	brne	.+18     	; 0x744 <handleIn1>
#endif
#endif
    lds     cnt, usbTxLen       ;[37]
 732:	30 91 01 01 	lds	r19, 0x0101	; 0x800101 <usbTxLen>
    sbrc    cnt, 4              ;[39] all handshake tokens have bit 4 set
 736:	34 fd       	sbrc	r19, 4
    rjmp    sendCntAndReti      ;[40] 42 + 16 = 58 until SOP
 738:	25 c0       	rjmp	.+74     	; 0x784 <sendCntAndReti>
    sts     usbTxLen, x1        ;[41] x1 == USBPID_NAK from above
 73a:	00 93 01 01 	sts	0x0101, r16	; 0x800101 <usbTxLen>
    ldi     YL, lo8(usbTxBuf)   ;[43]
 73e:	c7 e2       	ldi	r28, 0x27	; 39
    ldi     YH, hi8(usbTxBuf)   ;[44]
 740:	d1 e0       	ldi	r29, 0x01	; 1
    rjmp    usbSendAndReti      ;[45] 57 + 12 = 59 until SOP
 742:	24 c0       	rjmp	.+72     	; 0x78c <usbSendAndReti>

00000744 <handleIn1>:

#if !USB_CFG_SUPPRESS_INTR_CODE && USB_CFG_HAVE_INTRIN_ENDPOINT /* placed here due to relative jump range */
handleIn1:                      ;[38]
#if USB_CFG_HAVE_INTRIN_ENDPOINT3
; 2006-06-10 as suggested by O.Tamura: support second INTR IN / BULK IN endpoint
    cpi     x3, USB_CFG_EP3_NUMBER;[38]
 744:	43 30       	cpi	r20, 0x03	; 3
    breq    handleIn3           ;[39]
 746:	49 f0       	breq	.+18     	; 0x75a <handleIn3>
#endif
    lds     cnt, usbTxLen1      ;[40]
 748:	30 91 32 01 	lds	r19, 0x0132	; 0x800132 <usbTxStatus1>
    sbrc    cnt, 4              ;[42] all handshake tokens have bit 4 set
 74c:	34 fd       	sbrc	r19, 4
    rjmp    sendCntAndReti      ;[43] 47 + 16 = 63 until SOP
 74e:	1a c0       	rjmp	.+52     	; 0x784 <sendCntAndReti>
    sts     usbTxLen1, x1       ;[44] x1 == USBPID_NAK from above
 750:	00 93 32 01 	sts	0x0132, r16	; 0x800132 <usbTxStatus1>
    ldi     YL, lo8(usbTxBuf1)  ;[46]
 754:	c3 e3       	ldi	r28, 0x33	; 51
    ldi     YH, hi8(usbTxBuf1)  ;[47]
 756:	d1 e0       	ldi	r29, 0x01	; 1
    rjmp    usbSendAndReti      ;[48] 50 + 12 = 62 until SOP
 758:	19 c0       	rjmp	.+50     	; 0x78c <usbSendAndReti>

0000075a <handleIn3>:

#if USB_CFG_HAVE_INTRIN_ENDPOINT3
handleIn3:
    lds     cnt, usbTxLen3      ;[41]
 75a:	30 91 5d 01 	lds	r19, 0x015D	; 0x80015d <usbTxStatus3>
    sbrc    cnt, 4              ;[43]
 75e:	34 fd       	sbrc	r19, 4
    rjmp    sendCntAndReti      ;[44] 49 + 16 = 65 until SOP
 760:	11 c0       	rjmp	.+34     	; 0x784 <sendCntAndReti>
    sts     usbTxLen3, x1       ;[45] x1 == USBPID_NAK from above
 762:	00 93 5d 01 	sts	0x015D, r16	; 0x80015d <usbTxStatus3>
    ldi     YL, lo8(usbTxBuf3)  ;[47]
 766:	ce e5       	ldi	r28, 0x5E	; 94
    ldi     YH, hi8(usbTxBuf3)  ;[48]
 768:	d1 e0       	ldi	r29, 0x01	; 1
    rjmp    usbSendAndReti      ;[49] 51 + 12 = 63 until SOP
 76a:	10 c0       	rjmp	.+32     	; 0x78c <usbSendAndReti>

0000076c <bitstuff7>:
; J = (D+ = 0), (D- = 1)
; K = (D+ = 1), (D- = 0)
; Spec allows 7.5 bit times from EOP to SOP for replies

bitstuff7:
    eor     x1, x4          ;[4]
 76c:	05 27       	eor	r16, r21
    ldi     x2, 0           ;[5]
 76e:	10 e0       	ldi	r17, 0x00	; 0
    nop2                    ;[6] C is zero (brcc)
 770:	00 c0       	rjmp	.+0      	; 0x772 <bitstuff7+0x6>
    rjmp    didStuff7       ;[8]
 772:	21 c0       	rjmp	.+66     	; 0x7b6 <didStuff7>

00000774 <bitstuffN>:

bitstuffN:
    eor     x1, x4          ;[5]
 774:	05 27       	eor	r16, r21
    ldi     x2, 0           ;[6]
 776:	10 e0       	ldi	r17, 0x00	; 0
    lpm                     ;[7] 3 cycle NOP, modifies r0
 778:	c8 95       	lpm
    out     USBOUT, x1      ;[10] <-- out
 77a:	08 bb       	out	0x18, r16	; 24
    rjmp    didStuffN       ;[0]
 77c:	14 c0       	rjmp	.+40     	; 0x7a6 <didStuffN>

0000077e <sendNakAndReti>:

#define bitStatus   x3

sendNakAndReti:
    ldi     cnt, USBPID_NAK ;[-19]
 77e:	3a e5       	ldi	r19, 0x5A	; 90
    rjmp    sendCntAndReti  ;[-18]
 780:	01 c0       	rjmp	.+2      	; 0x784 <sendCntAndReti>

00000782 <sendAckAndReti>:
sendAckAndReti:
    ldi     cnt, USBPID_ACK ;[-17]
 782:	32 ed       	ldi	r19, 0xD2	; 210

00000784 <sendCntAndReti>:
sendCntAndReti:
    mov     r0, cnt         ;[-16]
 784:	03 2e       	mov	r0, r19
    ldi     YL, 0           ;[-15] R0 address is 0
 786:	c0 e0       	ldi	r28, 0x00	; 0
    ldi     YH, 0           ;[-14]
 788:	d0 e0       	ldi	r29, 0x00	; 0
    ldi     cnt, 2          ;[-13]
 78a:	32 e0       	ldi	r19, 0x02	; 2

0000078c <usbSendAndReti>:
;pointer to data in 'Y'
;number of bytes in 'cnt' -- including sync byte [range 2 ... 12]
;uses: x1...x4, shift, cnt, Y
;Numbers in brackets are time since first bit of sync pattern is sent
usbSendAndReti:             ; 12 cycles until SOP
    in      x2, USBDDR      ;[-12]
 78c:	17 b3       	in	r17, 0x17	; 23
    ori     x2, USBMASK     ;[-11]
 78e:	16 60       	ori	r17, 0x06	; 6
    sbi     USBOUT, USBMINUS;[-10] prepare idle state; D+ and D- must have been 0 (no pullups)
 790:	c2 9a       	sbi	0x18, 2	; 24
    in      x1, USBOUT      ;[-8] port mirror for tx loop
 792:	08 b3       	in	r16, 0x18	; 24
    out     USBDDR, x2      ;[-7] <- acquire bus
 794:	17 bb       	out	0x17, r17	; 23
; need not init x2 (bitstuff history) because sync starts with 0
    ldi     x4, USBMASK     ;[-6] exor mask
 796:	56 e0       	ldi	r21, 0x06	; 6
    ldi     shift, 0x80     ;[-5] sync byte is first byte sent
 798:	20 e8       	ldi	r18, 0x80	; 128
    ldi     bitStatus, 0xff ;[-4] init bit loop counter, works for up to 12 bytes
 79a:	4f ef       	ldi	r20, 0xFF	; 255

0000079c <bitloop>:
byteloop:
bitloop:
    sbrs    shift, 0        ;[8] [-3]
 79c:	20 ff       	sbrs	r18, 0
    eor     x1, x4          ;[9] [-2]
 79e:	05 27       	eor	r16, r21
    out     USBOUT, x1      ;[10] [-1] <-- out
 7a0:	08 bb       	out	0x18, r16	; 24
    ror     shift           ;[0]
 7a2:	27 95       	ror	r18
    ror     x2              ;[1]
 7a4:	17 95       	ror	r17

000007a6 <didStuffN>:
didStuffN:
    cpi     x2, 0xfc        ;[2]
 7a6:	1c 3f       	cpi	r17, 0xFC	; 252
    brcc    bitstuffN       ;[3]
 7a8:	28 f7       	brcc	.-54     	; 0x774 <bitstuffN>
    nop                     ;[4]
 7aa:	00 00       	nop
    subi    bitStatus, 37   ;[5] 256 / 7 ~=~ 37
 7ac:	45 52       	subi	r20, 0x25	; 37
    brcc    bitloop         ;[6] when we leave the loop, bitStatus has almost the initial value
 7ae:	b0 f7       	brcc	.-20     	; 0x79c <bitloop>
    sbrs    shift, 0        ;[7]
 7b0:	20 ff       	sbrs	r18, 0
    eor     x1, x4          ;[8]
 7b2:	05 27       	eor	r16, r21
    ror     shift           ;[9]
 7b4:	27 95       	ror	r18

000007b6 <didStuff7>:
didStuff7:
    out     USBOUT, x1      ;[10] <-- out
 7b6:	08 bb       	out	0x18, r16	; 24
    ror     x2              ;[0]
 7b8:	17 95       	ror	r17
    cpi     x2, 0xfc        ;[1]
 7ba:	1c 3f       	cpi	r17, 0xFC	; 252
    brcc    bitstuff7       ;[2]
 7bc:	b8 f6       	brcc	.-82     	; 0x76c <bitstuff7>
    ld      shift, y+       ;[3]
 7be:	29 91       	ld	r18, Y+
    dec     cnt             ;[5]
 7c0:	3a 95       	dec	r19
    brne    byteloop        ;[6]
 7c2:	61 f7       	brne	.-40     	; 0x79c <bitloop>
;make SE0:
    cbr     x1, USBMASK     ;[7] prepare SE0 [spec says EOP may be 21 to 25 cycles]
 7c4:	09 7f       	andi	r16, 0xF9	; 249
    lds     x2, usbNewDeviceAddr;[8]
 7c6:	10 91 44 01 	lds	r17, 0x0144	; 0x800144 <usbNewDeviceAddr>
    lsl     x2              ;[10] we compare with left shifted address
 7ca:	11 0f       	add	r17, r17
    out     USBOUT, x1      ;[11] <-- out SE0 -- from now 2 bits = 22 cycles until bus idle
 7cc:	08 bb       	out	0x18, r16	; 24
;2006-03-06: moved transfer of new address to usbDeviceAddr from C-Code to asm:
;set address only after data packet was sent, not after handshake
    subi    YL, 2           ;[0] Only assign address on data packets, not ACK/NAK in r0
 7ce:	c2 50       	subi	r28, 0x02	; 2
    sbci    YH, 0           ;[1]
 7d0:	d0 40       	sbci	r29, 0x00	; 0
    breq    skipAddrAssign  ;[2]
 7d2:	11 f0       	breq	.+4      	; 0x7d8 <skipAddrAssign>
    sts     usbDeviceAddr, x2; if not skipped: SE0 is one cycle longer
 7d4:	10 93 3e 01 	sts	0x013E, r17	; 0x80013e <usbDeviceAddr>

000007d8 <skipAddrAssign>:
skipAddrAssign:
;end of usbDeviceAddress transfer
    ldi     x2, 1<<USB_INTR_PENDING_BIT;[4] int0 occurred during TX -- clear pending flag
 7d8:	10 e4       	ldi	r17, 0x40	; 64
    USB_STORE_PENDING(x2)   ;[5]
 7da:	1a bf       	out	0x3a, r17	; 58
    ori     x1, USBIDLE     ;[6]
 7dc:	04 60       	ori	r16, 0x04	; 4
    in      x2, USBDDR      ;[7]
 7de:	17 b3       	in	r17, 0x17	; 23
    cbr     x2, USBMASK     ;[8] set both pins to input
 7e0:	19 7f       	andi	r17, 0xF9	; 249
    mov     x3, x1          ;[9]
 7e2:	40 2f       	mov	r20, r16
    cbr     x3, USBMASK     ;[10] configure no pullup on both pins
 7e4:	49 7f       	andi	r20, 0xF9	; 249
    ldi     x4, 4           ;[11]
 7e6:	54 e0       	ldi	r21, 0x04	; 4

000007e8 <se0Delay>:
se0Delay:
    dec     x4              ;[12] [15] [18] [21]
 7e8:	5a 95       	dec	r21
    brne    se0Delay        ;[13] [16] [19] [22]
 7ea:	f1 f7       	brne	.-4      	; 0x7e8 <se0Delay>
    out     USBOUT, x1      ;[23] <-- out J (idle) -- end of SE0 (EOP signal)
 7ec:	08 bb       	out	0x18, r16	; 24
    out     USBDDR, x2      ;[24] <-- release bus now
 7ee:	17 bb       	out	0x17, r17	; 23
    out     USBOUT, x3      ;[25] <-- ensure no pull-up resistors are active
 7f0:	48 bb       	out	0x18, r20	; 24
    rjmp    doReturn
 7f2:	74 cf       	rjmp	.-280    	; 0x6dc <doReturn>

000007f4 <oscInit>:

void    oscInit(void)
{
uchar   calibrationValue;

	calibrationValue	= eeprom_read_byte(0);
 7f4:	80 e0       	ldi	r24, 0x00	; 0
 7f6:	90 e0       	ldi	r25, 0x00	; 0
 7f8:	f4 d0       	rcall	.+488    	; 0x9e2 <eeprom_read_byte>
    if(calibrationValue != 0xff)
 7fa:	8f 3f       	cpi	r24, 0xFF	; 255
 7fc:	19 f4       	brne	.+6      	; 0x804 <oscInit+0x10>
		OSCCAL0	= calibrationValue;
	else {
#if USB_CFG_CLOCK_KHZ==12800
		OSCCAL0	= 232;
#else
		OSCCAL0	+= 4;		/*	8.00 -> 8.25MHz	*/
 7fe:	80 91 74 00 	lds	r24, 0x0074	; 0x800074 <__EEPROM_REGION_LENGTH__+0x7f0074>
 802:	8c 5f       	subi	r24, 0xFC	; 252
 804:	80 93 74 00 	sts	0x0074, r24	; 0x800074 <__EEPROM_REGION_LENGTH__+0x7f0074>
 808:	08 95       	ret

0000080a <calibrateOscillator>:
 * signal (a single SE0 bit) repeating every millisecond immediately after
 * a USB RESET. We first do a binary search for the OSCCAL value and then
 * optimize this value with a neighboorhod search.
 */
void    calibrateOscillator(void)
{
 80a:	cf 92       	push	r12
 80c:	df 92       	push	r13
 80e:	ef 92       	push	r14
 810:	ff 92       	push	r15
 812:	0f 93       	push	r16
 814:	1f 93       	push	r17
 816:	cf 93       	push	r28
 818:	df 93       	push	r29
uchar       trialValue = 0;
#endif
uchar		org;
int			err;

	org	= OSCCAL0;						/* keep the original value				*/
 81a:	c0 90 74 00 	lds	r12, 0x0074	; 0x800074 <__EEPROM_REGION_LENGTH__+0x7f0074>
										/* keep the current error ...			*/
	err	= usbMeasureFrameLength() - targetValue;
 81e:	6b de       	rcall	.-810    	; 0x4f6 <usbMeasureFrameLength>
 820:	84 53       	subi	r24, 0x34	; 52
 822:	99 40       	sbci	r25, 0x09	; 9
 824:	7c 01       	movw	r14, r24
 826:	97 ff       	sbrs	r25, 7
 828:	03 c0       	rjmp	.+6      	; 0x830 <calibrateOscillator+0x26>
 82a:	f1 94       	neg	r15
 82c:	e1 94       	neg	r14
 82e:	f1 08       	sbc	r15, r1
    if(err < 0)
        err = -err;

#if USB_CFG_CLOCK_KHZ==16500
    OSCCAL0	= 0x98;        				/* select a split range  - O.Tamura		*/
 830:	88 e9       	ldi	r24, 0x98	; 152
 832:	80 93 74 00 	sts	0x0074, r24	; 0x800074 <__EEPROM_REGION_LENGTH__+0x7f0074>
    x = usbMeasureFrameLength();
 836:	5f de       	rcall	.-834    	; 0x4f6 <usbMeasureFrameLength>
    if(x < targetValue)
 838:	84 33       	cpi	r24, 0x34	; 52
 83a:	99 40       	sbci	r25, 0x09	; 9
 83c:	14 f4       	brge	.+4      	; 0x842 <calibrateOscillator+0x38>
        trialValue	= 128;
 83e:	c0 e8       	ldi	r28, 0x80	; 128
 840:	01 c0       	rjmp	.+2      	; 0x844 <calibrateOscillator+0x3a>
#if USB_CFG_CLOCK_KHZ==12800
uchar       step = 32;
uchar       trialValue = 192;
#else
uchar       step = 64;
uchar       trialValue = 0;
 842:	c0 e0       	ldi	r28, 0x00	; 0
 844:	07 e0       	ldi	r16, 0x07	; 7
 846:	10 e0       	ldi	r17, 0x00	; 0
 848:	d0 e4       	ldi	r29, 0x40	; 64
        trialValue	= 128;
#endif

	/* do a binary search: */
    do{
        OSCCAL0 = trialValue + step;
 84a:	dd 2e       	mov	r13, r29
 84c:	dc 0e       	add	r13, r28
 84e:	d0 92 74 00 	sts	0x0074, r13	; 0x800074 <__EEPROM_REGION_LENGTH__+0x7f0074>
        x = usbMeasureFrameLength();    /* proportional to current real frequency */
 852:	51 de       	rcall	.-862    	; 0x4f6 <usbMeasureFrameLength>
        if(x < targetValue)             /* frequency still too low */
 854:	84 33       	cpi	r24, 0x34	; 52
 856:	29 e0       	ldi	r18, 0x09	; 9
 858:	92 07       	cpc	r25, r18
 85a:	0c f4       	brge	.+2      	; 0x85e <calibrateOscillator+0x54>
            trialValue += step;
 85c:	cd 2d       	mov	r28, r13
        step >>= 1;
 85e:	d6 95       	lsr	r29
 860:	01 50       	subi	r16, 0x01	; 1
 862:	11 09       	sbc	r17, r1
    }while(step > 0);
 864:	91 f7       	brne	.-28     	; 0x84a <calibrateOscillator+0x40>
 866:	84 53       	subi	r24, 0x34	; 52
 868:	99 40       	sbci	r25, 0x09	; 9
 86a:	97 ff       	sbrs	r25, 7
 86c:	03 c0       	rjmp	.+6      	; 0x874 <calibrateOscillator+0x6a>
 86e:	91 95       	neg	r25
 870:	81 95       	neg	r24
 872:	91 09       	sbc	r25, r1
 874:	8c 01       	movw	r16, r24
	to the same host controller (by downstream broadcast packet). - O.Tamura
	*/
    x -= targetValue;
    if(x < 0)
        x = -x;
	if( x>err ) {
 876:	e8 16       	cp	r14, r24
 878:	f9 06       	cpc	r15, r25
 87a:	1c f4       	brge	.+6      	; 0x882 <calibrateOscillator+0x78>
		OSCCAL0	= org;
 87c:	c0 92 74 00 	sts	0x0074, r12	; 0x800074 <__EEPROM_REGION_LENGTH__+0x7f0074>
		return;
 880:	36 c0       	rjmp	.+108    	; 0x8ee <calibrateOscillator+0xe4>

    /* We have a precision of +/- 2 for optimum OSCCAL here */
    /* now do a neighborhood search for optimum value */
    optimumValue = trialValue;
    optimumDev = x; /* this is certainly far away from optimum */
    for(OSCCAL0 = trialValue - 2; OSCCAL0 <= trialValue + 2; OSCCAL0++){
 882:	8e ef       	ldi	r24, 0xFE	; 254
 884:	8c 0f       	add	r24, r28
 886:	80 93 74 00 	sts	0x0074, r24	; 0x800074 <__EEPROM_REGION_LENGTH__+0x7f0074>
 88a:	ec 2e       	mov	r14, r28
 88c:	f1 2c       	mov	r15, r1
 88e:	82 e0       	ldi	r24, 0x02	; 2
 890:	e8 0e       	add	r14, r24
 892:	f1 1c       	adc	r15, r1
 894:	80 91 74 00 	lds	r24, 0x0074	; 0x800074 <__EEPROM_REGION_LENGTH__+0x7f0074>
 898:	90 e0       	ldi	r25, 0x00	; 0
 89a:	e8 16       	cp	r14, r24
 89c:	f9 06       	cpc	r15, r25
 89e:	a4 f0       	brlt	.+40     	; 0x8c8 <calibrateOscillator+0xbe>
        x = usbMeasureFrameLength() - targetValue;
 8a0:	2a de       	rcall	.-940    	; 0x4f6 <usbMeasureFrameLength>
 8a2:	84 53       	subi	r24, 0x34	; 52
 8a4:	99 40       	sbci	r25, 0x09	; 9
 8a6:	97 ff       	sbrs	r25, 7
 8a8:	03 c0       	rjmp	.+6      	; 0x8b0 <calibrateOscillator+0xa6>
 8aa:	91 95       	neg	r25
 8ac:	81 95       	neg	r24
 8ae:	91 09       	sbc	r25, r1
        if(x < 0)
            x = -x;
        if(x < optimumDev){
 8b0:	80 17       	cp	r24, r16
 8b2:	91 07       	cpc	r25, r17
 8b4:	1c f4       	brge	.+6      	; 0x8bc <calibrateOscillator+0xb2>
            optimumDev = x;
            optimumValue = OSCCAL0;
 8b6:	c0 91 74 00 	lds	r28, 0x0074	; 0x800074 <__EEPROM_REGION_LENGTH__+0x7f0074>
 8ba:	8c 01       	movw	r16, r24

    /* We have a precision of +/- 2 for optimum OSCCAL here */
    /* now do a neighborhood search for optimum value */
    optimumValue = trialValue;
    optimumDev = x; /* this is certainly far away from optimum */
    for(OSCCAL0 = trialValue - 2; OSCCAL0 <= trialValue + 2; OSCCAL0++){
 8bc:	80 91 74 00 	lds	r24, 0x0074	; 0x800074 <__EEPROM_REGION_LENGTH__+0x7f0074>
 8c0:	8f 5f       	subi	r24, 0xFF	; 255
 8c2:	80 93 74 00 	sts	0x0074, r24	; 0x800074 <__EEPROM_REGION_LENGTH__+0x7f0074>
 8c6:	e6 cf       	rjmp	.-52     	; 0x894 <calibrateOscillator+0x8a>
        if(x < optimumDev){
            optimumDev = x;
            optimumValue = OSCCAL0;
        }
    }
    OSCCAL0 = optimumValue;
 8c8:	c0 93 74 00 	sts	0x0074, r28	; 0x800074 <__EEPROM_REGION_LENGTH__+0x7f0074>

	if( eeprom_read_byte(0)!=optimumValue )
 8cc:	80 e0       	ldi	r24, 0x00	; 0
 8ce:	90 e0       	ldi	r25, 0x00	; 0
 8d0:	88 d0       	rcall	.+272    	; 0x9e2 <eeprom_read_byte>
 8d2:	c8 17       	cp	r28, r24
 8d4:	61 f0       	breq	.+24     	; 0x8ee <calibrateOscillator+0xe4>
		eeprom_write_byte(0, optimumValue);
 8d6:	6c 2f       	mov	r22, r28
 8d8:	80 e0       	ldi	r24, 0x00	; 0
 8da:	90 e0       	ldi	r25, 0x00	; 0
}
 8dc:	df 91       	pop	r29
 8de:	cf 91       	pop	r28
 8e0:	1f 91       	pop	r17
 8e2:	0f 91       	pop	r16
 8e4:	ff 90       	pop	r15
 8e6:	ef 90       	pop	r14
 8e8:	df 90       	pop	r13
 8ea:	cf 90       	pop	r12
        }
    }
    OSCCAL0 = optimumValue;

	if( eeprom_read_byte(0)!=optimumValue )
		eeprom_write_byte(0, optimumValue);
 8ec:	82 c0       	rjmp	.+260    	; 0x9f2 <eeprom_write_byte>
}
 8ee:	df 91       	pop	r29
 8f0:	cf 91       	pop	r28
 8f2:	1f 91       	pop	r17
 8f4:	0f 91       	pop	r16
 8f6:	ff 90       	pop	r15
 8f8:	ef 90       	pop	r14
 8fa:	df 90       	pop	r13
 8fc:	cf 90       	pop	r12
 8fe:	08 95       	ret

00000900 <main>:
{
unsigned	i;
uchar		j;

    /* activate pull-ups except on USB lines */
    USB_CFG_IOPORT   = (uchar)~((1<<USB_CFG_DMINUS_BIT)|(1<<USB_CFG_DPLUS_BIT));
 900:	89 ef       	ldi	r24, 0xF9	; 249
 902:	88 bb       	out	0x18, r24	; 24
    /* all pins input except USB (-> USB reset) */
#ifdef USB_CFG_PULLUP_IOPORT    /* use usbDeviceConnect()/usbDeviceDisconnect() if available */
    USBDDR    = 0;    /* we do RESET by deactivating pullup */
    usbDeviceDisconnect();
#else
    USBDDR    = (1<<USB_CFG_DMINUS_BIT)|(1<<USB_CFG_DPLUS_BIT);
 904:	86 e0       	ldi	r24, 0x06	; 6
 906:	87 bb       	out	0x17, r24	; 23
 908:	2f e0       	ldi	r18, 0x0F	; 15
 90a:	21 50       	subi	r18, 0x01	; 1
#endif

    j = 15;
    while(--j){          /* USB Reset by device only required on Watchdog Reset */
 90c:	31 f0       	breq	.+12     	; 0x91a <main+0x1a>
 90e:	80 e0       	ldi	r24, 0x00	; 0
 910:	90 e0       	ldi	r25, 0x00	; 0
        i = 0;
        while(--i)
 912:	01 97       	sbiw	r24, 0x01	; 1
 914:	d1 f3       	breq	.-12     	; 0x90a <main+0xa>
            wdt_reset();
 916:	a8 95       	wdr
 918:	fc cf       	rjmp	.-8      	; 0x912 <main+0x12>
    }

#ifdef USB_CFG_PULLUP_IOPORT
    usbDeviceConnect();
#else
    USBDDR    = 0;      /*  remove USB reset condition */
 91a:	17 ba       	out	0x17, r1	; 23
#endif

	PORTB	= 0xff;
 91c:	8f ef       	ldi	r24, 0xFF	; 255
 91e:	88 bb       	out	0x18, r24	; 24

#ifdef USE_UART_CTRL
	UART_CTRL_DDR	|= (1<<UART_CTRL_DTR) | (1<<UART_CTRL_RTS);
 920:	87 b3       	in	r24, 0x17	; 23
 922:	80 66       	ori	r24, 0x60	; 96
 924:	87 bb       	out	0x17, r24	; 23

int main(void)
{
    odDebugInit();
    hardwareInit();
    usbInit();
 926:	bb dd       	rcall	.-1162   	; 0x49e <usbInit>

    sei();
 928:	78 94       	sei
    for(;;){    /* main event loop */
        wdt_reset();
 92a:	a8 95       	wdr
        usbPoll();
 92c:	83 dc       	rcall	.-1786   	; 0x234 <usbPoll>

        /*    host => device    */
        if( (UCSR0A&(1<<UDRE0)) && uwptr!=irptr
 92e:	80 91 86 00 	lds	r24, 0x0086	; 0x800086 <__EEPROM_REGION_LENGTH__+0x7f0086>
 932:	85 ff       	sbrs	r24, 5
 934:	17 c0       	rjmp	.+46     	; 0x964 <main+0x64>
 936:	e0 91 1a 01 	lds	r30, 0x011A	; 0x80011a <irptr>
 93a:	80 91 1b 01 	lds	r24, 0x011B	; 0x80011b <uwptr>
 93e:	8e 17       	cp	r24, r30
 940:	89 f0       	breq	.+34     	; 0x964 <main+0x64>
#ifdef USE_UART_CTRL
		&& (UART_CTRL_PIN&(1<<UART_CTRL_CTS))
 942:	b7 9b       	sbis	0x16, 7	; 22
 944:	0f c0       	rjmp	.+30     	; 0x964 <main+0x64>
#endif
		) {
            UDR0		= tx_buf[irptr++];
 946:	81 e0       	ldi	r24, 0x01	; 1
 948:	8e 0f       	add	r24, r30
 94a:	80 93 1a 01 	sts	0x011A, r24	; 0x80011a <irptr>
 94e:	f0 e0       	ldi	r31, 0x00	; 0
 950:	ee 5f       	subi	r30, 0xFE	; 254
 952:	fe 4f       	sbci	r31, 0xFE	; 254
 954:	80 81       	ld	r24, Z
 956:	80 93 80 00 	sts	0x0080, r24	; 0x800080 <__EEPROM_REGION_LENGTH__+0x7f0080>
            irptr   &= TX_MASK;
 95a:	80 91 1a 01 	lds	r24, 0x011A	; 0x80011a <irptr>
 95e:	8f 70       	andi	r24, 0x0F	; 15
 960:	80 93 1a 01 	sts	0x011A, r24	; 0x80011a <irptr>
        }
        if( usbAllRequestsAreDisabled() &&
 964:	80 91 43 01 	lds	r24, 0x0143	; 0x800143 <usbRxLen>
 968:	87 ff       	sbrs	r24, 7
 96a:	0d c0       	rjmp	.+26     	; 0x986 <main+0x86>
 96c:	80 91 1b 01 	lds	r24, 0x011B	; 0x80011b <uwptr>
 970:	90 e0       	ldi	r25, 0x00	; 0
 972:	20 91 1a 01 	lds	r18, 0x011A	; 0x80011a <irptr>
 976:	82 1b       	sub	r24, r18
 978:	91 09       	sbc	r25, r1
 97a:	8f 70       	andi	r24, 0x0F	; 15
 97c:	99 27       	eor	r25, r25
 97e:	08 97       	sbiw	r24, 0x08	; 8
 980:	14 f4       	brge	.+4      	; 0x986 <main+0x86>
            ((uwptr-irptr)&TX_MASK)<(TX_SIZE-HW_CDC_BULK_OUT_SIZE) ) {
            usbEnableAllRequests();
 982:	10 92 43 01 	sts	0x0143, r1	; 0x800143 <usbRxLen>
        }

        /*    host <= device    */
        if( UCSR0A&(1<<RXC0) && iwptr<HW_CDC_BULK_IN_SIZE ) {
 986:	80 91 86 00 	lds	r24, 0x0086	; 0x800086 <__EEPROM_REGION_LENGTH__+0x7f0086>
 98a:	87 ff       	sbrs	r24, 7
 98c:	11 c0       	rjmp	.+34     	; 0x9b0 <main+0xb0>
 98e:	e0 91 1c 01 	lds	r30, 0x011C	; 0x80011c <iwptr>
 992:	e8 30       	cpi	r30, 0x08	; 8
 994:	68 f4       	brcc	.+26     	; 0x9b0 <main+0xb0>
            rx_buf[iwptr++]	= UDR0;
 996:	81 e0       	ldi	r24, 0x01	; 1
 998:	8e 0f       	add	r24, r30
 99a:	80 93 1c 01 	sts	0x011C, r24	; 0x80011c <iwptr>
 99e:	90 91 80 00 	lds	r25, 0x0080	; 0x800080 <__EEPROM_REGION_LENGTH__+0x7f0080>
 9a2:	f0 e0       	ldi	r31, 0x00	; 0
 9a4:	ee 5e       	subi	r30, 0xEE	; 238
 9a6:	fe 4f       	sbci	r31, 0xFE	; 254
 9a8:	90 83       	st	Z, r25
#ifdef USE_UART_CTRL
			if( iwptr==HW_CDC_BULK_IN_SIZE )
 9aa:	88 30       	cpi	r24, 0x08	; 8
 9ac:	09 f4       	brne	.+2      	; 0x9b0 <main+0xb0>
				UART_CTRL_PORT &= ~(1<<UART_CTRL_RTS);
 9ae:	c6 98       	cbi	0x18, 6	; 24
#endif
        }
        if( usbInterruptIsReady() && (iwptr||sendEmptyFrame) ) {
 9b0:	80 91 32 01 	lds	r24, 0x0132	; 0x800132 <usbTxStatus1>
 9b4:	84 ff       	sbrs	r24, 4
 9b6:	b9 cf       	rjmp	.-142    	; 0x92a <main+0x2a>
 9b8:	60 91 1c 01 	lds	r22, 0x011C	; 0x80011c <iwptr>
 9bc:	61 11       	cpse	r22, r1
 9be:	05 c0       	rjmp	.+10     	; 0x9ca <main+0xca>
 9c0:	80 91 24 01 	lds	r24, 0x0124	; 0x800124 <sendEmptyFrame>
 9c4:	88 23       	and	r24, r24
 9c6:	09 f4       	brne	.+2      	; 0x9ca <main+0xca>
 9c8:	b0 cf       	rjmp	.-160    	; 0x92a <main+0x2a>
            usbSetInterrupt(rx_buf, iwptr);
 9ca:	82 e1       	ldi	r24, 0x12	; 18
 9cc:	91 e0       	ldi	r25, 0x01	; 1
 9ce:	2c dc       	rcall	.-1960   	; 0x228 <usbSetInterrupt>
            sendEmptyFrame	= iwptr & HW_CDC_BULK_IN_SIZE;
 9d0:	80 91 1c 01 	lds	r24, 0x011C	; 0x80011c <iwptr>
 9d4:	88 70       	andi	r24, 0x08	; 8
 9d6:	80 93 24 01 	sts	0x0124, r24	; 0x800124 <sendEmptyFrame>
            iwptr    = 0;
 9da:	10 92 1c 01 	sts	0x011C, r1	; 0x80011c <iwptr>
#ifdef USE_UART_CTRL
			UART_CTRL_PORT |= (1<<UART_CTRL_RTS);
 9de:	c6 9a       	sbi	0x18, 6	; 24
 9e0:	a4 cf       	rjmp	.-184    	; 0x92a <main+0x2a>

000009e2 <eeprom_read_byte>:
 9e2:	e1 99       	sbic	0x1c, 1	; 28
 9e4:	fe cf       	rjmp	.-4      	; 0x9e2 <eeprom_read_byte>
 9e6:	1f ba       	out	0x1f, r1	; 31
 9e8:	8e bb       	out	0x1e, r24	; 30
 9ea:	e0 9a       	sbi	0x1c, 0	; 28
 9ec:	99 27       	eor	r25, r25
 9ee:	8d b3       	in	r24, 0x1d	; 29
 9f0:	08 95       	ret

000009f2 <eeprom_write_byte>:
 9f2:	26 2f       	mov	r18, r22

000009f4 <eeprom_write_r18>:
 9f4:	e1 99       	sbic	0x1c, 1	; 28
 9f6:	fe cf       	rjmp	.-4      	; 0x9f4 <eeprom_write_r18>
 9f8:	1c ba       	out	0x1c, r1	; 28
 9fa:	1f ba       	out	0x1f, r1	; 31
 9fc:	8e bb       	out	0x1e, r24	; 30
 9fe:	2d bb       	out	0x1d, r18	; 29
 a00:	0f b6       	in	r0, 0x3f	; 63
 a02:	f8 94       	cli
 a04:	e2 9a       	sbi	0x1c, 2	; 28
 a06:	e1 9a       	sbi	0x1c, 1	; 28
 a08:	0f be       	out	0x3f, r0	; 63
 a0a:	01 96       	adiw	r24, 0x01	; 1
 a0c:	08 95       	ret

00000a0e <_exit>:
 a0e:	f8 94       	cli

00000a10 <__stop_program>:
 a10:	ff cf       	rjmp	.-2      	; 0xa10 <__stop_program>