        radix dec
global__variables__bank0 equ 8
global__variables__bank1 equ 48
global__variables__bank2 equ 80
global__variables__bank3 equ 112
global__bit__variables__bank0 equ 24
global__bit__variables__bank1 equ 58
global__bit__variables__bank2 equ 88
global__bit__variables__bank3 equ 112
indf___register equ 0
pcl___register equ 2
c___byte equ 3
c___bit equ 0
z___byte equ 3
z___bit equ 2
        ; On 12-bit PIC's, RP0 is actually bit 5 in FSR (=4)
rp0___byte equ 4
rp0___bit equ 5
        ; On 12-bit PIC's, RP1 is actually bit 6 in FSR (=4)
rp1___byte equ 4
rp1___bit equ 6
        ; On 12-bit PIC's, PA0 is actually bit 5 in STATUS (=3)
pa0___byte equ 3
pa0___bit equ 5
fsr___register equ 4
        org 0
start:
        ; Use oscillator calibration value already in register W
        movwf 5
        ; Initialize TRIS registers
        movlw 200
        tris 6
        movlw 0
        tris 7
        ; Switch from register bank 0 to register bank 1
        bsf rp0___byte,rp0___bit
        ; Register bank is now 1
        ; Switch from code bank 0 to code bank 1 before possible transfer (goto)
        bsf pa0___byte,pa0___bit
        goto main
        ; comment #############################################################################
        ; comment {}
        ; comment {Copyright < c > 2000 - 2001 by Wayne C . Gramlich and Bill Benson}
        ; comment {All rights reserved .}
        ; comment {}
        ; comment {Permission to use , copy , modify , distribute , and sell this software}
        ; comment {for any purpose is hereby granted without fee provided that the above}
        ; comment {copyright notice and this permission are retained . The author makes}
        ; comment {no representations about the suitability of this software for any purpose .}
        ; comment {It is provided { as is } without express or implied warranty .}
        ; comment {}
        ; comment {This is the code that implements the Out10 RoboBrick . Basically}
        ; comment {it just waits for commands that come in at 2400 baud and responds}
        ; comment {to them . See}
        ; comment {}
        ; comment {http : / / web . gramlich . net / projects / robobricks / out10 / index . html}
        ; comment {}
        ; comment {for more details .}
        ; comment {}
        ; comment #############################################################################
        ;   processor pic16c505 cp = off wdte = on mclre = off fosc = intrc_no_clock  
        ; 4052=0xfd4 4095=0xfff
        __config 4052
configuration___address equ 4095
        ; comment {Define processor constants :}
        ;   constant clock_rate 4000000  
clock_rate equ 4000000
        ;   constant clocks_per_instruction 4  
clocks_per_instruction equ 4
        ;   constant instruction_rate clock_rate / clocks_per_instruction  
instruction_rate equ 1000000
        ; comment {Define serial communication control constants :}
        ;   constant baud_rate 2400  
baud_rate equ 2400
        ;   constant instructions_per_bit instruction_rate / baud_rate  
instructions_per_bit equ 416
        ;   constant delays_per_bit 3  
delays_per_bit equ 3
        ;   constant instructions_per_delay instructions_per_bit / delays_per_bit  
instructions_per_delay equ 138
        ; comment {Register definitions :}
        ; comment {Status register :}
status equ 3
        ;   bind c status @ 0  
c equ status+0
c__byte equ status+0
c__bit equ 0
        ;   bind z status @ 2  
z equ status+0
z__byte equ status+0
z__bit equ 2
        ; comment {OSCCAL register :}
osccal equ 5
        ;   constant osccal_lsb 4  
osccal_lsb equ 4
        ; comment {Define pin assignments and directions :}
portb equ 6
portc equ 7
led9__byte equ 6
led9__bit equ 0
led8__byte equ 6
led8__bit equ 1
led7__byte equ 7
led7__bit equ 0
led6__byte equ 7
led6__bit equ 1
led5__byte equ 7
led5__bit equ 2
led4__byte equ 7
led4__bit equ 3
led3__byte equ 7
led3__bit equ 4
led2__byte equ 7
led2__bit equ 5
led1__byte equ 6
led1__bit equ 4
led0__byte equ 6
led0__bit equ 5
serial_out__byte equ 6
serial_out__bit equ 2
serial_in__byte equ 6
serial_in__bit equ 3
        ; string_constants Start
        ; Switch from register bank 1 to register bank 0
        bcf rp0___byte,rp0___bit
        ; Register bank is now 0
        ; Switch from code bank 1 to code bank 0 before possible transfer (label)
        bcf pa0___byte,pa0___bit
string___fetch:
        movwf pcl___register
        ;   id = 1 , 0 , 13 , 0 , 0 , 0 , 0 , 0 , 0r'16' , 6 , 0s'Out10A' , 15 , 0s'Gramlich&Benson'  
id___string equ 0
id:
        addwf pcl___register,f
        ; Length = 47
        retlw 47
        ; 1
        retlw 1
        ; 0
        retlw 0
        ; 13
        retlw 13
        ; 0
        retlw 0
        ; 0
        retlw 0
        ; 0
        retlw 0
        ; 0
        retlw 0
        ; 0
        retlw 0
        ; 0r'16'
        retlw 140 ; random number
        retlw 90 ; random number
        retlw 117 ; random number
        retlw 58 ; random number
        retlw 145 ; random number
        retlw 119 ; random number
        retlw 6 ; random number
        retlw 240 ; random number
        retlw 24 ; random number
        retlw 155 ; random number
        retlw 252 ; random number
        retlw 40 ; random number
        retlw 34 ; random number
        retlw 143 ; random number
        retlw 168 ; random number
        retlw 107 ; random number
        ; 6
        retlw 6
        ; `Out10A'
        retlw 79
        retlw 117
        retlw 116
        retlw 49
        retlw 48
        retlw 65
        ; 15
        retlw 15
        ; `Gramlich&Benson'
        retlw 71
        retlw 114
        retlw 97
        retlw 109
        retlw 108
        retlw 105
        retlw 99
        retlw 104
        retlw 38
        retlw 66
        retlw 101
        retlw 110
        retlw 115
        retlw 111
        retlw 110
        ;   bit_to_mask = 0xff , 0x40 , 0x20 , 0x10 , 8 , 4 , 2 , 1  
bit_to_mask___string equ 49
bit_to_mask:
        addwf pcl___register,f
        ; Length = 8
        retlw 8
        ; 0xff
        retlw 255
        ; 0x40
        retlw 64
        ; 0x20
        retlw 32
        ; 0x10
        retlw 16
        ; 8
        retlw 8
        ; 4
        retlw 4
        ; 2
        retlw 2
        ; 1
        retlw 1
        ; string__constants End
        ;   constant leds_count 10  
leds_count equ 10
        ;   bank 0  
        ; Default register bank is now 0
