Statistics
| Revision:

root / demos / john / projects / libdragonfly / encoders.lst @ 1693

History | View | Annotate | Download (48.4 KB)

1
   1               		.file	"encoders.c"
2
   2               		.arch atmega128
3
   3               	__SREG__ = 0x3f
4
   4               	__SP_H__ = 0x3e
5
   5               	__SP_L__ = 0x3d
6
   6               	__tmp_reg__ = 0
7
   7               	__zero_reg__ = 1
8
   8               		.global __do_copy_data
9
   9               		.global __do_clear_bss
10
  17               	.Ltext0:
11
  18               	.global	encoder_read
12
  20               	encoder_read:
13
  21               	.LFB4:
14
  22               	.LM1:
15
  23               	/* prologue: frame size=0 */
16
  24               	/* prologue end (size=0) */
17
  25               	.LVL0:
18
  26               	.LM2:
19
  27 0000 8823      		tst r24
20
  28 0002 01F4      		brne .L2
21
  29               	.LM3:
22
  30 0004 8091 0000 		lds r24,left_data
23
  31 0008 9091 0000 		lds r25,(left_data)+1
24
  32               	.LVL1:
25
  33 000c 0895      		ret
26
  34               	.LVL2:
27
  35               	.L2:
28
  36               	.LM4:
29
  37 000e 8130      		cpi r24,lo8(1)
30
  38 0010 01F0      		breq .L5
31
  39 0012 8FEF      		ldi r24,lo8(-1)
32
  40 0014 9FEF      		ldi r25,hi8(-1)
33
  41               	.LVL3:
34
  42 0016 0895      		ret
35
  43               	.LVL4:
36
  44               	.L5:
37
  45 0018 8091 0000 		lds r24,right_data
38
  46 001c 9091 0000 		lds r25,(right_data)+1
39
  47               	.LVL5:
40
  48               	.LM5:
41
  49 0020 0895      		ret
42
  50               	/* epilogue: frame size=0 */
43
  51               	/* epilogue: noreturn */
44
  52               	/* epilogue end (size=0) */
45
  53               	/* function encoder_read size 17 (17) */
46
  54               	.LFE4:
47
  56               	.global	encoder_get_dx
48
  58               	encoder_get_dx:
49
  59               	.LFB6:
50
  60               	.LM6:
51
  61               	/* prologue: frame size=0 */
52
  62               	/* prologue end (size=0) */
53
  63               	.LVL6:
54
  64               	.LM7:
55
  65 0022 8823      		tst r24
56
  66 0024 01F4      		brne .L9
57
  67               	.LM8:
58
  68 0026 8091 0000 		lds r24,left_dx
59
  69 002a 9091 0000 		lds r25,(left_dx)+1
60
  70               	.LVL7:
61
  71 002e 0895      		ret
62
  72               	.LVL8:
63
  73               	.L9:
64
  74               	.LM9:
65
  75 0030 8130      		cpi r24,lo8(1)
66
  76 0032 01F0      		breq .L12
67
  77 0034 8FEF      		ldi r24,lo8(-1)
68
  78 0036 9FEF      		ldi r25,hi8(-1)
69
  79               	.LVL9:
70
  80 0038 0895      		ret
71
  81               	.LVL10:
72
  82               	.L12:
73
  83 003a 8091 0000 		lds r24,right_dx
74
  84 003e 9091 0000 		lds r25,(right_dx)+1
75
  85               	.LVL11:
76
  86               	.LM10:
77
  87 0042 0895      		ret
78
  88               	/* epilogue: frame size=0 */
79
  89               	/* epilogue: noreturn */
80
  90               	/* epilogue end (size=0) */
81
  91               	/* function encoder_get_dx size 17 (17) */
82
  92               	.LFE6:
83
  94               	.global	encoder_rst_dx
84
  96               	encoder_rst_dx:
85
  97               	.LFB8:
86
  98               	.LM11:
87
  99               	/* prologue: frame size=0 */
88
 100               	/* prologue end (size=0) */
89
 101               	.LVL12:
90
 102               	.LM12:
91
 103 0044 8823      		tst r24
92
 104 0046 01F4      		brne .L16
93
 105               	.LM13:
94
 106 0048 1092 0000 		sts (left_dx)+1,__zero_reg__
95
 107 004c 1092 0000 		sts left_dx,__zero_reg__
96
 108 0050 0895      		ret
97
 109               	.L16:
98
 110               	.LM14:
99
 111 0052 8130      		cpi r24,lo8(1)
100
 112 0054 01F4      		brne .L20
101
 113 0056 1092 0000 		sts (right_dx)+1,__zero_reg__
102
 114 005a 1092 0000 		sts right_dx,__zero_reg__
103
 115               	.L20:
104
 116 005e 0895      		ret
105
 117               	/* epilogue: frame size=0 */
106
 118               	/* epilogue: noreturn */
107
 119               	/* epilogue end (size=0) */
108
 120               	/* function encoder_rst_dx size 14 (14) */
109
 121               	.LFE8:
110
 123               	.global	encoder_get_tc
111
 125               	encoder_get_tc:
112
 126               	.LFB9:
113
 127               	.LM15:
114
 128               	/* prologue: frame size=0 */
115
 129               	/* prologue end (size=0) */
116
 130               	.LM16:
117
 131 0060 8091 0000 		lds r24,timecount
118
 132 0064 9091 0000 		lds r25,(timecount)+1
119
 133               	/* epilogue: frame size=0 */
120
 134 0068 0895      		ret
121
 135               	/* epilogue end (size=1) */
122
 136               	/* function encoder_get_tc size 5 (4) */
123
 137               	.LFE9:
124
 139               	.global	encoder_rst_tc
125
 141               	encoder_rst_tc:
126
 142               	.LFB10:
127
 143               	.LM17:
128
 144               	/* prologue: frame size=0 */
129
 145               	/* prologue end (size=0) */
130
 146               	.LM18:
131
 147 006a 1092 0000 		sts timecount,__zero_reg__
132
 148 006e 1092 0000 		sts (timecount)+1,__zero_reg__
133
 149 0072 1092 0000 		sts (timecount)+2,__zero_reg__
134
 150 0076 1092 0000 		sts (timecount)+3,__zero_reg__
135
 151               	/* epilogue: frame size=0 */
136
 152 007a 0895      		ret
137
 153               	/* epilogue end (size=1) */
138
 154               	/* function encoder_rst_tc size 9 (8) */
139
 155               	.LFE10:
140
 157               	.global	encoder_wait
141
 159               	encoder_wait:
142
 160               	.LFB11:
143
 161               	.LM19:
144
 162               	/* prologue: frame size=0 */
145
 163               	/* prologue end (size=0) */
146
 164               	.LVL13:
147
 165 007c 9C01      		movw r18,r24
148
 166               	.LVL14:
149
 167               	.L27:
150
 168               	.LM20:
151
 169 007e 8091 0000 		lds r24,data_ready
152
 170 0082 9091 0000 		lds r25,(data_ready)+1
153
 171 0086 8217      		cp r24,r18
154
 172 0088 9307      		cpc r25,r19
155
 173 008a 04F0      		brlt .L27
156
 174               	.LM21:
157
 175 008c 1092 0000 		sts (data_ready)+1,__zero_reg__
158
 176 0090 1092 0000 		sts data_ready,__zero_reg__
159
 177               	/* epilogue: frame size=0 */
160
 178 0094 0895      		ret
161
 179               	/* epilogue end (size=1) */
162
 180               	/* function encoder_wait size 13 (12) */
163
 181               	.LFE11:
164
 183               	.global	left_data_array_put
165
 185               	left_data_array_put:
166
 186               	.LFB13:
167
 187               	.LM22:
168
 188               	/* prologue: frame size=0 */
169
 189               	/* prologue end (size=0) */
170
 190               	.LVL15:
171
 191               	.LM23:
172
 192 0096 2091 0000 		lds r18,left_data_idx
173
 193 009a 3091 0000 		lds r19,(left_data_idx)+1
174
 194 009e 2D32      		cpi r18,45
175
 195 00a0 3105      		cpc r19,__zero_reg__
176
 196 00a2 01F4      		brne .L33
