Resolved forward reference irq_play to interrupt(KERNEL_KEYBOARD)(void()) irq_play()
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx 
Culled Empty Block (label) @1
Culled Empty Block (label) @2
Culled Empty Block (label) @3
Culled Empty Block (label) @5

CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  (byte*) RASTER#0 ← ((byte*)) (number) $d012
  (byte*) BORDERCOL#0 ← ((byte*)) (number) $d020
  (byte*) VIC_CONTROL#0 ← ((byte*)) (number) $d011
  (byte*) IRQ_STATUS#0 ← ((byte*)) (number) $d019
  (byte*) IRQ_ENABLE#0 ← ((byte*)) (number) $d01a
  (byte) IRQ_RASTER#0 ← (number) 1
  (byte*) CIA1_INTERRUPT#0 ← ((byte*)) (number) $dc0d
  (byte) CIA_INTERRUPT_CLEAR#0 ← (number) $7f
  (void()**) KERNEL_IRQ#0 ← ((void()**)) (number) $314
  to:@4
@4: scope:[]  from @begin
  (byte*) MUSIC#0 ← ((byte*)) (number) $1000
  kickasm() {{ .const music = LoadSid("toiletrensdyr.sid")
 }}
  kickasm(location (byte*) MUSIC#0) {{ .fill music.size, music.getData(i)
 }}
  to:@6