leds_mask_low equ global__variables__bank0+0
leds_mask_high equ global__variables__bank0+1
blink_masks equ global__variables__bank0+2
        ; comment {Note that the 12 - bit PIC ' s only have a 2 - level deep stack .}
        ; comment {The code starts in the main procedure < located at the end of this code >}
        ; comment {The next level of procedure call is either get_byte or send_byte .}
        ; comment {Lastly , the lowest level of procedure call is delay . It all fits ,}
        ; comment {but just barely .}
        ;   bank 2  
        ; Default register bank is now 2

        ; procedure mask_to_bit start
mask_to_bit:
        ; Procedure must be called with RP0, RP1, and IRP set to register bank 2
        ; Procedure must be called with PCLATH set to code bank 0
mask_to_bit__variables__base equ global__variables__bank2+0
mask_to_bit__bytes__base equ mask_to_bit__variables__base+0
mask_to_bit__bits__base equ mask_to_bit__variables__base+3
mask_to_bit__total__bytes equ 3
mask_to_bit__mask equ mask_to_bit__bytes__base+0
mask_to_bit__0return__byte equ mask_to_bit__bytes__base+1
mask_to_bit__bit equ mask_to_bit__bytes__base+2
        ; if { mask = 0xff } start
        incf mask_to_bit__mask,w
        ; expression=`{ mask = 0xff }' exp_delay=1 true_delay=3  false_delay=0 true_size=3 false_size=0
        btfss z___byte,z___bit
        goto label89__0end
        ; if { mask = 0xff } body start
        ;   return 7  
        movlw 7
        movwf mask_to_bit__0return__byte
        retlw 0
        ; if { mask = 0xff } body end
label89__0end:
        ; if exp=` mask = 0xff ' empty false
        ; Other expression=`{ mask = 0xff }' delay=-1
        ; if { mask = 0xff } end
        ;   bit := 0  
        clrf mask_to_bit__bit
        ;   mask := mask | 0x80  
        movlw 128
        iorwf mask_to_bit__mask,f
        ; `while  ! {{ mask @ 0 }}  ...' start
mask_to_bit__94while__continue:
        ; Alias variable for select mask @ 0
mask_to_bit__mask__94select0 equ mask_to_bit__mask+0
mask_to_bit__mask__94select0__byte equ mask_to_bit__mask+0
mask_to_bit__mask__94select0__bit equ 0
        ; expression=`{{ mask @ 0 }}' exp_delay=0 true_delay=2  false_delay=5 true_size=1 false_size=4
        btfsc mask_to_bit__mask__94select0__byte,mask_to_bit__mask__94select0__bit
        goto mask_to_bit__94while__break
        ;   mask := mask >> 1  
        bcf c___byte,c___bit
        rrf mask_to_bit__mask,f
        ;   bit := bit + 1  
        incf mask_to_bit__bit,f
        goto mask_to_bit__94while__continue
        ; if exp=` mask @ 0 ' true goto
        ; Other expression=`{{ mask @ 0 }}' delay=-1
mask_to_bit__94while__break:
        ; `while  ! {{ mask @ 0 }}  ...' end
        ;   return bit  
        movf mask_to_bit__bit,w
        movwf mask_to_bit__0return__byte
        retlw 0
        ; procedure mask_to_bit end

        ; procedure get_byte start
get_byte:
        ; Procedure must be called with RP0, RP1, and IRP set to register bank 2
        ; Procedure must be called with PCLATH set to code bank 0
get_byte__variables__base equ global__variables__bank2+3
get_byte__bytes__base equ get_byte__variables__base+0
get_byte__bits__base equ get_byte__variables__base+3
get_byte__total__bytes equ 3
        ;   arguments_none  
get_byte__0return__byte equ get_byte__bytes__base+0
        ; This procedure will wait for a byte to be received from
        ; serial_in_bit . It calls the delay procedure for all delays .
get_byte__count equ get_byte__bytes__base+1
get_byte__char equ get_byte__bytes__base+2
        ; Why does the delay procedure wait for a third of bit ? Well , it
        ; has to do with the loop immediately below . If we catch the
        ; start bit at the beginning of a 1 / 3 bit time , we will be
        ; sampling data at approximately 1 / 3 of the way into each bit .
        ; Conversely , if we catch the start near the end of a 1 / 3 bit
        ; bit time , we will be sampling data at approximately 2 / 3 of the
        ; way into each bit . So , what this means is that our bit sample
        ; times will be somewhere between 1 / 3 and 2 / 3 of bit < i . e . in
        ; the middle of the bit .
        ; It would be nice to tweak the code to shorter delay times
        ; < 1 / 4 bit , 1 / 5 bit , etc . > but then it gets too hard to get
        ; the bookeeping done in the delay routine . A 12 - bit PIC
        ; running at 4 MHz <= 1 MIPS > , only has 138 instructions available
        ; for the delay routine when at 1 / 3 of bit .
        ; Wait for a start bit :
        ; `while serial_in ...' start
get_byte__128while__continue:
        ; expression=`serial_in' exp_delay=0 true_delay=1  false_delay=2 true_size=2 false_size=1
        btfss serial_in__byte,serial_in__bit
        goto get_byte__128while__break
        ;   call delay {{ }}  
        ; Switch from register bank 2 to register bank 0
        bcf rp1___byte,rp1___bit
        ; Register bank is now 0
        call delay
        ; Switch from register bank 0 to register bank 2
        bsf rp1___byte,rp1___bit
        ; Register bank is now 2
        goto get_byte__128while__continue
        ; if exp=`serial_in' false goto
        ; Other expression=`serial_in' delay=-1
get_byte__128while__break:
        ; `while serial_in ...' end
        ; Skip over start bit :
        ;   call delay {{ }}  
        ; Switch from register bank 2 to register bank 0
        bcf rp1___byte,rp1___bit
        ; Register bank is now 0
        call delay
        ;   call delay {{ }}  
        call delay
        ;   call delay {{ }}  
        call delay
        ; Sample in the middle third of each data bit :
        ;   char := 0  
        ; Switch from register bank 0 to register bank 2 (which contains get_byte__char)
        bsf rp1___byte,rp1___bit
        ; Register bank is now 2
        clrf get_byte__char
        ; `count_down count 8 ...' start
        movlw 8
        movwf get_byte__count
get_byte__139_loop:
        ;   call delay {{ }}  
        ; Switch from register bank 2 to register bank 0
        bcf rp1___byte,rp1___bit
        ; Register bank is now 0
        call delay
        ;   char := char >> 1  
        bcf c___byte,c___bit
        ; Switch from register bank 0 to register bank 2 (which contains get_byte__char)
        bsf rp1___byte,rp1___bit
        ; Register bank is now 2
        rrf get_byte__char,f
        ; if { serial_in } start
        ; expression=`{ serial_in }' exp_delay=0 true_delay=2  false_delay=0 true_size=2 false_size=0
        btfss serial_in__byte,serial_in__bit
        goto label142__0end
        ; if { serial_in } body start
        ;   char := char | 0x80  
        movlw 128
        iorwf get_byte__char,f
        ; if { serial_in } body end
label142__0end:
        ; if exp=`serial_in' empty false
        ; Other expression=`{ serial_in }' delay=-1
        ; if { serial_in } end
        ;   call delay {{ }}  
        ; Switch from register bank 2 to register bank 0
        bcf rp1___byte,rp1___bit
        ; Register bank is now 0
        call delay
        ;   call delay {{ }}  
        call delay
        ; Switch from register bank 0 to register bank 2 (which contains get_byte__count)
        bsf rp1___byte,rp1___bit
        ; Register bank is now 2
        decfsz get_byte__count,f
        goto get_byte__139_loop
get_byte__139_done:
        ; `count_down count 8 ...' end
        ; Skip over 2 / 3 ' s of stop bit :
        ;   call delay {{ }}  
        ; Switch from register bank 2 to register bank 0
        bcf rp1___byte,rp1___bit
        ; Register bank is now 0
        call delay
        ;   call delay {{ }}  
        call delay
        ;   return char  
        ; Switch from register bank 0 to register bank 2 (which contains get_byte__char)
        bsf rp1___byte,rp1___bit
        ; Register bank is now 2
        movf get_byte__char,w
        movwf get_byte__0return__byte
        retlw 0
        ; procedure get_byte end

        ; procedure send_byte start
send_byte:
        ; Procedure must be called with RP0, RP1, and IRP set to register bank 2
        ; Procedure must be called with PCLATH set to code bank 0
send_byte__variables__base equ global__variables__bank2+6
send_byte__bytes__base equ send_byte__variables__base+0
send_byte__bits__base equ send_byte__variables__base+2
send_byte__total__bytes equ 2
send_byte__char equ send_byte__bytes__base+0
        ; Send < char > to < tx > :
send_byte__count equ send_byte__bytes__base+1
        ; Send the start bit :
        ;   serial_out := 0  
        bcf serial_out__byte,serial_out__bit
        ;   call delay {{ }}  
        ; Switch from register bank 2 to register bank 0
        bcf rp1___byte,rp1___bit
        ; Register bank is now 0
        call delay
        ;   call delay {{ }}  
        call delay
        ;   call delay {{ }}  
        call delay
        ; Send the data :
        ; `count_down count 8 ...' start
        movlw 8
        ; Switch from register bank 0 to register bank 2 (which contains send_byte__count)
        bsf rp1___byte,rp1___bit
        ; Register bank is now 2
        movwf send_byte__count
send_byte__170_loop:
        ;   serial_out := char @ 0  
        ; Alias variable for select char @ 0
send_byte__char__171select0 equ send_byte__char+0
send_byte__char__171select0__byte equ send_byte__char+0
send_byte__char__171select0__bit equ 0
        btfss send_byte__char__171select0__byte,send_byte__char__171select0__bit
        bcf serial_out__byte,serial_out__bit
        btfsc send_byte__char__171select0__byte,send_byte__char__171select0__bit
        bsf serial_out__byte,serial_out__bit
        ;   char := char >> 1  
        bcf c___byte,c___bit
        rrf send_byte__char,f
        ;   call delay {{ }}  
        ; Switch from register bank 2 to register bank 0
        bcf rp1___byte,rp1___bit
        ; Register bank is now 0
        call delay
        ;   call delay {{ }}  
        call delay
        ;   call delay {{ }}  
        call delay
        ; Switch from register bank 0 to register bank 2 (which contains send_byte__count)
        bsf rp1___byte,rp1___bit
        ; Register bank is now 2
        decfsz send_byte__count,f
        goto send_byte__170_loop
send_byte__170_done:
        ; `count_down count 8 ...' end
        ; Send the stop bit :
        ;   serial_out := 1  
        bsf serial_out__byte,serial_out__bit
        ;   call delay {{ }}  
        ; Switch from register bank 2 to register bank 0
        bcf rp1___byte,rp1___bit
        ; Register bank is now 0
        call delay
        ;   call delay {{ }}  
        call delay
        ;   call delay {{ }}  
        call delay
        ; procedure send_byte end
        ; Switch from register bank 0 to register bank 2
        bsf rp1___byte,rp1___bit
        ; Register bank is now 2
        retlw 0
        ;   bank 0  
        ; Default register bank is now 0

        ; procedure delay start
        ; optimize 0
delay:
        ; Procedure must be called with RP0, RP1, and IRP set to register bank 0
        ; Procedure must be called with PCLATH set to code bank 0
delay__variables__base equ global__variables__bank0+12
delay__bytes__base equ delay__variables__base+0
delay__bits__base equ delay__variables__base+4
delay__total__bytes equ 4
delay__207byte2 equ delay__bytes__base+3
delay__187byte1 equ delay__bytes__base+3
        ;   arguments_none  
        ;   uniform_delay instructions_per_delay  
        ; Uniform delay remaining = 134 Accumulated Delay = 0
        ; Uniform delay remaining = 134 Accumulated Delay = 0
        ; This procedure delays 1 / 3 of a bit .
        ; Uniform delay remaining = 134 Accumulated Delay = 0
        ; Uniform delay remaining = 134 Accumulated Delay = 0
delay__blink equ delay__bytes__base+0
        ; Uniform delay remaining = 134 Accumulated Delay = 0
delay__high equ delay__bytes__base+1
        ; Uniform delay remaining = 134 Accumulated Delay = 0
delay__low equ delay__bytes__base+2
        ; Uniform delay remaining = 134 Accumulated Delay = 0
        ; Uniform delay remaining = 134 Accumulated Delay = 0
        ; This procedure is called 7200 times a second . We want to
        ; Uniform delay remaining = 134 Accumulated Delay = 0
        ; slow the fastest blink rate down to something more manageable ,
        ; Uniform delay remaining = 134 Accumulated Delay = 0
        ; like 4 times a second .
        ; Uniform delay remaining = 134 Accumulated Delay = 0
        ; Uniform delay remaining = 134 Accumulated Delay = 0
        ; Kick the dog :
        ; Uniform delay remaining = 134 Accumulated Delay = 0
        ;   watch_dog_reset  
        clrwdt
        ; Uniform delay remaining = 133 Accumulated Delay = 1
        ; Uniform delay remaining = 133 Accumulated Delay = 1
        ; Slow the blink rate down :
        ; Uniform delay remaining = 133 Accumulated Delay = 1
        ;   low := low + 1  
        incf delay__low,f
        ; Uniform delay remaining = 132 Accumulated Delay = 2
        ; if { z } start
        ; expression=`{ z }' exp_delay=0 true_delay=10  false_delay=0 true_size=13 false_size=0
        btfsc z__byte,z__bit
        goto label207__0true
label207__0false:
        ; Delay 9 cycles
        movlw 2
        movwf delay__207byte2
delay__207delay1:
        decfsz delay__207byte2,f
        goto delay__207delay1
        nop
        nop
        goto label207__0end
label207__0true:
        ; if { z } body start
        ; Uniform delay remaining = 132 Accumulated Delay = 0
        ;   high := high + 1  
        incf delay__high,f
        ; Uniform delay remaining = 131 Accumulated Delay = 1
        ; 7200 / 256 ~ = 28 ; for fastest blink rate :
        ; Uniform delay remaining = 131 Accumulated Delay = 1
        ; 28 / 7 = 4 = > 4 blinks a second , or
        ; Uniform delay remaining = 131 Accumulated Delay = 1
        ; 28 / 4 = 7 = > 7 blinks a second
        ; Uniform delay remaining = 131 Accumulated Delay = 1
        ; if { high > 2 } start
        movlw 3
        subwf delay__high,w
        ; expression=`{ high > 2 }' exp_delay=2 true_delay=4  false_delay=0 true_size=4 false_size=0
        btfsc c___byte,c___bit
        goto label212__0true
label212__0false:
        ; Delay 3 cycles
        nop
        nop
        nop
        goto label212__0end
label212__0true:
        ; if { high > 2 } body start
        ; Uniform delay remaining = 131 Accumulated Delay = 0
        ;   high := 0  
        clrf delay__high
        ; Uniform delay remaining = 130 Accumulated Delay = 1
        ;   blink := blink + 1  
        incf delay__blink,f
        ; Uniform delay remaining = 129 Accumulated Delay = 2
        ; Uniform delay remaining = 129 Accumulated Delay = 2
        ; We never let the blink mask go to all zeros because the way
        ; Uniform delay remaining = 129 Accumulated Delay = 2
        ; we indicate that an LED is to stay on always is that we set
        ; Uniform delay remaining = 129 Accumulated Delay = 2
        ; its blink mask to all one ' s . If the blink variable ever goes
        ; Uniform delay remaining = 129 Accumulated Delay = 2
        ; to all zeros , there would be a small glitch for LED ' s that
        ; Uniform delay remaining = 129 Accumulated Delay = 2
        ; are supposed to be always on . Hence we skip over a value of 0 .
        ; Uniform delay remaining = 129 Accumulated Delay = 2
        ; if { z } start
        ; expression=`{ z }' exp_delay=0 true_delay=1  false_delay=0 true_size=1 false_size=0
        btfsc z__byte,z__bit
        ; if { z } body start
        ; Uniform delay remaining = 129 Accumulated Delay = 0
        ;   blink := blink + 1  
        incf delay__blink,f
        ; Uniform delay remaining = 128 Accumulated Delay = 1
        ; Uniform delay remaining = 128 Accumulated Delay = 1
        ; if { z } body end
        ; if exp=`z' false skip delay=2
        ; Other expression=`{ z }' delay=2
        ; if { z } end
        ; Uniform delay remaining = 127 Accumulated Delay = 4
        ; Uniform delay remaining = 127 Accumulated Delay = 4
        ; if { high > 2 } body end
        ; if exp=` high > 2 ' total delay=9
        ; if exp=` high > 2 ' generic
label212__0end:
        ; Other expression=`{ high > 2 }' delay=9
        ; if { high > 2 } end
        ; Uniform delay remaining = 122 Accumulated Delay = 10
        ; Uniform delay remaining = 122 Accumulated Delay = 10
        ; if { z } body end
        ; if exp=`z' total delay=13
        ; if exp=`z' generic
label207__0end:
        ; Other expression=`{ z }' delay=13
        ; if { z } end
        ; Uniform delay remaining = 119 Accumulated Delay = 15
        ; Uniform delay remaining = 119 Accumulated Delay = 15
        ; if { leds_mask_low @ 0 } start
        ; Alias variable for select leds_mask_low @ 0
leds_mask_low__227select0 equ leds_mask_low+0
leds_mask_low__227select0__byte equ leds_mask_low+0
leds_mask_low__227select0__bit equ 0
        ; expression=`{ leds_mask_low @ 0 }' exp_delay=0 true_delay=5  false_delay=0 true_size=5 false_size=0
        btfsc leds_mask_low__227select0__byte,leds_mask_low__227select0__bit
        goto label227__1true
label227__1false:
        ; else body start
        ; Uniform delay remaining = 119 Accumulated Delay = 0
        ;   led0 := 1  
        ; 1 instructions found for sharing
        ; Uniform delay remaining = 118 Accumulated Delay = 1
        ; else body end
        ; Delay 4 cycles
        nop
        nop
        nop
        nop
        goto label227__1end
label227__1true:
        ; if { leds_mask_low @ 0 } body start
        ; Uniform delay remaining = 119 Accumulated Delay = 0
        ; led0 := 0
        ; Uniform delay remaining = 119 Accumulated Delay = 0
        ; if { blink & blink_masks ~~ {{ 0 }} != 0 } start
        movf blink_masks+0,w
        andwf delay__blink,w
        ; expression=`{ blink & blink_masks ~~ {{ 0 }} != 0 }' exp_delay=2 true_delay=1  false_delay=1 true_size=1 false_size=1
        btfss z___byte,z___bit
        ; if { blink & blink_masks ~~ {{ 0 }} != 0 } body start
        ; Uniform delay remaining = 119 Accumulated Delay = 0
        ;   led0 := 0  
        bcf led0__byte,led0__bit
        ; Uniform delay remaining = 118 Accumulated Delay = 1
        ; Uniform delay remaining = 118 Accumulated Delay = 1
        ; if { blink & blink_masks ~~ {{ 0 }} != 0 } body end
        btfsc z___byte,z___bit
        ; else body start
        ; Uniform delay remaining = 119 Accumulated Delay = 0
        ;   led0 := 1  
        ; 1 instructions found for sharing
        ; Uniform delay remaining = 118 Accumulated Delay = 1
        ; else body end
        ; if exp=` blink & blink_masks ~~ {{ 0 }} != 0 ' single true and false skip delay=6
        ; Other expression=`{ blink & blink_masks ~~ {{ 0 }} != 0 }' delay=6
        ; if { blink & blink_masks ~~ {{ 0 }} != 0 } end
        ; Uniform delay remaining = 113 Accumulated Delay = 6
        ; Uniform delay remaining = 113 Accumulated Delay = 6
        ; if { leds_mask_low @ 0 } body end
        ; if exp=` leds_mask_low @ 0 ' total delay=8
        ; if exp=` leds_mask_low @ 0 ' generic
label227__1end:
        ; Other expression=`{ leds_mask_low @ 0 }' delay=8
        ; 1 shared instructions follow
        bsf led0__byte,led0__bit
        ; if { leds_mask_low @ 0 } end
        ; Uniform delay remaining = 110 Accumulated Delay = 24
        ; Uniform delay remaining = 110 Accumulated Delay = 24
        ; if { leds_mask_low @ 1 } start
        ; Alias variable for select leds_mask_low @ 1
leds_mask_low__238select0 equ leds_mask_low+0
leds_mask_low__238select0__byte equ leds_mask_low+0
leds_mask_low__238select0__bit equ 1
        ; expression=`{ leds_mask_low @ 1 }' exp_delay=0 true_delay=5  false_delay=0 true_size=5 false_size=0
        btfsc leds_mask_low__238select0__byte,leds_mask_low__238select0__bit
        goto label238__1true
label238__1false:
        ; else body start
        ; Uniform delay remaining = 110 Accumulated Delay = 0
        ;   led1 := 1  
        ; 1 instructions found for sharing
        ; Uniform delay remaining = 109 Accumulated Delay = 1
        ; else body end
        ; Delay 4 cycles
        nop
        nop
        nop
        nop
        goto label238__1end
label238__1true:
        ; if { leds_mask_low @ 1 } body start
        ; Uniform delay remaining = 110 Accumulated Delay = 0
        ; if { blink & blink_masks ~~ {{ 1 }} != 0 } start
        movf blink_masks+1,w
        andwf delay__blink,w
        ; expression=`{ blink & blink_masks ~~ {{ 1 }} != 0 }' exp_delay=2 true_delay=1  false_delay=1 true_size=1 false_size=1
        btfss z___byte,z___bit
        ; if { blink & blink_masks ~~ {{ 1 }} != 0 } body start
        ; Uniform delay remaining = 110 Accumulated Delay = 0
        ;   led1 := 0  
        bcf led1__byte,led1__bit
        ; Uniform delay remaining = 109 Accumulated Delay = 1
        ; Uniform delay remaining = 109 Accumulated Delay = 1
        ; if { blink & blink_masks ~~ {{ 1 }} != 0 } body end
        btfsc z___byte,z___bit
        ; else body start
        ; Uniform delay remaining = 110 Accumulated Delay = 0
        ;   led1 := 1  
        ; 1 instructions found for sharing
        ; Uniform delay remaining = 109 Accumulated Delay = 1
        ; else body end
        ; if exp=` blink & blink_masks ~~ {{ 1 }} != 0 ' single true and false skip delay=6
        ; Other expression=`{ blink & blink_masks ~~ {{ 1 }} != 0 }' delay=6
        ; if { blink & blink_masks ~~ {{ 1 }} != 0 } end
        ; Uniform delay remaining = 104 Accumulated Delay = 6
        ; Uniform delay remaining = 104 Accumulated Delay = 6
        ; if { leds_mask_low @ 1 } body end
        ; if exp=` leds_mask_low @ 1 ' total delay=8
        ; if exp=` leds_mask_low @ 1 ' generic
label238__1end:
        ; Other expression=`{ leds_mask_low @ 1 }' delay=8
        ; 1 shared instructions follow
        bsf led1__byte,led1__bit
        ; if { leds_mask_low @ 1 } end
        ; Uniform delay remaining = 101 Accumulated Delay = 33
        ; Uniform delay remaining = 101 Accumulated Delay = 33
        ; if { leds_mask_low @ 2 } start
        ; Alias variable for select leds_mask_low @ 2
leds_mask_low__248select0 equ leds_mask_low+0
leds_mask_low__248select0__byte equ leds_mask_low+0
leds_mask_low__248select0__bit equ 2
        ; expression=`{ leds_mask_low @ 2 }' exp_delay=0 true_delay=5  false_delay=0 true_size=5 false_size=0
        btfsc leds_mask_low__248select0__byte,leds_mask_low__248select0__bit
        goto label248__1true
label248__1false:
        ; else body start
        ; Uniform delay remaining = 101 Accumulated Delay = 0
        ;   led2 := 1  
        ; 1 instructions found for sharing
        ; Uniform delay remaining = 100 Accumulated Delay = 1
        ; else body end
        ; Delay 4 cycles
        nop
        nop
        nop
        nop
        goto label248__1end
label248__1true:
        ; if { leds_mask_low @ 2 } body start
        ; Uniform delay remaining = 101 Accumulated Delay = 0
        ; if { blink & blink_masks ~~ {{ 2 }} != 0 } start
        movf blink_masks+2,w
        andwf delay__blink,w
        ; expression=`{ blink & blink_masks ~~ {{ 2 }} != 0 }' exp_delay=2 true_delay=1  false_delay=1 true_size=1 false_size=1
        btfss z___byte,z___bit
        ; if { blink & blink_masks ~~ {{ 2 }} != 0 } body start
        ; Uniform delay remaining = 101 Accumulated Delay = 0
        ;   led2 := 0  
        bcf led2__byte,led2__bit
        ; Uniform delay remaining = 100 Accumulated Delay = 1
        ; Uniform delay remaining = 100 Accumulated Delay = 1
        ; if { blink & blink_masks ~~ {{ 2 }} != 0 } body end
        btfsc z___byte,z___bit
        ; else body start
        ; Uniform delay remaining = 101 Accumulated Delay = 0
        ;   led2 := 1  
        ; 1 instructions found for sharing
        ; Uniform delay remaining = 100 Accumulated Delay = 1
        ; else body end
        ; if exp=` blink & blink_masks ~~ {{ 2 }} != 0 ' single true and false skip delay=6
        ; Other expression=`{ blink & blink_masks ~~ {{ 2 }} != 0 }' delay=6
        ; if { blink & blink_masks ~~ {{ 2 }} != 0 } end
        ; Uniform delay remaining = 95 Accumulated Delay = 6
        ; Uniform delay remaining = 95 Accumulated Delay = 6
        ; if { leds_mask_low @ 2 } body end
        ; if exp=` leds_mask_low @ 2 ' total delay=8
        ; if exp=` leds_mask_low @ 2 ' generic
label248__1end:
        ; Other expression=`{ leds_mask_low @ 2 }' delay=8
        ; 1 shared instructions follow
        bsf led2__byte,led2__bit
        ; if { leds_mask_low @ 2 } end
        ; Uniform delay remaining = 92 Accumulated Delay = 42
        ; Uniform delay remaining = 92 Accumulated Delay = 42
        ; if { leds_mask_low @ 3 } start
        ; Alias variable for select leds_mask_low @ 3
leds_mask_low__258select0 equ leds_mask_low+0
leds_mask_low__258select0__byte equ leds_mask_low+0
leds_mask_low__258select0__bit equ 3
        ; expression=`{ leds_mask_low @ 3 }' exp_delay=0 true_delay=5  false_delay=0 true_size=5 false_size=0
        btfsc leds_mask_low__258select0__byte,leds_mask_low__258select0__bit
        goto label258__1true
label258__1false:
        ; else body start
        ; Uniform delay remaining = 92 Accumulated Delay = 0
        ;   led3 := 1  
        ; 1 instructions found for sharing
        ; Uniform delay remaining = 91 Accumulated Delay = 1
        ; else body end
        ; Delay 4 cycles
        nop
        nop
        nop
        nop
        goto label258__1end
label258__1true:
        ; if { leds_mask_low @ 3 } body start
        ; Uniform delay remaining = 92 Accumulated Delay = 0
        ; if { blink & blink_masks ~~ {{ 3 }} != 0 } start
        movf blink_masks+3,w
        andwf delay__blink,w
        ; expression=`{ blink & blink_masks ~~ {{ 3 }} != 0 }' exp_delay=2 true_delay=1  false_delay=1 true_size=1 false_size=1
        btfss z___byte,z___bit
        ; if { blink & blink_masks ~~ {{ 3 }} != 0 } body start
        ; Uniform delay remaining = 92 Accumulated Delay = 0
        ;   led3 := 0  
        bcf led3__byte,led3__bit
        ; Uniform delay remaining = 91 Accumulated Delay = 1
        ; Uniform delay remaining = 91 Accumulated Delay = 1
        ; if { blink & blink_masks ~~ {{ 3 }} != 0 } body end
        btfsc z___byte,z___bit
        ; else body start
        ; Uniform delay remaining = 92 Accumulated Delay = 0
        ;   led3 := 1  
        ; 1 instructions found for sharing
        ; Uniform delay remaining = 91 Accumulated Delay = 1
        ; else body end
        ; if exp=` blink & blink_masks ~~ {{ 3 }} != 0 ' single true and false skip delay=6
        ; Other expression=`{ blink & blink_masks ~~ {{ 3 }} != 0 }' delay=6
        ; if { blink & blink_masks ~~ {{ 3 }} != 0 } end
        ; Uniform delay remaining = 86 Accumulated Delay = 6
        ; Uniform delay remaining = 86 Accumulated Delay = 6
        ; if { leds_mask_low @ 3 } body end
        ; if exp=` leds_mask_low @ 3 ' total delay=8
        ; if exp=` leds_mask_low @ 3 ' generic
label258__1end:
        ; Other expression=`{ leds_mask_low @ 3 }' delay=8
        ; 1 shared instructions follow
        bsf led3__byte,led3__bit
        ; if { leds_mask_low @ 3 } end
        ; Uniform delay remaining = 83 Accumulated Delay = 51
        ; Uniform delay remaining = 83 Accumulated Delay = 51
        ; if { leds_mask_low @ 4 } start
        ; Alias variable for select leds_mask_low @ 4
leds_mask_low__268select0 equ leds_mask_low+0
leds_mask_low__268select0__byte equ leds_mask_low+0
leds_mask_low__268select0__bit equ 4
        ; expression=`{ leds_mask_low @ 4 }' exp_delay=0 true_delay=5  false_delay=0 true_size=5 false_size=0
        btfsc leds_mask_low__268select0__byte,leds_mask_low__268select0__bit
        goto label268__1true
label268__1false:
        ; else body start
        ; Uniform delay remaining = 83 Accumulated Delay = 0
        ;   led4 := 1  
        ; 1 instructions found for sharing
        ; Uniform delay remaining = 82 Accumulated Delay = 1
        ; else body end
        ; Delay 4 cycles
        nop
        nop
        nop
        nop
        goto label268__1end
label268__1true:
        ; if { leds_mask_low @ 4 } body start
        ; Uniform delay remaining = 83 Accumulated Delay = 0
        ; if { blink & blink_masks ~~ {{ 4 }} != 0 } start
        movf blink_masks+4,w
        andwf delay__blink,w
        ; expression=`{ blink & blink_masks ~~ {{ 4 }} != 0 }' exp_delay=2 true_delay=1  false_delay=1 true_size=1 false_size=1
        btfss z___byte,z___bit
        ; if { blink & blink_masks ~~ {{ 4 }} != 0 } body start
        ; Uniform delay remaining = 83 Accumulated Delay = 0
        ;   led4 := 0  
        bcf led4__byte,led4__bit
        ; Uniform delay remaining = 82 Accumulated Delay = 1
        ; Uniform delay remaining = 82 Accumulated Delay = 1
        ; if { blink & blink_masks ~~ {{ 4 }} != 0 } body end
        btfsc z___byte,z___bit
        ; else body start
        ; Uniform delay remaining = 83 Accumulated Delay = 0
        ;   led4 := 1  
        ; 1 instructions found for sharing
        ; Uniform delay remaining = 82 Accumulated Delay = 1
        ; else body end
        ; if exp=` blink & blink_masks ~~ {{ 4 }} != 0 ' single true and false skip delay=6
        ; Other expression=`{ blink & blink_masks ~~ {{ 4 }} != 0 }' delay=6
        ; if { blink & blink_masks ~~ {{ 4 }} != 0 } end
        ; Uniform delay remaining = 77 Accumulated Delay = 6
        ; Uniform delay remaining = 77 Accumulated Delay = 6
        ; if { leds_mask_low @ 4 } body end
        ; if exp=` leds_mask_low @ 4 ' total delay=8
        ; if exp=` leds_mask_low @ 4 ' generic
label268__1end:
        ; Other expression=`{ leds_mask_low @ 4 }' delay=8
        ; 1 shared instructions follow
        bsf led4__byte,led4__bit
        ; if { leds_mask_low @ 4 } end
        ; Uniform delay remaining = 74 Accumulated Delay = 60
        ; Uniform delay remaining = 74 Accumulated Delay = 60
        ; if { leds_mask_high @ 0 } start
        ; Alias variable for select leds_mask_high @ 0
leds_mask_high__278select0 equ leds_mask_high+0
leds_mask_high__278select0__byte equ leds_mask_high+0
leds_mask_high__278select0__bit equ 0
        ; expression=`{ leds_mask_high @ 0 }' exp_delay=0 true_delay=5  false_delay=0 true_size=5 false_size=0
        btfsc leds_mask_high__278select0__byte,leds_mask_high__278select0__bit
        goto label278__1true
label278__1false:
        ; else body start
        ; Uniform delay remaining = 74 Accumulated Delay = 0
        ;   led5 := 1  
        ; 1 instructions found for sharing
        ; Uniform delay remaining = 73 Accumulated Delay = 1
        ; else body end
        ; Delay 4 cycles
        nop
        nop
        nop
        nop
        goto label278__1end
label278__1true:
        ; if { leds_mask_high @ 0 } body start
        ; Uniform delay remaining = 74 Accumulated Delay = 0
        ; if { blink & blink_masks ~~ {{ 5 }} != 0 } start
        movf blink_masks+5,w
        andwf delay__blink,w
        ; expression=`{ blink & blink_masks ~~ {{ 5 }} != 0 }' exp_delay=2 true_delay=1  false_delay=1 true_size=1 false_size=1
        btfss z___byte,z___bit
        ; if { blink & blink_masks ~~ {{ 5 }} != 0 } body start
        ; Uniform delay remaining = 74 Accumulated Delay = 0
        ;   led5 := 0  
        bcf led5__byte,led5__bit
        ; Uniform delay remaining = 73 Accumulated Delay = 1
        ; Uniform delay remaining = 73 Accumulated Delay = 1
        ; if { blink & blink_masks ~~ {{ 5 }} != 0 } body end
        btfsc z___byte,z___bit
        ; else body start
        ; Uniform delay remaining = 74 Accumulated Delay = 0
        ;   led5 := 1  
        ; 1 instructions found for sharing
        ; Uniform delay remaining = 73 Accumulated Delay = 1
        ; else body end
        ; if exp=` blink & blink_masks ~~ {{ 5 }} != 0 ' single true and false skip delay=6
        ; Other expression=`{ blink & blink_masks ~~ {{ 5 }} != 0 }' delay=6
        ; if { blink & blink_masks ~~ {{ 5 }} != 0 } end
        ; Uniform delay remaining = 68 Accumulated Delay = 6
        ; Uniform delay remaining = 68 Accumulated Delay = 6
        ; if { leds_mask_high @ 0 } body end
        ; if exp=` leds_mask_high @ 0 ' total delay=8
        ; if exp=` leds_mask_high @ 0 ' generic
label278__1end:
        ; Other expression=`{ leds_mask_high @ 0 }' delay=8
        ; 1 shared instructions follow
        bsf led5__byte,led5__bit
        ; if { leds_mask_high @ 0 } end
        ; Uniform delay remaining = 65 Accumulated Delay = 69
        ; Uniform delay remaining = 65 Accumulated Delay = 69
        ; if { leds_mask_high @ 1 } start
        ; Alias variable for select leds_mask_high @ 1
leds_mask_high__288select0 equ leds_mask_high+0
leds_mask_high__288select0__byte equ leds_mask_high+0
leds_mask_high__288select0__bit equ 1
        ; expression=`{ leds_mask_high @ 1 }' exp_delay=0 true_delay=5  false_delay=0 true_size=5 false_size=0
        btfsc leds_mask_high__288select0__byte,leds_mask_high__288select0__bit
        goto label288__1true
label288__1false:
        ; else body start
        ; Uniform delay remaining = 65 Accumulated Delay = 0
        ;   led6 := 1  
        ; 1 instructions found for sharing
        ; Uniform delay remaining = 64 Accumulated Delay = 1
        ; else body end
        ; Delay 4 cycles
        nop
        nop
        nop
        nop
        goto label288__1end
label288__1true:
        ; if { leds_mask_high @ 1 } body start
        ; Uniform delay remaining = 65 Accumulated Delay = 0
        ; if { blink & blink_masks ~~ {{ 6 }} != 0 } start
        movf blink_masks+6,w
        andwf delay__blink,w
        ; expression=`{ blink & blink_masks ~~ {{ 6 }} != 0 }' exp_delay=2 true_delay=1  false_delay=1 true_size=1 false_size=1
        btfss z___byte,z___bit
        ; if { blink & blink_masks ~~ {{ 6 }} != 0 } body start
        ; Uniform delay remaining = 65 Accumulated Delay = 0
        ;   led6 := 0  
        bcf led6__byte,led6__bit
        ; Uniform delay remaining = 64 Accumulated Delay = 1
        ; Uniform delay remaining = 64 Accumulated Delay = 1
        ; if { blink & blink_masks ~~ {{ 6 }} != 0 } body end
        btfsc z___byte,z___bit
        ; else body start
        ; Uniform delay remaining = 65 Accumulated Delay = 0
        ;   led6 := 1  
        ; 1 instructions found for sharing
        ; Uniform delay remaining = 64 Accumulated Delay = 1
        ; else body end
        ; if exp=` blink & blink_masks ~~ {{ 6 }} != 0 ' single true and false skip delay=6
        ; Other expression=`{ blink & blink_masks ~~ {{ 6 }} != 0 }' delay=6
        ; if { blink & blink_masks ~~ {{ 6 }} != 0 } end
        ; Uniform delay remaining = 59 Accumulated Delay = 6
        ; Uniform delay remaining = 59 Accumulated Delay = 6
        ; if { leds_mask_high @ 1 } body end
        ; if exp=` leds_mask_high @ 1 ' total delay=8
        ; if exp=` leds_mask_high @ 1 ' generic
label288__1end:
        ; Other expression=`{ leds_mask_high @ 1 }' delay=8
        ; 1 shared instructions follow
        bsf led6__byte,led6__bit
        ; if { leds_mask_high @ 1 } end
        ; Uniform delay remaining = 56 Accumulated Delay = 78
        ; Uniform delay remaining = 56 Accumulated Delay = 78
        ; if { leds_mask_high @ 2 } start
        ; Alias variable for select leds_mask_high @ 2
leds_mask_high__298select0 equ leds_mask_high+0
leds_mask_high__298select0__byte equ leds_mask_high+0
leds_mask_high__298select0__bit equ 2
        ; expression=`{ leds_mask_high @ 2 }' exp_delay=0 true_delay=5  false_delay=0 true_size=5 false_size=0
        btfsc leds_mask_high__298select0__byte,leds_mask_high__298select0__bit
        goto label298__1true
label298__1false:
        ; else body start
        ; Uniform delay remaining = 56 Accumulated Delay = 0
        ;   led7 := 1  
        ; 1 instructions found for sharing
        ; Uniform delay remaining = 55 Accumulated Delay = 1
        ; else body end
        ; Delay 4 cycles
        nop
        nop
        nop
        nop
        goto label298__1end
label298__1true:
        ; if { leds_mask_high @ 2 } body start
        ; Uniform delay remaining = 56 Accumulated Delay = 0
        ; if { blink & blink_masks ~~ {{ 7 }} != 0 } start
        movf blink_masks+7,w
        andwf delay__blink,w
        ; expression=`{ blink & blink_masks ~~ {{ 7 }} != 0 }' exp_delay=2 true_delay=1  false_delay=1 true_size=1 false_size=1
        btfss z___byte,z___bit
        ; if { blink & blink_masks ~~ {{ 7 }} != 0 } body start
        ; Uniform delay remaining = 56 Accumulated Delay = 0
        ;   led7 := 0  
        bcf led7__byte,led7__bit
        ; Uniform delay remaining = 55 Accumulated Delay = 1
        ; Uniform delay remaining = 55 Accumulated Delay = 1
        ; if { blink & blink_masks ~~ {{ 7 }} != 0 } body end
        btfsc z___byte,z___bit
        ; else body start
        ; Uniform delay remaining = 56 Accumulated Delay = 0
        ;   led7 := 1  
        ; 1 instructions found for sharing
        ; Uniform delay remaining = 55 Accumulated Delay = 1
        ; else body end
        ; if exp=` blink & blink_masks ~~ {{ 7 }} != 0 ' single true and false skip delay=6
        ; Other expression=`{ blink & blink_masks ~~ {{ 7 }} != 0 }' delay=6
        ; if { blink & blink_masks ~~ {{ 7 }} != 0 } end
        ; Uniform delay remaining = 50 Accumulated Delay = 6
        ; Uniform delay remaining = 50 Accumulated Delay = 6
        ; if { leds_mask_high @ 2 } body end
        ; if exp=` leds_mask_high @ 2 ' total delay=8
        ; if exp=` leds_mask_high @ 2 ' generic
label298__1end:
        ; Other expression=`{ leds_mask_high @ 2 }' delay=8
        ; 1 shared instructions follow
        bsf led7__byte,led7__bit
        ; if { leds_mask_high @ 2 } end
        ; Uniform delay remaining = 47 Accumulated Delay = 87
        ; Uniform delay remaining = 47 Accumulated Delay = 87
        ; if { leds_mask_high @ 3 } start
        ; Alias variable for select leds_mask_high @ 3
leds_mask_high__308select0 equ leds_mask_high+0
leds_mask_high__308select0__byte equ leds_mask_high+0
leds_mask_high__308select0__bit equ 3
        ; expression=`{ leds_mask_high @ 3 }' exp_delay=0 true_delay=5  false_delay=0 true_size=5 false_size=0
        btfsc leds_mask_high__308select0__byte,leds_mask_high__308select0__bit
        goto label308__1true
label308__1false:
        ; else body start
        ; Uniform delay remaining = 47 Accumulated Delay = 0
        ;   led8 := 1  
        ; 1 instructions found for sharing
        ; Uniform delay remaining = 46 Accumulated Delay = 1
        ; else body end
        ; Delay 4 cycles
        nop
        nop
        nop
        nop
        goto label308__1end
label308__1true:
        ; if { leds_mask_high @ 3 } body start
        ; Uniform delay remaining = 47 Accumulated Delay = 0
        ; if { blink & blink_masks ~~ {{ 8 }} != 0 } start
        movf blink_masks+8,w
        andwf delay__blink,w
        ; expression=`{ blink & blink_masks ~~ {{ 8 }} != 0 }' exp_delay=2 true_delay=1  false_delay=1 true_size=1 false_size=1
        btfss z___byte,z___bit
        ; if { blink & blink_masks ~~ {{ 8 }} != 0 } body start
        ; Uniform delay remaining = 47 Accumulated Delay = 0
        ;   led8 := 0  
        bcf led8__byte,led8__bit
        ; Uniform delay remaining = 46 Accumulated Delay = 1
        ; Uniform delay remaining = 46 Accumulated Delay = 1
        ; if { blink & blink_masks ~~ {{ 8 }} != 0 } body end
        btfsc z___byte,z___bit
        ; else body start
        ; Uniform delay remaining = 47 Accumulated Delay = 0
        ;   led8 := 1  
        ; 1 instructions found for sharing
        ; Uniform delay remaining = 46 Accumulated Delay = 1
        ; else body end
        ; if exp=` blink & blink_masks ~~ {{ 8 }} != 0 ' single true and false skip delay=6
        ; Other expression=`{ blink & blink_masks ~~ {{ 8 }} != 0 }' delay=6
        ; if { blink & blink_masks ~~ {{ 8 }} != 0 } end
        ; Uniform delay remaining = 41 Accumulated Delay = 6
        ; Uniform delay remaining = 41 Accumulated Delay = 6
        ; if { leds_mask_high @ 3 } body end
        ; if exp=` leds_mask_high @ 3 ' total delay=8
        ; if exp=` leds_mask_high @ 3 ' generic
label308__1end:
        ; Other expression=`{ leds_mask_high @ 3 }' delay=8
        ; 1 shared instructions follow
        bsf led8__byte,led8__bit
        ; if { leds_mask_high @ 3 } end
        ; Uniform delay remaining = 38 Accumulated Delay = 96
        ; Uniform delay remaining = 38 Accumulated Delay = 96
        ; if { leds_mask_high @ 4 } start
        ; Alias variable for select leds_mask_high @ 4
leds_mask_high__318select0 equ leds_mask_high+0
leds_mask_high__318select0__byte equ leds_mask_high+0
leds_mask_high__318select0__bit equ 4
        ; expression=`{ leds_mask_high @ 4 }' exp_delay=0 true_delay=5  false_delay=0 true_size=5 false_size=0
        btfsc leds_mask_high__318select0__byte,leds_mask_high__318select0__bit
        goto label318__1true
label318__1false:
        ; else body start
        ; Uniform delay remaining = 38 Accumulated Delay = 0
        ;   led9 := 1  
        ; 1 instructions found for sharing
        ; Uniform delay remaining = 37 Accumulated Delay = 1
        ; else body end
        ; Delay 4 cycles
        nop
        nop
        nop
        nop
        goto label318__1end
label318__1true:
        ; if { leds_mask_high @ 4 } body start
        ; Uniform delay remaining = 38 Accumulated Delay = 0
        ; if { blink & blink_masks ~~ {{ 9 }} != 0 } start
        movf blink_masks+9,w
        andwf delay__blink,w
        ; expression=`{ blink & blink_masks ~~ {{ 9 }} != 0 }' exp_delay=2 true_delay=1  false_delay=1 true_size=1 false_size=1
        btfss z___byte,z___bit
        ; if { blink & blink_masks ~~ {{ 9 }} != 0 } body start
        ; Uniform delay remaining = 38 Accumulated Delay = 0
        ;   led9 := 0  
        bcf led9__byte,led9__bit
        ; Uniform delay remaining = 37 Accumulated Delay = 1
        ; Uniform delay remaining = 37 Accumulated Delay = 1
        ; if { blink & blink_masks ~~ {{ 9 }} != 0 } body end
        btfsc z___byte,z___bit
        ; else body start
        ; Uniform delay remaining = 38 Accumulated Delay = 0
        ;   led9 := 1  
        ; 1 instructions found for sharing
        ; Uniform delay remaining = 37 Accumulated Delay = 1
        ; else body end
        ; if exp=` blink & blink_masks ~~ {{ 9 }} != 0 ' single true and false skip delay=6
        ; Other expression=`{ blink & blink_masks ~~ {{ 9 }} != 0 }' delay=6
        ; if { blink & blink_masks ~~ {{ 9 }} != 0 } end
        ; Uniform delay remaining = 32 Accumulated Delay = 6
        ; Uniform delay remaining = 32 Accumulated Delay = 6
        ; if { leds_mask_high @ 4 } body end
        ; if exp=` leds_mask_high @ 4 ' total delay=8
        ; if exp=` leds_mask_high @ 4 ' generic
label318__1end:
        ; Other expression=`{ leds_mask_high @ 4 }' delay=8
        ; 1 shared instructions follow
        bsf led9__byte,led9__bit
        ; if { leds_mask_high @ 4 } end
        ; Uniform delay remaining = 29 Accumulated Delay = 105
        ; Uniform delay remaining = 29 Accumulated Delay = 105
        ; Soak up remaining 29 cycles
        ; Delay 29 cycles
        movlw 9
        movwf delay__187byte1
delay__187delay0:
        decfsz delay__187byte1,f
        goto delay__187delay0
        nop
        ; procedure delay end
        retlw 0
        ; optimize 1
        ;   origin 0x200  
        org 512
        ;   bank 1  
        ; Default register bank is now 1
        ; comment {The main procedure is loaded with switch statements . On the 12 - bit}
        ; comment {PIC ' s , switch statements have to live in the first 256 bytes of}
        ; comment {each code bank . For this reason , we shove main into code bank 1 .}
        ; comment {If we , try to put main in code bank 0 , it pushes the first bytes}
        ; comment {of several routines out of the first 256 bytes , which is also a}
        ; comment {no - no of the 12 - bit PIC ' s .}

        ; procedure main start
switch__399block_start:
        addwf pcl___register,f
        goto switch__399block400
        goto switch__399block404
        goto switch__399block408
        goto switch__399block412
switch__399block_end:
        ; switch_check 399 switch__399block_start switch__399block_end
switch__437block_start:
        addwf pcl___register,f
        goto switch__437block438
        goto switch__437block443
        goto switch__437block448
        goto switch__437block453
switch__437block_end:
        ; switch_check 437 switch__437block_start switch__437block_end
switch__434block_start:
        addwf pcl___register,f
        goto switch__434block435
        goto switch__434default464
        goto switch__434default464
        goto switch__434default464
switch__434block_end:
        ; switch_check 434 switch__434block_start switch__434block_end
switch__431block_start:
        addwf pcl___register,f
        goto switch__431block432
        goto switch__431block469
        goto switch__431block493
        goto switch__431block517
switch__431block_end:
        ; switch_check 431 switch__431block_start switch__431block_end
switch__527block_start:
        addwf pcl___register,f
        goto switch__527block528
        goto switch__527block532
        goto switch__527block536
        goto switch__527block540
        goto switch__527block544
        goto switch__527block552
        goto switch__527block557
        goto switch__527block562
switch__527block_end:
        ; switch_check 527 switch__527block_start switch__527block_end
switch__369block_start:
        addwf pcl___register,f
        goto switch__369block371
        goto switch__369block382
        goto switch__369block429
        goto switch__369block523
switch__369block_end:
        ; switch_check 369 switch__369block_start switch__369block_end
main:
        ; Procedure must be called with RP0, RP1, and IRP set to register bank 1
        ; Procedure must be called with PCLATH set to code bank 0
main__variables__base equ global__variables__bank1+0
main__bytes__base equ main__variables__base+0
main__bits__base equ main__variables__base+10
main__total__bytes equ 10
main__525byte1 equ main__bytes__base+8
main__513byte0 equ main__bytes__base+8
main__354byte1 equ main__bytes__base+8
main__525byte2 equ main__bytes__base+8
main__460byte0 equ main__bytes__base+8
main__369byte0 equ main__bytes__base+8
main__502byte0 equ main__bytes__base+8
main__460byte1 equ main__bytes__base+8
main__434byte0 equ main__bytes__base+8
main__460byte2 equ main__bytes__base+8
main__354byte0 equ main__bytes__base+9
        ;   arguments_none  
main__ledx equ main__bytes__base+0
main__command equ main__bytes__base+1
main__data equ main__bytes__base+2
main__glitch equ main__bytes__base+3
main__index equ main__bytes__base+4
main__mask equ main__bytes__base+5
main__rate equ main__bytes__base+6
main__result equ main__bytes__base+7
        ; Initialize blink_masks :
        ; `count_down index leds_count ...' start
        movlw 10
        movwf main__index
main__353_loop:
        ;   blink_masks ~~ {{ index - 1 }} := 0xff  
        movlw 255
        movwf main__354byte0
        decf main__index,w
        movwf main__354byte1
        movlw LOW blink_masks
        addwf main__354byte1,
        movwf fsr___register
        ; FSR now points to reg bank 0 (which contains 10[])
        ; Switch from register bank 0 to register bank 1 (which contains main__354byte0)
        bsf rp0___byte,rp0___bit
        ; Register bank is now 1
        movf main__354byte0,w
        bcf irp___register,irp___bit
        ; Switch from register bank 1 to register bank 0 (which contains blink_masks)
        bcf rp0___byte,rp0___bit
        ; Register bank is now 0
        ; FSR must point to reg bank 0 (which contains 10[10]) before using INDF reg
        movwf indf___register
        ; Switch from register bank 0 to register bank 1 (which contains main__index)
        bsf rp0___byte,rp0___bit
        ; Register bank is now 1
        decfsz main__index,f
        goto main__353_loop
main__353_done:
        ; `count_down index leds_count ...' end
        ; Initialize remaining registers :
        ;   glitch := 0  
        clrf main__glitch
        ;   index := 0  
        clrf main__index
        ;   leds_mask_low := 0  
        clrf leds_mask_low
        ;   leds_mask_high := 0  
        clrf leds_mask_high
        ; Process commands :
        ; loop_forever ... start
main__364loop__forever:
        ; Wait for command :
        ;   command := get_byte {{ }}  
        ; Switch from register bank 1 to register bank 2
        bcf rp0___byte,rp0___bit
        bsf rp1___byte,rp1___bit
        ; Register bank is now 2
        ; Switch from code bank 1 to code bank 0 before possible transfer (call)
        bcf pa0___byte,pa0___bit
        call get_byte
        movf get_byte__0return__byte,w
        ; Switch from register bank 2 to register bank 1 (which contains main__command)
        bsf rp0___byte,rp0___bit
        bcf rp1___byte,rp1___bit
        ; Register bank is now 1
        movwf main__command
        ; Dispatch on command :
        ; switch { command >> 6 }
        swapf main__command,w
        movwf main__369byte0
        rrf main__369byte0,f
        rrf main__369byte0,w
        andlw 3
        ;   # xx = 00 : write upper and write lower commands  
        ; case 0
        ;   # xx = 01 : Bit operations - clear , set , toggle & read  
        ; case 1
        ; case 2
        ; case 3
        ; Switch from code bank 0 to code bank 1 before possible transfer (goto)
        bsf pa0___byte,pa0___bit
        goto switch__369block_start
switch__369block371:
        ; < Command = 00 xx xxxx > :
        ; if { command @ 5 } start
        ; Alias variable for select command @ 5
main__command__373select0 equ main__command+0
main__command__373select0__byte equ main__command+0
main__command__373select0__bit equ 5
        ; expression=`{ command @ 5 }' exp_delay=0 true_delay=3  false_delay=2 true_size=3 false_size=2
        btfsc main__command__373select0__byte,main__command__373select0__bit
        goto label373__1true
label373__1false:
        ; else body start
        ; Write Lower < Command = 000 a bcde > :
        ;   leds_mask_low := command  
        movf main__command,w
        movwf leds_mask_low
        ; else body end
        goto label373__1end
label373__1true:
        ; if { command @ 5 } body start
        ; Write Upper < Command = 001 a bcde > :
        ;   leds_mask_high := command & 0x1f  
        movlw 31
        andwf main__command,w
        movwf leds_mask_high
        ; if { command @ 5 } body end
        ; if exp=` command @ 5 ' generic
label373__1end:
        ; Other expression=`{ command @ 5 }' delay=-1
        ; if { command @ 5 } end
        goto switch__369end
switch__369block382:
        ; Bit commands : < Command = 01 cc bbbb > :
        ;   ledx := command & 0xf  
        movlw 15
        andwf main__command,w
        movwf main__ledx
        ;   data := leds_mask_low  
        movf leds_mask_low,w
        movwf main__data
        ; if { ledx >= 5 } start
        movlw 5
        subwf main__ledx,w
        ; expression=`{ ledx >= 5 }' exp_delay=2 true_delay=4  false_delay=0 true_size=4 false_size=0
        btfss c___byte,c___bit
        goto label386__0end
        ; if { ledx >= 5 } body start
        ;   ledx := ledx - 5  
        movlw 251
        addwf main__ledx,f
        ;   data := leds_mask_high  
        movf leds_mask_high,w
        movwf main__data
        ; if { ledx >= 5 } body end
label386__0end:
        ; if exp=` ledx >= 5 ' empty false
        ; Other expression=`{ ledx >= 5 }' delay=-1
        ; if { ledx >= 5 } end
        ; Compute the mask :
        ;   mask := 1  
        movlw 1
        movwf main__mask
        ; `while  ledx != 0  ...' start
main__393while__continue:
        movf main__ledx,w
        ; expression=` ledx != 0 ' exp_delay=1 true_delay=5  false_delay=2 true_size=4 false_size=1
        btfsc z___byte,z___bit
        goto main__393while__break
        ;   mask := mask << 1  
        bcf c___byte,c___bit
        rlf main__mask,f
        ;   ledx := ledx - 1  
        decf main__ledx,f
        goto main__393while__continue
        ; if exp=` ledx != 0 ' false goto
        ; Other expression=` ledx != 0 ' delay=-1
main__393while__break:
        ; `while  ledx != 0  ...' end
        ;   ledx := command & 0xf  
        movlw 15
        andwf main__command,w
        movwf main__ledx
        ; switch { {{ command >> 4 }} & 3 }
        swapf main__command,w
        andlw 3
        ; case 0
        ; case 1
        ; case 2
        ; case 3
        goto switch__399block_start
switch__399block400:
        ; Bit Clear < Command = 0100 bbbb > :
        ;   data := data & {{ 0xff ^ mask }}  
        movlw 255
        xorwf main__mask,w
        andwf main__data,f
        goto switch__399end
switch__399block404:
        ; Bit Set < Command = 0100 bbbb > :
        ;   data := data | mask  
        movf main__mask,w
        iorwf main__data,f
        goto switch__399end
switch__399block408:
        ; Bit Toggle < Command = 0100 bbbb > :
        ;   data := data ^ mask  
        movf main__mask,w
        xorwf main__data,f
        goto switch__399end
switch__399block412:
        ; Bit Read < Command = 0100 bbbb > :
        ;   result := {{ mask_to_bit {{ blink_masks ~~ {{ ledx }} }} ^ 7 }} << 5  
        movlw LOW blink_masks
        addwf main__ledx,w
        movwf fsr___register
        ; FSR now points to reg bank 0 (which contains 10[10])
        bcf irp___register,irp___bit
        ; FSR must point to reg bank 0 (which contains 10[10]) before using INDF reg
        movf indf___register,w
        ; Switch from register bank 0 to register bank 2 (which contains mask_to_bit__mask)
        bsf rp1___byte,rp1___bit
        ; Register bank is now 2
        movwf mask_to_bit__mask
        ; Switch from code bank 1 to code bank 0 before possible transfer (call)
        bcf pa0___byte,pa0___bit
        call mask_to_bit
        movf mask_to_bit__0return__byte,w
        xorlw 7
        ; Switch from register bank 2 to register bank 1 (which contains main__result)
        bsf rp0___byte,rp0___bit
        bcf rp1___byte,rp1___bit
        ; Register bank is now 1
        movwf main__result
        swapf main__result,f
        rlf main__result,w
        andlw 224
        movwf main__result
        ; if { data & mask != 0 } start
        movf main__data,w
        andwf main__mask,w
        ; expression=`{ data & mask != 0 }' exp_delay=2 true_delay=1  false_delay=0 true_size=1 false_size=0
        ; Switch from code bank 0 to code bank 1 before possible transfer (btfss)
        bsf pa0___byte,pa0___bit
        btfss z___byte,z___bit
        ; if { data & mask != 0 } body start
        ;   result := result + 1  
        incf main__result,f
        ; if { data & mask != 0 } body end
        ; if exp=` data & mask != 0 ' false skip delay=4
        ; Other expression=`{ data & mask != 0 }' delay=4
        ; if { data & mask != 0 } end
        ;   call send_byte {{ result }}  
        movf main__result,w
        ; Switch from register bank 1 to register bank 2 (which contains send_byte__char)
        bcf rp0___byte,rp0___bit
        bsf rp1___byte,rp1___bit
        ; Register bank is now 2
        movwf send_byte__char
        ; Switch from code bank 1 to code bank 0 before possible transfer (call)
        bcf pa0___byte,pa0___bit
        call send_byte
        ; Switch from register bank 2 to register bank 1
        bsf rp0___byte,rp0___bit
        bcf rp1___byte,rp1___bit
        ; Register bank is now 1
        ; Switch from code bank 0 to code bank 1 before possible transfer (goto)
        bsf pa0___byte,pa0___bit
switch__399end:
        ; Stuff the data back :
        ; if { ledx < 5 } start
        movlw 5
        subwf main__ledx,w
        ; expression=`{ ledx < 5 }' exp_delay=2 true_delay=2  false_delay=2 true_size=2 false_size=2
        btfsc c___byte,c___bit
        goto label423__0false
label423__0true:
        ; if { ledx < 5 } body start
        ;   leds_mask_low := data  
        movf main__data,w
        movwf leds_mask_low
        ; if { ledx < 5 } body end
        goto label423__0end
label423__0false:
        ; else body start
        ;   leds_mask_high := data  
        movf main__data,w
        movwf leds_mask_high
        ; else body end
        ; if exp=` ledx < 5 ' generic
label423__0end:
        ; Other expression=`{ ledx < 5 }' delay=-1
        ; if { ledx < 5 } end
        goto switch__369end
switch__369block429:
        ; Do nothing < Command = 10 xx xxx > :
        ; switch { {{ command >> 4 }} & 3 }
        swapf main__command,w
        andlw 3
        ; case 0
        ; case 1
        ; case 2
        ; case 3
        goto switch__431block_start
switch__431block432:
        ; Command = 1000 xxxx :
        ; switch { {{ command >> 2 }} & 3 }
        rrf main__command,w
        movwf main__434byte0
        rrf main__434byte0,w
        andlw 3
        ; case 0
        goto switch__434block_start
switch__434block435:
        ; Command = 1000 00 xx :
        ; switch { command & 3 }
        movlw 3
        andwf main__command,w
        ; case 0
        ; case 1
        ;   # xx = 10 : read - all , lower , upper ; blink rate ; inc / dec leds ; pwr mode  
        ; case 2
        ;   # xx = 11 : shared commands  
        ; case 3
        goto switch__437block_start
switch__437block438:
        ; Read All < Command = 1000 0000 > :
        ;   call send_byte {{ leds_mask_high }}  
        movf leds_mask_high,w
        ; Switch from register bank 1 to register bank 2 (which contains send_byte__char)
        bcf rp0___byte,rp0___bit
        bsf rp1___byte,rp1___bit
        ; Register bank is now 2
        movwf send_byte__char
        ; Switch from code bank 1 to code bank 0 before possible transfer (call)
        bcf pa0___byte,pa0___bit
        call send_byte
        ;   call send_byte {{ leds_mask_low }}  
        movf leds_mask_low,w
        movwf send_byte__char
        call send_byte
        ; Switch from register bank 2 to register bank 1
        bsf rp0___byte,rp0___bit
        bcf rp1___byte,rp1___bit
        ; Register bank is now 1
        ; Switch from code bank 0 to code bank 1 before possible transfer (goto)
        bsf pa0___byte,pa0___bit
        goto switch__437end
switch__437block443:
        ; Read Lower < Command = 1000 0001 > :
        ;   call send_byte {{ leds_mask_low }}  
        movf leds_mask_low,w
        ; Switch from register bank 1 to register bank 2 (which contains send_byte__char)
        bcf rp0___byte,rp0___bit
        bsf rp1___byte,rp1___bit
        ; Register bank is now 2
        movwf send_byte__char
        ; Switch from code bank 1 to code bank 0 before possible transfer (call)
        bcf pa0___byte,pa0___bit
        call send_byte
        ; Switch from register bank 2 to register bank 1
        bsf rp0___byte,rp0___bit
        bcf rp1___byte,rp1___bit
        ; Register bank is now 1
        ; Switch from code bank 0 to code bank 1 before possible transfer (goto)
        bsf pa0___byte,pa0___bit
        goto switch__437end
switch__437block448:
        ; Read Upper < Command = 1000 0010 > :
        ;   call send_byte {{ leds_mask_high }}  
        movf leds_mask_high,w
        ; Switch from register bank 1 to register bank 2 (which contains send_byte__char)
        bcf rp0___byte,rp0___bit
        bsf rp1___byte,rp1___bit
        ; Register bank is now 2
        movwf send_byte__char
        ; Switch from code bank 1 to code bank 0 before possible transfer (call)
        bcf pa0___byte,pa0___bit
        call send_byte
        ; Switch from register bank 2 to register bank 1
        bsf rp0___byte,rp0___bit
        bcf rp1___byte,rp1___bit
        ; Register bank is now 1
        ; Switch from code bank 0 to code bank 1 before possible transfer (goto)
        bsf pa0___byte,pa0___bit
        goto switch__437end
switch__437block453:
        ; Blink Rate Set < Command = 1000 0011 > :
        ;   command := get_byte {{ }}  
        ; Switch from register bank 1 to register bank 2
        bcf rp0___byte,rp0___bit
        bsf rp1___byte,rp1___bit
        ; Register bank is now 2
        ; Switch from code bank 1 to code bank 0 before possible transfer (call)
        bcf pa0___byte,pa0___bit
        call get_byte
        movf get_byte__0return__byte,w
        ; Switch from register bank 2 to register bank 1 (which contains main__command)
        bsf rp0___byte,rp0___bit
        bcf rp1___byte,rp1___bit
        ; Register bank is now 1
        movwf main__command
        ;   ledx := command & 0xf  
        movlw 15
        andwf main__command,w
        movwf main__ledx
        ; if { ledx >= 10 } start
        movlw 10
        subwf main__ledx,w
        ; expression=`{ ledx >= 10 }' exp_delay=2 true_delay=1  false_delay=0 true_size=1 false_size=0
        ; Switch from code bank 0 to code bank 1 before possible transfer (btfsc)
        bsf pa0___byte,pa0___bit
        btfsc c___byte,c___bit
        ; if { ledx >= 10 } body start
        ;   ledx := 0  
        clrf main__ledx
        ; if { ledx >= 10 } body end
        ; if exp=` ledx >= 10 ' false skip delay=4
        ; Other expression=`{ ledx >= 10 }' delay=4
        ; if { ledx >= 10 } end
        ;   blink_masks ~~ {{ ledx }} := bit_to_mask ~~ {{ command >> 5 }}  
        swapf main__command,w
        movwf main__460byte1
        rrf main__460byte1,w
        andlw 7
        movwf main__460byte2
        incf main__460byte2,w
        ; Switch from register bank 1 to register bank 0
        bcf rp0___byte,rp0___bit
        ; Register bank is now 0
        ; Switch from code bank 1 to code bank 0 before possible transfer (call)
        bcf pa0___byte,pa0___bit
        call bit_to_mask
        ; Switch from register bank 0 to register bank 1 (which contains main__460byte0)
        bsf rp0___byte,rp0___bit
        ; Register bank is now 1
        movwf main__460byte0
        movlw LOW blink_masks
        addwf main__ledx,w
        movwf fsr___register
        ; FSR now points to reg bank 0 (which contains 10[])
        ; Switch from register bank 0 to register bank 1 (which contains main__460byte0)
        bsf rp0___byte,rp0___bit
        ; Register bank is now 1
        movf main__460byte0,w
        bcf irp___register,irp___bit
        ; Switch from register bank 1 to register bank 0 (which contains blink_masks)
        bcf rp0___byte,rp0___bit
        ; Register bank is now 0
        ; FSR must point to reg bank 0 (which contains 10[10]) before using INDF reg
        movwf indf___register
        ; Switch from register bank 0 to register bank 1
        bsf rp0___byte,rp0___bit
        ; Register bank is now 1
        ; Switch from code bank 0 to code bank 1 before possible transfer (goto)
        bsf pa0___byte,pa0___bit
switch__437end:
        goto switch__434end
switch__434default464:
        ; Do nothing :
switch__434end:
        goto switch__431end
switch__431block469:
        ; Increment LED ' s < Command = 1001 bbbb > :
        ;   ledx := command & 0xf  
        movlw 15
        andwf main__command,w
        movwf main__ledx
        ;   mask := 1  
        movlw 1
        movwf main__mask
        ; if { ledx < 5 } start
        movlw 5
        subwf main__ledx,w
        ; expression=`{ ledx < 5 }' exp_delay=2 true_delay=-1  false_delay=-1 true_size=14 false_size=11
        btfsc c___byte,c___bit
        goto label473__0false
label473__0true:
        ; if { ledx < 5 } body start
        ; `while  ledx != 0  ...' start
main__474while__continue:
        movf main__ledx,w
        ; expression=` ledx != 0 ' exp_delay=1 true_delay=5  false_delay=2 true_size=4 false_size=1
        btfsc z___byte,z___bit
        goto main__474while__break
        ;   mask := mask << 1  
        bcf c___byte,c___bit
        rlf main__mask,f
        ;   ledx := ledx - 1  
        decf main__ledx,f
        goto main__474while__continue
        ; if exp=` ledx != 0 ' false goto
        ; Other expression=` ledx != 0 ' delay=-1
main__474while__break:
        ; `while  ledx != 0  ...' end
        ;   leds_mask_low := leds_mask_low + mask  
        movf main__mask,w
        addwf leds_mask_low,f
        ; if { leds_mask_low @ 5 } start
        ; Alias variable for select leds_mask_low @ 5
leds_mask_low__479select0 equ leds_mask_low+0
leds_mask_low__479select0__byte equ leds_mask_low+0
leds_mask_low__479select0__bit equ 5
        ; expression=`{ leds_mask_low @ 5 }' exp_delay=0 true_delay=3  false_delay=0 true_size=3 false_size=0
        btfss leds_mask_low__479select0__byte,leds_mask_low__479select0__bit
        goto label479__1end
        ; if { leds_mask_low @ 5 } body start
        ;   leds_mask_low := leds_mask_low & 0x1f  
        movlw 31
        andwf leds_mask_low,f
        ;   leds_mask_high := leds_mask_high + 1  
        incf leds_mask_high,f
        ; if { leds_mask_low @ 5 } body end
label479__1end:
        ; if exp=` leds_mask_low @ 5 ' empty false
        ; Other expression=`{ leds_mask_low @ 5 }' delay=-1
        ; if { leds_mask_low @ 5 } end
        ; if { ledx < 5 } body end
        goto label473__0end
label473__0false:
        ; else body start
        ;   ledx := ledx - 5  
        movlw 251
        addwf main__ledx,f
        ; `while  ledx != 0  ...' start
main__485while__continue:
        movf main__ledx,w
        ; expression=` ledx != 0 ' exp_delay=1 true_delay=5  false_delay=2 true_size=4 false_size=1
        btfsc z___byte,z___bit
        goto main__485while__break
        ;   mask := mask << 1  
        bcf c___byte,c___bit
        rlf main__mask,f
        ;   ledx := ledx - 1  
        decf main__ledx,f
        goto main__485while__continue
        ; if exp=` ledx != 0 ' false goto
        ; Other expression=` ledx != 0 ' delay=-1
main__485while__break:
        ; `while  ledx != 0  ...' end
        ;   leds_mask_high := leds_mask_high + mask  
        movf main__mask,w
        addwf leds_mask_high,f
        ; else body end
        ; if exp=` ledx < 5 ' generic
label473__0end:
        ; Other expression=`{ ledx < 5 }' delay=-1
        ; if { ledx < 5 } end
        ;   leds_mask_high := leds_mask_high & 0x1f  
        movlw 31
        andwf leds_mask_high,f
        goto switch__431end
switch__431block493:
        ; Decrement LED ' s < Command = 1010 bbbb > :
        ;   ledx := command & 0xf  
        movlw 15
        andwf main__command,w
        movwf main__ledx
        ;   mask := 1  
        movlw 1
        movwf main__mask
        ; if { ledx < 5 } start
        movlw 5
        subwf main__ledx,w
        ; expression=`{ ledx < 5 }' exp_delay=2 true_delay=-1  false_delay=-1 true_size=17 false_size=14
        btfsc c___byte,c___bit
        goto label497__0false
label497__0true:
        ; if { ledx < 5 } body start
        ; `while  ledx != 0  ...' start
main__498while__continue:
        movf main__ledx,w
        ; expression=` ledx != 0 ' exp_delay=1 true_delay=5  false_delay=2 true_size=4 false_size=1
        btfsc z___byte,z___bit
        goto main__498while__break
        ;   mask := mask << 1  
        bcf c___byte,c___bit
        rlf main__mask,f
        ;   ledx := ledx - 1  
        decf main__ledx,f
        goto main__498while__continue
        ; if exp=` ledx != 0 ' false goto
        ; Other expression=` ledx != 0 ' delay=-1
main__498while__break:
        ; `while  ledx != 0  ...' end
        ;   leds_mask_low := leds_mask_low - mask  
        movf leds_mask_low,w
        movwf main__502byte0
        movf main__mask,w
        subwf main__502byte0,w
        movwf leds_mask_low
        ; if { leds_mask_low @ 5 } start
        ; Alias variable for select leds_mask_low @ 5
leds_mask_low__503select0 equ leds_mask_low+0
leds_mask_low__503select0__byte equ leds_mask_low+0
leds_mask_low__503select0__bit equ 5
        ; expression=`{ leds_mask_low @ 5 }' exp_delay=0 true_delay=3  false_delay=0 true_size=3 false_size=0
        btfss leds_mask_low__503select0__byte,leds_mask_low__503select0__bit
        goto label503__1end
        ; if { leds_mask_low @ 5 } body start
        ;   leds_mask_low := leds_mask_low & 0x1f  
        movlw 31
        andwf leds_mask_low,f
        ;   leds_mask_high := leds_mask_high - 1  
        decf leds_mask_high,f
        ; if { leds_mask_low @ 5 } body end
label503__1end:
        ; if exp=` leds_mask_low @ 5 ' empty false
        ; Other expression=`{ leds_mask_low @ 5 }' delay=-1
        ; if { leds_mask_low @ 5 } end
        ; if { ledx < 5 } body end
        goto label497__0end
label497__0false:
        ; else body start
        ;   ledx := ledx - 5  
        movlw 251
        addwf main__ledx,f
        ; `while  ledx != 0  ...' start
main__509while__continue:
        movf main__ledx,w
        ; expression=` ledx != 0 ' exp_delay=1 true_delay=5  false_delay=2 true_size=4 false_size=1
        btfsc z___byte,z___bit
        goto main__509while__break
        ;   mask := mask << 1  
        bcf c___byte,c___bit
        rlf main__mask,f
        ;   ledx := ledx - 1  
        decf main__ledx,f
        goto main__509while__continue
        ; if exp=` ledx != 0 ' false goto
        ; Other expression=` ledx != 0 ' delay=-1
main__509while__break:
        ; `while  ledx != 0  ...' end
        ;   leds_mask_high := leds_mask_high - mask  
        movf leds_mask_high,w
        movwf main__513byte0
        movf main__mask,w
        subwf main__513byte0,w
        movwf leds_mask_high
        ; else body end
        ; if exp=` ledx < 5 ' generic
label497__0end:
        ; Other expression=`{ ledx < 5 }' delay=-1
        ; if { ledx < 5 } end
        ;   leds_mask_high := leds_mask_high & 0x1f  
        movlw 31
        andwf leds_mask_high,f
        goto switch__431end
switch__431block517:
        ; Command = 1011 llll :
        ; Do nothing :
switch__431end:
        goto switch__369end
switch__369block523:
        ; < Command = 11 xx xxxx > :
        ; if { {{ command >> 3 }} & 7 = 7 } start
        rrf main__command,w
        movwf main__525byte2
        rrf main__525byte2,f
        rrf main__525byte2,w
        andlw 7
        movwf main__525byte1
        movlw 7
        subwf main__525byte1,w
        ; expression=`{ {{ command >> 3 }} & 7 = 7 }' exp_delay=9 true_delay=38  false_delay=0 true_size=37 false_size=0
        btfss z___byte,z___bit
        goto label525__3end
        ; if { {{ command >> 3 }} & 7 = 7 } body start
        ; Command = 1111 1 xxx :
        ; switch { command & 7 }
        movlw 7
        andwf main__command,w
        ; case 0
        ; case 1
        ; case 2
        ; case 3
        ; case 4
        ; case 5
        ; case 6
        ; case 7
        goto switch__527block_start
switch__527block528:
        ; Clock Decrement < Command = 1111 1000 > :
        ;   osccal := osccal - osccal_lsb  
        movlw 252
        addwf osccal,f
        goto switch__527end
switch__527block532:
        ; Clock Increment < Command = 1111 1001 > :
        ;   osccal := osccal + osccal_lsb  
        movlw 4
        addwf osccal,f
        goto switch__527end
switch__527block536:
        ; Clock Read < Command = 1111 1010 > :
        ;   call send_byte {{ osccal }}  
        movf osccal,w
        ; Switch from register bank 1 to register bank 2 (which contains send_byte__char)
        bcf rp0___byte,rp0___bit
        bsf rp1___byte,rp1___bit
        ; Register bank is now 2
        movwf send_byte__char
        ; Switch from code bank 1 to code bank 0 before possible transfer (call)
        bcf pa0___byte,pa0___bit
        call send_byte
        ; Switch from register bank 2 to register bank 1
        bsf rp0___byte,rp0___bit
        bcf rp1___byte,rp1___bit
        ; Register bank is now 1
        ; Switch from code bank 0 to code bank 1 before possible transfer (goto)
        bsf pa0___byte,pa0___bit
        goto switch__527end
switch__527block540:
        ; Clock Pulse < Command = 1111 1011 > :
        ;   call send_byte {{ 0 }}  
        ; Switch from register bank 1 to register bank 2 (which contains send_byte__char)
        bcf rp0___byte,rp0___bit
        bsf rp1___byte,rp1___bit
        ; Register bank is now 2
        clrf send_byte__char
        ; Switch from code bank 1 to code bank 0 before possible transfer (call)
        bcf pa0___byte,pa0___bit
        call send_byte
        ; Switch from register bank 2 to register bank 1
        bsf rp0___byte,rp0___bit
        bcf rp1___byte,rp1___bit
        ; Register bank is now 1
        ; Switch from code bank 0 to code bank 1 before possible transfer (goto)
        bsf pa0___byte,pa0___bit
        goto switch__527end
switch__527block544:
        ; ID Next < Command = 1111 1100 > :
        ;   call send_byte {{ id ~~ {{ index }} }}  
        incf main__index,w
        ; Switch from register bank 1 to register bank 0
        bcf rp0___byte,rp0___bit
        ; Register bank is now 0
        ; Switch from code bank 1 to code bank 0 before possible transfer (call)
        bcf pa0___byte,pa0___bit
        call id
        ; Switch from register bank 0 to register bank 2 (which contains send_byte__char)
        bsf rp1___byte,rp1___bit
        ; Register bank is now 2
        movwf send_byte__char
        call send_byte
        ;   index := index + 1  
        ; Switch from register bank 2 to register bank 1 (which contains main__index)
        bsf rp0___byte,rp0___bit
        bcf rp1___byte,rp1___bit
        ; Register bank is now 1
        incf main__index,f
        ; if { index >= id . size } start
        movlw 47
        subwf main__index,w
        ; expression=`{ index >= id . size }' exp_delay=2 true_delay=1  false_delay=0 true_size=1 false_size=0
        ; Switch from code bank 0 to code bank 1 before possible transfer (btfsc)
        bsf pa0___byte,pa0___bit
        btfsc c___byte,c___bit
        ; if { index >= id . size } body start
        ;   index := 0  
        clrf main__index
        ; if { index >= id . size } body end
        ; if exp=` index >= id . size ' false skip delay=4
        ; Other expression=`{ index >= id . size }' delay=4
        ; if { index >= id . size } end
        goto switch__527end
switch__527block552:
        ; ID Reset < Command = 1111 1101 > :
        ;   index := 0  
        clrf main__index
        goto switch__527end
switch__527block557:
        ; Glitch Read < Command = 1111 1110 > :
        ;   call send_byte {{ glitch }}  
        movf main__glitch,w
        ; Switch from register bank 1 to register bank 2 (which contains send_byte__char)
        bcf rp0___byte,rp0___bit
        bsf rp1___byte,rp1___bit
        ; Register bank is now 2
        movwf send_byte__char
        ; Switch from code bank 1 to code bank 0 before possible transfer (call)
        bcf pa0___byte,pa0___bit
        call send_byte
        ;   glitch := 0  
        ; Switch from register bank 2 to register bank 1 (which contains main__glitch)
        bsf rp0___byte,rp0___bit
        bcf rp1___byte,rp1___bit
        ; Register bank is now 1
        clrf main__glitch
        ; Switch from code bank 0 to code bank 1 before possible transfer (goto)
        bsf pa0___byte,pa0___bit
        goto switch__527end
switch__527block562:
        ; Glitch < Command = 1111 1111 > :
        ; if { glitch != 0xff } start
        incf main__glitch,w
        ; expression=`{ glitch != 0xff }' exp_delay=1 true_delay=1  false_delay=0 true_size=1 false_size=0
        btfss z___byte,z___bit
        ; if { glitch != 0xff } body start
        ;   glitch := glitch + 1  
        incf main__glitch,f
        ; if { glitch != 0xff } body end
        ; if exp=` glitch != 0xff ' false skip delay=3
        ; Other expression=`{ glitch != 0xff }' delay=3
        ; if { glitch != 0xff } end
switch__527end:
        ; if { {{ command >> 3 }} & 7 = 7 } body end
label525__3end:
        ; if exp=` {{ command >> 3 }} & 7 = 7 ' empty false
        ; Other expression=`{ {{ command >> 3 }} & 7 = 7 }' delay=-1
        ; if { {{ command >> 3 }} & 7 = 7 } end
switch__369end:
        goto main__364loop__forever
        ; loop_forever ... end
        ; procedure main end

        ; Register bank 0 used 16 bytes of 24 available bytes
        ; Register bank 1 used 10 bytes of 16 available bytes
        ; Register bank 2 used 8 bytes of 16 available bytes
        ; Register bank 3 used 0 bytes of 16 available bytes

        end