177
 197               	.LM24:
178
 198 00a4 1092 0000 		sts (left_data_idx)+1,__zero_reg__
179
 199 00a8 1092 0000 		sts left_data_idx,__zero_reg__
180
 200 00ac 00C0      		rjmp .L35
181
 201               	.L33:
182
 202               	.LM25:
183
 203 00ae 2F5F      		subi r18,lo8(-(1))
184
 204 00b0 3F4F      		sbci r19,hi8(-(1))
185
 205 00b2 3093 0000 		sts (left_data_idx)+1,r19
186
 206 00b6 2093 0000 		sts left_data_idx,r18
187
 207               	.L35:
188
 208               	.LM26:
189
 209 00ba E091 0000 		lds r30,left_data_idx
190
 210 00be F091 0000 		lds r31,(left_data_idx)+1
191
 211 00c2 EE0F      		lsl r30
192
 212 00c4 FF1F      		rol r31
193
 213 00c6 E050      		subi r30,lo8(-(left_data_array))
194
 214 00c8 F040      		sbci r31,hi8(-(left_data_array))
195
 215 00ca 9183      		std Z+1,r25
196
 216 00cc 8083      		st Z,r24
197
 217               	/* epilogue: frame size=0 */
198
 218 00ce 0895      		ret
199
 219               	/* epilogue end (size=1) */
200
 220               	/* function left_data_array_put size 29 (28) */
201
 221               	.LFE13:
202
 223               	.global	left_data_array_top
203
 225               	left_data_array_top:
204
 226               	.LFB14:
205
 227               	.LM27:
206
 228               	/* prologue: frame size=0 */
207
 229               	/* prologue end (size=0) */
208
 230 00d0 E091 0000 		lds r30,left_data_idx
209
 231 00d4 F091 0000 		lds r31,(left_data_idx)+1
210
 232 00d8 EE0F      		lsl r30
211
 233 00da FF1F      		rol r31
212
 234 00dc E050      		subi r30,lo8(-(left_data_array))
213
 235 00de F040      		sbci r31,hi8(-(left_data_array))
214
 236               	.LM28:
215
 237 00e0 8081      		ld r24,Z
216
 238 00e2 9181      		ldd r25,Z+1
217
 239               	/* epilogue: frame size=0 */
218
 240 00e4 0895      		ret
219
 241               	/* epilogue end (size=1) */
220
 242               	/* function left_data_array_top size 11 (10) */
221
 243               	.LFE14:
222
 245               	.global	left_data_array_prev
223
 247               	left_data_array_prev:
224
 248               	.LFB15:
225
 249               	.LM29:
226
 250               	/* prologue: frame size=0 */
227
 251               	/* prologue end (size=0) */
228
 252               	.LM30:
229
 253 00e6 E091 0000 		lds r30,left_data_idx
230
 254 00ea F091 0000 		lds r31,(left_data_idx)+1
231
 255 00ee 3097      		sbiw r30,0
232
 256 00f0 01F4      		brne .L40
233
 257               	.LM31:
234
 258 00f2 8091 0000 		lds r24,left_data_array+90
235
 259 00f6 9091 0000 		lds r25,(left_data_array+90)+1
236
 260 00fa 0895      		ret
237
 261               	.L40:
238
 262               	.LM32:
239
 263 00fc EE0F      		lsl r30
240
 264 00fe FF1F      		rol r31
241
 265 0100 E050      		subi r30,lo8(-(left_data_array-2))
242
 266 0102 F040      		sbci r31,hi8(-(left_data_array-2))
243
 267 0104 8081      		ld r24,Z
244
 268 0106 9181      		ldd r25,Z+1
245
 269               	.LM33:
246
 270 0108 0895      		ret
247
 271               	/* epilogue: frame size=0 */
248
 272               	/* epilogue: noreturn */
249
 273               	/* epilogue end (size=0) */
250
 274               	/* function left_data_array_prev size 18 (18) */
251
 275               	.LFE15:
252
 277               	.global	left_data_array_bottom
253
 279               	left_data_array_bottom:
254
 280               	.LFB16:
255
 281               	.LM34:
256
 282               	/* prologue: frame size=0 */
257
 283               	/* prologue end (size=0) */
258
 284               	.LM35:
259
 285 010a E091 0000 		lds r30,left_data_idx
260
 286 010e F091 0000 		lds r31,(left_data_idx)+1
261
 287 0112 ED32      		cpi r30,45
262
 288 0114 F105      		cpc r31,__zero_reg__
263
 289 0116 01F4      		brne .L45
264
 290               	.LM36:
265
 291 0118 8091 0000 		lds r24,left_data_array
266
 292 011c 9091 0000 		lds r25,(left_data_array)+1
267
 293 0120 0895      		ret
268
 294               	.L45:
269
 295               	.LM37:
270
 296 0122 EE0F      		lsl r30
271
 297 0124 FF1F      		rol r31
272
 298 0126 E050      		subi r30,lo8(-(left_data_array))
273
 299 0128 F040      		sbci r31,hi8(-(left_data_array))
274
 300 012a 8281      		ldd r24,Z+2
275
 301 012c 9381      		ldd r25,Z+3
276
 302               	.LM38:
277
 303 012e 0895      		ret
278
 304               	/* epilogue: frame size=0 */
279
 305               	/* epilogue: noreturn */
280
 306               	/* epilogue end (size=0) */
281
 307               	/* function left_data_array_bottom size 19 (19) */
282
 308               	.LFE16:
283
 310               	.global	right_data_array_put
284
 312               	right_data_array_put:
285
 313               	.LFB17:
286
 314               	.LM39:
287
 315               	/* prologue: frame size=0 */
288
 316               	/* prologue end (size=0) */
289
 317               	.LVL16:
290
 318               	.LM40:
291
 319 0130 2091 0000 		lds r18,right_data_idx
292
 320 0134 3091 0000 		lds r19,(right_data_idx)+1
293
 321 0138 2D32      		cpi r18,45
294
 322 013a 3105      		cpc r19,__zero_reg__
295
 323 013c 01F4      		brne .L50
296
 324               	.LM41:
297
 325 013e 1092 0000 		sts (right_data_idx)+1,__zero_reg__
298
 326 0142 1092 0000 		sts right_data_idx,__zero_reg__
299
 327 0146 00C0      		rjmp .L52
300
 328               	.L50:
301
 329               	.LM42:
302
 330 0148 2F5F      		subi r18,lo8(-(1))
303
 331 014a 3F4F      		sbci r19,hi8(-(1))
304
 332 014c 3093 0000 		sts (right_data_idx)+1,r19
305
 333 0150 2093 0000 		sts right_data_idx,r18
306
 334               	.L52:
307
 335               	.LM43:
308
 336 0154 E091 0000 		lds r30,right_data_idx
309
 337 0158 F091 0000 		lds r31,(right_data_idx)+1
310
 338 015c EE0F      		lsl r30
311
 339 015e FF1F      		rol r31
312
 340 0160 E050      		subi r30,lo8(-(right_data_array))
313
 341 0162 F040      		sbci r31,hi8(-(right_data_array))
314
 342 0164 9183      		std Z+1,r25
315
 343 0166 8083      		st Z,r24
316
 344               	/* epilogue: frame size=0 */
317
 345 0168 0895      		ret
318
 346               	/* epilogue end (size=1) */
319
 347               	/* function right_data_array_put size 29 (28) */
320
 348               	.LFE17:
321
 350               	.global	right_data_array_top
322
 352               	right_data_array_top:
323
 353               	.LFB18:
324
 354               	.LM44:
325
 355               	/* prologue: frame size=0 */
326
 356               	/* prologue end (size=0) */
327
 357 016a E091 0000 		lds r30,right_data_idx
328
 358 016e F091 0000 		lds r31,(right_data_idx)+1
329
 359 0172 EE0F      		lsl r30
330
 360 0174 FF1F      		rol r31
331
 361 0176 E050      		subi r30,lo8(-(right_data_array))
332
 362 0178 F040      		sbci r31,hi8(-(right_data_array))
333
 363               	.LM45:
334
 364 017a 8081      		ld r24,Z
