.file "duff-2.c" .text .little .text .align 1 .align 5 .global cksum .type cksum, @function cksum: mov #3,r2 mov.l r14,@-r15 and r5,r2 mov #3,r1 cmp/hi r1,r2 mov r15,r14 mov r5,r7 bt/s .L2 mov #0,r3 mova .L11,r0 mov.b @(r0,r2),r1 braf r1 nop .L13: .align 2 .L11: .byte .L6-.L13 .byte .L9-.L13 .byte .L8-.L13 .byte .L7-.L13 .align 5 .L6: mov.b @r4+,r1 mov #24,r2 add #-1,r7 shld r2,r1 xor r1,r3 .L7: mov.b @r4+,r1 add #-1,r7 extu.b r1,r1 shll16 r1 xor r1,r3 .L8: mov.b @r4+,r1 add #-1,r7 extu.b r1,r1 shll8 r1 xor r1,r3 .L9: mov.b @r4+,r1 dt r7 extu.b r1,r1 bf/s .L6 xor r1,r3 .L2: mov r3,r0 mov r14,r15 rts mov.l @r15+,r14 .size cksum, .-cksum .global testpat .section .rodata .align 2 .type testpat, @object .size testpat, 46 testpat: .string "The quick brown fox jumped over the lazy dog." .text .align 1 .align 5 .global main .type main, @function main: mov.l r14,@-r15 mov #46,r5 mov.l .L16,r0 sts.l pr,@-r15 mov.l .L17,r4 jsr @r0 mov r15,r14 mov.l .L18,r1 cmp/eq r1,r0 bt .L15 mov.l .L19,r1 jsr @r1 nop .align 5 .L15: mov.l .L20,r1 jsr @r1 mov #0,r4 .L21: .align 2 .L16: .long cksum .L17: .long testpat .L18: .long 925902908 .L19: .long abort .L20: .long exit .size main, .-main .ident "GCC: (GNU) 3.3.2"