
CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  (byte*) screen#0 ← ((byte*)) (word/signed word/dword/signed dword) 1024
  to:@2
main: scope:[main]  from @2
  (byte*) screen#13 ← phi( @2/(byte*) screen#15 )
  (byte) line::x0#0 ← (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) line::x1#0 ← (byte/signed byte/word/signed word/dword/signed dword) 2
  call line 
  to:main::@1
main::@1: scope:[main]  from main
  (byte*) screen#7 ← phi( main/(byte*) screen#5 )
  (byte*) screen#1 ← (byte*) screen#7
  (byte) line::x0#1 ← (byte/signed byte/word/signed word/dword/signed dword) 3
  (byte) line::x1#1 ← (byte/signed byte/word/signed word/dword/signed dword) 5
  call line 
  to:main::@2
main::@2: scope:[main]  from main::@1
  (byte*) screen#8 ← phi( main::@1/(byte*) screen#5 )
  (byte*) screen#2 ← (byte*) screen#8
  to:main::@return
main::@return: scope:[main]  from main::@2
  (byte*) screen#9 ← phi( main::@2/(byte*) screen#2 )
  (byte*) screen#3 ← (byte*) screen#9
  return 
  to:@return
line: scope:[line]  from main main::@1
  (byte) line::x1#3 ← phi( main/(byte) line::x1#0 main::@1/(byte) line::x1#1 )
  (byte*) screen#14 ← phi( main/(byte*) screen#13 main::@1/(byte*) screen#1 )
  (byte) line::x0#2 ← phi( main/(byte) line::x0#0 main::@1/(byte) line::x0#1 )
  (byte) line::x#0 ← (byte) line::x0#2
  to:line::@1