335
 365 017c 9181      		ldd r25,Z+1
336
 366               	/* epilogue: frame size=0 */
337
 367 017e 0895      		ret
338
 368               	/* epilogue end (size=1) */
339
 369               	/* function right_data_array_top size 11 (10) */
340
 370               	.LFE18:
341
 372               	.global	right_data_array_prev
342
 374               	right_data_array_prev:
343
 375               	.LFB19:
344
 376               	.LM46:
345
 377               	/* prologue: frame size=0 */
346
 378               	/* prologue end (size=0) */
347
 379               	.LM47:
348
 380 0180 E091 0000 		lds r30,right_data_idx
349
 381 0184 F091 0000 		lds r31,(right_data_idx)+1
350
 382 0188 3097      		sbiw r30,0
351
 383 018a 01F4      		brne .L57
352
 384               	.LM48:
353
 385 018c 8091 0000 		lds r24,right_data_array+90
354
 386 0190 9091 0000 		lds r25,(right_data_array+90)+1
355
 387 0194 0895      		ret
356
 388               	.L57:
357
 389               	.LM49:
358
 390 0196 EE0F      		lsl r30
359
 391 0198 FF1F      		rol r31
360
 392 019a E050      		subi r30,lo8(-(right_data_array-2))
361
 393 019c F040      		sbci r31,hi8(-(right_data_array-2))
362
 394 019e 8081      		ld r24,Z
363
 395 01a0 9181      		ldd r25,Z+1
364
 396               	.LM50:
365
 397 01a2 0895      		ret
366
 398               	/* epilogue: frame size=0 */
367
 399               	/* epilogue: noreturn */
368
 400               	/* epilogue end (size=0) */
369
 401               	/* function right_data_array_prev size 18 (18) */
370
 402               	.LFE19:
371
 404               	.global	right_data_array_bottom
372
 406               	right_data_array_bottom:
373
 407               	.LFB20:
374
 408               	.LM51:
375
 409               	/* prologue: frame size=0 */
376
 410               	/* prologue end (size=0) */
377
 411               	.LM52:
378
 412 01a4 E091 0000 		lds r30,right_data_idx
379
 413 01a8 F091 0000 		lds r31,(right_data_idx)+1
380
 414 01ac ED32      		cpi r30,45
381
 415 01ae F105      		cpc r31,__zero_reg__
382
 416 01b0 01F4      		brne .L62
383
 417               	.LM53:
384
 418 01b2 8091 0000 		lds r24,right_data_array
385
 419 01b6 9091 0000 		lds r25,(right_data_array)+1
386
 420 01ba 0895      		ret
387
 421               	.L62:
388
 422               	.LM54:
389
 423 01bc EE0F      		lsl r30
390
 424 01be FF1F      		rol r31
391
 425 01c0 E050      		subi r30,lo8(-(right_data_array))
392
 426 01c2 F040      		sbci r31,hi8(-(right_data_array))
393
 427 01c4 8281      		ldd r24,Z+2
394
 428 01c6 9381      		ldd r25,Z+3
395
 429               	.LM55:
396
 430 01c8 0895      		ret
397
 431               	/* epilogue: frame size=0 */
398
 432               	/* epilogue: noreturn */
399
 433               	/* epilogue end (size=0) */
400
 434               	/* function right_data_array_bottom size 19 (19) */
401
 435               	.LFE20:
402
 437               	.global	left_data_at
403
 439               	left_data_at:
404
 440               	.LFB21:
405
 441               	.LM56:
406
 442               	/* prologue: frame size=0 */
407
 443               	/* prologue end (size=0) */
408
 444               	.LVL17:
409
 445               	.LM57:
410
 446 01ca E091 0000 		lds r30,left_data_idx
411
 447 01ce F091 0000 		lds r31,(left_data_idx)+1
412
 448               	.LVL18:
413
 449 01d2 E81B      		sub r30,r24
414
 450 01d4 F90B      		sbc r31,r25
415
 451               	.LM58:
416
 452 01d6 F7FD      		sbrc r31,7
417
 453               	.LM59:
418
 454 01d8 BE96      		adiw r30,46
419
 455               	.L67:
420
 456 01da EE0F      		lsl r30
421
 457 01dc FF1F      		rol r31
422
 458               	.LVL19:
423
 459 01de E050      		subi r30,lo8(-(left_data_array))
424
 460 01e0 F040      		sbci r31,hi8(-(left_data_array))
425
 461               	.LM60:
426
 462 01e2 8081      		ld r24,Z
427
 463 01e4 9181      		ldd r25,Z+1
428
 464               	/* epilogue: frame size=0 */
429
 465 01e6 0895      		ret
430
 466               	/* epilogue end (size=1) */
431
 467               	/* function left_data_at size 16 (15) */
432
 468               	.LFE21:
433
 470               	.global	right_data_at
434
 472               	right_data_at:
435
 473               	.LFB22:
436
 474               	.LM61:
437
 475               	/* prologue: frame size=0 */
438
 476               	/* prologue end (size=0) */
439
 477               	.LVL20:
440
 478               	.LM62:
441
 479 01e8 E091 0000 		lds r30,right_data_idx
442
 480 01ec F091 0000 		lds r31,(right_data_idx)+1
443
 481               	.LVL21:
444
 482 01f0 E81B      		sub r30,r24
445
 483 01f2 F90B      		sbc r31,r25
446
 484               	.LM63:
447
 485 01f4 F7FD      		sbrc r31,7
448
 486               	.LM64:
449
 487 01f6 BE96      		adiw r30,46
450
 488               	.L71:
451
 489 01f8 EE0F      		lsl r30
452
 490 01fa FF1F      		rol r31
453
 491 01fc E050      		subi r30,lo8(-(right_data_array))
454
 492 01fe F040      		sbci r31,hi8(-(right_data_array))
455
 493               	.LM65:
456
 494 0200 8081      		ld r24,Z
457
 495 0202 9181      		ldd r25,Z+1
458
 496               	.LVL22:
459
 497               	/* epilogue: frame size=0 */
460
 498 0204 0895      		ret
461
 499               	/* epilogue end (size=1) */
462
 500               	/* function right_data_at size 16 (15) */
463
 501               	.LFE22:
464
 503               	.global	get_dx
465
 505               	get_dx:
466
 506               	.LFB23:
467
 507               	.LM66:
468
 508               	/* prologue: frame size=0 */
469
 509 0206 FF92      		push r15
470
 510 0208 0F93      		push r16
471
 511 020a 1F93      		push r17
472
 512 020c CF93      		push r28
473
 513 020e DF93      		push r29
474
 514               	/* prologue end (size=5) */
475
 515               	.LVL23:
476
 516 0210 F82E      		mov r15,r24
477
 517 0212 8091 0000 		lds r24,left_data_idx
478
 518 0216 9091 0000 		lds r25,(left_data_idx)+1
479
 519               	.LVL24:
480
 520 021a 861B      		sub r24,r22
481
 521 021c 970B      		sbc r25,r23
482
 522 021e EC01      		movw r28,r24
483
 523 0220 A697      		sbiw r28,38
484
 524 0222 DC01      		movw r26,r24
485
 525 0224 8091 0000 		lds r24,right_data_idx
486
 526 0228 9091 0000 		lds r25,(right_data_idx)+1
487
 527 022c 861B      		sub r24,r22
488
 528 022e 970B      		sbc r25,r23
489
 529 0230 BC01      		movw r22,r24
490
 530               	.LVL25:
491
 531 0232 6652      		subi r22,lo8(-(-38))
492
 532 0234 7040      		sbci r23,hi8(-(-38))
493
 533 0236 AC01      		movw r20,r24
494
 534 0238 00E0      		ldi r16,lo8(0)
495
 535 023a 10E0      		ldi r17,hi8(0)
496
 536               	.LVL26:
497
 537               	.LVL27:
498
 538               	.L75:
499
 539               	.LM67:
500
 540 023c FF20      		tst r15
501
 541 023e 01F4      		brne .L76
502
 542 0240 FD01      		movw r30,r26
503
 543               	.LVL28:
504
 544               	.LBB10:
505
 545               	.LBB11:
506
 546               	.LM68:
507
 547 0242 B7FD      		sbrc r27,7
508
 548 0244 BE96      		adiw r30,46
509
 549               	.L78:
510
 550               	.LM69:
511
 551 0246 EE0F      		lsl r30
512
 552 0248 FF1F      		rol r31
513
 553 024a E050      		subi r30,lo8(-(left_data_array))
514
 554 024c F040      		sbci r31,hi8(-(left_data_array))
515
 555 024e 2081      		ld r18,Z
516
 556 0250 3181      		ldd r19,Z+1
517
 557               	.LVL29:
518
 558 0252 FE01      		movw r30,r28
519
 559               	.LVL30:
520
 560               	.LBE11:
521
 561               	.LBE10:
522
 562               	.LBB12:
523
 563               	.LBB13:
524
 564               	.LM70:
525
 565 0254 D7FF      		sbrs r29,7
526
 566 0256 00C0      		rjmp .L80
527
 567 0258 FD01      		movw r30,r26
528
 568 025a 3896      		adiw r30,8
529
 569               	.L80:
530
 570               	.LBE13:
531
 571               	.LBE12:
532
 572               	.LM71:
533
 573 025c EE0F      		lsl r30
534
 574 025e FF1F      		rol r31
535
 575 0260 E050      		subi r30,lo8(-(left_data_array))
536
 576 0262 F040      		sbci r31,hi8(-(left_data_array))
537
 577 0264 00C0      		rjmp .L93
538
 578               	.LVL31:
539
 579               	.L76:
540
 580 0266 FA01      		movw r30,r20
541
 581               	.LVL32:
542
 582               	.LBB14:
543
 583               	.LBB15:
544
 584               	.LM72:
545
 585 0268 57FD      		sbrc r21,7
546
 586 026a BE96      		adiw r30,46
547
 587               	.L83:
548
 588               	.LM73:
549
 589 026c EE0F      		lsl r30
550
 590 026e FF1F      		rol r31
551
 591 0270 E050      		subi r30,lo8(-(right_data_array))
552
 592 0272 F040      		sbci r31,hi8(-(right_data_array))
553
 593 0274 2081      		ld r18,Z
554
 594 0276 3181      		ldd r19,Z+1
555
 595               	.LVL33:
556
 596 0278 FB01      		movw r30,r22
557
 597               	.LVL34:
558
 598               	.LBE15:
559
 599               	.LBE14:
560
 600               	.LBB16:
561
 601               	.LBB17:
562
 602               	.LM74:
563
 603 027a 77FF      		sbrs r23,7
564
 604 027c 00C0      		rjmp .L85
565
 605 027e FA01      		movw r30,r20
566
 606 0280 3896      		adiw r30,8
567
 607               	.L85:
568
 608               	.LBE17:
569
 609               	.LBE16:
570
 610               	.LM75:
571
 611 0282 EE0F      		lsl r30
572
 612 0284 FF1F      		rol r31
573
 613 0286 E050      		subi r30,lo8(-(right_data_array))
574
 614 0288 F040      		sbci r31,hi8(-(right_data_array))
575
 615               	.LVL35:
576
 616               	.L93:
577
 617               	.LVL36:
578
 618 028a 8081      		ld r24,Z
579
 619 028c 9181      		ldd r25,Z+1
580
 620 028e 281B      		sub r18,r24
581
 621 0290 390B      		sbc r19,r25
582
 622               	.LVL37:
583
 623               	.LM76:
584
 624 0292 C901      		movw r24,r18
585
 625 0294 4E96      		adiw r24,30
586
 626 0296 CD97      		sbiw r24,61
587
 627 0298 00F0      		brlo .L87
588
 628               	.LM77:
589
 629 029a 0F5F      		subi r16,lo8(-(1))
590
 630 029c 1F4F      		sbci r17,hi8(-(1))
591
 631 029e 2197      		sbiw r28,1
592
 632 02a0 1197      		sbiw r26,1
593
 633 02a2 6150      		subi r22,lo8(-(-1))
594
 634 02a4 7040      		sbci r23,hi8(-(-1))
595
 635 02a6 4150      		subi r20,lo8(-(-1))
596
 636 02a8 5040      		sbci r21,hi8(-(-1))
597
 637               	.LM78:
598
 638 02aa 0330      		cpi r16,3
599
 639 02ac 1105      		cpc r17,__zero_reg__
600
 640 02ae 01F4      		brne .L75
601
 641 02b0 20E0      		ldi r18,lo8(1024)
602
 642 02b2 34E0      		ldi r19,hi8(1024)
603
 643               	.L87:
604
 644               	.LM79:
605
 645 02b4 C901      		movw r24,r18
606
 646               	/* epilogue: frame size=0 */
607
 647 02b6 DF91      		pop r29
608
 648 02b8 CF91      		pop r28
609
 649 02ba 1F91      		pop r17
610
 650 02bc 0F91      		pop r16
611
 651 02be FF90      		pop r15
612
 652 02c0 0895      		ret
613
 653               	/* epilogue end (size=6) */
614
 654               	/* function get_dx size 97 (86) */
615
 655               	.LFE23:
616
 657               	.global	encoder_get_v
617
 659               	encoder_get_v:
618
 660               	.LFB7:
619
 661               	.LM80:
620
 662               	/* prologue: frame size=0 */
621
 663 02c2 1F93      		push r17
622
 664 02c4 CF93      		push r28
623
 665 02c6 DF93      		push r29
624
 666               	/* prologue end (size=3) */
625
 667               	.LVL38:
626
 668 02c8 182F      		mov r17,r24
627
 669               	.LM81:
628
 670 02ca 60E0      		ldi r22,lo8(0)
629
 671 02cc 70E0      		ldi r23,hi8(0)
630
 672 02ce 0E94 0000 		call get_dx
631
 673               	.LVL39:
632
 674 02d2 EC01      		movw r28,r24
633
 675               	.LVL40:
634
 676               	.LM82:
635
 677 02d4 61E0      		ldi r22,lo8(1)
636
 678 02d6 70E0      		ldi r23,hi8(1)
637
 679 02d8 812F      		mov r24,r17
638
 680 02da 0E94 0000 		call get_dx
639
 681               	.LM83:
640
 682 02de 24E0      		ldi r18,hi8(1024)
641
 683 02e0 C030      		cpi r28,lo8(1024)
642
 684 02e2 D207      		cpc r29,r18
643
 685 02e4 01F4      		brne .L95
644
 686               	.LVL41:
645
 687               	.LM84:
646
 688 02e6 24E0      		ldi r18,hi8(1024)
647
 689 02e8 8030      		cpi r24,lo8(1024)
648
 690 02ea 9207      		cpc r25,r18
649
 691 02ec 01F4      		brne .L97
650
 692 02ee 80E0      		ldi r24,lo8(2048)
651
 693 02f0 98E0      		ldi r25,hi8(2048)
652
 694               	.LVL42:
653
 695 02f2 00C0      		rjmp .L99
654
 696               	.L95:
655
 697               	.LVL43:
656
 698               	.LM85:
657
 699 02f4 24E0      		ldi r18,hi8(1024)
658
 700 02f6 8030      		cpi r24,lo8(1024)
659
 701 02f8 9207      		cpc r25,r18
660
 702 02fa 01F4      		brne .L100
661
 703               	.LM86:
662
 704 02fc CE01      		movw r24,r28
663
 705               	.LVL44:
664
 706               	.L97:
665
 707               	.LM87:
666
 708 02fe 880F      		lsl r24
667
 709 0300 991F      		rol r25
668
 710               	.LVL45:
669
 711 0302 00C0      		rjmp .L99
670
 712               	.LVL46:
671
 713               	.L100:
672
 714               	.LM88:
673
 715 0304 8C0F      		add r24,r28
674
 716 0306 9D1F      		adc r25,r29
675
 717               	.LVL47:
676
 718               	.L99:
677
 719               	/* epilogue: frame size=0 */
678
 720 0308 DF91      		pop r29
679
 721 030a CF91      		pop r28
680
 722 030c 1F91      		pop r17
681
 723 030e 0895      		ret
682
 724               	/* epilogue end (size=4) */