main: scope:[main]  from @6
  asm { sei jsrmusic.init  }
  *((byte*) CIA1_INTERRUPT#0) ← (byte) CIA_INTERRUPT_CLEAR#0
  *((byte*) VIC_CONTROL#0) ← *((byte*) VIC_CONTROL#0) & (number) $7f
  *((byte*) RASTER#0) ← (number) $fd
  *((byte*) IRQ_ENABLE#0) ← (byte) IRQ_RASTER#0
  (void()*~) main::$0 ← & interrupt(KERNEL_KEYBOARD)(void()) irq_play()
  *((void()**) KERNEL_IRQ#0) ← (void()*~) main::$0
  asm { cli  }
  to:main::@return
main::@return: scope:[main]  from main
  return 
  to:@return
irq_play: scope:[irq_play]  from
  *((byte*) BORDERCOL#0) ← ++ *((byte*) BORDERCOL#0)
  asm { jsrmusic.play  }
  *((byte*) IRQ_STATUS#0) ← (byte) IRQ_RASTER#0
  *((byte*) BORDERCOL#0) ← -- *((byte*) BORDERCOL#0)
  to:irq_play::@return
irq_play::@return: scope:[irq_play]  from irq_play
  return 
  to:@return
@6: scope:[]  from @4
  call main 
  to:@7
@7: scope:[]  from @6
  to:@end
@end: scope:[]  from @7

SYMBOL TABLE SSA
(label) @4
(label) @6
(label) @7
(label) @begin
(label) @end
(byte*) BORDERCOL
(byte*) BORDERCOL#0
(byte*) CIA1_INTERRUPT
(byte*) CIA1_INTERRUPT#0
(byte) CIA_INTERRUPT_CLEAR
(byte) CIA_INTERRUPT_CLEAR#0
(byte*) IRQ_ENABLE
(byte*) IRQ_ENABLE#0
(byte) IRQ_RASTER
(byte) IRQ_RASTER#0
(byte*) IRQ_STATUS
(byte*) IRQ_STATUS#0
(void()**) KERNEL_IRQ
(void()**) KERNEL_IRQ#0
(byte*) MUSIC
(byte*) MUSIC#0
(byte*) RASTER
(byte*) RASTER#0
(byte*) VIC_CONTROL
(byte*) VIC_CONTROL#0
interrupt(KERNEL_KEYBOARD)(void()) irq_play()
(label) irq_play::@return
(void()) main()
(void()*~) main::$0
(label) main::@return

Adding number conversion cast (unumber) 1 in (byte) IRQ_RASTER#0 ← (number) 1
Adding number conversion cast (unumber) $7f in (byte) CIA_INTERRUPT_CLEAR#0 ← (number) $7f
Adding number conversion cast (unumber) $7f in *((byte*) VIC_CONTROL#0) ← *((byte*) VIC_CONTROL#0) & (number) $7f
Adding number conversion cast (unumber) $fd in *((byte*) RASTER#0) ← (number) $fd
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) RASTER#0 ← (byte*)(number) $d012
Inlining cast (byte*) BORDERCOL#0 ← (byte*)(number) $d020
Inlining cast (byte*) VIC_CONTROL#0 ← (byte*)(number) $d011
Inlining cast (byte*) IRQ_STATUS#0 ← (byte*)(number) $d019
Inlining cast (byte*) IRQ_ENABLE#0 ← (byte*)(number) $d01a
Inlining cast (byte) IRQ_RASTER#0 ← (unumber)(number) 1
Inlining cast (byte*) CIA1_INTERRUPT#0 ← (byte*)(number) $dc0d
Inlining cast (byte) CIA_INTERRUPT_CLEAR#0 ← (unumber)(number) $7f
Inlining cast (void()**) KERNEL_IRQ#0 ← (void()**)(number) $314
Inlining cast (byte*) MUSIC#0 ← (byte*)(number) $1000
Inlining cast *((byte*) RASTER#0) ← (unumber)(number) $fd
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 53266
Simplifying constant pointer cast (byte*) 53280
Simplifying constant pointer cast (byte*) 53265
Simplifying constant pointer cast (byte*) 53273
Simplifying constant pointer cast (byte*) 53274
Simplifying constant integer cast 1
Simplifying constant pointer cast (byte*) 56333
Simplifying constant integer cast $7f
Simplifying constant pointer cast (void()**) 788
Simplifying constant pointer cast (byte*) 4096
Simplifying constant integer cast $7f
Simplifying constant integer cast $fd
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) $7f
Finalized unsigned number type (byte) $7f
Finalized unsigned number type (byte) $fd
Successful SSA optimization PassNFinalizeNumberTypeConversions
Constant right-side identified [17] (void()*~) main::$0 ← & interrupt(KERNEL_KEYBOARD)(void()) irq_play()
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte*) RASTER#0 = (byte*) 53266
Constant (const byte*) BORDERCOL#0 = (byte*) 53280
Constant (const byte*) VIC_CONTROL#0 = (byte*) 53265
Constant (const byte*) IRQ_STATUS#0 = (byte*) 53273
Constant (const byte*) IRQ_ENABLE#0 = (byte*) 53274
Constant (const byte) IRQ_RASTER#0 = 1
Constant (const byte*) CIA1_INTERRUPT#0 = (byte*) 56333
Constant (const byte) CIA_INTERRUPT_CLEAR#0 = $7f
Constant (const void()**) KERNEL_IRQ#0 = (void()**) 788
Constant (const byte*) MUSIC#0 = (byte*) 4096
Constant (const void()*) main::$0 = &irq_play
Successful SSA optimization Pass2ConstantIdentification
Constant inlined main::$0 = &interrupt(KERNEL_KEYBOARD)(void()) irq_play()
Successful SSA optimization Pass2ConstantInlining
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @6
Adding NOP phi() at start of @7
Adding NOP phi() at start of @end
CALL GRAPH
Calls in [] to main:4 

Created 0 initial phi equivalence classes
Coalesced down to 0 phi equivalence classes
Culled Empty Block (label) @7
Renumbering block @4 to @1
Renumbering block @6 to @2
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @2
Adding NOP phi() at start of @end

FINAL CONTROL FLOW GRAPH
@begin: scope:[]  from
  [0] phi()
  to:@1
@1: scope:[]  from @begin
  kickasm() {{ .const music = LoadSid("toiletrensdyr.sid")
 }}
  kickasm(location (const byte*) MUSIC#0) {{ .fill music.size, music.getData(i)
 }}
  to:@2
@2: scope:[]  from @1
  [3] phi()
  [4] call main 
  to:@end
@end: scope:[]  from @2
  [5] phi()
main: scope:[main]  from @2
  asm { sei jsrmusic.init  }
  [7] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0
  [8] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f
  [9] *((const byte*) RASTER#0) ← (byte) $fd
  [10] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0
  [11] *((const void()**) KERNEL_IRQ#0) ← &interrupt(KERNEL_KEYBOARD)(void()) irq_play()
  asm { cli  }
  to:main::@return
main::@return: scope:[main]  from main
  [13] return 
  to:@return
irq_play: scope:[irq_play]  from
  [14] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0)
  asm { jsrmusic.play  }
  [16] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
  [17] *((const byte*) BORDERCOL#0) ← -- *((const byte*) BORDERCOL#0)
  to:irq_play::@return
irq_play::@return: scope:[irq_play]  from irq_play
  [18] return 
  to:@return


VARIABLE REGISTER WEIGHTS
(byte*) BORDERCOL
(byte*) CIA1_INTERRUPT
(byte) CIA_INTERRUPT_CLEAR
(byte*) IRQ_ENABLE
(byte) IRQ_RASTER
(byte*) IRQ_STATUS
(void()**) KERNEL_IRQ
(byte*) MUSIC
(byte*) RASTER
(byte*) VIC_CONTROL
interrupt(KERNEL_KEYBOARD)(void()) irq_play()
(void()) main()

Initial phi equivalence classes
Complete equivalence classes

INITIAL ASM
Target platform is c64basic
  // File Comments
// A simple SID music player using RASTER IRQ
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  .label RASTER = $d012
  .label BORDERCOL = $d020
  .label VIC_CONTROL = $d011
  // VIC II IRQ Status Register
  .label IRQ_STATUS = $d019
  // VIC II IRQ Enable Register
  .label IRQ_ENABLE = $d01a
  // Bits for the IRQ Status/Enable Registers
  .const IRQ_RASTER = 1
  // CIA#1 Interrupt Status & Control Register
  .label CIA1_INTERRUPT = $dc0d
  // Value that disables all CIA interrupts when stored to the CIA Interrupt registers
  .const CIA_INTERRUPT_CLEAR = $7f
  // The vector used when the KERNAL serves IRQ interrupts
  .label KERNEL_IRQ = $314
  .label MUSIC = $1000
  // @begin
bbegin:
  jmp b1
  // @1
b1:
  // kickasm() {{ .const music = LoadSid("toiletrensdyr.sid")  }}
  // Load the SID
  .const music = LoadSid("toiletrensdyr.sid")

  // kickasm(location (const byte*) MUSIC#0) {{ .fill music.size, music.getData(i)  }}
// Place the SID into memory
  // [3] phi from @1 to @2 [phi:@1->@2]
b2_from_b1:
  jmp b2
  // @2
b2:
  // [4] call main 
  jsr main
  // [5] phi from @2 to @end [phi:@2->@end]
bend_from_b2:
  jmp bend
  // @end
bend:
  // main
// Setup Raster IRQ and initialize SID player
main: {
    // asm { sei jsrmusic.init  }
    sei
    jsr music.init
    // [7] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 -- _deref_pbuc1=vbuc2 
    // Disable CIA 1 Timer IRQ
    lda #CIA_INTERRUPT_CLEAR
    sta CIA1_INTERRUPT
    // [8] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 
    // Set raster line to $fd
    lda #$7f
    and VIC_CONTROL
    sta VIC_CONTROL
    // [9] *((const byte*) RASTER#0) ← (byte) $fd -- _deref_pbuc1=vbuc2 
    lda #$fd
    sta RASTER
    // [10] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 
    // Enable Raster Interrupt
    lda #IRQ_RASTER
    sta IRQ_ENABLE
    // [11] *((const void()**) KERNEL_IRQ#0) ← &interrupt(KERNEL_KEYBOARD)(void()) irq_play() -- _deref_pptc1=pprc2 
    // Set the IRQ routine
    lda #<irq_play
    sta KERNEL_IRQ
    lda #>irq_play
    sta KERNEL_IRQ+1
    // asm { cli  }
    cli
    jmp breturn
    // main::@return
  breturn:
    // [13] return 
    rts
}
  // irq_play
// Raster IRQ Routine playing music
irq_play: {
    // entry interrupt(KERNEL_KEYBOARD)
    // [14] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) -- _deref_pbuc1=_inc__deref_pbuc1 
    inc BORDERCOL
    // asm { jsrmusic.play  }
    // Play SID
    jsr music.play
    // [16] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 
    // Acknowledge the IRQ
    lda #IRQ_RASTER
    sta IRQ_STATUS
    // [17] *((const byte*) BORDERCOL#0) ← -- *((const byte*) BORDERCOL#0) -- _deref_pbuc1=_dec__deref_pbuc1 
    dec BORDERCOL
    jmp breturn
    // irq_play::@return
  breturn:
    // [18] return  - exit interrupt(KERNEL_KEYBOARD)
    jmp $ea31
}
  // File Data
.pc = MUSIC "MUSIC"
  .fill music.size, music.getData(i)


REGISTER UPLIFT POTENTIAL REGISTERS
Statement asm { sei jsrmusic.init  } always clobbers reg byte a reg byte x reg byte y 
Statement [7] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 [ ] ( main:4 [ ] ) always clobbers reg byte a 
Statement [8] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f [ ] ( main:4 [ ] ) always clobbers reg byte a 
Statement [9] *((const byte*) RASTER#0) ← (byte) $fd [ ] ( main:4 [ ] ) always clobbers reg byte a 
Statement [10] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:4 [ ] ) always clobbers reg byte a 
Statement [11] *((const void()**) KERNEL_IRQ#0) ← &interrupt(KERNEL_KEYBOARD)(void()) irq_play() [ ] ( main:4 [ ] ) always clobbers reg byte a 
Statement asm { jsrmusic.play  } always clobbers reg byte a reg byte x reg byte y 
Statement [16] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] (  [ ] ) always clobbers reg byte a 

REGISTER UPLIFT SCOPES
Uplift Scope [main] 
Uplift Scope [irq_play] 
Uplift Scope [] 

Uplifting [main] best 2947 combination 
Uplifting [irq_play] best 2947 combination 
Uplifting [] best 2947 combination 

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// A simple SID music player using RASTER IRQ
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  .label RASTER = $d012
  .label BORDERCOL = $d020
  .label VIC_CONTROL = $d011
  // VIC II IRQ Status Register
  .label IRQ_STATUS = $d019
  // VIC II IRQ Enable Register
  .label IRQ_ENABLE = $d01a
  // Bits for the IRQ Status/Enable Registers
  .const IRQ_RASTER = 1
  // CIA#1 Interrupt Status & Control Register
  .label CIA1_INTERRUPT = $dc0d
  // Value that disables all CIA interrupts when stored to the CIA Interrupt registers
  .const CIA_INTERRUPT_CLEAR = $7f
  // The vector used when the KERNAL serves IRQ interrupts
  .label KERNEL_IRQ = $314
  .label MUSIC = $1000
  // @begin
bbegin:
  jmp b1
  // @1
b1:
  // kickasm() {{ .const music = LoadSid("toiletrensdyr.sid")  }}
  // Load the SID
  .const music = LoadSid("toiletrensdyr.sid")

  // kickasm(location (const byte*) MUSIC#0) {{ .fill music.size, music.getData(i)  }}
// Place the SID into memory
  // [3] phi from @1 to @2 [phi:@1->@2]
b2_from_b1:
  jmp b2
  // @2
b2:
  // [4] call main 
  jsr main
  // [5] phi from @2 to @end [phi:@2->@end]
bend_from_b2:
  jmp bend
  // @end
bend:
  // main
// Setup Raster IRQ and initialize SID player
main: {
    // asm { sei jsrmusic.init  }
    sei
    jsr music.init
    // [7] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 -- _deref_pbuc1=vbuc2 
    // Disable CIA 1 Timer IRQ
    lda #CIA_INTERRUPT_CLEAR
    sta CIA1_INTERRUPT
    // [8] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 
    // Set raster line to $fd
    lda #$7f
    and VIC_CONTROL
    sta VIC_CONTROL
    // [9] *((const byte*) RASTER#0) ← (byte) $fd -- _deref_pbuc1=vbuc2 
    lda #$fd
    sta RASTER
    // [10] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 
    // Enable Raster Interrupt
    lda #IRQ_RASTER
    sta IRQ_ENABLE
    // [11] *((const void()**) KERNEL_IRQ#0) ← &interrupt(KERNEL_KEYBOARD)(void()) irq_play() -- _deref_pptc1=pprc2 
    // Set the IRQ routine
    lda #<irq_play
    sta KERNEL_IRQ
    lda #>irq_play
    sta KERNEL_IRQ+1
    // asm { cli  }
    cli
    jmp breturn
    // main::@return
  breturn:
    // [13] return 
    rts
}
  // irq_play
// Raster IRQ Routine playing music
irq_play: {
    // entry interrupt(KERNEL_KEYBOARD)
    // [14] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) -- _deref_pbuc1=_inc__deref_pbuc1 
    inc BORDERCOL
    // asm { jsrmusic.play  }
    // Play SID
    jsr music.play
    // [16] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 
    // Acknowledge the IRQ
    lda #IRQ_RASTER
    sta IRQ_STATUS
    // [17] *((const byte*) BORDERCOL#0) ← -- *((const byte*) BORDERCOL#0) -- _deref_pbuc1=_dec__deref_pbuc1 
    dec BORDERCOL
    jmp breturn
    // irq_play::@return
  breturn:
    // [18] return  - exit interrupt(KERNEL_KEYBOARD)
    jmp $ea31
}
  // File Data
.pc = MUSIC "MUSIC"
  .fill music.size, music.getData(i)


ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp bend
Removing instruction jmp breturn
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction b1:
Removing instruction b2_from_b1:
Removing instruction bend_from_b2:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b2:
Removing instruction bend:
Removing instruction breturn:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination

FINAL SYMBOL TABLE
(label) @1
(label) @2
(label) @begin
(label) @end
(byte*) BORDERCOL
(const byte*) BORDERCOL#0 BORDERCOL = (byte*) 53280
(byte*) CIA1_INTERRUPT
(const byte*) CIA1_INTERRUPT#0 CIA1_INTERRUPT = (byte*) 56333
(byte) CIA_INTERRUPT_CLEAR
(const byte) CIA_INTERRUPT_CLEAR#0 CIA_INTERRUPT_CLEAR = (byte) $7f
(byte*) IRQ_ENABLE
(const byte*) IRQ_ENABLE#0 IRQ_ENABLE = (byte*) 53274
(byte) IRQ_RASTER
(const byte) IRQ_RASTER#0 IRQ_RASTER = (byte) 1
(byte*) IRQ_STATUS
(const byte*) IRQ_STATUS#0 IRQ_STATUS = (byte*) 53273
(void()**) KERNEL_IRQ
(const void()**) KERNEL_IRQ#0 KERNEL_IRQ = (void()**) 788
(byte*) MUSIC
(const byte*) MUSIC#0 MUSIC = (byte*) 4096
(byte*) RASTER
(const byte*) RASTER#0 RASTER = (byte*) 53266
(byte*) VIC_CONTROL
(const byte*) VIC_CONTROL#0 VIC_CONTROL = (byte*) 53265
interrupt(KERNEL_KEYBOARD)(void()) irq_play()
(label) irq_play::@return
(void()) main()
(label) main::@return



FINAL ASSEMBLER
Score: 2899

  // File Comments
// A simple SID music player using RASTER IRQ
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
  // Global Constants & labels
  .label RASTER = $d012
  .label BORDERCOL = $d020
  .label VIC_CONTROL = $d011
  // VIC II IRQ Status Register
  .label IRQ_STATUS = $d019
  // VIC II IRQ Enable Register
  .label IRQ_ENABLE = $d01a
  // Bits for the IRQ Status/Enable Registers
  .const IRQ_RASTER = 1
  // CIA#1 Interrupt Status & Control Register
  .label CIA1_INTERRUPT = $dc0d
  // Value that disables all CIA interrupts when stored to the CIA Interrupt registers
  .const CIA_INTERRUPT_CLEAR = $7f
  // The vector used when the KERNAL serves IRQ interrupts
  .label KERNEL_IRQ = $314
  .label MUSIC = $1000
  // @begin
  // @1
  // kickasm
  // kickasm() {{ .const music = LoadSid("toiletrensdyr.sid")  }}
  // Load the SID
  .const music = LoadSid("toiletrensdyr.sid")

  // kickasm(location (const byte*) MUSIC#0) {{ .fill music.size, music.getData(i)  }}
// Place the SID into memory
  // [3] phi from @1 to @2 [phi:@1->@2]
  // @2
  // [4] call main 
  // [5] phi from @2 to @end [phi:@2->@end]
  // @end
  // main
// Setup Raster IRQ and initialize SID player
main: {
    // asm
    // asm { sei jsrmusic.init  }
    sei
    jsr music.init
    // *CIA1_INTERRUPT = CIA_INTERRUPT_CLEAR
    // [7] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 -- _deref_pbuc1=vbuc2 
    // Disable CIA 1 Timer IRQ
    lda #CIA_INTERRUPT_CLEAR
    sta CIA1_INTERRUPT
    // *VIC_CONTROL &=$7f
    // [8] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 
    // Set raster line to $fd
    lda #$7f
    and VIC_CONTROL
    sta VIC_CONTROL
    // *RASTER = $fd
    // [9] *((const byte*) RASTER#0) ← (byte) $fd -- _deref_pbuc1=vbuc2 
    lda #$fd
    sta RASTER
    // *IRQ_ENABLE = IRQ_RASTER
    // [10] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 
    // Enable Raster Interrupt
    lda #IRQ_RASTER
    sta IRQ_ENABLE
    // *KERNEL_IRQ = &irq_play
    // [11] *((const void()**) KERNEL_IRQ#0) ← &interrupt(KERNEL_KEYBOARD)(void()) irq_play() -- _deref_pptc1=pprc2 
    // Set the IRQ routine
    lda #<irq_play
    sta KERNEL_IRQ
    lda #>irq_play
    sta KERNEL_IRQ+1
    // asm
    // asm { cli  }
    cli
    // main::@return
    // }
    // [13] return 
    rts
}
  // irq_play
// Raster IRQ Routine playing music
irq_play: {
    // entry interrupt(KERNEL_KEYBOARD)
    // (*BORDERCOL)++;
    // [14] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) -- _deref_pbuc1=_inc__deref_pbuc1 
    inc BORDERCOL
    // asm
    // asm { jsrmusic.play  }
    // Play SID
    jsr music.play
    // *IRQ_STATUS = IRQ_RASTER
    // [16] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 
    // Acknowledge the IRQ
    lda #IRQ_RASTER
    sta IRQ_STATUS
    // (*BORDERCOL)--;
    // [17] *((const byte*) BORDERCOL#0) ← -- *((const byte*) BORDERCOL#0) -- _deref_pbuc1=_dec__deref_pbuc1 
    dec BORDERCOL
    // irq_play::@return
    // }
    // [18] return  - exit interrupt(KERNEL_KEYBOARD)
    jmp $ea31
}
  // File Data
.pc = MUSIC "MUSIC"
  .fill music.size, music.getData(i)