line::@1: scope:[line]  from line line::@1
  (byte) line::x1#2 ← phi( line/(byte) line::x1#3 line::@1/(byte) line::x1#2 )
  (byte*) screen#10 ← phi( line/(byte*) screen#14 line::@1/(byte*) screen#4 )
  (byte) line::x#2 ← phi( line/(byte) line::x#0 line::@1/(byte) line::x#1 )
  *((byte*) screen#10) ← (byte) line::x#2
  (byte*) screen#4 ← ++ (byte*) screen#10
  (byte) line::x#1 ← ++ (byte) line::x#2
  (bool~) line::$0 ← (byte) line::x#1 < (byte) line::x1#2
  if((bool~) line::$0) goto line::@1
  to:line::@return
line::@return: scope:[line]  from line::@1
  (byte*) screen#11 ← phi( line::@1/(byte*) screen#4 )
  (byte*) screen#5 ← (byte*) screen#11
  return 
  to:@return
@2: scope:[]  from @begin
  (byte*) screen#15 ← phi( @begin/(byte*) screen#0 )
  call main 
  to:@3
@3: scope:[]  from @2
  (byte*) screen#12 ← phi( @2/(byte*) screen#3 )
  (byte*) screen#6 ← (byte*) screen#12
  to:@end
@end: scope:[]  from @3

SYMBOL TABLE SSA
(label) @2
(label) @3
(label) @begin
(label) @end
(void()) line((byte) line::x0 , (byte) line::x1)
(bool~) line::$0
(label) line::@1
(label) line::@return
(byte) line::x
(byte) line::x#0
(byte) line::x#1
(byte) line::x#2
(byte) line::x0
(byte) line::x0#0
(byte) line::x0#1
(byte) line::x0#2
(byte) line::x1
(byte) line::x1#0
(byte) line::x1#1
(byte) line::x1#2
(byte) line::x1#3
(void()) main()
(label) main::@1
(label) main::@2
(label) main::@return
(byte*) screen
(byte*) screen#0
(byte*) screen#1
(byte*) screen#10
(byte*) screen#11
(byte*) screen#12
(byte*) screen#13
(byte*) screen#14
(byte*) screen#15
(byte*) screen#2
(byte*) screen#3
(byte*) screen#4
(byte*) screen#5
(byte*) screen#6
(byte*) screen#7
(byte*) screen#8
(byte*) screen#9

Alias (byte*) screen#1 = (byte*) screen#7 
Alias (byte*) screen#2 = (byte*) screen#8 (byte*) screen#9 (byte*) screen#3 
Alias (byte) line::x#0 = (byte) line::x0#2 
Alias (byte*) screen#11 = (byte*) screen#4 (byte*) screen#5 
Alias (byte*) screen#0 = (byte*) screen#15 
Alias (byte*) screen#12 = (byte*) screen#6 
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte) line::x1#2
Successful SSA optimization Pass2SelfPhiElimination
Redundant Phi (byte*) screen#13 (byte*) screen#0
Redundant Phi (byte*) screen#1 (byte*) screen#11
Redundant Phi (byte*) screen#2 (byte*) screen#11
Redundant Phi (byte) line::x1#2 (byte) line::x1#3
Redundant Phi (byte*) screen#12 (byte*) screen#2
Successful SSA optimization Pass2RedundantPhiElimination
Simple Condition (bool~) line::$0 [22] if((byte) line::x#1<(byte) line::x1#3) goto line::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte*) screen#0 = ((byte*))1024
Constant (const byte) line::x0#0 = 1
Constant (const byte) line::x1#0 = 2
Constant (const byte) line::x0#1 = 3
Constant (const byte) line::x1#1 = 5
Successful SSA optimization Pass2ConstantIdentification
Culled Empty Block (label) main::@2
Culled Empty Block (label) @3
Successful SSA optimization Pass2CullEmptyBlocks
Inlining constant with different constant siblings (const byte) line::x0#0
Inlining constant with var siblings (const byte) line::x1#0
Inlining constant with different constant siblings (const byte) line::x0#1
Inlining constant with var siblings (const byte) line::x1#1
Inlining constant with var siblings (const byte*) screen#0
Constant inlined line::x0#0 = (byte/signed byte/word/signed word/dword/signed dword) 1
Constant inlined line::x1#1 = (byte/signed byte/word/signed word/dword/signed dword) 5
Constant inlined screen#0 = ((byte*))(word/signed word/dword/signed dword) 1024
Constant inlined line::x1#0 = (byte/signed byte/word/signed word/dword/signed dword) 2
Constant inlined line::x0#1 = (byte/signed byte/word/signed word/dword/signed dword) 3
Successful SSA optimization Pass2ConstantInlining
Added new block during phi lifting line::@3(between line::@1 and line::@1)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @2
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
CALL GRAPH
Calls in [] to main:2 
Calls in [main] to line:5 line:7 

Created 5 initial phi equivalence classes
Coalesced [6] screen#16 ← screen#11
Coalesced [10] line::x#3 ← line::x#0
Coalesced [11] screen#17 ← screen#14
Coalesced [18] line::x#4 ← line::x#1
Coalesced (already) [19] screen#18 ← screen#11
Coalesced down to 3 phi equivalence classes
Culled Empty Block (label) line::@3
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @2
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@1

FINAL CONTROL FLOW GRAPH
@begin: scope:[]  from
  [0] phi()
  to:@2
@2: scope:[]  from @begin
  [1] phi()
  [2] call main 
  to:@end
@end: scope:[]  from @2
  [3] phi()
main: scope:[main]  from @2
  [4] phi()
  [5] call line 
  to:main::@1
main::@1: scope:[main]  from main
  [6] phi()
  [7] call line 
  to:main::@return
main::@return: scope:[main]  from main::@1
  [8] return 
  to:@return
line: scope:[line]  from main main::@1
  [9] (byte) line::x1#3 ← phi( main/(byte/signed byte/word/signed word/dword/signed dword) 2 main::@1/(byte/signed byte/word/signed word/dword/signed dword) 5 )
  [9] (byte*) screen#14 ← phi( main/((byte*))(word/signed word/dword/signed dword) 1024 main::@1/(byte*) screen#11 )
  [9] (byte) line::x#0 ← phi( main/(byte/signed byte/word/signed word/dword/signed dword) 1 main::@1/(byte/signed byte/word/signed word/dword/signed dword) 3 )
  to:line::@1
line::@1: scope:[line]  from line line::@1
  [10] (byte*) screen#10 ← phi( line/(byte*) screen#14 line::@1/(byte*) screen#11 )
  [10] (byte) line::x#2 ← phi( line/(byte) line::x#0 line::@1/(byte) line::x#1 )
  [11] *((byte*) screen#10) ← (byte) line::x#2
  [12] (byte*) screen#11 ← ++ (byte*) screen#10
  [13] (byte) line::x#1 ← ++ (byte) line::x#2
  [14] if((byte) line::x#1<(byte) line::x1#3) goto line::@1
  to:line::@return
line::@return: scope:[line]  from line::@1
  [15] return 
  to:@return


VARIABLE REGISTER WEIGHTS
(void()) line((byte) line::x0 , (byte) line::x1)
(byte) line::x
(byte) line::x#0 2.0
(byte) line::x#1 16.5
(byte) line::x#2 11.666666666666666
(byte) line::x0
(byte) line::x1
(byte) line::x1#3 1.8333333333333333
(void()) main()
(byte*) screen
(byte*) screen#10 17.5
(byte*) screen#11 4.0
(byte*) screen#14 4.0

Initial phi equivalence classes
[ line::x1#3 ]
[ line::x#2 line::x#0 line::x#1 ]
[ screen#10 screen#14 screen#11 ]
Complete equivalence classes
[ line::x1#3 ]
[ line::x#2 line::x#0 line::x#1 ]
[ screen#10 screen#14 screen#11 ]
Allocated zp ZP_BYTE:2 [ line::x1#3 ]
Allocated zp ZP_BYTE:3 [ line::x#2 line::x#0 line::x#1 ]
Allocated zp ZP_WORD:4 [ screen#10 screen#14 screen#11 ]

INITIAL ASM
//SEG0 File Comments
// Multiple calls with different (constant?) parameters should yield different values at runtime
// Currently the same constant parameter is passed on every call.
// Reason: Multiple versioned parameter constants x0#0, x0#1 are only output as a single constant in the ASM .const x0 = 0
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 Global Constants & labels
  .label screen = 4
//SEG3 @begin
bbegin:
//SEG4 [1] phi from @begin to @2 [phi:@begin->@2]
b2_from_bbegin:
  jmp b2
//SEG5 @2
b2:
//SEG6 [2] call main 
//SEG7 [4] phi from @2 to main [phi:@2->main]
main_from_b2:
  jsr main
//SEG8 [3] phi from @2 to @end [phi:@2->@end]
bend_from_b2:
  jmp bend
//SEG9 @end
bend:
//SEG10 main
main: {
  //SEG11 [5] call line 
  //SEG12 [9] phi from main to line [phi:main->line]
  line_from_main:
  //SEG13 [9] phi (byte) line::x1#3 = (byte/signed byte/word/signed word/dword/signed dword) 2 [phi:main->line#0] -- vbuz1=vbuc1 
    lda #2
    sta line.x1
  //SEG14 [9] phi (byte*) screen#14 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:main->line#1] -- pbuz1=pbuc1 
    lda #<$400
    sta screen
    lda #>$400
    sta screen+1
  //SEG15 [9] phi (byte) line::x#0 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:main->line#2] -- vbuz1=vbuc1 
    lda #1
    sta line.x
    jsr line
  //SEG16 [6] phi from main to main::@1 [phi:main->main::@1]
  b1_from_main:
    jmp b1
  //SEG17 main::@1
  b1:
  //SEG18 [7] call line 
  //SEG19 [9] phi from main::@1 to line [phi:main::@1->line]
  line_from_b1:
  //SEG20 [9] phi (byte) line::x1#3 = (byte/signed byte/word/signed word/dword/signed dword) 5 [phi:main::@1->line#0] -- vbuz1=vbuc1 
    lda #5
    sta line.x1
  //SEG21 [9] phi (byte*) screen#14 = (byte*) screen#11 [phi:main::@1->line#1] -- register_copy 
  //SEG22 [9] phi (byte) line::x#0 = (byte/signed byte/word/signed word/dword/signed dword) 3 [phi:main::@1->line#2] -- vbuz1=vbuc1 
    lda #3
    sta line.x
    jsr line
    jmp breturn
  //SEG23 main::@return
  breturn:
  //SEG24 [8] return 
    rts
}
//SEG25 line
// line(byte zeropage(2) x1)
line: {
    .label x = 3
    .label x1 = 2
  //SEG26 [10] phi from line line::@1 to line::@1 [phi:line/line::@1->line::@1]
  b1_from_line:
  b1_from_b1:
  //SEG27 [10] phi (byte*) screen#10 = (byte*) screen#14 [phi:line/line::@1->line::@1#0] -- register_copy 
  //SEG28 [10] phi (byte) line::x#2 = (byte) line::x#0 [phi:line/line::@1->line::@1#1] -- register_copy 
    jmp b1
  //SEG29 line::@1
  b1:
  //SEG30 [11] *((byte*) screen#10) ← (byte) line::x#2 -- _deref_pbuz1=vbuz2 
    lda x
    ldy #0
    sta (screen),y
  //SEG31 [12] (byte*) screen#11 ← ++ (byte*) screen#10 -- pbuz1=_inc_pbuz1 
    inc screen
    bne !+
    inc screen+1
  !:
  //SEG32 [13] (byte) line::x#1 ← ++ (byte) line::x#2 -- vbuz1=_inc_vbuz1 
    inc x
  //SEG33 [14] if((byte) line::x#1<(byte) line::x1#3) goto line::@1 -- vbuz1_lt_vbuz2_then_la1 
    lda x
    cmp x1
    bcc b1_from_b1
    jmp breturn
  //SEG34 line::@return
  breturn:
  //SEG35 [15] return 
    rts
}

REGISTER UPLIFT POTENTIAL REGISTERS
Statement [11] *((byte*) screen#10) ← (byte) line::x#2 [ line::x1#3 line::x#2 screen#10 ] ( main:2::line:5 [ line::x1#3 line::x#2 screen#10 ] main:2::line:7 [ line::x1#3 line::x#2 screen#10 ] ) always clobbers reg byte y 
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:2 [ line::x1#3 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:3 [ line::x#2 line::x#0 line::x#1 ]
Statement [11] *((byte*) screen#10) ← (byte) line::x#2 [ line::x1#3 line::x#2 screen#10 ] ( main:2::line:5 [ line::x1#3 line::x#2 screen#10 ] main:2::line:7 [ line::x1#3 line::x#2 screen#10 ] ) always clobbers reg byte y 
Potential registers zp ZP_BYTE:2 [ line::x1#3 ] : zp ZP_BYTE:2 , reg byte a , reg byte x , 
Potential registers zp ZP_BYTE:3 [ line::x#2 line::x#0 line::x#1 ] : zp ZP_BYTE:3 , reg byte a , reg byte x , 
Potential registers zp ZP_WORD:4 [ screen#10 screen#14 screen#11 ] : zp ZP_WORD:4 , 

REGISTER UPLIFT SCOPES
Uplift Scope [line] 30.17: zp ZP_BYTE:3 [ line::x#2 line::x#0 line::x#1 ] 1.83: zp ZP_BYTE:2 [ line::x1#3 ] 
Uplift Scope [] 25.5: zp ZP_WORD:4 [ screen#10 screen#14 screen#11 ] 
Uplift Scope [main] 

Uplifting [line] best 426 combination reg byte x [ line::x#2 line::x#0 line::x#1 ] zp ZP_BYTE:2 [ line::x1#3 ] 
Uplifting [] best 426 combination zp ZP_WORD:4 [ screen#10 screen#14 screen#11 ] 
Uplifting [main] best 426 combination 
Attempting to uplift remaining variables inzp ZP_BYTE:2 [ line::x1#3 ]
Uplifting [line] best 426 combination zp ZP_BYTE:2 [ line::x1#3 ] 
Allocated (was zp ZP_WORD:4) zp ZP_WORD:3 [ screen#10 screen#14 screen#11 ]

ASSEMBLER BEFORE OPTIMIZATION
//SEG0 File Comments
// Multiple calls with different (constant?) parameters should yield different values at runtime
// Currently the same constant parameter is passed on every call.
// Reason: Multiple versioned parameter constants x0#0, x0#1 are only output as a single constant in the ASM .const x0 = 0
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 Global Constants & labels
  .label screen = 3
//SEG3 @begin
bbegin:
//SEG4 [1] phi from @begin to @2 [phi:@begin->@2]
b2_from_bbegin:
  jmp b2
//SEG5 @2
b2:
//SEG6 [2] call main 
//SEG7 [4] phi from @2 to main [phi:@2->main]
main_from_b2:
  jsr main
//SEG8 [3] phi from @2 to @end [phi:@2->@end]
bend_from_b2:
  jmp bend
//SEG9 @end
bend:
//SEG10 main
main: {
  //SEG11 [5] call line 
  //SEG12 [9] phi from main to line [phi:main->line]
  line_from_main:
  //SEG13 [9] phi (byte) line::x1#3 = (byte/signed byte/word/signed word/dword/signed dword) 2 [phi:main->line#0] -- vbuz1=vbuc1 
    lda #2
    sta line.x1
  //SEG14 [9] phi (byte*) screen#14 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:main->line#1] -- pbuz1=pbuc1 
    lda #<$400
    sta screen
    lda #>$400
    sta screen+1
  //SEG15 [9] phi (byte) line::x#0 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:main->line#2] -- vbuxx=vbuc1 
    ldx #1
    jsr line
  //SEG16 [6] phi from main to main::@1 [phi:main->main::@1]
  b1_from_main:
    jmp b1
  //SEG17 main::@1
  b1:
  //SEG18 [7] call line 
  //SEG19 [9] phi from main::@1 to line [phi:main::@1->line]
  line_from_b1:
  //SEG20 [9] phi (byte) line::x1#3 = (byte/signed byte/word/signed word/dword/signed dword) 5 [phi:main::@1->line#0] -- vbuz1=vbuc1 
    lda #5
    sta line.x1
  //SEG21 [9] phi (byte*) screen#14 = (byte*) screen#11 [phi:main::@1->line#1] -- register_copy 
  //SEG22 [9] phi (byte) line::x#0 = (byte/signed byte/word/signed word/dword/signed dword) 3 [phi:main::@1->line#2] -- vbuxx=vbuc1 
    ldx #3
    jsr line
    jmp breturn
  //SEG23 main::@return
  breturn:
  //SEG24 [8] return 
    rts
}
//SEG25 line
// line(byte zeropage(2) x1)
line: {
    .label x1 = 2
  //SEG26 [10] phi from line line::@1 to line::@1 [phi:line/line::@1->line::@1]
  b1_from_line:
  b1_from_b1:
  //SEG27 [10] phi (byte*) screen#10 = (byte*) screen#14 [phi:line/line::@1->line::@1#0] -- register_copy 
  //SEG28 [10] phi (byte) line::x#2 = (byte) line::x#0 [phi:line/line::@1->line::@1#1] -- register_copy 
    jmp b1
  //SEG29 line::@1
  b1:
  //SEG30 [11] *((byte*) screen#10) ← (byte) line::x#2 -- _deref_pbuz1=vbuxx 
    txa
    ldy #0
    sta (screen),y
  //SEG31 [12] (byte*) screen#11 ← ++ (byte*) screen#10 -- pbuz1=_inc_pbuz1 
    inc screen
    bne !+
    inc screen+1
  !:
  //SEG32 [13] (byte) line::x#1 ← ++ (byte) line::x#2 -- vbuxx=_inc_vbuxx 
    inx
  //SEG33 [14] if((byte) line::x#1<(byte) line::x1#3) goto line::@1 -- vbuxx_lt_vbuz1_then_la1 
    cpx x1
    bcc b1_from_b1
    jmp breturn
  //SEG34 line::@return
  breturn:
  //SEG35 [15] return 
    rts
}

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b2
Removing instruction jmp bend
Removing instruction jmp b1
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing label b1_from_b1 with b1
Removing instruction b2_from_bbegin:
Removing instruction b2:
Removing instruction main_from_b2:
Removing instruction bend_from_b2:
Removing instruction b1_from_main:
Removing instruction line_from_b1:
Removing instruction b1_from_line:
Removing instruction b1_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bend:
Removing instruction line_from_main:
Removing instruction b1:
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) @2
(label) @begin
(label) @end
(void()) line((byte) line::x0 , (byte) line::x1)
(label) line::@1
(label) line::@return
(byte) line::x
(byte) line::x#0 reg byte x 2.0
(byte) line::x#1 reg byte x 16.5
(byte) line::x#2 reg byte x 11.666666666666666
(byte) line::x0
(byte) line::x1
(byte) line::x1#3 x1 zp ZP_BYTE:2 1.8333333333333333
(void()) main()
(label) main::@1
(label) main::@return
(byte*) screen
(byte*) screen#10 screen zp ZP_WORD:3 17.5
(byte*) screen#11 screen zp ZP_WORD:3 4.0
(byte*) screen#14 screen zp ZP_WORD:3 4.0

zp ZP_BYTE:2 [ line::x1#3 ]
reg byte x [ line::x#2 line::x#0 line::x#1 ]
zp ZP_WORD:3 [ screen#10 screen#14 screen#11 ]


FINAL ASSEMBLER
Score: 348

//SEG0 File Comments
// Multiple calls with different (constant?) parameters should yield different values at runtime
// Currently the same constant parameter is passed on every call.
// Reason: Multiple versioned parameter constants x0#0, x0#1 are only output as a single constant in the ASM .const x0 = 0
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
//SEG2 Global Constants & labels
  .label screen = 3
//SEG3 @begin
//SEG4 [1] phi from @begin to @2 [phi:@begin->@2]
//SEG5 @2
//SEG6 [2] call main 
//SEG7 [4] phi from @2 to main [phi:@2->main]
//SEG8 [3] phi from @2 to @end [phi:@2->@end]
//SEG9 @end
//SEG10 main
main: {
  //SEG11 [5] call line 
  //SEG12 [9] phi from main to line [phi:main->line]
  //SEG13 [9] phi (byte) line::x1#3 = (byte/signed byte/word/signed word/dword/signed dword) 2 [phi:main->line#0] -- vbuz1=vbuc1 
    lda #2
    sta line.x1
  //SEG14 [9] phi (byte*) screen#14 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:main->line#1] -- pbuz1=pbuc1 
    lda #<$400
    sta screen
    lda #>$400
    sta screen+1
  //SEG15 [9] phi (byte) line::x#0 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:main->line#2] -- vbuxx=vbuc1 
    ldx #1
    jsr line
  //SEG16 [6] phi from main to main::@1 [phi:main->main::@1]
  //SEG17 main::@1
  //SEG18 [7] call line 
  //SEG19 [9] phi from main::@1 to line [phi:main::@1->line]
  //SEG20 [9] phi (byte) line::x1#3 = (byte/signed byte/word/signed word/dword/signed dword) 5 [phi:main::@1->line#0] -- vbuz1=vbuc1 
    lda #5
    sta line.x1
  //SEG21 [9] phi (byte*) screen#14 = (byte*) screen#11 [phi:main::@1->line#1] -- register_copy 
  //SEG22 [9] phi (byte) line::x#0 = (byte/signed byte/word/signed word/dword/signed dword) 3 [phi:main::@1->line#2] -- vbuxx=vbuc1 
    ldx #3
    jsr line
  //SEG23 main::@return
  //SEG24 [8] return 
    rts
}
//SEG25 line
// line(byte zeropage(2) x1)
line: {
    .label x1 = 2
  //SEG26 [10] phi from line line::@1 to line::@1 [phi:line/line::@1->line::@1]
  //SEG27 [10] phi (byte*) screen#10 = (byte*) screen#14 [phi:line/line::@1->line::@1#0] -- register_copy 
  //SEG28 [10] phi (byte) line::x#2 = (byte) line::x#0 [phi:line/line::@1->line::@1#1] -- register_copy 
  //SEG29 line::@1
  b1:
  //SEG30 [11] *((byte*) screen#10) ← (byte) line::x#2 -- _deref_pbuz1=vbuxx 
    txa
    ldy #0
    sta (screen),y
  //SEG31 [12] (byte*) screen#11 ← ++ (byte*) screen#10 -- pbuz1=_inc_pbuz1 
    inc screen
    bne !+
    inc screen+1
  !:
  //SEG32 [13] (byte) line::x#1 ← ++ (byte) line::x#2 -- vbuxx=_inc_vbuxx 
    inx
  //SEG33 [14] if((byte) line::x#1<(byte) line::x1#3) goto line::@1 -- vbuxx_lt_vbuz1_then_la1 
    cpx x1
    bcc b1
  //SEG34 line::@return
  //SEG35 [15] return 
    rts
}