683
 725               	/* function encoder_get_v size 39 (32) */
684
 726               	.LFE7:
685
 728               	.global	encoders_init
686
 730               	encoders_init:
687
 731               	.LFB3:
688
 732               	.LM89:
689
 733               	/* prologue: frame size=0 */
690
 734               	/* prologue end (size=0) */
691
 735               	.LM90:
692
 736 0310 1092 0000 		sts (data_ready)+1,__zero_reg__
693
 737 0314 1092 0000 		sts data_ready,__zero_reg__
694
 738               	.LM91:
695
 739 0318 60E0      		ldi r22,lo8(gs(encoder_recv_complete))
696
 740 031a 70E0      		ldi r23,hi8(gs(encoder_recv_complete))
697
 741 031c 80E0      		ldi r24,lo8(gs(encoder_recv))
698
 742 031e 90E0      		ldi r25,hi8(gs(encoder_recv))
699
 743 0320 0E94 0000 		call spi_init
700
 744               	.LM92:
701
 745 0324 1092 0000 		sts encoder_buf_index,__zero_reg__
702
 746               	.LM93:
703
 747 0328 1092 0000 		sts (left_data_buf)+1,__zero_reg__
704
 748 032c 1092 0000 		sts left_data_buf,__zero_reg__
705
 749               	.LM94:
706
 750 0330 1092 0000 		sts (right_data_buf)+1,__zero_reg__
707
 751 0334 1092 0000 		sts right_data_buf,__zero_reg__
708
 752               	.LM95:
709
 753 0338 8FEF      		ldi r24,lo8(-1)
710
 754 033a 9FEF      		ldi r25,hi8(-1)
711
 755 033c 9093 0000 		sts (left_data)+1,r25
712
 756 0340 8093 0000 		sts left_data,r24
713
 757               	.LM96:
714
 758 0344 9093 0000 		sts (right_data)+1,r25
715
 759 0348 8093 0000 		sts right_data,r24
716
 760               	.LM97:
717
 761 034c 1092 0000 		sts (left_data_idx)+1,__zero_reg__
718
 762 0350 1092 0000 		sts left_data_idx,__zero_reg__
719
 763               	.LM98:
720
 764 0354 1092 0000 		sts (right_data_idx)+1,__zero_reg__
721
 765 0358 1092 0000 		sts right_data_idx,__zero_reg__
722
 766 035c E0E0      		ldi r30,lo8(left_data_array)
723
 767 035e F0E0      		ldi r31,hi8(left_data_array)
724
 768               	.L104:
725
 769               	.LM99:
726
 770 0360 1192      		st Z+,__zero_reg__
727
 771 0362 1192      		st Z+,__zero_reg__
728
 772               	.LM100:
729
 773 0364 80E0      		ldi r24,hi8(left_data_array+92)
730
 774 0366 E030      		cpi r30,lo8(left_data_array+92)
731
 775 0368 F807      		cpc r31,r24
732
 776 036a 01F4      		brne .L104
733
 777 036c E0E0      		ldi r30,lo8(right_data_array)
734
 778 036e F0E0      		ldi r31,hi8(right_data_array)
735
 779               	.L106:
736
 780               	.LM101:
737
 781 0370 1192      		st Z+,__zero_reg__
738
 782 0372 1192      		st Z+,__zero_reg__
739
 783               	.LM102:
740
 784 0374 80E0      		ldi r24,hi8(right_data_array+92)
741
 785 0376 E030      		cpi r30,lo8(right_data_array+92)
742
 786 0378 F807      		cpc r31,r24
743
 787 037a 01F4      		brne .L106
744
 788               	.LM103:
745
 789 037c 85E0      		ldi r24,lo8(5)
746
 790 037e 0E94 0000 		call spi_transfer
747
 791               	/* epilogue: frame size=0 */
748
 792 0382 0895      		ret
749
 793               	/* epilogue end (size=1) */
750
 794               	/* function encoders_init size 58 (57) */
751
 795               	.LFE3:
752
 797               	.global	encoder_recv_complete
753
 799               	encoder_recv_complete:
754
 800               	.LFB2:
755
 801               	.LM104:
756
 802               	/* prologue: frame size=0 */
757
 803               	/* prologue end (size=0) */
758
 804               	.LM105:
759
 805 0384 1092 0000 		sts encoder_buf_index,__zero_reg__
760
 806               	.LM106:
761
 807 0388 8091 0000 		lds r24,data_ready
762
 808 038c 9091 0000 		lds r25,(data_ready)+1
763
 809 0390 0196      		adiw r24,1
764
 810 0392 9093 0000 		sts (data_ready)+1,r25
765
 811 0396 8093 0000 		sts data_ready,r24
766
 812               	.LM107:
767
 813 039a 85E0      		ldi r24,lo8(5)
768
 814 039c 0E94 0000 		call spi_transfer
769
 815               	/* epilogue: frame size=0 */
770
 816 03a0 0895      		ret
771
 817               	/* epilogue end (size=1) */
772
 818               	/* function encoder_recv_complete size 15 (14) */
773
 819               	.LFE2:
774
 821               	.global	encoder_recv
775
 823               	encoder_recv:
776
 824               	.LFB12:
777
 825               	.LM108:
778
 826               	/* prologue: frame size=0 */
779
 827               	/* prologue end (size=0) */
780
 828               	.LVL48:
781
 829               	.LM109:
782
 830 03a2 4091 0000 		lds r20,encoder_buf_index
783
 831 03a6 4230      		cpi r20,lo8(2)
784
 832 03a8 01F0      		breq .L119
785
 833               	.LM110:
786
 834 03aa 4330      		cpi r20,lo8(3)
787
 835 03ac 00F4      		brsh .L122
788
 836 03ae 4423      		tst r20
789
 837 03b0 01F0      		breq .L117
790
 838 03b2 4130      		cpi r20,lo8(1)
791
 839 03b4 01F0      		breq .+2
792
 840 03b6 00C0      		rjmp .L116
793
 841 03b8 00C0      		rjmp .L164
794
 842               	.L122:
795
 843 03ba 4330      		cpi r20,lo8(3)
796
 844 03bc 01F0      		breq .L120
797
 845 03be 4430      		cpi r20,lo8(4)
798
 846 03c0 01F0      		breq .+2
799
 847 03c2 00C0      		rjmp .L116
800
 848 03c4 00C0      		rjmp .L165
801
 849               	.L117:
802
 850               	.LM111:
803
 851 03c6 282F      		mov r18,r24
804
 852 03c8 3327      		clr r19
805
 853 03ca 322F      		mov r19,r18
806
 854 03cc 2227      		clr r18
807
 855 03ce 00C0      		rjmp .L172
808
 856               	.L164:
809
 857               	.LM112:
810
 858 03d0 282F      		mov r18,r24
811
 859 03d2 3327      		clr r19
812
 860               	.L172:
813
 861 03d4 8091 0000 		lds r24,right_data_buf
814
 862 03d8 9091 0000 		lds r25,(right_data_buf)+1
815
 863               	.LVL49:
816
 864 03dc 822B      		or r24,r18
817
 865 03de 932B      		or r25,r19
818
 866 03e0 9093 0000 		sts (right_data_buf)+1,r25
819
 867 03e4 8093 0000 		sts right_data_buf,r24
820
 868 03e8 00C0      		rjmp .L123
821
 869               	.LVL50:
822
 870               	.L119:
823
 871               	.LM113:
824
 872 03ea 282F      		mov r18,r24
825
 873 03ec 3327      		clr r19
826
 874 03ee 322F      		mov r19,r18
827
 875 03f0 2227      		clr r18
828
 876 03f2 330F      		lsl r19
829
 877 03f4 00C0      		rjmp .L171
830
 878               	.LVL51:
831
 879               	.L120:
832
 880               	.LM114:
833
 881 03f6 282F      		mov r18,r24
834
 882 03f8 3327      		clr r19
835
 883 03fa 220F      		lsl r18
836
 884 03fc 331F      		rol r19
837
 885               	.LVL52:
838
 886               	.L171:
839
 887 03fe 8091 0000 		lds r24,left_data_buf
840
 888 0402 9091 0000 		lds r25,(left_data_buf)+1
841
 889 0406 822B      		or r24,r18
842
 890 0408 932B      		or r25,r19
843
 891 040a 9093 0000 		sts (left_data_buf)+1,r25
844
 892 040e 8093 0000 		sts left_data_buf,r24
845
 893 0412 00C0      		rjmp .L123
846
 894               	.LVL53:
847
 895               	.L165:
848
 896               	.LM115:
849
 897 0414 881F      		rol r24
850
 898 0416 8827      		clr r24
851
 899 0418 881F      		rol r24
852
 900 041a 282F      		mov r18,r24
853
 901 041c 3327      		clr r19
854
 902 041e 8091 0000 		lds r24,left_data_buf
855
 903 0422 9091 0000 		lds r25,(left_data_buf)+1
856
 904               	.LVL54:
857
 905 0426 822B      		or r24,r18
858
 906 0428 932B      		or r25,r19
859
 907 042a 9093 0000 		sts (left_data_buf)+1,r25
860
 908 042e 8093 0000 		sts left_data_buf,r24
861
 909               	.LM116:
862
 910 0432 85E0      		ldi r24,lo8(5)
863
 911 0434 90E0      		ldi r25,hi8(5)
864
 912 0436 65E0      		ldi r22,lo8(5)
865
 913 0438 70E0      		ldi r23,hi8(5)
866
 914 043a 0E94 0000 		call __divmodhi4
867
 915 043e 8093 0000 		sts encoder_buf_index,r24
868
 916 0442 00C0      		rjmp .L124
869
 917               	.LVL55:
870
 918               	.L116:
871
 919 0444 842F      		mov r24,r20
872
 920 0446 9927      		clr r25
873
 921               	.LVL56:
874
 922 0448 0196      		adiw r24,1
875
 923 044a 65E0      		ldi r22,lo8(5)
876
 924 044c 70E0      		ldi r23,hi8(5)
877
 925 044e 0E94 0000 		call __divmodhi4
878
 926 0452 8093 0000 		sts encoder_buf_index,r24
879
 927               	.LM117:
880
 928 0456 8823      		tst r24
881
 929 0458 01F0      		breq .+2
882
 930 045a 00C0      		rjmp .L125
883
 931               	.L124:
884
 932               	.LM118:
885
 933 045c 2091 0000 		lds r18,left_data_buf
886
 934 0460 3091 0000 		lds r19,(left_data_buf)+1
887
 935 0464 24FD      		sbrc r18,4
888
 936 0466 00C0      		rjmp .L126
889
 937               	.LM119:
890
 938 0468 82E0      		ldi r24,lo8(1026)
891
 939 046a 94E0      		ldi r25,hi8(1026)
892
 940 046c 9093 0000 		sts (left_data)+1,r25
893
 941 0470 8093 0000 		sts left_data,r24
894
 942               	.L126:
895
 943               	.LM120:
896
 944 0474 C901      		movw r24,r18
897
 945 0476 8C70      		andi r24,lo8(12)
898
 946 0478 9070      		andi r25,hi8(12)
899
 947 047a 892B      		or r24,r25
900
 948 047c 01F0      		breq .L128
901
 949               	.LM121:
902
 950 047e 83E0      		ldi r24,lo8(1027)
903
 951 0480 94E0      		ldi r25,hi8(1027)
904
 952 0482 00C0      		rjmp .L166
905
 953               	.L128:
906
 954               	.LM122:
907
 955 0484 21FF      		sbrs r18,1
908
 956 0486 00C0      		rjmp .L131
909
 957 0488 20FF      		sbrs r18,0
910
 958 048a 00C0      		rjmp .L131
911
 959               	.LM123:
912
 960 048c 81E0      		ldi r24,lo8(1025)
913
 961 048e 94E0      		ldi r25,hi8(1025)
914
 962               	.L166:
915
 963 0490 9093 0000 		sts (left_data)+1,r25
916
 964 0494 8093 0000 		sts left_data,r24
917
 965 0498 00C0      		rjmp .L130
918
 966               	.L131:
919
 967               	.LM124:
920
 968 049a 75E0      		ldi r23,5
921
 969 049c 3695      	1:	lsr r19
922
 970 049e 2795      		ror r18
923
 971 04a0 7A95      		dec r23
924
 972 04a2 01F4      		brne 1b
925
 973 04a4 3370      		andi r19,hi8(1023)
926
 974 04a6 3093 0000 		sts (left_data)+1,r19
927
 975 04aa 2093 0000 		sts left_data,r18
928
 976               	.L130:
929
 977               	.LM125:
930
 978 04ae 2091 0000 		lds r18,right_data_buf
931
 979 04b2 3091 0000 		lds r19,(right_data_buf)+1
932
 980 04b6 24FD      		sbrc r18,4
933
 981 04b8 00C0      		rjmp .L134
934
 982               	.LM126:
935
 983 04ba 82E0      		ldi r24,lo8(1026)
936
 984 04bc 94E0      		ldi r25,hi8(1026)
937
 985 04be 9093 0000 		sts (right_data)+1,r25
938
 986 04c2 8093 0000 		sts right_data,r24
939
 987               	.L134:
940
 988               	.LM127:
941
 989 04c6 C901      		movw r24,r18
942
 990 04c8 8C70      		andi r24,lo8(12)
943
 991 04ca 9070      		andi r25,hi8(12)
944
 992 04cc 892B      		or r24,r25
945
 993 04ce 01F0      		breq .L136
946
 994               	.LM128:
947
 995 04d0 83E0      		ldi r24,lo8(1027)
948
 996 04d2 94E0      		ldi r25,hi8(1027)
949
 997 04d4 00C0      		rjmp .L167
950
 998               	.L136:
951
 999               	.LM129:
952
 1000 04d6 21FF      		sbrs r18,1
953
 1001 04d8 00C0      		rjmp .L139
954
 1002 04da 20FF      		sbrs r18,0
955
 1003 04dc 00C0      		rjmp .L139
956
 1004               	.LM130:
957
 1005 04de 81E0      		ldi r24,lo8(1025)
958
 1006 04e0 94E0      		ldi r25,hi8(1025)
959
 1007               	.L167:
960
 1008 04e2 9093 0000 		sts (right_data)+1,r25
961
 1009 04e6 8093 0000 		sts right_data,r24
962
 1010 04ea 00C0      		rjmp .L138
963
 1011               	.L139:
964
 1012               	.LM131:
965
 1013 04ec 65E0      		ldi r22,5
966
 1014 04ee 3695      	1:	lsr r19
967
 1015 04f0 2795      		ror r18
968
 1016 04f2 6A95      		dec r22
969
 1017 04f4 01F4      		brne 1b
970
 1018 04f6 3370      		andi r19,hi8(1023)
971
 1019 04f8 3093 0000 		sts (right_data)+1,r19
972
 1020 04fc 2093 0000 		sts right_data,r18
973
 1021               	.L138:
974
 1022               	.LM132:
975
 1023 0500 1092 0000 		sts (left_data_buf)+1,__zero_reg__
976
 1024 0504 1092 0000 		sts left_data_buf,__zero_reg__
977
 1025               	.LM133:
978
 1026 0508 1092 0000 		sts (right_data_buf)+1,__zero_reg__
979
 1027 050c 1092 0000 		sts right_data_buf,__zero_reg__
980
 1028               	.LM134:
981
 1029 0510 2091 0000 		lds r18,left_data
982
 1030 0514 3091 0000 		lds r19,(left_data)+1
983
 1031 0518 84E0      		ldi r24,hi8(1024)
984
 1032 051a 2030      		cpi r18,lo8(1024)
985
 1033 051c 3807      		cpc r19,r24
986
 1034 051e 00F0      		brlo .+2
987
 1035 0520 00C0      		rjmp .L142
988
 1036               	.LM135:
989
 1037 0522 8FEF      		ldi r24,lo8(1023)
990
 1038 0524 93E0      		ldi r25,hi8(1023)
991
 1039 0526 821B      		sub r24,r18
992
 1040 0528 930B      		sbc r25,r19
993
 1041 052a 9093 0000 		sts (left_data)+1,r25
994
 1042 052e 8093 0000 		sts left_data,r24
995
 1043               	.LM136:
996
 1044 0532 0E94 0000 		call left_data_array_put
997
 1045               	.LM137:
998
 1046 0536 2091 0000 		lds r18,left_data
999
 1047 053a 3091 0000 		lds r19,(left_data)+1
1000
 1048               	.LBB26:
1001
 1049               	.LBB27:
1002
 1050               	.LM138:
1003
 1051 053e E091 0000 		lds r30,left_data_idx
1004
 1052 0542 F091 0000 		lds r31,(left_data_idx)+1
1005
 1053 0546 3097      		sbiw r30,0
1006
 1054 0548 01F4      		brne .L144
1007
 1055               	.LM139:
1008
 1056 054a 8091 0000 		lds r24,left_data_array+90
1009
 1057 054e 9091 0000 		lds r25,(left_data_array+90)+1
1010
 1058 0552 00C0      		rjmp .L168
1011
 1059               	.L144:
1012
 1060               	.LM140:
1013
 1061 0554 EE0F      		lsl r30
1014
 1062 0556 FF1F      		rol r31
1015
 1063 0558 E050      		subi r30,lo8(-(left_data_array-2))
1016
 1064 055a F040      		sbci r31,hi8(-(left_data_array-2))
1017
 1065 055c 8081      		ld r24,Z
1018
 1066 055e 9181      		ldd r25,Z+1
1019
 1067               	.L168:
1020
 1068               	.LBE27:
1021
 1069               	.LBE26:
1022
 1070               	.LM141:
1023
 1071 0560 281B      		sub r18,r24
1024
 1072 0562 390B      		sbc r19,r25
1025
 1073               	.LVL57:
1026
 1074               	.LM142:
1027
 1075 0564 892B      		or r24,r25
1028
 1076 0566 01F0      		breq .L147
1029
 1077               	.LM143:
1030
 1078 0568 82E0      		ldi r24,hi8(513)
1031
 1079 056a 2130      		cpi r18,lo8(513)
1032
 1080 056c 3807      		cpc r19,r24
1033
 1081 056e 04F0      		brlt .L149
1034
 1082 0570 8091 0000 		lds r24,left_dx
1035
 1083 0574 9091 0000 		lds r25,(left_dx)+1
1036
 1084 0578 280F      		add r18,r24
1037
 1085 057a 391F      		adc r19,r25
1038
 1086 057c 2F5F      		subi r18,lo8(-(-1023))
1039
 1087 057e 3340      		sbci r19,hi8(-(-1023))
1040
 1088 0580 00C0      		rjmp .L169
1041
 1089               	.L149:
1042
 1090               	.LM144:
1043
 1091 0582 8EEF      		ldi r24,hi8(-512)
1044
 1092 0584 2030      		cpi r18,lo8(-512)
1045
 1093 0586 3807      		cpc r19,r24
1046
 1094 0588 04F4      		brge .L151
1047
 1095 058a 8091 0000 		lds r24,left_dx
1048
 1096 058e 9091 0000 		lds r25,(left_dx)+1
1049
 1097 0592 8150      		subi r24,lo8(-(1023))
1050
 1098 0594 9C4F      		sbci r25,hi8(-(1023))
1051
 1099 0596 280F      		add r18,r24
1052
 1100 0598 391F      		adc r19,r25
1053
 1101               	.L169:
1054
 1102 059a 3093 0000 		sts (left_dx)+1,r19
1055
 1103 059e 2093 0000 		sts left_dx,r18
1056
 1104 05a2 00C0      		rjmp .L142
1057
 1105               	.L147:
1058
 1106 05a4 20E0      		ldi r18,lo8(0)
1059
 1107 05a6 30E0      		ldi r19,hi8(0)
1060
 1108               	.L151:
1061
 1109               	.LM145:
1062
 1110 05a8 8091 0000 		lds r24,left_dx
1063
 1111 05ac 9091 0000 		lds r25,(left_dx)+1
1064
 1112 05b0 820F      		add r24,r18
1065
 1113 05b2 931F      		adc r25,r19
1066
 1114 05b4 9093 0000 		sts (left_dx)+1,r25
1067
 1115 05b8 8093 0000 		sts left_dx,r24
1068
 1116               	.L142:
1069
 1117               	.LM146:
1070
 1118 05bc 8091 0000 		lds r24,right_data
1071
 1119 05c0 9091 0000 		lds r25,(right_data)+1
1072
 1120 05c4 24E0      		ldi r18,hi8(1024)
1073
 1121 05c6 8030      		cpi r24,lo8(1024)
1074
 1122 05c8 9207      		cpc r25,r18
1075
 1123               	.LVL58:
1076
 1124 05ca 00F0      		brlo .+2
1077
 1125 05cc 00C0      		rjmp .L125
1078
 1126               	.LM147:
1079
 1127 05ce 0E94 0000 		call right_data_array_put
1080
 1128               	.LM148:
1081
 1129 05d2 2091 0000 		lds r18,right_data
1082
 1130 05d6 3091 0000 		lds r19,(right_data)+1
1083
 1131               	.LBB28:
1084
 1132               	.LBB29:
1085
 1133               	.LM149:
1086
 1134 05da E091 0000 		lds r30,right_data_idx
1087
 1135 05de F091 0000 		lds r31,(right_data_idx)+1
1088
 1136 05e2 3097      		sbiw r30,0
1089
 1137 05e4 01F4      		brne .L154
1090
 1138               	.LM150:
1091
 1139 05e6 8091 0000 		lds r24,right_data_array+90
1092
 1140 05ea 9091 0000 		lds r25,(right_data_array+90)+1
1093
 1141 05ee 00C0      		rjmp .L170
1094
 1142               	.L154:
1095
 1143               	.LM151:
1096
 1144 05f0 EE0F      		lsl r30
1097
 1145 05f2 FF1F      		rol r31
1098
 1146 05f4 E050      		subi r30,lo8(-(right_data_array-2))
1099
 1147 05f6 F040      		sbci r31,hi8(-(right_data_array-2))
1100
 1148 05f8 8081      		ld r24,Z
1101
 1149 05fa 9181      		ldd r25,Z+1
1102
 1150               	.L170:
1103
 1151               	.LBE29:
1104
 1152               	.LBE28:
1105
 1153               	.LM152:
1106
 1154 05fc 281B      		sub r18,r24
1107
 1155 05fe 390B      		sbc r19,r25
1108
 1156               	.LVL59:
1109
 1157               	.LM153:
1110
 1158 0600 892B      		or r24,r25
1111
 1159 0602 01F0      		breq .L157
1112
 1160               	.LM154:
1113
 1161 0604 82E0      		ldi r24,hi8(513)
1114
 1162 0606 2130      		cpi r18,lo8(513)
1115
 1163 0608 3807      		cpc r19,r24
1116
 1164 060a 04F0      		brlt .L159
1117
 1165 060c 8091 0000 		lds r24,right_dx
1118
 1166 0610 9091 0000 		lds r25,(right_dx)+1
1119
 1167 0614 280F      		add r18,r24
1120
 1168 0616 391F      		adc r19,r25
1121
 1169 0618 2F5F      		subi r18,lo8(-(-1023))
1122
 1170 061a 3340      		sbci r19,hi8(-(-1023))
1123
 1171 061c 00C0      		rjmp .L173
1124
 1172               	.L159:
1125
 1173               	.LM155:
1126
 1174 061e 8EEF      		ldi r24,hi8(-512)
1127
 1175 0620 2030      		cpi r18,lo8(-512)
1128
 1176 0622 3807      		cpc r19,r24
1129
 1177 0624 04F4      		brge .L161
1130
 1178 0626 8091 0000 		lds r24,right_dx
1131
 1179 062a 9091 0000 		lds r25,(right_dx)+1
1132
 1180 062e 8150      		subi r24,lo8(-(1023))
1133
 1181 0630 9C4F      		sbci r25,hi8(-(1023))
1134
 1182 0632 280F      		add r18,r24
1135
 1183 0634 391F      		adc r19,r25
1136
 1184               	.L173:
1137
 1185 0636 3093 0000 		sts (right_dx)+1,r19
1138
 1186 063a 2093 0000 		sts right_dx,r18
1139
 1187 063e 00C0      		rjmp .L125
1140
 1188               	.L157:
1141
 1189 0640 20E0      		ldi r18,lo8(0)
1142
 1190 0642 30E0      		ldi r19,hi8(0)
1143
 1191               	.L161:
1144
 1192               	.LM156:
1145
 1193 0644 8091 0000 		lds r24,right_dx
1146
 1194 0648 9091 0000 		lds r25,(right_dx)+1
1147
 1195 064c 820F      		add r24,r18
1148
 1196 064e 931F      		adc r25,r19
1149
 1197 0650 9093 0000 		sts (right_dx)+1,r25
1150
 1198 0654 8093 0000 		sts right_dx,r24
1151
 1199 0658 00C0      		rjmp .L125
1152
 1200               	.LVL60:
1153
 1201               	.L123:
1154
 1202               	.LM157:
1155
 1203 065a 842F      		mov r24,r20
1156
 1204 065c 9927      		clr r25
1157
 1205 065e 0196      		adiw r24,1
1158
 1206 0660 65E0      		ldi r22,lo8(5)
1159
 1207 0662 70E0      		ldi r23,hi8(5)
1160
 1208 0664 0E94 0000 		call __divmodhi4
1161
 1209 0668 8093 0000 		sts encoder_buf_index,r24
1162
 1210               	.LVL61:
1163
 1211               	.L125:
1164
 1212               	.LM158:
1165
 1213 066c 8091 0000 		lds r24,timecount
1166
 1214 0670 9091 0000 		lds r25,(timecount)+1
1167
 1215 0674 A091 0000 		lds r26,(timecount)+2
1168
 1216 0678 B091 0000 		lds r27,(timecount)+3
1169
 1217 067c 0196      		adiw r24,1
1170
 1218 067e A11D      		adc r26,__zero_reg__
1171
 1219 0680 B11D      		adc r27,__zero_reg__
1172
 1220 0682 8093 0000 		sts timecount,r24
1173
 1221 0686 9093 0000 		sts (timecount)+1,r25
1174
 1222 068a A093 0000 		sts (timecount)+2,r26
1175
 1223 068e B093 0000 		sts (timecount)+3,r27
1176
 1224               	/* epilogue: frame size=0 */
1177
 1225 0692 0895      		ret
1178
 1226               	/* epilogue end (size=1) */
1179
 1227               	/* function encoder_recv size 379 (378) */
1180
 1228               	.LFE12:
1181
 1230               	.global	encoder_get_x
1182
 1232               	encoder_get_x:
1183
 1233               	.LFB5:
1184
 1234               	.LM159:
1185
 1235               	/* prologue: frame size=0 */
1186
 1236               	/* prologue end (size=0) */
1187
 1237               	.LVL62:
1188
 1238               	.LBB32:
1189
 1239               	.LBB33:
1190
 1240               	.LM160:
1191
 1241 0694 8823      		tst r24
1192
 1242 0696 01F4      		brne .L175
1193
 1243               	.LM161:
1194
 1244 0698 8091 0000 		lds r24,left_dx
1195
 1245 069c 9091 0000 		lds r25,(left_dx)+1
1196
 1246               	.LVL63:
1197
 1247 06a0 0895      		ret
1198
 1248               	.LVL64:
1199
 1249               	.L175:
1200
 1250               	.LM162:
1201
 1251 06a2 8130      		cpi r24,lo8(1)
1202
 1252 06a4 01F0      		breq .L178
1203
 1253 06a6 8FEF      		ldi r24,lo8(-1)
1204
 1254 06a8 9FEF      		ldi r25,hi8(-1)
1205
 1255               	.LVL65:
1206
 1256 06aa 0895      		ret
1207
 1257               	.LVL66:
1208
 1258               	.L178:
1209
 1259 06ac 8091 0000 		lds r24,right_dx
1210
 1260 06b0 9091 0000 		lds r25,(right_dx)+1
1211
 1261               	.LVL67:
1212
 1262               	.LBE33:
1213
 1263               	.LBE32:
1214
 1264               	.LM163:
1215
 1265 06b4 0895      		ret
1216
 1266               	/* epilogue: frame size=0 */
1217
 1267               	/* epilogue: noreturn */
1218
 1268               	/* epilogue end (size=0) */
1219
 1269               	/* function encoder_get_x size 17 (17) */
1220
 1270               	.LFE5:
1221
 1272               		.comm left_data_buf,2,1
1222
 1273               		.comm right_data_buf,2,1
1223
 1274               		.comm encoder_buf_index,1,1
1224
 1275               		.comm left_data,2,1
1225
 1276               		.comm right_data,2,1
1226
 1277               		.comm left_data_array,92,1
1227
 1278               		.comm right_data_array,92,1
1228
 1279               		.comm left_data_idx,2,1
1229
 1280               		.comm right_data_idx,2,1
1230
 1281               		.comm left_dx,2,1
1231
 1282               		.comm right_dx,2,1
1232
 1283               		.comm timecount,4,1
1233
 1284               		.comm data_ready,2,1
1234
 1477               	.Letext0:
1235
DEFINED SYMBOLS
1236
                            *ABS*:00000000 encoders.c
1237
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccI855Ko.s:3      *ABS*:0000003f __SREG__
1238
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccI855Ko.s:4      *ABS*:0000003e __SP_H__
1239
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccI855Ko.s:5      *ABS*:0000003d __SP_L__
1240
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccI855Ko.s:6      *ABS*:00000000 __tmp_reg__
1241
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccI855Ko.s:7      *ABS*:00000001 __zero_reg__
1242
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccI855Ko.s:20     .text:00000000 encoder_read
1243
                            *COM*:00000002 left_data
1244
                            *COM*:00000002 right_data
1245
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccI855Ko.s:58     .text:00000022 encoder_get_dx
1246
                            *COM*:00000002 left_dx
1247
                            *COM*:00000002 right_dx
1248
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccI855Ko.s:96     .text:00000044 encoder_rst_dx
1249
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccI855Ko.s:125    .text:00000060 encoder_get_tc
1250
                            *COM*:00000004 timecount
1251
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccI855Ko.s:141    .text:0000006a encoder_rst_tc
1252
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccI855Ko.s:159    .text:0000007c encoder_wait
1253
                            *COM*:00000002 data_ready
1254
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccI855Ko.s:185    .text:00000096 left_data_array_put
1255
                            *COM*:00000002 left_data_idx
1256
                            *COM*:0000005c left_data_array
1257
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccI855Ko.s:225    .text:000000d0 left_data_array_top
1258
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccI855Ko.s:247    .text:000000e6 left_data_array_prev
1259
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccI855Ko.s:279    .text:0000010a left_data_array_bottom
1260
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccI855Ko.s:312    .text:00000130 right_data_array_put
1261
                            *COM*:00000002 right_data_idx
1262
                            *COM*:0000005c right_data_array
1263
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccI855Ko.s:352    .text:0000016a right_data_array_top
1264
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccI855Ko.s:374    .text:00000180 right_data_array_prev
1265
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccI855Ko.s:406    .text:000001a4 right_data_array_bottom
1266
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccI855Ko.s:439    .text:000001ca left_data_at
1267
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccI855Ko.s:472    .text:000001e8 right_data_at
1268
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccI855Ko.s:505    .text:00000206 get_dx
1269
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccI855Ko.s:659    .text:000002c2 encoder_get_v
1270
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccI855Ko.s:730    .text:00000310 encoders_init
1271
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccI855Ko.s:799    .text:00000384 encoder_recv_complete
1272
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccI855Ko.s:823    .text:000003a2 encoder_recv
1273
                            *COM*:00000001 encoder_buf_index
1274
                            *COM*:00000002 left_data_buf
1275
                            *COM*:00000002 right_data_buf
1276
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccI855Ko.s:1232   .text:00000694 encoder_get_x
1277

    
1278
UNDEFINED SYMBOLS
1279
__do_copy_data
1280
__do_clear_bss
1281
spi_init
1282
spi_transfer
1283
__divmodhi4