From 7edc15413312f0b606b2932ee31c15773b8351c2 Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Tue, 23 Apr 2019 23:26:47 +0200 Subject: [PATCH 1/5] Added Paul Nelsen sandbox test of sivision - with sprintf skeleton implementation. --- .../dk/camelot64/kickc/test/TestPrograms.java | 6 + src/test/kc/sandbox.kc | 125 + src/test/ref/sandbox.asm | 726 ++ src/test/ref/sandbox.cfg | 444 + src/test/ref/sandbox.log | 9025 +++++++++++++++++ src/test/ref/sandbox.sym | 333 + 6 files changed, 10659 insertions(+) create mode 100644 src/test/kc/sandbox.kc create mode 100644 src/test/ref/sandbox.asm create mode 100644 src/test/ref/sandbox.cfg create mode 100644 src/test/ref/sandbox.log create mode 100644 src/test/ref/sandbox.sym diff --git a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java index 8877be5d6..c68af5ba0 100644 --- a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java +++ b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java @@ -32,6 +32,12 @@ public class TestPrograms { public TestPrograms() { } + @Test + public void testPaulNelsenSandbox() throws IOException, URISyntaxException { + compileAndCompare("sandbox"); + } + + //@Test //public void testPointerCast3() throws IOException, URISyntaxException { // compileAndCompare("pointer-cast-3"); diff --git a/src/test/kc/sandbox.kc b/src/test/kc/sandbox.kc new file mode 100644 index 000000000..90f839738 --- /dev/null +++ b/src/test/kc/sandbox.kc @@ -0,0 +1,125 @@ +import "division" + +const byte * zp1 = 0x61; // #define zp1 *(byte *)0x61 -- allows "zp1" vs "*zp1" below -- not supported -- +const byte * zp2 = 0x62; +const byte * TIMEHI = 0xA1; +const byte * TIMELO = 0xA2; +const byte * VICBANK = 0xD018; +byte[16] buf16; // "char buf16[16]" is the normal way -- not supported +byte[100] strTemp; + +// simple 'utoa' without using multiply or divide +word append(byte *dst, word value, word sub){ + *dst = '0'; + while (value >= sub){ ++*dst; value -= sub; } + return value; +} +void utoa(word value, byte *dst){ + byte bStarted = 0; + if (bStarted == 1 || value >= 10000){ value = append(dst++, value, 10000); bStarted = 1; } + if (bStarted == 1 || value >= 1000){ value = append(dst++, value, 1000); bStarted = 1; } + if (bStarted == 1 || value >= 100){ value = append(dst++, value, 100); bStarted = 1; } + if (bStarted == 1 || value >= 10){ value = append(dst++, value, 10); bStarted = 1; } + *dst++ = '0' + (byte)value; + *dst = 0; +} + +byte myprintf(byte *dst, byte *str, word w1, word w2, word w3) { + byte bArg = 0, bFormat = 0, bLen = 0; + byte bLeadZero, bDigits, bTrailing; // formats + byte b, digit; + byte[6] buf6; + word w; + + for (; *str != 0; ++str) { + b = *str; + if (bFormat != 0) { // "(bFormat)" is the normal way -- not supported + if (b == '0') { bLeadZero = 1; continue; } + if (b >= '1' && b <= '9') { bDigits = b - '0'; continue; } + if (b == '-') { bTrailing = 1; continue; } + if (b == 'c'){ // "switch" is the normal way -- not supported + dst[bLen++] = (byte)w; + } else if (b == 'd') { + utoa(w, buf6); + b = 1; while(buf6[b] != 0) ++b; // strlen() not supported + // if (bDigits > b) is used because non-executing for loop is not supported + if (bTrailing == 0 && bDigits > b) for (; bDigits > b; --bDigits) dst[bLen++] = (bLeadZero == 0) ? ' ' : '0'; + for (digit = 0; digit < b; ++digit) dst[bLen++] = buf6[digit]; + if (bTrailing != 0 && bDigits > b) for (; bDigits > b; --bDigits) dst[bLen++] = ' '; + } else if (b == 'x' || b == 'X'){ // hex + b = (w >> 4) & 0xF; dst[bLen++] = (b < 10 ? '0' : 0x57) + b; // "('a' - 10)" is the normal way -- not supported + b = w & 0xF; dst[bLen++] = (b < 10 ? '0' : 0x57) + b; + } + bFormat = 0; + continue; + } + if (b == '%') { + bFormat = 1; + bLeadZero = 0; bDigits = 1; bTrailing = 0; // default format + //w = (bArg == 0) ? w1 : ((bArg == 1) ? w2 : w3); -- "?" is the normal way, but error "sequence does not contain all blocks" + if (bArg == 0) w = w1; + else if (bArg == 1) w = w2; + else w = w3; + ++bArg; + continue; + } + if (b >= 0x41 && b <= 0x5A) b += 0x20; // swap 0x41 / 0x61 when in lower case mode + dst[bLen++] = b; + } + dst[bLen] = 0; + return bLen; +} + +void Print(){ // can this assembly be placed in a separate file and call it from the C code here? + asm { + ldy #0 + loop: + lda strTemp,y + beq done + jsr $FFD2 + iny + jmp loop + done: + } +} + +word div10(word val){ + val = (val >> 1) + 1; + val += val << 1; + val += val >> 4; + val += val >> 4 >> 4; // >> 8 is not supported? + return val >> 4; +} + +int main(void) { + word u; + word v; + *VICBANK = 23; // lower case mode + + // test performance of 'div16u(10)' + u = 28293; + for (*zp1 = 0; *zp1 < 10; ++*zp1){ + *TIMEHI = 0; + *TIMELO = 0; + for (*zp2 = 0; *zp2 < 200; ++*zp2) v = div16u(u, 10); + // lower case letters in string literal are placed in string as 0x01-0x1A, should be 0x61-0x7A + // -- as a side-effect of above issue, we can use "m" for carriage return. The normal way is the escape code "\r" but that is not supported -- + myprintf(strTemp, "200 DIV16U: %5d,%4d IN %04d FRAMESm", u, v, ((word)*TIMEHI << 8) + (word)*TIMELO); + Print(); + u -= 1234; + } + + // test performance of 'div10' + u = 28293; + for (*zp1 = 0; *zp1 < 10; ++*zp1){ + *TIMEHI = 0; + *TIMELO = 0; + for (*zp2 = 0; *zp2 < 200; ++*zp2) v = div10(u); + myprintf(strTemp, "200 DIV10 : %5d,%4d IN %04d FRAMESm", u, v, ((word)*TIMEHI << 8) + (word)*TIMELO); + Print(); + u -= 1234; + } + return 0; +} + + diff --git a/src/test/ref/sandbox.asm b/src/test/ref/sandbox.asm new file mode 100644 index 000000000..a8836c169 --- /dev/null +++ b/src/test/ref/sandbox.asm @@ -0,0 +1,726 @@ +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" + .label zp1 = $61 + // #define zp1 *(byte *)0x61 -- allows "zp1" vs "*zp1" below -- not supported -- + .label zp2 = $62 + .label TIMEHI = $a1 + .label TIMELO = $a2 + .label VICBANK = $d018 +main: { + .label _2 = 6 + .label _3 = 6 + .label _4 = 8 + .label _11 = 6 + .label _12 = 6 + .label _13 = 8 + .label v = 4 + .label u = 2 + lda #$17 + sta VICBANK + lda #0 + sta zp1 + lda #<$6e85 + sta u + lda #>$6e85 + sta u+1 + b1: + lda #0 + sta TIMEHI + sta TIMELO + sta zp2 + b2: + jsr div16u + inc zp2 + lda zp2 + cmp #$c8 + bcc b2 + lda TIMEHI + sta _2 + lda #0 + sta _2+1 + ldy #8 + cpy #0 + beq !e+ + !: + asl _3 + rol _3+1 + dey + bne !- + !e: + lda TIMELO + sta _4 + lda #0 + sta _4+1 + lda myprintf.w3 + clc + adc _4 + sta myprintf.w3 + lda myprintf.w3+1 + adc _4+1 + sta myprintf.w3+1 + lda #str + sta myprintf.str+1 + jsr myprintf + jsr Print + lda u + sec + sbc #<$4d2 + sta u + lda u+1 + sbc #>$4d2 + sta u+1 + inc zp1 + lda zp1 + cmp #$a + bcc b1 + lda #0 + sta zp1 + lda #<$6e85 + sta u + lda #>$6e85 + sta u+1 + b5: + lda #0 + sta TIMEHI + sta TIMELO + sta zp2 + b6: + jsr div10 + inc zp2 + lda zp2 + cmp #$c8 + bcc b6 + lda TIMEHI + sta _11 + lda #0 + sta _11+1 + ldy #8 + cpy #0 + beq !e+ + !: + asl _12 + rol _12+1 + dey + bne !- + !e: + lda TIMELO + sta _13 + lda #0 + sta _13+1 + lda myprintf.w3 + clc + adc _13 + sta myprintf.w3 + lda myprintf.w3+1 + adc _13+1 + sta myprintf.w3+1 + lda #str1 + sta myprintf.str+1 + jsr myprintf + jsr Print + lda u + sec + sbc #<$4d2 + sta u + lda u+1 + sbc #>$4d2 + sta u+1 + inc zp1 + lda zp1 + cmp #$a + bcc b5 + rts + str: .text "200 DIV16U: %5d,%4d IN %04d FRAMESm@" + str1: .text "200 DIV10 : %5d,%4d IN %04d FRAMESm@" +} +Print: { + // can this assembly be placed in a separate file and call it from the C code here? + ldy #0 + loop: + lda strTemp,y + beq done + jsr $ffd2 + iny + jmp loop + done: + rts +} +// myprintf(byte* zeropage(8) str, word zeropage(2) w1, word zeropage(4) w2, word zeropage(6) w3) +myprintf: { + .label _17 = $12 + .label str = 8 + .label bDigits = $11 + .label bLen = $10 + .label digit = $a + .label bArg = $b + .label return = $10 + .label w1 = 2 + .label w2 = 4 + .label w3 = 6 + .label bFormat = $a + .label w = $c + .label bTrailing = $e + .label bLeadZero = $f + lda #0 + sta bLeadZero + sta bDigits + sta bTrailing + sta w + sta w+1 + sta bLen + sta bArg + sta bFormat + b1: + ldy #0 + lda (str),y + tax + lda bFormat + cmp #0 + bne !b2+ + jmp b2 + !b2: + cpx #'0' + bne b3 + lda #1 + sta bLeadZero + b27: + inc str + bne !+ + inc str+1 + !: + ldy #0 + lda (str),y + cmp #0 + bne b1 + tya + ldy return + sta strTemp,y + rts + b3: + cpx #'1' + bcc !b37+ + jmp b37 + !b37: + b4: + cpx #'-' + bne b5 + lda #1 + sta bTrailing + jmp b27 + b5: + cpx #'c' + bne !b6+ + jmp b6 + !b6: + cpx #'d' + beq b7 + cpx #'x' + beq b26 + cpx #'X' + beq b26 + b22: + lda #0 + sta bFormat + jmp b27 + b26: + lda w+1 + sta _17+1 + lda w + sta _17 + ldy #4 + !: + lsr _17+1 + ror _17 + dey + bne !- + lda _17 + and #$f + tax + cpx #$a + bcc b8 + lda #$57 + jmp b9 + b8: + lda #'0' + b9: + stx $ff + clc + adc $ff + ldy bLen + sta strTemp,y + iny + lda w + and #$f + tax + cpx #$a + bcc b10 + lda #$57 + jmp b11 + b10: + lda #'0' + b11: + stx $ff + clc + adc $ff + sta strTemp,y + iny + sty bLen + jmp b22 + b7: + lda w + sta utoa.value + lda w+1 + sta utoa.value+1 + jsr utoa + ldx #1 + b12: + lda buf6,x + cmp #0 + bne b13 + lda bTrailing + cmp #0 + beq b39 + b15: + lda #0 + sta digit + b19: + ldy digit + lda buf6,y + ldy bLen + sta strTemp,y + inc bLen + inc digit + txa + cmp digit + beq !+ + bcs b19 + !: + lda bTrailing + cmp #0 + bne b40 + jmp b22 + b40: + cpx bDigits + bcc b21 + jmp b22 + b21: + lda #' ' + ldy bLen + sta strTemp,y + inc bLen + dec bDigits + cpx bDigits + bcc b21 + jmp b22 + b39: + cpx bDigits + bcc b16 + jmp b15 + b16: + lda bLeadZero + cmp #0 + beq b14 + lda #'0' + jmp b18 + b14: + lda #' ' + b18: + ldy bLen + sta strTemp,y + inc bLen + dec bDigits + cpx bDigits + bcc b16 + jmp b15 + b13: + inx + jmp b12 + b6: + lda w + // "switch" is the normal way -- not supported + ldy bLen + sta strTemp,y + inc bLen + jmp b22 + b37: + cpx #'9' + bcc b23 + beq b23 + jmp b4 + b23: + txa + axs #'0' + stx bDigits + jmp b27 + b2: + cpx #'%' + bne b28 + // default format + //w = (bArg == 0) ? w1 : ((bArg == 1) ? w2 : w3); -- "?" is the normal way, but error "sequence does not contain all blocks" + lda bArg + cmp #0 + beq b42 + lda #1 + cmp bArg + beq b43 + lda w3 + sta w + lda w3+1 + sta w+1 + b29: + inc bArg + lda #0 + sta bLeadZero + lda #1 + sta bDigits + lda #0 + sta bTrailing + lda #1 + sta bFormat + jmp b27 + b43: + lda w2 + sta w + lda w2+1 + sta w+1 + jmp b29 + b42: + lda w1 + sta w + lda w1+1 + sta w+1 + jmp b29 + b28: + cpx #$41 + bcs b41 + b30: + // swap 0x41 / 0x61 when in lower case mode + ldy bLen + txa + sta strTemp,y + inc bLen + jmp b27 + b41: + cpx #$5a+1 + bcc b35 + jmp b30 + b35: + txa + axs #-[$20] + jmp b30 + buf6: .fill 6, 0 +} +// utoa(word zeropage($12) value, byte* zeropage($14) dst) +utoa: { + .label value = $12 + .label dst = $14 + lda value+1 + cmp #>$2710 + bcc !+ + beq !b5+ + jmp b5 + !b5: + lda value + cmp #<$2710 + bcc !b5+ + jmp b5 + !b5: + !: + lda #myprintf.buf6 + sta dst+1 + ldx #0 + b1: + cpx #1 + beq b6 + lda value+1 + cmp #>$3e8 + bcc !+ + bne b6 + lda value + cmp #<$3e8 + bcs b6 + !: + b2: + cpx #1 + beq b7 + lda value+1 + cmp #>$64 + bcc !+ + bne b7 + lda value + cmp #<$64 + bcs b7 + !: + b3: + cpx #1 + beq b8 + lda value+1 + cmp #>$a + bcc !+ + bne b8 + lda value + cmp #<$a + bcs b8 + !: + b4: + lda value + clc + adc #'0' + ldy #0 + sta (dst),y + inc dst + bne !+ + inc dst+1 + !: + lda #0 + tay + sta (dst),y + rts + b8: + lda #$a + sta append.sub + lda #0 + sta append.sub+1 + jsr append + inc dst + bne !+ + inc dst+1 + !: + jmp b4 + b7: + lda #$64 + sta append.sub + lda #0 + sta append.sub+1 + jsr append + inc dst + bne !+ + inc dst+1 + !: + ldx #1 + jmp b3 + b6: + lda #<$3e8 + sta append.sub + lda #>$3e8 + sta append.sub+1 + jsr append + inc dst + bne !+ + inc dst+1 + !: + ldx #1 + jmp b2 + b5: + lda #<$2710 + sta append.sub + lda #>$2710 + sta append.sub+1 + lda #myprintf.buf6 + sta append.dst+1 + jsr append + lda #myprintf.buf6+1 + sta dst+1 + ldx #1 + jmp b1 +} +// simple 'utoa' without using multiply or divide +// append(byte* zeropage($14) dst, word zeropage($12) value, word zeropage($16) sub) +append: { + .label value = $12 + .label return = $12 + .label dst = $14 + .label sub = $16 + lda #'0' + ldy #0 + sta (dst),y + b1: + lda sub+1 + cmp value+1 + bne !+ + lda sub + cmp value + !: + bcc b2 + beq b2 + rts + b2: + ldy #0 + lda (dst),y + clc + adc #1 + sta (dst),y + lda value + sec + sbc sub + sta value + lda value+1 + sbc sub+1 + sta value+1 + jmp b1 +} +// div10(word zeropage(4) val) +div10: { + .label _0 = 4 + .label _2 = 6 + .label _3 = 4 + .label _4 = 6 + .label _5 = 6 + .label val = 4 + .label val_1 = 6 + .label return = 4 + .label val_4 = 2 + lda val_4+1 + lsr + sta _0+1 + lda val_4 + ror + sta _0 + inc val + bne !+ + inc val+1 + !: + lda val + asl + sta _2 + lda val+1 + rol + sta _2+1 + lda val_1 + clc + adc val + sta val_1 + lda val_1+1 + adc val+1 + sta val_1+1 + sta _3+1 + lda val_1 + sta _3 + ldy #4 + !: + lsr _3+1 + ror _3 + dey + bne !- + lda val + clc + adc val_1 + sta val + lda val+1 + adc val_1+1 + sta val+1 + sta _4+1 + lda val + sta _4 + ldy #4 + !: + lsr _4+1 + ror _4 + dey + bne !- + ldy #4 + !: + lsr _5+1 + ror _5 + dey + bne !- + lda val + clc + adc _5 + sta val + lda val+1 + adc _5+1 + sta val+1 + ldy #4 + !: + lsr return+1 + ror return + dey + bne !- + rts +} +// Performs division on two 16 bit unsigned words +// Returns the quotient dividend/divisor. +// The remainder will be set into the global variable rem16u +// Implemented using simple binary division +// div16u(word zeropage(2) dividend) +div16u: { + .label divisor = $a + .label return = 4 + .label dividend = 2 + lda dividend + sta divr16u.dividend + lda dividend+1 + sta divr16u.dividend+1 + jsr divr16u + rts +} +// Performs division on two 16 bit unsigned words and an initial remainder +// Returns the quotient dividend/divisor. +// The final remainder will be set into the global variable rem16u +// Implemented using simple binary division +// divr16u(word zeropage(8) dividend, word zeropage(6) rem) +divr16u: { + .label rem = 6 + .label dividend = 8 + .label quotient = 4 + .label return = 4 + ldx #0 + txa + sta quotient + sta quotient+1 + sta rem + sta rem+1 + b1: + asl rem + rol rem+1 + lda dividend+1 + and #$80 + cmp #0 + beq b2 + lda #1 + ora rem + sta rem + b2: + asl dividend + rol dividend+1 + asl quotient + rol quotient+1 + lda rem+1 + cmp #>div16u.divisor + bcc b3 + bne !+ + lda rem + cmp #div16u.divisor + sta rem+1 + b3: + inx + cpx #$10 + bne b1 + rts +} + // "char buf16[16]" is the normal way -- not supported + strTemp: .fill $64, 0 diff --git a/src/test/ref/sandbox.cfg b/src/test/ref/sandbox.cfg new file mode 100644 index 000000000..0c3a7a7cf --- /dev/null +++ b/src/test/ref/sandbox.cfg @@ -0,0 +1,444 @@ +@begin: scope:[] from + [0] phi() + to:@1 +@1: scope:[] from @begin + [1] phi() + [2] call main + to:@end +@end: scope:[] from @1 + [3] phi() +main: scope:[main] from @1 + [4] *((const byte*) VICBANK#0) ← (byte/signed byte/word/signed word/dword/signed dword) $17 + [5] *((const byte*) zp1#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:main::@1 +main::@1: scope:[main] from main main::@10 + [6] (word) main::u#11 ← phi( main/(word/signed word/dword/signed dword) $6e85 main::@10/(word) main::u#2 ) + [7] *((const byte*) TIMEHI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + [8] *((const byte*) TIMELO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + [9] *((const byte*) zp2#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:main::@2 +main::@2: scope:[main] from main::@1 main::@8 + [10] (word) div16u::dividend#0 ← (word) main::u#11 + [11] call div16u + [12] (word) div16u::return#2 ← (word) div16u::return#0 + to:main::@8 +main::@8: scope:[main] from main::@2 + [13] (word) main::v#1 ← (word) div16u::return#2 + [14] *((const byte*) zp2#0) ← ++ *((const byte*) zp2#0) + [15] if(*((const byte*) zp2#0)<(byte/word/signed word/dword/signed dword) $c8) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@8 + [16] (word~) main::$2 ← ((word)) *((const byte*) TIMEHI#0) + [17] (word~) main::$3 ← (word~) main::$2 << (byte/signed byte/word/signed word/dword/signed dword) 8 + [18] (word~) main::$4 ← ((word)) *((const byte*) TIMELO#0) + [19] (word) myprintf::w3#0 ← (word~) main::$3 + (word~) main::$4 + [20] (word) myprintf::w1#0 ← (word) main::u#11 + [21] (word) myprintf::w2#0 ← (word) main::v#1 + [22] call myprintf + to:main::@9 +main::@9: scope:[main] from main::@3 + [23] phi() + [24] call Print + to:main::@10 +main::@10: scope:[main] from main::@9 + [25] (word) main::u#2 ← (word) main::u#11 - (word/signed word/dword/signed dword) $4d2 + [26] *((const byte*) zp1#0) ← ++ *((const byte*) zp1#0) + [27] if(*((const byte*) zp1#0)<(byte/signed byte/word/signed word/dword/signed dword) $a) goto main::@1 + to:main::@4 +main::@4: scope:[main] from main::@10 + [28] *((const byte*) zp1#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:main::@5 +main::@5: scope:[main] from main::@13 main::@4 + [29] (word) main::u#15 ← phi( main::@13/(word) main::u#4 main::@4/(word/signed word/dword/signed dword) $6e85 ) + [30] *((const byte*) TIMEHI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + [31] *((const byte*) TIMELO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + [32] *((const byte*) zp2#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:main::@6 +main::@6: scope:[main] from main::@11 main::@5 + [33] (word) div10::val#4 ← (word) main::u#15 + [34] call div10 + [35] (word) div10::return#2 ← (word) div10::return#0 + to:main::@11 +main::@11: scope:[main] from main::@6 + [36] (word) main::v#2 ← (word) div10::return#2 + [37] *((const byte*) zp2#0) ← ++ *((const byte*) zp2#0) + [38] if(*((const byte*) zp2#0)<(byte/word/signed word/dword/signed dword) $c8) goto main::@6 + to:main::@7 +main::@7: scope:[main] from main::@11 + [39] (word~) main::$11 ← ((word)) *((const byte*) TIMEHI#0) + [40] (word~) main::$12 ← (word~) main::$11 << (byte/signed byte/word/signed word/dword/signed dword) 8 + [41] (word~) main::$13 ← ((word)) *((const byte*) TIMELO#0) + [42] (word) myprintf::w3#1 ← (word~) main::$12 + (word~) main::$13 + [43] (word) myprintf::w1#1 ← (word) main::u#15 + [44] (word) myprintf::w2#1 ← (word) main::v#2 + [45] call myprintf + to:main::@12 +main::@12: scope:[main] from main::@7 + [46] phi() + [47] call Print + to:main::@13 +main::@13: scope:[main] from main::@12 + [48] (word) main::u#4 ← (word) main::u#15 - (word/signed word/dword/signed dword) $4d2 + [49] *((const byte*) zp1#0) ← ++ *((const byte*) zp1#0) + [50] if(*((const byte*) zp1#0)<(byte/signed byte/word/signed word/dword/signed dword) $a) goto main::@5 + to:main::@return +main::@return: scope:[main] from main::@13 + [51] return + to:@return +Print: scope:[Print] from main::@12 main::@9 + asm { ldy#0 loop: ldastrTemp,y beqdone jsr$FFD2 iny jmploop done: } + to:Print::@return +Print::@return: scope:[Print] from Print + [53] return + to:@return +myprintf: scope:[myprintf] from main::@3 main::@7 + [54] (word) myprintf::w3#7 ← phi( main::@3/(word) myprintf::w3#0 main::@7/(word) myprintf::w3#1 ) + [54] (word) myprintf::w2#7 ← phi( main::@3/(word) myprintf::w2#0 main::@7/(word) myprintf::w2#1 ) + [54] (word) myprintf::w1#6 ← phi( main::@3/(word) myprintf::w1#0 main::@7/(word) myprintf::w1#1 ) + [54] (byte*) myprintf::str#5 ← phi( main::@3/(const string) main::str main::@7/(const string) main::str1 ) + to:myprintf::@1 +myprintf::@1: scope:[myprintf] from myprintf myprintf::@27 + [55] (byte) myprintf::bLeadZero#10 ← phi( myprintf/(byte/signed byte/word/signed word/dword/signed dword) 0 myprintf::@27/(byte) myprintf::bLeadZero#18 ) + [55] (byte) myprintf::bDigits#14 ← phi( myprintf/(byte/signed byte/word/signed word/dword/signed dword) 0 myprintf::@27/(byte) myprintf::bDigits#24 ) + [55] (byte) myprintf::bTrailing#10 ← phi( myprintf/(byte/signed byte/word/signed word/dword/signed dword) 0 myprintf::@27/(byte) myprintf::bTrailing#21 ) + [55] (word) myprintf::w#10 ← phi( myprintf/(byte/signed byte/word/signed word/dword/signed dword) 0 myprintf::@27/(word) myprintf::w#17 ) + [55] (byte) myprintf::bLen#14 ← phi( myprintf/(byte/signed byte/word/signed word/dword/signed dword) 0 myprintf::@27/(byte) myprintf::return#0 ) + [55] (byte) myprintf::bArg#12 ← phi( myprintf/(byte/signed byte/word/signed word/dword/signed dword) 0 myprintf::@27/(byte) myprintf::bArg#10 ) + [55] (byte) myprintf::bFormat#10 ← phi( myprintf/(byte/signed byte/word/signed word/dword/signed dword) 0 myprintf::@27/(byte) myprintf::bFormat#4 ) + [55] (byte*) myprintf::str#10 ← phi( myprintf/(byte*) myprintf::str#5 myprintf::@27/(byte*) myprintf::str#0 ) + [56] (byte) myprintf::b#1 ← *((byte*) myprintf::str#10) + [57] if((byte) myprintf::bFormat#10==(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@2 + to:myprintf::@31 +myprintf::@31: scope:[myprintf] from myprintf::@1 + [58] if((byte) myprintf::b#1!=(byte) '0') goto myprintf::@3 + to:myprintf::@27 +myprintf::@27: scope:[myprintf] from myprintf::@22 myprintf::@23 myprintf::@29 myprintf::@30 myprintf::@31 myprintf::@4 + [59] (byte) myprintf::bLeadZero#18 ← phi( myprintf::@22/(byte) myprintf::bLeadZero#10 myprintf::@23/(byte) myprintf::bLeadZero#10 myprintf::@4/(byte) myprintf::bLeadZero#10 myprintf::@29/(byte/signed byte/word/signed word/dword/signed dword) 0 myprintf::@30/(byte) myprintf::bLeadZero#10 myprintf::@31/(byte/signed byte/word/signed word/dword/signed dword) 1 ) + [59] (byte) myprintf::bDigits#24 ← phi( myprintf::@22/(byte) myprintf::bDigits#25 myprintf::@23/(byte) myprintf::bDigits#1 myprintf::@4/(byte) myprintf::bDigits#14 myprintf::@29/(byte/signed byte/word/signed word/dword/signed dword) 1 myprintf::@30/(byte) myprintf::bDigits#14 myprintf::@31/(byte) myprintf::bDigits#14 ) + [59] (byte) myprintf::bTrailing#21 ← phi( myprintf::@22/(byte) myprintf::bTrailing#10 myprintf::@23/(byte) myprintf::bTrailing#10 myprintf::@4/(byte/signed byte/word/signed word/dword/signed dword) 1 myprintf::@29/(byte/signed byte/word/signed word/dword/signed dword) 0 myprintf::@30/(byte) myprintf::bTrailing#10 myprintf::@31/(byte) myprintf::bTrailing#10 ) + [59] (word) myprintf::w#17 ← phi( myprintf::@22/(word) myprintf::w#10 myprintf::@23/(word) myprintf::w#10 myprintf::@4/(word) myprintf::w#10 myprintf::@29/(word) myprintf::w#21 myprintf::@30/(word) myprintf::w#10 myprintf::@31/(word) myprintf::w#10 ) + [59] (byte) myprintf::bArg#10 ← phi( myprintf::@22/(byte) myprintf::bArg#12 myprintf::@23/(byte) myprintf::bArg#12 myprintf::@4/(byte) myprintf::bArg#12 myprintf::@29/(byte) myprintf::bArg#1 myprintf::@30/(byte) myprintf::bArg#12 myprintf::@31/(byte) myprintf::bArg#12 ) + [59] (byte) myprintf::return#0 ← phi( myprintf::@22/(byte) myprintf::bLen#28 myprintf::@23/(byte) myprintf::bLen#14 myprintf::@4/(byte) myprintf::bLen#14 myprintf::@29/(byte) myprintf::bLen#14 myprintf::@30/(byte) myprintf::bLen#7 myprintf::@31/(byte) myprintf::bLen#14 ) + [59] (byte) myprintf::bFormat#4 ← phi( myprintf::@22/(byte/signed byte/word/signed word/dword/signed dword) 0 myprintf::@23/(byte) myprintf::bFormat#10 myprintf::@4/(byte) myprintf::bFormat#10 myprintf::@29/(byte/signed byte/word/signed word/dword/signed dword) 1 myprintf::@30/(byte) myprintf::bFormat#10 myprintf::@31/(byte) myprintf::bFormat#10 ) + [60] (byte*) myprintf::str#0 ← ++ (byte*) myprintf::str#10 + [61] if(*((byte*) myprintf::str#0)!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@1 + to:myprintf::@36 +myprintf::@36: scope:[myprintf] from myprintf::@27 + [62] *((const byte[$64]) strTemp#0 + (byte) myprintf::return#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:myprintf::@return +myprintf::@return: scope:[myprintf] from myprintf::@36 + [63] return + to:@return +myprintf::@3: scope:[myprintf] from myprintf::@31 + [64] if((byte) myprintf::b#1>=(byte) '1') goto myprintf::@37 + to:myprintf::@4 +myprintf::@4: scope:[myprintf] from myprintf::@3 myprintf::@37 + [65] if((byte) myprintf::b#1!=(byte) '-') goto myprintf::@5 + to:myprintf::@27 +myprintf::@5: scope:[myprintf] from myprintf::@4 + [66] if((byte) myprintf::b#1==(byte) 'c') goto myprintf::@6 + to:myprintf::@24 +myprintf::@24: scope:[myprintf] from myprintf::@5 + [67] if((byte) myprintf::b#1==(byte) 'd') goto myprintf::@7 + to:myprintf::@25 +myprintf::@25: scope:[myprintf] from myprintf::@24 + [68] if((byte) myprintf::b#1==(byte) 'x') goto myprintf::@26 + to:myprintf::@38 +myprintf::@38: scope:[myprintf] from myprintf::@25 + [69] if((byte) myprintf::b#1==(byte) 'X') goto myprintf::@26 + to:myprintf::@22 +myprintf::@22: scope:[myprintf] from myprintf::@11 myprintf::@20 myprintf::@21 myprintf::@38 myprintf::@40 myprintf::@6 + [70] (byte) myprintf::bDigits#25 ← phi( myprintf::@11/(byte) myprintf::bDigits#14 myprintf::@20/(byte) myprintf::bDigits#16 myprintf::@21/(byte) myprintf::bDigits#3 myprintf::@6/(byte) myprintf::bDigits#14 myprintf::@38/(byte) myprintf::bDigits#14 myprintf::@40/(byte) myprintf::bDigits#16 ) + [70] (byte) myprintf::bLen#28 ← phi( myprintf::@11/(byte) myprintf::bLen#3 myprintf::@20/(byte) myprintf::bLen#24 myprintf::@21/(byte) myprintf::bLen#6 myprintf::@6/(byte) myprintf::bLen#1 myprintf::@38/(byte) myprintf::bLen#14 myprintf::@40/(byte) myprintf::bLen#24 ) + to:myprintf::@27 +myprintf::@26: scope:[myprintf] from myprintf::@25 myprintf::@38 + [71] (word~) myprintf::$17 ← (word) myprintf::w#10 >> (byte/signed byte/word/signed word/dword/signed dword) 4 + [72] (byte) myprintf::b#15 ← (word~) myprintf::$17 & (byte/signed byte/word/signed word/dword/signed dword) $f + [73] if((byte) myprintf::b#15<(byte/signed byte/word/signed word/dword/signed dword) $a) goto myprintf::@9 + to:myprintf::@8 +myprintf::@8: scope:[myprintf] from myprintf::@26 + [74] phi() + to:myprintf::@9 +myprintf::@9: scope:[myprintf] from myprintf::@26 myprintf::@8 + [75] (byte~) myprintf::$22 ← phi( myprintf::@26/(byte) '0' myprintf::@8/(byte/signed byte/word/signed word/dword/signed dword) $57 ) + [76] (byte~) myprintf::$23 ← (byte~) myprintf::$22 + (byte) myprintf::b#15 + [77] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$23 + [78] (byte) myprintf::bLen#10 ← ++ (byte) myprintf::bLen#14 + [79] (byte) myprintf::b#16 ← (word) myprintf::w#10 & (byte/signed byte/word/signed word/dword/signed dword) $f + [80] if((byte) myprintf::b#16<(byte/signed byte/word/signed word/dword/signed dword) $a) goto myprintf::@11 + to:myprintf::@10 +myprintf::@10: scope:[myprintf] from myprintf::@9 + [81] phi() + to:myprintf::@11 +myprintf::@11: scope:[myprintf] from myprintf::@10 myprintf::@9 + [82] (byte~) myprintf::$28 ← phi( myprintf::@9/(byte) '0' myprintf::@10/(byte/signed byte/word/signed word/dword/signed dword) $57 ) + [83] (byte~) myprintf::$29 ← (byte~) myprintf::$28 + (byte) myprintf::b#16 + [84] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#10) ← (byte~) myprintf::$29 + [85] (byte) myprintf::bLen#3 ← ++ (byte) myprintf::bLen#10 + to:myprintf::@22 +myprintf::@7: scope:[myprintf] from myprintf::@24 + [86] (word) utoa::value#4 ← (word) myprintf::w#10 + [87] call utoa + to:myprintf::@12 +myprintf::@12: scope:[myprintf] from myprintf::@13 myprintf::@7 + [88] (byte) myprintf::b#17 ← phi( myprintf::@13/(byte) myprintf::b#5 myprintf::@7/(byte/signed byte/word/signed word/dword/signed dword) 1 ) + [89] if(*((const byte[6]) myprintf::buf6#0 + (byte) myprintf::b#17)!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@13 + to:myprintf::@14 +myprintf::@14: scope:[myprintf] from myprintf::@12 + [90] if((byte) myprintf::bTrailing#10==(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@39 + to:myprintf::@15 +myprintf::@15: scope:[myprintf] from myprintf::@14 myprintf::@18 myprintf::@39 + [91] (byte) myprintf::bDigits#16 ← phi( myprintf::@14/(byte) myprintf::bDigits#14 myprintf::@18/(byte) myprintf::bDigits#2 ) + [91] (byte) myprintf::bLen#23 ← phi( myprintf::@14/(byte) myprintf::bLen#14 myprintf::@18/(byte) myprintf::bLen#4 ) + to:myprintf::@19 +myprintf::@19: scope:[myprintf] from myprintf::@15 myprintf::@19 + [92] (byte) myprintf::bLen#12 ← phi( myprintf::@15/(byte) myprintf::bLen#23 myprintf::@19/(byte) myprintf::bLen#24 ) + [92] (byte) myprintf::digit#3 ← phi( myprintf::@15/(byte/signed byte/word/signed word/dword/signed dword) 0 myprintf::@19/(byte) myprintf::digit#2 ) + [93] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#12) ← *((const byte[6]) myprintf::buf6#0 + (byte) myprintf::digit#3) + [94] (byte) myprintf::bLen#24 ← ++ (byte) myprintf::bLen#12 + [95] (byte) myprintf::digit#2 ← ++ (byte) myprintf::digit#3 + [96] if((byte) myprintf::digit#2<(byte) myprintf::b#17) goto myprintf::@19 + to:myprintf::@20 +myprintf::@20: scope:[myprintf] from myprintf::@19 + [97] if((byte) myprintf::bTrailing#10!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@40 + to:myprintf::@22 +myprintf::@40: scope:[myprintf] from myprintf::@20 + [98] if((byte) myprintf::bDigits#16>(byte) myprintf::b#17) goto myprintf::@21 + to:myprintf::@22 +myprintf::@21: scope:[myprintf] from myprintf::@21 myprintf::@40 + [99] (byte) myprintf::bDigits#8 ← phi( myprintf::@40/(byte) myprintf::bDigits#16 myprintf::@21/(byte) myprintf::bDigits#3 ) + [99] (byte) myprintf::bLen#13 ← phi( myprintf::@40/(byte) myprintf::bLen#24 myprintf::@21/(byte) myprintf::bLen#6 ) + [100] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#13) ← (byte) ' ' + [101] (byte) myprintf::bLen#6 ← ++ (byte) myprintf::bLen#13 + [102] (byte) myprintf::bDigits#3 ← -- (byte) myprintf::bDigits#8 + [103] if((byte) myprintf::bDigits#3>(byte) myprintf::b#17) goto myprintf::@21 + to:myprintf::@22 +myprintf::@39: scope:[myprintf] from myprintf::@14 + [104] if((byte) myprintf::bDigits#14>(byte) myprintf::b#17) goto myprintf::@16 + to:myprintf::@15 +myprintf::@16: scope:[myprintf] from myprintf::@18 myprintf::@39 + [105] (byte) myprintf::bDigits#10 ← phi( myprintf::@39/(byte) myprintf::bDigits#14 myprintf::@18/(byte) myprintf::bDigits#2 ) + [105] (byte) myprintf::bLen#11 ← phi( myprintf::@39/(byte) myprintf::bLen#14 myprintf::@18/(byte) myprintf::bLen#4 ) + [106] if((byte) myprintf::bLeadZero#10==(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@18 + to:myprintf::@17 +myprintf::@17: scope:[myprintf] from myprintf::@16 + [107] phi() + to:myprintf::@18 +myprintf::@18: scope:[myprintf] from myprintf::@16 myprintf::@17 + [108] (byte~) myprintf::$39 ← phi( myprintf::@16/(byte) ' ' myprintf::@17/(byte) '0' ) + [109] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#11) ← (byte~) myprintf::$39 + [110] (byte) myprintf::bLen#4 ← ++ (byte) myprintf::bLen#11 + [111] (byte) myprintf::bDigits#2 ← -- (byte) myprintf::bDigits#10 + [112] if((byte) myprintf::bDigits#2>(byte) myprintf::b#17) goto myprintf::@16 + to:myprintf::@15 +myprintf::@13: scope:[myprintf] from myprintf::@12 + [113] (byte) myprintf::b#5 ← ++ (byte) myprintf::b#17 + to:myprintf::@12 +myprintf::@6: scope:[myprintf] from myprintf::@5 + [114] (byte~) myprintf::$47 ← ((byte)) (word) myprintf::w#10 + [115] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$47 + [116] (byte) myprintf::bLen#1 ← ++ (byte) myprintf::bLen#14 + to:myprintf::@22 +myprintf::@37: scope:[myprintf] from myprintf::@3 + [117] if((byte) myprintf::b#1<=(byte) '9') goto myprintf::@23 + to:myprintf::@4 +myprintf::@23: scope:[myprintf] from myprintf::@37 + [118] (byte) myprintf::bDigits#1 ← (byte) myprintf::b#1 - (byte) '0' + to:myprintf::@27 +myprintf::@2: scope:[myprintf] from myprintf::@1 + [119] if((byte) myprintf::b#1!=(byte) '%') goto myprintf::@28 + to:myprintf::@32 +myprintf::@32: scope:[myprintf] from myprintf::@2 + [120] if((byte) myprintf::bArg#12==(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@42 + to:myprintf::@33 +myprintf::@33: scope:[myprintf] from myprintf::@32 + [121] if((byte) myprintf::bArg#12==(byte/signed byte/word/signed word/dword/signed dword) 1) goto myprintf::@43 + to:myprintf::@34 +myprintf::@34: scope:[myprintf] from myprintf::@33 + [122] (word~) myprintf::w#53 ← (word) myprintf::w3#7 + to:myprintf::@29 +myprintf::@29: scope:[myprintf] from myprintf::@34 myprintf::@42 myprintf::@43 + [123] (word) myprintf::w#21 ← phi( myprintf::@42/(word~) myprintf::w#51 myprintf::@43/(word~) myprintf::w#52 myprintf::@34/(word~) myprintf::w#53 ) + [124] (byte) myprintf::bArg#1 ← ++ (byte) myprintf::bArg#12 + to:myprintf::@27 +myprintf::@43: scope:[myprintf] from myprintf::@33 + [125] (word~) myprintf::w#52 ← (word) myprintf::w2#7 + to:myprintf::@29 +myprintf::@42: scope:[myprintf] from myprintf::@32 + [126] (word~) myprintf::w#51 ← (word) myprintf::w1#6 + to:myprintf::@29 +myprintf::@28: scope:[myprintf] from myprintf::@2 + [127] if((byte) myprintf::b#1>=(byte/signed byte/word/signed word/dword/signed dword) $41) goto myprintf::@41 + to:myprintf::@30 +myprintf::@30: scope:[myprintf] from myprintf::@28 myprintf::@35 myprintf::@41 + [128] (byte) myprintf::b#25 ← phi( myprintf::@28/(byte) myprintf::b#1 myprintf::@35/(byte) myprintf::b#6 ) + [129] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte) myprintf::b#25 + [130] (byte) myprintf::bLen#7 ← ++ (byte) myprintf::bLen#14 + to:myprintf::@27 +myprintf::@41: scope:[myprintf] from myprintf::@28 + [131] if((byte) myprintf::b#1<(byte/signed byte/word/signed word/dword/signed dword) $5a+(byte/signed byte/word/signed word/dword/signed dword) 1) goto myprintf::@35 + to:myprintf::@30 +myprintf::@35: scope:[myprintf] from myprintf::@41 + [132] (byte) myprintf::b#6 ← (byte) myprintf::b#1 + (byte/signed byte/word/signed word/dword/signed dword) $20 + to:myprintf::@30 +utoa: scope:[utoa] from myprintf::@7 + [133] phi() + to:utoa::@13 +utoa::@13: scope:[utoa] from utoa + [134] if((word) utoa::value#4>=(word/signed word/dword/signed dword) $2710) goto utoa::@5 + to:utoa::@1 +utoa::@1: scope:[utoa] from utoa::@13 utoa::@9 + [135] (byte*) utoa::dst#16 ← phi( utoa::@13/(const byte[6]) myprintf::buf6#0 utoa::@9/++(const byte[6]) myprintf::buf6#0 ) + [135] (word) utoa::value#6 ← phi( utoa::@13/(word) utoa::value#4 utoa::@9/(word) utoa::value#0 ) + [135] (byte) utoa::bStarted#5 ← phi( utoa::@13/(byte/signed byte/word/signed word/dword/signed dword) 0 utoa::@9/(byte/signed byte/word/signed word/dword/signed dword) 1 ) + [136] if((byte) utoa::bStarted#5==(byte/signed byte/word/signed word/dword/signed dword) 1) goto utoa::@6 + to:utoa::@14 +utoa::@14: scope:[utoa] from utoa::@1 + [137] if((word) utoa::value#6>=(word/signed word/dword/signed dword) $3e8) goto utoa::@6 + to:utoa::@2 +utoa::@2: scope:[utoa] from utoa::@10 utoa::@14 + [138] (byte*) utoa::dst#10 ← phi( utoa::@14/(byte*) utoa::dst#16 utoa::@10/(byte*) utoa::dst#1 ) + [138] (word) utoa::value#11 ← phi( utoa::@14/(word) utoa::value#6 utoa::@10/(word) utoa::value#1 ) + [138] (byte) utoa::bStarted#6 ← phi( utoa::@14/(byte) utoa::bStarted#5 utoa::@10/(byte/signed byte/word/signed word/dword/signed dword) 1 ) + [139] if((byte) utoa::bStarted#6==(byte/signed byte/word/signed word/dword/signed dword) 1) goto utoa::@7 + to:utoa::@15 +utoa::@15: scope:[utoa] from utoa::@2 + [140] if((word) utoa::value#11>=(byte/signed byte/word/signed word/dword/signed dword) $64) goto utoa::@7 + to:utoa::@3 +utoa::@3: scope:[utoa] from utoa::@11 utoa::@15 + [141] (byte*) utoa::dst#13 ← phi( utoa::@11/(byte*) utoa::dst#2 utoa::@15/(byte*) utoa::dst#10 ) + [141] (word) utoa::value#10 ← phi( utoa::@11/(word) utoa::value#2 utoa::@15/(word) utoa::value#11 ) + [141] (byte) utoa::bStarted#7 ← phi( utoa::@11/(byte/signed byte/word/signed word/dword/signed dword) 1 utoa::@15/(byte) utoa::bStarted#6 ) + [142] if((byte) utoa::bStarted#7==(byte/signed byte/word/signed word/dword/signed dword) 1) goto utoa::@8 + to:utoa::@16 +utoa::@16: scope:[utoa] from utoa::@3 + [143] if((word) utoa::value#10>=(byte/signed byte/word/signed word/dword/signed dword) $a) goto utoa::@8 + to:utoa::@4 +utoa::@4: scope:[utoa] from utoa::@12 utoa::@16 + [144] (byte*) utoa::dst#12 ← phi( utoa::@12/(byte*) utoa::dst#4 utoa::@16/(byte*) utoa::dst#13 ) + [144] (word) utoa::value#12 ← phi( utoa::@12/(word) utoa::value#3 utoa::@16/(word) utoa::value#10 ) + [145] (byte~) utoa::$16 ← ((byte)) (word) utoa::value#12 + [146] (byte~) utoa::$17 ← (byte) '0' + (byte~) utoa::$16 + [147] *((byte*) utoa::dst#12) ← (byte~) utoa::$17 + [148] (byte*) utoa::dst#3 ← ++ (byte*) utoa::dst#12 + [149] *((byte*) utoa::dst#3) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:utoa::@return +utoa::@return: scope:[utoa] from utoa::@4 + [150] return + to:@return +utoa::@8: scope:[utoa] from utoa::@16 utoa::@3 + [151] (byte*) append::dst#3 ← (byte*) utoa::dst#13 + [152] (word) append::value#4 ← (word) utoa::value#10 + [153] call append + [154] (word) append::return#10 ← (word) append::value#5 + to:utoa::@12 +utoa::@12: scope:[utoa] from utoa::@8 + [155] (word) utoa::value#3 ← (word) append::return#10 + [156] (byte*) utoa::dst#4 ← ++ (byte*) utoa::dst#13 + to:utoa::@4 +utoa::@7: scope:[utoa] from utoa::@15 utoa::@2 + [157] (byte*) append::dst#2 ← (byte*) utoa::dst#10 + [158] (word) append::value#3 ← (word) utoa::value#11 + [159] call append + [160] (word) append::return#4 ← (word) append::value#5 + to:utoa::@11 +utoa::@11: scope:[utoa] from utoa::@7 + [161] (word) utoa::value#2 ← (word) append::return#4 + [162] (byte*) utoa::dst#2 ← ++ (byte*) utoa::dst#10 + to:utoa::@3 +utoa::@6: scope:[utoa] from utoa::@1 utoa::@14 + [163] (byte*) append::dst#1 ← (byte*) utoa::dst#16 + [164] (word) append::value#2 ← (word) utoa::value#6 + [165] call append + [166] (word) append::return#3 ← (word) append::value#5 + to:utoa::@10 +utoa::@10: scope:[utoa] from utoa::@6 + [167] (word) utoa::value#1 ← (word) append::return#3 + [168] (byte*) utoa::dst#1 ← ++ (byte*) utoa::dst#16 + to:utoa::@2 +utoa::@5: scope:[utoa] from utoa::@13 + [169] (word) append::value#1 ← (word) utoa::value#4 + [170] call append + [171] (word) append::return#2 ← (word) append::value#5 + to:utoa::@9 +utoa::@9: scope:[utoa] from utoa::@5 + [172] (word) utoa::value#0 ← (word) append::return#2 + to:utoa::@1 +append: scope:[append] from utoa::@5 utoa::@6 utoa::@7 utoa::@8 + [173] (word) append::sub#6 ← phi( utoa::@5/(word/signed word/dword/signed dword) $2710 utoa::@6/(word/signed word/dword/signed dword) $3e8 utoa::@7/(byte/signed byte/word/signed word/dword/signed dword) $64 utoa::@8/(byte/signed byte/word/signed word/dword/signed dword) $a ) + [173] (word) append::value#8 ← phi( utoa::@5/(word) append::value#1 utoa::@6/(word) append::value#2 utoa::@7/(word) append::value#3 utoa::@8/(word) append::value#4 ) + [173] (byte*) append::dst#4 ← phi( utoa::@5/(const byte[6]) myprintf::buf6#0 utoa::@6/(byte*) append::dst#1 utoa::@7/(byte*) append::dst#2 utoa::@8/(byte*) append::dst#3 ) + [174] *((byte*) append::dst#4) ← (byte) '0' + to:append::@1 +append::@1: scope:[append] from append append::@2 + [175] (word) append::value#5 ← phi( append/(word) append::value#8 append::@2/(word) append::value#0 ) + [176] if((word) append::value#5>=(word) append::sub#6) goto append::@2 + to:append::@return +append::@return: scope:[append] from append::@1 + [177] return + to:@return +append::@2: scope:[append] from append::@1 + [178] *((byte*) append::dst#4) ← ++ *((byte*) append::dst#4) + [179] (word) append::value#0 ← (word) append::value#5 - (word) append::sub#6 + to:append::@1 +div10: scope:[div10] from main::@6 + [180] (word~) div10::$0 ← (word) div10::val#4 >> (byte/signed byte/word/signed word/dword/signed dword) 1 + [181] (word) div10::val#0 ← (word~) div10::$0 + (byte/signed byte/word/signed word/dword/signed dword) 1 + [182] (word~) div10::$2 ← (word) div10::val#0 << (byte/signed byte/word/signed word/dword/signed dword) 1 + [183] (word) div10::val#1 ← (word) div10::val#0 + (word~) div10::$2 + [184] (word~) div10::$3 ← (word) div10::val#1 >> (byte/signed byte/word/signed word/dword/signed dword) 4 + [185] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 + [186] (word~) div10::$4 ← (word) div10::val#2 >> (byte/signed byte/word/signed word/dword/signed dword) 4 + [187] (word~) div10::$5 ← (word~) div10::$4 >> (byte/signed byte/word/signed word/dword/signed dword) 4 + [188] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$5 + [189] (word) div10::return#0 ← (word) div10::val#3 >> (byte/signed byte/word/signed word/dword/signed dword) 4 + to:div10::@return +div10::@return: scope:[div10] from div10 + [190] return + to:@return +div16u: scope:[div16u] from main::@2 + [191] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 + [192] call divr16u + [193] (word) divr16u::return#2 ← (word) divr16u::return#0 + to:div16u::@1 +div16u::@1: scope:[div16u] from div16u + [194] (word) div16u::return#0 ← (word) divr16u::return#2 + to:div16u::@return +div16u::@return: scope:[div16u] from div16u::@1 + [195] return + to:@return +divr16u: scope:[divr16u] from div16u + [196] phi() + to:divr16u::@1 +divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 + [197] (byte) divr16u::i#2 ← phi( divr16u/(byte/signed byte/word/signed word/dword/signed dword) 0 divr16u::@3/(byte) divr16u::i#1 ) + [197] (word) divr16u::quotient#3 ← phi( divr16u/(byte/signed byte/word/signed word/dword/signed dword) 0 divr16u::@3/(word) divr16u::return#0 ) + [197] (word) divr16u::dividend#2 ← phi( divr16u/(word) divr16u::dividend#1 divr16u::@3/(word) divr16u::dividend#0 ) + [197] (word) divr16u::rem#4 ← phi( divr16u/(byte/signed byte/word/signed word/dword/signed dword) 0 divr16u::@3/(word) divr16u::rem#9 ) + [198] (word) divr16u::rem#0 ← (word) divr16u::rem#4 << (byte/signed byte/word/signed word/dword/signed dword) 1 + [199] (byte~) divr16u::$1 ← > (word) divr16u::dividend#2 + [200] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte/word/signed word/dword/signed dword) $80 + [201] if((byte~) divr16u::$2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16u::@2 + to:divr16u::@4 +divr16u::@4: scope:[divr16u] from divr16u::@1 + [202] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte/signed byte/word/signed word/dword/signed dword) 1 + to:divr16u::@2 +divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 + [203] (word) divr16u::rem#5 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [204] (word) divr16u::dividend#0 ← (word) divr16u::dividend#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 + [205] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte/signed byte/word/signed word/dword/signed dword) 1 + [206] if((word) divr16u::rem#5<(const word) div16u::divisor#0) goto divr16u::@3 + to:divr16u::@5 +divr16u::@5: scope:[divr16u] from divr16u::@2 + [207] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [208] (word) divr16u::rem#2 ← (word) divr16u::rem#5 - (const word) div16u::divisor#0 + to:divr16u::@3 +divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 + [209] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [209] (word) divr16u::rem#9 ← phi( divr16u::@2/(word) divr16u::rem#5 divr16u::@5/(word) divr16u::rem#2 ) + [210] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [211] if((byte) divr16u::i#1!=(byte/signed byte/word/signed word/dword/signed dword) $10) goto divr16u::@1 + to:divr16u::@return +divr16u::@return: scope:[divr16u] from divr16u::@3 + [212] return + to:@return diff --git a/src/test/ref/sandbox.log b/src/test/ref/sandbox.log new file mode 100644 index 000000000..78165ea55 --- /dev/null +++ b/src/test/ref/sandbox.log @@ -0,0 +1,9025 @@ + +CONTROL FLOW GRAPH SSA +@begin: scope:[] from + to:@8 +divr16u: scope:[divr16u] from div16u + (word) divr16u::divisor#5 ← phi( div16u/(word) divr16u::divisor#0 ) + (word) divr16u::dividend#4 ← phi( div16u/(word) divr16u::dividend#1 ) + (word) divr16u::rem#8 ← phi( div16u/(word) divr16u::rem#3 ) + (word) divr16u::quotient#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) divr16u::i#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:divr16u::@1 +divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 + (byte) divr16u::i#5 ← phi( divr16u/(byte) divr16u::i#0 divr16u::@3/(byte) divr16u::i#1 ) + (word) divr16u::divisor#3 ← phi( divr16u/(word) divr16u::divisor#5 divr16u::@3/(word) divr16u::divisor#6 ) + (word) divr16u::quotient#6 ← phi( divr16u/(word) divr16u::quotient#0 divr16u::@3/(word) divr16u::quotient#8 ) + (word) divr16u::dividend#2 ← phi( divr16u/(word) divr16u::dividend#4 divr16u::@3/(word) divr16u::dividend#5 ) + (word) divr16u::rem#4 ← phi( divr16u/(word) divr16u::rem#8 divr16u::@3/(word) divr16u::rem#9 ) + (word~) divr16u::$0 ← (word) divr16u::rem#4 << (byte/signed byte/word/signed word/dword/signed dword) 1 + (word) divr16u::rem#0 ← (word~) divr16u::$0 + (byte~) divr16u::$1 ← > (word) divr16u::dividend#2 + (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte/word/signed word/dword/signed dword) $80 + (bool~) divr16u::$3 ← (byte~) divr16u::$2 != (byte/signed byte/word/signed word/dword/signed dword) 0 + (bool~) divr16u::$4 ← ! (bool~) divr16u::$3 + if((bool~) divr16u::$4) goto divr16u::@2 + to:divr16u::@4 +divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 + (byte) divr16u::i#3 ← phi( divr16u::@1/(byte) divr16u::i#5 divr16u::@4/(byte) divr16u::i#6 ) + (word) divr16u::divisor#1 ← phi( divr16u::@1/(word) divr16u::divisor#3 divr16u::@4/(word) divr16u::divisor#4 ) + (word) divr16u::rem#5 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + (word) divr16u::quotient#3 ← phi( divr16u::@1/(word) divr16u::quotient#6 divr16u::@4/(word) divr16u::quotient#7 ) + (word) divr16u::dividend#3 ← phi( divr16u::@1/(word) divr16u::dividend#2 divr16u::@4/(word) divr16u::dividend#6 ) + (word~) divr16u::$6 ← (word) divr16u::dividend#3 << (byte/signed byte/word/signed word/dword/signed dword) 1 + (word) divr16u::dividend#0 ← (word~) divr16u::$6 + (word~) divr16u::$7 ← (word) divr16u::quotient#3 << (byte/signed byte/word/signed word/dword/signed dword) 1 + (word) divr16u::quotient#1 ← (word~) divr16u::$7 + (bool~) divr16u::$8 ← (word) divr16u::rem#5 >= (word) divr16u::divisor#1 + (bool~) divr16u::$9 ← ! (bool~) divr16u::$8 + if((bool~) divr16u::$9) goto divr16u::@3 + to:divr16u::@5 +divr16u::@4: scope:[divr16u] from divr16u::@1 + (byte) divr16u::i#6 ← phi( divr16u::@1/(byte) divr16u::i#5 ) + (word) divr16u::divisor#4 ← phi( divr16u::@1/(word) divr16u::divisor#3 ) + (word) divr16u::quotient#7 ← phi( divr16u::@1/(word) divr16u::quotient#6 ) + (word) divr16u::dividend#6 ← phi( divr16u::@1/(word) divr16u::dividend#2 ) + (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 ) + (word/dword~) divr16u::$5 ← (word) divr16u::rem#6 | (byte/signed byte/word/signed word/dword/signed dword) 1 + (word) divr16u::rem#1 ← (word/dword~) divr16u::$5 + to:divr16u::@2 +divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 + (word) divr16u::divisor#6 ← phi( divr16u::@2/(word) divr16u::divisor#1 divr16u::@5/(word) divr16u::divisor#2 ) + (word) divr16u::quotient#8 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + (word) divr16u::dividend#5 ← phi( divr16u::@2/(word) divr16u::dividend#0 divr16u::@5/(word) divr16u::dividend#7 ) + (word) divr16u::rem#9 ← phi( divr16u::@2/(word) divr16u::rem#5 divr16u::@5/(word) divr16u::rem#2 ) + (byte) divr16u::i#2 ← phi( divr16u::@2/(byte) divr16u::i#3 divr16u::@5/(byte) divr16u::i#4 ) + (byte) divr16u::i#1 ← (byte) divr16u::i#2 + rangenext(0,$f) + (bool~) divr16u::$11 ← (byte) divr16u::i#1 != rangelast(0,$f) + if((bool~) divr16u::$11) goto divr16u::@1 + to:divr16u::@6 +divr16u::@5: scope:[divr16u] from divr16u::@2 + (word) divr16u::dividend#7 ← phi( divr16u::@2/(word) divr16u::dividend#0 ) + (byte) divr16u::i#4 ← phi( divr16u::@2/(byte) divr16u::i#3 ) + (word) divr16u::divisor#2 ← phi( divr16u::@2/(word) divr16u::divisor#1 ) + (word) divr16u::rem#7 ← phi( divr16u::@2/(word) divr16u::rem#5 ) + (word) divr16u::quotient#4 ← phi( divr16u::@2/(word) divr16u::quotient#1 ) + (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#4 + (word~) divr16u::$10 ← (word) divr16u::rem#7 - (word) divr16u::divisor#2 + (word) divr16u::rem#2 ← (word~) divr16u::$10 + to:divr16u::@3 +divr16u::@6: scope:[divr16u] from divr16u::@3 + (word) divr16u::quotient#5 ← phi( divr16u::@3/(word) divr16u::quotient#8 ) + (word) divr16u::return#0 ← (word) divr16u::quotient#5 + to:divr16u::@return +divr16u::@return: scope:[divr16u] from divr16u::@6 + (word) divr16u::return#3 ← phi( divr16u::@6/(word) divr16u::return#0 ) + (word) divr16u::return#1 ← (word) divr16u::return#3 + return + to:@return +div16u: scope:[div16u] from main::@2 + (word) div16u::divisor#1 ← phi( main::@2/(word) div16u::divisor#0 ) + (word) div16u::dividend#1 ← phi( main::@2/(word) div16u::dividend#0 ) + (word) divr16u::dividend#1 ← (word) div16u::dividend#1 + (word) divr16u::divisor#0 ← (word) div16u::divisor#1 + (word) divr16u::rem#3 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + call divr16u + (word) divr16u::return#2 ← (word) divr16u::return#1 + to:div16u::@2 +div16u::@2: scope:[div16u] from div16u + (word) divr16u::return#4 ← phi( div16u/(word) divr16u::return#2 ) + (word~) div16u::$0 ← (word) divr16u::return#4 + (word) div16u::return#0 ← (word~) div16u::$0 + to:div16u::@return +div16u::@return: scope:[div16u] from div16u::@2 + (word) div16u::return#3 ← phi( div16u::@2/(word) div16u::return#0 ) + (word) div16u::return#1 ← (word) div16u::return#3 + return + to:@return +@8: scope:[] from @begin + (byte*) zp1#0 ← ((byte*)) (byte/signed byte/word/signed word/dword/signed dword) $61 + (byte*) zp2#0 ← ((byte*)) (byte/signed byte/word/signed word/dword/signed dword) $62 + (byte*) TIMEHI#0 ← ((byte*)) (byte/word/signed word/dword/signed dword) $a1 + (byte*) TIMELO#0 ← ((byte*)) (byte/word/signed word/dword/signed dword) $a2 + (byte*) VICBANK#0 ← ((byte*)) (word/dword/signed dword) $d018 + (byte[$64]) strTemp#0 ← { fill( $64, 0) } + to:@14 +append: scope:[append] from utoa::@5 utoa::@6 utoa::@7 utoa::@8 + (word) append::sub#6 ← phi( utoa::@5/(word) append::sub#0 utoa::@6/(word) append::sub#1 utoa::@7/(word) append::sub#2 utoa::@8/(word) append::sub#3 ) + (word) append::value#8 ← phi( utoa::@5/(word) append::value#1 utoa::@6/(word) append::value#2 utoa::@7/(word) append::value#3 utoa::@8/(word) append::value#4 ) + (byte*) append::dst#4 ← phi( utoa::@5/(byte*) append::dst#0 utoa::@6/(byte*) append::dst#1 utoa::@7/(byte*) append::dst#2 utoa::@8/(byte*) append::dst#3 ) + *((byte*) append::dst#4) ← (byte) '0' + to:append::@1 +append::@1: scope:[append] from append append::@2 + (byte*) append::dst#6 ← phi( append/(byte*) append::dst#4 append::@2/(byte*) append::dst#5 ) + (word) append::sub#4 ← phi( append/(word) append::sub#6 append::@2/(word) append::sub#5 ) + (word) append::value#5 ← phi( append/(word) append::value#8 append::@2/(word) append::value#0 ) + (bool~) append::$0 ← (word) append::value#5 >= (word) append::sub#4 + if((bool~) append::$0) goto append::@2 + to:append::@3 +append::@2: scope:[append] from append::@1 + (word) append::sub#5 ← phi( append::@1/(word) append::sub#4 ) + (word) append::value#6 ← phi( append::@1/(word) append::value#5 ) + (byte*) append::dst#5 ← phi( append::@1/(byte*) append::dst#6 ) + *((byte*) append::dst#5) ← ++ *((byte*) append::dst#5) + (word) append::value#0 ← (word) append::value#6 - (word) append::sub#5 + to:append::@1 +append::@3: scope:[append] from append::@1 + (word) append::value#7 ← phi( append::@1/(word) append::value#5 ) + (word) append::return#0 ← (word) append::value#7 + to:append::@return +append::@return: scope:[append] from append::@3 + (word) append::return#6 ← phi( append::@3/(word) append::return#0 ) + (word) append::return#1 ← (word) append::return#6 + return + to:@return +utoa: scope:[utoa] from myprintf::@7 + (byte*) utoa::dst#15 ← phi( myprintf::@7/(byte*) utoa::dst#5 ) + (word) utoa::value#5 ← phi( myprintf::@7/(word) utoa::value#4 ) + (byte) utoa::bStarted#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (bool~) utoa::$0 ← (byte) utoa::bStarted#0 == (byte/signed byte/word/signed word/dword/signed dword) 1 + (bool~) utoa::$1 ← (word) utoa::value#5 >= (word/signed word/dword/signed dword) $2710 + (bool~) utoa::$2 ← (bool~) utoa::$0 || (bool~) utoa::$1 + (bool~) utoa::$3 ← ! (bool~) utoa::$2 + if((bool~) utoa::$3) goto utoa::@1 + to:utoa::@5 +utoa::@1: scope:[utoa] from utoa utoa::@9 + (byte*) utoa::dst#16 ← phi( utoa/(byte*) utoa::dst#15 utoa::@9/(byte*) utoa::dst#0 ) + (word) utoa::value#6 ← phi( utoa/(word) utoa::value#5 utoa::@9/(word) utoa::value#0 ) + (byte) utoa::bStarted#5 ← phi( utoa/(byte) utoa::bStarted#0 utoa::@9/(byte) utoa::bStarted#1 ) + (bool~) utoa::$4 ← (byte) utoa::bStarted#5 == (byte/signed byte/word/signed word/dword/signed dword) 1 + (bool~) utoa::$5 ← (word) utoa::value#6 >= (word/signed word/dword/signed dword) $3e8 + (bool~) utoa::$6 ← (bool~) utoa::$4 || (bool~) utoa::$5 + (bool~) utoa::$7 ← ! (bool~) utoa::$6 + if((bool~) utoa::$7) goto utoa::@2 + to:utoa::@6 +utoa::@5: scope:[utoa] from utoa + (word) utoa::value#7 ← phi( utoa/(word) utoa::value#5 ) + (byte*) utoa::dst#6 ← phi( utoa/(byte*) utoa::dst#15 ) + (byte*) append::dst#0 ← (byte*) utoa::dst#6 + (word) append::value#1 ← (word) utoa::value#7 + (word) append::sub#0 ← (word/signed word/dword/signed dword) $2710 + call append + (word) append::return#2 ← (word) append::return#1 + to:utoa::@9 +utoa::@9: scope:[utoa] from utoa::@5 + (byte*) utoa::dst#7 ← phi( utoa::@5/(byte*) utoa::dst#6 ) + (word) append::return#7 ← phi( utoa::@5/(word) append::return#2 ) + (word~) utoa::$18 ← (word) append::return#7 + (word) utoa::value#0 ← (word~) utoa::$18 + (byte*) utoa::dst#0 ← ++ (byte*) utoa::dst#7 + (byte) utoa::bStarted#1 ← (byte/signed byte/word/signed word/dword/signed dword) 1 + to:utoa::@1 +utoa::@2: scope:[utoa] from utoa::@1 utoa::@10 + (byte*) utoa::dst#17 ← phi( utoa::@1/(byte*) utoa::dst#16 utoa::@10/(byte*) utoa::dst#1 ) + (word) utoa::value#8 ← phi( utoa::@1/(word) utoa::value#6 utoa::@10/(word) utoa::value#1 ) + (byte) utoa::bStarted#6 ← phi( utoa::@1/(byte) utoa::bStarted#5 utoa::@10/(byte) utoa::bStarted#2 ) + (bool~) utoa::$8 ← (byte) utoa::bStarted#6 == (byte/signed byte/word/signed word/dword/signed dword) 1 + (bool~) utoa::$9 ← (word) utoa::value#8 >= (byte/signed byte/word/signed word/dword/signed dword) $64 + (bool~) utoa::$10 ← (bool~) utoa::$8 || (bool~) utoa::$9 + (bool~) utoa::$11 ← ! (bool~) utoa::$10 + if((bool~) utoa::$11) goto utoa::@3 + to:utoa::@7 +utoa::@6: scope:[utoa] from utoa::@1 + (word) utoa::value#9 ← phi( utoa::@1/(word) utoa::value#6 ) + (byte*) utoa::dst#8 ← phi( utoa::@1/(byte*) utoa::dst#16 ) + (byte*) append::dst#1 ← (byte*) utoa::dst#8 + (word) append::value#2 ← (word) utoa::value#9 + (word) append::sub#1 ← (word/signed word/dword/signed dword) $3e8 + call append + (word) append::return#3 ← (word) append::return#1 + to:utoa::@10 +utoa::@10: scope:[utoa] from utoa::@6 + (byte*) utoa::dst#9 ← phi( utoa::@6/(byte*) utoa::dst#8 ) + (word) append::return#8 ← phi( utoa::@6/(word) append::return#3 ) + (word~) utoa::$19 ← (word) append::return#8 + (word) utoa::value#1 ← (word~) utoa::$19 + (byte*) utoa::dst#1 ← ++ (byte*) utoa::dst#9 + (byte) utoa::bStarted#2 ← (byte/signed byte/word/signed word/dword/signed dword) 1 + to:utoa::@2 +utoa::@3: scope:[utoa] from utoa::@11 utoa::@2 + (byte*) utoa::dst#18 ← phi( utoa::@11/(byte*) utoa::dst#2 utoa::@2/(byte*) utoa::dst#17 ) + (word) utoa::value#10 ← phi( utoa::@11/(word) utoa::value#2 utoa::@2/(word) utoa::value#8 ) + (byte) utoa::bStarted#7 ← phi( utoa::@11/(byte) utoa::bStarted#3 utoa::@2/(byte) utoa::bStarted#6 ) + (bool~) utoa::$12 ← (byte) utoa::bStarted#7 == (byte/signed byte/word/signed word/dword/signed dword) 1 + (bool~) utoa::$13 ← (word) utoa::value#10 >= (byte/signed byte/word/signed word/dword/signed dword) $a + (bool~) utoa::$14 ← (bool~) utoa::$12 || (bool~) utoa::$13 + (bool~) utoa::$15 ← ! (bool~) utoa::$14 + if((bool~) utoa::$15) goto utoa::@4 + to:utoa::@8 +utoa::@7: scope:[utoa] from utoa::@2 + (word) utoa::value#11 ← phi( utoa::@2/(word) utoa::value#8 ) + (byte*) utoa::dst#10 ← phi( utoa::@2/(byte*) utoa::dst#17 ) + (byte*) append::dst#2 ← (byte*) utoa::dst#10 + (word) append::value#3 ← (word) utoa::value#11 + (word) append::sub#2 ← (byte/signed byte/word/signed word/dword/signed dword) $64 + call append + (word) append::return#4 ← (word) append::return#1 + to:utoa::@11 +utoa::@11: scope:[utoa] from utoa::@7 + (byte*) utoa::dst#11 ← phi( utoa::@7/(byte*) utoa::dst#10 ) + (word) append::return#9 ← phi( utoa::@7/(word) append::return#4 ) + (word~) utoa::$20 ← (word) append::return#9 + (word) utoa::value#2 ← (word~) utoa::$20 + (byte*) utoa::dst#2 ← ++ (byte*) utoa::dst#11 + (byte) utoa::bStarted#3 ← (byte/signed byte/word/signed word/dword/signed dword) 1 + to:utoa::@3 +utoa::@4: scope:[utoa] from utoa::@12 utoa::@3 + (byte*) utoa::dst#12 ← phi( utoa::@12/(byte*) utoa::dst#4 utoa::@3/(byte*) utoa::dst#18 ) + (word) utoa::value#12 ← phi( utoa::@12/(word) utoa::value#3 utoa::@3/(word) utoa::value#10 ) + (byte~) utoa::$16 ← ((byte)) (word) utoa::value#12 + (byte~) utoa::$17 ← (byte) '0' + (byte~) utoa::$16 + *((byte*) utoa::dst#12) ← (byte~) utoa::$17 + (byte*) utoa::dst#3 ← ++ (byte*) utoa::dst#12 + *((byte*) utoa::dst#3) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:utoa::@return +utoa::@8: scope:[utoa] from utoa::@3 + (word) utoa::value#13 ← phi( utoa::@3/(word) utoa::value#10 ) + (byte*) utoa::dst#13 ← phi( utoa::@3/(byte*) utoa::dst#18 ) + (byte*) append::dst#3 ← (byte*) utoa::dst#13 + (word) append::value#4 ← (word) utoa::value#13 + (word) append::sub#3 ← (byte/signed byte/word/signed word/dword/signed dword) $a + call append + (word) append::return#5 ← (word) append::return#1 + to:utoa::@12 +utoa::@12: scope:[utoa] from utoa::@8 + (byte*) utoa::dst#14 ← phi( utoa::@8/(byte*) utoa::dst#13 ) + (word) append::return#10 ← phi( utoa::@8/(word) append::return#5 ) + (word~) utoa::$21 ← (word) append::return#10 + (word) utoa::value#3 ← (word~) utoa::$21 + (byte*) utoa::dst#4 ← ++ (byte*) utoa::dst#14 + (byte) utoa::bStarted#4 ← (byte/signed byte/word/signed word/dword/signed dword) 1 + to:utoa::@4 +utoa::@return: scope:[utoa] from utoa::@4 + return + to:@return +myprintf: scope:[myprintf] from main::@3 main::@7 + (word) myprintf::w3#7 ← phi( main::@3/(word) myprintf::w3#0 main::@7/(word) myprintf::w3#1 ) + (word) myprintf::w2#7 ← phi( main::@3/(word) myprintf::w2#0 main::@7/(word) myprintf::w2#1 ) + (word) myprintf::w1#6 ← phi( main::@3/(word) myprintf::w1#0 main::@7/(word) myprintf::w1#1 ) + (byte*) myprintf::dst#42 ← phi( main::@3/(byte*) myprintf::dst#0 main::@7/(byte*) myprintf::dst#1 ) + (byte*) myprintf::str#5 ← phi( main::@3/(byte*) myprintf::str#1 main::@7/(byte*) myprintf::str#2 ) + (byte) myprintf::bArg#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) myprintf::bFormat#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) myprintf::bLen#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) myprintf::bLeadZero#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) myprintf::bDigits#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) myprintf::bTrailing#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) myprintf::b#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) myprintf::digit#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte[6]) myprintf::buf6#0 ← { fill( 6, 0) } + (word) myprintf::w#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:myprintf::@1 +myprintf::@1: scope:[myprintf] from myprintf myprintf::@52 + (byte) myprintf::bLeadZero#17 ← phi( myprintf/(byte) myprintf::bLeadZero#0 myprintf::@52/(byte) myprintf::bLeadZero#18 ) + (byte) myprintf::bDigits#23 ← phi( myprintf/(byte) myprintf::bDigits#0 myprintf::@52/(byte) myprintf::bDigits#24 ) + (byte) myprintf::bTrailing#20 ← phi( myprintf/(byte) myprintf::bTrailing#0 myprintf::@52/(byte) myprintf::bTrailing#21 ) + (word) myprintf::w#16 ← phi( myprintf/(word) myprintf::w#0 myprintf::@52/(word) myprintf::w#17 ) + (word) myprintf::w3#6 ← phi( myprintf/(word) myprintf::w3#7 myprintf::@52/(word) myprintf::w3#8 ) + (word) myprintf::w2#6 ← phi( myprintf/(word) myprintf::w2#7 myprintf::@52/(word) myprintf::w2#8 ) + (word) myprintf::w1#5 ← phi( myprintf/(word) myprintf::w1#6 myprintf::@52/(word) myprintf::w1#7 ) + (byte) myprintf::bLen#38 ← phi( myprintf/(byte) myprintf::bLen#0 myprintf::@52/(byte) myprintf::bLen#27 ) + (byte*) myprintf::dst#32 ← phi( myprintf/(byte*) myprintf::dst#42 myprintf::@52/(byte*) myprintf::dst#21 ) + (byte) myprintf::bArg#9 ← phi( myprintf/(byte) myprintf::bArg#0 myprintf::@52/(byte) myprintf::bArg#10 ) + (byte) myprintf::bFormat#3 ← phi( myprintf/(byte) myprintf::bFormat#0 myprintf::@52/(byte) myprintf::bFormat#4 ) + (byte*) myprintf::str#3 ← phi( myprintf/(byte*) myprintf::str#5 myprintf::@52/(byte*) myprintf::str#0 ) + (byte) myprintf::b#1 ← *((byte*) myprintf::str#3) + (bool~) myprintf::$0 ← (byte) myprintf::bFormat#3 != (byte/signed byte/word/signed word/dword/signed dword) 0 + (bool~) myprintf::$1 ← ! (bool~) myprintf::$0 + if((bool~) myprintf::$1) goto myprintf::@2 + to:myprintf::@61 +myprintf::@2: scope:[myprintf] from myprintf::@1 + (byte) myprintf::bLeadZero#38 ← phi( myprintf::@1/(byte) myprintf::bLeadZero#17 ) + (byte) myprintf::bDigits#42 ← phi( myprintf::@1/(byte) myprintf::bDigits#23 ) + (byte) myprintf::bTrailing#40 ← phi( myprintf::@1/(byte) myprintf::bTrailing#20 ) + (word) myprintf::w#33 ← phi( myprintf::@1/(word) myprintf::w#16 ) + (byte) myprintf::bFormat#18 ← phi( myprintf::@1/(byte) myprintf::bFormat#3 ) + (word) myprintf::w3#5 ← phi( myprintf::@1/(word) myprintf::w3#6 ) + (word) myprintf::w2#5 ← phi( myprintf::@1/(word) myprintf::w2#6 ) + (byte*) myprintf::str#30 ← phi( myprintf::@1/(byte*) myprintf::str#3 ) + (word) myprintf::w1#4 ← phi( myprintf::@1/(word) myprintf::w1#5 ) + (byte) myprintf::bLen#37 ← phi( myprintf::@1/(byte) myprintf::bLen#38 ) + (byte*) myprintf::dst#31 ← phi( myprintf::@1/(byte*) myprintf::dst#32 ) + (byte) myprintf::bArg#5 ← phi( myprintf::@1/(byte) myprintf::bArg#9 ) + (byte) myprintf::b#7 ← phi( myprintf::@1/(byte) myprintf::b#1 ) + (bool~) myprintf::$48 ← (byte) myprintf::b#7 == (byte) '%' + (bool~) myprintf::$49 ← ! (bool~) myprintf::$48 + if((bool~) myprintf::$49) goto myprintf::@53 + to:myprintf::@64 +myprintf::@61: scope:[myprintf] from myprintf::@1 + (byte) myprintf::bLeadZero#16 ← phi( myprintf::@1/(byte) myprintf::bLeadZero#17 ) + (byte) myprintf::bDigits#22 ← phi( myprintf::@1/(byte) myprintf::bDigits#23 ) + (byte) myprintf::bTrailing#19 ← phi( myprintf::@1/(byte) myprintf::bTrailing#20 ) + (word) myprintf::w3#15 ← phi( myprintf::@1/(word) myprintf::w3#6 ) + (word) myprintf::w2#15 ← phi( myprintf::@1/(word) myprintf::w2#6 ) + (word) myprintf::w1#14 ← phi( myprintf::@1/(word) myprintf::w1#5 ) + (byte) myprintf::bArg#16 ← phi( myprintf::@1/(byte) myprintf::bArg#9 ) + (word) myprintf::w#15 ← phi( myprintf::@1/(word) myprintf::w#16 ) + (byte) myprintf::bLen#39 ← phi( myprintf::@1/(byte) myprintf::bLen#38 ) + (byte*) myprintf::dst#33 ← phi( myprintf::@1/(byte*) myprintf::dst#32 ) + (byte) myprintf::bFormat#10 ← phi( myprintf::@1/(byte) myprintf::bFormat#3 ) + (byte*) myprintf::str#12 ← phi( myprintf::@1/(byte*) myprintf::str#3 ) + (byte) myprintf::b#8 ← phi( myprintf::@1/(byte) myprintf::b#1 ) + (bool~) myprintf::$2 ← (byte) myprintf::b#8 == (byte) '0' + (bool~) myprintf::$3 ← ! (bool~) myprintf::$2 + if((bool~) myprintf::$3) goto myprintf::@3 + to:myprintf::@62 +myprintf::@3: scope:[myprintf] from myprintf::@61 + (byte) myprintf::bLeadZero#15 ← phi( myprintf::@61/(byte) myprintf::bLeadZero#16 ) + (word) myprintf::w3#16 ← phi( myprintf::@61/(word) myprintf::w3#15 ) + (word) myprintf::w2#16 ← phi( myprintf::@61/(word) myprintf::w2#15 ) + (byte) myprintf::bDigits#21 ← phi( myprintf::@61/(byte) myprintf::bDigits#22 ) + (byte) myprintf::bTrailing#18 ← phi( myprintf::@61/(byte) myprintf::bTrailing#19 ) + (word) myprintf::w1#15 ← phi( myprintf::@61/(word) myprintf::w1#14 ) + (byte) myprintf::bArg#17 ← phi( myprintf::@61/(byte) myprintf::bArg#16 ) + (byte) myprintf::bFormat#11 ← phi( myprintf::@61/(byte) myprintf::bFormat#10 ) + (byte) myprintf::bLen#40 ← phi( myprintf::@61/(byte) myprintf::bLen#39 ) + (byte*) myprintf::dst#34 ← phi( myprintf::@61/(byte*) myprintf::dst#33 ) + (word) myprintf::w#14 ← phi( myprintf::@61/(word) myprintf::w#15 ) + (byte*) myprintf::str#13 ← phi( myprintf::@61/(byte*) myprintf::str#12 ) + (byte) myprintf::b#9 ← phi( myprintf::@61/(byte) myprintf::b#8 ) + (bool~) myprintf::$4 ← (byte) myprintf::b#9 >= (byte) '1' + (bool~) myprintf::$5 ← (byte) myprintf::b#9 <= (byte) '9' + (bool~) myprintf::$6 ← (bool~) myprintf::$4 && (bool~) myprintf::$5 + (bool~) myprintf::$7 ← ! (bool~) myprintf::$6 + if((bool~) myprintf::$7) goto myprintf::@4 + to:myprintf::@41 +myprintf::@62: scope:[myprintf] from myprintf::@61 + (byte) myprintf::bDigits#29 ← phi( myprintf::@61/(byte) myprintf::bDigits#22 ) + (byte) myprintf::bTrailing#26 ← phi( myprintf::@61/(byte) myprintf::bTrailing#19 ) + (word) myprintf::w#23 ← phi( myprintf::@61/(word) myprintf::w#15 ) + (word) myprintf::w3#14 ← phi( myprintf::@61/(word) myprintf::w3#15 ) + (word) myprintf::w2#14 ← phi( myprintf::@61/(word) myprintf::w2#15 ) + (word) myprintf::w1#13 ← phi( myprintf::@61/(word) myprintf::w1#14 ) + (byte) myprintf::bArg#15 ← phi( myprintf::@61/(byte) myprintf::bArg#16 ) + (byte) myprintf::bLen#32 ← phi( myprintf::@61/(byte) myprintf::bLen#39 ) + (byte*) myprintf::dst#26 ← phi( myprintf::@61/(byte*) myprintf::dst#33 ) + (byte) myprintf::bFormat#9 ← phi( myprintf::@61/(byte) myprintf::bFormat#10 ) + (byte*) myprintf::str#11 ← phi( myprintf::@61/(byte*) myprintf::str#12 ) + (byte) myprintf::bLeadZero#1 ← (byte/signed byte/word/signed word/dword/signed dword) 1 + to:myprintf::@52 +myprintf::@52: scope:[myprintf] from myprintf::@40 myprintf::@41 myprintf::@43 myprintf::@57 myprintf::@60 myprintf::@62 + (byte) myprintf::bLeadZero#18 ← phi( myprintf::@40/(byte) myprintf::bLeadZero#19 myprintf::@41/(byte) myprintf::bLeadZero#20 myprintf::@43/(byte) myprintf::bLeadZero#21 myprintf::@57/(byte) myprintf::bLeadZero#22 myprintf::@60/(byte) myprintf::bLeadZero#23 myprintf::@62/(byte) myprintf::bLeadZero#1 ) + (byte) myprintf::bDigits#24 ← phi( myprintf::@40/(byte) myprintf::bDigits#25 myprintf::@41/(byte) myprintf::bDigits#1 myprintf::@43/(byte) myprintf::bDigits#26 myprintf::@57/(byte) myprintf::bDigits#27 myprintf::@60/(byte) myprintf::bDigits#28 myprintf::@62/(byte) myprintf::bDigits#29 ) + (byte) myprintf::bTrailing#21 ← phi( myprintf::@40/(byte) myprintf::bTrailing#22 myprintf::@41/(byte) myprintf::bTrailing#23 myprintf::@43/(byte) myprintf::bTrailing#1 myprintf::@57/(byte) myprintf::bTrailing#24 myprintf::@60/(byte) myprintf::bTrailing#25 myprintf::@62/(byte) myprintf::bTrailing#26 ) + (word) myprintf::w#17 ← phi( myprintf::@40/(word) myprintf::w#18 myprintf::@41/(word) myprintf::w#19 myprintf::@43/(word) myprintf::w#20 myprintf::@57/(word) myprintf::w#21 myprintf::@60/(word) myprintf::w#22 myprintf::@62/(word) myprintf::w#23 ) + (word) myprintf::w3#8 ← phi( myprintf::@40/(word) myprintf::w3#9 myprintf::@41/(word) myprintf::w3#10 myprintf::@43/(word) myprintf::w3#11 myprintf::@57/(word) myprintf::w3#12 myprintf::@60/(word) myprintf::w3#13 myprintf::@62/(word) myprintf::w3#14 ) + (word) myprintf::w2#8 ← phi( myprintf::@40/(word) myprintf::w2#9 myprintf::@41/(word) myprintf::w2#10 myprintf::@43/(word) myprintf::w2#11 myprintf::@57/(word) myprintf::w2#12 myprintf::@60/(word) myprintf::w2#13 myprintf::@62/(word) myprintf::w2#14 ) + (word) myprintf::w1#7 ← phi( myprintf::@40/(word) myprintf::w1#8 myprintf::@41/(word) myprintf::w1#9 myprintf::@43/(word) myprintf::w1#10 myprintf::@57/(word) myprintf::w1#11 myprintf::@60/(word) myprintf::w1#12 myprintf::@62/(word) myprintf::w1#13 ) + (byte) myprintf::bArg#10 ← phi( myprintf::@40/(byte) myprintf::bArg#11 myprintf::@41/(byte) myprintf::bArg#12 myprintf::@43/(byte) myprintf::bArg#13 myprintf::@57/(byte) myprintf::bArg#1 myprintf::@60/(byte) myprintf::bArg#14 myprintf::@62/(byte) myprintf::bArg#15 ) + (byte) myprintf::bLen#27 ← phi( myprintf::@40/(byte) myprintf::bLen#28 myprintf::@41/(byte) myprintf::bLen#29 myprintf::@43/(byte) myprintf::bLen#30 myprintf::@57/(byte) myprintf::bLen#31 myprintf::@60/(byte) myprintf::bLen#7 myprintf::@62/(byte) myprintf::bLen#32 ) + (byte*) myprintf::dst#21 ← phi( myprintf::@40/(byte*) myprintf::dst#22 myprintf::@41/(byte*) myprintf::dst#23 myprintf::@43/(byte*) myprintf::dst#24 myprintf::@57/(byte*) myprintf::dst#25 myprintf::@60/(byte*) myprintf::dst#8 myprintf::@62/(byte*) myprintf::dst#26 ) + (byte) myprintf::bFormat#4 ← phi( myprintf::@40/(byte) myprintf::bFormat#1 myprintf::@41/(byte) myprintf::bFormat#5 myprintf::@43/(byte) myprintf::bFormat#6 myprintf::@57/(byte) myprintf::bFormat#7 myprintf::@60/(byte) myprintf::bFormat#8 myprintf::@62/(byte) myprintf::bFormat#9 ) + (byte*) myprintf::str#4 ← phi( myprintf::@40/(byte*) myprintf::str#6 myprintf::@41/(byte*) myprintf::str#7 myprintf::@43/(byte*) myprintf::str#8 myprintf::@57/(byte*) myprintf::str#9 myprintf::@60/(byte*) myprintf::str#10 myprintf::@62/(byte*) myprintf::str#11 ) + (byte*) myprintf::str#0 ← ++ (byte*) myprintf::str#4 + (bool~) myprintf::$56 ← *((byte*) myprintf::str#0) != (byte/signed byte/word/signed word/dword/signed dword) 0 + if((bool~) myprintf::$56) goto myprintf::@1 + to:myprintf::@69 +myprintf::@4: scope:[myprintf] from myprintf::@3 + (word) myprintf::w3#17 ← phi( myprintf::@3/(word) myprintf::w3#16 ) + (word) myprintf::w2#17 ← phi( myprintf::@3/(word) myprintf::w2#16 ) + (byte) myprintf::bLeadZero#14 ← phi( myprintf::@3/(byte) myprintf::bLeadZero#15 ) + (word) myprintf::w1#16 ← phi( myprintf::@3/(word) myprintf::w1#15 ) + (byte) myprintf::bDigits#20 ← phi( myprintf::@3/(byte) myprintf::bDigits#21 ) + (byte) myprintf::bTrailing#17 ← phi( myprintf::@3/(byte) myprintf::bTrailing#18 ) + (byte) myprintf::bArg#18 ← phi( myprintf::@3/(byte) myprintf::bArg#17 ) + (byte) myprintf::bFormat#12 ← phi( myprintf::@3/(byte) myprintf::bFormat#11 ) + (byte*) myprintf::str#14 ← phi( myprintf::@3/(byte*) myprintf::str#13 ) + (byte) myprintf::bLen#33 ← phi( myprintf::@3/(byte) myprintf::bLen#40 ) + (byte*) myprintf::dst#27 ← phi( myprintf::@3/(byte*) myprintf::dst#34 ) + (word) myprintf::w#13 ← phi( myprintf::@3/(word) myprintf::w#14 ) + (byte) myprintf::b#10 ← phi( myprintf::@3/(byte) myprintf::b#9 ) + (bool~) myprintf::$9 ← (byte) myprintf::b#10 == (byte) '-' + (bool~) myprintf::$10 ← ! (bool~) myprintf::$9 + if((bool~) myprintf::$10) goto myprintf::@5 + to:myprintf::@43 +myprintf::@41: scope:[myprintf] from myprintf::@3 + (byte) myprintf::bLeadZero#20 ← phi( myprintf::@3/(byte) myprintf::bLeadZero#15 ) + (byte) myprintf::bTrailing#23 ← phi( myprintf::@3/(byte) myprintf::bTrailing#18 ) + (word) myprintf::w#19 ← phi( myprintf::@3/(word) myprintf::w#14 ) + (word) myprintf::w3#10 ← phi( myprintf::@3/(word) myprintf::w3#16 ) + (word) myprintf::w2#10 ← phi( myprintf::@3/(word) myprintf::w2#16 ) + (word) myprintf::w1#9 ← phi( myprintf::@3/(word) myprintf::w1#15 ) + (byte) myprintf::bArg#12 ← phi( myprintf::@3/(byte) myprintf::bArg#17 ) + (byte) myprintf::bLen#29 ← phi( myprintf::@3/(byte) myprintf::bLen#40 ) + (byte*) myprintf::dst#23 ← phi( myprintf::@3/(byte*) myprintf::dst#34 ) + (byte) myprintf::bFormat#5 ← phi( myprintf::@3/(byte) myprintf::bFormat#11 ) + (byte*) myprintf::str#7 ← phi( myprintf::@3/(byte*) myprintf::str#13 ) + (byte) myprintf::b#11 ← phi( myprintf::@3/(byte) myprintf::b#9 ) + (byte~) myprintf::$8 ← (byte) myprintf::b#11 - (byte) '0' + (byte) myprintf::bDigits#1 ← (byte~) myprintf::$8 + to:myprintf::@52 +myprintf::@5: scope:[myprintf] from myprintf::@4 + (word) myprintf::w3#27 ← phi( myprintf::@4/(word) myprintf::w3#17 ) + (word) myprintf::w2#27 ← phi( myprintf::@4/(word) myprintf::w2#17 ) + (word) myprintf::w1#26 ← phi( myprintf::@4/(word) myprintf::w1#16 ) + (byte) myprintf::bLeadZero#13 ← phi( myprintf::@4/(byte) myprintf::bLeadZero#14 ) + (byte) myprintf::bArg#26 ← phi( myprintf::@4/(byte) myprintf::bArg#18 ) + (byte) myprintf::bDigits#19 ← phi( myprintf::@4/(byte) myprintf::bDigits#20 ) + (byte) myprintf::bTrailing#15 ← phi( myprintf::@4/(byte) myprintf::bTrailing#17 ) + (byte*) myprintf::str#25 ← phi( myprintf::@4/(byte*) myprintf::str#14 ) + (byte) myprintf::bLen#16 ← phi( myprintf::@4/(byte) myprintf::bLen#33 ) + (byte*) myprintf::dst#10 ← phi( myprintf::@4/(byte*) myprintf::dst#27 ) + (word) myprintf::w#8 ← phi( myprintf::@4/(word) myprintf::w#13 ) + (byte) myprintf::b#12 ← phi( myprintf::@4/(byte) myprintf::b#10 ) + (bool~) myprintf::$11 ← (byte) myprintf::b#12 == (byte) 'c' + if((bool~) myprintf::$11) goto myprintf::@6 + to:myprintf::@45 +myprintf::@43: scope:[myprintf] from myprintf::@4 + (byte) myprintf::bLeadZero#21 ← phi( myprintf::@4/(byte) myprintf::bLeadZero#14 ) + (byte) myprintf::bDigits#26 ← phi( myprintf::@4/(byte) myprintf::bDigits#20 ) + (word) myprintf::w#20 ← phi( myprintf::@4/(word) myprintf::w#13 ) + (word) myprintf::w3#11 ← phi( myprintf::@4/(word) myprintf::w3#17 ) + (word) myprintf::w2#11 ← phi( myprintf::@4/(word) myprintf::w2#17 ) + (word) myprintf::w1#10 ← phi( myprintf::@4/(word) myprintf::w1#16 ) + (byte) myprintf::bArg#13 ← phi( myprintf::@4/(byte) myprintf::bArg#18 ) + (byte) myprintf::bLen#30 ← phi( myprintf::@4/(byte) myprintf::bLen#33 ) + (byte*) myprintf::dst#24 ← phi( myprintf::@4/(byte*) myprintf::dst#27 ) + (byte) myprintf::bFormat#6 ← phi( myprintf::@4/(byte) myprintf::bFormat#12 ) + (byte*) myprintf::str#8 ← phi( myprintf::@4/(byte*) myprintf::str#14 ) + (byte) myprintf::bTrailing#1 ← (byte/signed byte/word/signed word/dword/signed dword) 1 + to:myprintf::@52 +myprintf::@6: scope:[myprintf] from myprintf::@5 + (byte) myprintf::bLeadZero#27 ← phi( myprintf::@5/(byte) myprintf::bLeadZero#13 ) + (byte) myprintf::bDigits#32 ← phi( myprintf::@5/(byte) myprintf::bDigits#19 ) + (byte) myprintf::bTrailing#30 ← phi( myprintf::@5/(byte) myprintf::bTrailing#15 ) + (word) myprintf::w3#21 ← phi( myprintf::@5/(word) myprintf::w3#27 ) + (word) myprintf::w2#21 ← phi( myprintf::@5/(word) myprintf::w2#27 ) + (word) myprintf::w1#20 ← phi( myprintf::@5/(word) myprintf::w1#26 ) + (byte) myprintf::bArg#22 ← phi( myprintf::@5/(byte) myprintf::bArg#26 ) + (byte*) myprintf::str#18 ← phi( myprintf::@5/(byte*) myprintf::str#25 ) + (byte) myprintf::bLen#8 ← phi( myprintf::@5/(byte) myprintf::bLen#16 ) + (byte*) myprintf::dst#2 ← phi( myprintf::@5/(byte*) myprintf::dst#10 ) + (word) myprintf::w#4 ← phi( myprintf::@5/(word) myprintf::w#8 ) + (byte~) myprintf::$47 ← ((byte)) (word) myprintf::w#4 + *((byte*) myprintf::dst#2 + (byte) myprintf::bLen#8) ← (byte~) myprintf::$47 + (byte) myprintf::bLen#1 ← ++ (byte) myprintf::bLen#8 + to:myprintf::@40 +myprintf::@45: scope:[myprintf] from myprintf::@5 + (word) myprintf::w3#32 ← phi( myprintf::@5/(word) myprintf::w3#27 ) + (word) myprintf::w2#32 ← phi( myprintf::@5/(word) myprintf::w2#27 ) + (word) myprintf::w1#32 ← phi( myprintf::@5/(word) myprintf::w1#26 ) + (byte) myprintf::bArg#31 ← phi( myprintf::@5/(byte) myprintf::bArg#26 ) + (byte) myprintf::bLeadZero#12 ← phi( myprintf::@5/(byte) myprintf::bLeadZero#13 ) + (byte) myprintf::bLen#48 ← phi( myprintf::@5/(byte) myprintf::bLen#16 ) + (byte*) myprintf::dst#43 ← phi( myprintf::@5/(byte*) myprintf::dst#10 ) + (byte*) myprintf::str#33 ← phi( myprintf::@5/(byte*) myprintf::str#25 ) + (byte) myprintf::bDigits#18 ← phi( myprintf::@5/(byte) myprintf::bDigits#19 ) + (byte) myprintf::bTrailing#12 ← phi( myprintf::@5/(byte) myprintf::bTrailing#15 ) + (word) myprintf::w#9 ← phi( myprintf::@5/(word) myprintf::w#8 ) + (byte) myprintf::b#13 ← phi( myprintf::@5/(byte) myprintf::b#12 ) + (bool~) myprintf::$12 ← (byte) myprintf::b#13 == (byte) 'd' + if((bool~) myprintf::$12) goto myprintf::@7 + to:myprintf::@46 +myprintf::@7: scope:[myprintf] from myprintf::@45 + (word) myprintf::w3#47 ← phi( myprintf::@45/(word) myprintf::w3#32 ) + (word) myprintf::w2#47 ← phi( myprintf::@45/(word) myprintf::w2#32 ) + (word) myprintf::w1#47 ← phi( myprintf::@45/(word) myprintf::w1#32 ) + (byte) myprintf::bArg#46 ← phi( myprintf::@45/(byte) myprintf::bArg#31 ) + (byte*) myprintf::str#48 ← phi( myprintf::@45/(byte*) myprintf::str#33 ) + (byte) myprintf::bLen#53 ← phi( myprintf::@45/(byte) myprintf::bLen#48 ) + (byte*) myprintf::dst#48 ← phi( myprintf::@45/(byte*) myprintf::dst#43 ) + (byte) myprintf::bLeadZero#11 ← phi( myprintf::@45/(byte) myprintf::bLeadZero#12 ) + (byte) myprintf::bDigits#17 ← phi( myprintf::@45/(byte) myprintf::bDigits#18 ) + (byte) myprintf::bTrailing#10 ← phi( myprintf::@45/(byte) myprintf::bTrailing#12 ) + (word) myprintf::w#5 ← phi( myprintf::@45/(word) myprintf::w#9 ) + (word) utoa::value#4 ← (word) myprintf::w#5 + (byte*) utoa::dst#5 ← (byte[6]) myprintf::buf6#0 + call utoa + to:myprintf::@71 +myprintf::@71: scope:[myprintf] from myprintf::@7 + (word) myprintf::w#42 ← phi( myprintf::@7/(word) myprintf::w#5 ) + (word) myprintf::w3#45 ← phi( myprintf::@7/(word) myprintf::w3#47 ) + (word) myprintf::w2#45 ← phi( myprintf::@7/(word) myprintf::w2#47 ) + (word) myprintf::w1#45 ← phi( myprintf::@7/(word) myprintf::w1#47 ) + (byte) myprintf::bArg#44 ← phi( myprintf::@7/(byte) myprintf::bArg#46 ) + (byte*) myprintf::str#46 ← phi( myprintf::@7/(byte*) myprintf::str#48 ) + (byte) myprintf::bLen#50 ← phi( myprintf::@7/(byte) myprintf::bLen#53 ) + (byte*) myprintf::dst#45 ← phi( myprintf::@7/(byte*) myprintf::dst#48 ) + (byte) myprintf::bLeadZero#10 ← phi( myprintf::@7/(byte) myprintf::bLeadZero#11 ) + (byte) myprintf::bDigits#14 ← phi( myprintf::@7/(byte) myprintf::bDigits#17 ) + (byte) myprintf::bTrailing#8 ← phi( myprintf::@7/(byte) myprintf::bTrailing#10 ) + (byte) myprintf::b#2 ← (byte/signed byte/word/signed word/dword/signed dword) 1 + to:myprintf::@19 +myprintf::@46: scope:[myprintf] from myprintf::@45 + (byte) myprintf::bLeadZero#34 ← phi( myprintf::@45/(byte) myprintf::bLeadZero#12 ) + (byte) myprintf::bDigits#39 ← phi( myprintf::@45/(byte) myprintf::bDigits#18 ) + (byte) myprintf::bTrailing#37 ← phi( myprintf::@45/(byte) myprintf::bTrailing#12 ) + (word) myprintf::w3#28 ← phi( myprintf::@45/(word) myprintf::w3#32 ) + (word) myprintf::w2#28 ← phi( myprintf::@45/(word) myprintf::w2#32 ) + (word) myprintf::w1#27 ← phi( myprintf::@45/(word) myprintf::w1#32 ) + (byte) myprintf::bArg#27 ← phi( myprintf::@45/(byte) myprintf::bArg#31 ) + (byte) myprintf::bLen#41 ← phi( myprintf::@45/(byte) myprintf::bLen#48 ) + (byte*) myprintf::dst#35 ← phi( myprintf::@45/(byte*) myprintf::dst#43 ) + (byte*) myprintf::str#26 ← phi( myprintf::@45/(byte*) myprintf::str#33 ) + (word) myprintf::w#10 ← phi( myprintf::@45/(word) myprintf::w#9 ) + (byte) myprintf::b#14 ← phi( myprintf::@45/(byte) myprintf::b#13 ) + (bool~) myprintf::$13 ← (byte) myprintf::b#14 == (byte) 'x' + (bool~) myprintf::$14 ← (byte) myprintf::b#14 == (byte) 'X' + (bool~) myprintf::$15 ← (bool~) myprintf::$13 || (bool~) myprintf::$14 + (bool~) myprintf::$16 ← ! (bool~) myprintf::$15 + if((bool~) myprintf::$16) goto myprintf::@8 + to:myprintf::@47 +myprintf::@8: scope:[myprintf] from myprintf::@46 + (byte) myprintf::bLeadZero#28 ← phi( myprintf::@46/(byte) myprintf::bLeadZero#34 ) + (byte) myprintf::bDigits#33 ← phi( myprintf::@46/(byte) myprintf::bDigits#39 ) + (byte) myprintf::bTrailing#31 ← phi( myprintf::@46/(byte) myprintf::bTrailing#37 ) + (word) myprintf::w#27 ← phi( myprintf::@46/(word) myprintf::w#10 ) + (word) myprintf::w3#22 ← phi( myprintf::@46/(word) myprintf::w3#28 ) + (word) myprintf::w2#22 ← phi( myprintf::@46/(word) myprintf::w2#28 ) + (word) myprintf::w1#21 ← phi( myprintf::@46/(word) myprintf::w1#27 ) + (byte) myprintf::bArg#23 ← phi( myprintf::@46/(byte) myprintf::bArg#27 ) + (byte) myprintf::bLen#44 ← phi( myprintf::@46/(byte) myprintf::bLen#41 ) + (byte*) myprintf::dst#38 ← phi( myprintf::@46/(byte*) myprintf::dst#35 ) + (byte*) myprintf::str#19 ← phi( myprintf::@46/(byte*) myprintf::str#26 ) + to:myprintf::@40 +myprintf::@47: scope:[myprintf] from myprintf::@46 + (byte) myprintf::bLeadZero#45 ← phi( myprintf::@46/(byte) myprintf::bLeadZero#34 ) + (byte) myprintf::bDigits#47 ← phi( myprintf::@46/(byte) myprintf::bDigits#39 ) + (byte) myprintf::bTrailing#45 ← phi( myprintf::@46/(byte) myprintf::bTrailing#37 ) + (word) myprintf::w3#38 ← phi( myprintf::@46/(word) myprintf::w3#28 ) + (word) myprintf::w2#38 ← phi( myprintf::@46/(word) myprintf::w2#28 ) + (word) myprintf::w1#38 ← phi( myprintf::@46/(word) myprintf::w1#27 ) + (byte) myprintf::bArg#37 ← phi( myprintf::@46/(byte) myprintf::bArg#27 ) + (byte*) myprintf::str#39 ← phi( myprintf::@46/(byte*) myprintf::str#26 ) + (byte) myprintf::bLen#34 ← phi( myprintf::@46/(byte) myprintf::bLen#41 ) + (byte*) myprintf::dst#28 ← phi( myprintf::@46/(byte*) myprintf::dst#35 ) + (word) myprintf::w#6 ← phi( myprintf::@46/(word) myprintf::w#10 ) + (word~) myprintf::$17 ← (word) myprintf::w#6 >> (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte/word~) myprintf::$18 ← (word~) myprintf::$17 & (byte/signed byte/word/signed word/dword/signed dword) $f + (byte) myprintf::b#3 ← (byte/word~) myprintf::$18 + (bool~) myprintf::$19 ← (byte) myprintf::b#3 < (byte/signed byte/word/signed word/dword/signed dword) $a + if((bool~) myprintf::$19) goto myprintf::@9 + to:myprintf::@10 +myprintf::@9: scope:[myprintf] from myprintf::@47 + (byte) myprintf::bLeadZero#43 ← phi( myprintf::@47/(byte) myprintf::bLeadZero#45 ) + (byte) myprintf::bDigits#46 ← phi( myprintf::@47/(byte) myprintf::bDigits#47 ) + (byte) myprintf::bTrailing#44 ← phi( myprintf::@47/(byte) myprintf::bTrailing#45 ) + (word) myprintf::w3#36 ← phi( myprintf::@47/(word) myprintf::w3#38 ) + (word) myprintf::w2#36 ← phi( myprintf::@47/(word) myprintf::w2#38 ) + (word) myprintf::w1#36 ← phi( myprintf::@47/(word) myprintf::w1#38 ) + (byte) myprintf::bArg#35 ← phi( myprintf::@47/(byte) myprintf::bArg#37 ) + (byte*) myprintf::str#37 ← phi( myprintf::@47/(byte*) myprintf::str#39 ) + (word) myprintf::w#12 ← phi( myprintf::@47/(word) myprintf::w#6 ) + (byte) myprintf::bLen#18 ← phi( myprintf::@47/(byte) myprintf::bLen#34 ) + (byte*) myprintf::dst#12 ← phi( myprintf::@47/(byte*) myprintf::dst#28 ) + (byte) myprintf::b#28 ← phi( myprintf::@47/(byte) myprintf::b#3 ) + (byte~) myprintf::$21 ← (byte) '0' + to:myprintf::@11 +myprintf::@10: scope:[myprintf] from myprintf::@47 + (byte) myprintf::bLeadZero#42 ← phi( myprintf::@47/(byte) myprintf::bLeadZero#45 ) + (byte) myprintf::bDigits#45 ← phi( myprintf::@47/(byte) myprintf::bDigits#47 ) + (byte) myprintf::bTrailing#43 ← phi( myprintf::@47/(byte) myprintf::bTrailing#45 ) + (word) myprintf::w3#35 ← phi( myprintf::@47/(word) myprintf::w3#38 ) + (word) myprintf::w2#35 ← phi( myprintf::@47/(word) myprintf::w2#38 ) + (word) myprintf::w1#35 ← phi( myprintf::@47/(word) myprintf::w1#38 ) + (byte) myprintf::bArg#34 ← phi( myprintf::@47/(byte) myprintf::bArg#37 ) + (byte*) myprintf::str#36 ← phi( myprintf::@47/(byte*) myprintf::str#39 ) + (word) myprintf::w#11 ← phi( myprintf::@47/(word) myprintf::w#6 ) + (byte) myprintf::bLen#17 ← phi( myprintf::@47/(byte) myprintf::bLen#34 ) + (byte*) myprintf::dst#11 ← phi( myprintf::@47/(byte*) myprintf::dst#28 ) + (byte) myprintf::b#27 ← phi( myprintf::@47/(byte) myprintf::b#3 ) + (byte/signed byte/word/signed word/dword/signed dword~) myprintf::$20 ← (byte/signed byte/word/signed word/dword/signed dword) $57 + to:myprintf::@11 +myprintf::@11: scope:[myprintf] from myprintf::@10 myprintf::@9 + (byte) myprintf::bLeadZero#40 ← phi( myprintf::@10/(byte) myprintf::bLeadZero#42 myprintf::@9/(byte) myprintf::bLeadZero#43 ) + (byte) myprintf::bDigits#44 ← phi( myprintf::@10/(byte) myprintf::bDigits#45 myprintf::@9/(byte) myprintf::bDigits#46 ) + (byte) myprintf::bTrailing#42 ← phi( myprintf::@10/(byte) myprintf::bTrailing#43 myprintf::@9/(byte) myprintf::bTrailing#44 ) + (word) myprintf::w3#33 ← phi( myprintf::@10/(word) myprintf::w3#35 myprintf::@9/(word) myprintf::w3#36 ) + (word) myprintf::w2#33 ← phi( myprintf::@10/(word) myprintf::w2#35 myprintf::@9/(word) myprintf::w2#36 ) + (word) myprintf::w1#33 ← phi( myprintf::@10/(word) myprintf::w1#35 myprintf::@9/(word) myprintf::w1#36 ) + (byte) myprintf::bArg#32 ← phi( myprintf::@10/(byte) myprintf::bArg#34 myprintf::@9/(byte) myprintf::bArg#35 ) + (byte*) myprintf::str#34 ← phi( myprintf::@10/(byte*) myprintf::str#36 myprintf::@9/(byte*) myprintf::str#37 ) + (word) myprintf::w#7 ← phi( myprintf::@10/(word) myprintf::w#11 myprintf::@9/(word) myprintf::w#12 ) + (byte) myprintf::bLen#9 ← phi( myprintf::@10/(byte) myprintf::bLen#17 myprintf::@9/(byte) myprintf::bLen#18 ) + (byte*) myprintf::dst#3 ← phi( myprintf::@10/(byte*) myprintf::dst#11 myprintf::@9/(byte*) myprintf::dst#12 ) + (byte) myprintf::b#15 ← phi( myprintf::@10/(byte) myprintf::b#27 myprintf::@9/(byte) myprintf::b#28 ) + (byte~) myprintf::$22 ← phi( myprintf::@9/(byte~) myprintf::$21 myprintf::@10/(byte/signed byte/word/signed word/dword/signed dword~) myprintf::$20 ) + (byte~) myprintf::$23 ← (byte~) myprintf::$22 + (byte) myprintf::b#15 + *((byte*) myprintf::dst#3 + (byte) myprintf::bLen#9) ← (byte~) myprintf::$23 + (byte) myprintf::bLen#2 ← ++ (byte) myprintf::bLen#9 + (byte/word~) myprintf::$24 ← (word) myprintf::w#7 & (byte/signed byte/word/signed word/dword/signed dword) $f + (byte) myprintf::b#4 ← (byte/word~) myprintf::$24 + (bool~) myprintf::$25 ← (byte) myprintf::b#4 < (byte/signed byte/word/signed word/dword/signed dword) $a + if((bool~) myprintf::$25) goto myprintf::@12 + to:myprintf::@13 +myprintf::@12: scope:[myprintf] from myprintf::@11 + (byte) myprintf::bLeadZero#35 ← phi( myprintf::@11/(byte) myprintf::bLeadZero#40 ) + (byte) myprintf::bDigits#40 ← phi( myprintf::@11/(byte) myprintf::bDigits#44 ) + (byte) myprintf::bTrailing#38 ← phi( myprintf::@11/(byte) myprintf::bTrailing#42 ) + (word) myprintf::w#30 ← phi( myprintf::@11/(word) myprintf::w#7 ) + (word) myprintf::w3#29 ← phi( myprintf::@11/(word) myprintf::w3#33 ) + (word) myprintf::w2#29 ← phi( myprintf::@11/(word) myprintf::w2#33 ) + (word) myprintf::w1#28 ← phi( myprintf::@11/(word) myprintf::w1#33 ) + (byte) myprintf::bArg#28 ← phi( myprintf::@11/(byte) myprintf::bArg#32 ) + (byte*) myprintf::str#27 ← phi( myprintf::@11/(byte*) myprintf::str#34 ) + (byte) myprintf::bLen#19 ← phi( myprintf::@11/(byte) myprintf::bLen#2 ) + (byte*) myprintf::dst#13 ← phi( myprintf::@11/(byte*) myprintf::dst#3 ) + (byte) myprintf::b#29 ← phi( myprintf::@11/(byte) myprintf::b#4 ) + (byte~) myprintf::$27 ← (byte) '0' + to:myprintf::@14 +myprintf::@13: scope:[myprintf] from myprintf::@11 + (byte) myprintf::bLeadZero#36 ← phi( myprintf::@11/(byte) myprintf::bLeadZero#40 ) + (byte) myprintf::bDigits#41 ← phi( myprintf::@11/(byte) myprintf::bDigits#44 ) + (byte) myprintf::bTrailing#39 ← phi( myprintf::@11/(byte) myprintf::bTrailing#42 ) + (word) myprintf::w#31 ← phi( myprintf::@11/(word) myprintf::w#7 ) + (word) myprintf::w3#30 ← phi( myprintf::@11/(word) myprintf::w3#33 ) + (word) myprintf::w2#30 ← phi( myprintf::@11/(word) myprintf::w2#33 ) + (word) myprintf::w1#29 ← phi( myprintf::@11/(word) myprintf::w1#33 ) + (byte) myprintf::bArg#29 ← phi( myprintf::@11/(byte) myprintf::bArg#32 ) + (byte*) myprintf::str#28 ← phi( myprintf::@11/(byte*) myprintf::str#34 ) + (byte) myprintf::bLen#20 ← phi( myprintf::@11/(byte) myprintf::bLen#2 ) + (byte*) myprintf::dst#14 ← phi( myprintf::@11/(byte*) myprintf::dst#3 ) + (byte) myprintf::b#30 ← phi( myprintf::@11/(byte) myprintf::b#4 ) + (byte/signed byte/word/signed word/dword/signed dword~) myprintf::$26 ← (byte/signed byte/word/signed word/dword/signed dword) $57 + to:myprintf::@14 +myprintf::@14: scope:[myprintf] from myprintf::@12 myprintf::@13 + (byte) myprintf::bLeadZero#24 ← phi( myprintf::@12/(byte) myprintf::bLeadZero#35 myprintf::@13/(byte) myprintf::bLeadZero#36 ) + (byte) myprintf::bDigits#30 ← phi( myprintf::@12/(byte) myprintf::bDigits#40 myprintf::@13/(byte) myprintf::bDigits#41 ) + (byte) myprintf::bTrailing#27 ← phi( myprintf::@12/(byte) myprintf::bTrailing#38 myprintf::@13/(byte) myprintf::bTrailing#39 ) + (word) myprintf::w#24 ← phi( myprintf::@12/(word) myprintf::w#30 myprintf::@13/(word) myprintf::w#31 ) + (word) myprintf::w3#18 ← phi( myprintf::@12/(word) myprintf::w3#29 myprintf::@13/(word) myprintf::w3#30 ) + (word) myprintf::w2#18 ← phi( myprintf::@12/(word) myprintf::w2#29 myprintf::@13/(word) myprintf::w2#30 ) + (word) myprintf::w1#17 ← phi( myprintf::@12/(word) myprintf::w1#28 myprintf::@13/(word) myprintf::w1#29 ) + (byte) myprintf::bArg#19 ← phi( myprintf::@12/(byte) myprintf::bArg#28 myprintf::@13/(byte) myprintf::bArg#29 ) + (byte*) myprintf::str#15 ← phi( myprintf::@12/(byte*) myprintf::str#27 myprintf::@13/(byte*) myprintf::str#28 ) + (byte) myprintf::bLen#10 ← phi( myprintf::@12/(byte) myprintf::bLen#19 myprintf::@13/(byte) myprintf::bLen#20 ) + (byte*) myprintf::dst#4 ← phi( myprintf::@12/(byte*) myprintf::dst#13 myprintf::@13/(byte*) myprintf::dst#14 ) + (byte) myprintf::b#16 ← phi( myprintf::@12/(byte) myprintf::b#29 myprintf::@13/(byte) myprintf::b#30 ) + (byte~) myprintf::$28 ← phi( myprintf::@12/(byte~) myprintf::$27 myprintf::@13/(byte/signed byte/word/signed word/dword/signed dword~) myprintf::$26 ) + (byte~) myprintf::$29 ← (byte~) myprintf::$28 + (byte) myprintf::b#16 + *((byte*) myprintf::dst#4 + (byte) myprintf::bLen#10) ← (byte~) myprintf::$29 + (byte) myprintf::bLen#3 ← ++ (byte) myprintf::bLen#10 + to:myprintf::@40 +myprintf::@19: scope:[myprintf] from myprintf::@20 myprintf::@71 + (word) myprintf::w#38 ← phi( myprintf::@20/(word) myprintf::w#41 myprintf::@71/(word) myprintf::w#42 ) + (word) myprintf::w3#41 ← phi( myprintf::@20/(word) myprintf::w3#44 myprintf::@71/(word) myprintf::w3#45 ) + (word) myprintf::w2#41 ← phi( myprintf::@20/(word) myprintf::w2#44 myprintf::@71/(word) myprintf::w2#45 ) + (word) myprintf::w1#41 ← phi( myprintf::@20/(word) myprintf::w1#44 myprintf::@71/(word) myprintf::w1#45 ) + (byte) myprintf::bArg#40 ← phi( myprintf::@20/(byte) myprintf::bArg#43 myprintf::@71/(byte) myprintf::bArg#44 ) + (byte*) myprintf::str#42 ← phi( myprintf::@20/(byte*) myprintf::str#45 myprintf::@71/(byte*) myprintf::str#46 ) + (byte) myprintf::bLen#42 ← phi( myprintf::@20/(byte) myprintf::bLen#49 myprintf::@71/(byte) myprintf::bLen#50 ) + (byte*) myprintf::dst#36 ← phi( myprintf::@20/(byte*) myprintf::dst#44 myprintf::@71/(byte*) myprintf::dst#45 ) + (byte) myprintf::bLeadZero#6 ← phi( myprintf::@20/(byte) myprintf::bLeadZero#9 myprintf::@71/(byte) myprintf::bLeadZero#10 ) + (byte) myprintf::bDigits#9 ← phi( myprintf::@20/(byte) myprintf::bDigits#13 myprintf::@71/(byte) myprintf::bDigits#14 ) + (byte) myprintf::bTrailing#5 ← phi( myprintf::@20/(byte) myprintf::bTrailing#7 myprintf::@71/(byte) myprintf::bTrailing#8 ) + (byte) myprintf::b#17 ← phi( myprintf::@20/(byte) myprintf::b#5 myprintf::@71/(byte) myprintf::b#2 ) + (bool~) myprintf::$31 ← *((byte[6]) myprintf::buf6#0 + (byte) myprintf::b#17) != (byte/signed byte/word/signed word/dword/signed dword) 0 + if((bool~) myprintf::$31) goto myprintf::@20 + to:myprintf::@21 +myprintf::@20: scope:[myprintf] from myprintf::@19 + (word) myprintf::w#41 ← phi( myprintf::@19/(word) myprintf::w#38 ) + (word) myprintf::w3#44 ← phi( myprintf::@19/(word) myprintf::w3#41 ) + (word) myprintf::w2#44 ← phi( myprintf::@19/(word) myprintf::w2#41 ) + (word) myprintf::w1#44 ← phi( myprintf::@19/(word) myprintf::w1#41 ) + (byte) myprintf::bArg#43 ← phi( myprintf::@19/(byte) myprintf::bArg#40 ) + (byte*) myprintf::str#45 ← phi( myprintf::@19/(byte*) myprintf::str#42 ) + (byte) myprintf::bLen#49 ← phi( myprintf::@19/(byte) myprintf::bLen#42 ) + (byte*) myprintf::dst#44 ← phi( myprintf::@19/(byte*) myprintf::dst#36 ) + (byte) myprintf::bLeadZero#9 ← phi( myprintf::@19/(byte) myprintf::bLeadZero#6 ) + (byte) myprintf::bDigits#13 ← phi( myprintf::@19/(byte) myprintf::bDigits#9 ) + (byte) myprintf::bTrailing#7 ← phi( myprintf::@19/(byte) myprintf::bTrailing#5 ) + (byte) myprintf::b#18 ← phi( myprintf::@19/(byte) myprintf::b#17 ) + (byte) myprintf::b#5 ← ++ (byte) myprintf::b#18 + to:myprintf::@19 +myprintf::@21: scope:[myprintf] from myprintf::@19 + (word) myprintf::w#36 ← phi( myprintf::@19/(word) myprintf::w#38 ) + (word) myprintf::w3#39 ← phi( myprintf::@19/(word) myprintf::w3#41 ) + (word) myprintf::w2#39 ← phi( myprintf::@19/(word) myprintf::w2#41 ) + (word) myprintf::w1#39 ← phi( myprintf::@19/(word) myprintf::w1#41 ) + (byte) myprintf::bArg#38 ← phi( myprintf::@19/(byte) myprintf::bArg#40 ) + (byte*) myprintf::str#40 ← phi( myprintf::@19/(byte*) myprintf::str#42 ) + (byte) myprintf::bLen#35 ← phi( myprintf::@19/(byte) myprintf::bLen#42 ) + (byte*) myprintf::dst#29 ← phi( myprintf::@19/(byte*) myprintf::dst#36 ) + (byte) myprintf::bLeadZero#4 ← phi( myprintf::@19/(byte) myprintf::bLeadZero#6 ) + (byte) myprintf::b#19 ← phi( myprintf::@19/(byte) myprintf::b#17 ) + (byte) myprintf::bDigits#5 ← phi( myprintf::@19/(byte) myprintf::bDigits#9 ) + (byte) myprintf::bTrailing#3 ← phi( myprintf::@19/(byte) myprintf::bTrailing#5 ) + (bool~) myprintf::$32 ← (byte) myprintf::bTrailing#3 == (byte/signed byte/word/signed word/dword/signed dword) 0 + (bool~) myprintf::$33 ← (byte) myprintf::bDigits#5 > (byte) myprintf::b#19 + (bool~) myprintf::$34 ← (bool~) myprintf::$32 && (bool~) myprintf::$33 + (bool~) myprintf::$35 ← ! (bool~) myprintf::$34 + if((bool~) myprintf::$35) goto myprintf::@26 + to:myprintf::@27 +myprintf::@26: scope:[myprintf] from myprintf::@21 myprintf::@30 + (byte) myprintf::bLeadZero#44 ← phi( myprintf::@21/(byte) myprintf::bLeadZero#4 myprintf::@30/(byte) myprintf::bLeadZero#5 ) + (word) myprintf::w#35 ← phi( myprintf::@21/(word) myprintf::w#36 myprintf::@30/(word) myprintf::w#37 ) + (word) myprintf::w3#37 ← phi( myprintf::@21/(word) myprintf::w3#39 myprintf::@30/(word) myprintf::w3#40 ) + (word) myprintf::w2#37 ← phi( myprintf::@21/(word) myprintf::w2#39 myprintf::@30/(word) myprintf::w2#40 ) + (word) myprintf::w1#37 ← phi( myprintf::@21/(word) myprintf::w1#39 myprintf::@30/(word) myprintf::w1#40 ) + (byte) myprintf::bArg#36 ← phi( myprintf::@21/(byte) myprintf::bArg#38 myprintf::@30/(byte) myprintf::bArg#39 ) + (byte*) myprintf::str#38 ← phi( myprintf::@21/(byte*) myprintf::str#40 myprintf::@30/(byte*) myprintf::str#41 ) + (byte) myprintf::bDigits#16 ← phi( myprintf::@21/(byte) myprintf::bDigits#5 myprintf::@30/(byte) myprintf::bDigits#2 ) + (byte) myprintf::bTrailing#9 ← phi( myprintf::@21/(byte) myprintf::bTrailing#3 myprintf::@30/(byte) myprintf::bTrailing#11 ) + (byte) myprintf::b#33 ← phi( myprintf::@21/(byte) myprintf::b#19 myprintf::@30/(byte) myprintf::b#20 ) + (byte) myprintf::bLen#23 ← phi( myprintf::@21/(byte) myprintf::bLen#35 myprintf::@30/(byte) myprintf::bLen#4 ) + (byte*) myprintf::dst#17 ← phi( myprintf::@21/(byte*) myprintf::dst#29 myprintf::@30/(byte*) myprintf::dst#5 ) + (byte) myprintf::digit#1 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:myprintf::@34 +myprintf::@27: scope:[myprintf] from myprintf::@21 myprintf::@30 + (word) myprintf::w#43 ← phi( myprintf::@21/(word) myprintf::w#36 myprintf::@30/(word) myprintf::w#37 ) + (word) myprintf::w3#46 ← phi( myprintf::@21/(word) myprintf::w3#39 myprintf::@30/(word) myprintf::w3#40 ) + (word) myprintf::w2#46 ← phi( myprintf::@21/(word) myprintf::w2#39 myprintf::@30/(word) myprintf::w2#40 ) + (word) myprintf::w1#46 ← phi( myprintf::@21/(word) myprintf::w1#39 myprintf::@30/(word) myprintf::w1#40 ) + (byte) myprintf::bArg#45 ← phi( myprintf::@21/(byte) myprintf::bArg#38 myprintf::@30/(byte) myprintf::bArg#39 ) + (byte*) myprintf::str#47 ← phi( myprintf::@21/(byte*) myprintf::str#40 myprintf::@30/(byte*) myprintf::str#41 ) + (byte) myprintf::bTrailing#16 ← phi( myprintf::@21/(byte) myprintf::bTrailing#3 myprintf::@30/(byte) myprintf::bTrailing#11 ) + (byte) myprintf::b#34 ← phi( myprintf::@21/(byte) myprintf::b#19 myprintf::@30/(byte) myprintf::b#20 ) + (byte) myprintf::bDigits#15 ← phi( myprintf::@21/(byte) myprintf::bDigits#5 myprintf::@30/(byte) myprintf::bDigits#2 ) + (byte) myprintf::bLen#36 ← phi( myprintf::@21/(byte) myprintf::bLen#35 myprintf::@30/(byte) myprintf::bLen#4 ) + (byte*) myprintf::dst#30 ← phi( myprintf::@21/(byte*) myprintf::dst#29 myprintf::@30/(byte*) myprintf::dst#5 ) + (byte) myprintf::bLeadZero#3 ← phi( myprintf::@21/(byte) myprintf::bLeadZero#4 myprintf::@30/(byte) myprintf::bLeadZero#5 ) + (bool~) myprintf::$36 ← (byte) myprintf::bLeadZero#3 == (byte/signed byte/word/signed word/dword/signed dword) 0 + if((bool~) myprintf::$36) goto myprintf::@28 + to:myprintf::@29 +myprintf::@28: scope:[myprintf] from myprintf::@27 + (word) myprintf::w#39 ← phi( myprintf::@27/(word) myprintf::w#43 ) + (word) myprintf::w3#42 ← phi( myprintf::@27/(word) myprintf::w3#46 ) + (word) myprintf::w2#42 ← phi( myprintf::@27/(word) myprintf::w2#46 ) + (word) myprintf::w1#42 ← phi( myprintf::@27/(word) myprintf::w1#46 ) + (byte) myprintf::bArg#41 ← phi( myprintf::@27/(byte) myprintf::bArg#45 ) + (byte*) myprintf::str#43 ← phi( myprintf::@27/(byte*) myprintf::str#47 ) + (byte) myprintf::bTrailing#13 ← phi( myprintf::@27/(byte) myprintf::bTrailing#16 ) + (byte) myprintf::bLeadZero#7 ← phi( myprintf::@27/(byte) myprintf::bLeadZero#3 ) + (byte) myprintf::b#31 ← phi( myprintf::@27/(byte) myprintf::b#34 ) + (byte) myprintf::bDigits#10 ← phi( myprintf::@27/(byte) myprintf::bDigits#15 ) + (byte) myprintf::bLen#21 ← phi( myprintf::@27/(byte) myprintf::bLen#36 ) + (byte*) myprintf::dst#15 ← phi( myprintf::@27/(byte*) myprintf::dst#30 ) + (byte~) myprintf::$38 ← (byte) ' ' + to:myprintf::@30 +myprintf::@29: scope:[myprintf] from myprintf::@27 + (word) myprintf::w#40 ← phi( myprintf::@27/(word) myprintf::w#43 ) + (word) myprintf::w3#43 ← phi( myprintf::@27/(word) myprintf::w3#46 ) + (word) myprintf::w2#43 ← phi( myprintf::@27/(word) myprintf::w2#46 ) + (word) myprintf::w1#43 ← phi( myprintf::@27/(word) myprintf::w1#46 ) + (byte) myprintf::bArg#42 ← phi( myprintf::@27/(byte) myprintf::bArg#45 ) + (byte*) myprintf::str#44 ← phi( myprintf::@27/(byte*) myprintf::str#47 ) + (byte) myprintf::bTrailing#14 ← phi( myprintf::@27/(byte) myprintf::bTrailing#16 ) + (byte) myprintf::bLeadZero#8 ← phi( myprintf::@27/(byte) myprintf::bLeadZero#3 ) + (byte) myprintf::b#32 ← phi( myprintf::@27/(byte) myprintf::b#34 ) + (byte) myprintf::bDigits#11 ← phi( myprintf::@27/(byte) myprintf::bDigits#15 ) + (byte) myprintf::bLen#22 ← phi( myprintf::@27/(byte) myprintf::bLen#36 ) + (byte*) myprintf::dst#16 ← phi( myprintf::@27/(byte*) myprintf::dst#30 ) + (byte~) myprintf::$37 ← (byte) '0' + to:myprintf::@30 +myprintf::@30: scope:[myprintf] from myprintf::@28 myprintf::@29 + (word) myprintf::w#37 ← phi( myprintf::@28/(word) myprintf::w#39 myprintf::@29/(word) myprintf::w#40 ) + (word) myprintf::w3#40 ← phi( myprintf::@28/(word) myprintf::w3#42 myprintf::@29/(word) myprintf::w3#43 ) + (word) myprintf::w2#40 ← phi( myprintf::@28/(word) myprintf::w2#42 myprintf::@29/(word) myprintf::w2#43 ) + (word) myprintf::w1#40 ← phi( myprintf::@28/(word) myprintf::w1#42 myprintf::@29/(word) myprintf::w1#43 ) + (byte) myprintf::bArg#39 ← phi( myprintf::@28/(byte) myprintf::bArg#41 myprintf::@29/(byte) myprintf::bArg#42 ) + (byte*) myprintf::str#41 ← phi( myprintf::@28/(byte*) myprintf::str#43 myprintf::@29/(byte*) myprintf::str#44 ) + (byte) myprintf::bTrailing#11 ← phi( myprintf::@28/(byte) myprintf::bTrailing#13 myprintf::@29/(byte) myprintf::bTrailing#14 ) + (byte) myprintf::bLeadZero#5 ← phi( myprintf::@28/(byte) myprintf::bLeadZero#7 myprintf::@29/(byte) myprintf::bLeadZero#8 ) + (byte) myprintf::b#20 ← phi( myprintf::@28/(byte) myprintf::b#31 myprintf::@29/(byte) myprintf::b#32 ) + (byte) myprintf::bDigits#6 ← phi( myprintf::@28/(byte) myprintf::bDigits#10 myprintf::@29/(byte) myprintf::bDigits#11 ) + (byte) myprintf::bLen#11 ← phi( myprintf::@28/(byte) myprintf::bLen#21 myprintf::@29/(byte) myprintf::bLen#22 ) + (byte*) myprintf::dst#5 ← phi( myprintf::@28/(byte*) myprintf::dst#15 myprintf::@29/(byte*) myprintf::dst#16 ) + (byte~) myprintf::$39 ← phi( myprintf::@28/(byte~) myprintf::$38 myprintf::@29/(byte~) myprintf::$37 ) + *((byte*) myprintf::dst#5 + (byte) myprintf::bLen#11) ← (byte~) myprintf::$39 + (byte) myprintf::bLen#4 ← ++ (byte) myprintf::bLen#11 + (byte) myprintf::bDigits#2 ← -- (byte) myprintf::bDigits#6 + (bool~) myprintf::$40 ← (byte) myprintf::bDigits#2 > (byte) myprintf::b#20 + if((bool~) myprintf::$40) goto myprintf::@27 + to:myprintf::@26 +myprintf::@34: scope:[myprintf] from myprintf::@26 myprintf::@34 + (byte) myprintf::bLeadZero#41 ← phi( myprintf::@26/(byte) myprintf::bLeadZero#44 myprintf::@34/(byte) myprintf::bLeadZero#41 ) + (word) myprintf::w#34 ← phi( myprintf::@26/(word) myprintf::w#35 myprintf::@34/(word) myprintf::w#34 ) + (word) myprintf::w3#34 ← phi( myprintf::@26/(word) myprintf::w3#37 myprintf::@34/(word) myprintf::w3#34 ) + (word) myprintf::w2#34 ← phi( myprintf::@26/(word) myprintf::w2#37 myprintf::@34/(word) myprintf::w2#34 ) + (word) myprintf::w1#34 ← phi( myprintf::@26/(word) myprintf::w1#37 myprintf::@34/(word) myprintf::w1#34 ) + (byte) myprintf::bArg#33 ← phi( myprintf::@26/(byte) myprintf::bArg#36 myprintf::@34/(byte) myprintf::bArg#33 ) + (byte*) myprintf::str#35 ← phi( myprintf::@26/(byte*) myprintf::str#38 myprintf::@34/(byte*) myprintf::str#35 ) + (byte) myprintf::bDigits#12 ← phi( myprintf::@26/(byte) myprintf::bDigits#16 myprintf::@34/(byte) myprintf::bDigits#12 ) + (byte) myprintf::bTrailing#6 ← phi( myprintf::@26/(byte) myprintf::bTrailing#9 myprintf::@34/(byte) myprintf::bTrailing#6 ) + (byte) myprintf::b#21 ← phi( myprintf::@26/(byte) myprintf::b#33 myprintf::@34/(byte) myprintf::b#21 ) + (byte) myprintf::bLen#12 ← phi( myprintf::@26/(byte) myprintf::bLen#23 myprintf::@34/(byte) myprintf::bLen#5 ) + (byte*) myprintf::dst#6 ← phi( myprintf::@26/(byte*) myprintf::dst#17 myprintf::@34/(byte*) myprintf::dst#6 ) + (byte) myprintf::digit#3 ← phi( myprintf::@26/(byte) myprintf::digit#1 myprintf::@34/(byte) myprintf::digit#2 ) + *((byte*) myprintf::dst#6 + (byte) myprintf::bLen#12) ← *((byte[6]) myprintf::buf6#0 + (byte) myprintf::digit#3) + (byte) myprintf::bLen#5 ← ++ (byte) myprintf::bLen#12 + (byte) myprintf::digit#2 ← ++ (byte) myprintf::digit#3 + (bool~) myprintf::$41 ← (byte) myprintf::digit#2 < (byte) myprintf::b#21 + if((bool~) myprintf::$41) goto myprintf::@34 + to:myprintf::@35 +myprintf::@35: scope:[myprintf] from myprintf::@34 + (byte) myprintf::bLeadZero#37 ← phi( myprintf::@34/(byte) myprintf::bLeadZero#41 ) + (word) myprintf::w#32 ← phi( myprintf::@34/(word) myprintf::w#34 ) + (word) myprintf::w3#31 ← phi( myprintf::@34/(word) myprintf::w3#34 ) + (word) myprintf::w2#31 ← phi( myprintf::@34/(word) myprintf::w2#34 ) + (word) myprintf::w1#30 ← phi( myprintf::@34/(word) myprintf::w1#34 ) + (byte) myprintf::bArg#30 ← phi( myprintf::@34/(byte) myprintf::bArg#33 ) + (byte*) myprintf::str#29 ← phi( myprintf::@34/(byte*) myprintf::str#35 ) + (byte) myprintf::bLen#24 ← phi( myprintf::@34/(byte) myprintf::bLen#5 ) + (byte*) myprintf::dst#18 ← phi( myprintf::@34/(byte*) myprintf::dst#6 ) + (byte) myprintf::b#22 ← phi( myprintf::@34/(byte) myprintf::b#21 ) + (byte) myprintf::bDigits#7 ← phi( myprintf::@34/(byte) myprintf::bDigits#12 ) + (byte) myprintf::bTrailing#4 ← phi( myprintf::@34/(byte) myprintf::bTrailing#6 ) + (bool~) myprintf::$42 ← (byte) myprintf::bTrailing#4 != (byte/signed byte/word/signed word/dword/signed dword) 0 + (bool~) myprintf::$43 ← (byte) myprintf::bDigits#7 > (byte) myprintf::b#22 + (bool~) myprintf::$44 ← (bool~) myprintf::$42 && (bool~) myprintf::$43 + (bool~) myprintf::$45 ← ! (bool~) myprintf::$44 + if((bool~) myprintf::$45) goto myprintf::@37 + to:myprintf::@38 +myprintf::@37: scope:[myprintf] from myprintf::@35 + (byte) myprintf::bLeadZero#25 ← phi( myprintf::@35/(byte) myprintf::bLeadZero#37 ) + (byte) myprintf::bDigits#31 ← phi( myprintf::@35/(byte) myprintf::bDigits#7 ) + (byte) myprintf::bTrailing#28 ← phi( myprintf::@35/(byte) myprintf::bTrailing#4 ) + (word) myprintf::w#25 ← phi( myprintf::@35/(word) myprintf::w#32 ) + (word) myprintf::w3#19 ← phi( myprintf::@35/(word) myprintf::w3#31 ) + (word) myprintf::w2#19 ← phi( myprintf::@35/(word) myprintf::w2#31 ) + (word) myprintf::w1#18 ← phi( myprintf::@35/(word) myprintf::w1#30 ) + (byte) myprintf::bArg#20 ← phi( myprintf::@35/(byte) myprintf::bArg#30 ) + (byte) myprintf::bLen#43 ← phi( myprintf::@35/(byte) myprintf::bLen#24 ) + (byte*) myprintf::dst#37 ← phi( myprintf::@35/(byte*) myprintf::dst#18 ) + (byte*) myprintf::str#16 ← phi( myprintf::@35/(byte*) myprintf::str#29 ) + to:myprintf::@40 +myprintf::@38: scope:[myprintf] from myprintf::@35 myprintf::@38 + (byte) myprintf::bLeadZero#26 ← phi( myprintf::@35/(byte) myprintf::bLeadZero#37 myprintf::@38/(byte) myprintf::bLeadZero#26 ) + (byte) myprintf::bTrailing#29 ← phi( myprintf::@35/(byte) myprintf::bTrailing#4 myprintf::@38/(byte) myprintf::bTrailing#29 ) + (word) myprintf::w#26 ← phi( myprintf::@35/(word) myprintf::w#32 myprintf::@38/(word) myprintf::w#26 ) + (word) myprintf::w3#20 ← phi( myprintf::@35/(word) myprintf::w3#31 myprintf::@38/(word) myprintf::w3#20 ) + (word) myprintf::w2#20 ← phi( myprintf::@35/(word) myprintf::w2#31 myprintf::@38/(word) myprintf::w2#20 ) + (word) myprintf::w1#19 ← phi( myprintf::@35/(word) myprintf::w1#30 myprintf::@38/(word) myprintf::w1#19 ) + (byte) myprintf::bArg#21 ← phi( myprintf::@35/(byte) myprintf::bArg#30 myprintf::@38/(byte) myprintf::bArg#21 ) + (byte*) myprintf::str#17 ← phi( myprintf::@35/(byte*) myprintf::str#29 myprintf::@38/(byte*) myprintf::str#17 ) + (byte) myprintf::b#23 ← phi( myprintf::@35/(byte) myprintf::b#22 myprintf::@38/(byte) myprintf::b#23 ) + (byte) myprintf::bDigits#8 ← phi( myprintf::@35/(byte) myprintf::bDigits#7 myprintf::@38/(byte) myprintf::bDigits#3 ) + (byte) myprintf::bLen#13 ← phi( myprintf::@35/(byte) myprintf::bLen#24 myprintf::@38/(byte) myprintf::bLen#6 ) + (byte*) myprintf::dst#7 ← phi( myprintf::@35/(byte*) myprintf::dst#18 myprintf::@38/(byte*) myprintf::dst#7 ) + *((byte*) myprintf::dst#7 + (byte) myprintf::bLen#13) ← (byte) ' ' + (byte) myprintf::bLen#6 ← ++ (byte) myprintf::bLen#13 + (byte) myprintf::bDigits#3 ← -- (byte) myprintf::bDigits#8 + (bool~) myprintf::$46 ← (byte) myprintf::bDigits#3 > (byte) myprintf::b#23 + if((bool~) myprintf::$46) goto myprintf::@38 + to:myprintf::@40 +myprintf::@40: scope:[myprintf] from myprintf::@14 myprintf::@37 myprintf::@38 myprintf::@6 myprintf::@8 + (byte) myprintf::bLeadZero#19 ← phi( myprintf::@14/(byte) myprintf::bLeadZero#24 myprintf::@37/(byte) myprintf::bLeadZero#25 myprintf::@38/(byte) myprintf::bLeadZero#26 myprintf::@6/(byte) myprintf::bLeadZero#27 myprintf::@8/(byte) myprintf::bLeadZero#28 ) + (byte) myprintf::bDigits#25 ← phi( myprintf::@14/(byte) myprintf::bDigits#30 myprintf::@37/(byte) myprintf::bDigits#31 myprintf::@38/(byte) myprintf::bDigits#3 myprintf::@6/(byte) myprintf::bDigits#32 myprintf::@8/(byte) myprintf::bDigits#33 ) + (byte) myprintf::bTrailing#22 ← phi( myprintf::@14/(byte) myprintf::bTrailing#27 myprintf::@37/(byte) myprintf::bTrailing#28 myprintf::@38/(byte) myprintf::bTrailing#29 myprintf::@6/(byte) myprintf::bTrailing#30 myprintf::@8/(byte) myprintf::bTrailing#31 ) + (word) myprintf::w#18 ← phi( myprintf::@14/(word) myprintf::w#24 myprintf::@37/(word) myprintf::w#25 myprintf::@38/(word) myprintf::w#26 myprintf::@6/(word) myprintf::w#4 myprintf::@8/(word) myprintf::w#27 ) + (word) myprintf::w3#9 ← phi( myprintf::@14/(word) myprintf::w3#18 myprintf::@37/(word) myprintf::w3#19 myprintf::@38/(word) myprintf::w3#20 myprintf::@6/(word) myprintf::w3#21 myprintf::@8/(word) myprintf::w3#22 ) + (word) myprintf::w2#9 ← phi( myprintf::@14/(word) myprintf::w2#18 myprintf::@37/(word) myprintf::w2#19 myprintf::@38/(word) myprintf::w2#20 myprintf::@6/(word) myprintf::w2#21 myprintf::@8/(word) myprintf::w2#22 ) + (word) myprintf::w1#8 ← phi( myprintf::@14/(word) myprintf::w1#17 myprintf::@37/(word) myprintf::w1#18 myprintf::@38/(word) myprintf::w1#19 myprintf::@6/(word) myprintf::w1#20 myprintf::@8/(word) myprintf::w1#21 ) + (byte) myprintf::bArg#11 ← phi( myprintf::@14/(byte) myprintf::bArg#19 myprintf::@37/(byte) myprintf::bArg#20 myprintf::@38/(byte) myprintf::bArg#21 myprintf::@6/(byte) myprintf::bArg#22 myprintf::@8/(byte) myprintf::bArg#23 ) + (byte) myprintf::bLen#28 ← phi( myprintf::@14/(byte) myprintf::bLen#3 myprintf::@37/(byte) myprintf::bLen#43 myprintf::@38/(byte) myprintf::bLen#6 myprintf::@6/(byte) myprintf::bLen#1 myprintf::@8/(byte) myprintf::bLen#44 ) + (byte*) myprintf::dst#22 ← phi( myprintf::@14/(byte*) myprintf::dst#4 myprintf::@37/(byte*) myprintf::dst#37 myprintf::@38/(byte*) myprintf::dst#7 myprintf::@6/(byte*) myprintf::dst#2 myprintf::@8/(byte*) myprintf::dst#38 ) + (byte*) myprintf::str#6 ← phi( myprintf::@14/(byte*) myprintf::str#15 myprintf::@37/(byte*) myprintf::str#16 myprintf::@38/(byte*) myprintf::str#17 myprintf::@6/(byte*) myprintf::str#18 myprintf::@8/(byte*) myprintf::str#19 ) + (byte) myprintf::bFormat#1 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:myprintf::@52 +myprintf::@53: scope:[myprintf] from myprintf::@2 + (byte) myprintf::bLeadZero#32 ← phi( myprintf::@2/(byte) myprintf::bLeadZero#38 ) + (byte) myprintf::bDigits#37 ← phi( myprintf::@2/(byte) myprintf::bDigits#42 ) + (byte) myprintf::bTrailing#35 ← phi( myprintf::@2/(byte) myprintf::bTrailing#40 ) + (word) myprintf::w#28 ← phi( myprintf::@2/(word) myprintf::w#33 ) + (word) myprintf::w3#25 ← phi( myprintf::@2/(word) myprintf::w3#5 ) + (word) myprintf::w2#25 ← phi( myprintf::@2/(word) myprintf::w2#5 ) + (word) myprintf::w1#24 ← phi( myprintf::@2/(word) myprintf::w1#4 ) + (byte) myprintf::bArg#24 ← phi( myprintf::@2/(byte) myprintf::bArg#5 ) + (byte) myprintf::bFormat#16 ← phi( myprintf::@2/(byte) myprintf::bFormat#18 ) + (byte*) myprintf::str#23 ← phi( myprintf::@2/(byte*) myprintf::str#30 ) + (byte) myprintf::bLen#25 ← phi( myprintf::@2/(byte) myprintf::bLen#37 ) + (byte*) myprintf::dst#19 ← phi( myprintf::@2/(byte*) myprintf::dst#31 ) + (byte) myprintf::b#24 ← phi( myprintf::@2/(byte) myprintf::b#7 ) + (bool~) myprintf::$52 ← (byte) myprintf::b#24 >= (byte/signed byte/word/signed word/dword/signed dword) $41 + (bool~) myprintf::$53 ← (byte) myprintf::b#24 <= (byte/signed byte/word/signed word/dword/signed dword) $5a + (bool~) myprintf::$54 ← (bool~) myprintf::$52 && (bool~) myprintf::$53 + (bool~) myprintf::$55 ← ! (bool~) myprintf::$54 + if((bool~) myprintf::$55) goto myprintf::@60 + to:myprintf::@68 +myprintf::@64: scope:[myprintf] from myprintf::@2 + (byte) myprintf::bLen#51 ← phi( myprintf::@2/(byte) myprintf::bLen#37 ) + (byte*) myprintf::dst#46 ← phi( myprintf::@2/(byte*) myprintf::dst#31 ) + (byte*) myprintf::str#31 ← phi( myprintf::@2/(byte*) myprintf::str#30 ) + (word) myprintf::w3#4 ← phi( myprintf::@2/(word) myprintf::w3#5 ) + (word) myprintf::w2#4 ← phi( myprintf::@2/(word) myprintf::w2#5 ) + (word) myprintf::w1#3 ← phi( myprintf::@2/(word) myprintf::w1#4 ) + (byte) myprintf::bArg#2 ← phi( myprintf::@2/(byte) myprintf::bArg#5 ) + (byte) myprintf::bFormat#2 ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) myprintf::bLeadZero#2 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) myprintf::bDigits#4 ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) myprintf::bTrailing#2 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (bool~) myprintf::$50 ← (byte) myprintf::bArg#2 == (byte/signed byte/word/signed word/dword/signed dword) 0 + if((bool~) myprintf::$50) goto myprintf::@54 + to:myprintf::@65 +myprintf::@54: scope:[myprintf] from myprintf::@64 + (byte) myprintf::bLeadZero#29 ← phi( myprintf::@64/(byte) myprintf::bLeadZero#2 ) + (byte) myprintf::bDigits#34 ← phi( myprintf::@64/(byte) myprintf::bDigits#4 ) + (byte) myprintf::bTrailing#32 ← phi( myprintf::@64/(byte) myprintf::bTrailing#2 ) + (word) myprintf::w3#23 ← phi( myprintf::@64/(word) myprintf::w3#4 ) + (word) myprintf::w2#23 ← phi( myprintf::@64/(word) myprintf::w2#4 ) + (byte) myprintf::bLen#45 ← phi( myprintf::@64/(byte) myprintf::bLen#51 ) + (byte*) myprintf::dst#39 ← phi( myprintf::@64/(byte*) myprintf::dst#46 ) + (byte) myprintf::bFormat#13 ← phi( myprintf::@64/(byte) myprintf::bFormat#2 ) + (byte*) myprintf::str#20 ← phi( myprintf::@64/(byte*) myprintf::str#31 ) + (byte) myprintf::bArg#6 ← phi( myprintf::@64/(byte) myprintf::bArg#2 ) + (word) myprintf::w1#2 ← phi( myprintf::@64/(word) myprintf::w1#3 ) + (word) myprintf::w#1 ← (word) myprintf::w1#2 + to:myprintf::@57 +myprintf::@65: scope:[myprintf] from myprintf::@64 + (byte) myprintf::bLeadZero#39 ← phi( myprintf::@64/(byte) myprintf::bLeadZero#2 ) + (byte) myprintf::bDigits#43 ← phi( myprintf::@64/(byte) myprintf::bDigits#4 ) + (byte) myprintf::bTrailing#41 ← phi( myprintf::@64/(byte) myprintf::bTrailing#2 ) + (word) myprintf::w1#31 ← phi( myprintf::@64/(word) myprintf::w1#3 ) + (byte) myprintf::bLen#52 ← phi( myprintf::@64/(byte) myprintf::bLen#51 ) + (byte*) myprintf::dst#47 ← phi( myprintf::@64/(byte*) myprintf::dst#46 ) + (byte) myprintf::bFormat#19 ← phi( myprintf::@64/(byte) myprintf::bFormat#2 ) + (byte*) myprintf::str#32 ← phi( myprintf::@64/(byte*) myprintf::str#31 ) + (word) myprintf::w3#3 ← phi( myprintf::@64/(word) myprintf::w3#4 ) + (word) myprintf::w2#3 ← phi( myprintf::@64/(word) myprintf::w2#4 ) + (byte) myprintf::bArg#3 ← phi( myprintf::@64/(byte) myprintf::bArg#2 ) + (bool~) myprintf::$51 ← (byte) myprintf::bArg#3 == (byte/signed byte/word/signed word/dword/signed dword) 1 + if((bool~) myprintf::$51) goto myprintf::@55 + to:myprintf::@66 +myprintf::@55: scope:[myprintf] from myprintf::@65 + (byte) myprintf::bLeadZero#30 ← phi( myprintf::@65/(byte) myprintf::bLeadZero#39 ) + (byte) myprintf::bDigits#35 ← phi( myprintf::@65/(byte) myprintf::bDigits#43 ) + (byte) myprintf::bTrailing#33 ← phi( myprintf::@65/(byte) myprintf::bTrailing#41 ) + (word) myprintf::w3#24 ← phi( myprintf::@65/(word) myprintf::w3#3 ) + (word) myprintf::w1#22 ← phi( myprintf::@65/(word) myprintf::w1#31 ) + (byte) myprintf::bLen#46 ← phi( myprintf::@65/(byte) myprintf::bLen#52 ) + (byte*) myprintf::dst#40 ← phi( myprintf::@65/(byte*) myprintf::dst#47 ) + (byte) myprintf::bFormat#14 ← phi( myprintf::@65/(byte) myprintf::bFormat#19 ) + (byte*) myprintf::str#21 ← phi( myprintf::@65/(byte*) myprintf::str#32 ) + (byte) myprintf::bArg#7 ← phi( myprintf::@65/(byte) myprintf::bArg#3 ) + (word) myprintf::w2#2 ← phi( myprintf::@65/(word) myprintf::w2#3 ) + (word) myprintf::w#2 ← (word) myprintf::w2#2 + to:myprintf::@57 +myprintf::@66: scope:[myprintf] from myprintf::@65 + (byte) myprintf::bLeadZero#31 ← phi( myprintf::@65/(byte) myprintf::bLeadZero#39 ) + (byte) myprintf::bDigits#36 ← phi( myprintf::@65/(byte) myprintf::bDigits#43 ) + (byte) myprintf::bTrailing#34 ← phi( myprintf::@65/(byte) myprintf::bTrailing#41 ) + (word) myprintf::w2#24 ← phi( myprintf::@65/(word) myprintf::w2#3 ) + (word) myprintf::w1#23 ← phi( myprintf::@65/(word) myprintf::w1#31 ) + (byte) myprintf::bLen#47 ← phi( myprintf::@65/(byte) myprintf::bLen#52 ) + (byte*) myprintf::dst#41 ← phi( myprintf::@65/(byte*) myprintf::dst#47 ) + (byte) myprintf::bFormat#15 ← phi( myprintf::@65/(byte) myprintf::bFormat#19 ) + (byte*) myprintf::str#22 ← phi( myprintf::@65/(byte*) myprintf::str#32 ) + (byte) myprintf::bArg#8 ← phi( myprintf::@65/(byte) myprintf::bArg#3 ) + (word) myprintf::w3#2 ← phi( myprintf::@65/(word) myprintf::w3#3 ) + (word) myprintf::w#3 ← (word) myprintf::w3#2 + to:myprintf::@57 +myprintf::@57: scope:[myprintf] from myprintf::@54 myprintf::@55 myprintf::@66 + (byte) myprintf::bLeadZero#22 ← phi( myprintf::@54/(byte) myprintf::bLeadZero#29 myprintf::@55/(byte) myprintf::bLeadZero#30 myprintf::@66/(byte) myprintf::bLeadZero#31 ) + (byte) myprintf::bDigits#27 ← phi( myprintf::@54/(byte) myprintf::bDigits#34 myprintf::@55/(byte) myprintf::bDigits#35 myprintf::@66/(byte) myprintf::bDigits#36 ) + (byte) myprintf::bTrailing#24 ← phi( myprintf::@54/(byte) myprintf::bTrailing#32 myprintf::@55/(byte) myprintf::bTrailing#33 myprintf::@66/(byte) myprintf::bTrailing#34 ) + (word) myprintf::w#21 ← phi( myprintf::@54/(word) myprintf::w#1 myprintf::@55/(word) myprintf::w#2 myprintf::@66/(word) myprintf::w#3 ) + (word) myprintf::w3#12 ← phi( myprintf::@54/(word) myprintf::w3#23 myprintf::@55/(word) myprintf::w3#24 myprintf::@66/(word) myprintf::w3#2 ) + (word) myprintf::w2#12 ← phi( myprintf::@54/(word) myprintf::w2#23 myprintf::@55/(word) myprintf::w2#2 myprintf::@66/(word) myprintf::w2#24 ) + (word) myprintf::w1#11 ← phi( myprintf::@54/(word) myprintf::w1#2 myprintf::@55/(word) myprintf::w1#22 myprintf::@66/(word) myprintf::w1#23 ) + (byte) myprintf::bLen#31 ← phi( myprintf::@54/(byte) myprintf::bLen#45 myprintf::@55/(byte) myprintf::bLen#46 myprintf::@66/(byte) myprintf::bLen#47 ) + (byte*) myprintf::dst#25 ← phi( myprintf::@54/(byte*) myprintf::dst#39 myprintf::@55/(byte*) myprintf::dst#40 myprintf::@66/(byte*) myprintf::dst#41 ) + (byte) myprintf::bFormat#7 ← phi( myprintf::@54/(byte) myprintf::bFormat#13 myprintf::@55/(byte) myprintf::bFormat#14 myprintf::@66/(byte) myprintf::bFormat#15 ) + (byte*) myprintf::str#9 ← phi( myprintf::@54/(byte*) myprintf::str#20 myprintf::@55/(byte*) myprintf::str#21 myprintf::@66/(byte*) myprintf::str#22 ) + (byte) myprintf::bArg#4 ← phi( myprintf::@54/(byte) myprintf::bArg#6 myprintf::@55/(byte) myprintf::bArg#7 myprintf::@66/(byte) myprintf::bArg#8 ) + (byte) myprintf::bArg#1 ← ++ (byte) myprintf::bArg#4 + to:myprintf::@52 +myprintf::@60: scope:[myprintf] from myprintf::@53 myprintf::@68 + (byte) myprintf::bLeadZero#23 ← phi( myprintf::@53/(byte) myprintf::bLeadZero#32 myprintf::@68/(byte) myprintf::bLeadZero#33 ) + (byte) myprintf::bDigits#28 ← phi( myprintf::@53/(byte) myprintf::bDigits#37 myprintf::@68/(byte) myprintf::bDigits#38 ) + (byte) myprintf::bTrailing#25 ← phi( myprintf::@53/(byte) myprintf::bTrailing#35 myprintf::@68/(byte) myprintf::bTrailing#36 ) + (word) myprintf::w#22 ← phi( myprintf::@53/(word) myprintf::w#28 myprintf::@68/(word) myprintf::w#29 ) + (word) myprintf::w3#13 ← phi( myprintf::@53/(word) myprintf::w3#25 myprintf::@68/(word) myprintf::w3#26 ) + (word) myprintf::w2#13 ← phi( myprintf::@53/(word) myprintf::w2#25 myprintf::@68/(word) myprintf::w2#26 ) + (word) myprintf::w1#12 ← phi( myprintf::@53/(word) myprintf::w1#24 myprintf::@68/(word) myprintf::w1#25 ) + (byte) myprintf::bArg#14 ← phi( myprintf::@53/(byte) myprintf::bArg#24 myprintf::@68/(byte) myprintf::bArg#25 ) + (byte) myprintf::bFormat#8 ← phi( myprintf::@53/(byte) myprintf::bFormat#16 myprintf::@68/(byte) myprintf::bFormat#17 ) + (byte*) myprintf::str#10 ← phi( myprintf::@53/(byte*) myprintf::str#23 myprintf::@68/(byte*) myprintf::str#24 ) + (byte) myprintf::bLen#14 ← phi( myprintf::@53/(byte) myprintf::bLen#25 myprintf::@68/(byte) myprintf::bLen#26 ) + (byte*) myprintf::dst#8 ← phi( myprintf::@53/(byte*) myprintf::dst#19 myprintf::@68/(byte*) myprintf::dst#20 ) + (byte) myprintf::b#25 ← phi( myprintf::@53/(byte) myprintf::b#24 myprintf::@68/(byte) myprintf::b#6 ) + *((byte*) myprintf::dst#8 + (byte) myprintf::bLen#14) ← (byte) myprintf::b#25 + (byte) myprintf::bLen#7 ← ++ (byte) myprintf::bLen#14 + to:myprintf::@52 +myprintf::@68: scope:[myprintf] from myprintf::@53 + (byte) myprintf::bLeadZero#33 ← phi( myprintf::@53/(byte) myprintf::bLeadZero#32 ) + (byte) myprintf::bDigits#38 ← phi( myprintf::@53/(byte) myprintf::bDigits#37 ) + (byte) myprintf::bTrailing#36 ← phi( myprintf::@53/(byte) myprintf::bTrailing#35 ) + (word) myprintf::w#29 ← phi( myprintf::@53/(word) myprintf::w#28 ) + (word) myprintf::w3#26 ← phi( myprintf::@53/(word) myprintf::w3#25 ) + (word) myprintf::w2#26 ← phi( myprintf::@53/(word) myprintf::w2#25 ) + (word) myprintf::w1#25 ← phi( myprintf::@53/(word) myprintf::w1#24 ) + (byte) myprintf::bArg#25 ← phi( myprintf::@53/(byte) myprintf::bArg#24 ) + (byte) myprintf::bFormat#17 ← phi( myprintf::@53/(byte) myprintf::bFormat#16 ) + (byte*) myprintf::str#24 ← phi( myprintf::@53/(byte*) myprintf::str#23 ) + (byte) myprintf::bLen#26 ← phi( myprintf::@53/(byte) myprintf::bLen#25 ) + (byte*) myprintf::dst#20 ← phi( myprintf::@53/(byte*) myprintf::dst#19 ) + (byte) myprintf::b#26 ← phi( myprintf::@53/(byte) myprintf::b#24 ) + (byte) myprintf::b#6 ← (byte) myprintf::b#26 + (byte/signed byte/word/signed word/dword/signed dword) $20 + to:myprintf::@60 +myprintf::@69: scope:[myprintf] from myprintf::@52 + (byte) myprintf::bLen#15 ← phi( myprintf::@52/(byte) myprintf::bLen#27 ) + (byte*) myprintf::dst#9 ← phi( myprintf::@52/(byte*) myprintf::dst#21 ) + *((byte*) myprintf::dst#9 + (byte) myprintf::bLen#15) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) myprintf::return#0 ← (byte) myprintf::bLen#15 + to:myprintf::@return +myprintf::@return: scope:[myprintf] from myprintf::@69 + (byte) myprintf::return#4 ← phi( myprintf::@69/(byte) myprintf::return#0 ) + (byte) myprintf::return#1 ← (byte) myprintf::return#4 + return + to:@return +Print: scope:[Print] from main::@11 main::@14 + asm { ldy#0 loop: ldastrTemp,y beqdone jsr$FFD2 iny jmploop done: } + to:Print::@return +Print::@return: scope:[Print] from Print + return + to:@return +div10: scope:[div10] from main::@6 + (word) div10::val#5 ← phi( main::@6/(word) div10::val#4 ) + (word~) div10::$0 ← (word) div10::val#5 >> (byte/signed byte/word/signed word/dword/signed dword) 1 + (word/signed dword/dword~) div10::$1 ← (word~) div10::$0 + (byte/signed byte/word/signed word/dword/signed dword) 1 + (word) div10::val#0 ← (word/signed dword/dword~) div10::$1 + (word~) div10::$2 ← (word) div10::val#0 << (byte/signed byte/word/signed word/dword/signed dword) 1 + (word) div10::val#1 ← (word) div10::val#0 + (word~) div10::$2 + (word~) div10::$3 ← (word) div10::val#1 >> (byte/signed byte/word/signed word/dword/signed dword) 4 + (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 + (word~) div10::$4 ← (word) div10::val#2 >> (byte/signed byte/word/signed word/dword/signed dword) 4 + (word~) div10::$5 ← (word~) div10::$4 >> (byte/signed byte/word/signed word/dword/signed dword) 4 + (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$5 + (word~) div10::$6 ← (word) div10::val#3 >> (byte/signed byte/word/signed word/dword/signed dword) 4 + (word) div10::return#0 ← (word~) div10::$6 + to:div10::@return +div10::@return: scope:[div10] from div10 + (word) div10::return#3 ← phi( div10/(word) div10::return#0 ) + (word) div10::return#1 ← (word) div10::return#3 + return + to:@return +main: scope:[main] from @14 + (word) main::u#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (word) main::v#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) VICBANK#0) ← (byte/signed byte/word/signed word/dword/signed dword) $17 + (word) main::u#1 ← (word/signed word/dword/signed dword) $6e85 + *((byte*) zp1#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:main::@1 +main::@1: scope:[main] from main main::@12 + (word) main::u#11 ← phi( main/(word) main::u#1 main::@12/(word) main::u#2 ) + *((byte*) TIMEHI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) TIMELO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) zp2#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:main::@2 +main::@2: scope:[main] from main::@1 main::@10 + (word) main::u#5 ← phi( main::@1/(word) main::u#11 main::@10/(word) main::u#12 ) + (word) div16u::dividend#0 ← (word) main::u#5 + (word) div16u::divisor#0 ← (byte/signed byte/word/signed word/dword/signed dword) $a + call div16u + (word) div16u::return#2 ← (word) div16u::return#1 + to:main::@10 +main::@10: scope:[main] from main::@2 + (word) main::u#12 ← phi( main::@2/(word) main::u#5 ) + (word) div16u::return#4 ← phi( main::@2/(word) div16u::return#2 ) + (word~) main::$0 ← (word) div16u::return#4 + (word) main::v#1 ← (word~) main::$0 + *((byte*) zp2#0) ← ++ *((byte*) zp2#0) + (bool~) main::$1 ← *((byte*) zp2#0) < (byte/word/signed word/dword/signed dword) $c8 + if((bool~) main::$1) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@10 + (word) main::v#3 ← phi( main::@10/(word) main::v#1 ) + (word) main::u#6 ← phi( main::@10/(word) main::u#12 ) + (word~) main::$2 ← ((word)) *((byte*) TIMEHI#0) + (word~) main::$3 ← (word~) main::$2 << (byte/signed byte/word/signed word/dword/signed dword) 8 + (word~) main::$4 ← ((word)) *((byte*) TIMELO#0) + (word~) main::$5 ← (word~) main::$3 + (word~) main::$4 + (byte*) myprintf::dst#0 ← (byte[$64]) strTemp#0 + (byte*) myprintf::str#1 ← (const string) main::str + (word) myprintf::w1#0 ← (word) main::u#6 + (word) myprintf::w2#0 ← (word) main::v#3 + (word) myprintf::w3#0 ← (word~) main::$5 + call myprintf + (byte) myprintf::return#2 ← (byte) myprintf::return#1 + to:main::@11 +main::@11: scope:[main] from main::@3 + (word) main::u#13 ← phi( main::@3/(word) main::u#6 ) + call Print + to:main::@12 +main::@12: scope:[main] from main::@11 + (word) main::u#7 ← phi( main::@11/(word) main::u#13 ) + (word) main::u#2 ← (word) main::u#7 - (word/signed word/dword/signed dword) $4d2 + *((byte*) zp1#0) ← ++ *((byte*) zp1#0) + (bool~) main::$8 ← *((byte*) zp1#0) < (byte/signed byte/word/signed word/dword/signed dword) $a + if((bool~) main::$8) goto main::@1 + to:main::@4 +main::@4: scope:[main] from main::@12 + (word) main::u#3 ← (word/signed word/dword/signed dword) $6e85 + *((byte*) zp1#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:main::@5 +main::@5: scope:[main] from main::@15 main::@4 + (word) main::u#15 ← phi( main::@15/(word) main::u#4 main::@4/(word) main::u#3 ) + *((byte*) TIMEHI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) TIMELO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) zp2#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:main::@6 +main::@6: scope:[main] from main::@13 main::@5 + (word) main::u#8 ← phi( main::@13/(word) main::u#14 main::@5/(word) main::u#15 ) + (word) div10::val#4 ← (word) main::u#8 + call div10 + (word) div10::return#2 ← (word) div10::return#1 + to:main::@13 +main::@13: scope:[main] from main::@6 + (word) main::u#14 ← phi( main::@6/(word) main::u#8 ) + (word) div10::return#4 ← phi( main::@6/(word) div10::return#2 ) + (word~) main::$9 ← (word) div10::return#4 + (word) main::v#2 ← (word~) main::$9 + *((byte*) zp2#0) ← ++ *((byte*) zp2#0) + (bool~) main::$10 ← *((byte*) zp2#0) < (byte/word/signed word/dword/signed dword) $c8 + if((bool~) main::$10) goto main::@6 + to:main::@7 +main::@7: scope:[main] from main::@13 + (word) main::v#4 ← phi( main::@13/(word) main::v#2 ) + (word) main::u#9 ← phi( main::@13/(word) main::u#14 ) + (word~) main::$11 ← ((word)) *((byte*) TIMEHI#0) + (word~) main::$12 ← (word~) main::$11 << (byte/signed byte/word/signed word/dword/signed dword) 8 + (word~) main::$13 ← ((word)) *((byte*) TIMELO#0) + (word~) main::$14 ← (word~) main::$12 + (word~) main::$13 + (byte*) myprintf::dst#1 ← (byte[$64]) strTemp#0 + (byte*) myprintf::str#2 ← (const string) main::str1 + (word) myprintf::w1#1 ← (word) main::u#9 + (word) myprintf::w2#1 ← (word) main::v#4 + (word) myprintf::w3#1 ← (word~) main::$14 + call myprintf + (byte) myprintf::return#3 ← (byte) myprintf::return#1 + to:main::@14 +main::@14: scope:[main] from main::@7 + (word) main::u#16 ← phi( main::@7/(word) main::u#9 ) + call Print + to:main::@15 +main::@15: scope:[main] from main::@14 + (word) main::u#10 ← phi( main::@14/(word) main::u#16 ) + (word) main::u#4 ← (word) main::u#10 - (word/signed word/dword/signed dword) $4d2 + *((byte*) zp1#0) ← ++ *((byte*) zp1#0) + (bool~) main::$17 ← *((byte*) zp1#0) < (byte/signed byte/word/signed word/dword/signed dword) $a + if((bool~) main::$17) goto main::@5 + to:main::@8 +main::@8: scope:[main] from main::@15 + (signed word) main::return#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:main::@return +main::@return: scope:[main] from main::@8 + (signed word) main::return#3 ← phi( main::@8/(signed word) main::return#0 ) + (signed word) main::return#1 ← (signed word) main::return#3 + return + to:@return +@14: scope:[] from @8 + call main + (signed word) main::return#2 ← (signed word) main::return#1 + to:@15 +@15: scope:[] from @14 + to:@end +@end: scope:[] from @15 + +SYMBOL TABLE SSA +(label) @14 +(label) @15 +(label) @8 +(label) @begin +(label) @end +(void()) Print() +(label) Print::@return +(byte*) TIMEHI +(byte*) TIMEHI#0 +(byte*) TIMELO +(byte*) TIMELO#0 +(byte*) VICBANK +(byte*) VICBANK#0 +(word()) append((byte*) append::dst , (word) append::value , (word) append::sub) +(bool~) append::$0 +(label) append::@1 +(label) append::@2 +(label) append::@3 +(label) append::@return +(byte*) append::dst +(byte*) append::dst#0 +(byte*) append::dst#1 +(byte*) append::dst#2 +(byte*) append::dst#3 +(byte*) append::dst#4 +(byte*) append::dst#5 +(byte*) append::dst#6 +(word) append::return +(word) append::return#0 +(word) append::return#1 +(word) append::return#10 +(word) append::return#2 +(word) append::return#3 +(word) append::return#4 +(word) append::return#5 +(word) append::return#6 +(word) append::return#7 +(word) append::return#8 +(word) append::return#9 +(word) append::sub +(word) append::sub#0 +(word) append::sub#1 +(word) append::sub#2 +(word) append::sub#3 +(word) append::sub#4 +(word) append::sub#5 +(word) append::sub#6 +(word) append::value +(word) append::value#0 +(word) append::value#1 +(word) append::value#2 +(word) append::value#3 +(word) append::value#4 +(word) append::value#5 +(word) append::value#6 +(word) append::value#7 +(word) append::value#8 +(word()) div10((word) div10::val) +(word~) div10::$0 +(word/signed dword/dword~) div10::$1 +(word~) div10::$2 +(word~) div10::$3 +(word~) div10::$4 +(word~) div10::$5 +(word~) div10::$6 +(label) div10::@return +(word) div10::return +(word) div10::return#0 +(word) div10::return#1 +(word) div10::return#2 +(word) div10::return#3 +(word) div10::return#4 +(word) div10::val +(word) div10::val#0 +(word) div10::val#1 +(word) div10::val#2 +(word) div10::val#3 +(word) div10::val#4 +(word) div10::val#5 +(word()) div16u((word) div16u::dividend , (word) div16u::divisor) +(word~) div16u::$0 +(label) div16u::@2 +(label) div16u::@return +(word) div16u::dividend +(word) div16u::dividend#0 +(word) div16u::dividend#1 +(word) div16u::divisor +(word) div16u::divisor#0 +(word) div16u::divisor#1 +(word) div16u::return +(word) div16u::return#0 +(word) div16u::return#1 +(word) div16u::return#2 +(word) div16u::return#3 +(word) div16u::return#4 +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) +(word~) divr16u::$0 +(byte~) divr16u::$1 +(word~) divr16u::$10 +(bool~) divr16u::$11 +(byte~) divr16u::$2 +(bool~) divr16u::$3 +(bool~) divr16u::$4 +(word/dword~) divr16u::$5 +(word~) divr16u::$6 +(word~) divr16u::$7 +(bool~) divr16u::$8 +(bool~) divr16u::$9 +(label) divr16u::@1 +(label) divr16u::@2 +(label) divr16u::@3 +(label) divr16u::@4 +(label) divr16u::@5 +(label) divr16u::@6 +(label) divr16u::@return +(word) divr16u::dividend +(word) divr16u::dividend#0 +(word) divr16u::dividend#1 +(word) divr16u::dividend#2 +(word) divr16u::dividend#3 +(word) divr16u::dividend#4 +(word) divr16u::dividend#5 +(word) divr16u::dividend#6 +(word) divr16u::dividend#7 +(word) divr16u::divisor +(word) divr16u::divisor#0 +(word) divr16u::divisor#1 +(word) divr16u::divisor#2 +(word) divr16u::divisor#3 +(word) divr16u::divisor#4 +(word) divr16u::divisor#5 +(word) divr16u::divisor#6 +(byte) divr16u::i +(byte) divr16u::i#0 +(byte) divr16u::i#1 +(byte) divr16u::i#2 +(byte) divr16u::i#3 +(byte) divr16u::i#4 +(byte) divr16u::i#5 +(byte) divr16u::i#6 +(word) divr16u::quotient +(word) divr16u::quotient#0 +(word) divr16u::quotient#1 +(word) divr16u::quotient#2 +(word) divr16u::quotient#3 +(word) divr16u::quotient#4 +(word) divr16u::quotient#5 +(word) divr16u::quotient#6 +(word) divr16u::quotient#7 +(word) divr16u::quotient#8 +(word) divr16u::rem +(word) divr16u::rem#0 +(word) divr16u::rem#1 +(word) divr16u::rem#2 +(word) divr16u::rem#3 +(word) divr16u::rem#4 +(word) divr16u::rem#5 +(word) divr16u::rem#6 +(word) divr16u::rem#7 +(word) divr16u::rem#8 +(word) divr16u::rem#9 +(word) divr16u::return +(word) divr16u::return#0 +(word) divr16u::return#1 +(word) divr16u::return#2 +(word) divr16u::return#3 +(word) divr16u::return#4 +(signed word()) main() +(word~) main::$0 +(bool~) main::$1 +(bool~) main::$10 +(word~) main::$11 +(word~) main::$12 +(word~) main::$13 +(word~) main::$14 +(bool~) main::$17 +(word~) main::$2 +(word~) main::$3 +(word~) main::$4 +(word~) main::$5 +(bool~) main::$8 +(word~) main::$9 +(label) main::@1 +(label) main::@10 +(label) main::@11 +(label) main::@12 +(label) main::@13 +(label) main::@14 +(label) main::@15 +(label) main::@2 +(label) main::@3 +(label) main::@4 +(label) main::@5 +(label) main::@6 +(label) main::@7 +(label) main::@8 +(label) main::@return +(signed word) main::return +(signed word) main::return#0 +(signed word) main::return#1 +(signed word) main::return#2 +(signed word) main::return#3 +(const string) main::str = (string) "200 DIV16U: %5d,%4d IN %04d FRAMESm@" +(const string) main::str1 = (string) "200 DIV10 : %5d,%4d IN %04d FRAMESm@" +(word) main::u +(word) main::u#0 +(word) main::u#1 +(word) main::u#10 +(word) main::u#11 +(word) main::u#12 +(word) main::u#13 +(word) main::u#14 +(word) main::u#15 +(word) main::u#16 +(word) main::u#2 +(word) main::u#3 +(word) main::u#4 +(word) main::u#5 +(word) main::u#6 +(word) main::u#7 +(word) main::u#8 +(word) main::u#9 +(word) main::v +(word) main::v#0 +(word) main::v#1 +(word) main::v#2 +(word) main::v#3 +(word) main::v#4 +(byte()) myprintf((byte*) myprintf::dst , (byte*) myprintf::str , (word) myprintf::w1 , (word) myprintf::w2 , (word) myprintf::w3) +(bool~) myprintf::$0 +(bool~) myprintf::$1 +(bool~) myprintf::$10 +(bool~) myprintf::$11 +(bool~) myprintf::$12 +(bool~) myprintf::$13 +(bool~) myprintf::$14 +(bool~) myprintf::$15 +(bool~) myprintf::$16 +(word~) myprintf::$17 +(byte/word~) myprintf::$18 +(bool~) myprintf::$19 +(bool~) myprintf::$2 +(byte/signed byte/word/signed word/dword/signed dword~) myprintf::$20 +(byte~) myprintf::$21 +(byte~) myprintf::$22 +(byte~) myprintf::$23 +(byte/word~) myprintf::$24 +(bool~) myprintf::$25 +(byte/signed byte/word/signed word/dword/signed dword~) myprintf::$26 +(byte~) myprintf::$27 +(byte~) myprintf::$28 +(byte~) myprintf::$29 +(bool~) myprintf::$3 +(bool~) myprintf::$31 +(bool~) myprintf::$32 +(bool~) myprintf::$33 +(bool~) myprintf::$34 +(bool~) myprintf::$35 +(bool~) myprintf::$36 +(byte~) myprintf::$37 +(byte~) myprintf::$38 +(byte~) myprintf::$39 +(bool~) myprintf::$4 +(bool~) myprintf::$40 +(bool~) myprintf::$41 +(bool~) myprintf::$42 +(bool~) myprintf::$43 +(bool~) myprintf::$44 +(bool~) myprintf::$45 +(bool~) myprintf::$46 +(byte~) myprintf::$47 +(bool~) myprintf::$48 +(bool~) myprintf::$49 +(bool~) myprintf::$5 +(bool~) myprintf::$50 +(bool~) myprintf::$51 +(bool~) myprintf::$52 +(bool~) myprintf::$53 +(bool~) myprintf::$54 +(bool~) myprintf::$55 +(bool~) myprintf::$56 +(bool~) myprintf::$6 +(bool~) myprintf::$7 +(byte~) myprintf::$8 +(bool~) myprintf::$9 +(label) myprintf::@1 +(label) myprintf::@10 +(label) myprintf::@11 +(label) myprintf::@12 +(label) myprintf::@13 +(label) myprintf::@14 +(label) myprintf::@19 +(label) myprintf::@2 +(label) myprintf::@20 +(label) myprintf::@21 +(label) myprintf::@26 +(label) myprintf::@27 +(label) myprintf::@28 +(label) myprintf::@29 +(label) myprintf::@3 +(label) myprintf::@30 +(label) myprintf::@34 +(label) myprintf::@35 +(label) myprintf::@37 +(label) myprintf::@38 +(label) myprintf::@4 +(label) myprintf::@40 +(label) myprintf::@41 +(label) myprintf::@43 +(label) myprintf::@45 +(label) myprintf::@46 +(label) myprintf::@47 +(label) myprintf::@5 +(label) myprintf::@52 +(label) myprintf::@53 +(label) myprintf::@54 +(label) myprintf::@55 +(label) myprintf::@57 +(label) myprintf::@6 +(label) myprintf::@60 +(label) myprintf::@61 +(label) myprintf::@62 +(label) myprintf::@64 +(label) myprintf::@65 +(label) myprintf::@66 +(label) myprintf::@68 +(label) myprintf::@69 +(label) myprintf::@7 +(label) myprintf::@71 +(label) myprintf::@8 +(label) myprintf::@9 +(label) myprintf::@return +(byte) myprintf::b +(byte) myprintf::b#0 +(byte) myprintf::b#1 +(byte) myprintf::b#10 +(byte) myprintf::b#11 +(byte) myprintf::b#12 +(byte) myprintf::b#13 +(byte) myprintf::b#14 +(byte) myprintf::b#15 +(byte) myprintf::b#16 +(byte) myprintf::b#17 +(byte) myprintf::b#18 +(byte) myprintf::b#19 +(byte) myprintf::b#2 +(byte) myprintf::b#20 +(byte) myprintf::b#21 +(byte) myprintf::b#22 +(byte) myprintf::b#23 +(byte) myprintf::b#24 +(byte) myprintf::b#25 +(byte) myprintf::b#26 +(byte) myprintf::b#27 +(byte) myprintf::b#28 +(byte) myprintf::b#29 +(byte) myprintf::b#3 +(byte) myprintf::b#30 +(byte) myprintf::b#31 +(byte) myprintf::b#32 +(byte) myprintf::b#33 +(byte) myprintf::b#34 +(byte) myprintf::b#4 +(byte) myprintf::b#5 +(byte) myprintf::b#6 +(byte) myprintf::b#7 +(byte) myprintf::b#8 +(byte) myprintf::b#9 +(byte) myprintf::bArg +(byte) myprintf::bArg#0 +(byte) myprintf::bArg#1 +(byte) myprintf::bArg#10 +(byte) myprintf::bArg#11 +(byte) myprintf::bArg#12 +(byte) myprintf::bArg#13 +(byte) myprintf::bArg#14 +(byte) myprintf::bArg#15 +(byte) myprintf::bArg#16 +(byte) myprintf::bArg#17 +(byte) myprintf::bArg#18 +(byte) myprintf::bArg#19 +(byte) myprintf::bArg#2 +(byte) myprintf::bArg#20 +(byte) myprintf::bArg#21 +(byte) myprintf::bArg#22 +(byte) myprintf::bArg#23 +(byte) myprintf::bArg#24 +(byte) myprintf::bArg#25 +(byte) myprintf::bArg#26 +(byte) myprintf::bArg#27 +(byte) myprintf::bArg#28 +(byte) myprintf::bArg#29 +(byte) myprintf::bArg#3 +(byte) myprintf::bArg#30 +(byte) myprintf::bArg#31 +(byte) myprintf::bArg#32 +(byte) myprintf::bArg#33 +(byte) myprintf::bArg#34 +(byte) myprintf::bArg#35 +(byte) myprintf::bArg#36 +(byte) myprintf::bArg#37 +(byte) myprintf::bArg#38 +(byte) myprintf::bArg#39 +(byte) myprintf::bArg#4 +(byte) myprintf::bArg#40 +(byte) myprintf::bArg#41 +(byte) myprintf::bArg#42 +(byte) myprintf::bArg#43 +(byte) myprintf::bArg#44 +(byte) myprintf::bArg#45 +(byte) myprintf::bArg#46 +(byte) myprintf::bArg#5 +(byte) myprintf::bArg#6 +(byte) myprintf::bArg#7 +(byte) myprintf::bArg#8 +(byte) myprintf::bArg#9 +(byte) myprintf::bDigits +(byte) myprintf::bDigits#0 +(byte) myprintf::bDigits#1 +(byte) myprintf::bDigits#10 +(byte) myprintf::bDigits#11 +(byte) myprintf::bDigits#12 +(byte) myprintf::bDigits#13 +(byte) myprintf::bDigits#14 +(byte) myprintf::bDigits#15 +(byte) myprintf::bDigits#16 +(byte) myprintf::bDigits#17 +(byte) myprintf::bDigits#18 +(byte) myprintf::bDigits#19 +(byte) myprintf::bDigits#2 +(byte) myprintf::bDigits#20 +(byte) myprintf::bDigits#21 +(byte) myprintf::bDigits#22 +(byte) myprintf::bDigits#23 +(byte) myprintf::bDigits#24 +(byte) myprintf::bDigits#25 +(byte) myprintf::bDigits#26 +(byte) myprintf::bDigits#27 +(byte) myprintf::bDigits#28 +(byte) myprintf::bDigits#29 +(byte) myprintf::bDigits#3 +(byte) myprintf::bDigits#30 +(byte) myprintf::bDigits#31 +(byte) myprintf::bDigits#32 +(byte) myprintf::bDigits#33 +(byte) myprintf::bDigits#34 +(byte) myprintf::bDigits#35 +(byte) myprintf::bDigits#36 +(byte) myprintf::bDigits#37 +(byte) myprintf::bDigits#38 +(byte) myprintf::bDigits#39 +(byte) myprintf::bDigits#4 +(byte) myprintf::bDigits#40 +(byte) myprintf::bDigits#41 +(byte) myprintf::bDigits#42 +(byte) myprintf::bDigits#43 +(byte) myprintf::bDigits#44 +(byte) myprintf::bDigits#45 +(byte) myprintf::bDigits#46 +(byte) myprintf::bDigits#47 +(byte) myprintf::bDigits#5 +(byte) myprintf::bDigits#6 +(byte) myprintf::bDigits#7 +(byte) myprintf::bDigits#8 +(byte) myprintf::bDigits#9 +(byte) myprintf::bFormat +(byte) myprintf::bFormat#0 +(byte) myprintf::bFormat#1 +(byte) myprintf::bFormat#10 +(byte) myprintf::bFormat#11 +(byte) myprintf::bFormat#12 +(byte) myprintf::bFormat#13 +(byte) myprintf::bFormat#14 +(byte) myprintf::bFormat#15 +(byte) myprintf::bFormat#16 +(byte) myprintf::bFormat#17 +(byte) myprintf::bFormat#18 +(byte) myprintf::bFormat#19 +(byte) myprintf::bFormat#2 +(byte) myprintf::bFormat#3 +(byte) myprintf::bFormat#4 +(byte) myprintf::bFormat#5 +(byte) myprintf::bFormat#6 +(byte) myprintf::bFormat#7 +(byte) myprintf::bFormat#8 +(byte) myprintf::bFormat#9 +(byte) myprintf::bLeadZero +(byte) myprintf::bLeadZero#0 +(byte) myprintf::bLeadZero#1 +(byte) myprintf::bLeadZero#10 +(byte) myprintf::bLeadZero#11 +(byte) myprintf::bLeadZero#12 +(byte) myprintf::bLeadZero#13 +(byte) myprintf::bLeadZero#14 +(byte) myprintf::bLeadZero#15 +(byte) myprintf::bLeadZero#16 +(byte) myprintf::bLeadZero#17 +(byte) myprintf::bLeadZero#18 +(byte) myprintf::bLeadZero#19 +(byte) myprintf::bLeadZero#2 +(byte) myprintf::bLeadZero#20 +(byte) myprintf::bLeadZero#21 +(byte) myprintf::bLeadZero#22 +(byte) myprintf::bLeadZero#23 +(byte) myprintf::bLeadZero#24 +(byte) myprintf::bLeadZero#25 +(byte) myprintf::bLeadZero#26 +(byte) myprintf::bLeadZero#27 +(byte) myprintf::bLeadZero#28 +(byte) myprintf::bLeadZero#29 +(byte) myprintf::bLeadZero#3 +(byte) myprintf::bLeadZero#30 +(byte) myprintf::bLeadZero#31 +(byte) myprintf::bLeadZero#32 +(byte) myprintf::bLeadZero#33 +(byte) myprintf::bLeadZero#34 +(byte) myprintf::bLeadZero#35 +(byte) myprintf::bLeadZero#36 +(byte) myprintf::bLeadZero#37 +(byte) myprintf::bLeadZero#38 +(byte) myprintf::bLeadZero#39 +(byte) myprintf::bLeadZero#4 +(byte) myprintf::bLeadZero#40 +(byte) myprintf::bLeadZero#41 +(byte) myprintf::bLeadZero#42 +(byte) myprintf::bLeadZero#43 +(byte) myprintf::bLeadZero#44 +(byte) myprintf::bLeadZero#45 +(byte) myprintf::bLeadZero#5 +(byte) myprintf::bLeadZero#6 +(byte) myprintf::bLeadZero#7 +(byte) myprintf::bLeadZero#8 +(byte) myprintf::bLeadZero#9 +(byte) myprintf::bLen +(byte) myprintf::bLen#0 +(byte) myprintf::bLen#1 +(byte) myprintf::bLen#10 +(byte) myprintf::bLen#11 +(byte) myprintf::bLen#12 +(byte) myprintf::bLen#13 +(byte) myprintf::bLen#14 +(byte) myprintf::bLen#15 +(byte) myprintf::bLen#16 +(byte) myprintf::bLen#17 +(byte) myprintf::bLen#18 +(byte) myprintf::bLen#19 +(byte) myprintf::bLen#2 +(byte) myprintf::bLen#20 +(byte) myprintf::bLen#21 +(byte) myprintf::bLen#22 +(byte) myprintf::bLen#23 +(byte) myprintf::bLen#24 +(byte) myprintf::bLen#25 +(byte) myprintf::bLen#26 +(byte) myprintf::bLen#27 +(byte) myprintf::bLen#28 +(byte) myprintf::bLen#29 +(byte) myprintf::bLen#3 +(byte) myprintf::bLen#30 +(byte) myprintf::bLen#31 +(byte) myprintf::bLen#32 +(byte) myprintf::bLen#33 +(byte) myprintf::bLen#34 +(byte) myprintf::bLen#35 +(byte) myprintf::bLen#36 +(byte) myprintf::bLen#37 +(byte) myprintf::bLen#38 +(byte) myprintf::bLen#39 +(byte) myprintf::bLen#4 +(byte) myprintf::bLen#40 +(byte) myprintf::bLen#41 +(byte) myprintf::bLen#42 +(byte) myprintf::bLen#43 +(byte) myprintf::bLen#44 +(byte) myprintf::bLen#45 +(byte) myprintf::bLen#46 +(byte) myprintf::bLen#47 +(byte) myprintf::bLen#48 +(byte) myprintf::bLen#49 +(byte) myprintf::bLen#5 +(byte) myprintf::bLen#50 +(byte) myprintf::bLen#51 +(byte) myprintf::bLen#52 +(byte) myprintf::bLen#53 +(byte) myprintf::bLen#6 +(byte) myprintf::bLen#7 +(byte) myprintf::bLen#8 +(byte) myprintf::bLen#9 +(byte) myprintf::bTrailing +(byte) myprintf::bTrailing#0 +(byte) myprintf::bTrailing#1 +(byte) myprintf::bTrailing#10 +(byte) myprintf::bTrailing#11 +(byte) myprintf::bTrailing#12 +(byte) myprintf::bTrailing#13 +(byte) myprintf::bTrailing#14 +(byte) myprintf::bTrailing#15 +(byte) myprintf::bTrailing#16 +(byte) myprintf::bTrailing#17 +(byte) myprintf::bTrailing#18 +(byte) myprintf::bTrailing#19 +(byte) myprintf::bTrailing#2 +(byte) myprintf::bTrailing#20 +(byte) myprintf::bTrailing#21 +(byte) myprintf::bTrailing#22 +(byte) myprintf::bTrailing#23 +(byte) myprintf::bTrailing#24 +(byte) myprintf::bTrailing#25 +(byte) myprintf::bTrailing#26 +(byte) myprintf::bTrailing#27 +(byte) myprintf::bTrailing#28 +(byte) myprintf::bTrailing#29 +(byte) myprintf::bTrailing#3 +(byte) myprintf::bTrailing#30 +(byte) myprintf::bTrailing#31 +(byte) myprintf::bTrailing#32 +(byte) myprintf::bTrailing#33 +(byte) myprintf::bTrailing#34 +(byte) myprintf::bTrailing#35 +(byte) myprintf::bTrailing#36 +(byte) myprintf::bTrailing#37 +(byte) myprintf::bTrailing#38 +(byte) myprintf::bTrailing#39 +(byte) myprintf::bTrailing#4 +(byte) myprintf::bTrailing#40 +(byte) myprintf::bTrailing#41 +(byte) myprintf::bTrailing#42 +(byte) myprintf::bTrailing#43 +(byte) myprintf::bTrailing#44 +(byte) myprintf::bTrailing#45 +(byte) myprintf::bTrailing#5 +(byte) myprintf::bTrailing#6 +(byte) myprintf::bTrailing#7 +(byte) myprintf::bTrailing#8 +(byte) myprintf::bTrailing#9 +(byte[6]) myprintf::buf6 +(byte[6]) myprintf::buf6#0 +(byte) myprintf::digit +(byte) myprintf::digit#0 +(byte) myprintf::digit#1 +(byte) myprintf::digit#2 +(byte) myprintf::digit#3 +(byte*) myprintf::dst +(byte*) myprintf::dst#0 +(byte*) myprintf::dst#1 +(byte*) myprintf::dst#10 +(byte*) myprintf::dst#11 +(byte*) myprintf::dst#12 +(byte*) myprintf::dst#13 +(byte*) myprintf::dst#14 +(byte*) myprintf::dst#15 +(byte*) myprintf::dst#16 +(byte*) myprintf::dst#17 +(byte*) myprintf::dst#18 +(byte*) myprintf::dst#19 +(byte*) myprintf::dst#2 +(byte*) myprintf::dst#20 +(byte*) myprintf::dst#21 +(byte*) myprintf::dst#22 +(byte*) myprintf::dst#23 +(byte*) myprintf::dst#24 +(byte*) myprintf::dst#25 +(byte*) myprintf::dst#26 +(byte*) myprintf::dst#27 +(byte*) myprintf::dst#28 +(byte*) myprintf::dst#29 +(byte*) myprintf::dst#3 +(byte*) myprintf::dst#30 +(byte*) myprintf::dst#31 +(byte*) myprintf::dst#32 +(byte*) myprintf::dst#33 +(byte*) myprintf::dst#34 +(byte*) myprintf::dst#35 +(byte*) myprintf::dst#36 +(byte*) myprintf::dst#37 +(byte*) myprintf::dst#38 +(byte*) myprintf::dst#39 +(byte*) myprintf::dst#4 +(byte*) myprintf::dst#40 +(byte*) myprintf::dst#41 +(byte*) myprintf::dst#42 +(byte*) myprintf::dst#43 +(byte*) myprintf::dst#44 +(byte*) myprintf::dst#45 +(byte*) myprintf::dst#46 +(byte*) myprintf::dst#47 +(byte*) myprintf::dst#48 +(byte*) myprintf::dst#5 +(byte*) myprintf::dst#6 +(byte*) myprintf::dst#7 +(byte*) myprintf::dst#8 +(byte*) myprintf::dst#9 +(byte) myprintf::return +(byte) myprintf::return#0 +(byte) myprintf::return#1 +(byte) myprintf::return#2 +(byte) myprintf::return#3 +(byte) myprintf::return#4 +(byte*) myprintf::str +(byte*) myprintf::str#0 +(byte*) myprintf::str#1 +(byte*) myprintf::str#10 +(byte*) myprintf::str#11 +(byte*) myprintf::str#12 +(byte*) myprintf::str#13 +(byte*) myprintf::str#14 +(byte*) myprintf::str#15 +(byte*) myprintf::str#16 +(byte*) myprintf::str#17 +(byte*) myprintf::str#18 +(byte*) myprintf::str#19 +(byte*) myprintf::str#2 +(byte*) myprintf::str#20 +(byte*) myprintf::str#21 +(byte*) myprintf::str#22 +(byte*) myprintf::str#23 +(byte*) myprintf::str#24 +(byte*) myprintf::str#25 +(byte*) myprintf::str#26 +(byte*) myprintf::str#27 +(byte*) myprintf::str#28 +(byte*) myprintf::str#29 +(byte*) myprintf::str#3 +(byte*) myprintf::str#30 +(byte*) myprintf::str#31 +(byte*) myprintf::str#32 +(byte*) myprintf::str#33 +(byte*) myprintf::str#34 +(byte*) myprintf::str#35 +(byte*) myprintf::str#36 +(byte*) myprintf::str#37 +(byte*) myprintf::str#38 +(byte*) myprintf::str#39 +(byte*) myprintf::str#4 +(byte*) myprintf::str#40 +(byte*) myprintf::str#41 +(byte*) myprintf::str#42 +(byte*) myprintf::str#43 +(byte*) myprintf::str#44 +(byte*) myprintf::str#45 +(byte*) myprintf::str#46 +(byte*) myprintf::str#47 +(byte*) myprintf::str#48 +(byte*) myprintf::str#5 +(byte*) myprintf::str#6 +(byte*) myprintf::str#7 +(byte*) myprintf::str#8 +(byte*) myprintf::str#9 +(word) myprintf::w +(word) myprintf::w#0 +(word) myprintf::w#1 +(word) myprintf::w#10 +(word) myprintf::w#11 +(word) myprintf::w#12 +(word) myprintf::w#13 +(word) myprintf::w#14 +(word) myprintf::w#15 +(word) myprintf::w#16 +(word) myprintf::w#17 +(word) myprintf::w#18 +(word) myprintf::w#19 +(word) myprintf::w#2 +(word) myprintf::w#20 +(word) myprintf::w#21 +(word) myprintf::w#22 +(word) myprintf::w#23 +(word) myprintf::w#24 +(word) myprintf::w#25 +(word) myprintf::w#26 +(word) myprintf::w#27 +(word) myprintf::w#28 +(word) myprintf::w#29 +(word) myprintf::w#3 +(word) myprintf::w#30 +(word) myprintf::w#31 +(word) myprintf::w#32 +(word) myprintf::w#33 +(word) myprintf::w#34 +(word) myprintf::w#35 +(word) myprintf::w#36 +(word) myprintf::w#37 +(word) myprintf::w#38 +(word) myprintf::w#39 +(word) myprintf::w#4 +(word) myprintf::w#40 +(word) myprintf::w#41 +(word) myprintf::w#42 +(word) myprintf::w#43 +(word) myprintf::w#5 +(word) myprintf::w#6 +(word) myprintf::w#7 +(word) myprintf::w#8 +(word) myprintf::w#9 +(word) myprintf::w1 +(word) myprintf::w1#0 +(word) myprintf::w1#1 +(word) myprintf::w1#10 +(word) myprintf::w1#11 +(word) myprintf::w1#12 +(word) myprintf::w1#13 +(word) myprintf::w1#14 +(word) myprintf::w1#15 +(word) myprintf::w1#16 +(word) myprintf::w1#17 +(word) myprintf::w1#18 +(word) myprintf::w1#19 +(word) myprintf::w1#2 +(word) myprintf::w1#20 +(word) myprintf::w1#21 +(word) myprintf::w1#22 +(word) myprintf::w1#23 +(word) myprintf::w1#24 +(word) myprintf::w1#25 +(word) myprintf::w1#26 +(word) myprintf::w1#27 +(word) myprintf::w1#28 +(word) myprintf::w1#29 +(word) myprintf::w1#3 +(word) myprintf::w1#30 +(word) myprintf::w1#31 +(word) myprintf::w1#32 +(word) myprintf::w1#33 +(word) myprintf::w1#34 +(word) myprintf::w1#35 +(word) myprintf::w1#36 +(word) myprintf::w1#37 +(word) myprintf::w1#38 +(word) myprintf::w1#39 +(word) myprintf::w1#4 +(word) myprintf::w1#40 +(word) myprintf::w1#41 +(word) myprintf::w1#42 +(word) myprintf::w1#43 +(word) myprintf::w1#44 +(word) myprintf::w1#45 +(word) myprintf::w1#46 +(word) myprintf::w1#47 +(word) myprintf::w1#5 +(word) myprintf::w1#6 +(word) myprintf::w1#7 +(word) myprintf::w1#8 +(word) myprintf::w1#9 +(word) myprintf::w2 +(word) myprintf::w2#0 +(word) myprintf::w2#1 +(word) myprintf::w2#10 +(word) myprintf::w2#11 +(word) myprintf::w2#12 +(word) myprintf::w2#13 +(word) myprintf::w2#14 +(word) myprintf::w2#15 +(word) myprintf::w2#16 +(word) myprintf::w2#17 +(word) myprintf::w2#18 +(word) myprintf::w2#19 +(word) myprintf::w2#2 +(word) myprintf::w2#20 +(word) myprintf::w2#21 +(word) myprintf::w2#22 +(word) myprintf::w2#23 +(word) myprintf::w2#24 +(word) myprintf::w2#25 +(word) myprintf::w2#26 +(word) myprintf::w2#27 +(word) myprintf::w2#28 +(word) myprintf::w2#29 +(word) myprintf::w2#3 +(word) myprintf::w2#30 +(word) myprintf::w2#31 +(word) myprintf::w2#32 +(word) myprintf::w2#33 +(word) myprintf::w2#34 +(word) myprintf::w2#35 +(word) myprintf::w2#36 +(word) myprintf::w2#37 +(word) myprintf::w2#38 +(word) myprintf::w2#39 +(word) myprintf::w2#4 +(word) myprintf::w2#40 +(word) myprintf::w2#41 +(word) myprintf::w2#42 +(word) myprintf::w2#43 +(word) myprintf::w2#44 +(word) myprintf::w2#45 +(word) myprintf::w2#46 +(word) myprintf::w2#47 +(word) myprintf::w2#5 +(word) myprintf::w2#6 +(word) myprintf::w2#7 +(word) myprintf::w2#8 +(word) myprintf::w2#9 +(word) myprintf::w3 +(word) myprintf::w3#0 +(word) myprintf::w3#1 +(word) myprintf::w3#10 +(word) myprintf::w3#11 +(word) myprintf::w3#12 +(word) myprintf::w3#13 +(word) myprintf::w3#14 +(word) myprintf::w3#15 +(word) myprintf::w3#16 +(word) myprintf::w3#17 +(word) myprintf::w3#18 +(word) myprintf::w3#19 +(word) myprintf::w3#2 +(word) myprintf::w3#20 +(word) myprintf::w3#21 +(word) myprintf::w3#22 +(word) myprintf::w3#23 +(word) myprintf::w3#24 +(word) myprintf::w3#25 +(word) myprintf::w3#26 +(word) myprintf::w3#27 +(word) myprintf::w3#28 +(word) myprintf::w3#29 +(word) myprintf::w3#3 +(word) myprintf::w3#30 +(word) myprintf::w3#31 +(word) myprintf::w3#32 +(word) myprintf::w3#33 +(word) myprintf::w3#34 +(word) myprintf::w3#35 +(word) myprintf::w3#36 +(word) myprintf::w3#37 +(word) myprintf::w3#38 +(word) myprintf::w3#39 +(word) myprintf::w3#4 +(word) myprintf::w3#40 +(word) myprintf::w3#41 +(word) myprintf::w3#42 +(word) myprintf::w3#43 +(word) myprintf::w3#44 +(word) myprintf::w3#45 +(word) myprintf::w3#46 +(word) myprintf::w3#47 +(word) myprintf::w3#5 +(word) myprintf::w3#6 +(word) myprintf::w3#7 +(word) myprintf::w3#8 +(word) myprintf::w3#9 +(byte[$64]) strTemp +(byte[$64]) strTemp#0 +(void()) utoa((word) utoa::value , (byte*) utoa::dst) +(bool~) utoa::$0 +(bool~) utoa::$1 +(bool~) utoa::$10 +(bool~) utoa::$11 +(bool~) utoa::$12 +(bool~) utoa::$13 +(bool~) utoa::$14 +(bool~) utoa::$15 +(byte~) utoa::$16 +(byte~) utoa::$17 +(word~) utoa::$18 +(word~) utoa::$19 +(bool~) utoa::$2 +(word~) utoa::$20 +(word~) utoa::$21 +(bool~) utoa::$3 +(bool~) utoa::$4 +(bool~) utoa::$5 +(bool~) utoa::$6 +(bool~) utoa::$7 +(bool~) utoa::$8 +(bool~) utoa::$9 +(label) utoa::@1 +(label) utoa::@10 +(label) utoa::@11 +(label) utoa::@12 +(label) utoa::@2 +(label) utoa::@3 +(label) utoa::@4 +(label) utoa::@5 +(label) utoa::@6 +(label) utoa::@7 +(label) utoa::@8 +(label) utoa::@9 +(label) utoa::@return +(byte) utoa::bStarted +(byte) utoa::bStarted#0 +(byte) utoa::bStarted#1 +(byte) utoa::bStarted#2 +(byte) utoa::bStarted#3 +(byte) utoa::bStarted#4 +(byte) utoa::bStarted#5 +(byte) utoa::bStarted#6 +(byte) utoa::bStarted#7 +(byte*) utoa::dst +(byte*) utoa::dst#0 +(byte*) utoa::dst#1 +(byte*) utoa::dst#10 +(byte*) utoa::dst#11 +(byte*) utoa::dst#12 +(byte*) utoa::dst#13 +(byte*) utoa::dst#14 +(byte*) utoa::dst#15 +(byte*) utoa::dst#16 +(byte*) utoa::dst#17 +(byte*) utoa::dst#18 +(byte*) utoa::dst#2 +(byte*) utoa::dst#3 +(byte*) utoa::dst#4 +(byte*) utoa::dst#5 +(byte*) utoa::dst#6 +(byte*) utoa::dst#7 +(byte*) utoa::dst#8 +(byte*) utoa::dst#9 +(word) utoa::value +(word) utoa::value#0 +(word) utoa::value#1 +(word) utoa::value#10 +(word) utoa::value#11 +(word) utoa::value#12 +(word) utoa::value#13 +(word) utoa::value#2 +(word) utoa::value#3 +(word) utoa::value#4 +(word) utoa::value#5 +(word) utoa::value#6 +(word) utoa::value#7 +(word) utoa::value#8 +(word) utoa::value#9 +(byte*) zp1 +(byte*) zp1#0 +(byte*) zp2 +(byte*) zp2#0 + +Culled Empty Block (label) @15 +Successful SSA optimization Pass2CullEmptyBlocks +Inversing boolean not [9] (bool~) divr16u::$4 ← (byte~) divr16u::$2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [8] (bool~) divr16u::$3 ← (byte~) divr16u::$2 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [17] (bool~) divr16u::$9 ← (word) divr16u::rem#5 < (word) divr16u::divisor#1 from [16] (bool~) divr16u::$8 ← (word) divr16u::rem#5 >= (word) divr16u::divisor#1 +Inversing boolean not [156] (bool~) myprintf::$1 ← (byte) myprintf::bFormat#3 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [155] (bool~) myprintf::$0 ← (byte) myprintf::bFormat#3 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [160] (bool~) myprintf::$49 ← (byte) myprintf::b#7 != (byte) '%' from [159] (bool~) myprintf::$48 ← (byte) myprintf::b#7 == (byte) '%' +Inversing boolean not [164] (bool~) myprintf::$3 ← (byte) myprintf::b#8 != (byte) '0' from [163] (bool~) myprintf::$2 ← (byte) myprintf::b#8 == (byte) '0' +Inversing boolean not [180] (bool~) myprintf::$10 ← (byte) myprintf::b#10 != (byte) '-' from [179] (bool~) myprintf::$9 ← (byte) myprintf::b#10 == (byte) '-' +Successful SSA optimization Pass2UnaryNotSimplification +Alias (word) divr16u::rem#0 = (word~) divr16u::$0 (word) divr16u::rem#6 +Alias (word) divr16u::dividend#0 = (word~) divr16u::$6 (word) divr16u::dividend#7 +Alias (word) divr16u::quotient#1 = (word~) divr16u::$7 (word) divr16u::quotient#4 +Alias (word) divr16u::dividend#2 = (word) divr16u::dividend#6 +Alias (word) divr16u::quotient#6 = (word) divr16u::quotient#7 +Alias (word) divr16u::divisor#3 = (word) divr16u::divisor#4 +Alias (byte) divr16u::i#5 = (byte) divr16u::i#6 +Alias (word) divr16u::rem#1 = (word/dword~) divr16u::$5 +Alias (word) divr16u::rem#5 = (word) divr16u::rem#7 +Alias (word) divr16u::divisor#1 = (word) divr16u::divisor#2 +Alias (byte) divr16u::i#3 = (byte) divr16u::i#4 +Alias (word) divr16u::rem#2 = (word~) divr16u::$10 +Alias (word) divr16u::return#0 = (word) divr16u::quotient#5 (word) divr16u::quotient#8 (word) divr16u::return#3 (word) divr16u::return#1 +Alias (word) divr16u::return#2 = (word) divr16u::return#4 +Alias (word) div16u::return#0 = (word~) div16u::$0 (word) div16u::return#3 (word) div16u::return#1 +Alias (byte*) append::dst#5 = (byte*) append::dst#6 +Alias (word) append::value#5 = (word) append::value#6 (word) append::value#7 (word) append::return#0 (word) append::return#6 (word) append::return#1 +Alias (word) append::sub#4 = (word) append::sub#5 +Alias (byte*) utoa::dst#15 = (byte*) utoa::dst#6 (byte*) utoa::dst#7 +Alias (word) utoa::value#5 = (word) utoa::value#7 +Alias (word) append::return#2 = (word) append::return#7 +Alias (word) utoa::value#0 = (word~) utoa::$18 +Alias (byte*) utoa::dst#16 = (byte*) utoa::dst#8 (byte*) utoa::dst#9 +Alias (word) utoa::value#6 = (word) utoa::value#9 +Alias (word) append::return#3 = (word) append::return#8 +Alias (word) utoa::value#1 = (word~) utoa::$19 +Alias (byte*) utoa::dst#10 = (byte*) utoa::dst#17 (byte*) utoa::dst#11 +Alias (word) utoa::value#11 = (word) utoa::value#8 +Alias (word) append::return#4 = (word) append::return#9 +Alias (word) utoa::value#2 = (word~) utoa::$20 +Alias (byte*) utoa::dst#13 = (byte*) utoa::dst#18 (byte*) utoa::dst#14 +Alias (word) utoa::value#10 = (word) utoa::value#13 +Alias (word) append::return#10 = (word) append::return#5 +Alias (word) utoa::value#3 = (word~) utoa::$21 +Alias (byte) myprintf::b#1 = (byte) myprintf::b#7 (byte) myprintf::b#8 (byte) myprintf::b#9 (byte) myprintf::b#10 (byte) myprintf::b#11 (byte) myprintf::b#12 (byte) myprintf::b#13 (byte) myprintf::b#14 (byte) myprintf::b#24 (byte) myprintf::b#26 +Alias (byte) myprintf::bArg#12 = (byte) myprintf::bArg#5 (byte) myprintf::bArg#9 (byte) myprintf::bArg#16 (byte) myprintf::bArg#17 (byte) myprintf::bArg#15 (byte) myprintf::bArg#18 (byte) myprintf::bArg#26 (byte) myprintf::bArg#13 (byte) myprintf::bArg#22 (byte) myprintf::bArg#31 (byte) myprintf::bArg#46 (byte) myprintf::bArg#44 (byte) myprintf::bArg#27 (byte) myprintf::bArg#23 (byte) myprintf::bArg#37 (byte) myprintf::bArg#35 (byte) myprintf::bArg#34 (byte) myprintf::bArg#24 (byte) myprintf::bArg#2 (byte) myprintf::bArg#6 (byte) myprintf::bArg#3 (byte) myprintf::bArg#7 (byte) myprintf::bArg#8 (byte) myprintf::bArg#25 +Alias (byte*) myprintf::dst#10 = (byte*) myprintf::dst#31 (byte*) myprintf::dst#32 (byte*) myprintf::dst#33 (byte*) myprintf::dst#34 (byte*) myprintf::dst#26 (byte*) myprintf::dst#27 (byte*) myprintf::dst#23 (byte*) myprintf::dst#24 (byte*) myprintf::dst#2 (byte*) myprintf::dst#43 (byte*) myprintf::dst#48 (byte*) myprintf::dst#45 (byte*) myprintf::dst#35 (byte*) myprintf::dst#38 (byte*) myprintf::dst#28 (byte*) myprintf::dst#12 (byte*) myprintf::dst#11 (byte*) myprintf::dst#19 (byte*) myprintf::dst#46 (byte*) myprintf::dst#39 (byte*) myprintf::dst#47 (byte*) myprintf::dst#40 (byte*) myprintf::dst#41 (byte*) myprintf::dst#20 +Alias (byte) myprintf::bLen#16 = (byte) myprintf::bLen#37 (byte) myprintf::bLen#38 (byte) myprintf::bLen#39 (byte) myprintf::bLen#40 (byte) myprintf::bLen#32 (byte) myprintf::bLen#33 (byte) myprintf::bLen#29 (byte) myprintf::bLen#30 (byte) myprintf::bLen#8 (byte) myprintf::bLen#48 (byte) myprintf::bLen#53 (byte) myprintf::bLen#50 (byte) myprintf::bLen#41 (byte) myprintf::bLen#44 (byte) myprintf::bLen#34 (byte) myprintf::bLen#18 (byte) myprintf::bLen#17 (byte) myprintf::bLen#25 (byte) myprintf::bLen#51 (byte) myprintf::bLen#45 (byte) myprintf::bLen#52 (byte) myprintf::bLen#46 (byte) myprintf::bLen#47 (byte) myprintf::bLen#26 +Alias (word) myprintf::w1#10 = (word) myprintf::w1#4 (word) myprintf::w1#5 (word) myprintf::w1#14 (word) myprintf::w1#15 (word) myprintf::w1#13 (word) myprintf::w1#16 (word) myprintf::w1#9 (word) myprintf::w1#26 (word) myprintf::w1#20 (word) myprintf::w1#32 (word) myprintf::w1#47 (word) myprintf::w1#45 (word) myprintf::w1#27 (word) myprintf::w1#21 (word) myprintf::w1#38 (word) myprintf::w1#36 (word) myprintf::w1#35 (word) myprintf::w1#24 (word) myprintf::w1#3 (word) myprintf::w1#2 (word) myprintf::w#1 (word) myprintf::w1#31 (word) myprintf::w1#22 (word) myprintf::w1#23 (word) myprintf::w1#25 +Alias (byte*) myprintf::str#11 = (byte*) myprintf::str#30 (byte*) myprintf::str#3 (byte*) myprintf::str#12 (byte*) myprintf::str#13 (byte*) myprintf::str#14 (byte*) myprintf::str#7 (byte*) myprintf::str#25 (byte*) myprintf::str#8 (byte*) myprintf::str#18 (byte*) myprintf::str#33 (byte*) myprintf::str#48 (byte*) myprintf::str#46 (byte*) myprintf::str#26 (byte*) myprintf::str#19 (byte*) myprintf::str#39 (byte*) myprintf::str#37 (byte*) myprintf::str#36 (byte*) myprintf::str#23 (byte*) myprintf::str#31 (byte*) myprintf::str#20 (byte*) myprintf::str#32 (byte*) myprintf::str#21 (byte*) myprintf::str#22 (byte*) myprintf::str#24 +Alias (word) myprintf::w2#10 = (word) myprintf::w2#5 (word) myprintf::w2#6 (word) myprintf::w2#15 (word) myprintf::w2#16 (word) myprintf::w2#14 (word) myprintf::w2#17 (word) myprintf::w2#27 (word) myprintf::w2#11 (word) myprintf::w2#21 (word) myprintf::w2#32 (word) myprintf::w2#47 (word) myprintf::w2#45 (word) myprintf::w2#28 (word) myprintf::w2#22 (word) myprintf::w2#38 (word) myprintf::w2#36 (word) myprintf::w2#35 (word) myprintf::w2#25 (word) myprintf::w2#4 (word) myprintf::w2#23 (word) myprintf::w2#3 (word) myprintf::w2#2 (word) myprintf::w#2 (word) myprintf::w2#24 (word) myprintf::w2#26 +Alias (word) myprintf::w3#10 = (word) myprintf::w3#5 (word) myprintf::w3#6 (word) myprintf::w3#15 (word) myprintf::w3#16 (word) myprintf::w3#14 (word) myprintf::w3#17 (word) myprintf::w3#27 (word) myprintf::w3#11 (word) myprintf::w3#21 (word) myprintf::w3#32 (word) myprintf::w3#47 (word) myprintf::w3#45 (word) myprintf::w3#28 (word) myprintf::w3#22 (word) myprintf::w3#38 (word) myprintf::w3#36 (word) myprintf::w3#35 (word) myprintf::w3#25 (word) myprintf::w3#4 (word) myprintf::w3#23 (word) myprintf::w3#3 (word) myprintf::w3#24 (word) myprintf::w3#2 (word) myprintf::w#3 (word) myprintf::w3#26 +Alias (byte) myprintf::bFormat#10 = (byte) myprintf::bFormat#18 (byte) myprintf::bFormat#3 (byte) myprintf::bFormat#11 (byte) myprintf::bFormat#9 (byte) myprintf::bFormat#12 (byte) myprintf::bFormat#5 (byte) myprintf::bFormat#6 (byte) myprintf::bFormat#16 (byte) myprintf::bFormat#17 +Alias (word) myprintf::w#10 = (word) myprintf::w#33 (word) myprintf::w#16 (word) myprintf::w#15 (word) myprintf::w#14 (word) myprintf::w#23 (word) myprintf::w#13 (word) myprintf::w#19 (word) myprintf::w#8 (word) myprintf::w#20 (word) myprintf::w#4 (word) myprintf::w#9 (word) myprintf::w#5 (word) myprintf::w#42 (word) myprintf::w#27 (word) myprintf::w#6 (word) myprintf::w#12 (word) myprintf::w#11 (word) myprintf::w#28 (word) myprintf::w#29 +Alias (byte) myprintf::bTrailing#10 = (byte) myprintf::bTrailing#40 (byte) myprintf::bTrailing#20 (byte) myprintf::bTrailing#19 (byte) myprintf::bTrailing#18 (byte) myprintf::bTrailing#26 (byte) myprintf::bTrailing#17 (byte) myprintf::bTrailing#23 (byte) myprintf::bTrailing#15 (byte) myprintf::bTrailing#30 (byte) myprintf::bTrailing#12 (byte) myprintf::bTrailing#8 (byte) myprintf::bTrailing#37 (byte) myprintf::bTrailing#31 (byte) myprintf::bTrailing#45 (byte) myprintf::bTrailing#44 (byte) myprintf::bTrailing#43 (byte) myprintf::bTrailing#35 (byte) myprintf::bTrailing#36 +Alias (byte) myprintf::bDigits#14 = (byte) myprintf::bDigits#42 (byte) myprintf::bDigits#23 (byte) myprintf::bDigits#22 (byte) myprintf::bDigits#21 (byte) myprintf::bDigits#29 (byte) myprintf::bDigits#20 (byte) myprintf::bDigits#19 (byte) myprintf::bDigits#26 (byte) myprintf::bDigits#32 (byte) myprintf::bDigits#18 (byte) myprintf::bDigits#17 (byte) myprintf::bDigits#39 (byte) myprintf::bDigits#33 (byte) myprintf::bDigits#47 (byte) myprintf::bDigits#46 (byte) myprintf::bDigits#45 (byte) myprintf::bDigits#37 (byte) myprintf::bDigits#38 +Alias (byte) myprintf::bLeadZero#10 = (byte) myprintf::bLeadZero#38 (byte) myprintf::bLeadZero#17 (byte) myprintf::bLeadZero#16 (byte) myprintf::bLeadZero#15 (byte) myprintf::bLeadZero#14 (byte) myprintf::bLeadZero#20 (byte) myprintf::bLeadZero#13 (byte) myprintf::bLeadZero#21 (byte) myprintf::bLeadZero#27 (byte) myprintf::bLeadZero#12 (byte) myprintf::bLeadZero#11 (byte) myprintf::bLeadZero#34 (byte) myprintf::bLeadZero#28 (byte) myprintf::bLeadZero#45 (byte) myprintf::bLeadZero#43 (byte) myprintf::bLeadZero#42 (byte) myprintf::bLeadZero#32 (byte) myprintf::bLeadZero#33 +Alias (byte) myprintf::bDigits#1 = (byte~) myprintf::$8 +Alias (byte) myprintf::b#27 = (byte) myprintf::b#3 (byte/word~) myprintf::$18 (byte) myprintf::b#28 +Alias (byte) myprintf::b#29 = (byte) myprintf::b#4 (byte/word~) myprintf::$24 (byte) myprintf::b#30 +Alias (byte*) myprintf::dst#13 = (byte*) myprintf::dst#3 (byte*) myprintf::dst#14 +Alias (byte) myprintf::bLen#19 = (byte) myprintf::bLen#2 (byte) myprintf::bLen#20 +Alias (byte*) myprintf::str#27 = (byte*) myprintf::str#34 (byte*) myprintf::str#28 +Alias (byte) myprintf::bArg#28 = (byte) myprintf::bArg#32 (byte) myprintf::bArg#29 +Alias (word) myprintf::w1#28 = (word) myprintf::w1#33 (word) myprintf::w1#29 +Alias (word) myprintf::w2#29 = (word) myprintf::w2#33 (word) myprintf::w2#30 +Alias (word) myprintf::w3#29 = (word) myprintf::w3#33 (word) myprintf::w3#30 +Alias (word) myprintf::w#30 = (word) myprintf::w#7 (word) myprintf::w#31 +Alias (byte) myprintf::bTrailing#38 = (byte) myprintf::bTrailing#42 (byte) myprintf::bTrailing#39 +Alias (byte) myprintf::bDigits#40 = (byte) myprintf::bDigits#44 (byte) myprintf::bDigits#41 +Alias (byte) myprintf::bLeadZero#35 = (byte) myprintf::bLeadZero#40 (byte) myprintf::bLeadZero#36 +Alias (byte) myprintf::b#17 = (byte) myprintf::b#18 (byte) myprintf::b#19 +Alias (byte) myprintf::bTrailing#3 = (byte) myprintf::bTrailing#7 (byte) myprintf::bTrailing#5 +Alias (byte) myprintf::bDigits#13 = (byte) myprintf::bDigits#9 (byte) myprintf::bDigits#5 +Alias (byte) myprintf::bLeadZero#4 = (byte) myprintf::bLeadZero#9 (byte) myprintf::bLeadZero#6 +Alias (byte*) myprintf::dst#29 = (byte*) myprintf::dst#44 (byte*) myprintf::dst#36 +Alias (byte) myprintf::bLen#35 = (byte) myprintf::bLen#49 (byte) myprintf::bLen#42 +Alias (byte*) myprintf::str#40 = (byte*) myprintf::str#45 (byte*) myprintf::str#42 +Alias (byte) myprintf::bArg#38 = (byte) myprintf::bArg#43 (byte) myprintf::bArg#40 +Alias (word) myprintf::w1#39 = (word) myprintf::w1#44 (word) myprintf::w1#41 +Alias (word) myprintf::w2#39 = (word) myprintf::w2#44 (word) myprintf::w2#41 +Alias (word) myprintf::w3#39 = (word) myprintf::w3#44 (word) myprintf::w3#41 +Alias (word) myprintf::w#36 = (word) myprintf::w#41 (word) myprintf::w#38 +Alias (byte*) myprintf::dst#15 = (byte*) myprintf::dst#30 (byte*) myprintf::dst#16 +Alias (byte) myprintf::bLen#21 = (byte) myprintf::bLen#36 (byte) myprintf::bLen#22 +Alias (byte) myprintf::bDigits#10 = (byte) myprintf::bDigits#15 (byte) myprintf::bDigits#11 +Alias (byte) myprintf::b#31 = (byte) myprintf::b#34 (byte) myprintf::b#32 +Alias (byte) myprintf::bLeadZero#3 = (byte) myprintf::bLeadZero#7 (byte) myprintf::bLeadZero#8 +Alias (byte) myprintf::bTrailing#13 = (byte) myprintf::bTrailing#16 (byte) myprintf::bTrailing#14 +Alias (byte*) myprintf::str#43 = (byte*) myprintf::str#47 (byte*) myprintf::str#44 +Alias (byte) myprintf::bArg#41 = (byte) myprintf::bArg#45 (byte) myprintf::bArg#42 +Alias (word) myprintf::w1#42 = (word) myprintf::w1#46 (word) myprintf::w1#43 +Alias (word) myprintf::w2#42 = (word) myprintf::w2#46 (word) myprintf::w2#43 +Alias (word) myprintf::w3#42 = (word) myprintf::w3#46 (word) myprintf::w3#43 +Alias (word) myprintf::w#39 = (word) myprintf::w#43 (word) myprintf::w#40 +Alias (byte) myprintf::bTrailing#28 = (byte) myprintf::bTrailing#4 (byte) myprintf::bTrailing#6 +Alias (byte) myprintf::bDigits#12 = (byte) myprintf::bDigits#7 (byte) myprintf::bDigits#31 +Alias (byte) myprintf::b#21 = (byte) myprintf::b#22 +Alias (byte*) myprintf::dst#18 = (byte*) myprintf::dst#6 (byte*) myprintf::dst#37 +Alias (byte) myprintf::bLen#24 = (byte) myprintf::bLen#5 (byte) myprintf::bLen#43 +Alias (byte*) myprintf::str#16 = (byte*) myprintf::str#29 (byte*) myprintf::str#35 +Alias (byte) myprintf::bArg#20 = (byte) myprintf::bArg#30 (byte) myprintf::bArg#33 +Alias (word) myprintf::w1#18 = (word) myprintf::w1#30 (word) myprintf::w1#34 +Alias (word) myprintf::w2#19 = (word) myprintf::w2#31 (word) myprintf::w2#34 +Alias (word) myprintf::w3#19 = (word) myprintf::w3#31 (word) myprintf::w3#34 +Alias (word) myprintf::w#25 = (word) myprintf::w#32 (word) myprintf::w#34 +Alias (byte) myprintf::bLeadZero#25 = (byte) myprintf::bLeadZero#37 (byte) myprintf::bLeadZero#41 +Alias (byte) myprintf::bFormat#13 = (byte) myprintf::bFormat#2 (byte) myprintf::bFormat#19 (byte) myprintf::bFormat#14 (byte) myprintf::bFormat#15 +Alias (byte) myprintf::bTrailing#2 = (byte) myprintf::bTrailing#32 (byte) myprintf::bTrailing#41 (byte) myprintf::bTrailing#33 (byte) myprintf::bTrailing#34 +Alias (byte) myprintf::bDigits#34 = (byte) myprintf::bDigits#4 (byte) myprintf::bDigits#43 (byte) myprintf::bDigits#35 (byte) myprintf::bDigits#36 +Alias (byte) myprintf::bLeadZero#2 = (byte) myprintf::bLeadZero#29 (byte) myprintf::bLeadZero#39 (byte) myprintf::bLeadZero#30 (byte) myprintf::bLeadZero#31 +Alias (byte*) myprintf::dst#21 = (byte*) myprintf::dst#9 +Alias (byte) myprintf::return#0 = (byte) myprintf::bLen#15 (byte) myprintf::bLen#27 (byte) myprintf::return#4 (byte) myprintf::return#1 +Alias (word) div10::val#0 = (word/signed dword/dword~) div10::$1 +Alias (word) div10::return#0 = (word~) div10::$6 (word) div10::return#3 (word) div10::return#1 +Alias (word) div16u::return#2 = (word) div16u::return#4 +Alias (word) main::u#12 = (word) main::u#5 (word) main::u#6 (word) main::u#13 (word) main::u#7 +Alias (word) main::v#1 = (word~) main::$0 (word) main::v#3 +Alias (word) myprintf::w3#0 = (word~) main::$5 +Alias (word) div10::return#2 = (word) div10::return#4 +Alias (word) main::u#10 = (word) main::u#14 (word) main::u#8 (word) main::u#9 (word) main::u#16 +Alias (word) main::v#2 = (word~) main::$9 (word) main::v#4 +Alias (word) myprintf::w3#1 = (word~) main::$14 +Alias (signed word) main::return#0 = (signed word) main::return#3 (signed word) main::return#1 +Successful SSA optimization Pass2AliasElimination +Alias candidate removed (phi-usage) (word) myprintf::w1#10 +Alias candidate removed (phi-usage) (word) myprintf::w2#10 +Alias candidate removed (phi-usage) (word) myprintf::w3#10 +Alias (word) divr16u::dividend#2 = (word) divr16u::dividend#3 +Alias (word) divr16u::quotient#3 = (word) divr16u::quotient#6 +Alias (word) divr16u::divisor#1 = (word) divr16u::divisor#3 (word) divr16u::divisor#6 +Alias (byte) divr16u::i#2 = (byte) divr16u::i#3 (byte) divr16u::i#5 +Alias (word) divr16u::dividend#0 = (word) divr16u::dividend#5 +Alias (byte) myprintf::b#15 = (byte) myprintf::b#27 +Alias (byte*) myprintf::dst#10 = (byte*) myprintf::dst#13 (byte*) myprintf::dst#4 (byte*) myprintf::dst#25 (byte*) myprintf::dst#8 +Alias (byte) myprintf::bLen#14 = (byte) myprintf::bLen#9 (byte) myprintf::bLen#16 (byte) myprintf::bLen#31 +Alias (word) myprintf::w#10 = (word) myprintf::w#30 (word) myprintf::w#24 (word) myprintf::w#22 +Alias (byte*) myprintf::str#10 = (byte*) myprintf::str#27 (byte*) myprintf::str#11 (byte*) myprintf::str#15 (byte*) myprintf::str#9 +Alias (byte) myprintf::bArg#12 = (byte) myprintf::bArg#28 (byte) myprintf::bArg#19 (byte) myprintf::bArg#4 (byte) myprintf::bArg#14 +Alias (word) myprintf::w1#11 = (word) myprintf::w1#28 (word) myprintf::w1#17 (word) myprintf::w1#12 +Alias (word) myprintf::w2#12 = (word) myprintf::w2#29 (word) myprintf::w2#18 (word) myprintf::w2#13 +Alias (word) myprintf::w3#12 = (word) myprintf::w3#29 (word) myprintf::w3#18 (word) myprintf::w3#13 +Alias (byte) myprintf::bTrailing#10 = (byte) myprintf::bTrailing#38 (byte) myprintf::bTrailing#27 (byte) myprintf::bTrailing#25 +Alias (byte) myprintf::bDigits#14 = (byte) myprintf::bDigits#40 (byte) myprintf::bDigits#30 (byte) myprintf::bDigits#28 +Alias (byte) myprintf::bLeadZero#10 = (byte) myprintf::bLeadZero#35 (byte) myprintf::bLeadZero#24 (byte) myprintf::bLeadZero#23 +Alias (byte) myprintf::b#16 = (byte) myprintf::b#29 +Alias (byte) myprintf::bLen#10 = (byte) myprintf::bLen#19 +Alias (byte*) myprintf::dst#15 = (byte*) myprintf::dst#5 +Alias (byte) myprintf::bLen#11 = (byte) myprintf::bLen#21 +Alias (byte) myprintf::bDigits#10 = (byte) myprintf::bDigits#6 +Alias (byte) myprintf::b#20 = (byte) myprintf::b#31 +Alias (byte) myprintf::bLeadZero#3 = (byte) myprintf::bLeadZero#5 +Alias (byte) myprintf::bTrailing#11 = (byte) myprintf::bTrailing#13 +Alias (byte*) myprintf::str#41 = (byte*) myprintf::str#43 +Alias (byte) myprintf::bArg#39 = (byte) myprintf::bArg#41 +Alias (word) myprintf::w1#40 = (word) myprintf::w1#42 +Alias (word) myprintf::w2#40 = (word) myprintf::w2#42 +Alias (word) myprintf::w3#40 = (word) myprintf::w3#42 +Alias (word) myprintf::w#37 = (word) myprintf::w#39 +Alias (byte) myprintf::bFormat#13 = (byte) myprintf::bFormat#7 +Alias (byte) myprintf::bTrailing#2 = (byte) myprintf::bTrailing#24 +Alias (byte) myprintf::bDigits#27 = (byte) myprintf::bDigits#34 +Alias (byte) myprintf::bLeadZero#2 = (byte) myprintf::bLeadZero#22 +Alias (byte) myprintf::bFormat#10 = (byte) myprintf::bFormat#8 +Successful SSA optimization Pass2AliasElimination +Alias candidate removed (phi-usage) (word) myprintf::w1#10 +Alias candidate removed (phi-usage) (word) myprintf::w2#10 +Alias candidate removed (phi-usage) (word) myprintf::w3#10 +Alias candidate removed (solo) (word) myprintf::w1#11 = +Alias candidate removed (solo) (word) myprintf::w2#12 = +Alias candidate removed (solo) (word) myprintf::w3#12 = +Self Phi Eliminated (word) divr16u::divisor#1 +Self Phi Eliminated (word) append::sub#4 +Self Phi Eliminated (byte*) append::dst#5 +Self Phi Eliminated (byte) myprintf::bTrailing#3 +Self Phi Eliminated (byte) myprintf::bDigits#13 +Self Phi Eliminated (byte) myprintf::bLeadZero#4 +Self Phi Eliminated (byte*) myprintf::dst#29 +Self Phi Eliminated (byte) myprintf::bLen#35 +Self Phi Eliminated (byte*) myprintf::str#40 +Self Phi Eliminated (byte) myprintf::bArg#38 +Self Phi Eliminated (word) myprintf::w1#39 +Self Phi Eliminated (word) myprintf::w2#39 +Self Phi Eliminated (word) myprintf::w3#39 +Self Phi Eliminated (word) myprintf::w#36 +Self Phi Eliminated (byte) myprintf::bLeadZero#3 +Self Phi Eliminated (byte*) myprintf::dst#15 +Self Phi Eliminated (byte) myprintf::b#20 +Self Phi Eliminated (byte) myprintf::bTrailing#11 +Self Phi Eliminated (byte*) myprintf::str#41 +Self Phi Eliminated (byte) myprintf::bArg#39 +Self Phi Eliminated (word) myprintf::w1#40 +Self Phi Eliminated (word) myprintf::w2#40 +Self Phi Eliminated (word) myprintf::w3#40 +Self Phi Eliminated (word) myprintf::w#37 +Self Phi Eliminated (byte*) myprintf::dst#18 +Self Phi Eliminated (byte) myprintf::b#21 +Self Phi Eliminated (byte) myprintf::bTrailing#28 +Self Phi Eliminated (byte) myprintf::bDigits#12 +Self Phi Eliminated (byte*) myprintf::str#16 +Self Phi Eliminated (byte) myprintf::bArg#20 +Self Phi Eliminated (word) myprintf::w1#18 +Self Phi Eliminated (word) myprintf::w2#19 +Self Phi Eliminated (word) myprintf::w3#19 +Self Phi Eliminated (word) myprintf::w#25 +Self Phi Eliminated (byte) myprintf::bLeadZero#25 +Self Phi Eliminated (byte*) myprintf::dst#7 +Self Phi Eliminated (byte) myprintf::b#23 +Self Phi Eliminated (byte*) myprintf::str#17 +Self Phi Eliminated (byte) myprintf::bArg#21 +Self Phi Eliminated (word) myprintf::w1#19 +Self Phi Eliminated (word) myprintf::w2#20 +Self Phi Eliminated (word) myprintf::w3#20 +Self Phi Eliminated (word) myprintf::w#26 +Self Phi Eliminated (byte) myprintf::bTrailing#29 +Self Phi Eliminated (byte) myprintf::bLeadZero#26 +Self Phi Eliminated (word) main::u#12 +Self Phi Eliminated (word) main::u#10 +Successful SSA optimization Pass2SelfPhiElimination +Redundant Phi (word) divr16u::rem#8 (word) divr16u::rem#3 +Redundant Phi (word) divr16u::dividend#4 (word) divr16u::dividend#1 +Redundant Phi (word) divr16u::divisor#5 (word) divr16u::divisor#0 +Redundant Phi (word) divr16u::divisor#1 (word) divr16u::divisor#5 +Redundant Phi (word) div16u::dividend#1 (word) div16u::dividend#0 +Redundant Phi (word) div16u::divisor#1 (word) div16u::divisor#0 +Redundant Phi (word) append::sub#4 (word) append::sub#6 +Redundant Phi (byte*) append::dst#5 (byte*) append::dst#4 +Redundant Phi (word) utoa::value#5 (word) utoa::value#4 +Redundant Phi (byte*) utoa::dst#15 (byte*) utoa::dst#5 +Redundant Phi (word) myprintf::w1#11 (word) myprintf::w1#10 +Redundant Phi (word) myprintf::w2#12 (word) myprintf::w2#10 +Redundant Phi (word) myprintf::w3#12 (word) myprintf::w3#10 +Redundant Phi (byte) myprintf::bTrailing#3 (byte) myprintf::bTrailing#10 +Redundant Phi (byte) myprintf::bDigits#13 (byte) myprintf::bDigits#14 +Redundant Phi (byte) myprintf::bLeadZero#4 (byte) myprintf::bLeadZero#10 +Redundant Phi (byte*) myprintf::dst#29 (byte*) myprintf::dst#10 +Redundant Phi (byte) myprintf::bLen#35 (byte) myprintf::bLen#14 +Redundant Phi (byte*) myprintf::str#40 (byte*) myprintf::str#10 +Redundant Phi (byte) myprintf::bArg#38 (byte) myprintf::bArg#12 +Redundant Phi (word) myprintf::w1#39 (word) myprintf::w1#10 +Redundant Phi (word) myprintf::w2#39 (word) myprintf::w2#10 +Redundant Phi (word) myprintf::w3#39 (word) myprintf::w3#10 +Redundant Phi (word) myprintf::w#36 (word) myprintf::w#10 +Redundant Phi (byte) myprintf::bLeadZero#3 (byte) myprintf::bLeadZero#4 +Redundant Phi (byte*) myprintf::dst#15 (byte*) myprintf::dst#29 +Redundant Phi (byte) myprintf::b#20 (byte) myprintf::b#17 +Redundant Phi (byte) myprintf::bTrailing#11 (byte) myprintf::bTrailing#3 +Redundant Phi (byte*) myprintf::str#41 (byte*) myprintf::str#40 +Redundant Phi (byte) myprintf::bArg#39 (byte) myprintf::bArg#38 +Redundant Phi (word) myprintf::w1#40 (word) myprintf::w1#39 +Redundant Phi (word) myprintf::w2#40 (word) myprintf::w2#39 +Redundant Phi (word) myprintf::w3#40 (word) myprintf::w3#39 +Redundant Phi (word) myprintf::w#37 (word) myprintf::w#36 +Redundant Phi (byte*) myprintf::dst#18 (byte*) myprintf::dst#17 +Redundant Phi (byte) myprintf::b#21 (byte) myprintf::b#33 +Redundant Phi (byte) myprintf::bTrailing#28 (byte) myprintf::bTrailing#9 +Redundant Phi (byte) myprintf::bDigits#12 (byte) myprintf::bDigits#16 +Redundant Phi (byte*) myprintf::str#16 (byte*) myprintf::str#38 +Redundant Phi (byte) myprintf::bArg#20 (byte) myprintf::bArg#36 +Redundant Phi (word) myprintf::w1#18 (word) myprintf::w1#37 +Redundant Phi (word) myprintf::w2#19 (word) myprintf::w2#37 +Redundant Phi (word) myprintf::w3#19 (word) myprintf::w3#37 +Redundant Phi (word) myprintf::w#25 (word) myprintf::w#35 +Redundant Phi (byte) myprintf::bLeadZero#25 (byte) myprintf::bLeadZero#44 +Redundant Phi (byte*) myprintf::dst#7 (byte*) myprintf::dst#18 +Redundant Phi (byte) myprintf::b#23 (byte) myprintf::b#21 +Redundant Phi (byte*) myprintf::str#17 (byte*) myprintf::str#16 +Redundant Phi (byte) myprintf::bArg#21 (byte) myprintf::bArg#20 +Redundant Phi (word) myprintf::w1#19 (word) myprintf::w1#18 +Redundant Phi (word) myprintf::w2#20 (word) myprintf::w2#19 +Redundant Phi (word) myprintf::w3#20 (word) myprintf::w3#19 +Redundant Phi (word) myprintf::w#26 (word) myprintf::w#25 +Redundant Phi (byte) myprintf::bTrailing#29 (byte) myprintf::bTrailing#28 +Redundant Phi (byte) myprintf::bLeadZero#26 (byte) myprintf::bLeadZero#25 +Redundant Phi (word) div10::val#5 (word) div10::val#4 +Redundant Phi (word) main::u#12 (word) main::u#11 +Redundant Phi (word) main::u#10 (word) main::u#15 +Successful SSA optimization Pass2RedundantPhiElimination +Redundant Phi (byte*) myprintf::dst#17 (byte*) myprintf::dst#10 +Redundant Phi (byte) myprintf::b#33 (byte) myprintf::b#17 +Redundant Phi (byte) myprintf::bTrailing#9 (byte) myprintf::bTrailing#10 +Redundant Phi (byte*) myprintf::str#38 (byte*) myprintf::str#10 +Redundant Phi (byte) myprintf::bArg#36 (byte) myprintf::bArg#12 +Redundant Phi (word) myprintf::w1#37 (word) myprintf::w1#10 +Redundant Phi (word) myprintf::w2#37 (word) myprintf::w2#10 +Redundant Phi (word) myprintf::w3#37 (word) myprintf::w3#10 +Redundant Phi (word) myprintf::w#35 (word) myprintf::w#10 +Redundant Phi (byte) myprintf::bLeadZero#44 (byte) myprintf::bLeadZero#10 +Successful SSA optimization Pass2RedundantPhiElimination +Redundant Phi (byte*) myprintf::str#6 (byte*) myprintf::str#10 +Redundant Phi (byte*) myprintf::dst#22 (byte*) myprintf::dst#10 +Redundant Phi (byte) myprintf::bArg#11 (byte) myprintf::bArg#12 +Redundant Phi (word) myprintf::w1#8 (word) myprintf::w1#10 +Redundant Phi (word) myprintf::w2#9 (word) myprintf::w2#10 +Redundant Phi (word) myprintf::w3#9 (word) myprintf::w3#10 +Redundant Phi (word) myprintf::w#18 (word) myprintf::w#10 +Redundant Phi (byte) myprintf::bTrailing#22 (byte) myprintf::bTrailing#10 +Redundant Phi (byte) myprintf::bLeadZero#19 (byte) myprintf::bLeadZero#10 +Successful SSA optimization Pass2RedundantPhiElimination +Redundant Phi (byte*) myprintf::str#4 (byte*) myprintf::str#10 +Redundant Phi (byte*) myprintf::dst#21 (byte*) myprintf::dst#10 +Redundant Phi (word) myprintf::w1#7 (word) myprintf::w1#10 +Redundant Phi (word) myprintf::w2#8 (word) myprintf::w2#10 +Redundant Phi (word) myprintf::w3#8 (word) myprintf::w3#10 +Successful SSA optimization Pass2RedundantPhiElimination +Simple Condition (bool~) divr16u::$4 [10] if((byte~) divr16u::$2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16u::@2 +Simple Condition (bool~) divr16u::$9 [18] if((word) divr16u::rem#5<(word) divr16u::divisor#0) goto divr16u::@3 +Simple Condition (bool~) divr16u::$11 [25] if((byte) divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 +Simple Condition (bool~) append::$0 [57] if((word) append::value#5>=(word) append::sub#6) goto append::@2 +Simple Condition (bool~) myprintf::$1 [157] if((byte) myprintf::bFormat#10==(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@2 +Simple Condition (bool~) myprintf::$49 [161] if((byte) myprintf::b#1!=(byte) '%') goto myprintf::@53 +Simple Condition (bool~) myprintf::$3 [165] if((byte) myprintf::b#1!=(byte) '0') goto myprintf::@3 +Simple Condition (bool~) myprintf::$56 [177] if(*((byte*) myprintf::str#0)!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@1 +Simple Condition (bool~) myprintf::$10 [181] if((byte) myprintf::b#1!=(byte) '-') goto myprintf::@5 +Simple Condition (bool~) myprintf::$11 [187] if((byte) myprintf::b#1==(byte) 'c') goto myprintf::@6 +Simple Condition (bool~) myprintf::$12 [196] if((byte) myprintf::b#1==(byte) 'd') goto myprintf::@7 +Simple Condition (bool~) myprintf::$19 [215] if((byte) myprintf::b#15<(byte/signed byte/word/signed word/dword/signed dword) $a) goto myprintf::@9 +Simple Condition (bool~) myprintf::$25 [227] if((byte) myprintf::b#16<(byte/signed byte/word/signed word/dword/signed dword) $a) goto myprintf::@12 +Simple Condition (bool~) myprintf::$31 [238] if(*((byte[6]) myprintf::buf6#0 + (byte) myprintf::b#17)!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@20 +Simple Condition (bool~) myprintf::$36 [251] if((byte) myprintf::bLeadZero#10==(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@28 +Simple Condition (bool~) myprintf::$40 [261] if((byte) myprintf::bDigits#2>(byte) myprintf::b#17) goto myprintf::@27 +Simple Condition (bool~) myprintf::$41 [267] if((byte) myprintf::digit#2<(byte) myprintf::b#17) goto myprintf::@34 +Simple Condition (bool~) myprintf::$46 [280] if((byte) myprintf::bDigits#3>(byte) myprintf::b#17) goto myprintf::@38 +Simple Condition (bool~) myprintf::$50 [295] if((byte) myprintf::bArg#12==(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@54 +Simple Condition (bool~) myprintf::$51 [300] if((byte) myprintf::bArg#12==(byte/signed byte/word/signed word/dword/signed dword) 1) goto myprintf::@55 +Simple Condition (bool~) main::$1 [355] if(*((byte*) zp2#0)<(byte/word/signed word/dword/signed dword) $c8) goto main::@2 +Simple Condition (bool~) main::$8 [374] if(*((byte*) zp1#0)<(byte/signed byte/word/signed word/dword/signed dword) $a) goto main::@1 +Simple Condition (bool~) main::$10 [390] if(*((byte*) zp2#0)<(byte/word/signed word/dword/signed dword) $c8) goto main::@6 +Simple Condition (bool~) main::$17 [409] if(*((byte*) zp1#0)<(byte/signed byte/word/signed word/dword/signed dword) $a) goto main::@5 +Successful SSA optimization Pass2ConditionalJumpSimplification +Rewriting ! if()-condition to reversed if() [71] (bool~) utoa::$3 ← ! (bool~) utoa::$2 +Successful SSA optimization Pass2ConditionalAndOrRewriting +Rewriting || if()-condition to two if()s [70] (bool~) utoa::$2 ← (bool~) utoa::$0 || (bool~) utoa::$1 +Successful SSA optimization Pass2ConditionalAndOrRewriting +Rewriting ! if()-condition to reversed if() [77] (bool~) utoa::$7 ← ! (bool~) utoa::$6 +Successful SSA optimization Pass2ConditionalAndOrRewriting +Rewriting || if()-condition to two if()s [76] (bool~) utoa::$6 ← (bool~) utoa::$4 || (bool~) utoa::$5 +Successful SSA optimization Pass2ConditionalAndOrRewriting +Rewriting ! if()-condition to reversed if() [94] (bool~) utoa::$11 ← ! (bool~) utoa::$10 +Successful SSA optimization Pass2ConditionalAndOrRewriting +Rewriting || if()-condition to two if()s [93] (bool~) utoa::$10 ← (bool~) utoa::$8 || (bool~) utoa::$9 +Successful SSA optimization Pass2ConditionalAndOrRewriting +Rewriting ! if()-condition to reversed if() [111] (bool~) utoa::$15 ← ! (bool~) utoa::$14 +Successful SSA optimization Pass2ConditionalAndOrRewriting +Rewriting || if()-condition to two if()s [110] (bool~) utoa::$14 ← (bool~) utoa::$12 || (bool~) utoa::$13 +Successful SSA optimization Pass2ConditionalAndOrRewriting +Rewriting ! if()-condition to reversed if() [170] (bool~) myprintf::$7 ← ! (bool~) myprintf::$6 +Successful SSA optimization Pass2ConditionalAndOrRewriting +Rewriting && if()-condition to two if()s [169] (bool~) myprintf::$6 ← (bool~) myprintf::$4 && (bool~) myprintf::$5 +Successful SSA optimization Pass2ConditionalAndOrRewriting +Rewriting ! if()-condition to reversed if() [207] (bool~) myprintf::$16 ← ! (bool~) myprintf::$15 +Successful SSA optimization Pass2ConditionalAndOrRewriting +Rewriting || if()-condition to two if()s [206] (bool~) myprintf::$15 ← (bool~) myprintf::$13 || (bool~) myprintf::$14 +Successful SSA optimization Pass2ConditionalAndOrRewriting +Rewriting ! if()-condition to reversed if() [245] (bool~) myprintf::$35 ← ! (bool~) myprintf::$34 +Successful SSA optimization Pass2ConditionalAndOrRewriting +Rewriting && if()-condition to two if()s [244] (bool~) myprintf::$34 ← (bool~) myprintf::$32 && (bool~) myprintf::$33 +Successful SSA optimization Pass2ConditionalAndOrRewriting +Rewriting ! if()-condition to reversed if() [272] (bool~) myprintf::$45 ← ! (bool~) myprintf::$44 +Successful SSA optimization Pass2ConditionalAndOrRewriting +Rewriting && if()-condition to two if()s [271] (bool~) myprintf::$44 ← (bool~) myprintf::$42 && (bool~) myprintf::$43 +Successful SSA optimization Pass2ConditionalAndOrRewriting +Rewriting ! if()-condition to reversed if() [287] (bool~) myprintf::$55 ← ! (bool~) myprintf::$54 +Successful SSA optimization Pass2ConditionalAndOrRewriting +Rewriting && if()-condition to two if()s [286] (bool~) myprintf::$54 ← (bool~) myprintf::$52 && (bool~) myprintf::$53 +Successful SSA optimization Pass2ConditionalAndOrRewriting +Constant (const word) divr16u::quotient#0 = 0 +Constant (const byte) divr16u::i#0 = 0 +Constant (const word) divr16u::rem#3 = 0 +Constant (const byte*) zp1#0 = ((byte*))$61 +Constant (const byte*) zp2#0 = ((byte*))$62 +Constant (const byte*) TIMEHI#0 = ((byte*))$a1 +Constant (const byte*) TIMELO#0 = ((byte*))$a2 +Constant (const byte*) VICBANK#0 = ((byte*))$d018 +Constant (const byte[$64]) strTemp#0 = { fill( $64, 0) } +Constant (const byte) utoa::bStarted#0 = 0 +Constant (const word) append::sub#0 = $2710 +Constant (const byte) utoa::bStarted#1 = 1 +Constant (const word) append::sub#1 = $3e8 +Constant (const byte) utoa::bStarted#2 = 1 +Constant (const word) append::sub#2 = $64 +Constant (const byte) utoa::bStarted#3 = 1 +Constant (const word) append::sub#3 = $a +Constant (const byte) utoa::bStarted#4 = 1 +Constant (const byte) myprintf::bArg#0 = 0 +Constant (const byte) myprintf::bFormat#0 = 0 +Constant (const byte) myprintf::bLen#0 = 0 +Constant (const byte) myprintf::bLeadZero#0 = 0 +Constant (const byte) myprintf::bDigits#0 = 0 +Constant (const byte) myprintf::bTrailing#0 = 0 +Constant (const byte) myprintf::b#0 = 0 +Constant (const byte) myprintf::digit#0 = 0 +Constant (const byte[6]) myprintf::buf6#0 = { fill( 6, 0) } +Constant (const word) myprintf::w#0 = 0 +Constant (const byte) myprintf::bLeadZero#1 = 1 +Constant (const byte) myprintf::bTrailing#1 = 1 +Constant (const byte) myprintf::b#2 = 1 +Constant (const byte) myprintf::$21 = '0' +Constant (const byte/signed byte/word/signed word/dword/signed dword) myprintf::$20 = $57 +Constant (const byte) myprintf::$27 = '0' +Constant (const byte/signed byte/word/signed word/dword/signed dword) myprintf::$26 = $57 +Constant (const byte) myprintf::digit#1 = 0 +Constant (const byte) myprintf::$38 = ' ' +Constant (const byte) myprintf::$37 = '0' +Constant (const byte) myprintf::bFormat#1 = 0 +Constant (const byte) myprintf::bFormat#13 = 1 +Constant (const byte) myprintf::bLeadZero#2 = 0 +Constant (const byte) myprintf::bDigits#27 = 1 +Constant (const byte) myprintf::bTrailing#2 = 0 +Constant (const word) main::u#0 = 0 +Constant (const word) main::v#0 = 0 +Constant (const word) main::u#1 = $6e85 +Constant (const word) div16u::divisor#0 = $a +Constant (const byte*) myprintf::str#1 = main::str +Constant (const word) main::u#3 = $6e85 +Constant (const byte*) myprintf::str#2 = main::str1 +Constant (const signed word) main::return#0 = 0 +Successful SSA optimization Pass2ConstantIdentification +Constant (const word) divr16u::divisor#0 = div16u::divisor#0 +Constant (const bool) utoa::$0 = utoa::bStarted#0==1 +Constant (const byte*) utoa::dst#5 = myprintf::buf6#0 +Constant (const byte*) myprintf::dst#0 = strTemp#0 +Constant (const byte*) myprintf::dst#1 = strTemp#0 +Constant (const signed word) main::return#2 = main::return#0 +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte*) append::dst#0 = utoa::dst#5 +Constant (const byte*) utoa::dst#0 = ++utoa::dst#5 +Successful SSA optimization Pass2ConstantIdentification +if() condition always false - eliminating [29] if((const bool) utoa::$0) goto utoa::@5 +Successful SSA optimization Pass2ConstantIfs +Eliminating unused variable (byte) myprintf::return#2 and assignment [180] (byte) myprintf::return#2 ← (byte) myprintf::return#0 +Eliminating unused variable (byte) myprintf::return#3 and assignment [203] (byte) myprintf::return#3 ← (byte) myprintf::return#0 +Eliminating unused constant (const byte) utoa::bStarted#4 +Eliminating unused constant (const bool) utoa::$0 +Eliminating unused constant (const byte) myprintf::b#0 +Eliminating unused constant (const byte) myprintf::digit#0 +Eliminating unused constant (const word) main::u#0 +Eliminating unused constant (const word) main::v#0 +Eliminating unused constant (const signed word) main::return#2 +Successful SSA optimization PassNEliminateUnusedVars +Eliminating unused constant (const signed word) main::return#0 +Successful SSA optimization PassNEliminateUnusedVars +Resolved ranged next value divr16u::i#1 ← ++ divr16u::i#2 to ++ +Resolved ranged comparison value if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (byte/signed byte/word/signed word/dword/signed dword) $10 +Culled Empty Block (label) divr16u::@6 +Culled Empty Block (label) @8 +Culled Empty Block (label) append::@3 +Culled Empty Block (label) myprintf::@62 +Culled Empty Block (label) myprintf::@43 +Culled Empty Block (label) myprintf::@71 +Culled Empty Block (label) myprintf::@8 +Culled Empty Block (label) myprintf::@9 +Culled Empty Block (label) myprintf::@12 +Culled Empty Block (label) myprintf::@28 +Culled Empty Block (label) myprintf::@37 +Culled Empty Block (label) myprintf::@54 +Culled Empty Block (label) myprintf::@55 +Culled Empty Block (label) main::@8 +Successful SSA optimization Pass2CullEmptyBlocks +Self Phi Eliminated (byte*) myprintf::dst#10 +Self Phi Eliminated (word) myprintf::w1#10 +Self Phi Eliminated (word) myprintf::w2#10 +Self Phi Eliminated (word) myprintf::w3#10 +Successful SSA optimization Pass2SelfPhiElimination +Redundant Phi (byte*) myprintf::dst#10 (byte*) myprintf::dst#42 +Redundant Phi (word) myprintf::w1#10 (word) myprintf::w1#6 +Redundant Phi (word) myprintf::w2#10 (word) myprintf::w2#7 +Redundant Phi (word) myprintf::w3#10 (word) myprintf::w3#7 +Successful SSA optimization Pass2RedundantPhiElimination +Simple Condition (bool~) utoa::$4 [32] if((byte) utoa::bStarted#5==(byte/signed byte/word/signed word/dword/signed dword) 1) goto utoa::@6 +Simple Condition (bool~) utoa::$8 [40] if((byte) utoa::bStarted#6==(byte/signed byte/word/signed word/dword/signed dword) 1) goto utoa::@7 +Simple Condition (bool~) utoa::$12 [50] if((byte) utoa::bStarted#7==(byte/signed byte/word/signed word/dword/signed dword) 1) goto utoa::@8 +Simple Condition (bool~) myprintf::$4 [78] if((byte) myprintf::b#1>=(byte) '1') goto myprintf::@72 +Simple Condition (bool~) myprintf::$13 [93] if((byte) myprintf::b#1==(byte) 'x') goto myprintf::@47 +Simple Condition (bool~) myprintf::$32 [112] if((byte) myprintf::bTrailing#10==(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@74 +Simple Condition (bool~) myprintf::$42 [128] if((byte) myprintf::bTrailing#10!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@75 +Simple Condition (bool~) myprintf::$52 [137] if((byte) myprintf::b#1>=(byte/signed byte/word/signed word/dword/signed dword) $41) goto myprintf::@76 +Simple Condition (bool~) utoa::$1 [208] if((word) utoa::value#4>=(word/signed word/dword/signed dword) $2710) goto utoa::@5 +Simple Condition (bool~) utoa::$5 [209] if((word) utoa::value#6>=(word/signed word/dword/signed dword) $3e8) goto utoa::@6 +Simple Condition (bool~) utoa::$9 [210] if((word) utoa::value#11>=(byte/signed byte/word/signed word/dword/signed dword) $64) goto utoa::@7 +Simple Condition (bool~) utoa::$13 [211] if((word) utoa::value#10>=(byte/signed byte/word/signed word/dword/signed dword) $a) goto utoa::@8 +Simple Condition (bool~) myprintf::$5 [212] if((byte) myprintf::b#1<=(byte) '9') goto myprintf::@41 +Simple Condition (bool~) myprintf::$14 [213] if((byte) myprintf::b#1==(byte) 'X') goto myprintf::@47 +Simple Condition (bool~) myprintf::$33 [214] if((byte) myprintf::bDigits#14>(byte) myprintf::b#17) goto myprintf::@27 +Simple Condition (bool~) myprintf::$43 [215] if((byte) myprintf::bDigits#16>(byte) myprintf::b#17) goto myprintf::@38 +Simple Condition (bool~) myprintf::$53 [216] if((byte) myprintf::b#1<=(byte/signed byte/word/signed word/dword/signed dword) $5a) goto myprintf::@68 +Successful SSA optimization Pass2ConditionalJumpSimplification +Rewriting conditional comparison if((byte) myprintf::b#1<=(byte/signed byte/word/signed word/dword/signed dword) $5a) goto myprintf::@68 +Inlining constant with var siblings (const word) divr16u::quotient#0 +Inlining constant with var siblings (const byte) divr16u::i#0 +Inlining constant with var siblings (const word) divr16u::rem#3 +Inlining constant with var siblings (const word) append::sub#0 +Inlining constant with var siblings (const word) append::sub#1 +Inlining constant with var siblings (const word) append::sub#2 +Inlining constant with var siblings (const word) append::sub#3 +Inlining constant with var siblings (const byte*) append::dst#0 +Inlining constant with var siblings (const byte) utoa::bStarted#0 +Inlining constant with var siblings (const byte) utoa::bStarted#1 +Inlining constant with var siblings (const byte) utoa::bStarted#2 +Inlining constant with var siblings (const byte) utoa::bStarted#3 +Inlining constant with var siblings (const byte*) utoa::dst#5 +Inlining constant with var siblings (const byte*) utoa::dst#0 +Inlining constant with var siblings (const byte) myprintf::bArg#0 +Inlining constant with var siblings (const byte) myprintf::bFormat#0 +Inlining constant with var siblings (const byte) myprintf::bLen#0 +Inlining constant with var siblings (const byte) myprintf::bLeadZero#0 +Inlining constant with var siblings (const byte) myprintf::bDigits#0 +Inlining constant with var siblings (const byte) myprintf::bTrailing#0 +Inlining constant with var siblings (const word) myprintf::w#0 +Inlining constant with var siblings (const byte) myprintf::bLeadZero#1 +Inlining constant with var siblings (const byte) myprintf::bTrailing#1 +Inlining constant with var siblings (const byte) myprintf::b#2 +Inlining constant with var siblings (const byte) myprintf::digit#1 +Inlining constant with var siblings (const byte) myprintf::bFormat#1 +Inlining constant with var siblings (const byte) myprintf::bFormat#13 +Inlining constant with var siblings (const byte) myprintf::bLeadZero#2 +Inlining constant with var siblings (const byte) myprintf::bDigits#27 +Inlining constant with var siblings (const byte) myprintf::bTrailing#2 +Inlining constant with var siblings (const byte*) myprintf::str#1 +Inlining constant with var siblings (const byte*) myprintf::str#2 +Inlining constant with var siblings (const byte*) myprintf::dst#0 +Inlining constant with var siblings (const byte*) myprintf::dst#1 +Inlining constant with var siblings (const word) main::u#1 +Inlining constant with var siblings (const word) main::u#3 +Constant inlined myprintf::$26 = (byte/signed byte/word/signed word/dword/signed dword) $57 +Constant inlined divr16u::rem#3 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined utoa::dst#5 = (const byte[6]) myprintf::buf6#0 +Constant inlined utoa::bStarted#3 = (byte/signed byte/word/signed word/dword/signed dword) 1 +Constant inlined append::dst#0 = (const byte[6]) myprintf::buf6#0 +Constant inlined divr16u::i#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined utoa::dst#0 = ++(const byte[6]) myprintf::buf6#0 +Constant inlined myprintf::$27 = (byte) '0' +Constant inlined myprintf::str#1 = (const string) main::str +Constant inlined myprintf::bLeadZero#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined myprintf::str#2 = (const string) main::str1 +Constant inlined myprintf::bLeadZero#1 = (byte/signed byte/word/signed word/dword/signed dword) 1 +Constant inlined myprintf::digit#1 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined myprintf::dst#1 = (const byte[$64]) strTemp#0 +Constant inlined myprintf::bDigits#27 = (byte/signed byte/word/signed word/dword/signed dword) 1 +Constant inlined divr16u::quotient#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined myprintf::dst#0 = (const byte[$64]) strTemp#0 +Constant inlined myprintf::bArg#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined myprintf::bLeadZero#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined divr16u::divisor#0 = (const word) div16u::divisor#0 +Constant inlined myprintf::$37 = (byte) '0' +Constant inlined myprintf::bLen#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined myprintf::bFormat#13 = (byte/signed byte/word/signed word/dword/signed dword) 1 +Constant inlined append::sub#0 = (word/signed word/dword/signed dword) $2710 +Constant inlined append::sub#1 = (word/signed word/dword/signed dword) $3e8 +Constant inlined append::sub#2 = (byte/signed byte/word/signed word/dword/signed dword) $64 +Constant inlined append::sub#3 = (byte/signed byte/word/signed word/dword/signed dword) $a +Constant inlined myprintf::$38 = (byte) ' ' +Constant inlined myprintf::b#2 = (byte/signed byte/word/signed word/dword/signed dword) 1 +Constant inlined main::u#3 = (word/signed word/dword/signed dword) $6e85 +Constant inlined main::u#1 = (word/signed word/dword/signed dword) $6e85 +Constant inlined myprintf::bDigits#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined myprintf::bTrailing#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined myprintf::bFormat#1 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined myprintf::bFormat#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined myprintf::w#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined utoa::bStarted#1 = (byte/signed byte/word/signed word/dword/signed dword) 1 +Constant inlined myprintf::$21 = (byte) '0' +Constant inlined utoa::bStarted#2 = (byte/signed byte/word/signed word/dword/signed dword) 1 +Constant inlined myprintf::$20 = (byte/signed byte/word/signed word/dword/signed dword) $57 +Constant inlined myprintf::bTrailing#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined utoa::bStarted#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined myprintf::bTrailing#1 = (byte/signed byte/word/signed word/dword/signed dword) 1 +Successful SSA optimization Pass2ConstantInlining +Identical Phi Values (byte*) myprintf::dst#42 (const byte[$64]) strTemp#0 +Successful SSA optimization Pass2IdenticalPhiElimination +Added new block during phi lifting main::@16(between main::@12 and main::@1) +Added new block during phi lifting main::@17(between main::@15 and main::@5) +Added new block during phi lifting myprintf::@77(between myprintf::@52 and myprintf::@1) +Added new block during phi lifting myprintf::@78(between myprintf::@4 and myprintf::@52) +Added new block during phi lifting myprintf::@79(between myprintf::@61 and myprintf::@52) +Fixing phi predecessor for myprintf::bTrailing#21 to new block ( myprintf::@4 -> myprintf::@78 ) during phi lifting. +Fixing phi predecessor for myprintf::bLeadZero#18 to new block ( myprintf::@61 -> myprintf::@79 ) during phi lifting. +Added new block during phi lifting myprintf::@80(between myprintf::@35 and myprintf::@40) +Added new block during phi lifting myprintf::@81(between myprintf::@38 and myprintf::@40) +Added new block during phi lifting myprintf::@82(between myprintf::@73 and myprintf::@40) +Added new block during phi lifting myprintf::@83(between myprintf::@75 and myprintf::@40) +Added new block during phi lifting myprintf::@84(between myprintf::@21 and myprintf::@26) +Added new block during phi lifting myprintf::@85(between myprintf::@30 and myprintf::@26) +Added new block during phi lifting myprintf::@86(between myprintf::@34 and myprintf::@34) +Added new block during phi lifting myprintf::@87(between myprintf::@75 and myprintf::@38) +Added new block during phi lifting myprintf::@88(between myprintf::@38 and myprintf::@38) +Added new block during phi lifting myprintf::@89(between myprintf::@74 and myprintf::@27) +Added new block during phi lifting myprintf::@90(between myprintf::@30 and myprintf::@27) +Added new block during phi lifting myprintf::@91(between myprintf::@64 and myprintf::@57) +Added new block during phi lifting myprintf::@92(between myprintf::@65 and myprintf::@57) +Added new block during phi lifting myprintf::@93(between myprintf::@53 and myprintf::@60) +Added new block during phi lifting utoa::@17(between utoa::@13 and utoa::@1) +Fixing phi predecessor for utoa::bStarted#5 to new block ( utoa::@13 -> utoa::@17 ) during phi lifting. +Fixing phi predecessor for utoa::dst#16 to new block ( utoa::@13 -> utoa::@17 ) during phi lifting. +Added new block during phi lifting utoa::@18(between utoa::@14 and utoa::@2) +Added new block during phi lifting utoa::@19(between utoa::@15 and utoa::@3) +Added new block during phi lifting utoa::@20(between utoa::@16 and utoa::@4) +Added new block during phi lifting divr16u::@8(between divr16u::@3 and divr16u::@1) +Added new block during phi lifting divr16u::@9(between divr16u::@1 and divr16u::@2) +Added new block during phi lifting divr16u::@10(between divr16u::@2 and divr16u::@3) +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @14 +Adding NOP phi() at start of @end +Adding NOP phi() at start of main::@11 +Adding NOP phi() at start of main::@14 +Adding NOP phi() at start of myprintf::@10 +Adding NOP phi() at start of myprintf::@13 +Adding NOP phi() at start of myprintf::@29 +Adding NOP phi() at start of utoa +CALL GRAPH +Calls in [] to main:2 +Calls in [main] to div16u:11 myprintf:25 Print:27 div10:37 myprintf:51 Print:53 +Calls in [myprintf] to utoa:126 +Calls in [utoa] to append:246 append:256 append:266 append:274 +Calls in [div16u] to divr16u:299 + +Created 59 initial phi equivalence classes +Coalesced [22] myprintf::w1#48 ← myprintf::w1#0 +Coalesced [23] myprintf::w2#48 ← myprintf::w2#0 +Coalesced [24] myprintf::w3#48 ← myprintf::w3#0 +Coalesced [48] myprintf::w1#49 ← myprintf::w1#1 +Coalesced [49] myprintf::w2#49 ← myprintf::w2#1 +Coalesced [50] myprintf::w3#49 ← myprintf::w3#1 +Coalesced [58] main::u#18 ← main::u#4 +Coalesced [59] main::u#17 ← main::u#2 +Coalesced [63] myprintf::str#49 ← myprintf::str#5 +Coalesced [68] myprintf::bFormat#24 ← myprintf::bFormat#10 +Coalesced [69] myprintf::return#10 ← myprintf::bLen#14 +Coalesced [70] myprintf::bArg#53 ← myprintf::bArg#12 +Coalesced [71] myprintf::w#50 ← myprintf::w#10 +Coalesced [72] myprintf::bTrailing#50 ← myprintf::bTrailing#10 +Coalesced [73] myprintf::bDigits#53 ← myprintf::bDigits#14 +Coalesced [79] myprintf::str#50 ← myprintf::str#0 +Coalesced (already) [80] myprintf::bFormat#20 ← myprintf::bFormat#4 +Coalesced (already) [81] myprintf::bArg#47 ← myprintf::bArg#10 +Coalesced (already) [82] myprintf::bLen#54 ← myprintf::return#0 +Coalesced (already) [83] myprintf::w#44 ← myprintf::w#17 +Coalesced (already) [84] myprintf::bTrailing#46 ← myprintf::bTrailing#21 +Coalesced (already) [85] myprintf::bDigits#48 ← myprintf::bDigits#24 +Coalesced [86] myprintf::bLeadZero#46 ← myprintf::bLeadZero#18 +Coalesced (already) [89] myprintf::bFormat#22 ← myprintf::bFormat#10 +Coalesced (already) [90] myprintf::return#7 ← myprintf::bLen#14 +Coalesced (already) [91] myprintf::bArg#50 ← myprintf::bArg#12 +Coalesced (already) [92] myprintf::w#47 ← myprintf::w#10 +Coalesced (already) [93] myprintf::bDigits#51 ← myprintf::bDigits#14 +Coalesced (already) [94] myprintf::bLeadZero#49 ← myprintf::bLeadZero#10 +Coalesced [99] myprintf::bLen#59 ← myprintf::bLen#14 +Coalesced [100] myprintf::bDigits#58 ← myprintf::bDigits#14 +Coalesced (already) [102] myprintf::return#5 ← myprintf::bLen#28 +Coalesced (already) [103] myprintf::bArg#48 ← myprintf::bArg#12 +Coalesced (already) [104] myprintf::w#45 ← myprintf::w#10 +Coalesced (already) [105] myprintf::bTrailing#47 ← myprintf::bTrailing#10 +Coalesced (already) [106] myprintf::bDigits#49 ← myprintf::bDigits#25 +Coalesced (already) [107] myprintf::bLeadZero#47 ← myprintf::bLeadZero#10 +Coalesced [123] myprintf::bLen#55 ← myprintf::bLen#3 +Coalesced (already) [124] myprintf::bDigits#54 ← myprintf::bDigits#14 +Coalesced [130] myprintf::bLen#61 ← myprintf::bLen#14 +Coalesced [131] myprintf::bDigits#60 ← myprintf::bDigits#14 +Coalesced [133] myprintf::bLen#63 ← myprintf::bLen#23 +Coalesced [140] myprintf::bLen#56 ← myprintf::bLen#24 +Coalesced (already) [141] myprintf::bDigits#55 ← myprintf::bDigits#16 +Coalesced (already) [143] myprintf::bLen#60 ← myprintf::bLen#24 +Coalesced (already) [144] myprintf::bDigits#59 ← myprintf::bDigits#16 +Coalesced [145] myprintf::bLen#65 ← myprintf::bLen#24 +Coalesced [146] myprintf::bDigits#62 ← myprintf::bDigits#16 +Coalesced [152] myprintf::bLen#57 ← myprintf::bLen#6 +Coalesced [153] myprintf::bDigits#56 ← myprintf::bDigits#3 +Coalesced (already) [154] myprintf::bLen#66 ← myprintf::bLen#6 +Coalesced (already) [155] myprintf::bDigits#63 ← myprintf::bDigits#3 +Coalesced [156] myprintf::digit#4 ← myprintf::digit#2 +Coalesced (already) [157] myprintf::bLen#64 ← myprintf::bLen#24 +Coalesced [159] myprintf::bLen#67 ← myprintf::bLen#14 +Coalesced [160] myprintf::bDigits#64 ← myprintf::bDigits#14 +Coalesced [169] myprintf::bLen#62 ← myprintf::bLen#4 +Coalesced [170] myprintf::bDigits#61 ← myprintf::bDigits#2 +Coalesced (already) [171] myprintf::bLen#68 ← myprintf::bLen#4 +Coalesced (already) [172] myprintf::bDigits#65 ← myprintf::bDigits#2 +Coalesced [174] myprintf::b#35 ← myprintf::b#5 +Coalesced [178] myprintf::bLen#58 ← myprintf::bLen#1 +Coalesced (already) [179] myprintf::bDigits#57 ← myprintf::bDigits#14 +Coalesced (already) [182] myprintf::bFormat#21 ← myprintf::bFormat#10 +Coalesced (already) [183] myprintf::return#6 ← myprintf::bLen#14 +Coalesced (already) [184] myprintf::bArg#49 ← myprintf::bArg#12 +Coalesced (already) [185] myprintf::w#46 ← myprintf::w#10 +Coalesced (already) [186] myprintf::bTrailing#48 ← myprintf::bTrailing#10 +Coalesced [187] myprintf::bDigits#50 ← myprintf::bDigits#1 +Coalesced (already) [188] myprintf::bLeadZero#48 ← myprintf::bLeadZero#10 +Not coalescing [192] myprintf::w#53 ← myprintf::w3#7 +Coalesced (already) [195] myprintf::return#8 ← myprintf::bLen#14 +Coalesced [196] myprintf::bArg#51 ← myprintf::bArg#1 +Coalesced [197] myprintf::w#48 ← myprintf::w#21 +Not coalescing [198] myprintf::w#52 ← myprintf::w2#7 +Not coalescing [199] myprintf::w#51 ← myprintf::w1#6 +Coalesced [201] myprintf::b#36 ← myprintf::b#1 +Coalesced (already) [205] myprintf::bFormat#23 ← myprintf::bFormat#10 +Coalesced [206] myprintf::return#9 ← myprintf::bLen#7 +Coalesced (already) [207] myprintf::bArg#52 ← myprintf::bArg#12 +Coalesced (already) [208] myprintf::w#49 ← myprintf::w#10 +Coalesced (already) [209] myprintf::bTrailing#49 ← myprintf::bTrailing#10 +Coalesced (already) [210] myprintf::bDigits#52 ← myprintf::bDigits#14 +Coalesced (already) [211] myprintf::bLeadZero#50 ← myprintf::bLeadZero#10 +Coalesced [214] myprintf::b#37 ← myprintf::b#6 +Coalesced [217] utoa::value#14 ← utoa::value#4 +Coalesced [221] utoa::bStarted#8 ← utoa::bStarted#5 +Coalesced [222] utoa::value#16 ← utoa::value#6 +Coalesced [223] utoa::dst#19 ← utoa::dst#16 +Coalesced [227] utoa::bStarted#9 ← utoa::bStarted#6 +Coalesced [228] utoa::value#19 ← utoa::value#11 +Coalesced [229] utoa::dst#22 ← utoa::dst#10 +Coalesced [233] utoa::value#21 ← utoa::value#10 +Coalesced [234] utoa::dst#24 ← utoa::dst#13 +Coalesced [244] append::dst#9 ← append::dst#3 +Coalesced [245] append::value#12 ← append::value#4 +Coalesced [250] utoa::value#20 ← utoa::value#3 +Coalesced [251] utoa::dst#23 ← utoa::dst#4 +Coalesced [254] append::dst#8 ← append::dst#2 +Coalesced [255] append::value#11 ← append::value#3 +Coalesced [260] utoa::value#18 ← utoa::value#2 +Coalesced [261] utoa::dst#21 ← utoa::dst#2 +Coalesced [264] append::dst#7 ← append::dst#1 +Coalesced [265] append::value#10 ← append::value#2 +Coalesced [270] utoa::value#17 ← utoa::value#1 +Coalesced [271] utoa::dst#20 ← utoa::dst#1 +Coalesced [273] append::value#9 ← append::value#1 +Coalesced [277] utoa::value#15 ← utoa::value#0 +Coalesced [280] append::value#13 ← append::value#8 +Coalesced [286] append::value#14 ← append::value#0 +Coalesced [303] divr16u::dividend#8 ← divr16u::dividend#1 +Coalesced [310] divr16u::rem#12 ← divr16u::rem#1 +Coalesced [317] divr16u::rem#14 ← divr16u::rem#2 +Coalesced [318] divr16u::return#6 ← divr16u::quotient#2 +Coalesced [323] divr16u::rem#10 ← divr16u::rem#9 +Coalesced [324] divr16u::dividend#9 ← divr16u::dividend#0 +Coalesced [325] divr16u::quotient#9 ← divr16u::return#0 +Coalesced [326] divr16u::i#7 ← divr16u::i#1 +Coalesced [327] divr16u::rem#13 ← divr16u::rem#5 +Coalesced [328] divr16u::return#5 ← divr16u::quotient#1 +Coalesced [329] divr16u::rem#11 ← divr16u::rem#0 +Coalesced down to 29 phi equivalence classes +Culled Empty Block (label) main::@17 +Culled Empty Block (label) main::@16 +Culled Empty Block (label) myprintf::@79 +Culled Empty Block (label) myprintf::@77 +Culled Empty Block (label) myprintf::@78 +Culled Empty Block (label) myprintf::@82 +Culled Empty Block (label) myprintf::@84 +Culled Empty Block (label) myprintf::@80 +Culled Empty Block (label) myprintf::@83 +Culled Empty Block (label) myprintf::@87 +Culled Empty Block (label) myprintf::@81 +Culled Empty Block (label) myprintf::@88 +Culled Empty Block (label) myprintf::@86 +Culled Empty Block (label) myprintf::@89 +Culled Empty Block (label) myprintf::@85 +Culled Empty Block (label) myprintf::@90 +Culled Empty Block (label) myprintf::@93 +Culled Empty Block (label) utoa::@17 +Culled Empty Block (label) utoa::@18 +Culled Empty Block (label) utoa::@19 +Culled Empty Block (label) utoa::@20 +Culled Empty Block (label) divr16u::@8 +Culled Empty Block (label) divr16u::@10 +Culled Empty Block (label) divr16u::@9 +Renumbering block @14 to @1 +Renumbering block div16u::@2 to div16u::@1 +Renumbering block myprintf::@10 to myprintf::@8 +Renumbering block myprintf::@11 to myprintf::@9 +Renumbering block myprintf::@13 to myprintf::@10 +Renumbering block myprintf::@14 to myprintf::@11 +Renumbering block myprintf::@19 to myprintf::@12 +Renumbering block myprintf::@20 to myprintf::@13 +Renumbering block myprintf::@21 to myprintf::@14 +Renumbering block myprintf::@26 to myprintf::@15 +Renumbering block myprintf::@27 to myprintf::@16 +Renumbering block myprintf::@29 to myprintf::@17 +Renumbering block myprintf::@30 to myprintf::@18 +Renumbering block myprintf::@34 to myprintf::@19 +Renumbering block myprintf::@35 to myprintf::@20 +Renumbering block myprintf::@38 to myprintf::@21 +Renumbering block myprintf::@40 to myprintf::@22 +Renumbering block myprintf::@41 to myprintf::@23 +Renumbering block myprintf::@45 to myprintf::@24 +Renumbering block myprintf::@46 to myprintf::@25 +Renumbering block myprintf::@47 to myprintf::@26 +Renumbering block myprintf::@52 to myprintf::@27 +Renumbering block myprintf::@53 to myprintf::@28 +Renumbering block myprintf::@57 to myprintf::@29 +Renumbering block myprintf::@60 to myprintf::@30 +Renumbering block myprintf::@61 to myprintf::@31 +Renumbering block myprintf::@64 to myprintf::@32 +Renumbering block myprintf::@65 to myprintf::@33 +Renumbering block myprintf::@66 to myprintf::@34 +Renumbering block myprintf::@68 to myprintf::@35 +Renumbering block myprintf::@69 to myprintf::@36 +Renumbering block myprintf::@72 to myprintf::@37 +Renumbering block myprintf::@73 to myprintf::@38 +Renumbering block myprintf::@74 to myprintf::@39 +Renumbering block myprintf::@75 to myprintf::@40 +Renumbering block myprintf::@76 to myprintf::@41 +Renumbering block myprintf::@91 to myprintf::@42 +Renumbering block myprintf::@92 to myprintf::@43 +Renumbering block main::@10 to main::@8 +Renumbering block main::@11 to main::@9 +Renumbering block main::@12 to main::@10 +Renumbering block main::@13 to main::@11 +Renumbering block main::@14 to main::@12 +Renumbering block main::@15 to main::@13 +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @1 +Adding NOP phi() at start of @end +Adding NOP phi() at start of main::@9 +Adding NOP phi() at start of main::@12 +Adding NOP phi() at start of myprintf::@8 +Adding NOP phi() at start of myprintf::@10 +Adding NOP phi() at start of myprintf::@17 +Adding NOP phi() at start of utoa +Adding NOP phi() at start of divr16u + +FINAL CONTROL FLOW GRAPH +@begin: scope:[] from + [0] phi() + to:@1 +@1: scope:[] from @begin + [1] phi() + [2] call main + to:@end +@end: scope:[] from @1 + [3] phi() +main: scope:[main] from @1 + [4] *((const byte*) VICBANK#0) ← (byte/signed byte/word/signed word/dword/signed dword) $17 + [5] *((const byte*) zp1#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:main::@1 +main::@1: scope:[main] from main main::@10 + [6] (word) main::u#11 ← phi( main/(word/signed word/dword/signed dword) $6e85 main::@10/(word) main::u#2 ) + [7] *((const byte*) TIMEHI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + [8] *((const byte*) TIMELO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + [9] *((const byte*) zp2#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:main::@2 +main::@2: scope:[main] from main::@1 main::@8 + [10] (word) div16u::dividend#0 ← (word) main::u#11 + [11] call div16u + [12] (word) div16u::return#2 ← (word) div16u::return#0 + to:main::@8 +main::@8: scope:[main] from main::@2 + [13] (word) main::v#1 ← (word) div16u::return#2 + [14] *((const byte*) zp2#0) ← ++ *((const byte*) zp2#0) + [15] if(*((const byte*) zp2#0)<(byte/word/signed word/dword/signed dword) $c8) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@8 + [16] (word~) main::$2 ← ((word)) *((const byte*) TIMEHI#0) + [17] (word~) main::$3 ← (word~) main::$2 << (byte/signed byte/word/signed word/dword/signed dword) 8 + [18] (word~) main::$4 ← ((word)) *((const byte*) TIMELO#0) + [19] (word) myprintf::w3#0 ← (word~) main::$3 + (word~) main::$4 + [20] (word) myprintf::w1#0 ← (word) main::u#11 + [21] (word) myprintf::w2#0 ← (word) main::v#1 + [22] call myprintf + to:main::@9 +main::@9: scope:[main] from main::@3 + [23] phi() + [24] call Print + to:main::@10 +main::@10: scope:[main] from main::@9 + [25] (word) main::u#2 ← (word) main::u#11 - (word/signed word/dword/signed dword) $4d2 + [26] *((const byte*) zp1#0) ← ++ *((const byte*) zp1#0) + [27] if(*((const byte*) zp1#0)<(byte/signed byte/word/signed word/dword/signed dword) $a) goto main::@1 + to:main::@4 +main::@4: scope:[main] from main::@10 + [28] *((const byte*) zp1#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:main::@5 +main::@5: scope:[main] from main::@13 main::@4 + [29] (word) main::u#15 ← phi( main::@13/(word) main::u#4 main::@4/(word/signed word/dword/signed dword) $6e85 ) + [30] *((const byte*) TIMEHI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + [31] *((const byte*) TIMELO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + [32] *((const byte*) zp2#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:main::@6 +main::@6: scope:[main] from main::@11 main::@5 + [33] (word) div10::val#4 ← (word) main::u#15 + [34] call div10 + [35] (word) div10::return#2 ← (word) div10::return#0 + to:main::@11 +main::@11: scope:[main] from main::@6 + [36] (word) main::v#2 ← (word) div10::return#2 + [37] *((const byte*) zp2#0) ← ++ *((const byte*) zp2#0) + [38] if(*((const byte*) zp2#0)<(byte/word/signed word/dword/signed dword) $c8) goto main::@6 + to:main::@7 +main::@7: scope:[main] from main::@11 + [39] (word~) main::$11 ← ((word)) *((const byte*) TIMEHI#0) + [40] (word~) main::$12 ← (word~) main::$11 << (byte/signed byte/word/signed word/dword/signed dword) 8 + [41] (word~) main::$13 ← ((word)) *((const byte*) TIMELO#0) + [42] (word) myprintf::w3#1 ← (word~) main::$12 + (word~) main::$13 + [43] (word) myprintf::w1#1 ← (word) main::u#15 + [44] (word) myprintf::w2#1 ← (word) main::v#2 + [45] call myprintf + to:main::@12 +main::@12: scope:[main] from main::@7 + [46] phi() + [47] call Print + to:main::@13 +main::@13: scope:[main] from main::@12 + [48] (word) main::u#4 ← (word) main::u#15 - (word/signed word/dword/signed dword) $4d2 + [49] *((const byte*) zp1#0) ← ++ *((const byte*) zp1#0) + [50] if(*((const byte*) zp1#0)<(byte/signed byte/word/signed word/dword/signed dword) $a) goto main::@5 + to:main::@return +main::@return: scope:[main] from main::@13 + [51] return + to:@return +Print: scope:[Print] from main::@12 main::@9 + asm { ldy#0 loop: ldastrTemp,y beqdone jsr$FFD2 iny jmploop done: } + to:Print::@return +Print::@return: scope:[Print] from Print + [53] return + to:@return +myprintf: scope:[myprintf] from main::@3 main::@7 + [54] (word) myprintf::w3#7 ← phi( main::@3/(word) myprintf::w3#0 main::@7/(word) myprintf::w3#1 ) + [54] (word) myprintf::w2#7 ← phi( main::@3/(word) myprintf::w2#0 main::@7/(word) myprintf::w2#1 ) + [54] (word) myprintf::w1#6 ← phi( main::@3/(word) myprintf::w1#0 main::@7/(word) myprintf::w1#1 ) + [54] (byte*) myprintf::str#5 ← phi( main::@3/(const string) main::str main::@7/(const string) main::str1 ) + to:myprintf::@1 +myprintf::@1: scope:[myprintf] from myprintf myprintf::@27 + [55] (byte) myprintf::bLeadZero#10 ← phi( myprintf/(byte/signed byte/word/signed word/dword/signed dword) 0 myprintf::@27/(byte) myprintf::bLeadZero#18 ) + [55] (byte) myprintf::bDigits#14 ← phi( myprintf/(byte/signed byte/word/signed word/dword/signed dword) 0 myprintf::@27/(byte) myprintf::bDigits#24 ) + [55] (byte) myprintf::bTrailing#10 ← phi( myprintf/(byte/signed byte/word/signed word/dword/signed dword) 0 myprintf::@27/(byte) myprintf::bTrailing#21 ) + [55] (word) myprintf::w#10 ← phi( myprintf/(byte/signed byte/word/signed word/dword/signed dword) 0 myprintf::@27/(word) myprintf::w#17 ) + [55] (byte) myprintf::bLen#14 ← phi( myprintf/(byte/signed byte/word/signed word/dword/signed dword) 0 myprintf::@27/(byte) myprintf::return#0 ) + [55] (byte) myprintf::bArg#12 ← phi( myprintf/(byte/signed byte/word/signed word/dword/signed dword) 0 myprintf::@27/(byte) myprintf::bArg#10 ) + [55] (byte) myprintf::bFormat#10 ← phi( myprintf/(byte/signed byte/word/signed word/dword/signed dword) 0 myprintf::@27/(byte) myprintf::bFormat#4 ) + [55] (byte*) myprintf::str#10 ← phi( myprintf/(byte*) myprintf::str#5 myprintf::@27/(byte*) myprintf::str#0 ) + [56] (byte) myprintf::b#1 ← *((byte*) myprintf::str#10) + [57] if((byte) myprintf::bFormat#10==(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@2 + to:myprintf::@31 +myprintf::@31: scope:[myprintf] from myprintf::@1 + [58] if((byte) myprintf::b#1!=(byte) '0') goto myprintf::@3 + to:myprintf::@27 +myprintf::@27: scope:[myprintf] from myprintf::@22 myprintf::@23 myprintf::@29 myprintf::@30 myprintf::@31 myprintf::@4 + [59] (byte) myprintf::bLeadZero#18 ← phi( myprintf::@22/(byte) myprintf::bLeadZero#10 myprintf::@23/(byte) myprintf::bLeadZero#10 myprintf::@4/(byte) myprintf::bLeadZero#10 myprintf::@29/(byte/signed byte/word/signed word/dword/signed dword) 0 myprintf::@30/(byte) myprintf::bLeadZero#10 myprintf::@31/(byte/signed byte/word/signed word/dword/signed dword) 1 ) + [59] (byte) myprintf::bDigits#24 ← phi( myprintf::@22/(byte) myprintf::bDigits#25 myprintf::@23/(byte) myprintf::bDigits#1 myprintf::@4/(byte) myprintf::bDigits#14 myprintf::@29/(byte/signed byte/word/signed word/dword/signed dword) 1 myprintf::@30/(byte) myprintf::bDigits#14 myprintf::@31/(byte) myprintf::bDigits#14 ) + [59] (byte) myprintf::bTrailing#21 ← phi( myprintf::@22/(byte) myprintf::bTrailing#10 myprintf::@23/(byte) myprintf::bTrailing#10 myprintf::@4/(byte/signed byte/word/signed word/dword/signed dword) 1 myprintf::@29/(byte/signed byte/word/signed word/dword/signed dword) 0 myprintf::@30/(byte) myprintf::bTrailing#10 myprintf::@31/(byte) myprintf::bTrailing#10 ) + [59] (word) myprintf::w#17 ← phi( myprintf::@22/(word) myprintf::w#10 myprintf::@23/(word) myprintf::w#10 myprintf::@4/(word) myprintf::w#10 myprintf::@29/(word) myprintf::w#21 myprintf::@30/(word) myprintf::w#10 myprintf::@31/(word) myprintf::w#10 ) + [59] (byte) myprintf::bArg#10 ← phi( myprintf::@22/(byte) myprintf::bArg#12 myprintf::@23/(byte) myprintf::bArg#12 myprintf::@4/(byte) myprintf::bArg#12 myprintf::@29/(byte) myprintf::bArg#1 myprintf::@30/(byte) myprintf::bArg#12 myprintf::@31/(byte) myprintf::bArg#12 ) + [59] (byte) myprintf::return#0 ← phi( myprintf::@22/(byte) myprintf::bLen#28 myprintf::@23/(byte) myprintf::bLen#14 myprintf::@4/(byte) myprintf::bLen#14 myprintf::@29/(byte) myprintf::bLen#14 myprintf::@30/(byte) myprintf::bLen#7 myprintf::@31/(byte) myprintf::bLen#14 ) + [59] (byte) myprintf::bFormat#4 ← phi( myprintf::@22/(byte/signed byte/word/signed word/dword/signed dword) 0 myprintf::@23/(byte) myprintf::bFormat#10 myprintf::@4/(byte) myprintf::bFormat#10 myprintf::@29/(byte/signed byte/word/signed word/dword/signed dword) 1 myprintf::@30/(byte) myprintf::bFormat#10 myprintf::@31/(byte) myprintf::bFormat#10 ) + [60] (byte*) myprintf::str#0 ← ++ (byte*) myprintf::str#10 + [61] if(*((byte*) myprintf::str#0)!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@1 + to:myprintf::@36 +myprintf::@36: scope:[myprintf] from myprintf::@27 + [62] *((const byte[$64]) strTemp#0 + (byte) myprintf::return#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:myprintf::@return +myprintf::@return: scope:[myprintf] from myprintf::@36 + [63] return + to:@return +myprintf::@3: scope:[myprintf] from myprintf::@31 + [64] if((byte) myprintf::b#1>=(byte) '1') goto myprintf::@37 + to:myprintf::@4 +myprintf::@4: scope:[myprintf] from myprintf::@3 myprintf::@37 + [65] if((byte) myprintf::b#1!=(byte) '-') goto myprintf::@5 + to:myprintf::@27 +myprintf::@5: scope:[myprintf] from myprintf::@4 + [66] if((byte) myprintf::b#1==(byte) 'c') goto myprintf::@6 + to:myprintf::@24 +myprintf::@24: scope:[myprintf] from myprintf::@5 + [67] if((byte) myprintf::b#1==(byte) 'd') goto myprintf::@7 + to:myprintf::@25 +myprintf::@25: scope:[myprintf] from myprintf::@24 + [68] if((byte) myprintf::b#1==(byte) 'x') goto myprintf::@26 + to:myprintf::@38 +myprintf::@38: scope:[myprintf] from myprintf::@25 + [69] if((byte) myprintf::b#1==(byte) 'X') goto myprintf::@26 + to:myprintf::@22 +myprintf::@22: scope:[myprintf] from myprintf::@11 myprintf::@20 myprintf::@21 myprintf::@38 myprintf::@40 myprintf::@6 + [70] (byte) myprintf::bDigits#25 ← phi( myprintf::@11/(byte) myprintf::bDigits#14 myprintf::@20/(byte) myprintf::bDigits#16 myprintf::@21/(byte) myprintf::bDigits#3 myprintf::@6/(byte) myprintf::bDigits#14 myprintf::@38/(byte) myprintf::bDigits#14 myprintf::@40/(byte) myprintf::bDigits#16 ) + [70] (byte) myprintf::bLen#28 ← phi( myprintf::@11/(byte) myprintf::bLen#3 myprintf::@20/(byte) myprintf::bLen#24 myprintf::@21/(byte) myprintf::bLen#6 myprintf::@6/(byte) myprintf::bLen#1 myprintf::@38/(byte) myprintf::bLen#14 myprintf::@40/(byte) myprintf::bLen#24 ) + to:myprintf::@27 +myprintf::@26: scope:[myprintf] from myprintf::@25 myprintf::@38 + [71] (word~) myprintf::$17 ← (word) myprintf::w#10 >> (byte/signed byte/word/signed word/dword/signed dword) 4 + [72] (byte) myprintf::b#15 ← (word~) myprintf::$17 & (byte/signed byte/word/signed word/dword/signed dword) $f + [73] if((byte) myprintf::b#15<(byte/signed byte/word/signed word/dword/signed dword) $a) goto myprintf::@9 + to:myprintf::@8 +myprintf::@8: scope:[myprintf] from myprintf::@26 + [74] phi() + to:myprintf::@9 +myprintf::@9: scope:[myprintf] from myprintf::@26 myprintf::@8 + [75] (byte~) myprintf::$22 ← phi( myprintf::@26/(byte) '0' myprintf::@8/(byte/signed byte/word/signed word/dword/signed dword) $57 ) + [76] (byte~) myprintf::$23 ← (byte~) myprintf::$22 + (byte) myprintf::b#15 + [77] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$23 + [78] (byte) myprintf::bLen#10 ← ++ (byte) myprintf::bLen#14 + [79] (byte) myprintf::b#16 ← (word) myprintf::w#10 & (byte/signed byte/word/signed word/dword/signed dword) $f + [80] if((byte) myprintf::b#16<(byte/signed byte/word/signed word/dword/signed dword) $a) goto myprintf::@11 + to:myprintf::@10 +myprintf::@10: scope:[myprintf] from myprintf::@9 + [81] phi() + to:myprintf::@11 +myprintf::@11: scope:[myprintf] from myprintf::@10 myprintf::@9 + [82] (byte~) myprintf::$28 ← phi( myprintf::@9/(byte) '0' myprintf::@10/(byte/signed byte/word/signed word/dword/signed dword) $57 ) + [83] (byte~) myprintf::$29 ← (byte~) myprintf::$28 + (byte) myprintf::b#16 + [84] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#10) ← (byte~) myprintf::$29 + [85] (byte) myprintf::bLen#3 ← ++ (byte) myprintf::bLen#10 + to:myprintf::@22 +myprintf::@7: scope:[myprintf] from myprintf::@24 + [86] (word) utoa::value#4 ← (word) myprintf::w#10 + [87] call utoa + to:myprintf::@12 +myprintf::@12: scope:[myprintf] from myprintf::@13 myprintf::@7 + [88] (byte) myprintf::b#17 ← phi( myprintf::@13/(byte) myprintf::b#5 myprintf::@7/(byte/signed byte/word/signed word/dword/signed dword) 1 ) + [89] if(*((const byte[6]) myprintf::buf6#0 + (byte) myprintf::b#17)!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@13 + to:myprintf::@14 +myprintf::@14: scope:[myprintf] from myprintf::@12 + [90] if((byte) myprintf::bTrailing#10==(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@39 + to:myprintf::@15 +myprintf::@15: scope:[myprintf] from myprintf::@14 myprintf::@18 myprintf::@39 + [91] (byte) myprintf::bDigits#16 ← phi( myprintf::@14/(byte) myprintf::bDigits#14 myprintf::@18/(byte) myprintf::bDigits#2 ) + [91] (byte) myprintf::bLen#23 ← phi( myprintf::@14/(byte) myprintf::bLen#14 myprintf::@18/(byte) myprintf::bLen#4 ) + to:myprintf::@19 +myprintf::@19: scope:[myprintf] from myprintf::@15 myprintf::@19 + [92] (byte) myprintf::bLen#12 ← phi( myprintf::@15/(byte) myprintf::bLen#23 myprintf::@19/(byte) myprintf::bLen#24 ) + [92] (byte) myprintf::digit#3 ← phi( myprintf::@15/(byte/signed byte/word/signed word/dword/signed dword) 0 myprintf::@19/(byte) myprintf::digit#2 ) + [93] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#12) ← *((const byte[6]) myprintf::buf6#0 + (byte) myprintf::digit#3) + [94] (byte) myprintf::bLen#24 ← ++ (byte) myprintf::bLen#12 + [95] (byte) myprintf::digit#2 ← ++ (byte) myprintf::digit#3 + [96] if((byte) myprintf::digit#2<(byte) myprintf::b#17) goto myprintf::@19 + to:myprintf::@20 +myprintf::@20: scope:[myprintf] from myprintf::@19 + [97] if((byte) myprintf::bTrailing#10!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@40 + to:myprintf::@22 +myprintf::@40: scope:[myprintf] from myprintf::@20 + [98] if((byte) myprintf::bDigits#16>(byte) myprintf::b#17) goto myprintf::@21 + to:myprintf::@22 +myprintf::@21: scope:[myprintf] from myprintf::@21 myprintf::@40 + [99] (byte) myprintf::bDigits#8 ← phi( myprintf::@40/(byte) myprintf::bDigits#16 myprintf::@21/(byte) myprintf::bDigits#3 ) + [99] (byte) myprintf::bLen#13 ← phi( myprintf::@40/(byte) myprintf::bLen#24 myprintf::@21/(byte) myprintf::bLen#6 ) + [100] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#13) ← (byte) ' ' + [101] (byte) myprintf::bLen#6 ← ++ (byte) myprintf::bLen#13 + [102] (byte) myprintf::bDigits#3 ← -- (byte) myprintf::bDigits#8 + [103] if((byte) myprintf::bDigits#3>(byte) myprintf::b#17) goto myprintf::@21 + to:myprintf::@22 +myprintf::@39: scope:[myprintf] from myprintf::@14 + [104] if((byte) myprintf::bDigits#14>(byte) myprintf::b#17) goto myprintf::@16 + to:myprintf::@15 +myprintf::@16: scope:[myprintf] from myprintf::@18 myprintf::@39 + [105] (byte) myprintf::bDigits#10 ← phi( myprintf::@39/(byte) myprintf::bDigits#14 myprintf::@18/(byte) myprintf::bDigits#2 ) + [105] (byte) myprintf::bLen#11 ← phi( myprintf::@39/(byte) myprintf::bLen#14 myprintf::@18/(byte) myprintf::bLen#4 ) + [106] if((byte) myprintf::bLeadZero#10==(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@18 + to:myprintf::@17 +myprintf::@17: scope:[myprintf] from myprintf::@16 + [107] phi() + to:myprintf::@18 +myprintf::@18: scope:[myprintf] from myprintf::@16 myprintf::@17 + [108] (byte~) myprintf::$39 ← phi( myprintf::@16/(byte) ' ' myprintf::@17/(byte) '0' ) + [109] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#11) ← (byte~) myprintf::$39 + [110] (byte) myprintf::bLen#4 ← ++ (byte) myprintf::bLen#11 + [111] (byte) myprintf::bDigits#2 ← -- (byte) myprintf::bDigits#10 + [112] if((byte) myprintf::bDigits#2>(byte) myprintf::b#17) goto myprintf::@16 + to:myprintf::@15 +myprintf::@13: scope:[myprintf] from myprintf::@12 + [113] (byte) myprintf::b#5 ← ++ (byte) myprintf::b#17 + to:myprintf::@12 +myprintf::@6: scope:[myprintf] from myprintf::@5 + [114] (byte~) myprintf::$47 ← ((byte)) (word) myprintf::w#10 + [115] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$47 + [116] (byte) myprintf::bLen#1 ← ++ (byte) myprintf::bLen#14 + to:myprintf::@22 +myprintf::@37: scope:[myprintf] from myprintf::@3 + [117] if((byte) myprintf::b#1<=(byte) '9') goto myprintf::@23 + to:myprintf::@4 +myprintf::@23: scope:[myprintf] from myprintf::@37 + [118] (byte) myprintf::bDigits#1 ← (byte) myprintf::b#1 - (byte) '0' + to:myprintf::@27 +myprintf::@2: scope:[myprintf] from myprintf::@1 + [119] if((byte) myprintf::b#1!=(byte) '%') goto myprintf::@28 + to:myprintf::@32 +myprintf::@32: scope:[myprintf] from myprintf::@2 + [120] if((byte) myprintf::bArg#12==(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@42 + to:myprintf::@33 +myprintf::@33: scope:[myprintf] from myprintf::@32 + [121] if((byte) myprintf::bArg#12==(byte/signed byte/word/signed word/dword/signed dword) 1) goto myprintf::@43 + to:myprintf::@34 +myprintf::@34: scope:[myprintf] from myprintf::@33 + [122] (word~) myprintf::w#53 ← (word) myprintf::w3#7 + to:myprintf::@29 +myprintf::@29: scope:[myprintf] from myprintf::@34 myprintf::@42 myprintf::@43 + [123] (word) myprintf::w#21 ← phi( myprintf::@42/(word~) myprintf::w#51 myprintf::@43/(word~) myprintf::w#52 myprintf::@34/(word~) myprintf::w#53 ) + [124] (byte) myprintf::bArg#1 ← ++ (byte) myprintf::bArg#12 + to:myprintf::@27 +myprintf::@43: scope:[myprintf] from myprintf::@33 + [125] (word~) myprintf::w#52 ← (word) myprintf::w2#7 + to:myprintf::@29 +myprintf::@42: scope:[myprintf] from myprintf::@32 + [126] (word~) myprintf::w#51 ← (word) myprintf::w1#6 + to:myprintf::@29 +myprintf::@28: scope:[myprintf] from myprintf::@2 + [127] if((byte) myprintf::b#1>=(byte/signed byte/word/signed word/dword/signed dword) $41) goto myprintf::@41 + to:myprintf::@30 +myprintf::@30: scope:[myprintf] from myprintf::@28 myprintf::@35 myprintf::@41 + [128] (byte) myprintf::b#25 ← phi( myprintf::@28/(byte) myprintf::b#1 myprintf::@35/(byte) myprintf::b#6 ) + [129] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte) myprintf::b#25 + [130] (byte) myprintf::bLen#7 ← ++ (byte) myprintf::bLen#14 + to:myprintf::@27 +myprintf::@41: scope:[myprintf] from myprintf::@28 + [131] if((byte) myprintf::b#1<(byte/signed byte/word/signed word/dword/signed dword) $5a+(byte/signed byte/word/signed word/dword/signed dword) 1) goto myprintf::@35 + to:myprintf::@30 +myprintf::@35: scope:[myprintf] from myprintf::@41 + [132] (byte) myprintf::b#6 ← (byte) myprintf::b#1 + (byte/signed byte/word/signed word/dword/signed dword) $20 + to:myprintf::@30 +utoa: scope:[utoa] from myprintf::@7 + [133] phi() + to:utoa::@13 +utoa::@13: scope:[utoa] from utoa + [134] if((word) utoa::value#4>=(word/signed word/dword/signed dword) $2710) goto utoa::@5 + to:utoa::@1 +utoa::@1: scope:[utoa] from utoa::@13 utoa::@9 + [135] (byte*) utoa::dst#16 ← phi( utoa::@13/(const byte[6]) myprintf::buf6#0 utoa::@9/++(const byte[6]) myprintf::buf6#0 ) + [135] (word) utoa::value#6 ← phi( utoa::@13/(word) utoa::value#4 utoa::@9/(word) utoa::value#0 ) + [135] (byte) utoa::bStarted#5 ← phi( utoa::@13/(byte/signed byte/word/signed word/dword/signed dword) 0 utoa::@9/(byte/signed byte/word/signed word/dword/signed dword) 1 ) + [136] if((byte) utoa::bStarted#5==(byte/signed byte/word/signed word/dword/signed dword) 1) goto utoa::@6 + to:utoa::@14 +utoa::@14: scope:[utoa] from utoa::@1 + [137] if((word) utoa::value#6>=(word/signed word/dword/signed dword) $3e8) goto utoa::@6 + to:utoa::@2 +utoa::@2: scope:[utoa] from utoa::@10 utoa::@14 + [138] (byte*) utoa::dst#10 ← phi( utoa::@14/(byte*) utoa::dst#16 utoa::@10/(byte*) utoa::dst#1 ) + [138] (word) utoa::value#11 ← phi( utoa::@14/(word) utoa::value#6 utoa::@10/(word) utoa::value#1 ) + [138] (byte) utoa::bStarted#6 ← phi( utoa::@14/(byte) utoa::bStarted#5 utoa::@10/(byte/signed byte/word/signed word/dword/signed dword) 1 ) + [139] if((byte) utoa::bStarted#6==(byte/signed byte/word/signed word/dword/signed dword) 1) goto utoa::@7 + to:utoa::@15 +utoa::@15: scope:[utoa] from utoa::@2 + [140] if((word) utoa::value#11>=(byte/signed byte/word/signed word/dword/signed dword) $64) goto utoa::@7 + to:utoa::@3 +utoa::@3: scope:[utoa] from utoa::@11 utoa::@15 + [141] (byte*) utoa::dst#13 ← phi( utoa::@11/(byte*) utoa::dst#2 utoa::@15/(byte*) utoa::dst#10 ) + [141] (word) utoa::value#10 ← phi( utoa::@11/(word) utoa::value#2 utoa::@15/(word) utoa::value#11 ) + [141] (byte) utoa::bStarted#7 ← phi( utoa::@11/(byte/signed byte/word/signed word/dword/signed dword) 1 utoa::@15/(byte) utoa::bStarted#6 ) + [142] if((byte) utoa::bStarted#7==(byte/signed byte/word/signed word/dword/signed dword) 1) goto utoa::@8 + to:utoa::@16 +utoa::@16: scope:[utoa] from utoa::@3 + [143] if((word) utoa::value#10>=(byte/signed byte/word/signed word/dword/signed dword) $a) goto utoa::@8 + to:utoa::@4 +utoa::@4: scope:[utoa] from utoa::@12 utoa::@16 + [144] (byte*) utoa::dst#12 ← phi( utoa::@12/(byte*) utoa::dst#4 utoa::@16/(byte*) utoa::dst#13 ) + [144] (word) utoa::value#12 ← phi( utoa::@12/(word) utoa::value#3 utoa::@16/(word) utoa::value#10 ) + [145] (byte~) utoa::$16 ← ((byte)) (word) utoa::value#12 + [146] (byte~) utoa::$17 ← (byte) '0' + (byte~) utoa::$16 + [147] *((byte*) utoa::dst#12) ← (byte~) utoa::$17 + [148] (byte*) utoa::dst#3 ← ++ (byte*) utoa::dst#12 + [149] *((byte*) utoa::dst#3) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:utoa::@return +utoa::@return: scope:[utoa] from utoa::@4 + [150] return + to:@return +utoa::@8: scope:[utoa] from utoa::@16 utoa::@3 + [151] (byte*) append::dst#3 ← (byte*) utoa::dst#13 + [152] (word) append::value#4 ← (word) utoa::value#10 + [153] call append + [154] (word) append::return#10 ← (word) append::value#5 + to:utoa::@12 +utoa::@12: scope:[utoa] from utoa::@8 + [155] (word) utoa::value#3 ← (word) append::return#10 + [156] (byte*) utoa::dst#4 ← ++ (byte*) utoa::dst#13 + to:utoa::@4 +utoa::@7: scope:[utoa] from utoa::@15 utoa::@2 + [157] (byte*) append::dst#2 ← (byte*) utoa::dst#10 + [158] (word) append::value#3 ← (word) utoa::value#11 + [159] call append + [160] (word) append::return#4 ← (word) append::value#5 + to:utoa::@11 +utoa::@11: scope:[utoa] from utoa::@7 + [161] (word) utoa::value#2 ← (word) append::return#4 + [162] (byte*) utoa::dst#2 ← ++ (byte*) utoa::dst#10 + to:utoa::@3 +utoa::@6: scope:[utoa] from utoa::@1 utoa::@14 + [163] (byte*) append::dst#1 ← (byte*) utoa::dst#16 + [164] (word) append::value#2 ← (word) utoa::value#6 + [165] call append + [166] (word) append::return#3 ← (word) append::value#5 + to:utoa::@10 +utoa::@10: scope:[utoa] from utoa::@6 + [167] (word) utoa::value#1 ← (word) append::return#3 + [168] (byte*) utoa::dst#1 ← ++ (byte*) utoa::dst#16 + to:utoa::@2 +utoa::@5: scope:[utoa] from utoa::@13 + [169] (word) append::value#1 ← (word) utoa::value#4 + [170] call append + [171] (word) append::return#2 ← (word) append::value#5 + to:utoa::@9 +utoa::@9: scope:[utoa] from utoa::@5 + [172] (word) utoa::value#0 ← (word) append::return#2 + to:utoa::@1 +append: scope:[append] from utoa::@5 utoa::@6 utoa::@7 utoa::@8 + [173] (word) append::sub#6 ← phi( utoa::@5/(word/signed word/dword/signed dword) $2710 utoa::@6/(word/signed word/dword/signed dword) $3e8 utoa::@7/(byte/signed byte/word/signed word/dword/signed dword) $64 utoa::@8/(byte/signed byte/word/signed word/dword/signed dword) $a ) + [173] (word) append::value#8 ← phi( utoa::@5/(word) append::value#1 utoa::@6/(word) append::value#2 utoa::@7/(word) append::value#3 utoa::@8/(word) append::value#4 ) + [173] (byte*) append::dst#4 ← phi( utoa::@5/(const byte[6]) myprintf::buf6#0 utoa::@6/(byte*) append::dst#1 utoa::@7/(byte*) append::dst#2 utoa::@8/(byte*) append::dst#3 ) + [174] *((byte*) append::dst#4) ← (byte) '0' + to:append::@1 +append::@1: scope:[append] from append append::@2 + [175] (word) append::value#5 ← phi( append/(word) append::value#8 append::@2/(word) append::value#0 ) + [176] if((word) append::value#5>=(word) append::sub#6) goto append::@2 + to:append::@return +append::@return: scope:[append] from append::@1 + [177] return + to:@return +append::@2: scope:[append] from append::@1 + [178] *((byte*) append::dst#4) ← ++ *((byte*) append::dst#4) + [179] (word) append::value#0 ← (word) append::value#5 - (word) append::sub#6 + to:append::@1 +div10: scope:[div10] from main::@6 + [180] (word~) div10::$0 ← (word) div10::val#4 >> (byte/signed byte/word/signed word/dword/signed dword) 1 + [181] (word) div10::val#0 ← (word~) div10::$0 + (byte/signed byte/word/signed word/dword/signed dword) 1 + [182] (word~) div10::$2 ← (word) div10::val#0 << (byte/signed byte/word/signed word/dword/signed dword) 1 + [183] (word) div10::val#1 ← (word) div10::val#0 + (word~) div10::$2 + [184] (word~) div10::$3 ← (word) div10::val#1 >> (byte/signed byte/word/signed word/dword/signed dword) 4 + [185] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 + [186] (word~) div10::$4 ← (word) div10::val#2 >> (byte/signed byte/word/signed word/dword/signed dword) 4 + [187] (word~) div10::$5 ← (word~) div10::$4 >> (byte/signed byte/word/signed word/dword/signed dword) 4 + [188] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$5 + [189] (word) div10::return#0 ← (word) div10::val#3 >> (byte/signed byte/word/signed word/dword/signed dword) 4 + to:div10::@return +div10::@return: scope:[div10] from div10 + [190] return + to:@return +div16u: scope:[div16u] from main::@2 + [191] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 + [192] call divr16u + [193] (word) divr16u::return#2 ← (word) divr16u::return#0 + to:div16u::@1 +div16u::@1: scope:[div16u] from div16u + [194] (word) div16u::return#0 ← (word) divr16u::return#2 + to:div16u::@return +div16u::@return: scope:[div16u] from div16u::@1 + [195] return + to:@return +divr16u: scope:[divr16u] from div16u + [196] phi() + to:divr16u::@1 +divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 + [197] (byte) divr16u::i#2 ← phi( divr16u/(byte/signed byte/word/signed word/dword/signed dword) 0 divr16u::@3/(byte) divr16u::i#1 ) + [197] (word) divr16u::quotient#3 ← phi( divr16u/(byte/signed byte/word/signed word/dword/signed dword) 0 divr16u::@3/(word) divr16u::return#0 ) + [197] (word) divr16u::dividend#2 ← phi( divr16u/(word) divr16u::dividend#1 divr16u::@3/(word) divr16u::dividend#0 ) + [197] (word) divr16u::rem#4 ← phi( divr16u/(byte/signed byte/word/signed word/dword/signed dword) 0 divr16u::@3/(word) divr16u::rem#9 ) + [198] (word) divr16u::rem#0 ← (word) divr16u::rem#4 << (byte/signed byte/word/signed word/dword/signed dword) 1 + [199] (byte~) divr16u::$1 ← > (word) divr16u::dividend#2 + [200] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte/word/signed word/dword/signed dword) $80 + [201] if((byte~) divr16u::$2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16u::@2 + to:divr16u::@4 +divr16u::@4: scope:[divr16u] from divr16u::@1 + [202] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte/signed byte/word/signed word/dword/signed dword) 1 + to:divr16u::@2 +divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 + [203] (word) divr16u::rem#5 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [204] (word) divr16u::dividend#0 ← (word) divr16u::dividend#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 + [205] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte/signed byte/word/signed word/dword/signed dword) 1 + [206] if((word) divr16u::rem#5<(const word) div16u::divisor#0) goto divr16u::@3 + to:divr16u::@5 +divr16u::@5: scope:[divr16u] from divr16u::@2 + [207] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [208] (word) divr16u::rem#2 ← (word) divr16u::rem#5 - (const word) div16u::divisor#0 + to:divr16u::@3 +divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 + [209] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [209] (word) divr16u::rem#9 ← phi( divr16u::@2/(word) divr16u::rem#5 divr16u::@5/(word) divr16u::rem#2 ) + [210] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [211] if((byte) divr16u::i#1!=(byte/signed byte/word/signed word/dword/signed dword) $10) goto divr16u::@1 + to:divr16u::@return +divr16u::@return: scope:[divr16u] from divr16u::@3 + [212] return + to:@return + + +VARIABLE REGISTER WEIGHTS +(void()) Print() +(byte*) TIMEHI +(byte*) TIMELO +(byte*) VICBANK +(word()) append((byte*) append::dst , (word) append::value , (word) append::sub) +(byte*) append::dst +(byte*) append::dst#1 2.0 +(byte*) append::dst#2 2.0 +(byte*) append::dst#3 2.0 +(byte*) append::dst#4 335.0 +(word) append::return +(word) append::return#10 4.0 +(word) append::return#2 4.0 +(word) append::return#3 4.0 +(word) append::return#4 4.0 +(word) append::sub +(word) append::sub#6 333.6666666666667 +(word) append::value +(word) append::value#0 2002.0 +(word) append::value#1 4.0 +(word) append::value#2 4.0 +(word) append::value#3 4.0 +(word) append::value#4 4.0 +(word) append::value#5 376.625 +(word) append::value#8 5.0 +(word()) div10((word) div10::val) +(word~) div10::$0 4.0 +(word~) div10::$2 4.0 +(word~) div10::$3 4.0 +(word~) div10::$4 4.0 +(word~) div10::$5 4.0 +(word) div10::return +(word) div10::return#0 34.33333333333333 +(word) div10::return#2 202.0 +(word) div10::val +(word) div10::val#0 3.0 +(word) div10::val#1 3.0 +(word) div10::val#2 2.0 +(word) div10::val#3 4.0 +(word) div10::val#4 103.0 +(word()) div16u((word) div16u::dividend , (word) div16u::divisor) +(word) div16u::dividend +(word) div16u::dividend#0 103.0 +(word) div16u::divisor +(word) div16u::return +(word) div16u::return#0 34.33333333333333 +(word) div16u::return#2 202.0 +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) +(byte~) divr16u::$1 2002.0 +(byte~) divr16u::$2 2002.0 +(word) divr16u::dividend +(word) divr16u::dividend#0 250.25 +(word) divr16u::dividend#1 2.0 +(word) divr16u::dividend#2 429.2857142857143 +(word) divr16u::divisor +(byte) divr16u::i +(byte) divr16u::i#1 1501.5 +(byte) divr16u::i#2 154.0 +(word) divr16u::quotient +(word) divr16u::quotient#1 1501.5 +(word) divr16u::quotient#2 1001.0 +(word) divr16u::quotient#3 250.25 +(word) divr16u::rem +(word) divr16u::rem#0 750.75 +(word) divr16u::rem#1 2002.0 +(word) divr16u::rem#2 2002.0 +(word) divr16u::rem#4 2002.0 +(word) divr16u::rem#5 1001.0 +(word) divr16u::rem#9 1001.0 +(word) divr16u::return +(word) divr16u::return#0 601.0 +(word) divr16u::return#2 4.0 +(signed word()) main() +(word~) main::$11 22.0 +(word~) main::$12 11.0 +(word~) main::$13 22.0 +(word~) main::$2 22.0 +(word~) main::$3 11.0 +(word~) main::$4 22.0 +(signed word) main::return +(word) main::u +(word) main::u#11 7.05263157894737 +(word) main::u#15 7.05263157894737 +(word) main::u#2 7.333333333333333 +(word) main::u#4 7.333333333333333 +(word) main::v +(word) main::v#1 14.0 +(word) main::v#2 14.0 +(byte()) myprintf((byte*) myprintf::dst , (byte*) myprintf::str , (word) myprintf::w1 , (word) myprintf::w2 , (word) myprintf::w3) +(word~) myprintf::$17 202.0 +(byte~) myprintf::$22 101.0 +(byte~) myprintf::$23 202.0 +(byte~) myprintf::$28 101.0 +(byte~) myprintf::$29 202.0 +(byte~) myprintf::$39 1001.0 +(byte~) myprintf::$47 202.0 +(byte) myprintf::b +(byte) myprintf::b#1 126.25000000000003 +(byte) myprintf::b#15 75.75 +(byte) myprintf::b#16 75.75 +(byte) myprintf::b#17 248.32 +(byte) myprintf::b#25 303.0 +(byte) myprintf::b#5 2002.0 +(byte) myprintf::b#6 202.0 +(byte) myprintf::bArg +(byte) myprintf::bArg#1 202.0 +(byte) myprintf::bArg#10 235.66666666666663 +(byte) myprintf::bArg#12 12.625 +(byte) myprintf::bDigits +(byte) myprintf::bDigits#1 202.0 +(byte) myprintf::bDigits#10 350.5 +(byte) myprintf::bDigits#14 23.488372093023255 +(byte) myprintf::bDigits#16 188.25 +(byte) myprintf::bDigits#2 2002.0 +(byte) myprintf::bDigits#24 201.99999999999997 +(byte) myprintf::bDigits#25 1607.0 +(byte) myprintf::bDigits#3 2002.0 +(byte) myprintf::bDigits#8 701.0 +(byte) myprintf::bFormat +(byte) myprintf::bFormat#10 40.4 +(byte) myprintf::bFormat#4 168.33333333333331 +(byte) myprintf::bLeadZero +(byte) myprintf::bLeadZero#10 22.818181818181817 +(byte) myprintf::bLeadZero#18 168.33333333333331 +(byte) myprintf::bLen +(byte) myprintf::bLen#1 202.0 +(byte) myprintf::bLen#10 43.285714285714285 +(byte) myprintf::bLen#11 620.8 +(byte) myprintf::bLen#12 1552.0 +(byte) myprintf::bLen#13 1552.0 +(byte) myprintf::bLen#14 34.487804878048784 +(byte) myprintf::bLen#23 1203.0 +(byte) myprintf::bLen#24 460.99999999999994 +(byte) myprintf::bLen#28 1607.0 +(byte) myprintf::bLen#3 202.0 +(byte) myprintf::bLen#4 1001.0 +(byte) myprintf::bLen#6 1001.0 +(byte) myprintf::bLen#7 202.0 +(byte) myprintf::bTrailing +(byte) myprintf::bTrailing#10 10.712121212121211 +(byte) myprintf::bTrailing#21 168.33333333333331 +(byte[6]) myprintf::buf6 +(byte) myprintf::digit +(byte) myprintf::digit#2 1501.5 +(byte) myprintf::digit#3 1001.0 +(byte*) myprintf::dst +(byte) myprintf::return +(byte) myprintf::return#0 236.3333333333333 +(byte*) myprintf::str +(byte*) myprintf::str#0 151.5 +(byte*) myprintf::str#10 4.121621621621622 +(byte*) myprintf::str#5 2.0 +(word) myprintf::w +(word) myprintf::w#10 15.303030303030305 +(word) myprintf::w#17 235.66666666666663 +(word) myprintf::w#21 202.0 +(word~) myprintf::w#51 202.0 +(word~) myprintf::w#52 202.0 +(word~) myprintf::w#53 202.0 +(word) myprintf::w1 +(word) myprintf::w1#0 11.0 +(word) myprintf::w1#1 11.0 +(word) myprintf::w1#6 1.5974025974025974 +(word) myprintf::w2 +(word) myprintf::w2#0 22.0 +(word) myprintf::w2#1 22.0 +(word) myprintf::w2#7 1.5974025974025974 +(word) myprintf::w3 +(word) myprintf::w3#0 7.333333333333333 +(word) myprintf::w3#1 7.333333333333333 +(word) myprintf::w3#7 1.5974025974025974 +(byte[$64]) strTemp +(void()) utoa((word) utoa::value , (byte*) utoa::dst) +(byte~) utoa::$16 4.0 +(byte~) utoa::$17 4.0 +(byte) utoa::bStarted +(byte) utoa::bStarted#5 1.3333333333333333 +(byte) utoa::bStarted#6 2.0 +(byte) utoa::bStarted#7 4.0 +(byte*) utoa::dst +(byte*) utoa::dst#1 4.0 +(byte*) utoa::dst#10 1.25 +(byte*) utoa::dst#12 2.0 +(byte*) utoa::dst#13 1.25 +(byte*) utoa::dst#16 0.75 +(byte*) utoa::dst#2 4.0 +(byte*) utoa::dst#3 4.0 +(byte*) utoa::dst#4 4.0 +(word) utoa::value +(word) utoa::value#0 4.0 +(word) utoa::value#1 2.0 +(word) utoa::value#10 2.5 +(word) utoa::value#11 2.5 +(word) utoa::value#12 6.0 +(word) utoa::value#2 2.0 +(word) utoa::value#3 2.0 +(word) utoa::value#4 35.66666666666666 +(word) utoa::value#6 2.5 +(byte*) zp1 +(byte*) zp2 + +Initial phi equivalence classes +[ main::u#11 main::u#2 ] +[ main::u#15 main::u#4 ] +[ myprintf::w1#6 myprintf::w1#0 myprintf::w1#1 ] +[ myprintf::w2#7 myprintf::w2#0 myprintf::w2#1 ] +[ myprintf::w3#7 myprintf::w3#0 myprintf::w3#1 ] +[ myprintf::str#10 myprintf::str#5 myprintf::str#0 ] +[ myprintf::bFormat#10 myprintf::bFormat#4 ] +[ myprintf::bArg#12 myprintf::bArg#10 myprintf::bArg#1 ] +[ myprintf::w#10 myprintf::w#17 myprintf::w#21 myprintf::w#51 myprintf::w#52 myprintf::w#53 ] +[ myprintf::bTrailing#10 myprintf::bTrailing#21 ] +[ myprintf::bLeadZero#10 myprintf::bLeadZero#18 ] +[ myprintf::$22 ] +[ myprintf::$28 ] +[ myprintf::b#17 myprintf::b#5 ] +[ myprintf::digit#3 myprintf::digit#2 ] +[ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#14 myprintf::return#0 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] +[ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#14 myprintf::bDigits#24 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] +[ myprintf::$39 ] +[ myprintf::b#25 myprintf::b#1 myprintf::b#6 ] +[ utoa::bStarted#7 utoa::bStarted#6 utoa::bStarted#5 ] +[ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 ] +[ utoa::dst#12 utoa::dst#4 utoa::dst#13 utoa::dst#2 utoa::dst#10 utoa::dst#16 utoa::dst#1 ] +[ append::dst#4 append::dst#1 append::dst#2 append::dst#3 ] +[ append::sub#6 ] +[ append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 ] +[ divr16u::rem#4 divr16u::rem#9 divr16u::rem#5 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] +[ divr16u::dividend#2 divr16u::dividend#1 divr16u::dividend#0 ] +[ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] +[ divr16u::i#2 divr16u::i#1 ] +Added variable div16u::dividend#0 to zero page equivalence class [ div16u::dividend#0 ] +Added variable div16u::return#2 to zero page equivalence class [ div16u::return#2 ] +Added variable main::v#1 to zero page equivalence class [ main::v#1 ] +Added variable main::$2 to zero page equivalence class [ main::$2 ] +Added variable main::$3 to zero page equivalence class [ main::$3 ] +Added variable main::$4 to zero page equivalence class [ main::$4 ] +Added variable div10::val#4 to zero page equivalence class [ div10::val#4 ] +Added variable div10::return#2 to zero page equivalence class [ div10::return#2 ] +Added variable main::v#2 to zero page equivalence class [ main::v#2 ] +Added variable main::$11 to zero page equivalence class [ main::$11 ] +Added variable main::$12 to zero page equivalence class [ main::$12 ] +Added variable main::$13 to zero page equivalence class [ main::$13 ] +Added variable myprintf::$17 to zero page equivalence class [ myprintf::$17 ] +Added variable myprintf::b#15 to zero page equivalence class [ myprintf::b#15 ] +Added variable myprintf::$23 to zero page equivalence class [ myprintf::$23 ] +Added variable myprintf::bLen#10 to zero page equivalence class [ myprintf::bLen#10 ] +Added variable myprintf::b#16 to zero page equivalence class [ myprintf::b#16 ] +Added variable myprintf::$29 to zero page equivalence class [ myprintf::$29 ] +Added variable myprintf::$47 to zero page equivalence class [ myprintf::$47 ] +Added variable utoa::$16 to zero page equivalence class [ utoa::$16 ] +Added variable utoa::$17 to zero page equivalence class [ utoa::$17 ] +Added variable utoa::dst#3 to zero page equivalence class [ utoa::dst#3 ] +Added variable append::return#10 to zero page equivalence class [ append::return#10 ] +Added variable append::return#4 to zero page equivalence class [ append::return#4 ] +Added variable append::return#3 to zero page equivalence class [ append::return#3 ] +Added variable append::return#2 to zero page equivalence class [ append::return#2 ] +Added variable div10::$0 to zero page equivalence class [ div10::$0 ] +Added variable div10::val#0 to zero page equivalence class [ div10::val#0 ] +Added variable div10::$2 to zero page equivalence class [ div10::$2 ] +Added variable div10::val#1 to zero page equivalence class [ div10::val#1 ] +Added variable div10::$3 to zero page equivalence class [ div10::$3 ] +Added variable div10::val#2 to zero page equivalence class [ div10::val#2 ] +Added variable div10::$4 to zero page equivalence class [ div10::$4 ] +Added variable div10::$5 to zero page equivalence class [ div10::$5 ] +Added variable div10::val#3 to zero page equivalence class [ div10::val#3 ] +Added variable div10::return#0 to zero page equivalence class [ div10::return#0 ] +Added variable divr16u::return#2 to zero page equivalence class [ divr16u::return#2 ] +Added variable div16u::return#0 to zero page equivalence class [ div16u::return#0 ] +Added variable divr16u::$1 to zero page equivalence class [ divr16u::$1 ] +Added variable divr16u::$2 to zero page equivalence class [ divr16u::$2 ] +Complete equivalence classes +[ main::u#11 main::u#2 ] +[ main::u#15 main::u#4 ] +[ myprintf::w1#6 myprintf::w1#0 myprintf::w1#1 ] +[ myprintf::w2#7 myprintf::w2#0 myprintf::w2#1 ] +[ myprintf::w3#7 myprintf::w3#0 myprintf::w3#1 ] +[ myprintf::str#10 myprintf::str#5 myprintf::str#0 ] +[ myprintf::bFormat#10 myprintf::bFormat#4 ] +[ myprintf::bArg#12 myprintf::bArg#10 myprintf::bArg#1 ] +[ myprintf::w#10 myprintf::w#17 myprintf::w#21 myprintf::w#51 myprintf::w#52 myprintf::w#53 ] +[ myprintf::bTrailing#10 myprintf::bTrailing#21 ] +[ myprintf::bLeadZero#10 myprintf::bLeadZero#18 ] +[ myprintf::$22 ] +[ myprintf::$28 ] +[ myprintf::b#17 myprintf::b#5 ] +[ myprintf::digit#3 myprintf::digit#2 ] +[ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#14 myprintf::return#0 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] +[ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#14 myprintf::bDigits#24 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] +[ myprintf::$39 ] +[ myprintf::b#25 myprintf::b#1 myprintf::b#6 ] +[ utoa::bStarted#7 utoa::bStarted#6 utoa::bStarted#5 ] +[ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 ] +[ utoa::dst#12 utoa::dst#4 utoa::dst#13 utoa::dst#2 utoa::dst#10 utoa::dst#16 utoa::dst#1 ] +[ append::dst#4 append::dst#1 append::dst#2 append::dst#3 ] +[ append::sub#6 ] +[ append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 ] +[ divr16u::rem#4 divr16u::rem#9 divr16u::rem#5 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] +[ divr16u::dividend#2 divr16u::dividend#1 divr16u::dividend#0 ] +[ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] +[ divr16u::i#2 divr16u::i#1 ] +[ div16u::dividend#0 ] +[ div16u::return#2 ] +[ main::v#1 ] +[ main::$2 ] +[ main::$3 ] +[ main::$4 ] +[ div10::val#4 ] +[ div10::return#2 ] +[ main::v#2 ] +[ main::$11 ] +[ main::$12 ] +[ main::$13 ] +[ myprintf::$17 ] +[ myprintf::b#15 ] +[ myprintf::$23 ] +[ myprintf::bLen#10 ] +[ myprintf::b#16 ] +[ myprintf::$29 ] +[ myprintf::$47 ] +[ utoa::$16 ] +[ utoa::$17 ] +[ utoa::dst#3 ] +[ append::return#10 ] +[ append::return#4 ] +[ append::return#3 ] +[ append::return#2 ] +[ div10::$0 ] +[ div10::val#0 ] +[ div10::$2 ] +[ div10::val#1 ] +[ div10::$3 ] +[ div10::val#2 ] +[ div10::$4 ] +[ div10::$5 ] +[ div10::val#3 ] +[ div10::return#0 ] +[ divr16u::return#2 ] +[ div16u::return#0 ] +[ divr16u::$1 ] +[ divr16u::$2 ] +Allocated zp ZP_WORD:2 [ main::u#11 main::u#2 ] +Allocated zp ZP_WORD:4 [ main::u#15 main::u#4 ] +Allocated zp ZP_WORD:6 [ myprintf::w1#6 myprintf::w1#0 myprintf::w1#1 ] +Allocated zp ZP_WORD:8 [ myprintf::w2#7 myprintf::w2#0 myprintf::w2#1 ] +Allocated zp ZP_WORD:10 [ myprintf::w3#7 myprintf::w3#0 myprintf::w3#1 ] +Allocated zp ZP_WORD:12 [ myprintf::str#10 myprintf::str#5 myprintf::str#0 ] +Allocated zp ZP_BYTE:14 [ myprintf::bFormat#10 myprintf::bFormat#4 ] +Allocated zp ZP_BYTE:15 [ myprintf::bArg#12 myprintf::bArg#10 myprintf::bArg#1 ] +Allocated zp ZP_WORD:16 [ myprintf::w#10 myprintf::w#17 myprintf::w#21 myprintf::w#51 myprintf::w#52 myprintf::w#53 ] +Allocated zp ZP_BYTE:18 [ myprintf::bTrailing#10 myprintf::bTrailing#21 ] +Allocated zp ZP_BYTE:19 [ myprintf::bLeadZero#10 myprintf::bLeadZero#18 ] +Allocated zp ZP_BYTE:20 [ myprintf::$22 ] +Allocated zp ZP_BYTE:21 [ myprintf::$28 ] +Allocated zp ZP_BYTE:22 [ myprintf::b#17 myprintf::b#5 ] +Allocated zp ZP_BYTE:23 [ myprintf::digit#3 myprintf::digit#2 ] +Allocated zp ZP_BYTE:24 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#14 myprintf::return#0 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] +Allocated zp ZP_BYTE:25 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#14 myprintf::bDigits#24 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] +Allocated zp ZP_BYTE:26 [ myprintf::$39 ] +Allocated zp ZP_BYTE:27 [ myprintf::b#25 myprintf::b#1 myprintf::b#6 ] +Allocated zp ZP_BYTE:28 [ utoa::bStarted#7 utoa::bStarted#6 utoa::bStarted#5 ] +Allocated zp ZP_WORD:29 [ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 ] +Allocated zp ZP_WORD:31 [ utoa::dst#12 utoa::dst#4 utoa::dst#13 utoa::dst#2 utoa::dst#10 utoa::dst#16 utoa::dst#1 ] +Allocated zp ZP_WORD:33 [ append::dst#4 append::dst#1 append::dst#2 append::dst#3 ] +Allocated zp ZP_WORD:35 [ append::sub#6 ] +Allocated zp ZP_WORD:37 [ append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 ] +Allocated zp ZP_WORD:39 [ divr16u::rem#4 divr16u::rem#9 divr16u::rem#5 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] +Allocated zp ZP_WORD:41 [ divr16u::dividend#2 divr16u::dividend#1 divr16u::dividend#0 ] +Allocated zp ZP_WORD:43 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] +Allocated zp ZP_BYTE:45 [ divr16u::i#2 divr16u::i#1 ] +Allocated zp ZP_WORD:46 [ div16u::dividend#0 ] +Allocated zp ZP_WORD:48 [ div16u::return#2 ] +Allocated zp ZP_WORD:50 [ main::v#1 ] +Allocated zp ZP_WORD:52 [ main::$2 ] +Allocated zp ZP_WORD:54 [ main::$3 ] +Allocated zp ZP_WORD:56 [ main::$4 ] +Allocated zp ZP_WORD:58 [ div10::val#4 ] +Allocated zp ZP_WORD:60 [ div10::return#2 ] +Allocated zp ZP_WORD:62 [ main::v#2 ] +Allocated zp ZP_WORD:64 [ main::$11 ] +Allocated zp ZP_WORD:66 [ main::$12 ] +Allocated zp ZP_WORD:68 [ main::$13 ] +Allocated zp ZP_WORD:70 [ myprintf::$17 ] +Allocated zp ZP_BYTE:72 [ myprintf::b#15 ] +Allocated zp ZP_BYTE:73 [ myprintf::$23 ] +Allocated zp ZP_BYTE:74 [ myprintf::bLen#10 ] +Allocated zp ZP_BYTE:75 [ myprintf::b#16 ] +Allocated zp ZP_BYTE:76 [ myprintf::$29 ] +Allocated zp ZP_BYTE:77 [ myprintf::$47 ] +Allocated zp ZP_BYTE:78 [ utoa::$16 ] +Allocated zp ZP_BYTE:79 [ utoa::$17 ] +Allocated zp ZP_WORD:80 [ utoa::dst#3 ] +Allocated zp ZP_WORD:82 [ append::return#10 ] +Allocated zp ZP_WORD:84 [ append::return#4 ] +Allocated zp ZP_WORD:86 [ append::return#3 ] +Allocated zp ZP_WORD:88 [ append::return#2 ] +Allocated zp ZP_WORD:90 [ div10::$0 ] +Allocated zp ZP_WORD:92 [ div10::val#0 ] +Allocated zp ZP_WORD:94 [ div10::$2 ] +Allocated zp ZP_WORD:96 [ div10::val#1 ] +Allocated zp ZP_WORD:98 [ div10::$3 ] +Allocated zp ZP_WORD:100 [ div10::val#2 ] +Allocated zp ZP_WORD:102 [ div10::$4 ] +Allocated zp ZP_WORD:104 [ div10::$5 ] +Allocated zp ZP_WORD:106 [ div10::val#3 ] +Allocated zp ZP_WORD:108 [ div10::return#0 ] +Allocated zp ZP_WORD:110 [ divr16u::return#2 ] +Allocated zp ZP_WORD:112 [ div16u::return#0 ] +Allocated zp ZP_BYTE:114 [ divr16u::$1 ] +Allocated zp ZP_BYTE:115 [ divr16u::$2 ] + +INITIAL ASM +//SEG0 File Comments +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" +//SEG2 Global Constants & labels + .label zp1 = $61 + // #define zp1 *(byte *)0x61 -- allows "zp1" vs "*zp1" below -- not supported -- + .label zp2 = $62 + .label TIMEHI = $a1 + .label TIMELO = $a2 + .label VICBANK = $d018 +//SEG3 @begin +bbegin: +//SEG4 [1] phi from @begin to @1 [phi:@begin->@1] +b1_from_bbegin: + jmp b1 +//SEG5 @1 +b1: +//SEG6 [2] call main + jsr main +//SEG7 [3] phi from @1 to @end [phi:@1->@end] +bend_from_b1: + jmp bend +//SEG8 @end +bend: +//SEG9 main +main: { + .label _2 = $34 + .label _3 = $36 + .label _4 = $38 + .label _11 = $40 + .label _12 = $42 + .label _13 = $44 + .label v = $32 + .label u = 2 + .label v_2 = $3e + .label u_4 = 4 + .label u_15 = 4 + //SEG10 [4] *((const byte*) VICBANK#0) ← (byte/signed byte/word/signed word/dword/signed dword) $17 -- _deref_pbuc1=vbuc2 + lda #$17 + sta VICBANK + //SEG11 [5] *((const byte*) zp1#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta zp1 + //SEG12 [6] phi from main to main::@1 [phi:main->main::@1] + b1_from_main: + //SEG13 [6] phi (word) main::u#11 = (word/signed word/dword/signed dword) $6e85 [phi:main->main::@1#0] -- vwuz1=vwuc1 + lda #<$6e85 + sta u + lda #>$6e85 + sta u+1 + jmp b1 + //SEG14 [6] phi from main::@10 to main::@1 [phi:main::@10->main::@1] + b1_from_b10: + //SEG15 [6] phi (word) main::u#11 = (word) main::u#2 [phi:main::@10->main::@1#0] -- register_copy + jmp b1 + //SEG16 main::@1 + b1: + //SEG17 [7] *((const byte*) TIMEHI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta TIMEHI + //SEG18 [8] *((const byte*) TIMELO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta TIMELO + //SEG19 [9] *((const byte*) zp2#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta zp2 + jmp b2 + //SEG20 main::@2 + b2: + //SEG21 [10] (word) div16u::dividend#0 ← (word) main::u#11 -- vwuz1=vwuz2 + lda u + sta div16u.dividend + lda u+1 + sta div16u.dividend+1 + //SEG22 [11] call div16u + jsr div16u + //SEG23 [12] (word) div16u::return#2 ← (word) div16u::return#0 -- vwuz1=vwuz2 + lda div16u.return + sta div16u.return_2 + lda div16u.return+1 + sta div16u.return_2+1 + jmp b8 + //SEG24 main::@8 + b8: + //SEG25 [13] (word) main::v#1 ← (word) div16u::return#2 -- vwuz1=vwuz2 + lda div16u.return_2 + sta v + lda div16u.return_2+1 + sta v+1 + //SEG26 [14] *((const byte*) zp2#0) ← ++ *((const byte*) zp2#0) -- _deref_pbuc1=_inc__deref_pbuc1 + inc zp2 + //SEG27 [15] if(*((const byte*) zp2#0)<(byte/word/signed word/dword/signed dword) $c8) goto main::@2 -- _deref_pbuc1_lt_vbuc2_then_la1 + lda zp2 + cmp #$c8 + bcc b2 + jmp b3 + //SEG28 main::@3 + b3: + //SEG29 [16] (word~) main::$2 ← ((word)) *((const byte*) TIMEHI#0) -- vwuz1=_word__deref_pbuc1 + lda TIMEHI + sta _2 + lda #0 + sta _2+1 + //SEG30 [17] (word~) main::$3 ← (word~) main::$2 << (byte/signed byte/word/signed word/dword/signed dword) 8 -- vwuz1=vwuz2_rol_vbuc1 + ldy #8 + lda _2 + sta _3 + lda _2+1 + sta _3+1 + cpy #0 + beq !e+ + !: + asl _3 + rol _3+1 + dey + bne !- + !e: + //SEG31 [18] (word~) main::$4 ← ((word)) *((const byte*) TIMELO#0) -- vwuz1=_word__deref_pbuc1 + lda TIMELO + sta _4 + lda #0 + sta _4+1 + //SEG32 [19] (word) myprintf::w3#0 ← (word~) main::$3 + (word~) main::$4 -- vwuz1=vwuz2_plus_vwuz3 + lda _3 + clc + adc _4 + sta myprintf.w3 + lda _3+1 + adc _4+1 + sta myprintf.w3+1 + //SEG33 [20] (word) myprintf::w1#0 ← (word) main::u#11 -- vwuz1=vwuz2 + lda u + sta myprintf.w1 + lda u+1 + sta myprintf.w1+1 + //SEG34 [21] (word) myprintf::w2#0 ← (word) main::v#1 -- vwuz1=vwuz2 + lda v + sta myprintf.w2 + lda v+1 + sta myprintf.w2+1 + //SEG35 [22] call myprintf + //SEG36 [54] phi from main::@3 to myprintf [phi:main::@3->myprintf] + myprintf_from_b3: + //SEG37 [54] phi (word) myprintf::w3#7 = (word) myprintf::w3#0 [phi:main::@3->myprintf#0] -- register_copy + //SEG38 [54] phi (word) myprintf::w2#7 = (word) myprintf::w2#0 [phi:main::@3->myprintf#1] -- register_copy + //SEG39 [54] phi (word) myprintf::w1#6 = (word) myprintf::w1#0 [phi:main::@3->myprintf#2] -- register_copy + //SEG40 [54] phi (byte*) myprintf::str#5 = (const string) main::str [phi:main::@3->myprintf#3] -- pbuz1=pbuc1 + lda #str + sta myprintf.str+1 + jsr myprintf + //SEG41 [23] phi from main::@3 to main::@9 [phi:main::@3->main::@9] + b9_from_b3: + jmp b9 + //SEG42 main::@9 + b9: + //SEG43 [24] call Print + jsr Print + jmp b10 + //SEG44 main::@10 + b10: + //SEG45 [25] (word) main::u#2 ← (word) main::u#11 - (word/signed word/dword/signed dword) $4d2 -- vwuz1=vwuz1_minus_vwuc1 + lda u + sec + sbc #<$4d2 + sta u + lda u+1 + sbc #>$4d2 + sta u+1 + //SEG46 [26] *((const byte*) zp1#0) ← ++ *((const byte*) zp1#0) -- _deref_pbuc1=_inc__deref_pbuc1 + inc zp1 + //SEG47 [27] if(*((const byte*) zp1#0)<(byte/signed byte/word/signed word/dword/signed dword) $a) goto main::@1 -- _deref_pbuc1_lt_vbuc2_then_la1 + lda zp1 + cmp #$a + bcc b1_from_b10 + jmp b4 + //SEG48 main::@4 + b4: + //SEG49 [28] *((const byte*) zp1#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta zp1 + //SEG50 [29] phi from main::@4 to main::@5 [phi:main::@4->main::@5] + b5_from_b4: + //SEG51 [29] phi (word) main::u#15 = (word/signed word/dword/signed dword) $6e85 [phi:main::@4->main::@5#0] -- vwuz1=vwuc1 + lda #<$6e85 + sta u_15 + lda #>$6e85 + sta u_15+1 + jmp b5 + //SEG52 [29] phi from main::@13 to main::@5 [phi:main::@13->main::@5] + b5_from_b13: + //SEG53 [29] phi (word) main::u#15 = (word) main::u#4 [phi:main::@13->main::@5#0] -- register_copy + jmp b5 + //SEG54 main::@5 + b5: + //SEG55 [30] *((const byte*) TIMEHI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta TIMEHI + //SEG56 [31] *((const byte*) TIMELO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta TIMELO + //SEG57 [32] *((const byte*) zp2#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta zp2 + jmp b6 + //SEG58 main::@6 + b6: + //SEG59 [33] (word) div10::val#4 ← (word) main::u#15 -- vwuz1=vwuz2 + lda u_15 + sta div10.val_4 + lda u_15+1 + sta div10.val_4+1 + //SEG60 [34] call div10 + jsr div10 + //SEG61 [35] (word) div10::return#2 ← (word) div10::return#0 -- vwuz1=vwuz2 + lda div10.return + sta div10.return_2 + lda div10.return+1 + sta div10.return_2+1 + jmp b11 + //SEG62 main::@11 + b11: + //SEG63 [36] (word) main::v#2 ← (word) div10::return#2 -- vwuz1=vwuz2 + lda div10.return_2 + sta v_2 + lda div10.return_2+1 + sta v_2+1 + //SEG64 [37] *((const byte*) zp2#0) ← ++ *((const byte*) zp2#0) -- _deref_pbuc1=_inc__deref_pbuc1 + inc zp2 + //SEG65 [38] if(*((const byte*) zp2#0)<(byte/word/signed word/dword/signed dword) $c8) goto main::@6 -- _deref_pbuc1_lt_vbuc2_then_la1 + lda zp2 + cmp #$c8 + bcc b6 + jmp b7 + //SEG66 main::@7 + b7: + //SEG67 [39] (word~) main::$11 ← ((word)) *((const byte*) TIMEHI#0) -- vwuz1=_word__deref_pbuc1 + lda TIMEHI + sta _11 + lda #0 + sta _11+1 + //SEG68 [40] (word~) main::$12 ← (word~) main::$11 << (byte/signed byte/word/signed word/dword/signed dword) 8 -- vwuz1=vwuz2_rol_vbuc1 + ldy #8 + lda _11 + sta _12 + lda _11+1 + sta _12+1 + cpy #0 + beq !e+ + !: + asl _12 + rol _12+1 + dey + bne !- + !e: + //SEG69 [41] (word~) main::$13 ← ((word)) *((const byte*) TIMELO#0) -- vwuz1=_word__deref_pbuc1 + lda TIMELO + sta _13 + lda #0 + sta _13+1 + //SEG70 [42] (word) myprintf::w3#1 ← (word~) main::$12 + (word~) main::$13 -- vwuz1=vwuz2_plus_vwuz3 + lda _12 + clc + adc _13 + sta myprintf.w3 + lda _12+1 + adc _13+1 + sta myprintf.w3+1 + //SEG71 [43] (word) myprintf::w1#1 ← (word) main::u#15 -- vwuz1=vwuz2 + lda u_15 + sta myprintf.w1 + lda u_15+1 + sta myprintf.w1+1 + //SEG72 [44] (word) myprintf::w2#1 ← (word) main::v#2 -- vwuz1=vwuz2 + lda v_2 + sta myprintf.w2 + lda v_2+1 + sta myprintf.w2+1 + //SEG73 [45] call myprintf + //SEG74 [54] phi from main::@7 to myprintf [phi:main::@7->myprintf] + myprintf_from_b7: + //SEG75 [54] phi (word) myprintf::w3#7 = (word) myprintf::w3#1 [phi:main::@7->myprintf#0] -- register_copy + //SEG76 [54] phi (word) myprintf::w2#7 = (word) myprintf::w2#1 [phi:main::@7->myprintf#1] -- register_copy + //SEG77 [54] phi (word) myprintf::w1#6 = (word) myprintf::w1#1 [phi:main::@7->myprintf#2] -- register_copy + //SEG78 [54] phi (byte*) myprintf::str#5 = (const string) main::str1 [phi:main::@7->myprintf#3] -- pbuz1=pbuc1 + lda #str1 + sta myprintf.str+1 + jsr myprintf + //SEG79 [46] phi from main::@7 to main::@12 [phi:main::@7->main::@12] + b12_from_b7: + jmp b12 + //SEG80 main::@12 + b12: + //SEG81 [47] call Print + jsr Print + jmp b13 + //SEG82 main::@13 + b13: + //SEG83 [48] (word) main::u#4 ← (word) main::u#15 - (word/signed word/dword/signed dword) $4d2 -- vwuz1=vwuz1_minus_vwuc1 + lda u_4 + sec + sbc #<$4d2 + sta u_4 + lda u_4+1 + sbc #>$4d2 + sta u_4+1 + //SEG84 [49] *((const byte*) zp1#0) ← ++ *((const byte*) zp1#0) -- _deref_pbuc1=_inc__deref_pbuc1 + inc zp1 + //SEG85 [50] if(*((const byte*) zp1#0)<(byte/signed byte/word/signed word/dword/signed dword) $a) goto main::@5 -- _deref_pbuc1_lt_vbuc2_then_la1 + lda zp1 + cmp #$a + bcc b5_from_b13 + jmp breturn + //SEG86 main::@return + breturn: + //SEG87 [51] return + rts + str: .text "200 DIV16U: %5d,%4d IN %04d FRAMESm@" + str1: .text "200 DIV10 : %5d,%4d IN %04d FRAMESm@" +} +//SEG88 Print +Print: { + //SEG89 asm { ldy#0 loop: ldastrTemp,y beqdone jsr$FFD2 iny jmploop done: } + // can this assembly be placed in a separate file and call it from the C code here? + ldy #0 + loop: + lda strTemp,y + beq done + jsr $ffd2 + iny + jmp loop + done: + jmp breturn + //SEG90 Print::@return + breturn: + //SEG91 [53] return + rts +} +//SEG92 myprintf +// myprintf(byte* zeropage($c) str, word zeropage(6) w1, word zeropage(8) w2, word zeropage($a) w3) +myprintf: { + .label _17 = $46 + .label _22 = $14 + .label _23 = $49 + .label _28 = $15 + .label _29 = $4c + .label _39 = $1a + .label _47 = $4d + .label b = $1b + .label str = $c + .label bDigits = $19 + .label bLen = $18 + .label b_5 = $16 + .label digit = $17 + .label bArg = $f + .label return = $18 + .label w1 = 6 + .label w2 = 8 + .label w3 = $a + .label b_15 = $48 + .label b_16 = $4b + .label bLen_10 = $4a + .label b_17 = $16 + .label bFormat = $e + .label w = $10 + .label bTrailing = $12 + .label bLeadZero = $13 + //SEG93 [55] phi from myprintf to myprintf::@1 [phi:myprintf->myprintf::@1] + b1_from_myprintf: + //SEG94 [55] phi (byte) myprintf::bLeadZero#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:myprintf->myprintf::@1#0] -- vbuz1=vbuc1 + lda #0 + sta bLeadZero + //SEG95 [55] phi (byte) myprintf::bDigits#14 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:myprintf->myprintf::@1#1] -- vbuz1=vbuc1 + lda #0 + sta bDigits + //SEG96 [55] phi (byte) myprintf::bTrailing#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:myprintf->myprintf::@1#2] -- vbuz1=vbuc1 + lda #0 + sta bTrailing + //SEG97 [55] phi (word) myprintf::w#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:myprintf->myprintf::@1#3] -- vwuz1=vbuc1 + lda #0 + sta w + lda #0 + sta w+1 + //SEG98 [55] phi (byte) myprintf::bLen#14 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:myprintf->myprintf::@1#4] -- vbuz1=vbuc1 + lda #0 + sta bLen + //SEG99 [55] phi (byte) myprintf::bArg#12 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:myprintf->myprintf::@1#5] -- vbuz1=vbuc1 + lda #0 + sta bArg + //SEG100 [55] phi (byte) myprintf::bFormat#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:myprintf->myprintf::@1#6] -- vbuz1=vbuc1 + lda #0 + sta bFormat + //SEG101 [55] phi (byte*) myprintf::str#10 = (byte*) myprintf::str#5 [phi:myprintf->myprintf::@1#7] -- register_copy + jmp b1 + //SEG102 [55] phi from myprintf::@27 to myprintf::@1 [phi:myprintf::@27->myprintf::@1] + b1_from_b27: + //SEG103 [55] phi (byte) myprintf::bLeadZero#10 = (byte) myprintf::bLeadZero#18 [phi:myprintf::@27->myprintf::@1#0] -- register_copy + //SEG104 [55] phi (byte) myprintf::bDigits#14 = (byte) myprintf::bDigits#24 [phi:myprintf::@27->myprintf::@1#1] -- register_copy + //SEG105 [55] phi (byte) myprintf::bTrailing#10 = (byte) myprintf::bTrailing#21 [phi:myprintf::@27->myprintf::@1#2] -- register_copy + //SEG106 [55] phi (word) myprintf::w#10 = (word) myprintf::w#17 [phi:myprintf::@27->myprintf::@1#3] -- register_copy + //SEG107 [55] phi (byte) myprintf::bLen#14 = (byte) myprintf::return#0 [phi:myprintf::@27->myprintf::@1#4] -- register_copy + //SEG108 [55] phi (byte) myprintf::bArg#12 = (byte) myprintf::bArg#10 [phi:myprintf::@27->myprintf::@1#5] -- register_copy + //SEG109 [55] phi (byte) myprintf::bFormat#10 = (byte) myprintf::bFormat#4 [phi:myprintf::@27->myprintf::@1#6] -- register_copy + //SEG110 [55] phi (byte*) myprintf::str#10 = (byte*) myprintf::str#0 [phi:myprintf::@27->myprintf::@1#7] -- register_copy + jmp b1 + //SEG111 myprintf::@1 + b1: + //SEG112 [56] (byte) myprintf::b#1 ← *((byte*) myprintf::str#10) -- vbuz1=_deref_pbuz2 + ldy #0 + lda (str),y + sta b + //SEG113 [57] if((byte) myprintf::bFormat#10==(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@2 -- vbuz1_eq_0_then_la1 + lda bFormat + cmp #0 + beq b2 + jmp b31 + //SEG114 myprintf::@31 + b31: + //SEG115 [58] if((byte) myprintf::b#1!=(byte) '0') goto myprintf::@3 -- vbuz1_neq_vbuc1_then_la1 + lda #'0' + cmp b + bne b3 + //SEG116 [59] phi from myprintf::@31 to myprintf::@27 [phi:myprintf::@31->myprintf::@27] + b27_from_b31: + //SEG117 [59] phi (byte) myprintf::bLeadZero#18 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:myprintf::@31->myprintf::@27#0] -- vbuz1=vbuc1 + lda #1 + sta bLeadZero + //SEG118 [59] phi (byte) myprintf::bDigits#24 = (byte) myprintf::bDigits#14 [phi:myprintf::@31->myprintf::@27#1] -- register_copy + //SEG119 [59] phi (byte) myprintf::bTrailing#21 = (byte) myprintf::bTrailing#10 [phi:myprintf::@31->myprintf::@27#2] -- register_copy + //SEG120 [59] phi (word) myprintf::w#17 = (word) myprintf::w#10 [phi:myprintf::@31->myprintf::@27#3] -- register_copy + //SEG121 [59] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#12 [phi:myprintf::@31->myprintf::@27#4] -- register_copy + //SEG122 [59] phi (byte) myprintf::return#0 = (byte) myprintf::bLen#14 [phi:myprintf::@31->myprintf::@27#5] -- register_copy + //SEG123 [59] phi (byte) myprintf::bFormat#4 = (byte) myprintf::bFormat#10 [phi:myprintf::@31->myprintf::@27#6] -- register_copy + jmp b27 + //SEG124 myprintf::@27 + b27: + //SEG125 [60] (byte*) myprintf::str#0 ← ++ (byte*) myprintf::str#10 -- pbuz1=_inc_pbuz1 + inc str + bne !+ + inc str+1 + !: + //SEG126 [61] if(*((byte*) myprintf::str#0)!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@1 -- _deref_pbuz1_neq_0_then_la1 + ldy #0 + lda (str),y + cmp #0 + bne b1_from_b27 + jmp b36 + //SEG127 myprintf::@36 + b36: + //SEG128 [62] *((const byte[$64]) strTemp#0 + (byte) myprintf::return#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- pbuc1_derefidx_vbuz1=vbuc2 + lda #0 + ldy return + sta strTemp,y + jmp breturn + //SEG129 myprintf::@return + breturn: + //SEG130 [63] return + rts + //SEG131 myprintf::@3 + b3: + //SEG132 [64] if((byte) myprintf::b#1>=(byte) '1') goto myprintf::@37 -- vbuz1_ge_vbuc1_then_la1 + lda b + cmp #'1' + bcs b37 + jmp b4 + //SEG133 myprintf::@4 + b4: + //SEG134 [65] if((byte) myprintf::b#1!=(byte) '-') goto myprintf::@5 -- vbuz1_neq_vbuc1_then_la1 + lda #'-' + cmp b + bne b5 + //SEG135 [59] phi from myprintf::@4 to myprintf::@27 [phi:myprintf::@4->myprintf::@27] + b27_from_b4: + //SEG136 [59] phi (byte) myprintf::bLeadZero#18 = (byte) myprintf::bLeadZero#10 [phi:myprintf::@4->myprintf::@27#0] -- register_copy + //SEG137 [59] phi (byte) myprintf::bDigits#24 = (byte) myprintf::bDigits#14 [phi:myprintf::@4->myprintf::@27#1] -- register_copy + //SEG138 [59] phi (byte) myprintf::bTrailing#21 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:myprintf::@4->myprintf::@27#2] -- vbuz1=vbuc1 + lda #1 + sta bTrailing + //SEG139 [59] phi (word) myprintf::w#17 = (word) myprintf::w#10 [phi:myprintf::@4->myprintf::@27#3] -- register_copy + //SEG140 [59] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#12 [phi:myprintf::@4->myprintf::@27#4] -- register_copy + //SEG141 [59] phi (byte) myprintf::return#0 = (byte) myprintf::bLen#14 [phi:myprintf::@4->myprintf::@27#5] -- register_copy + //SEG142 [59] phi (byte) myprintf::bFormat#4 = (byte) myprintf::bFormat#10 [phi:myprintf::@4->myprintf::@27#6] -- register_copy + jmp b27 + //SEG143 myprintf::@5 + b5: + //SEG144 [66] if((byte) myprintf::b#1==(byte) 'c') goto myprintf::@6 -- vbuz1_eq_vbuc1_then_la1 + lda #'c' + cmp b + beq b6 + jmp b24 + //SEG145 myprintf::@24 + b24: + //SEG146 [67] if((byte) myprintf::b#1==(byte) 'd') goto myprintf::@7 -- vbuz1_eq_vbuc1_then_la1 + lda #'d' + cmp b + beq b7 + jmp b25 + //SEG147 myprintf::@25 + b25: + //SEG148 [68] if((byte) myprintf::b#1==(byte) 'x') goto myprintf::@26 -- vbuz1_eq_vbuc1_then_la1 + lda #'x' + cmp b + beq b26 + jmp b38 + //SEG149 myprintf::@38 + b38: + //SEG150 [69] if((byte) myprintf::b#1==(byte) 'X') goto myprintf::@26 -- vbuz1_eq_vbuc1_then_la1 + lda #'X' + cmp b + beq b26 + //SEG151 [70] phi from myprintf::@11 myprintf::@20 myprintf::@21 myprintf::@38 myprintf::@40 myprintf::@6 to myprintf::@22 [phi:myprintf::@11/myprintf::@20/myprintf::@21/myprintf::@38/myprintf::@40/myprintf::@6->myprintf::@22] + b22_from_b11: + b22_from_b20: + b22_from_b21: + b22_from_b38: + b22_from_b40: + b22_from_b6: + //SEG152 [70] phi (byte) myprintf::bDigits#25 = (byte) myprintf::bDigits#14 [phi:myprintf::@11/myprintf::@20/myprintf::@21/myprintf::@38/myprintf::@40/myprintf::@6->myprintf::@22#0] -- register_copy + //SEG153 [70] phi (byte) myprintf::bLen#28 = (byte) myprintf::bLen#3 [phi:myprintf::@11/myprintf::@20/myprintf::@21/myprintf::@38/myprintf::@40/myprintf::@6->myprintf::@22#1] -- register_copy + jmp b22 + //SEG154 myprintf::@22 + b22: + //SEG155 [59] phi from myprintf::@22 to myprintf::@27 [phi:myprintf::@22->myprintf::@27] + b27_from_b22: + //SEG156 [59] phi (byte) myprintf::bLeadZero#18 = (byte) myprintf::bLeadZero#10 [phi:myprintf::@22->myprintf::@27#0] -- register_copy + //SEG157 [59] phi (byte) myprintf::bDigits#24 = (byte) myprintf::bDigits#25 [phi:myprintf::@22->myprintf::@27#1] -- register_copy + //SEG158 [59] phi (byte) myprintf::bTrailing#21 = (byte) myprintf::bTrailing#10 [phi:myprintf::@22->myprintf::@27#2] -- register_copy + //SEG159 [59] phi (word) myprintf::w#17 = (word) myprintf::w#10 [phi:myprintf::@22->myprintf::@27#3] -- register_copy + //SEG160 [59] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#12 [phi:myprintf::@22->myprintf::@27#4] -- register_copy + //SEG161 [59] phi (byte) myprintf::return#0 = (byte) myprintf::bLen#28 [phi:myprintf::@22->myprintf::@27#5] -- register_copy + //SEG162 [59] phi (byte) myprintf::bFormat#4 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:myprintf::@22->myprintf::@27#6] -- vbuz1=vbuc1 + lda #0 + sta bFormat + jmp b27 + //SEG163 myprintf::@26 + b26: + //SEG164 [71] (word~) myprintf::$17 ← (word) myprintf::w#10 >> (byte/signed byte/word/signed word/dword/signed dword) 4 -- vwuz1=vwuz2_ror_4 + lda w+1 + sta _17+1 + lda w + sta _17 + ldy #4 + !: + lsr _17+1 + ror _17 + dey + bne !- + //SEG165 [72] (byte) myprintf::b#15 ← (word~) myprintf::$17 & (byte/signed byte/word/signed word/dword/signed dword) $f -- vbuz1=vwuz2_band_vbuc1 + lda _17 + and #$f + sta b_15 + //SEG166 [73] if((byte) myprintf::b#15<(byte/signed byte/word/signed word/dword/signed dword) $a) goto myprintf::@9 -- vbuz1_lt_vbuc1_then_la1 + lda b_15 + cmp #$a + bcc b9_from_b26 + //SEG167 [74] phi from myprintf::@26 to myprintf::@8 [phi:myprintf::@26->myprintf::@8] + b8_from_b26: + jmp b8 + //SEG168 myprintf::@8 + b8: + //SEG169 [75] phi from myprintf::@8 to myprintf::@9 [phi:myprintf::@8->myprintf::@9] + b9_from_b8: + //SEG170 [75] phi (byte~) myprintf::$22 = (byte/signed byte/word/signed word/dword/signed dword) $57 [phi:myprintf::@8->myprintf::@9#0] -- vbuz1=vbuc1 + lda #$57 + sta _22 + jmp b9 + //SEG171 [75] phi from myprintf::@26 to myprintf::@9 [phi:myprintf::@26->myprintf::@9] + b9_from_b26: + //SEG172 [75] phi (byte~) myprintf::$22 = (byte) '0' [phi:myprintf::@26->myprintf::@9#0] -- vbuz1=vbuc1 + lda #'0' + sta _22 + jmp b9 + //SEG173 myprintf::@9 + b9: + //SEG174 [76] (byte~) myprintf::$23 ← (byte~) myprintf::$22 + (byte) myprintf::b#15 -- vbuz1=vbuz2_plus_vbuz3 + lda _22 + clc + adc b_15 + sta _23 + //SEG175 [77] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$23 -- pbuc1_derefidx_vbuz1=vbuz2 + lda _23 + ldy bLen + sta strTemp,y + //SEG176 [78] (byte) myprintf::bLen#10 ← ++ (byte) myprintf::bLen#14 -- vbuz1=_inc_vbuz2 + ldy bLen + iny + sty bLen_10 + //SEG177 [79] (byte) myprintf::b#16 ← (word) myprintf::w#10 & (byte/signed byte/word/signed word/dword/signed dword) $f -- vbuz1=vwuz2_band_vbuc1 + lda w + and #$f + sta b_16 + //SEG178 [80] if((byte) myprintf::b#16<(byte/signed byte/word/signed word/dword/signed dword) $a) goto myprintf::@11 -- vbuz1_lt_vbuc1_then_la1 + lda b_16 + cmp #$a + bcc b11_from_b9 + //SEG179 [81] phi from myprintf::@9 to myprintf::@10 [phi:myprintf::@9->myprintf::@10] + b10_from_b9: + jmp b10 + //SEG180 myprintf::@10 + b10: + //SEG181 [82] phi from myprintf::@10 to myprintf::@11 [phi:myprintf::@10->myprintf::@11] + b11_from_b10: + //SEG182 [82] phi (byte~) myprintf::$28 = (byte/signed byte/word/signed word/dword/signed dword) $57 [phi:myprintf::@10->myprintf::@11#0] -- vbuz1=vbuc1 + lda #$57 + sta _28 + jmp b11 + //SEG183 [82] phi from myprintf::@9 to myprintf::@11 [phi:myprintf::@9->myprintf::@11] + b11_from_b9: + //SEG184 [82] phi (byte~) myprintf::$28 = (byte) '0' [phi:myprintf::@9->myprintf::@11#0] -- vbuz1=vbuc1 + lda #'0' + sta _28 + jmp b11 + //SEG185 myprintf::@11 + b11: + //SEG186 [83] (byte~) myprintf::$29 ← (byte~) myprintf::$28 + (byte) myprintf::b#16 -- vbuz1=vbuz2_plus_vbuz3 + lda _28 + clc + adc b_16 + sta _29 + //SEG187 [84] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#10) ← (byte~) myprintf::$29 -- pbuc1_derefidx_vbuz1=vbuz2 + lda _29 + ldy bLen_10 + sta strTemp,y + //SEG188 [85] (byte) myprintf::bLen#3 ← ++ (byte) myprintf::bLen#10 -- vbuz1=_inc_vbuz2 + ldy bLen_10 + iny + sty bLen + jmp b22_from_b11 + //SEG189 myprintf::@7 + b7: + //SEG190 [86] (word) utoa::value#4 ← (word) myprintf::w#10 -- vwuz1=vwuz2 + lda w + sta utoa.value + lda w+1 + sta utoa.value+1 + //SEG191 [87] call utoa + //SEG192 [133] phi from myprintf::@7 to utoa [phi:myprintf::@7->utoa] + utoa_from_b7: + jsr utoa + //SEG193 [88] phi from myprintf::@7 to myprintf::@12 [phi:myprintf::@7->myprintf::@12] + b12_from_b7: + //SEG194 [88] phi (byte) myprintf::b#17 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:myprintf::@7->myprintf::@12#0] -- vbuz1=vbuc1 + lda #1 + sta b_17 + jmp b12 + //SEG195 myprintf::@12 + b12: + //SEG196 [89] if(*((const byte[6]) myprintf::buf6#0 + (byte) myprintf::b#17)!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@13 -- pbuc1_derefidx_vbuz1_neq_0_then_la1 + ldy b_17 + lda buf6,y + cmp #0 + bne b13 + jmp b14 + //SEG197 myprintf::@14 + b14: + //SEG198 [90] if((byte) myprintf::bTrailing#10==(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@39 -- vbuz1_eq_0_then_la1 + lda bTrailing + cmp #0 + beq b39 + //SEG199 [91] phi from myprintf::@14 myprintf::@18 to myprintf::@15 [phi:myprintf::@14/myprintf::@18->myprintf::@15] + b15_from_b14: + b15_from_b18: + //SEG200 [91] phi (byte) myprintf::bDigits#16 = (byte) myprintf::bDigits#14 [phi:myprintf::@14/myprintf::@18->myprintf::@15#0] -- register_copy + //SEG201 [91] phi (byte) myprintf::bLen#23 = (byte) myprintf::bLen#14 [phi:myprintf::@14/myprintf::@18->myprintf::@15#1] -- register_copy + jmp b15 + //SEG202 myprintf::@15 + b15: + //SEG203 [92] phi from myprintf::@15 to myprintf::@19 [phi:myprintf::@15->myprintf::@19] + b19_from_b15: + //SEG204 [92] phi (byte) myprintf::bLen#12 = (byte) myprintf::bLen#23 [phi:myprintf::@15->myprintf::@19#0] -- register_copy + //SEG205 [92] phi (byte) myprintf::digit#3 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:myprintf::@15->myprintf::@19#1] -- vbuz1=vbuc1 + lda #0 + sta digit + jmp b19 + //SEG206 [92] phi from myprintf::@19 to myprintf::@19 [phi:myprintf::@19->myprintf::@19] + b19_from_b19: + //SEG207 [92] phi (byte) myprintf::bLen#12 = (byte) myprintf::bLen#24 [phi:myprintf::@19->myprintf::@19#0] -- register_copy + //SEG208 [92] phi (byte) myprintf::digit#3 = (byte) myprintf::digit#2 [phi:myprintf::@19->myprintf::@19#1] -- register_copy + jmp b19 + //SEG209 myprintf::@19 + b19: + //SEG210 [93] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#12) ← *((const byte[6]) myprintf::buf6#0 + (byte) myprintf::digit#3) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz2 + ldy digit + lda buf6,y + ldy bLen + sta strTemp,y + //SEG211 [94] (byte) myprintf::bLen#24 ← ++ (byte) myprintf::bLen#12 -- vbuz1=_inc_vbuz1 + inc bLen + //SEG212 [95] (byte) myprintf::digit#2 ← ++ (byte) myprintf::digit#3 -- vbuz1=_inc_vbuz1 + inc digit + //SEG213 [96] if((byte) myprintf::digit#2<(byte) myprintf::b#17) goto myprintf::@19 -- vbuz1_lt_vbuz2_then_la1 + lda digit + cmp b_17 + bcc b19_from_b19 + jmp b20 + //SEG214 myprintf::@20 + b20: + //SEG215 [97] if((byte) myprintf::bTrailing#10!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@40 -- vbuz1_neq_0_then_la1 + lda bTrailing + cmp #0 + bne b40 + jmp b22_from_b20 + //SEG216 myprintf::@40 + b40: + //SEG217 [98] if((byte) myprintf::bDigits#16>(byte) myprintf::b#17) goto myprintf::@21 -- vbuz1_gt_vbuz2_then_la1 + lda b_17 + cmp bDigits + bcc b21_from_b40 + jmp b22_from_b40 + //SEG218 [99] phi from myprintf::@21 myprintf::@40 to myprintf::@21 [phi:myprintf::@21/myprintf::@40->myprintf::@21] + b21_from_b21: + b21_from_b40: + //SEG219 [99] phi (byte) myprintf::bDigits#8 = (byte) myprintf::bDigits#3 [phi:myprintf::@21/myprintf::@40->myprintf::@21#0] -- register_copy + //SEG220 [99] phi (byte) myprintf::bLen#13 = (byte) myprintf::bLen#6 [phi:myprintf::@21/myprintf::@40->myprintf::@21#1] -- register_copy + jmp b21 + //SEG221 myprintf::@21 + b21: + //SEG222 [100] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#13) ← (byte) ' ' -- pbuc1_derefidx_vbuz1=vbuc2 + lda #' ' + ldy bLen + sta strTemp,y + //SEG223 [101] (byte) myprintf::bLen#6 ← ++ (byte) myprintf::bLen#13 -- vbuz1=_inc_vbuz1 + inc bLen + //SEG224 [102] (byte) myprintf::bDigits#3 ← -- (byte) myprintf::bDigits#8 -- vbuz1=_dec_vbuz1 + dec bDigits + //SEG225 [103] if((byte) myprintf::bDigits#3>(byte) myprintf::b#17) goto myprintf::@21 -- vbuz1_gt_vbuz2_then_la1 + lda b_17 + cmp bDigits + bcc b21_from_b21 + jmp b22_from_b21 + //SEG226 myprintf::@39 + b39: + //SEG227 [104] if((byte) myprintf::bDigits#14>(byte) myprintf::b#17) goto myprintf::@16 -- vbuz1_gt_vbuz2_then_la1 + lda b_17 + cmp bDigits + bcc b16_from_b39 + //SEG228 [91] phi from myprintf::@39 to myprintf::@15 [phi:myprintf::@39->myprintf::@15] + b15_from_b39: + jmp b15 + //SEG229 [105] phi from myprintf::@18 myprintf::@39 to myprintf::@16 [phi:myprintf::@18/myprintf::@39->myprintf::@16] + b16_from_b18: + b16_from_b39: + //SEG230 [105] phi (byte) myprintf::bDigits#10 = (byte) myprintf::bDigits#2 [phi:myprintf::@18/myprintf::@39->myprintf::@16#0] -- register_copy + //SEG231 [105] phi (byte) myprintf::bLen#11 = (byte) myprintf::bLen#4 [phi:myprintf::@18/myprintf::@39->myprintf::@16#1] -- register_copy + jmp b16 + //SEG232 myprintf::@16 + b16: + //SEG233 [106] if((byte) myprintf::bLeadZero#10==(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@18 -- vbuz1_eq_0_then_la1 + lda bLeadZero + cmp #0 + beq b18_from_b16 + //SEG234 [107] phi from myprintf::@16 to myprintf::@17 [phi:myprintf::@16->myprintf::@17] + b17_from_b16: + jmp b17 + //SEG235 myprintf::@17 + b17: + //SEG236 [108] phi from myprintf::@17 to myprintf::@18 [phi:myprintf::@17->myprintf::@18] + b18_from_b17: + //SEG237 [108] phi (byte~) myprintf::$39 = (byte) '0' [phi:myprintf::@17->myprintf::@18#0] -- vbuz1=vbuc1 + lda #'0' + sta _39 + jmp b18 + //SEG238 [108] phi from myprintf::@16 to myprintf::@18 [phi:myprintf::@16->myprintf::@18] + b18_from_b16: + //SEG239 [108] phi (byte~) myprintf::$39 = (byte) ' ' [phi:myprintf::@16->myprintf::@18#0] -- vbuz1=vbuc1 + lda #' ' + sta _39 + jmp b18 + //SEG240 myprintf::@18 + b18: + //SEG241 [109] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#11) ← (byte~) myprintf::$39 -- pbuc1_derefidx_vbuz1=vbuz2 + lda _39 + ldy bLen + sta strTemp,y + //SEG242 [110] (byte) myprintf::bLen#4 ← ++ (byte) myprintf::bLen#11 -- vbuz1=_inc_vbuz1 + inc bLen + //SEG243 [111] (byte) myprintf::bDigits#2 ← -- (byte) myprintf::bDigits#10 -- vbuz1=_dec_vbuz1 + dec bDigits + //SEG244 [112] if((byte) myprintf::bDigits#2>(byte) myprintf::b#17) goto myprintf::@16 -- vbuz1_gt_vbuz2_then_la1 + lda b_17 + cmp bDigits + bcc b16_from_b18 + jmp b15_from_b18 + //SEG245 myprintf::@13 + b13: + //SEG246 [113] (byte) myprintf::b#5 ← ++ (byte) myprintf::b#17 -- vbuz1=_inc_vbuz1 + inc b_5 + //SEG247 [88] phi from myprintf::@13 to myprintf::@12 [phi:myprintf::@13->myprintf::@12] + b12_from_b13: + //SEG248 [88] phi (byte) myprintf::b#17 = (byte) myprintf::b#5 [phi:myprintf::@13->myprintf::@12#0] -- register_copy + jmp b12 + //SEG249 myprintf::@6 + b6: + //SEG250 [114] (byte~) myprintf::$47 ← ((byte)) (word) myprintf::w#10 -- vbuz1=_byte_vwuz2 + lda w + sta _47 + //SEG251 [115] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$47 -- pbuc1_derefidx_vbuz1=vbuz2 + // "switch" is the normal way -- not supported + lda _47 + ldy bLen + sta strTemp,y + //SEG252 [116] (byte) myprintf::bLen#1 ← ++ (byte) myprintf::bLen#14 -- vbuz1=_inc_vbuz1 + inc bLen + jmp b22_from_b6 + //SEG253 myprintf::@37 + b37: + //SEG254 [117] if((byte) myprintf::b#1<=(byte) '9') goto myprintf::@23 -- vbuz1_le_vbuc1_then_la1 + lda #'9' + cmp b + bcs b23 + jmp b4 + //SEG255 myprintf::@23 + b23: + //SEG256 [118] (byte) myprintf::bDigits#1 ← (byte) myprintf::b#1 - (byte) '0' -- vbuz1=vbuz2_minus_vbuc1 + lax b + axs #'0' + stx bDigits + //SEG257 [59] phi from myprintf::@23 myprintf::@30 to myprintf::@27 [phi:myprintf::@23/myprintf::@30->myprintf::@27] + b27_from_b23: + b27_from_b30: + //SEG258 [59] phi (byte) myprintf::bLeadZero#18 = (byte) myprintf::bLeadZero#10 [phi:myprintf::@23/myprintf::@30->myprintf::@27#0] -- register_copy + //SEG259 [59] phi (byte) myprintf::bDigits#24 = (byte) myprintf::bDigits#1 [phi:myprintf::@23/myprintf::@30->myprintf::@27#1] -- register_copy + //SEG260 [59] phi (byte) myprintf::bTrailing#21 = (byte) myprintf::bTrailing#10 [phi:myprintf::@23/myprintf::@30->myprintf::@27#2] -- register_copy + //SEG261 [59] phi (word) myprintf::w#17 = (word) myprintf::w#10 [phi:myprintf::@23/myprintf::@30->myprintf::@27#3] -- register_copy + //SEG262 [59] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#12 [phi:myprintf::@23/myprintf::@30->myprintf::@27#4] -- register_copy + //SEG263 [59] phi (byte) myprintf::return#0 = (byte) myprintf::bLen#14 [phi:myprintf::@23/myprintf::@30->myprintf::@27#5] -- register_copy + //SEG264 [59] phi (byte) myprintf::bFormat#4 = (byte) myprintf::bFormat#10 [phi:myprintf::@23/myprintf::@30->myprintf::@27#6] -- register_copy + jmp b27 + //SEG265 myprintf::@2 + b2: + //SEG266 [119] if((byte) myprintf::b#1!=(byte) '%') goto myprintf::@28 -- vbuz1_neq_vbuc1_then_la1 + lda #'%' + cmp b + bne b28 + jmp b32 + //SEG267 myprintf::@32 + b32: + //SEG268 [120] if((byte) myprintf::bArg#12==(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@42 -- vbuz1_eq_0_then_la1 + // default format + //w = (bArg == 0) ? w1 : ((bArg == 1) ? w2 : w3); -- "?" is the normal way, but error "sequence does not contain all blocks" + lda bArg + cmp #0 + beq b42 + jmp b33 + //SEG269 myprintf::@33 + b33: + //SEG270 [121] if((byte) myprintf::bArg#12==(byte/signed byte/word/signed word/dword/signed dword) 1) goto myprintf::@43 -- vbuz1_eq_vbuc1_then_la1 + lda #1 + cmp bArg + beq b43 + jmp b34 + //SEG271 myprintf::@34 + b34: + //SEG272 [122] (word~) myprintf::w#53 ← (word) myprintf::w3#7 -- vwuz1=vwuz2 + lda w3 + sta w + lda w3+1 + sta w+1 + //SEG273 [123] phi from myprintf::@34 myprintf::@42 myprintf::@43 to myprintf::@29 [phi:myprintf::@34/myprintf::@42/myprintf::@43->myprintf::@29] + b29_from_b34: + b29_from_b42: + b29_from_b43: + //SEG274 [123] phi (word) myprintf::w#21 = (word~) myprintf::w#53 [phi:myprintf::@34/myprintf::@42/myprintf::@43->myprintf::@29#0] -- register_copy + jmp b29 + //SEG275 myprintf::@29 + b29: + //SEG276 [124] (byte) myprintf::bArg#1 ← ++ (byte) myprintf::bArg#12 -- vbuz1=_inc_vbuz1 + inc bArg + //SEG277 [59] phi from myprintf::@29 to myprintf::@27 [phi:myprintf::@29->myprintf::@27] + b27_from_b29: + //SEG278 [59] phi (byte) myprintf::bLeadZero#18 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:myprintf::@29->myprintf::@27#0] -- vbuz1=vbuc1 + lda #0 + sta bLeadZero + //SEG279 [59] phi (byte) myprintf::bDigits#24 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:myprintf::@29->myprintf::@27#1] -- vbuz1=vbuc1 + lda #1 + sta bDigits + //SEG280 [59] phi (byte) myprintf::bTrailing#21 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:myprintf::@29->myprintf::@27#2] -- vbuz1=vbuc1 + lda #0 + sta bTrailing + //SEG281 [59] phi (word) myprintf::w#17 = (word) myprintf::w#21 [phi:myprintf::@29->myprintf::@27#3] -- register_copy + //SEG282 [59] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#1 [phi:myprintf::@29->myprintf::@27#4] -- register_copy + //SEG283 [59] phi (byte) myprintf::return#0 = (byte) myprintf::bLen#14 [phi:myprintf::@29->myprintf::@27#5] -- register_copy + //SEG284 [59] phi (byte) myprintf::bFormat#4 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:myprintf::@29->myprintf::@27#6] -- vbuz1=vbuc1 + lda #1 + sta bFormat + jmp b27 + //SEG285 myprintf::@43 + b43: + //SEG286 [125] (word~) myprintf::w#52 ← (word) myprintf::w2#7 -- vwuz1=vwuz2 + lda w2 + sta w + lda w2+1 + sta w+1 + jmp b29_from_b43 + //SEG287 myprintf::@42 + b42: + //SEG288 [126] (word~) myprintf::w#51 ← (word) myprintf::w1#6 -- vwuz1=vwuz2 + lda w1 + sta w + lda w1+1 + sta w+1 + jmp b29_from_b42 + //SEG289 myprintf::@28 + b28: + //SEG290 [127] if((byte) myprintf::b#1>=(byte/signed byte/word/signed word/dword/signed dword) $41) goto myprintf::@41 -- vbuz1_ge_vbuc1_then_la1 + lda b + cmp #$41 + bcs b41 + //SEG291 [128] phi from myprintf::@28 myprintf::@35 to myprintf::@30 [phi:myprintf::@28/myprintf::@35->myprintf::@30] + b30_from_b28: + b30_from_b35: + //SEG292 [128] phi (byte) myprintf::b#25 = (byte) myprintf::b#1 [phi:myprintf::@28/myprintf::@35->myprintf::@30#0] -- register_copy + jmp b30 + //SEG293 myprintf::@30 + b30: + //SEG294 [129] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte) myprintf::b#25 -- pbuc1_derefidx_vbuz1=vbuz2 + // swap 0x41 / 0x61 when in lower case mode + lda b + ldy bLen + sta strTemp,y + //SEG295 [130] (byte) myprintf::bLen#7 ← ++ (byte) myprintf::bLen#14 -- vbuz1=_inc_vbuz1 + inc bLen + jmp b27_from_b30 + //SEG296 myprintf::@41 + b41: + //SEG297 [131] if((byte) myprintf::b#1<(byte/signed byte/word/signed word/dword/signed dword) $5a+(byte/signed byte/word/signed word/dword/signed dword) 1) goto myprintf::@35 -- vbuz1_lt_vbuc1_then_la1 + lda b + cmp #$5a+1 + bcc b35 + //SEG298 [128] phi from myprintf::@41 to myprintf::@30 [phi:myprintf::@41->myprintf::@30] + b30_from_b41: + jmp b30 + //SEG299 myprintf::@35 + b35: + //SEG300 [132] (byte) myprintf::b#6 ← (byte) myprintf::b#1 + (byte/signed byte/word/signed word/dword/signed dword) $20 -- vbuz1=vbuz1_plus_vbuc1 + lax b + axs #-[$20] + stx b + jmp b30_from_b35 + buf6: .fill 6, 0 +} +//SEG301 utoa +// utoa(word zeropage($1d) value, byte* zeropage($1f) dst) +utoa: { + .label _16 = $4e + .label _17 = $4f + .label value = $1d + .label dst = $1f + .label dst_3 = $50 + .label bStarted = $1c + jmp b13 + //SEG302 utoa::@13 + b13: + //SEG303 [134] if((word) utoa::value#4>=(word/signed word/dword/signed dword) $2710) goto utoa::@5 -- vwuz1_ge_vwuc1_then_la1 + lda value+1 + cmp #>$2710 + bcc !+ + bne b5 + lda value + cmp #<$2710 + bcs b5 + !: + //SEG304 [135] phi from utoa::@13 to utoa::@1 [phi:utoa::@13->utoa::@1] + b1_from_b13: + //SEG305 [135] phi (byte*) utoa::dst#16 = (const byte[6]) myprintf::buf6#0 [phi:utoa::@13->utoa::@1#0] -- pbuz1=pbuc1 + lda #myprintf.buf6 + sta dst+1 + //SEG306 [135] phi (word) utoa::value#6 = (word) utoa::value#4 [phi:utoa::@13->utoa::@1#1] -- register_copy + //SEG307 [135] phi (byte) utoa::bStarted#5 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:utoa::@13->utoa::@1#2] -- vbuz1=vbuc1 + lda #0 + sta bStarted + jmp b1 + //SEG308 utoa::@1 + b1: + //SEG309 [136] if((byte) utoa::bStarted#5==(byte/signed byte/word/signed word/dword/signed dword) 1) goto utoa::@6 -- vbuz1_eq_vbuc1_then_la1 + lda #1 + cmp bStarted + beq b6 + jmp b14 + //SEG310 utoa::@14 + b14: + //SEG311 [137] if((word) utoa::value#6>=(word/signed word/dword/signed dword) $3e8) goto utoa::@6 -- vwuz1_ge_vwuc1_then_la1 + lda value+1 + cmp #>$3e8 + bcc !+ + bne b6 + lda value + cmp #<$3e8 + bcs b6 + !: + //SEG312 [138] phi from utoa::@14 to utoa::@2 [phi:utoa::@14->utoa::@2] + b2_from_b14: + //SEG313 [138] phi (byte*) utoa::dst#10 = (byte*) utoa::dst#16 [phi:utoa::@14->utoa::@2#0] -- register_copy + //SEG314 [138] phi (word) utoa::value#11 = (word) utoa::value#6 [phi:utoa::@14->utoa::@2#1] -- register_copy + //SEG315 [138] phi (byte) utoa::bStarted#6 = (byte) utoa::bStarted#5 [phi:utoa::@14->utoa::@2#2] -- register_copy + jmp b2 + //SEG316 utoa::@2 + b2: + //SEG317 [139] if((byte) utoa::bStarted#6==(byte/signed byte/word/signed word/dword/signed dword) 1) goto utoa::@7 -- vbuz1_eq_vbuc1_then_la1 + lda #1 + cmp bStarted + beq b7 + jmp b15 + //SEG318 utoa::@15 + b15: + //SEG319 [140] if((word) utoa::value#11>=(byte/signed byte/word/signed word/dword/signed dword) $64) goto utoa::@7 -- vwuz1_ge_vwuc1_then_la1 + lda value+1 + cmp #>$64 + bcc !+ + bne b7 + lda value + cmp #<$64 + bcs b7 + !: + //SEG320 [141] phi from utoa::@15 to utoa::@3 [phi:utoa::@15->utoa::@3] + b3_from_b15: + //SEG321 [141] phi (byte*) utoa::dst#13 = (byte*) utoa::dst#10 [phi:utoa::@15->utoa::@3#0] -- register_copy + //SEG322 [141] phi (word) utoa::value#10 = (word) utoa::value#11 [phi:utoa::@15->utoa::@3#1] -- register_copy + //SEG323 [141] phi (byte) utoa::bStarted#7 = (byte) utoa::bStarted#6 [phi:utoa::@15->utoa::@3#2] -- register_copy + jmp b3 + //SEG324 utoa::@3 + b3: + //SEG325 [142] if((byte) utoa::bStarted#7==(byte/signed byte/word/signed word/dword/signed dword) 1) goto utoa::@8 -- vbuz1_eq_vbuc1_then_la1 + lda #1 + cmp bStarted + beq b8 + jmp b16 + //SEG326 utoa::@16 + b16: + //SEG327 [143] if((word) utoa::value#10>=(byte/signed byte/word/signed word/dword/signed dword) $a) goto utoa::@8 -- vwuz1_ge_vwuc1_then_la1 + lda value+1 + cmp #>$a + bcc !+ + bne b8 + lda value + cmp #<$a + bcs b8 + !: + //SEG328 [144] phi from utoa::@12 utoa::@16 to utoa::@4 [phi:utoa::@12/utoa::@16->utoa::@4] + b4_from_b12: + b4_from_b16: + //SEG329 [144] phi (byte*) utoa::dst#12 = (byte*) utoa::dst#4 [phi:utoa::@12/utoa::@16->utoa::@4#0] -- register_copy + //SEG330 [144] phi (word) utoa::value#12 = (word) utoa::value#3 [phi:utoa::@12/utoa::@16->utoa::@4#1] -- register_copy + jmp b4 + //SEG331 utoa::@4 + b4: + //SEG332 [145] (byte~) utoa::$16 ← ((byte)) (word) utoa::value#12 -- vbuz1=_byte_vwuz2 + lda value + sta _16 + //SEG333 [146] (byte~) utoa::$17 ← (byte) '0' + (byte~) utoa::$16 -- vbuz1=vbuc1_plus_vbuz2 + lax _16 + axs #-['0'] + stx _17 + //SEG334 [147] *((byte*) utoa::dst#12) ← (byte~) utoa::$17 -- _deref_pbuz1=vbuz2 + lda _17 + ldy #0 + sta (dst),y + //SEG335 [148] (byte*) utoa::dst#3 ← ++ (byte*) utoa::dst#12 -- pbuz1=_inc_pbuz2 + lda dst + clc + adc #1 + sta dst_3 + lda dst+1 + adc #0 + sta dst_3+1 + //SEG336 [149] *((byte*) utoa::dst#3) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuz1=vbuc1 + lda #0 + ldy #0 + sta (dst_3),y + jmp breturn + //SEG337 utoa::@return + breturn: + //SEG338 [150] return + rts + //SEG339 utoa::@8 + b8: + //SEG340 [151] (byte*) append::dst#3 ← (byte*) utoa::dst#13 -- pbuz1=pbuz2 + lda dst + sta append.dst + lda dst+1 + sta append.dst+1 + //SEG341 [152] (word) append::value#4 ← (word) utoa::value#10 -- vwuz1=vwuz2 + lda value + sta append.value + lda value+1 + sta append.value+1 + //SEG342 [153] call append + //SEG343 [173] phi from utoa::@8 to append [phi:utoa::@8->append] + append_from_b8: + //SEG344 [173] phi (word) append::sub#6 = (byte/signed byte/word/signed word/dword/signed dword) $a [phi:utoa::@8->append#0] -- vwuz1=vbuc1 + lda #$a + sta append.sub + lda #0 + sta append.sub+1 + //SEG345 [173] phi (word) append::value#8 = (word) append::value#4 [phi:utoa::@8->append#1] -- register_copy + //SEG346 [173] phi (byte*) append::dst#4 = (byte*) append::dst#3 [phi:utoa::@8->append#2] -- register_copy + jsr append + //SEG347 [154] (word) append::return#10 ← (word) append::value#5 -- vwuz1=vwuz2 + lda append.value + sta append.return_10 + lda append.value+1 + sta append.return_10+1 + jmp b12 + //SEG348 utoa::@12 + b12: + //SEG349 [155] (word) utoa::value#3 ← (word) append::return#10 -- vwuz1=vwuz2 + lda append.return_10 + sta value + lda append.return_10+1 + sta value+1 + //SEG350 [156] (byte*) utoa::dst#4 ← ++ (byte*) utoa::dst#13 -- pbuz1=_inc_pbuz1 + inc dst + bne !+ + inc dst+1 + !: + jmp b4_from_b12 + //SEG351 utoa::@7 + b7: + //SEG352 [157] (byte*) append::dst#2 ← (byte*) utoa::dst#10 -- pbuz1=pbuz2 + lda dst + sta append.dst + lda dst+1 + sta append.dst+1 + //SEG353 [158] (word) append::value#3 ← (word) utoa::value#11 -- vwuz1=vwuz2 + lda value + sta append.value + lda value+1 + sta append.value+1 + //SEG354 [159] call append + //SEG355 [173] phi from utoa::@7 to append [phi:utoa::@7->append] + append_from_b7: + //SEG356 [173] phi (word) append::sub#6 = (byte/signed byte/word/signed word/dword/signed dword) $64 [phi:utoa::@7->append#0] -- vwuz1=vbuc1 + lda #$64 + sta append.sub + lda #0 + sta append.sub+1 + //SEG357 [173] phi (word) append::value#8 = (word) append::value#3 [phi:utoa::@7->append#1] -- register_copy + //SEG358 [173] phi (byte*) append::dst#4 = (byte*) append::dst#2 [phi:utoa::@7->append#2] -- register_copy + jsr append + //SEG359 [160] (word) append::return#4 ← (word) append::value#5 -- vwuz1=vwuz2 + lda append.value + sta append.return_4 + lda append.value+1 + sta append.return_4+1 + jmp b11 + //SEG360 utoa::@11 + b11: + //SEG361 [161] (word) utoa::value#2 ← (word) append::return#4 -- vwuz1=vwuz2 + lda append.return_4 + sta value + lda append.return_4+1 + sta value+1 + //SEG362 [162] (byte*) utoa::dst#2 ← ++ (byte*) utoa::dst#10 -- pbuz1=_inc_pbuz1 + inc dst + bne !+ + inc dst+1 + !: + //SEG363 [141] phi from utoa::@11 to utoa::@3 [phi:utoa::@11->utoa::@3] + b3_from_b11: + //SEG364 [141] phi (byte*) utoa::dst#13 = (byte*) utoa::dst#2 [phi:utoa::@11->utoa::@3#0] -- register_copy + //SEG365 [141] phi (word) utoa::value#10 = (word) utoa::value#2 [phi:utoa::@11->utoa::@3#1] -- register_copy + //SEG366 [141] phi (byte) utoa::bStarted#7 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:utoa::@11->utoa::@3#2] -- vbuz1=vbuc1 + lda #1 + sta bStarted + jmp b3 + //SEG367 utoa::@6 + b6: + //SEG368 [163] (byte*) append::dst#1 ← (byte*) utoa::dst#16 -- pbuz1=pbuz2 + lda dst + sta append.dst + lda dst+1 + sta append.dst+1 + //SEG369 [164] (word) append::value#2 ← (word) utoa::value#6 -- vwuz1=vwuz2 + lda value + sta append.value + lda value+1 + sta append.value+1 + //SEG370 [165] call append + //SEG371 [173] phi from utoa::@6 to append [phi:utoa::@6->append] + append_from_b6: + //SEG372 [173] phi (word) append::sub#6 = (word/signed word/dword/signed dword) $3e8 [phi:utoa::@6->append#0] -- vwuz1=vwuc1 + lda #<$3e8 + sta append.sub + lda #>$3e8 + sta append.sub+1 + //SEG373 [173] phi (word) append::value#8 = (word) append::value#2 [phi:utoa::@6->append#1] -- register_copy + //SEG374 [173] phi (byte*) append::dst#4 = (byte*) append::dst#1 [phi:utoa::@6->append#2] -- register_copy + jsr append + //SEG375 [166] (word) append::return#3 ← (word) append::value#5 -- vwuz1=vwuz2 + lda append.value + sta append.return_3 + lda append.value+1 + sta append.return_3+1 + jmp b10 + //SEG376 utoa::@10 + b10: + //SEG377 [167] (word) utoa::value#1 ← (word) append::return#3 -- vwuz1=vwuz2 + lda append.return_3 + sta value + lda append.return_3+1 + sta value+1 + //SEG378 [168] (byte*) utoa::dst#1 ← ++ (byte*) utoa::dst#16 -- pbuz1=_inc_pbuz1 + inc dst + bne !+ + inc dst+1 + !: + //SEG379 [138] phi from utoa::@10 to utoa::@2 [phi:utoa::@10->utoa::@2] + b2_from_b10: + //SEG380 [138] phi (byte*) utoa::dst#10 = (byte*) utoa::dst#1 [phi:utoa::@10->utoa::@2#0] -- register_copy + //SEG381 [138] phi (word) utoa::value#11 = (word) utoa::value#1 [phi:utoa::@10->utoa::@2#1] -- register_copy + //SEG382 [138] phi (byte) utoa::bStarted#6 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:utoa::@10->utoa::@2#2] -- vbuz1=vbuc1 + lda #1 + sta bStarted + jmp b2 + //SEG383 utoa::@5 + b5: + //SEG384 [169] (word) append::value#1 ← (word) utoa::value#4 -- vwuz1=vwuz2 + lda value + sta append.value + lda value+1 + sta append.value+1 + //SEG385 [170] call append + //SEG386 [173] phi from utoa::@5 to append [phi:utoa::@5->append] + append_from_b5: + //SEG387 [173] phi (word) append::sub#6 = (word/signed word/dword/signed dword) $2710 [phi:utoa::@5->append#0] -- vwuz1=vwuc1 + lda #<$2710 + sta append.sub + lda #>$2710 + sta append.sub+1 + //SEG388 [173] phi (word) append::value#8 = (word) append::value#1 [phi:utoa::@5->append#1] -- register_copy + //SEG389 [173] phi (byte*) append::dst#4 = (const byte[6]) myprintf::buf6#0 [phi:utoa::@5->append#2] -- pbuz1=pbuc1 + lda #myprintf.buf6 + sta append.dst+1 + jsr append + //SEG390 [171] (word) append::return#2 ← (word) append::value#5 -- vwuz1=vwuz2 + lda append.value + sta append.return + lda append.value+1 + sta append.return+1 + jmp b9 + //SEG391 utoa::@9 + b9: + //SEG392 [172] (word) utoa::value#0 ← (word) append::return#2 -- vwuz1=vwuz2 + lda append.return + sta value + lda append.return+1 + sta value+1 + //SEG393 [135] phi from utoa::@9 to utoa::@1 [phi:utoa::@9->utoa::@1] + b1_from_b9: + //SEG394 [135] phi (byte*) utoa::dst#16 = ++(const byte[6]) myprintf::buf6#0 [phi:utoa::@9->utoa::@1#0] -- pbuz1=pbuc1 + lda #myprintf.buf6+1 + sta dst+1 + //SEG395 [135] phi (word) utoa::value#6 = (word) utoa::value#0 [phi:utoa::@9->utoa::@1#1] -- register_copy + //SEG396 [135] phi (byte) utoa::bStarted#5 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:utoa::@9->utoa::@1#2] -- vbuz1=vbuc1 + lda #1 + sta bStarted + jmp b1 +} +//SEG397 append +// simple 'utoa' without using multiply or divide +// append(byte* zeropage($21) dst, word zeropage($25) value, word zeropage($23) sub) +append: { + .label value = $25 + .label return = $58 + .label dst = $21 + .label return_3 = $56 + .label return_4 = $54 + .label return_10 = $52 + .label sub = $23 + //SEG398 [174] *((byte*) append::dst#4) ← (byte) '0' -- _deref_pbuz1=vbuc1 + lda #'0' + ldy #0 + sta (dst),y + //SEG399 [175] phi from append append::@2 to append::@1 [phi:append/append::@2->append::@1] + b1_from_append: + b1_from_b2: + //SEG400 [175] phi (word) append::value#5 = (word) append::value#8 [phi:append/append::@2->append::@1#0] -- register_copy + jmp b1 + //SEG401 append::@1 + b1: + //SEG402 [176] if((word) append::value#5>=(word) append::sub#6) goto append::@2 -- vwuz1_ge_vwuz2_then_la1 + lda sub+1 + cmp value+1 + bne !+ + lda sub + cmp value + !: + bcc b2 + beq b2 + jmp breturn + //SEG403 append::@return + breturn: + //SEG404 [177] return + rts + //SEG405 append::@2 + b2: + //SEG406 [178] *((byte*) append::dst#4) ← ++ *((byte*) append::dst#4) -- _deref_pbuz1=_inc__deref_pbuz1 + ldy #0 + lda (dst),y + clc + adc #1 + ldy #0 + sta (dst),y + //SEG407 [179] (word) append::value#0 ← (word) append::value#5 - (word) append::sub#6 -- vwuz1=vwuz1_minus_vwuz2 + lda value + sec + sbc sub + sta value + lda value+1 + sbc sub+1 + sta value+1 + jmp b1_from_b2 +} +//SEG408 div10 +// div10(word zeropage($5c) val) +div10: { + .label _0 = $5a + .label _2 = $5e + .label _3 = $62 + .label _4 = $66 + .label _5 = $68 + .label val = $5c + .label val_1 = $60 + .label val_2 = $64 + .label val_3 = $6a + .label return = $6c + .label val_4 = $3a + .label return_2 = $3c + //SEG409 [180] (word~) div10::$0 ← (word) div10::val#4 >> (byte/signed byte/word/signed word/dword/signed dword) 1 -- vwuz1=vwuz2_ror_1 + lda val_4+1 + lsr + sta _0+1 + lda val_4 + ror + sta _0 + //SEG410 [181] (word) div10::val#0 ← (word~) div10::$0 + (byte/signed byte/word/signed word/dword/signed dword) 1 -- vwuz1=vwuz2_plus_1 + lda _0 + clc + adc #1 + sta val + lda _0+1 + adc #0 + sta val+1 + //SEG411 [182] (word~) div10::$2 ← (word) div10::val#0 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vwuz1=vwuz2_rol_1 + lda val + asl + sta _2 + lda val+1 + rol + sta _2+1 + //SEG412 [183] (word) div10::val#1 ← (word) div10::val#0 + (word~) div10::$2 -- vwuz1=vwuz2_plus_vwuz3 + lda val + clc + adc _2 + sta val_1 + lda val+1 + adc _2+1 + sta val_1+1 + //SEG413 [184] (word~) div10::$3 ← (word) div10::val#1 >> (byte/signed byte/word/signed word/dword/signed dword) 4 -- vwuz1=vwuz2_ror_4 + lda val_1+1 + sta _3+1 + lda val_1 + sta _3 + ldy #4 + !: + lsr _3+1 + ror _3 + dey + bne !- + //SEG414 [185] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 -- vwuz1=vwuz2_plus_vwuz3 + lda val_1 + clc + adc _3 + sta val_2 + lda val_1+1 + adc _3+1 + sta val_2+1 + //SEG415 [186] (word~) div10::$4 ← (word) div10::val#2 >> (byte/signed byte/word/signed word/dword/signed dword) 4 -- vwuz1=vwuz2_ror_4 + lda val_2+1 + sta _4+1 + lda val_2 + sta _4 + ldy #4 + !: + lsr _4+1 + ror _4 + dey + bne !- + //SEG416 [187] (word~) div10::$5 ← (word~) div10::$4 >> (byte/signed byte/word/signed word/dword/signed dword) 4 -- vwuz1=vwuz2_ror_4 + lda _4+1 + sta _5+1 + lda _4 + sta _5 + ldy #4 + !: + lsr _5+1 + ror _5 + dey + bne !- + //SEG417 [188] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$5 -- vwuz1=vwuz2_plus_vwuz3 + lda val_2 + clc + adc _5 + sta val_3 + lda val_2+1 + adc _5+1 + sta val_3+1 + //SEG418 [189] (word) div10::return#0 ← (word) div10::val#3 >> (byte/signed byte/word/signed word/dword/signed dword) 4 -- vwuz1=vwuz2_ror_4 + lda val_3+1 + sta return+1 + lda val_3 + sta return + ldy #4 + !: + lsr return+1 + ror return + dey + bne !- + jmp breturn + //SEG419 div10::@return + breturn: + //SEG420 [190] return + rts +} +//SEG421 div16u +// Performs division on two 16 bit unsigned words +// Returns the quotient dividend/divisor. +// The remainder will be set into the global variable rem16u +// Implemented using simple binary division +// div16u(word zeropage($2e) dividend) +div16u: { + .label divisor = $a + .label return = $70 + .label dividend = $2e + .label return_2 = $30 + //SEG422 [191] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 -- vwuz1=vwuz2 + lda dividend + sta divr16u.dividend + lda dividend+1 + sta divr16u.dividend+1 + //SEG423 [192] call divr16u + //SEG424 [196] phi from div16u to divr16u [phi:div16u->divr16u] + divr16u_from_div16u: + jsr divr16u + //SEG425 [193] (word) divr16u::return#2 ← (word) divr16u::return#0 -- vwuz1=vwuz2 + lda divr16u.return + sta divr16u.return_2 + lda divr16u.return+1 + sta divr16u.return_2+1 + jmp b1 + //SEG426 div16u::@1 + b1: + //SEG427 [194] (word) div16u::return#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 + lda divr16u.return_2 + sta return + lda divr16u.return_2+1 + sta return+1 + jmp breturn + //SEG428 div16u::@return + breturn: + //SEG429 [195] return + rts +} +//SEG430 divr16u +// Performs division on two 16 bit unsigned words and an initial remainder +// Returns the quotient dividend/divisor. +// The final remainder will be set into the global variable rem16u +// Implemented using simple binary division +// divr16u(word zeropage($29) dividend, word zeropage($27) rem) +divr16u: { + .label _1 = $72 + .label _2 = $73 + .label rem = $27 + .label dividend = $29 + .label quotient = $2b + .label i = $2d + .label return = $2b + .label return_2 = $6e + //SEG431 [197] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] + b1_from_divr16u: + //SEG432 [197] phi (byte) divr16u::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:divr16u->divr16u::@1#0] -- vbuz1=vbuc1 + lda #0 + sta i + //SEG433 [197] phi (word) divr16u::quotient#3 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 + lda #0 + sta quotient + lda #0 + sta quotient+1 + //SEG434 [197] phi (word) divr16u::dividend#2 = (word) divr16u::dividend#1 [phi:divr16u->divr16u::@1#2] -- register_copy + //SEG435 [197] phi (word) divr16u::rem#4 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:divr16u->divr16u::@1#3] -- vwuz1=vbuc1 + lda #0 + sta rem + lda #0 + sta rem+1 + jmp b1 + //SEG436 [197] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] + b1_from_b3: + //SEG437 [197] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy + //SEG438 [197] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy + //SEG439 [197] phi (word) divr16u::dividend#2 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy + //SEG440 [197] phi (word) divr16u::rem#4 = (word) divr16u::rem#9 [phi:divr16u::@3->divr16u::@1#3] -- register_copy + jmp b1 + //SEG441 divr16u::@1 + b1: + //SEG442 [198] (word) divr16u::rem#0 ← (word) divr16u::rem#4 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vwuz1=vwuz1_rol_1 + asl rem + rol rem+1 + //SEG443 [199] (byte~) divr16u::$1 ← > (word) divr16u::dividend#2 -- vbuz1=_hi_vwuz2 + lda dividend+1 + sta _1 + //SEG444 [200] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte/word/signed word/dword/signed dword) $80 -- vbuz1=vbuz2_band_vbuc1 + lda #$80 + and _1 + sta _2 + //SEG445 [201] if((byte~) divr16u::$2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16u::@2 -- vbuz1_eq_0_then_la1 + lda _2 + cmp #0 + beq b2_from_b1 + jmp b4 + //SEG446 divr16u::@4 + b4: + //SEG447 [202] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte/signed byte/word/signed word/dword/signed dword) 1 -- vwuz1=vwuz1_bor_vbuc1 + lda #1 + ora rem + sta rem + //SEG448 [203] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] + b2_from_b1: + b2_from_b4: + //SEG449 [203] phi (word) divr16u::rem#5 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy + jmp b2 + //SEG450 divr16u::@2 + b2: + //SEG451 [204] (word) divr16u::dividend#0 ← (word) divr16u::dividend#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vwuz1=vwuz1_rol_1 + asl dividend + rol dividend+1 + //SEG452 [205] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vwuz1=vwuz1_rol_1 + asl quotient + rol quotient+1 + //SEG453 [206] if((word) divr16u::rem#5<(const word) div16u::divisor#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 + lda rem+1 + cmp #>div16u.divisor + bcc b3_from_b2 + bne !+ + lda rem + cmp #div16u.divisor + sta rem+1 + //SEG457 [209] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] + b3_from_b2: + b3_from_b5: + //SEG458 [209] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy + //SEG459 [209] phi (word) divr16u::rem#9 = (word) divr16u::rem#5 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy + jmp b3 + //SEG460 divr16u::@3 + b3: + //SEG461 [210] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuz1=_inc_vbuz1 + inc i + //SEG462 [211] if((byte) divr16u::i#1!=(byte/signed byte/word/signed word/dword/signed dword) $10) goto divr16u::@1 -- vbuz1_neq_vbuc1_then_la1 + lda #$10 + cmp i + bne b1_from_b3 + jmp breturn + //SEG463 divr16u::@return + breturn: + //SEG464 [212] return + rts +} + // "char buf16[16]" is the normal way -- not supported + strTemp: .fill $64, 0 + +REGISTER UPLIFT POTENTIAL REGISTERS +Statement [4] *((const byte*) VICBANK#0) ← (byte/signed byte/word/signed word/dword/signed dword) $17 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [5] *((const byte*) zp1#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [7] *((const byte*) TIMEHI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ main::u#11 ] ( main:2 [ main::u#11 ] ) always clobbers reg byte a +Statement [8] *((const byte*) TIMELO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ main::u#11 ] ( main:2 [ main::u#11 ] ) always clobbers reg byte a +Statement [9] *((const byte*) zp2#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ main::u#11 ] ( main:2 [ main::u#11 ] ) always clobbers reg byte a +Statement [10] (word) div16u::dividend#0 ← (word) main::u#11 [ main::u#11 div16u::dividend#0 ] ( main:2 [ main::u#11 div16u::dividend#0 ] ) always clobbers reg byte a +Statement [12] (word) div16u::return#2 ← (word) div16u::return#0 [ main::u#11 div16u::return#2 ] ( main:2 [ main::u#11 div16u::return#2 ] ) always clobbers reg byte a +Statement [13] (word) main::v#1 ← (word) div16u::return#2 [ main::u#11 main::v#1 ] ( main:2 [ main::u#11 main::v#1 ] ) always clobbers reg byte a +Statement [15] if(*((const byte*) zp2#0)<(byte/word/signed word/dword/signed dword) $c8) goto main::@2 [ main::u#11 main::v#1 ] ( main:2 [ main::u#11 main::v#1 ] ) always clobbers reg byte a +Statement [16] (word~) main::$2 ← ((word)) *((const byte*) TIMEHI#0) [ main::u#11 main::v#1 main::$2 ] ( main:2 [ main::u#11 main::v#1 main::$2 ] ) always clobbers reg byte a +Statement [17] (word~) main::$3 ← (word~) main::$2 << (byte/signed byte/word/signed word/dword/signed dword) 8 [ main::u#11 main::v#1 main::$3 ] ( main:2 [ main::u#11 main::v#1 main::$3 ] ) always clobbers reg byte a reg byte y +Statement [18] (word~) main::$4 ← ((word)) *((const byte*) TIMELO#0) [ main::u#11 main::v#1 main::$3 main::$4 ] ( main:2 [ main::u#11 main::v#1 main::$3 main::$4 ] ) always clobbers reg byte a +Statement [19] (word) myprintf::w3#0 ← (word~) main::$3 + (word~) main::$4 [ main::u#11 main::v#1 myprintf::w3#0 ] ( main:2 [ main::u#11 main::v#1 myprintf::w3#0 ] ) always clobbers reg byte a +Statement [20] (word) myprintf::w1#0 ← (word) main::u#11 [ main::u#11 main::v#1 myprintf::w3#0 myprintf::w1#0 ] ( main:2 [ main::u#11 main::v#1 myprintf::w3#0 myprintf::w1#0 ] ) always clobbers reg byte a +Statement [21] (word) myprintf::w2#0 ← (word) main::v#1 [ main::u#11 myprintf::w3#0 myprintf::w1#0 myprintf::w2#0 ] ( main:2 [ main::u#11 myprintf::w3#0 myprintf::w1#0 myprintf::w2#0 ] ) always clobbers reg byte a +Statement [25] (word) main::u#2 ← (word) main::u#11 - (word/signed word/dword/signed dword) $4d2 [ main::u#2 ] ( main:2 [ main::u#2 ] ) always clobbers reg byte a +Statement [27] if(*((const byte*) zp1#0)<(byte/signed byte/word/signed word/dword/signed dword) $a) goto main::@1 [ main::u#2 ] ( main:2 [ main::u#2 ] ) always clobbers reg byte a +Statement [28] *((const byte*) zp1#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [30] *((const byte*) TIMEHI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ main::u#15 ] ( main:2 [ main::u#15 ] ) always clobbers reg byte a +Statement [31] *((const byte*) TIMELO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ main::u#15 ] ( main:2 [ main::u#15 ] ) always clobbers reg byte a +Statement [32] *((const byte*) zp2#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ main::u#15 ] ( main:2 [ main::u#15 ] ) always clobbers reg byte a +Statement [33] (word) div10::val#4 ← (word) main::u#15 [ main::u#15 div10::val#4 ] ( main:2 [ main::u#15 div10::val#4 ] ) always clobbers reg byte a +Statement [35] (word) div10::return#2 ← (word) div10::return#0 [ main::u#15 div10::return#2 ] ( main:2 [ main::u#15 div10::return#2 ] ) always clobbers reg byte a +Statement [36] (word) main::v#2 ← (word) div10::return#2 [ main::u#15 main::v#2 ] ( main:2 [ main::u#15 main::v#2 ] ) always clobbers reg byte a +Statement [38] if(*((const byte*) zp2#0)<(byte/word/signed word/dword/signed dword) $c8) goto main::@6 [ main::u#15 main::v#2 ] ( main:2 [ main::u#15 main::v#2 ] ) always clobbers reg byte a +Statement [39] (word~) main::$11 ← ((word)) *((const byte*) TIMEHI#0) [ main::u#15 main::v#2 main::$11 ] ( main:2 [ main::u#15 main::v#2 main::$11 ] ) always clobbers reg byte a +Statement [40] (word~) main::$12 ← (word~) main::$11 << (byte/signed byte/word/signed word/dword/signed dword) 8 [ main::u#15 main::v#2 main::$12 ] ( main:2 [ main::u#15 main::v#2 main::$12 ] ) always clobbers reg byte a reg byte y +Statement [41] (word~) main::$13 ← ((word)) *((const byte*) TIMELO#0) [ main::u#15 main::v#2 main::$12 main::$13 ] ( main:2 [ main::u#15 main::v#2 main::$12 main::$13 ] ) always clobbers reg byte a +Statement [42] (word) myprintf::w3#1 ← (word~) main::$12 + (word~) main::$13 [ main::u#15 main::v#2 myprintf::w3#1 ] ( main:2 [ main::u#15 main::v#2 myprintf::w3#1 ] ) always clobbers reg byte a +Statement [43] (word) myprintf::w1#1 ← (word) main::u#15 [ main::u#15 main::v#2 myprintf::w3#1 myprintf::w1#1 ] ( main:2 [ main::u#15 main::v#2 myprintf::w3#1 myprintf::w1#1 ] ) always clobbers reg byte a +Statement [44] (word) myprintf::w2#1 ← (word) main::v#2 [ main::u#15 myprintf::w3#1 myprintf::w1#1 myprintf::w2#1 ] ( main:2 [ main::u#15 myprintf::w3#1 myprintf::w1#1 myprintf::w2#1 ] ) always clobbers reg byte a +Statement [48] (word) main::u#4 ← (word) main::u#15 - (word/signed word/dword/signed dword) $4d2 [ main::u#4 ] ( main:2 [ main::u#4 ] ) always clobbers reg byte a +Statement [50] if(*((const byte*) zp1#0)<(byte/signed byte/word/signed word/dword/signed dword) $a) goto main::@5 [ main::u#4 ] ( main:2 [ main::u#4 ] ) always clobbers reg byte a +Statement asm { ldy#0 loop: ldastrTemp,y beqdone jsr$FFD2 iny jmploop done: } always clobbers reg byte a reg byte x reg byte y +Statement [56] (byte) myprintf::b#1 ← *((byte*) myprintf::str#10) [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bFormat#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#1 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bFormat#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#1 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bFormat#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#1 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:14 [ myprintf::bFormat#10 myprintf::bFormat#4 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:14 [ myprintf::bFormat#10 myprintf::bFormat#4 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:15 [ myprintf::bArg#12 myprintf::bArg#10 myprintf::bArg#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:15 [ myprintf::bArg#12 myprintf::bArg#10 myprintf::bArg#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:24 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#14 myprintf::return#0 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:24 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#14 myprintf::return#0 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:18 [ myprintf::bTrailing#10 myprintf::bTrailing#21 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:18 [ myprintf::bTrailing#10 myprintf::bTrailing#21 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:25 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#14 myprintf::bDigits#24 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:25 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#14 myprintf::bDigits#24 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:19 [ myprintf::bLeadZero#10 myprintf::bLeadZero#18 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:19 [ myprintf::bLeadZero#10 myprintf::bLeadZero#18 ] +Statement [61] if(*((byte*) myprintf::str#0)!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@1 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bFormat#4 myprintf::bArg#10 myprintf::return#0 myprintf::w#17 myprintf::bTrailing#21 myprintf::bDigits#24 myprintf::bLeadZero#18 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bFormat#4 myprintf::bArg#10 myprintf::return#0 myprintf::w#17 myprintf::bTrailing#21 myprintf::bDigits#24 myprintf::bLeadZero#18 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bFormat#4 myprintf::bArg#10 myprintf::return#0 myprintf::w#17 myprintf::bTrailing#21 myprintf::bDigits#24 myprintf::bLeadZero#18 ] ) always clobbers reg byte a reg byte y +Statement [62] *((const byte[$64]) strTemp#0 + (byte) myprintf::return#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2::myprintf:22 [ main::u#11 ] main:2::myprintf:45 [ main::u#15 ] ) always clobbers reg byte a +Statement [71] (word~) myprintf::$17 ← (word) myprintf::w#10 >> (byte/signed byte/word/signed word/dword/signed dword) 4 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$17 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$17 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$17 ] ) always clobbers reg byte a reg byte y +Statement [72] (byte) myprintf::b#15 ← (word~) myprintf::$17 & (byte/signed byte/word/signed word/dword/signed dword) $f [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#15 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#15 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#15 ] ) always clobbers reg byte a +Statement [76] (byte~) myprintf::$23 ← (byte~) myprintf::$22 + (byte) myprintf::b#15 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$23 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$23 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$23 ] ) always clobbers reg byte a +Statement [79] (byte) myprintf::b#16 ← (word) myprintf::w#10 & (byte/signed byte/word/signed word/dword/signed dword) $f [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::bLen#10 myprintf::b#16 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::bLen#10 myprintf::b#16 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::bLen#10 myprintf::b#16 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:74 [ myprintf::bLen#10 ] +Statement [83] (byte~) myprintf::$29 ← (byte~) myprintf::$28 + (byte) myprintf::b#16 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::bLen#10 myprintf::$29 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::bLen#10 myprintf::$29 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::bLen#10 myprintf::$29 ] ) always clobbers reg byte a +Statement [86] (word) utoa::value#4 ← (word) myprintf::w#10 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#4 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#4 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#4 ] ) always clobbers reg byte a +Statement [89] if(*((const byte[6]) myprintf::buf6#0 + (byte) myprintf::b#17)!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@13 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#17 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#17 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#17 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:22 [ myprintf::b#17 myprintf::b#5 ] +Statement [93] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#12) ← *((const byte[6]) myprintf::buf6#0 + (byte) myprintf::digit#3) [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bLeadZero#10 myprintf::bDigits#16 myprintf::b#17 myprintf::digit#3 myprintf::bLen#12 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bLeadZero#10 myprintf::bDigits#16 myprintf::b#17 myprintf::digit#3 myprintf::bLen#12 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bLeadZero#10 myprintf::bDigits#16 myprintf::b#17 myprintf::digit#3 myprintf::bLen#12 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:23 [ myprintf::digit#3 myprintf::digit#2 ] +Statement [100] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#13) ← (byte) ' ' [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bLeadZero#10 myprintf::b#17 myprintf::bLen#13 myprintf::bDigits#8 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bLeadZero#10 myprintf::b#17 myprintf::bLen#13 myprintf::bDigits#8 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bLeadZero#10 myprintf::b#17 myprintf::bLen#13 myprintf::bDigits#8 ] ) always clobbers reg byte a +Statement [114] (byte~) myprintf::$47 ← ((byte)) (word) myprintf::w#10 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$47 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$47 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$47 ] ) always clobbers reg byte a +Statement [122] (word~) myprintf::w#53 ← (word) myprintf::w3#7 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#53 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#53 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#53 ] ) always clobbers reg byte a +Statement [125] (word~) myprintf::w#52 ← (word) myprintf::w2#7 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#52 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#52 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#52 ] ) always clobbers reg byte a +Statement [126] (word~) myprintf::w#51 ← (word) myprintf::w1#6 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#51 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#51 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#51 ] ) always clobbers reg byte a +Statement [132] (byte) myprintf::b#6 ← (byte) myprintf::b#1 + (byte/signed byte/word/signed word/dword/signed dword) $20 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bFormat#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#6 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bFormat#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#6 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bFormat#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#6 ] ) always clobbers reg byte a +Statement [134] if((word) utoa::value#4>=(word/signed word/dword/signed dword) $2710) goto utoa::@5 [ utoa::value#4 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#4 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#4 ] ) always clobbers reg byte a +Statement [137] if((word) utoa::value#6>=(word/signed word/dword/signed dword) $3e8) goto utoa::@6 [ utoa::bStarted#5 utoa::value#6 utoa::dst#16 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::bStarted#5 utoa::value#6 utoa::dst#16 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::bStarted#5 utoa::value#6 utoa::dst#16 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:28 [ utoa::bStarted#7 utoa::bStarted#6 utoa::bStarted#5 ] +Statement [140] if((word) utoa::value#11>=(byte/signed byte/word/signed word/dword/signed dword) $64) goto utoa::@7 [ utoa::bStarted#6 utoa::value#11 utoa::dst#10 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::bStarted#6 utoa::value#11 utoa::dst#10 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::bStarted#6 utoa::value#11 utoa::dst#10 ] ) always clobbers reg byte a +Statement [143] if((word) utoa::value#10>=(byte/signed byte/word/signed word/dword/signed dword) $a) goto utoa::@8 [ utoa::value#10 utoa::dst#13 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#10 utoa::dst#13 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#10 utoa::dst#13 ] ) always clobbers reg byte a +Statement [145] (byte~) utoa::$16 ← ((byte)) (word) utoa::value#12 [ utoa::dst#12 utoa::$16 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#12 utoa::$16 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#12 utoa::$16 ] ) always clobbers reg byte a +Statement [147] *((byte*) utoa::dst#12) ← (byte~) utoa::$17 [ utoa::dst#12 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#12 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#12 ] ) always clobbers reg byte y +Statement [148] (byte*) utoa::dst#3 ← ++ (byte*) utoa::dst#12 [ utoa::dst#3 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#3 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#3 ] ) always clobbers reg byte a +Statement [149] *((byte*) utoa::dst#3) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 ] ) always clobbers reg byte a reg byte y +Statement [151] (byte*) append::dst#3 ← (byte*) utoa::dst#13 [ utoa::value#10 utoa::dst#13 append::dst#3 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#10 utoa::dst#13 append::dst#3 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#10 utoa::dst#13 append::dst#3 ] ) always clobbers reg byte a +Statement [152] (word) append::value#4 ← (word) utoa::value#10 [ utoa::dst#13 append::dst#3 append::value#4 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::dst#3 append::value#4 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::dst#3 append::value#4 ] ) always clobbers reg byte a +Statement [154] (word) append::return#10 ← (word) append::value#5 [ utoa::dst#13 append::return#10 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::return#10 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::return#10 ] ) always clobbers reg byte a +Statement [155] (word) utoa::value#3 ← (word) append::return#10 [ utoa::dst#13 utoa::value#3 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 utoa::value#3 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 utoa::value#3 ] ) always clobbers reg byte a +Statement [157] (byte*) append::dst#2 ← (byte*) utoa::dst#10 [ utoa::value#11 utoa::dst#10 append::dst#2 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#11 utoa::dst#10 append::dst#2 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#11 utoa::dst#10 append::dst#2 ] ) always clobbers reg byte a +Statement [158] (word) append::value#3 ← (word) utoa::value#11 [ utoa::dst#10 append::dst#2 append::value#3 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::dst#2 append::value#3 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::dst#2 append::value#3 ] ) always clobbers reg byte a +Statement [160] (word) append::return#4 ← (word) append::value#5 [ utoa::dst#10 append::return#4 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::return#4 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::return#4 ] ) always clobbers reg byte a +Statement [161] (word) utoa::value#2 ← (word) append::return#4 [ utoa::dst#10 utoa::value#2 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 utoa::value#2 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 utoa::value#2 ] ) always clobbers reg byte a +Statement [163] (byte*) append::dst#1 ← (byte*) utoa::dst#16 [ utoa::value#6 utoa::dst#16 append::dst#1 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#6 utoa::dst#16 append::dst#1 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#6 utoa::dst#16 append::dst#1 ] ) always clobbers reg byte a +Statement [164] (word) append::value#2 ← (word) utoa::value#6 [ utoa::dst#16 append::dst#1 append::value#2 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::dst#1 append::value#2 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::dst#1 append::value#2 ] ) always clobbers reg byte a +Statement [166] (word) append::return#3 ← (word) append::value#5 [ utoa::dst#16 append::return#3 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::return#3 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::return#3 ] ) always clobbers reg byte a +Statement [167] (word) utoa::value#1 ← (word) append::return#3 [ utoa::dst#16 utoa::value#1 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 utoa::value#1 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 utoa::value#1 ] ) always clobbers reg byte a +Statement [169] (word) append::value#1 ← (word) utoa::value#4 [ append::value#1 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::value#1 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::value#1 ] ) always clobbers reg byte a +Statement [171] (word) append::return#2 ← (word) append::value#5 [ append::return#2 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::return#2 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::return#2 ] ) always clobbers reg byte a +Statement [172] (word) utoa::value#0 ← (word) append::return#2 [ utoa::value#0 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#0 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#0 ] ) always clobbers reg byte a +Statement [174] *((byte*) append::dst#4) ← (byte) '0' [ append::dst#4 append::value#8 append::sub#6 ] ( main:2::myprintf:22::utoa:87::append:153 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:45::utoa:87::append:153 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:22::utoa:87::append:159 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:45::utoa:87::append:159 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:22::utoa:87::append:165 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:45::utoa:87::append:165 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:22::utoa:87::append:170 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:45::utoa:87::append:170 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::dst#4 append::value#8 append::sub#6 ] ) always clobbers reg byte a reg byte y +Statement [176] if((word) append::value#5>=(word) append::sub#6) goto append::@2 [ append::value#5 append::dst#4 append::sub#6 ] ( main:2::myprintf:22::utoa:87::append:153 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:87::append:153 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:22::utoa:87::append:159 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:87::append:159 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:22::utoa:87::append:165 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:87::append:165 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:22::utoa:87::append:170 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:87::append:170 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::value#5 append::dst#4 append::sub#6 ] ) always clobbers reg byte a +Statement [178] *((byte*) append::dst#4) ← ++ *((byte*) append::dst#4) [ append::value#5 append::dst#4 append::sub#6 ] ( main:2::myprintf:22::utoa:87::append:153 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:87::append:153 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:22::utoa:87::append:159 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:87::append:159 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:22::utoa:87::append:165 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:87::append:165 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:22::utoa:87::append:170 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:87::append:170 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::value#5 append::dst#4 append::sub#6 ] ) always clobbers reg byte a reg byte y +Statement [179] (word) append::value#0 ← (word) append::value#5 - (word) append::sub#6 [ append::dst#4 append::sub#6 append::value#0 ] ( main:2::myprintf:22::utoa:87::append:153 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:45::utoa:87::append:153 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:22::utoa:87::append:159 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:45::utoa:87::append:159 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:22::utoa:87::append:165 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:45::utoa:87::append:165 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:22::utoa:87::append:170 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:45::utoa:87::append:170 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::dst#4 append::sub#6 append::value#0 ] ) always clobbers reg byte a +Statement [180] (word~) div10::$0 ← (word) div10::val#4 >> (byte/signed byte/word/signed word/dword/signed dword) 1 [ div10::$0 ] ( main:2::div10:34 [ main::u#15 div10::$0 ] ) always clobbers reg byte a +Statement [181] (word) div10::val#0 ← (word~) div10::$0 + (byte/signed byte/word/signed word/dword/signed dword) 1 [ div10::val#0 ] ( main:2::div10:34 [ main::u#15 div10::val#0 ] ) always clobbers reg byte a +Statement [182] (word~) div10::$2 ← (word) div10::val#0 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ div10::val#0 div10::$2 ] ( main:2::div10:34 [ main::u#15 div10::val#0 div10::$2 ] ) always clobbers reg byte a +Statement [183] (word) div10::val#1 ← (word) div10::val#0 + (word~) div10::$2 [ div10::val#1 ] ( main:2::div10:34 [ main::u#15 div10::val#1 ] ) always clobbers reg byte a +Statement [184] (word~) div10::$3 ← (word) div10::val#1 >> (byte/signed byte/word/signed word/dword/signed dword) 4 [ div10::val#1 div10::$3 ] ( main:2::div10:34 [ main::u#15 div10::val#1 div10::$3 ] ) always clobbers reg byte a reg byte y +Statement [185] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 [ div10::val#2 ] ( main:2::div10:34 [ main::u#15 div10::val#2 ] ) always clobbers reg byte a +Statement [186] (word~) div10::$4 ← (word) div10::val#2 >> (byte/signed byte/word/signed word/dword/signed dword) 4 [ div10::val#2 div10::$4 ] ( main:2::div10:34 [ main::u#15 div10::val#2 div10::$4 ] ) always clobbers reg byte a reg byte y +Statement [187] (word~) div10::$5 ← (word~) div10::$4 >> (byte/signed byte/word/signed word/dword/signed dword) 4 [ div10::val#2 div10::$5 ] ( main:2::div10:34 [ main::u#15 div10::val#2 div10::$5 ] ) always clobbers reg byte a reg byte y +Statement [188] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$5 [ div10::val#3 ] ( main:2::div10:34 [ main::u#15 div10::val#3 ] ) always clobbers reg byte a +Statement [189] (word) div10::return#0 ← (word) div10::val#3 >> (byte/signed byte/word/signed word/dword/signed dword) 4 [ div10::return#0 ] ( main:2::div10:34 [ main::u#15 div10::return#0 ] ) always clobbers reg byte a reg byte y +Statement [191] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 [ divr16u::dividend#1 ] ( main:2::div16u:11 [ main::u#11 divr16u::dividend#1 ] ) always clobbers reg byte a +Statement [193] (word) divr16u::return#2 ← (word) divr16u::return#0 [ divr16u::return#2 ] ( main:2::div16u:11 [ main::u#11 divr16u::return#2 ] ) always clobbers reg byte a +Statement [194] (word) div16u::return#0 ← (word) divr16u::return#2 [ div16u::return#0 ] ( main:2::div16u:11 [ main::u#11 div16u::return#0 ] ) always clobbers reg byte a +Statement [199] (byte~) divr16u::$1 ← > (word) divr16u::dividend#2 [ divr16u::dividend#2 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ( main:2::div16u:11::divr16u:192 [ main::u#11 divr16u::dividend#2 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:45 [ divr16u::i#2 divr16u::i#1 ] +Statement [202] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte/signed byte/word/signed word/dword/signed dword) 1 [ divr16u::dividend#2 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ( main:2::div16u:11::divr16u:192 [ main::u#11 divr16u::dividend#2 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ) always clobbers reg byte a +Statement [206] if((word) divr16u::rem#5<(const word) div16u::divisor#0) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#5 divr16u::quotient#1 ] ( main:2::div16u:11::divr16u:192 [ main::u#11 divr16u::i#2 divr16u::dividend#0 divr16u::rem#5 divr16u::quotient#1 ] ) always clobbers reg byte a +Statement [208] (word) divr16u::rem#2 ← (word) divr16u::rem#5 - (const word) div16u::divisor#0 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:2::div16u:11::divr16u:192 [ main::u#11 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ) always clobbers reg byte a +Statement [4] *((const byte*) VICBANK#0) ← (byte/signed byte/word/signed word/dword/signed dword) $17 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [5] *((const byte*) zp1#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [7] *((const byte*) TIMEHI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ main::u#11 ] ( main:2 [ main::u#11 ] ) always clobbers reg byte a +Statement [8] *((const byte*) TIMELO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ main::u#11 ] ( main:2 [ main::u#11 ] ) always clobbers reg byte a +Statement [9] *((const byte*) zp2#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ main::u#11 ] ( main:2 [ main::u#11 ] ) always clobbers reg byte a +Statement [10] (word) div16u::dividend#0 ← (word) main::u#11 [ main::u#11 div16u::dividend#0 ] ( main:2 [ main::u#11 div16u::dividend#0 ] ) always clobbers reg byte a +Statement [12] (word) div16u::return#2 ← (word) div16u::return#0 [ main::u#11 div16u::return#2 ] ( main:2 [ main::u#11 div16u::return#2 ] ) always clobbers reg byte a +Statement [13] (word) main::v#1 ← (word) div16u::return#2 [ main::u#11 main::v#1 ] ( main:2 [ main::u#11 main::v#1 ] ) always clobbers reg byte a +Statement [15] if(*((const byte*) zp2#0)<(byte/word/signed word/dword/signed dword) $c8) goto main::@2 [ main::u#11 main::v#1 ] ( main:2 [ main::u#11 main::v#1 ] ) always clobbers reg byte a +Statement [16] (word~) main::$2 ← ((word)) *((const byte*) TIMEHI#0) [ main::u#11 main::v#1 main::$2 ] ( main:2 [ main::u#11 main::v#1 main::$2 ] ) always clobbers reg byte a +Statement [17] (word~) main::$3 ← (word~) main::$2 << (byte/signed byte/word/signed word/dword/signed dword) 8 [ main::u#11 main::v#1 main::$3 ] ( main:2 [ main::u#11 main::v#1 main::$3 ] ) always clobbers reg byte a reg byte y +Statement [18] (word~) main::$4 ← ((word)) *((const byte*) TIMELO#0) [ main::u#11 main::v#1 main::$3 main::$4 ] ( main:2 [ main::u#11 main::v#1 main::$3 main::$4 ] ) always clobbers reg byte a +Statement [19] (word) myprintf::w3#0 ← (word~) main::$3 + (word~) main::$4 [ main::u#11 main::v#1 myprintf::w3#0 ] ( main:2 [ main::u#11 main::v#1 myprintf::w3#0 ] ) always clobbers reg byte a +Statement [20] (word) myprintf::w1#0 ← (word) main::u#11 [ main::u#11 main::v#1 myprintf::w3#0 myprintf::w1#0 ] ( main:2 [ main::u#11 main::v#1 myprintf::w3#0 myprintf::w1#0 ] ) always clobbers reg byte a +Statement [21] (word) myprintf::w2#0 ← (word) main::v#1 [ main::u#11 myprintf::w3#0 myprintf::w1#0 myprintf::w2#0 ] ( main:2 [ main::u#11 myprintf::w3#0 myprintf::w1#0 myprintf::w2#0 ] ) always clobbers reg byte a +Statement [25] (word) main::u#2 ← (word) main::u#11 - (word/signed word/dword/signed dword) $4d2 [ main::u#2 ] ( main:2 [ main::u#2 ] ) always clobbers reg byte a +Statement [27] if(*((const byte*) zp1#0)<(byte/signed byte/word/signed word/dword/signed dword) $a) goto main::@1 [ main::u#2 ] ( main:2 [ main::u#2 ] ) always clobbers reg byte a +Statement [28] *((const byte*) zp1#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [30] *((const byte*) TIMEHI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ main::u#15 ] ( main:2 [ main::u#15 ] ) always clobbers reg byte a +Statement [31] *((const byte*) TIMELO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ main::u#15 ] ( main:2 [ main::u#15 ] ) always clobbers reg byte a +Statement [32] *((const byte*) zp2#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ main::u#15 ] ( main:2 [ main::u#15 ] ) always clobbers reg byte a +Statement [33] (word) div10::val#4 ← (word) main::u#15 [ main::u#15 div10::val#4 ] ( main:2 [ main::u#15 div10::val#4 ] ) always clobbers reg byte a +Statement [35] (word) div10::return#2 ← (word) div10::return#0 [ main::u#15 div10::return#2 ] ( main:2 [ main::u#15 div10::return#2 ] ) always clobbers reg byte a +Statement [36] (word) main::v#2 ← (word) div10::return#2 [ main::u#15 main::v#2 ] ( main:2 [ main::u#15 main::v#2 ] ) always clobbers reg byte a +Statement [38] if(*((const byte*) zp2#0)<(byte/word/signed word/dword/signed dword) $c8) goto main::@6 [ main::u#15 main::v#2 ] ( main:2 [ main::u#15 main::v#2 ] ) always clobbers reg byte a +Statement [39] (word~) main::$11 ← ((word)) *((const byte*) TIMEHI#0) [ main::u#15 main::v#2 main::$11 ] ( main:2 [ main::u#15 main::v#2 main::$11 ] ) always clobbers reg byte a +Statement [40] (word~) main::$12 ← (word~) main::$11 << (byte/signed byte/word/signed word/dword/signed dword) 8 [ main::u#15 main::v#2 main::$12 ] ( main:2 [ main::u#15 main::v#2 main::$12 ] ) always clobbers reg byte a reg byte y +Statement [41] (word~) main::$13 ← ((word)) *((const byte*) TIMELO#0) [ main::u#15 main::v#2 main::$12 main::$13 ] ( main:2 [ main::u#15 main::v#2 main::$12 main::$13 ] ) always clobbers reg byte a +Statement [42] (word) myprintf::w3#1 ← (word~) main::$12 + (word~) main::$13 [ main::u#15 main::v#2 myprintf::w3#1 ] ( main:2 [ main::u#15 main::v#2 myprintf::w3#1 ] ) always clobbers reg byte a +Statement [43] (word) myprintf::w1#1 ← (word) main::u#15 [ main::u#15 main::v#2 myprintf::w3#1 myprintf::w1#1 ] ( main:2 [ main::u#15 main::v#2 myprintf::w3#1 myprintf::w1#1 ] ) always clobbers reg byte a +Statement [44] (word) myprintf::w2#1 ← (word) main::v#2 [ main::u#15 myprintf::w3#1 myprintf::w1#1 myprintf::w2#1 ] ( main:2 [ main::u#15 myprintf::w3#1 myprintf::w1#1 myprintf::w2#1 ] ) always clobbers reg byte a +Statement [48] (word) main::u#4 ← (word) main::u#15 - (word/signed word/dword/signed dword) $4d2 [ main::u#4 ] ( main:2 [ main::u#4 ] ) always clobbers reg byte a +Statement [50] if(*((const byte*) zp1#0)<(byte/signed byte/word/signed word/dword/signed dword) $a) goto main::@5 [ main::u#4 ] ( main:2 [ main::u#4 ] ) always clobbers reg byte a +Statement asm { ldy#0 loop: ldastrTemp,y beqdone jsr$FFD2 iny jmploop done: } always clobbers reg byte a reg byte x reg byte y +Statement [56] (byte) myprintf::b#1 ← *((byte*) myprintf::str#10) [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bFormat#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#1 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bFormat#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#1 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bFormat#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#1 ] ) always clobbers reg byte a reg byte y +Statement [61] if(*((byte*) myprintf::str#0)!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@1 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bFormat#4 myprintf::bArg#10 myprintf::return#0 myprintf::w#17 myprintf::bTrailing#21 myprintf::bDigits#24 myprintf::bLeadZero#18 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bFormat#4 myprintf::bArg#10 myprintf::return#0 myprintf::w#17 myprintf::bTrailing#21 myprintf::bDigits#24 myprintf::bLeadZero#18 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#0 myprintf::bFormat#4 myprintf::bArg#10 myprintf::return#0 myprintf::w#17 myprintf::bTrailing#21 myprintf::bDigits#24 myprintf::bLeadZero#18 ] ) always clobbers reg byte a reg byte y +Statement [62] *((const byte[$64]) strTemp#0 + (byte) myprintf::return#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2::myprintf:22 [ main::u#11 ] main:2::myprintf:45 [ main::u#15 ] ) always clobbers reg byte a +Statement [71] (word~) myprintf::$17 ← (word) myprintf::w#10 >> (byte/signed byte/word/signed word/dword/signed dword) 4 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$17 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$17 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$17 ] ) always clobbers reg byte a reg byte y +Statement [72] (byte) myprintf::b#15 ← (word~) myprintf::$17 & (byte/signed byte/word/signed word/dword/signed dword) $f [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#15 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#15 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#15 ] ) always clobbers reg byte a +Statement [76] (byte~) myprintf::$23 ← (byte~) myprintf::$22 + (byte) myprintf::b#15 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$23 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$23 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$23 ] ) always clobbers reg byte a +Statement [79] (byte) myprintf::b#16 ← (word) myprintf::w#10 & (byte/signed byte/word/signed word/dword/signed dword) $f [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::bLen#10 myprintf::b#16 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::bLen#10 myprintf::b#16 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::bLen#10 myprintf::b#16 ] ) always clobbers reg byte a +Statement [83] (byte~) myprintf::$29 ← (byte~) myprintf::$28 + (byte) myprintf::b#16 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::bLen#10 myprintf::$29 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::bLen#10 myprintf::$29 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::bLen#10 myprintf::$29 ] ) always clobbers reg byte a +Statement [86] (word) utoa::value#4 ← (word) myprintf::w#10 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#4 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#4 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#4 ] ) always clobbers reg byte a +Statement [89] if(*((const byte[6]) myprintf::buf6#0 + (byte) myprintf::b#17)!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@13 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#17 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#17 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#17 ] ) always clobbers reg byte a +Statement [93] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#12) ← *((const byte[6]) myprintf::buf6#0 + (byte) myprintf::digit#3) [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bLeadZero#10 myprintf::bDigits#16 myprintf::b#17 myprintf::digit#3 myprintf::bLen#12 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bLeadZero#10 myprintf::bDigits#16 myprintf::b#17 myprintf::digit#3 myprintf::bLen#12 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bLeadZero#10 myprintf::bDigits#16 myprintf::b#17 myprintf::digit#3 myprintf::bLen#12 ] ) always clobbers reg byte a +Statement [100] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#13) ← (byte) ' ' [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bLeadZero#10 myprintf::b#17 myprintf::bLen#13 myprintf::bDigits#8 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bLeadZero#10 myprintf::b#17 myprintf::bLen#13 myprintf::bDigits#8 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::w#10 myprintf::bTrailing#10 myprintf::bLeadZero#10 myprintf::b#17 myprintf::bLen#13 myprintf::bDigits#8 ] ) always clobbers reg byte a +Statement [114] (byte~) myprintf::$47 ← ((byte)) (word) myprintf::w#10 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$47 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$47 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::$47 ] ) always clobbers reg byte a +Statement [122] (word~) myprintf::w#53 ← (word) myprintf::w3#7 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#53 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#53 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#53 ] ) always clobbers reg byte a +Statement [125] (word~) myprintf::w#52 ← (word) myprintf::w2#7 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#52 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#52 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#52 ] ) always clobbers reg byte a +Statement [126] (word~) myprintf::w#51 ← (word) myprintf::w1#6 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#51 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#51 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#51 ] ) always clobbers reg byte a +Statement [132] (byte) myprintf::b#6 ← (byte) myprintf::b#1 + (byte/signed byte/word/signed word/dword/signed dword) $20 [ myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bFormat#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#6 ] ( main:2::myprintf:22 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bFormat#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#6 ] main:2::myprintf:45 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bFormat#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 myprintf::b#6 ] ) always clobbers reg byte a +Statement [134] if((word) utoa::value#4>=(word/signed word/dword/signed dword) $2710) goto utoa::@5 [ utoa::value#4 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#4 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#4 ] ) always clobbers reg byte a +Statement [137] if((word) utoa::value#6>=(word/signed word/dword/signed dword) $3e8) goto utoa::@6 [ utoa::bStarted#5 utoa::value#6 utoa::dst#16 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::bStarted#5 utoa::value#6 utoa::dst#16 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::bStarted#5 utoa::value#6 utoa::dst#16 ] ) always clobbers reg byte a +Statement [140] if((word) utoa::value#11>=(byte/signed byte/word/signed word/dword/signed dword) $64) goto utoa::@7 [ utoa::bStarted#6 utoa::value#11 utoa::dst#10 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::bStarted#6 utoa::value#11 utoa::dst#10 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::bStarted#6 utoa::value#11 utoa::dst#10 ] ) always clobbers reg byte a +Statement [143] if((word) utoa::value#10>=(byte/signed byte/word/signed word/dword/signed dword) $a) goto utoa::@8 [ utoa::value#10 utoa::dst#13 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#10 utoa::dst#13 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#10 utoa::dst#13 ] ) always clobbers reg byte a +Statement [145] (byte~) utoa::$16 ← ((byte)) (word) utoa::value#12 [ utoa::dst#12 utoa::$16 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#12 utoa::$16 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#12 utoa::$16 ] ) always clobbers reg byte a +Statement [147] *((byte*) utoa::dst#12) ← (byte~) utoa::$17 [ utoa::dst#12 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#12 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#12 ] ) always clobbers reg byte y +Statement [148] (byte*) utoa::dst#3 ← ++ (byte*) utoa::dst#12 [ utoa::dst#3 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#3 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#3 ] ) always clobbers reg byte a +Statement [149] *((byte*) utoa::dst#3) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 ] ) always clobbers reg byte a reg byte y +Statement [151] (byte*) append::dst#3 ← (byte*) utoa::dst#13 [ utoa::value#10 utoa::dst#13 append::dst#3 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#10 utoa::dst#13 append::dst#3 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#10 utoa::dst#13 append::dst#3 ] ) always clobbers reg byte a +Statement [152] (word) append::value#4 ← (word) utoa::value#10 [ utoa::dst#13 append::dst#3 append::value#4 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::dst#3 append::value#4 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::dst#3 append::value#4 ] ) always clobbers reg byte a +Statement [154] (word) append::return#10 ← (word) append::value#5 [ utoa::dst#13 append::return#10 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::return#10 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::return#10 ] ) always clobbers reg byte a +Statement [155] (word) utoa::value#3 ← (word) append::return#10 [ utoa::dst#13 utoa::value#3 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 utoa::value#3 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 utoa::value#3 ] ) always clobbers reg byte a +Statement [157] (byte*) append::dst#2 ← (byte*) utoa::dst#10 [ utoa::value#11 utoa::dst#10 append::dst#2 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#11 utoa::dst#10 append::dst#2 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#11 utoa::dst#10 append::dst#2 ] ) always clobbers reg byte a +Statement [158] (word) append::value#3 ← (word) utoa::value#11 [ utoa::dst#10 append::dst#2 append::value#3 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::dst#2 append::value#3 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::dst#2 append::value#3 ] ) always clobbers reg byte a +Statement [160] (word) append::return#4 ← (word) append::value#5 [ utoa::dst#10 append::return#4 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::return#4 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::return#4 ] ) always clobbers reg byte a +Statement [161] (word) utoa::value#2 ← (word) append::return#4 [ utoa::dst#10 utoa::value#2 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 utoa::value#2 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 utoa::value#2 ] ) always clobbers reg byte a +Statement [163] (byte*) append::dst#1 ← (byte*) utoa::dst#16 [ utoa::value#6 utoa::dst#16 append::dst#1 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#6 utoa::dst#16 append::dst#1 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#6 utoa::dst#16 append::dst#1 ] ) always clobbers reg byte a +Statement [164] (word) append::value#2 ← (word) utoa::value#6 [ utoa::dst#16 append::dst#1 append::value#2 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::dst#1 append::value#2 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::dst#1 append::value#2 ] ) always clobbers reg byte a +Statement [166] (word) append::return#3 ← (word) append::value#5 [ utoa::dst#16 append::return#3 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::return#3 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::return#3 ] ) always clobbers reg byte a +Statement [167] (word) utoa::value#1 ← (word) append::return#3 [ utoa::dst#16 utoa::value#1 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 utoa::value#1 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 utoa::value#1 ] ) always clobbers reg byte a +Statement [169] (word) append::value#1 ← (word) utoa::value#4 [ append::value#1 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::value#1 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::value#1 ] ) always clobbers reg byte a +Statement [171] (word) append::return#2 ← (word) append::value#5 [ append::return#2 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::return#2 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::return#2 ] ) always clobbers reg byte a +Statement [172] (word) utoa::value#0 ← (word) append::return#2 [ utoa::value#0 ] ( main:2::myprintf:22::utoa:87 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#0 ] main:2::myprintf:45::utoa:87 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::value#0 ] ) always clobbers reg byte a +Statement [174] *((byte*) append::dst#4) ← (byte) '0' [ append::dst#4 append::value#8 append::sub#6 ] ( main:2::myprintf:22::utoa:87::append:153 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:45::utoa:87::append:153 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:22::utoa:87::append:159 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:45::utoa:87::append:159 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:22::utoa:87::append:165 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:45::utoa:87::append:165 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:22::utoa:87::append:170 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::dst#4 append::value#8 append::sub#6 ] main:2::myprintf:45::utoa:87::append:170 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::dst#4 append::value#8 append::sub#6 ] ) always clobbers reg byte a reg byte y +Statement [176] if((word) append::value#5>=(word) append::sub#6) goto append::@2 [ append::value#5 append::dst#4 append::sub#6 ] ( main:2::myprintf:22::utoa:87::append:153 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:87::append:153 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:22::utoa:87::append:159 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:87::append:159 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:22::utoa:87::append:165 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:87::append:165 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:22::utoa:87::append:170 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:87::append:170 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::value#5 append::dst#4 append::sub#6 ] ) always clobbers reg byte a +Statement [178] *((byte*) append::dst#4) ← ++ *((byte*) append::dst#4) [ append::value#5 append::dst#4 append::sub#6 ] ( main:2::myprintf:22::utoa:87::append:153 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:87::append:153 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:22::utoa:87::append:159 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:87::append:159 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:22::utoa:87::append:165 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:87::append:165 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:22::utoa:87::append:170 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::value#5 append::dst#4 append::sub#6 ] main:2::myprintf:45::utoa:87::append:170 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::value#5 append::dst#4 append::sub#6 ] ) always clobbers reg byte a reg byte y +Statement [179] (word) append::value#0 ← (word) append::value#5 - (word) append::sub#6 [ append::dst#4 append::sub#6 append::value#0 ] ( main:2::myprintf:22::utoa:87::append:153 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:45::utoa:87::append:153 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#13 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:22::utoa:87::append:159 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:45::utoa:87::append:159 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#10 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:22::utoa:87::append:165 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:45::utoa:87::append:165 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 utoa::dst#16 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:22::utoa:87::append:170 [ main::u#11 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::dst#4 append::sub#6 append::value#0 ] main:2::myprintf:45::utoa:87::append:170 [ main::u#15 myprintf::w1#6 myprintf::w2#7 myprintf::w3#7 myprintf::str#10 myprintf::bArg#12 myprintf::bLen#14 myprintf::w#10 myprintf::bTrailing#10 myprintf::bDigits#14 myprintf::bLeadZero#10 append::dst#4 append::sub#6 append::value#0 ] ) always clobbers reg byte a +Statement [180] (word~) div10::$0 ← (word) div10::val#4 >> (byte/signed byte/word/signed word/dword/signed dword) 1 [ div10::$0 ] ( main:2::div10:34 [ main::u#15 div10::$0 ] ) always clobbers reg byte a +Statement [181] (word) div10::val#0 ← (word~) div10::$0 + (byte/signed byte/word/signed word/dword/signed dword) 1 [ div10::val#0 ] ( main:2::div10:34 [ main::u#15 div10::val#0 ] ) always clobbers reg byte a +Statement [182] (word~) div10::$2 ← (word) div10::val#0 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ div10::val#0 div10::$2 ] ( main:2::div10:34 [ main::u#15 div10::val#0 div10::$2 ] ) always clobbers reg byte a +Statement [183] (word) div10::val#1 ← (word) div10::val#0 + (word~) div10::$2 [ div10::val#1 ] ( main:2::div10:34 [ main::u#15 div10::val#1 ] ) always clobbers reg byte a +Statement [184] (word~) div10::$3 ← (word) div10::val#1 >> (byte/signed byte/word/signed word/dword/signed dword) 4 [ div10::val#1 div10::$3 ] ( main:2::div10:34 [ main::u#15 div10::val#1 div10::$3 ] ) always clobbers reg byte a reg byte y +Statement [185] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 [ div10::val#2 ] ( main:2::div10:34 [ main::u#15 div10::val#2 ] ) always clobbers reg byte a +Statement [186] (word~) div10::$4 ← (word) div10::val#2 >> (byte/signed byte/word/signed word/dword/signed dword) 4 [ div10::val#2 div10::$4 ] ( main:2::div10:34 [ main::u#15 div10::val#2 div10::$4 ] ) always clobbers reg byte a reg byte y +Statement [187] (word~) div10::$5 ← (word~) div10::$4 >> (byte/signed byte/word/signed word/dword/signed dword) 4 [ div10::val#2 div10::$5 ] ( main:2::div10:34 [ main::u#15 div10::val#2 div10::$5 ] ) always clobbers reg byte a reg byte y +Statement [188] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$5 [ div10::val#3 ] ( main:2::div10:34 [ main::u#15 div10::val#3 ] ) always clobbers reg byte a +Statement [189] (word) div10::return#0 ← (word) div10::val#3 >> (byte/signed byte/word/signed word/dword/signed dword) 4 [ div10::return#0 ] ( main:2::div10:34 [ main::u#15 div10::return#0 ] ) always clobbers reg byte a reg byte y +Statement [191] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 [ divr16u::dividend#1 ] ( main:2::div16u:11 [ main::u#11 divr16u::dividend#1 ] ) always clobbers reg byte a +Statement [193] (word) divr16u::return#2 ← (word) divr16u::return#0 [ divr16u::return#2 ] ( main:2::div16u:11 [ main::u#11 divr16u::return#2 ] ) always clobbers reg byte a +Statement [194] (word) div16u::return#0 ← (word) divr16u::return#2 [ div16u::return#0 ] ( main:2::div16u:11 [ main::u#11 div16u::return#0 ] ) always clobbers reg byte a +Statement [199] (byte~) divr16u::$1 ← > (word) divr16u::dividend#2 [ divr16u::dividend#2 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ( main:2::div16u:11::divr16u:192 [ main::u#11 divr16u::dividend#2 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ) always clobbers reg byte a +Statement [202] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte/signed byte/word/signed word/dword/signed dword) 1 [ divr16u::dividend#2 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ( main:2::div16u:11::divr16u:192 [ main::u#11 divr16u::dividend#2 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ) always clobbers reg byte a +Statement [206] if((word) divr16u::rem#5<(const word) div16u::divisor#0) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#5 divr16u::quotient#1 ] ( main:2::div16u:11::divr16u:192 [ main::u#11 divr16u::i#2 divr16u::dividend#0 divr16u::rem#5 divr16u::quotient#1 ] ) always clobbers reg byte a +Statement [208] (word) divr16u::rem#2 ← (word) divr16u::rem#5 - (const word) div16u::divisor#0 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:2::div16u:11::divr16u:192 [ main::u#11 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ) always clobbers reg byte a +Potential registers zp ZP_WORD:2 [ main::u#11 main::u#2 ] : zp ZP_WORD:2 , +Potential registers zp ZP_WORD:4 [ main::u#15 main::u#4 ] : zp ZP_WORD:4 , +Potential registers zp ZP_WORD:6 [ myprintf::w1#6 myprintf::w1#0 myprintf::w1#1 ] : zp ZP_WORD:6 , +Potential registers zp ZP_WORD:8 [ myprintf::w2#7 myprintf::w2#0 myprintf::w2#1 ] : zp ZP_WORD:8 , +Potential registers zp ZP_WORD:10 [ myprintf::w3#7 myprintf::w3#0 myprintf::w3#1 ] : zp ZP_WORD:10 , +Potential registers zp ZP_WORD:12 [ myprintf::str#10 myprintf::str#5 myprintf::str#0 ] : zp ZP_WORD:12 , +Potential registers zp ZP_BYTE:14 [ myprintf::bFormat#10 myprintf::bFormat#4 ] : zp ZP_BYTE:14 , reg byte x , +Potential registers zp ZP_BYTE:15 [ myprintf::bArg#12 myprintf::bArg#10 myprintf::bArg#1 ] : zp ZP_BYTE:15 , reg byte x , +Potential registers zp ZP_WORD:16 [ myprintf::w#10 myprintf::w#17 myprintf::w#21 myprintf::w#51 myprintf::w#52 myprintf::w#53 ] : zp ZP_WORD:16 , +Potential registers zp ZP_BYTE:18 [ myprintf::bTrailing#10 myprintf::bTrailing#21 ] : zp ZP_BYTE:18 , reg byte x , +Potential registers zp ZP_BYTE:19 [ myprintf::bLeadZero#10 myprintf::bLeadZero#18 ] : zp ZP_BYTE:19 , reg byte x , +Potential registers zp ZP_BYTE:20 [ myprintf::$22 ] : zp ZP_BYTE:20 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:21 [ myprintf::$28 ] : zp ZP_BYTE:21 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:22 [ myprintf::b#17 myprintf::b#5 ] : zp ZP_BYTE:22 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:23 [ myprintf::digit#3 myprintf::digit#2 ] : zp ZP_BYTE:23 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:24 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#14 myprintf::return#0 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] : zp ZP_BYTE:24 , reg byte x , +Potential registers zp ZP_BYTE:25 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#14 myprintf::bDigits#24 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] : zp ZP_BYTE:25 , reg byte x , +Potential registers zp ZP_BYTE:26 [ myprintf::$39 ] : zp ZP_BYTE:26 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:27 [ myprintf::b#25 myprintf::b#1 myprintf::b#6 ] : zp ZP_BYTE:27 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:28 [ utoa::bStarted#7 utoa::bStarted#6 utoa::bStarted#5 ] : zp ZP_BYTE:28 , reg byte x , reg byte y , +Potential registers zp ZP_WORD:29 [ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 ] : zp ZP_WORD:29 , +Potential registers zp ZP_WORD:31 [ utoa::dst#12 utoa::dst#4 utoa::dst#13 utoa::dst#2 utoa::dst#10 utoa::dst#16 utoa::dst#1 ] : zp ZP_WORD:31 , +Potential registers zp ZP_WORD:33 [ append::dst#4 append::dst#1 append::dst#2 append::dst#3 ] : zp ZP_WORD:33 , +Potential registers zp ZP_WORD:35 [ append::sub#6 ] : zp ZP_WORD:35 , +Potential registers zp ZP_WORD:37 [ append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 ] : zp ZP_WORD:37 , +Potential registers zp ZP_WORD:39 [ divr16u::rem#4 divr16u::rem#9 divr16u::rem#5 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] : zp ZP_WORD:39 , +Potential registers zp ZP_WORD:41 [ divr16u::dividend#2 divr16u::dividend#1 divr16u::dividend#0 ] : zp ZP_WORD:41 , +Potential registers zp ZP_WORD:43 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] : zp ZP_WORD:43 , +Potential registers zp ZP_BYTE:45 [ divr16u::i#2 divr16u::i#1 ] : zp ZP_BYTE:45 , reg byte x , reg byte y , +Potential registers zp ZP_WORD:46 [ div16u::dividend#0 ] : zp ZP_WORD:46 , +Potential registers zp ZP_WORD:48 [ div16u::return#2 ] : zp ZP_WORD:48 , +Potential registers zp ZP_WORD:50 [ main::v#1 ] : zp ZP_WORD:50 , +Potential registers zp ZP_WORD:52 [ main::$2 ] : zp ZP_WORD:52 , +Potential registers zp ZP_WORD:54 [ main::$3 ] : zp ZP_WORD:54 , +Potential registers zp ZP_WORD:56 [ main::$4 ] : zp ZP_WORD:56 , +Potential registers zp ZP_WORD:58 [ div10::val#4 ] : zp ZP_WORD:58 , +Potential registers zp ZP_WORD:60 [ div10::return#2 ] : zp ZP_WORD:60 , +Potential registers zp ZP_WORD:62 [ main::v#2 ] : zp ZP_WORD:62 , +Potential registers zp ZP_WORD:64 [ main::$11 ] : zp ZP_WORD:64 , +Potential registers zp ZP_WORD:66 [ main::$12 ] : zp ZP_WORD:66 , +Potential registers zp ZP_WORD:68 [ main::$13 ] : zp ZP_WORD:68 , +Potential registers zp ZP_WORD:70 [ myprintf::$17 ] : zp ZP_WORD:70 , +Potential registers zp ZP_BYTE:72 [ myprintf::b#15 ] : zp ZP_BYTE:72 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:73 [ myprintf::$23 ] : zp ZP_BYTE:73 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:74 [ myprintf::bLen#10 ] : zp ZP_BYTE:74 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:75 [ myprintf::b#16 ] : zp ZP_BYTE:75 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:76 [ myprintf::$29 ] : zp ZP_BYTE:76 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:77 [ myprintf::$47 ] : zp ZP_BYTE:77 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:78 [ utoa::$16 ] : zp ZP_BYTE:78 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:79 [ utoa::$17 ] : zp ZP_BYTE:79 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:80 [ utoa::dst#3 ] : zp ZP_WORD:80 , +Potential registers zp ZP_WORD:82 [ append::return#10 ] : zp ZP_WORD:82 , +Potential registers zp ZP_WORD:84 [ append::return#4 ] : zp ZP_WORD:84 , +Potential registers zp ZP_WORD:86 [ append::return#3 ] : zp ZP_WORD:86 , +Potential registers zp ZP_WORD:88 [ append::return#2 ] : zp ZP_WORD:88 , +Potential registers zp ZP_WORD:90 [ div10::$0 ] : zp ZP_WORD:90 , +Potential registers zp ZP_WORD:92 [ div10::val#0 ] : zp ZP_WORD:92 , +Potential registers zp ZP_WORD:94 [ div10::$2 ] : zp ZP_WORD:94 , +Potential registers zp ZP_WORD:96 [ div10::val#1 ] : zp ZP_WORD:96 , +Potential registers zp ZP_WORD:98 [ div10::$3 ] : zp ZP_WORD:98 , +Potential registers zp ZP_WORD:100 [ div10::val#2 ] : zp ZP_WORD:100 , +Potential registers zp ZP_WORD:102 [ div10::$4 ] : zp ZP_WORD:102 , +Potential registers zp ZP_WORD:104 [ div10::$5 ] : zp ZP_WORD:104 , +Potential registers zp ZP_WORD:106 [ div10::val#3 ] : zp ZP_WORD:106 , +Potential registers zp ZP_WORD:108 [ div10::return#0 ] : zp ZP_WORD:108 , +Potential registers zp ZP_WORD:110 [ divr16u::return#2 ] : zp ZP_WORD:110 , +Potential registers zp ZP_WORD:112 [ div16u::return#0 ] : zp ZP_WORD:112 , +Potential registers zp ZP_BYTE:114 [ divr16u::$1 ] : zp ZP_BYTE:114 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:115 [ divr16u::$2 ] : zp ZP_BYTE:115 , reg byte a , reg byte x , reg byte y , + +REGISTER UPLIFT SCOPES +Uplift Scope [myprintf] 9,874.62: zp ZP_BYTE:24 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#14 myprintf::return#0 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] 7,278.24: zp ZP_BYTE:25 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#14 myprintf::bDigits#24 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] 2,502.5: zp ZP_BYTE:23 [ myprintf::digit#3 myprintf::digit#2 ] 2,250.32: zp ZP_BYTE:22 [ myprintf::b#17 myprintf::b#5 ] 1,058.97: zp ZP_WORD:16 [ myprintf::w#10 myprintf::w#17 myprintf::w#21 myprintf::w#51 myprintf::w#52 myprintf::w#53 ] 1,001: zp ZP_BYTE:26 [ myprintf::$39 ] 631.25: zp ZP_BYTE:27 [ myprintf::b#25 myprintf::b#1 myprintf::b#6 ] 450.29: zp ZP_BYTE:15 [ myprintf::bArg#12 myprintf::bArg#10 myprintf::bArg#1 ] 208.73: zp ZP_BYTE:14 [ myprintf::bFormat#10 myprintf::bFormat#4 ] 202: zp ZP_WORD:70 [ myprintf::$17 ] 202: zp ZP_BYTE:73 [ myprintf::$23 ] 202: zp ZP_BYTE:76 [ myprintf::$29 ] 202: zp ZP_BYTE:77 [ myprintf::$47 ] 191.15: zp ZP_BYTE:19 [ myprintf::bLeadZero#10 myprintf::bLeadZero#18 ] 179.05: zp ZP_BYTE:18 [ myprintf::bTrailing#10 myprintf::bTrailing#21 ] 157.62: zp ZP_WORD:12 [ myprintf::str#10 myprintf::str#5 myprintf::str#0 ] 101: zp ZP_BYTE:20 [ myprintf::$22 ] 101: zp ZP_BYTE:21 [ myprintf::$28 ] 75.75: zp ZP_BYTE:72 [ myprintf::b#15 ] 75.75: zp ZP_BYTE:75 [ myprintf::b#16 ] 45.6: zp ZP_WORD:8 [ myprintf::w2#7 myprintf::w2#0 myprintf::w2#1 ] 43.29: zp ZP_BYTE:74 [ myprintf::bLen#10 ] 23.6: zp ZP_WORD:6 [ myprintf::w1#6 myprintf::w1#0 myprintf::w1#1 ] 16.26: zp ZP_WORD:10 [ myprintf::w3#7 myprintf::w3#0 myprintf::w3#1 ] +Uplift Scope [divr16u] 8,758.75: zp ZP_WORD:39 [ divr16u::rem#4 divr16u::rem#9 divr16u::rem#5 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] 3,353.75: zp ZP_WORD:43 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] 2,002: zp ZP_BYTE:114 [ divr16u::$1 ] 2,002: zp ZP_BYTE:115 [ divr16u::$2 ] 1,655.5: zp ZP_BYTE:45 [ divr16u::i#2 divr16u::i#1 ] 681.54: zp ZP_WORD:41 [ divr16u::dividend#2 divr16u::dividend#1 divr16u::dividend#0 ] 4: zp ZP_WORD:110 [ divr16u::return#2 ] +Uplift Scope [append] 2,399.62: zp ZP_WORD:37 [ append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 ] 341: zp ZP_WORD:33 [ append::dst#4 append::dst#1 append::dst#2 append::dst#3 ] 333.67: zp ZP_WORD:35 [ append::sub#6 ] 4: zp ZP_WORD:82 [ append::return#10 ] 4: zp ZP_WORD:84 [ append::return#4 ] 4: zp ZP_WORD:86 [ append::return#3 ] 4: zp ZP_WORD:88 [ append::return#2 ] +Uplift Scope [div10] 202: zp ZP_WORD:60 [ div10::return#2 ] 103: zp ZP_WORD:58 [ div10::val#4 ] 34.33: zp ZP_WORD:108 [ div10::return#0 ] 4: zp ZP_WORD:90 [ div10::$0 ] 4: zp ZP_WORD:94 [ div10::$2 ] 4: zp ZP_WORD:98 [ div10::$3 ] 4: zp ZP_WORD:102 [ div10::$4 ] 4: zp ZP_WORD:104 [ div10::$5 ] 4: zp ZP_WORD:106 [ div10::val#3 ] 3: zp ZP_WORD:92 [ div10::val#0 ] 3: zp ZP_WORD:96 [ div10::val#1 ] 2: zp ZP_WORD:100 [ div10::val#2 ] +Uplift Scope [div16u] 202: zp ZP_WORD:48 [ div16u::return#2 ] 103: zp ZP_WORD:46 [ div16u::dividend#0 ] 34.33: zp ZP_WORD:112 [ div16u::return#0 ] +Uplift Scope [main] 22: zp ZP_WORD:52 [ main::$2 ] 22: zp ZP_WORD:56 [ main::$4 ] 22: zp ZP_WORD:64 [ main::$11 ] 22: zp ZP_WORD:68 [ main::$13 ] 14.39: zp ZP_WORD:2 [ main::u#11 main::u#2 ] 14.39: zp ZP_WORD:4 [ main::u#15 main::u#4 ] 14: zp ZP_WORD:50 [ main::v#1 ] 14: zp ZP_WORD:62 [ main::v#2 ] 11: zp ZP_WORD:54 [ main::$3 ] 11: zp ZP_WORD:66 [ main::$12 ] +Uplift Scope [utoa] 59.17: zp ZP_WORD:29 [ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 ] 17.25: zp ZP_WORD:31 [ utoa::dst#12 utoa::dst#4 utoa::dst#13 utoa::dst#2 utoa::dst#10 utoa::dst#16 utoa::dst#1 ] 7.33: zp ZP_BYTE:28 [ utoa::bStarted#7 utoa::bStarted#6 utoa::bStarted#5 ] 4: zp ZP_BYTE:78 [ utoa::$16 ] 4: zp ZP_BYTE:79 [ utoa::$17 ] 4: zp ZP_WORD:80 [ utoa::dst#3 ] +Uplift Scope [Print] +Uplift Scope [] + +Uplifting [myprintf] best 464045 combination zp ZP_BYTE:24 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#14 myprintf::return#0 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] zp ZP_BYTE:25 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#14 myprintf::bDigits#24 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] zp ZP_BYTE:23 [ myprintf::digit#3 myprintf::digit#2 ] reg byte x [ myprintf::b#17 myprintf::b#5 ] zp ZP_WORD:16 [ myprintf::w#10 myprintf::w#17 myprintf::w#21 myprintf::w#51 myprintf::w#52 myprintf::w#53 ] reg byte a [ myprintf::$39 ] zp ZP_BYTE:27 [ myprintf::b#25 myprintf::b#1 myprintf::b#6 ] zp ZP_BYTE:15 [ myprintf::bArg#12 myprintf::bArg#10 myprintf::bArg#1 ] zp ZP_BYTE:14 [ myprintf::bFormat#10 myprintf::bFormat#4 ] zp ZP_WORD:70 [ myprintf::$17 ] zp ZP_BYTE:73 [ myprintf::$23 ] zp ZP_BYTE:76 [ myprintf::$29 ] zp ZP_BYTE:77 [ myprintf::$47 ] zp ZP_BYTE:19 [ myprintf::bLeadZero#10 myprintf::bLeadZero#18 ] zp ZP_BYTE:18 [ myprintf::bTrailing#10 myprintf::bTrailing#21 ] zp ZP_WORD:12 [ myprintf::str#10 myprintf::str#5 myprintf::str#0 ] zp ZP_BYTE:20 [ myprintf::$22 ] zp ZP_BYTE:21 [ myprintf::$28 ] zp ZP_BYTE:72 [ myprintf::b#15 ] zp ZP_BYTE:75 [ myprintf::b#16 ] zp ZP_WORD:8 [ myprintf::w2#7 myprintf::w2#0 myprintf::w2#1 ] zp ZP_BYTE:74 [ myprintf::bLen#10 ] zp ZP_WORD:6 [ myprintf::w1#6 myprintf::w1#0 myprintf::w1#1 ] zp ZP_WORD:10 [ myprintf::w3#7 myprintf::w3#0 myprintf::w3#1 ] +Limited combination testing to 100 combinations of 452984832 possible. +Uplifting [divr16u] best 443045 combination zp ZP_WORD:39 [ divr16u::rem#4 divr16u::rem#9 divr16u::rem#5 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:43 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:41 [ divr16u::dividend#2 divr16u::dividend#1 divr16u::dividend#0 ] zp ZP_WORD:110 [ divr16u::return#2 ] +Uplifting [append] best 443045 combination zp ZP_WORD:37 [ append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 ] zp ZP_WORD:33 [ append::dst#4 append::dst#1 append::dst#2 append::dst#3 ] zp ZP_WORD:35 [ append::sub#6 ] zp ZP_WORD:82 [ append::return#10 ] zp ZP_WORD:84 [ append::return#4 ] zp ZP_WORD:86 [ append::return#3 ] zp ZP_WORD:88 [ append::return#2 ] +Uplifting [div10] best 443045 combination zp ZP_WORD:60 [ div10::return#2 ] zp ZP_WORD:58 [ div10::val#4 ] zp ZP_WORD:108 [ div10::return#0 ] zp ZP_WORD:90 [ div10::$0 ] zp ZP_WORD:94 [ div10::$2 ] zp ZP_WORD:98 [ div10::$3 ] zp ZP_WORD:102 [ div10::$4 ] zp ZP_WORD:104 [ div10::$5 ] zp ZP_WORD:106 [ div10::val#3 ] zp ZP_WORD:92 [ div10::val#0 ] zp ZP_WORD:96 [ div10::val#1 ] zp ZP_WORD:100 [ div10::val#2 ] +Uplifting [div16u] best 443045 combination zp ZP_WORD:48 [ div16u::return#2 ] zp ZP_WORD:46 [ div16u::dividend#0 ] zp ZP_WORD:112 [ div16u::return#0 ] +Uplifting [main] best 443045 combination zp ZP_WORD:52 [ main::$2 ] zp ZP_WORD:56 [ main::$4 ] zp ZP_WORD:64 [ main::$11 ] zp ZP_WORD:68 [ main::$13 ] zp ZP_WORD:2 [ main::u#11 main::u#2 ] zp ZP_WORD:4 [ main::u#15 main::u#4 ] zp ZP_WORD:50 [ main::v#1 ] zp ZP_WORD:62 [ main::v#2 ] zp ZP_WORD:54 [ main::$3 ] zp ZP_WORD:66 [ main::$12 ] +Uplifting [utoa] best 443014 combination zp ZP_WORD:29 [ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 ] zp ZP_WORD:31 [ utoa::dst#12 utoa::dst#4 utoa::dst#13 utoa::dst#2 utoa::dst#10 utoa::dst#16 utoa::dst#1 ] reg byte x [ utoa::bStarted#7 utoa::bStarted#6 utoa::bStarted#5 ] reg byte a [ utoa::$16 ] reg byte a [ utoa::$17 ] zp ZP_WORD:80 [ utoa::dst#3 ] +Uplifting [Print] best 443014 combination +Uplifting [] best 443014 combination +Attempting to uplift remaining variables inzp ZP_BYTE:24 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#14 myprintf::return#0 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] +Uplifting [myprintf] best 443014 combination zp ZP_BYTE:24 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#14 myprintf::return#0 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] +Attempting to uplift remaining variables inzp ZP_BYTE:25 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#14 myprintf::bDigits#24 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] +Uplifting [myprintf] best 443014 combination zp ZP_BYTE:25 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#14 myprintf::bDigits#24 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] +Attempting to uplift remaining variables inzp ZP_BYTE:23 [ myprintf::digit#3 myprintf::digit#2 ] +Uplifting [myprintf] best 443014 combination zp ZP_BYTE:23 [ myprintf::digit#3 myprintf::digit#2 ] +Attempting to uplift remaining variables inzp ZP_BYTE:27 [ myprintf::b#25 myprintf::b#1 myprintf::b#6 ] +Uplifting [myprintf] best 439264 combination reg byte x [ myprintf::b#25 myprintf::b#1 myprintf::b#6 ] +Attempting to uplift remaining variables inzp ZP_BYTE:15 [ myprintf::bArg#12 myprintf::bArg#10 myprintf::bArg#1 ] +Uplifting [myprintf] best 439264 combination zp ZP_BYTE:15 [ myprintf::bArg#12 myprintf::bArg#10 myprintf::bArg#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:14 [ myprintf::bFormat#10 myprintf::bFormat#4 ] +Uplifting [myprintf] best 439264 combination zp ZP_BYTE:14 [ myprintf::bFormat#10 myprintf::bFormat#4 ] +Attempting to uplift remaining variables inzp ZP_BYTE:73 [ myprintf::$23 ] +Uplifting [myprintf] best 438664 combination reg byte a [ myprintf::$23 ] +Attempting to uplift remaining variables inzp ZP_BYTE:76 [ myprintf::$29 ] +Uplifting [myprintf] best 438064 combination reg byte a [ myprintf::$29 ] +Attempting to uplift remaining variables inzp ZP_BYTE:77 [ myprintf::$47 ] +Uplifting [myprintf] best 437464 combination reg byte a [ myprintf::$47 ] +Attempting to uplift remaining variables inzp ZP_BYTE:19 [ myprintf::bLeadZero#10 myprintf::bLeadZero#18 ] +Uplifting [myprintf] best 437464 combination zp ZP_BYTE:19 [ myprintf::bLeadZero#10 myprintf::bLeadZero#18 ] +Attempting to uplift remaining variables inzp ZP_BYTE:18 [ myprintf::bTrailing#10 myprintf::bTrailing#21 ] +Uplifting [myprintf] best 437464 combination zp ZP_BYTE:18 [ myprintf::bTrailing#10 myprintf::bTrailing#21 ] +Attempting to uplift remaining variables inzp ZP_BYTE:20 [ myprintf::$22 ] +Uplifting [myprintf] best 436564 combination reg byte a [ myprintf::$22 ] +Attempting to uplift remaining variables inzp ZP_BYTE:21 [ myprintf::$28 ] +Uplifting [myprintf] best 435664 combination reg byte a [ myprintf::$28 ] +Attempting to uplift remaining variables inzp ZP_BYTE:72 [ myprintf::b#15 ] +Uplifting [myprintf] best 435564 combination reg byte x [ myprintf::b#15 ] +Attempting to uplift remaining variables inzp ZP_BYTE:75 [ myprintf::b#16 ] +Uplifting [myprintf] best 435464 combination reg byte x [ myprintf::b#16 ] +Attempting to uplift remaining variables inzp ZP_BYTE:74 [ myprintf::bLen#10 ] +Uplifting [myprintf] best 434564 combination reg byte y [ myprintf::bLen#10 ] +Coalescing zero page register with common assignment [ zp ZP_WORD:29 [ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 ] ] with [ zp ZP_WORD:37 [ append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 ] ] - score: 4 +Coalescing zero page register with common assignment [ zp ZP_WORD:31 [ utoa::dst#12 utoa::dst#4 utoa::dst#13 utoa::dst#2 utoa::dst#10 utoa::dst#16 utoa::dst#1 ] ] with [ zp ZP_WORD:33 [ append::dst#4 append::dst#1 append::dst#2 append::dst#3 ] ] - score: 3 +Coalescing zero page register with common assignment [ zp ZP_WORD:2 [ main::u#11 main::u#2 ] ] with [ zp ZP_WORD:6 [ myprintf::w1#6 myprintf::w1#0 myprintf::w1#1 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:2 [ main::u#11 main::u#2 myprintf::w1#6 myprintf::w1#0 myprintf::w1#1 ] ] with [ zp ZP_WORD:46 [ div16u::dividend#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:4 [ main::u#15 main::u#4 ] ] with [ zp ZP_WORD:58 [ div10::val#4 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:8 [ myprintf::w2#7 myprintf::w2#0 myprintf::w2#1 ] ] with [ zp ZP_WORD:50 [ main::v#1 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:8 [ myprintf::w2#7 myprintf::w2#0 myprintf::w2#1 main::v#1 ] ] with [ zp ZP_WORD:62 [ main::v#2 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:10 [ myprintf::w3#7 myprintf::w3#0 myprintf::w3#1 ] ] with [ zp ZP_WORD:54 [ main::$3 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:10 [ myprintf::w3#7 myprintf::w3#0 myprintf::w3#1 main::$3 ] ] with [ zp ZP_WORD:66 [ main::$12 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:29 [ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 ] ] with [ zp ZP_WORD:82 [ append::return#10 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:29 [ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 append::return#10 ] ] with [ zp ZP_WORD:84 [ append::return#4 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:29 [ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 append::return#10 append::return#4 ] ] with [ zp ZP_WORD:86 [ append::return#3 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:29 [ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 append::return#10 append::return#4 append::return#3 ] ] with [ zp ZP_WORD:88 [ append::return#2 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:31 [ utoa::dst#12 utoa::dst#4 utoa::dst#13 utoa::dst#2 utoa::dst#10 utoa::dst#16 utoa::dst#1 append::dst#4 append::dst#1 append::dst#2 append::dst#3 ] ] with [ zp ZP_WORD:80 [ utoa::dst#3 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:43 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] ] with [ zp ZP_WORD:110 [ divr16u::return#2 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:48 [ div16u::return#2 ] ] with [ zp ZP_WORD:112 [ div16u::return#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:60 [ div10::return#2 ] ] with [ zp ZP_WORD:108 [ div10::return#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:90 [ div10::$0 ] ] with [ zp ZP_WORD:92 [ div10::val#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:94 [ div10::$2 ] ] with [ zp ZP_WORD:96 [ div10::val#1 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:98 [ div10::$3 ] ] with [ zp ZP_WORD:100 [ div10::val#2 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:102 [ div10::$4 ] ] with [ zp ZP_WORD:104 [ div10::$5 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:2 [ main::u#11 main::u#2 myprintf::w1#6 myprintf::w1#0 myprintf::w1#1 div16u::dividend#0 ] ] with [ zp ZP_WORD:4 [ main::u#15 main::u#4 div10::val#4 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:8 [ myprintf::w2#7 myprintf::w2#0 myprintf::w2#1 main::v#1 main::v#2 ] ] with [ zp ZP_WORD:48 [ div16u::return#2 div16u::return#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:8 [ myprintf::w2#7 myprintf::w2#0 myprintf::w2#1 main::v#1 main::v#2 div16u::return#2 div16u::return#0 ] ] with [ zp ZP_WORD:60 [ div10::return#2 div10::return#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:10 [ myprintf::w3#7 myprintf::w3#0 myprintf::w3#1 main::$3 main::$12 ] ] with [ zp ZP_WORD:52 [ main::$2 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:10 [ myprintf::w3#7 myprintf::w3#0 myprintf::w3#1 main::$3 main::$12 main::$2 ] ] with [ zp ZP_WORD:64 [ main::$11 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:98 [ div10::$3 div10::val#2 ] ] with [ zp ZP_WORD:106 [ div10::val#3 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:8 [ myprintf::w2#7 myprintf::w2#0 myprintf::w2#1 main::v#1 main::v#2 div16u::return#2 div16u::return#0 div10::return#2 div10::return#0 ] ] with [ zp ZP_WORD:43 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:8 [ myprintf::w2#7 myprintf::w2#0 myprintf::w2#1 main::v#1 main::v#2 div16u::return#2 div16u::return#0 div10::return#2 div10::return#0 divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 ] ] with [ zp ZP_WORD:98 [ div10::$3 div10::val#2 div10::val#3 ] ] - score: 1 +Coalescing zero page register [ zp ZP_WORD:8 [ myprintf::w2#7 myprintf::w2#0 myprintf::w2#1 main::v#1 main::v#2 div16u::return#2 div16u::return#0 div10::return#2 div10::return#0 divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 div10::$3 div10::val#2 div10::val#3 ] ] with [ zp ZP_WORD:90 [ div10::$0 div10::val#0 ] ] +Coalescing zero page register [ zp ZP_WORD:10 [ myprintf::w3#7 myprintf::w3#0 myprintf::w3#1 main::$3 main::$12 main::$2 main::$11 ] ] with [ zp ZP_WORD:39 [ divr16u::rem#4 divr16u::rem#9 divr16u::rem#5 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] ] +Coalescing zero page register [ zp ZP_WORD:10 [ myprintf::w3#7 myprintf::w3#0 myprintf::w3#1 main::$3 main::$12 main::$2 main::$11 divr16u::rem#4 divr16u::rem#9 divr16u::rem#5 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] ] with [ zp ZP_WORD:94 [ div10::$2 div10::val#1 ] ] +Coalescing zero page register [ zp ZP_WORD:10 [ myprintf::w3#7 myprintf::w3#0 myprintf::w3#1 main::$3 main::$12 main::$2 main::$11 divr16u::rem#4 divr16u::rem#9 divr16u::rem#5 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 div10::$2 div10::val#1 ] ] with [ zp ZP_WORD:102 [ div10::$4 div10::$5 ] ] +Coalescing zero page register [ zp ZP_WORD:12 [ myprintf::str#10 myprintf::str#5 myprintf::str#0 ] ] with [ zp ZP_WORD:41 [ divr16u::dividend#2 divr16u::dividend#1 divr16u::dividend#0 ] ] +Coalescing zero page register [ zp ZP_WORD:12 [ myprintf::str#10 myprintf::str#5 myprintf::str#0 divr16u::dividend#2 divr16u::dividend#1 divr16u::dividend#0 ] ] with [ zp ZP_WORD:56 [ main::$4 ] ] +Coalescing zero page register [ zp ZP_WORD:12 [ myprintf::str#10 myprintf::str#5 myprintf::str#0 divr16u::dividend#2 divr16u::dividend#1 divr16u::dividend#0 main::$4 ] ] with [ zp ZP_WORD:68 [ main::$13 ] ] +Coalescing zero page register [ zp ZP_BYTE:14 [ myprintf::bFormat#10 myprintf::bFormat#4 ] ] with [ zp ZP_BYTE:23 [ myprintf::digit#3 myprintf::digit#2 ] ] +Coalescing zero page register [ zp ZP_WORD:29 [ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 append::return#10 append::return#4 append::return#3 append::return#2 ] ] with [ zp ZP_WORD:70 [ myprintf::$17 ] ] +Allocated (was zp ZP_WORD:8) zp ZP_WORD:4 [ myprintf::w2#7 myprintf::w2#0 myprintf::w2#1 main::v#1 main::v#2 div16u::return#2 div16u::return#0 div10::return#2 div10::return#0 divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 div10::$3 div10::val#2 div10::val#3 div10::$0 div10::val#0 ] +Allocated (was zp ZP_WORD:10) zp ZP_WORD:6 [ myprintf::w3#7 myprintf::w3#0 myprintf::w3#1 main::$3 main::$12 main::$2 main::$11 divr16u::rem#4 divr16u::rem#9 divr16u::rem#5 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 div10::$2 div10::val#1 div10::$4 div10::$5 ] +Allocated (was zp ZP_WORD:12) zp ZP_WORD:8 [ myprintf::str#10 myprintf::str#5 myprintf::str#0 divr16u::dividend#2 divr16u::dividend#1 divr16u::dividend#0 main::$4 main::$13 ] +Allocated (was zp ZP_BYTE:14) zp ZP_BYTE:10 [ myprintf::bFormat#10 myprintf::bFormat#4 myprintf::digit#3 myprintf::digit#2 ] +Allocated (was zp ZP_BYTE:15) zp ZP_BYTE:11 [ myprintf::bArg#12 myprintf::bArg#10 myprintf::bArg#1 ] +Allocated (was zp ZP_WORD:16) zp ZP_WORD:12 [ myprintf::w#10 myprintf::w#17 myprintf::w#21 myprintf::w#51 myprintf::w#52 myprintf::w#53 ] +Allocated (was zp ZP_BYTE:18) zp ZP_BYTE:14 [ myprintf::bTrailing#10 myprintf::bTrailing#21 ] +Allocated (was zp ZP_BYTE:19) zp ZP_BYTE:15 [ myprintf::bLeadZero#10 myprintf::bLeadZero#18 ] +Allocated (was zp ZP_BYTE:24) zp ZP_BYTE:16 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#14 myprintf::return#0 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] +Allocated (was zp ZP_BYTE:25) zp ZP_BYTE:17 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#14 myprintf::bDigits#24 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] +Allocated (was zp ZP_WORD:29) zp ZP_WORD:18 [ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 append::return#10 append::return#4 append::return#3 append::return#2 myprintf::$17 ] +Allocated (was zp ZP_WORD:31) zp ZP_WORD:20 [ utoa::dst#12 utoa::dst#4 utoa::dst#13 utoa::dst#2 utoa::dst#10 utoa::dst#16 utoa::dst#1 append::dst#4 append::dst#1 append::dst#2 append::dst#3 utoa::dst#3 ] +Allocated (was zp ZP_WORD:35) zp ZP_WORD:22 [ append::sub#6 ] + +ASSEMBLER BEFORE OPTIMIZATION +//SEG0 File Comments +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" +//SEG2 Global Constants & labels + .label zp1 = $61 + // #define zp1 *(byte *)0x61 -- allows "zp1" vs "*zp1" below -- not supported -- + .label zp2 = $62 + .label TIMEHI = $a1 + .label TIMELO = $a2 + .label VICBANK = $d018 +//SEG3 @begin +bbegin: +//SEG4 [1] phi from @begin to @1 [phi:@begin->@1] +b1_from_bbegin: + jmp b1 +//SEG5 @1 +b1: +//SEG6 [2] call main + jsr main +//SEG7 [3] phi from @1 to @end [phi:@1->@end] +bend_from_b1: + jmp bend +//SEG8 @end +bend: +//SEG9 main +main: { + .label _2 = 6 + .label _3 = 6 + .label _4 = 8 + .label _11 = 6 + .label _12 = 6 + .label _13 = 8 + .label v = 4 + .label u = 2 + //SEG10 [4] *((const byte*) VICBANK#0) ← (byte/signed byte/word/signed word/dword/signed dword) $17 -- _deref_pbuc1=vbuc2 + lda #$17 + sta VICBANK + //SEG11 [5] *((const byte*) zp1#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta zp1 + //SEG12 [6] phi from main to main::@1 [phi:main->main::@1] + b1_from_main: + //SEG13 [6] phi (word) main::u#11 = (word/signed word/dword/signed dword) $6e85 [phi:main->main::@1#0] -- vwuz1=vwuc1 + lda #<$6e85 + sta u + lda #>$6e85 + sta u+1 + jmp b1 + //SEG14 [6] phi from main::@10 to main::@1 [phi:main::@10->main::@1] + b1_from_b10: + //SEG15 [6] phi (word) main::u#11 = (word) main::u#2 [phi:main::@10->main::@1#0] -- register_copy + jmp b1 + //SEG16 main::@1 + b1: + //SEG17 [7] *((const byte*) TIMEHI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta TIMEHI + //SEG18 [8] *((const byte*) TIMELO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta TIMELO + //SEG19 [9] *((const byte*) zp2#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta zp2 + jmp b2 + //SEG20 main::@2 + b2: + //SEG21 [10] (word) div16u::dividend#0 ← (word) main::u#11 + //SEG22 [11] call div16u + jsr div16u + //SEG23 [12] (word) div16u::return#2 ← (word) div16u::return#0 + jmp b8 + //SEG24 main::@8 + b8: + //SEG25 [13] (word) main::v#1 ← (word) div16u::return#2 + //SEG26 [14] *((const byte*) zp2#0) ← ++ *((const byte*) zp2#0) -- _deref_pbuc1=_inc__deref_pbuc1 + inc zp2 + //SEG27 [15] if(*((const byte*) zp2#0)<(byte/word/signed word/dword/signed dword) $c8) goto main::@2 -- _deref_pbuc1_lt_vbuc2_then_la1 + lda zp2 + cmp #$c8 + bcc b2 + jmp b3 + //SEG28 main::@3 + b3: + //SEG29 [16] (word~) main::$2 ← ((word)) *((const byte*) TIMEHI#0) -- vwuz1=_word__deref_pbuc1 + lda TIMEHI + sta _2 + lda #0 + sta _2+1 + //SEG30 [17] (word~) main::$3 ← (word~) main::$2 << (byte/signed byte/word/signed word/dword/signed dword) 8 -- vwuz1=vwuz1_rol_vbuc1 + ldy #8 + cpy #0 + beq !e+ + !: + asl _3 + rol _3+1 + dey + bne !- + !e: + //SEG31 [18] (word~) main::$4 ← ((word)) *((const byte*) TIMELO#0) -- vwuz1=_word__deref_pbuc1 + lda TIMELO + sta _4 + lda #0 + sta _4+1 + //SEG32 [19] (word) myprintf::w3#0 ← (word~) main::$3 + (word~) main::$4 -- vwuz1=vwuz1_plus_vwuz2 + lda myprintf.w3 + clc + adc _4 + sta myprintf.w3 + lda myprintf.w3+1 + adc _4+1 + sta myprintf.w3+1 + //SEG33 [20] (word) myprintf::w1#0 ← (word) main::u#11 + //SEG34 [21] (word) myprintf::w2#0 ← (word) main::v#1 + //SEG35 [22] call myprintf + //SEG36 [54] phi from main::@3 to myprintf [phi:main::@3->myprintf] + myprintf_from_b3: + //SEG37 [54] phi (word) myprintf::w3#7 = (word) myprintf::w3#0 [phi:main::@3->myprintf#0] -- register_copy + //SEG38 [54] phi (word) myprintf::w2#7 = (word) myprintf::w2#0 [phi:main::@3->myprintf#1] -- register_copy + //SEG39 [54] phi (word) myprintf::w1#6 = (word) myprintf::w1#0 [phi:main::@3->myprintf#2] -- register_copy + //SEG40 [54] phi (byte*) myprintf::str#5 = (const string) main::str [phi:main::@3->myprintf#3] -- pbuz1=pbuc1 + lda #str + sta myprintf.str+1 + jsr myprintf + //SEG41 [23] phi from main::@3 to main::@9 [phi:main::@3->main::@9] + b9_from_b3: + jmp b9 + //SEG42 main::@9 + b9: + //SEG43 [24] call Print + jsr Print + jmp b10 + //SEG44 main::@10 + b10: + //SEG45 [25] (word) main::u#2 ← (word) main::u#11 - (word/signed word/dword/signed dword) $4d2 -- vwuz1=vwuz1_minus_vwuc1 + lda u + sec + sbc #<$4d2 + sta u + lda u+1 + sbc #>$4d2 + sta u+1 + //SEG46 [26] *((const byte*) zp1#0) ← ++ *((const byte*) zp1#0) -- _deref_pbuc1=_inc__deref_pbuc1 + inc zp1 + //SEG47 [27] if(*((const byte*) zp1#0)<(byte/signed byte/word/signed word/dword/signed dword) $a) goto main::@1 -- _deref_pbuc1_lt_vbuc2_then_la1 + lda zp1 + cmp #$a + bcc b1_from_b10 + jmp b4 + //SEG48 main::@4 + b4: + //SEG49 [28] *((const byte*) zp1#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta zp1 + //SEG50 [29] phi from main::@4 to main::@5 [phi:main::@4->main::@5] + b5_from_b4: + //SEG51 [29] phi (word) main::u#15 = (word/signed word/dword/signed dword) $6e85 [phi:main::@4->main::@5#0] -- vwuz1=vwuc1 + lda #<$6e85 + sta u + lda #>$6e85 + sta u+1 + jmp b5 + //SEG52 [29] phi from main::@13 to main::@5 [phi:main::@13->main::@5] + b5_from_b13: + //SEG53 [29] phi (word) main::u#15 = (word) main::u#4 [phi:main::@13->main::@5#0] -- register_copy + jmp b5 + //SEG54 main::@5 + b5: + //SEG55 [30] *((const byte*) TIMEHI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta TIMEHI + //SEG56 [31] *((const byte*) TIMELO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta TIMELO + //SEG57 [32] *((const byte*) zp2#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta zp2 + jmp b6 + //SEG58 main::@6 + b6: + //SEG59 [33] (word) div10::val#4 ← (word) main::u#15 + //SEG60 [34] call div10 + jsr div10 + //SEG61 [35] (word) div10::return#2 ← (word) div10::return#0 + jmp b11 + //SEG62 main::@11 + b11: + //SEG63 [36] (word) main::v#2 ← (word) div10::return#2 + //SEG64 [37] *((const byte*) zp2#0) ← ++ *((const byte*) zp2#0) -- _deref_pbuc1=_inc__deref_pbuc1 + inc zp2 + //SEG65 [38] if(*((const byte*) zp2#0)<(byte/word/signed word/dword/signed dword) $c8) goto main::@6 -- _deref_pbuc1_lt_vbuc2_then_la1 + lda zp2 + cmp #$c8 + bcc b6 + jmp b7 + //SEG66 main::@7 + b7: + //SEG67 [39] (word~) main::$11 ← ((word)) *((const byte*) TIMEHI#0) -- vwuz1=_word__deref_pbuc1 + lda TIMEHI + sta _11 + lda #0 + sta _11+1 + //SEG68 [40] (word~) main::$12 ← (word~) main::$11 << (byte/signed byte/word/signed word/dword/signed dword) 8 -- vwuz1=vwuz1_rol_vbuc1 + ldy #8 + cpy #0 + beq !e+ + !: + asl _12 + rol _12+1 + dey + bne !- + !e: + //SEG69 [41] (word~) main::$13 ← ((word)) *((const byte*) TIMELO#0) -- vwuz1=_word__deref_pbuc1 + lda TIMELO + sta _13 + lda #0 + sta _13+1 + //SEG70 [42] (word) myprintf::w3#1 ← (word~) main::$12 + (word~) main::$13 -- vwuz1=vwuz1_plus_vwuz2 + lda myprintf.w3 + clc + adc _13 + sta myprintf.w3 + lda myprintf.w3+1 + adc _13+1 + sta myprintf.w3+1 + //SEG71 [43] (word) myprintf::w1#1 ← (word) main::u#15 + //SEG72 [44] (word) myprintf::w2#1 ← (word) main::v#2 + //SEG73 [45] call myprintf + //SEG74 [54] phi from main::@7 to myprintf [phi:main::@7->myprintf] + myprintf_from_b7: + //SEG75 [54] phi (word) myprintf::w3#7 = (word) myprintf::w3#1 [phi:main::@7->myprintf#0] -- register_copy + //SEG76 [54] phi (word) myprintf::w2#7 = (word) myprintf::w2#1 [phi:main::@7->myprintf#1] -- register_copy + //SEG77 [54] phi (word) myprintf::w1#6 = (word) myprintf::w1#1 [phi:main::@7->myprintf#2] -- register_copy + //SEG78 [54] phi (byte*) myprintf::str#5 = (const string) main::str1 [phi:main::@7->myprintf#3] -- pbuz1=pbuc1 + lda #str1 + sta myprintf.str+1 + jsr myprintf + //SEG79 [46] phi from main::@7 to main::@12 [phi:main::@7->main::@12] + b12_from_b7: + jmp b12 + //SEG80 main::@12 + b12: + //SEG81 [47] call Print + jsr Print + jmp b13 + //SEG82 main::@13 + b13: + //SEG83 [48] (word) main::u#4 ← (word) main::u#15 - (word/signed word/dword/signed dword) $4d2 -- vwuz1=vwuz1_minus_vwuc1 + lda u + sec + sbc #<$4d2 + sta u + lda u+1 + sbc #>$4d2 + sta u+1 + //SEG84 [49] *((const byte*) zp1#0) ← ++ *((const byte*) zp1#0) -- _deref_pbuc1=_inc__deref_pbuc1 + inc zp1 + //SEG85 [50] if(*((const byte*) zp1#0)<(byte/signed byte/word/signed word/dword/signed dword) $a) goto main::@5 -- _deref_pbuc1_lt_vbuc2_then_la1 + lda zp1 + cmp #$a + bcc b5_from_b13 + jmp breturn + //SEG86 main::@return + breturn: + //SEG87 [51] return + rts + str: .text "200 DIV16U: %5d,%4d IN %04d FRAMESm@" + str1: .text "200 DIV10 : %5d,%4d IN %04d FRAMESm@" +} +//SEG88 Print +Print: { + //SEG89 asm { ldy#0 loop: ldastrTemp,y beqdone jsr$FFD2 iny jmploop done: } + // can this assembly be placed in a separate file and call it from the C code here? + ldy #0 + loop: + lda strTemp,y + beq done + jsr $ffd2 + iny + jmp loop + done: + jmp breturn + //SEG90 Print::@return + breturn: + //SEG91 [53] return + rts +} +//SEG92 myprintf +// myprintf(byte* zeropage(8) str, word zeropage(2) w1, word zeropage(4) w2, word zeropage(6) w3) +myprintf: { + .label _17 = $12 + .label str = 8 + .label bDigits = $11 + .label bLen = $10 + .label digit = $a + .label bArg = $b + .label return = $10 + .label w1 = 2 + .label w2 = 4 + .label w3 = 6 + .label bFormat = $a + .label w = $c + .label bTrailing = $e + .label bLeadZero = $f + //SEG93 [55] phi from myprintf to myprintf::@1 [phi:myprintf->myprintf::@1] + b1_from_myprintf: + //SEG94 [55] phi (byte) myprintf::bLeadZero#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:myprintf->myprintf::@1#0] -- vbuz1=vbuc1 + lda #0 + sta bLeadZero + //SEG95 [55] phi (byte) myprintf::bDigits#14 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:myprintf->myprintf::@1#1] -- vbuz1=vbuc1 + lda #0 + sta bDigits + //SEG96 [55] phi (byte) myprintf::bTrailing#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:myprintf->myprintf::@1#2] -- vbuz1=vbuc1 + lda #0 + sta bTrailing + //SEG97 [55] phi (word) myprintf::w#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:myprintf->myprintf::@1#3] -- vwuz1=vbuc1 + lda #0 + sta w + lda #0 + sta w+1 + //SEG98 [55] phi (byte) myprintf::bLen#14 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:myprintf->myprintf::@1#4] -- vbuz1=vbuc1 + lda #0 + sta bLen + //SEG99 [55] phi (byte) myprintf::bArg#12 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:myprintf->myprintf::@1#5] -- vbuz1=vbuc1 + lda #0 + sta bArg + //SEG100 [55] phi (byte) myprintf::bFormat#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:myprintf->myprintf::@1#6] -- vbuz1=vbuc1 + lda #0 + sta bFormat + //SEG101 [55] phi (byte*) myprintf::str#10 = (byte*) myprintf::str#5 [phi:myprintf->myprintf::@1#7] -- register_copy + jmp b1 + //SEG102 [55] phi from myprintf::@27 to myprintf::@1 [phi:myprintf::@27->myprintf::@1] + b1_from_b27: + //SEG103 [55] phi (byte) myprintf::bLeadZero#10 = (byte) myprintf::bLeadZero#18 [phi:myprintf::@27->myprintf::@1#0] -- register_copy + //SEG104 [55] phi (byte) myprintf::bDigits#14 = (byte) myprintf::bDigits#24 [phi:myprintf::@27->myprintf::@1#1] -- register_copy + //SEG105 [55] phi (byte) myprintf::bTrailing#10 = (byte) myprintf::bTrailing#21 [phi:myprintf::@27->myprintf::@1#2] -- register_copy + //SEG106 [55] phi (word) myprintf::w#10 = (word) myprintf::w#17 [phi:myprintf::@27->myprintf::@1#3] -- register_copy + //SEG107 [55] phi (byte) myprintf::bLen#14 = (byte) myprintf::return#0 [phi:myprintf::@27->myprintf::@1#4] -- register_copy + //SEG108 [55] phi (byte) myprintf::bArg#12 = (byte) myprintf::bArg#10 [phi:myprintf::@27->myprintf::@1#5] -- register_copy + //SEG109 [55] phi (byte) myprintf::bFormat#10 = (byte) myprintf::bFormat#4 [phi:myprintf::@27->myprintf::@1#6] -- register_copy + //SEG110 [55] phi (byte*) myprintf::str#10 = (byte*) myprintf::str#0 [phi:myprintf::@27->myprintf::@1#7] -- register_copy + jmp b1 + //SEG111 myprintf::@1 + b1: + //SEG112 [56] (byte) myprintf::b#1 ← *((byte*) myprintf::str#10) -- vbuxx=_deref_pbuz1 + ldy #0 + lda (str),y + tax + //SEG113 [57] if((byte) myprintf::bFormat#10==(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@2 -- vbuz1_eq_0_then_la1 + lda bFormat + cmp #0 + beq b2 + jmp b31 + //SEG114 myprintf::@31 + b31: + //SEG115 [58] if((byte) myprintf::b#1!=(byte) '0') goto myprintf::@3 -- vbuxx_neq_vbuc1_then_la1 + cpx #'0' + bne b3 + //SEG116 [59] phi from myprintf::@31 to myprintf::@27 [phi:myprintf::@31->myprintf::@27] + b27_from_b31: + //SEG117 [59] phi (byte) myprintf::bLeadZero#18 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:myprintf::@31->myprintf::@27#0] -- vbuz1=vbuc1 + lda #1 + sta bLeadZero + //SEG118 [59] phi (byte) myprintf::bDigits#24 = (byte) myprintf::bDigits#14 [phi:myprintf::@31->myprintf::@27#1] -- register_copy + //SEG119 [59] phi (byte) myprintf::bTrailing#21 = (byte) myprintf::bTrailing#10 [phi:myprintf::@31->myprintf::@27#2] -- register_copy + //SEG120 [59] phi (word) myprintf::w#17 = (word) myprintf::w#10 [phi:myprintf::@31->myprintf::@27#3] -- register_copy + //SEG121 [59] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#12 [phi:myprintf::@31->myprintf::@27#4] -- register_copy + //SEG122 [59] phi (byte) myprintf::return#0 = (byte) myprintf::bLen#14 [phi:myprintf::@31->myprintf::@27#5] -- register_copy + //SEG123 [59] phi (byte) myprintf::bFormat#4 = (byte) myprintf::bFormat#10 [phi:myprintf::@31->myprintf::@27#6] -- register_copy + jmp b27 + //SEG124 myprintf::@27 + b27: + //SEG125 [60] (byte*) myprintf::str#0 ← ++ (byte*) myprintf::str#10 -- pbuz1=_inc_pbuz1 + inc str + bne !+ + inc str+1 + !: + //SEG126 [61] if(*((byte*) myprintf::str#0)!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@1 -- _deref_pbuz1_neq_0_then_la1 + ldy #0 + lda (str),y + cmp #0 + bne b1_from_b27 + jmp b36 + //SEG127 myprintf::@36 + b36: + //SEG128 [62] *((const byte[$64]) strTemp#0 + (byte) myprintf::return#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- pbuc1_derefidx_vbuz1=vbuc2 + lda #0 + ldy return + sta strTemp,y + jmp breturn + //SEG129 myprintf::@return + breturn: + //SEG130 [63] return + rts + //SEG131 myprintf::@3 + b3: + //SEG132 [64] if((byte) myprintf::b#1>=(byte) '1') goto myprintf::@37 -- vbuxx_ge_vbuc1_then_la1 + cpx #'1' + bcs b37 + jmp b4 + //SEG133 myprintf::@4 + b4: + //SEG134 [65] if((byte) myprintf::b#1!=(byte) '-') goto myprintf::@5 -- vbuxx_neq_vbuc1_then_la1 + cpx #'-' + bne b5 + //SEG135 [59] phi from myprintf::@4 to myprintf::@27 [phi:myprintf::@4->myprintf::@27] + b27_from_b4: + //SEG136 [59] phi (byte) myprintf::bLeadZero#18 = (byte) myprintf::bLeadZero#10 [phi:myprintf::@4->myprintf::@27#0] -- register_copy + //SEG137 [59] phi (byte) myprintf::bDigits#24 = (byte) myprintf::bDigits#14 [phi:myprintf::@4->myprintf::@27#1] -- register_copy + //SEG138 [59] phi (byte) myprintf::bTrailing#21 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:myprintf::@4->myprintf::@27#2] -- vbuz1=vbuc1 + lda #1 + sta bTrailing + //SEG139 [59] phi (word) myprintf::w#17 = (word) myprintf::w#10 [phi:myprintf::@4->myprintf::@27#3] -- register_copy + //SEG140 [59] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#12 [phi:myprintf::@4->myprintf::@27#4] -- register_copy + //SEG141 [59] phi (byte) myprintf::return#0 = (byte) myprintf::bLen#14 [phi:myprintf::@4->myprintf::@27#5] -- register_copy + //SEG142 [59] phi (byte) myprintf::bFormat#4 = (byte) myprintf::bFormat#10 [phi:myprintf::@4->myprintf::@27#6] -- register_copy + jmp b27 + //SEG143 myprintf::@5 + b5: + //SEG144 [66] if((byte) myprintf::b#1==(byte) 'c') goto myprintf::@6 -- vbuxx_eq_vbuc1_then_la1 + cpx #'c' + beq b6 + jmp b24 + //SEG145 myprintf::@24 + b24: + //SEG146 [67] if((byte) myprintf::b#1==(byte) 'd') goto myprintf::@7 -- vbuxx_eq_vbuc1_then_la1 + cpx #'d' + beq b7 + jmp b25 + //SEG147 myprintf::@25 + b25: + //SEG148 [68] if((byte) myprintf::b#1==(byte) 'x') goto myprintf::@26 -- vbuxx_eq_vbuc1_then_la1 + cpx #'x' + beq b26 + jmp b38 + //SEG149 myprintf::@38 + b38: + //SEG150 [69] if((byte) myprintf::b#1==(byte) 'X') goto myprintf::@26 -- vbuxx_eq_vbuc1_then_la1 + cpx #'X' + beq b26 + //SEG151 [70] phi from myprintf::@11 myprintf::@20 myprintf::@21 myprintf::@38 myprintf::@40 myprintf::@6 to myprintf::@22 [phi:myprintf::@11/myprintf::@20/myprintf::@21/myprintf::@38/myprintf::@40/myprintf::@6->myprintf::@22] + b22_from_b11: + b22_from_b20: + b22_from_b21: + b22_from_b38: + b22_from_b40: + b22_from_b6: + //SEG152 [70] phi (byte) myprintf::bDigits#25 = (byte) myprintf::bDigits#14 [phi:myprintf::@11/myprintf::@20/myprintf::@21/myprintf::@38/myprintf::@40/myprintf::@6->myprintf::@22#0] -- register_copy + //SEG153 [70] phi (byte) myprintf::bLen#28 = (byte) myprintf::bLen#3 [phi:myprintf::@11/myprintf::@20/myprintf::@21/myprintf::@38/myprintf::@40/myprintf::@6->myprintf::@22#1] -- register_copy + jmp b22 + //SEG154 myprintf::@22 + b22: + //SEG155 [59] phi from myprintf::@22 to myprintf::@27 [phi:myprintf::@22->myprintf::@27] + b27_from_b22: + //SEG156 [59] phi (byte) myprintf::bLeadZero#18 = (byte) myprintf::bLeadZero#10 [phi:myprintf::@22->myprintf::@27#0] -- register_copy + //SEG157 [59] phi (byte) myprintf::bDigits#24 = (byte) myprintf::bDigits#25 [phi:myprintf::@22->myprintf::@27#1] -- register_copy + //SEG158 [59] phi (byte) myprintf::bTrailing#21 = (byte) myprintf::bTrailing#10 [phi:myprintf::@22->myprintf::@27#2] -- register_copy + //SEG159 [59] phi (word) myprintf::w#17 = (word) myprintf::w#10 [phi:myprintf::@22->myprintf::@27#3] -- register_copy + //SEG160 [59] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#12 [phi:myprintf::@22->myprintf::@27#4] -- register_copy + //SEG161 [59] phi (byte) myprintf::return#0 = (byte) myprintf::bLen#28 [phi:myprintf::@22->myprintf::@27#5] -- register_copy + //SEG162 [59] phi (byte) myprintf::bFormat#4 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:myprintf::@22->myprintf::@27#6] -- vbuz1=vbuc1 + lda #0 + sta bFormat + jmp b27 + //SEG163 myprintf::@26 + b26: + //SEG164 [71] (word~) myprintf::$17 ← (word) myprintf::w#10 >> (byte/signed byte/word/signed word/dword/signed dword) 4 -- vwuz1=vwuz2_ror_4 + lda w+1 + sta _17+1 + lda w + sta _17 + ldy #4 + !: + lsr _17+1 + ror _17 + dey + bne !- + //SEG165 [72] (byte) myprintf::b#15 ← (word~) myprintf::$17 & (byte/signed byte/word/signed word/dword/signed dword) $f -- vbuxx=vwuz1_band_vbuc1 + lda _17 + and #$f + tax + //SEG166 [73] if((byte) myprintf::b#15<(byte/signed byte/word/signed word/dword/signed dword) $a) goto myprintf::@9 -- vbuxx_lt_vbuc1_then_la1 + cpx #$a + bcc b9_from_b26 + //SEG167 [74] phi from myprintf::@26 to myprintf::@8 [phi:myprintf::@26->myprintf::@8] + b8_from_b26: + jmp b8 + //SEG168 myprintf::@8 + b8: + //SEG169 [75] phi from myprintf::@8 to myprintf::@9 [phi:myprintf::@8->myprintf::@9] + b9_from_b8: + //SEG170 [75] phi (byte~) myprintf::$22 = (byte/signed byte/word/signed word/dword/signed dword) $57 [phi:myprintf::@8->myprintf::@9#0] -- vbuaa=vbuc1 + lda #$57 + jmp b9 + //SEG171 [75] phi from myprintf::@26 to myprintf::@9 [phi:myprintf::@26->myprintf::@9] + b9_from_b26: + //SEG172 [75] phi (byte~) myprintf::$22 = (byte) '0' [phi:myprintf::@26->myprintf::@9#0] -- vbuaa=vbuc1 + lda #'0' + jmp b9 + //SEG173 myprintf::@9 + b9: + //SEG174 [76] (byte~) myprintf::$23 ← (byte~) myprintf::$22 + (byte) myprintf::b#15 -- vbuaa=vbuaa_plus_vbuxx + stx $ff + clc + adc $ff + //SEG175 [77] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$23 -- pbuc1_derefidx_vbuz1=vbuaa + ldy bLen + sta strTemp,y + //SEG176 [78] (byte) myprintf::bLen#10 ← ++ (byte) myprintf::bLen#14 -- vbuyy=_inc_vbuz1 + ldy bLen + iny + //SEG177 [79] (byte) myprintf::b#16 ← (word) myprintf::w#10 & (byte/signed byte/word/signed word/dword/signed dword) $f -- vbuxx=vwuz1_band_vbuc1 + lda w + and #$f + tax + //SEG178 [80] if((byte) myprintf::b#16<(byte/signed byte/word/signed word/dword/signed dword) $a) goto myprintf::@11 -- vbuxx_lt_vbuc1_then_la1 + cpx #$a + bcc b11_from_b9 + //SEG179 [81] phi from myprintf::@9 to myprintf::@10 [phi:myprintf::@9->myprintf::@10] + b10_from_b9: + jmp b10 + //SEG180 myprintf::@10 + b10: + //SEG181 [82] phi from myprintf::@10 to myprintf::@11 [phi:myprintf::@10->myprintf::@11] + b11_from_b10: + //SEG182 [82] phi (byte~) myprintf::$28 = (byte/signed byte/word/signed word/dword/signed dword) $57 [phi:myprintf::@10->myprintf::@11#0] -- vbuaa=vbuc1 + lda #$57 + jmp b11 + //SEG183 [82] phi from myprintf::@9 to myprintf::@11 [phi:myprintf::@9->myprintf::@11] + b11_from_b9: + //SEG184 [82] phi (byte~) myprintf::$28 = (byte) '0' [phi:myprintf::@9->myprintf::@11#0] -- vbuaa=vbuc1 + lda #'0' + jmp b11 + //SEG185 myprintf::@11 + b11: + //SEG186 [83] (byte~) myprintf::$29 ← (byte~) myprintf::$28 + (byte) myprintf::b#16 -- vbuaa=vbuaa_plus_vbuxx + stx $ff + clc + adc $ff + //SEG187 [84] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#10) ← (byte~) myprintf::$29 -- pbuc1_derefidx_vbuyy=vbuaa + sta strTemp,y + //SEG188 [85] (byte) myprintf::bLen#3 ← ++ (byte) myprintf::bLen#10 -- vbuz1=_inc_vbuyy + iny + sty bLen + jmp b22_from_b11 + //SEG189 myprintf::@7 + b7: + //SEG190 [86] (word) utoa::value#4 ← (word) myprintf::w#10 -- vwuz1=vwuz2 + lda w + sta utoa.value + lda w+1 + sta utoa.value+1 + //SEG191 [87] call utoa + //SEG192 [133] phi from myprintf::@7 to utoa [phi:myprintf::@7->utoa] + utoa_from_b7: + jsr utoa + //SEG193 [88] phi from myprintf::@7 to myprintf::@12 [phi:myprintf::@7->myprintf::@12] + b12_from_b7: + //SEG194 [88] phi (byte) myprintf::b#17 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:myprintf::@7->myprintf::@12#0] -- vbuxx=vbuc1 + ldx #1 + jmp b12 + //SEG195 myprintf::@12 + b12: + //SEG196 [89] if(*((const byte[6]) myprintf::buf6#0 + (byte) myprintf::b#17)!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@13 -- pbuc1_derefidx_vbuxx_neq_0_then_la1 + lda buf6,x + cmp #0 + bne b13 + jmp b14 + //SEG197 myprintf::@14 + b14: + //SEG198 [90] if((byte) myprintf::bTrailing#10==(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@39 -- vbuz1_eq_0_then_la1 + lda bTrailing + cmp #0 + beq b39 + //SEG199 [91] phi from myprintf::@14 myprintf::@18 to myprintf::@15 [phi:myprintf::@14/myprintf::@18->myprintf::@15] + b15_from_b14: + b15_from_b18: + //SEG200 [91] phi (byte) myprintf::bDigits#16 = (byte) myprintf::bDigits#14 [phi:myprintf::@14/myprintf::@18->myprintf::@15#0] -- register_copy + //SEG201 [91] phi (byte) myprintf::bLen#23 = (byte) myprintf::bLen#14 [phi:myprintf::@14/myprintf::@18->myprintf::@15#1] -- register_copy + jmp b15 + //SEG202 myprintf::@15 + b15: + //SEG203 [92] phi from myprintf::@15 to myprintf::@19 [phi:myprintf::@15->myprintf::@19] + b19_from_b15: + //SEG204 [92] phi (byte) myprintf::bLen#12 = (byte) myprintf::bLen#23 [phi:myprintf::@15->myprintf::@19#0] -- register_copy + //SEG205 [92] phi (byte) myprintf::digit#3 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:myprintf::@15->myprintf::@19#1] -- vbuz1=vbuc1 + lda #0 + sta digit + jmp b19 + //SEG206 [92] phi from myprintf::@19 to myprintf::@19 [phi:myprintf::@19->myprintf::@19] + b19_from_b19: + //SEG207 [92] phi (byte) myprintf::bLen#12 = (byte) myprintf::bLen#24 [phi:myprintf::@19->myprintf::@19#0] -- register_copy + //SEG208 [92] phi (byte) myprintf::digit#3 = (byte) myprintf::digit#2 [phi:myprintf::@19->myprintf::@19#1] -- register_copy + jmp b19 + //SEG209 myprintf::@19 + b19: + //SEG210 [93] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#12) ← *((const byte[6]) myprintf::buf6#0 + (byte) myprintf::digit#3) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz2 + ldy digit + lda buf6,y + ldy bLen + sta strTemp,y + //SEG211 [94] (byte) myprintf::bLen#24 ← ++ (byte) myprintf::bLen#12 -- vbuz1=_inc_vbuz1 + inc bLen + //SEG212 [95] (byte) myprintf::digit#2 ← ++ (byte) myprintf::digit#3 -- vbuz1=_inc_vbuz1 + inc digit + //SEG213 [96] if((byte) myprintf::digit#2<(byte) myprintf::b#17) goto myprintf::@19 -- vbuz1_lt_vbuxx_then_la1 + txa + cmp digit + beq !+ + bcs b19_from_b19 + !: + jmp b20 + //SEG214 myprintf::@20 + b20: + //SEG215 [97] if((byte) myprintf::bTrailing#10!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@40 -- vbuz1_neq_0_then_la1 + lda bTrailing + cmp #0 + bne b40 + jmp b22_from_b20 + //SEG216 myprintf::@40 + b40: + //SEG217 [98] if((byte) myprintf::bDigits#16>(byte) myprintf::b#17) goto myprintf::@21 -- vbuz1_gt_vbuxx_then_la1 + cpx bDigits + bcc b21_from_b40 + jmp b22_from_b40 + //SEG218 [99] phi from myprintf::@21 myprintf::@40 to myprintf::@21 [phi:myprintf::@21/myprintf::@40->myprintf::@21] + b21_from_b21: + b21_from_b40: + //SEG219 [99] phi (byte) myprintf::bDigits#8 = (byte) myprintf::bDigits#3 [phi:myprintf::@21/myprintf::@40->myprintf::@21#0] -- register_copy + //SEG220 [99] phi (byte) myprintf::bLen#13 = (byte) myprintf::bLen#6 [phi:myprintf::@21/myprintf::@40->myprintf::@21#1] -- register_copy + jmp b21 + //SEG221 myprintf::@21 + b21: + //SEG222 [100] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#13) ← (byte) ' ' -- pbuc1_derefidx_vbuz1=vbuc2 + lda #' ' + ldy bLen + sta strTemp,y + //SEG223 [101] (byte) myprintf::bLen#6 ← ++ (byte) myprintf::bLen#13 -- vbuz1=_inc_vbuz1 + inc bLen + //SEG224 [102] (byte) myprintf::bDigits#3 ← -- (byte) myprintf::bDigits#8 -- vbuz1=_dec_vbuz1 + dec bDigits + //SEG225 [103] if((byte) myprintf::bDigits#3>(byte) myprintf::b#17) goto myprintf::@21 -- vbuz1_gt_vbuxx_then_la1 + cpx bDigits + bcc b21_from_b21 + jmp b22_from_b21 + //SEG226 myprintf::@39 + b39: + //SEG227 [104] if((byte) myprintf::bDigits#14>(byte) myprintf::b#17) goto myprintf::@16 -- vbuz1_gt_vbuxx_then_la1 + cpx bDigits + bcc b16_from_b39 + //SEG228 [91] phi from myprintf::@39 to myprintf::@15 [phi:myprintf::@39->myprintf::@15] + b15_from_b39: + jmp b15 + //SEG229 [105] phi from myprintf::@18 myprintf::@39 to myprintf::@16 [phi:myprintf::@18/myprintf::@39->myprintf::@16] + b16_from_b18: + b16_from_b39: + //SEG230 [105] phi (byte) myprintf::bDigits#10 = (byte) myprintf::bDigits#2 [phi:myprintf::@18/myprintf::@39->myprintf::@16#0] -- register_copy + //SEG231 [105] phi (byte) myprintf::bLen#11 = (byte) myprintf::bLen#4 [phi:myprintf::@18/myprintf::@39->myprintf::@16#1] -- register_copy + jmp b16 + //SEG232 myprintf::@16 + b16: + //SEG233 [106] if((byte) myprintf::bLeadZero#10==(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@18 -- vbuz1_eq_0_then_la1 + lda bLeadZero + cmp #0 + beq b18_from_b16 + //SEG234 [107] phi from myprintf::@16 to myprintf::@17 [phi:myprintf::@16->myprintf::@17] + b17_from_b16: + jmp b17 + //SEG235 myprintf::@17 + b17: + //SEG236 [108] phi from myprintf::@17 to myprintf::@18 [phi:myprintf::@17->myprintf::@18] + b18_from_b17: + //SEG237 [108] phi (byte~) myprintf::$39 = (byte) '0' [phi:myprintf::@17->myprintf::@18#0] -- vbuaa=vbuc1 + lda #'0' + jmp b18 + //SEG238 [108] phi from myprintf::@16 to myprintf::@18 [phi:myprintf::@16->myprintf::@18] + b18_from_b16: + //SEG239 [108] phi (byte~) myprintf::$39 = (byte) ' ' [phi:myprintf::@16->myprintf::@18#0] -- vbuaa=vbuc1 + lda #' ' + jmp b18 + //SEG240 myprintf::@18 + b18: + //SEG241 [109] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#11) ← (byte~) myprintf::$39 -- pbuc1_derefidx_vbuz1=vbuaa + ldy bLen + sta strTemp,y + //SEG242 [110] (byte) myprintf::bLen#4 ← ++ (byte) myprintf::bLen#11 -- vbuz1=_inc_vbuz1 + inc bLen + //SEG243 [111] (byte) myprintf::bDigits#2 ← -- (byte) myprintf::bDigits#10 -- vbuz1=_dec_vbuz1 + dec bDigits + //SEG244 [112] if((byte) myprintf::bDigits#2>(byte) myprintf::b#17) goto myprintf::@16 -- vbuz1_gt_vbuxx_then_la1 + cpx bDigits + bcc b16_from_b18 + jmp b15_from_b18 + //SEG245 myprintf::@13 + b13: + //SEG246 [113] (byte) myprintf::b#5 ← ++ (byte) myprintf::b#17 -- vbuxx=_inc_vbuxx + inx + //SEG247 [88] phi from myprintf::@13 to myprintf::@12 [phi:myprintf::@13->myprintf::@12] + b12_from_b13: + //SEG248 [88] phi (byte) myprintf::b#17 = (byte) myprintf::b#5 [phi:myprintf::@13->myprintf::@12#0] -- register_copy + jmp b12 + //SEG249 myprintf::@6 + b6: + //SEG250 [114] (byte~) myprintf::$47 ← ((byte)) (word) myprintf::w#10 -- vbuaa=_byte_vwuz1 + lda w + //SEG251 [115] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$47 -- pbuc1_derefidx_vbuz1=vbuaa + // "switch" is the normal way -- not supported + ldy bLen + sta strTemp,y + //SEG252 [116] (byte) myprintf::bLen#1 ← ++ (byte) myprintf::bLen#14 -- vbuz1=_inc_vbuz1 + inc bLen + jmp b22_from_b6 + //SEG253 myprintf::@37 + b37: + //SEG254 [117] if((byte) myprintf::b#1<=(byte) '9') goto myprintf::@23 -- vbuxx_le_vbuc1_then_la1 + cpx #'9' + bcc b23 + beq b23 + jmp b4 + //SEG255 myprintf::@23 + b23: + //SEG256 [118] (byte) myprintf::bDigits#1 ← (byte) myprintf::b#1 - (byte) '0' -- vbuz1=vbuxx_minus_vbuc1 + txa + axs #'0' + stx bDigits + //SEG257 [59] phi from myprintf::@23 myprintf::@30 to myprintf::@27 [phi:myprintf::@23/myprintf::@30->myprintf::@27] + b27_from_b23: + b27_from_b30: + //SEG258 [59] phi (byte) myprintf::bLeadZero#18 = (byte) myprintf::bLeadZero#10 [phi:myprintf::@23/myprintf::@30->myprintf::@27#0] -- register_copy + //SEG259 [59] phi (byte) myprintf::bDigits#24 = (byte) myprintf::bDigits#1 [phi:myprintf::@23/myprintf::@30->myprintf::@27#1] -- register_copy + //SEG260 [59] phi (byte) myprintf::bTrailing#21 = (byte) myprintf::bTrailing#10 [phi:myprintf::@23/myprintf::@30->myprintf::@27#2] -- register_copy + //SEG261 [59] phi (word) myprintf::w#17 = (word) myprintf::w#10 [phi:myprintf::@23/myprintf::@30->myprintf::@27#3] -- register_copy + //SEG262 [59] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#12 [phi:myprintf::@23/myprintf::@30->myprintf::@27#4] -- register_copy + //SEG263 [59] phi (byte) myprintf::return#0 = (byte) myprintf::bLen#14 [phi:myprintf::@23/myprintf::@30->myprintf::@27#5] -- register_copy + //SEG264 [59] phi (byte) myprintf::bFormat#4 = (byte) myprintf::bFormat#10 [phi:myprintf::@23/myprintf::@30->myprintf::@27#6] -- register_copy + jmp b27 + //SEG265 myprintf::@2 + b2: + //SEG266 [119] if((byte) myprintf::b#1!=(byte) '%') goto myprintf::@28 -- vbuxx_neq_vbuc1_then_la1 + cpx #'%' + bne b28 + jmp b32 + //SEG267 myprintf::@32 + b32: + //SEG268 [120] if((byte) myprintf::bArg#12==(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@42 -- vbuz1_eq_0_then_la1 + // default format + //w = (bArg == 0) ? w1 : ((bArg == 1) ? w2 : w3); -- "?" is the normal way, but error "sequence does not contain all blocks" + lda bArg + cmp #0 + beq b42 + jmp b33 + //SEG269 myprintf::@33 + b33: + //SEG270 [121] if((byte) myprintf::bArg#12==(byte/signed byte/word/signed word/dword/signed dword) 1) goto myprintf::@43 -- vbuz1_eq_vbuc1_then_la1 + lda #1 + cmp bArg + beq b43 + jmp b34 + //SEG271 myprintf::@34 + b34: + //SEG272 [122] (word~) myprintf::w#53 ← (word) myprintf::w3#7 -- vwuz1=vwuz2 + lda w3 + sta w + lda w3+1 + sta w+1 + //SEG273 [123] phi from myprintf::@34 myprintf::@42 myprintf::@43 to myprintf::@29 [phi:myprintf::@34/myprintf::@42/myprintf::@43->myprintf::@29] + b29_from_b34: + b29_from_b42: + b29_from_b43: + //SEG274 [123] phi (word) myprintf::w#21 = (word~) myprintf::w#53 [phi:myprintf::@34/myprintf::@42/myprintf::@43->myprintf::@29#0] -- register_copy + jmp b29 + //SEG275 myprintf::@29 + b29: + //SEG276 [124] (byte) myprintf::bArg#1 ← ++ (byte) myprintf::bArg#12 -- vbuz1=_inc_vbuz1 + inc bArg + //SEG277 [59] phi from myprintf::@29 to myprintf::@27 [phi:myprintf::@29->myprintf::@27] + b27_from_b29: + //SEG278 [59] phi (byte) myprintf::bLeadZero#18 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:myprintf::@29->myprintf::@27#0] -- vbuz1=vbuc1 + lda #0 + sta bLeadZero + //SEG279 [59] phi (byte) myprintf::bDigits#24 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:myprintf::@29->myprintf::@27#1] -- vbuz1=vbuc1 + lda #1 + sta bDigits + //SEG280 [59] phi (byte) myprintf::bTrailing#21 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:myprintf::@29->myprintf::@27#2] -- vbuz1=vbuc1 + lda #0 + sta bTrailing + //SEG281 [59] phi (word) myprintf::w#17 = (word) myprintf::w#21 [phi:myprintf::@29->myprintf::@27#3] -- register_copy + //SEG282 [59] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#1 [phi:myprintf::@29->myprintf::@27#4] -- register_copy + //SEG283 [59] phi (byte) myprintf::return#0 = (byte) myprintf::bLen#14 [phi:myprintf::@29->myprintf::@27#5] -- register_copy + //SEG284 [59] phi (byte) myprintf::bFormat#4 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:myprintf::@29->myprintf::@27#6] -- vbuz1=vbuc1 + lda #1 + sta bFormat + jmp b27 + //SEG285 myprintf::@43 + b43: + //SEG286 [125] (word~) myprintf::w#52 ← (word) myprintf::w2#7 -- vwuz1=vwuz2 + lda w2 + sta w + lda w2+1 + sta w+1 + jmp b29_from_b43 + //SEG287 myprintf::@42 + b42: + //SEG288 [126] (word~) myprintf::w#51 ← (word) myprintf::w1#6 -- vwuz1=vwuz2 + lda w1 + sta w + lda w1+1 + sta w+1 + jmp b29_from_b42 + //SEG289 myprintf::@28 + b28: + //SEG290 [127] if((byte) myprintf::b#1>=(byte/signed byte/word/signed word/dword/signed dword) $41) goto myprintf::@41 -- vbuxx_ge_vbuc1_then_la1 + cpx #$41 + bcs b41 + //SEG291 [128] phi from myprintf::@28 myprintf::@35 to myprintf::@30 [phi:myprintf::@28/myprintf::@35->myprintf::@30] + b30_from_b28: + b30_from_b35: + //SEG292 [128] phi (byte) myprintf::b#25 = (byte) myprintf::b#1 [phi:myprintf::@28/myprintf::@35->myprintf::@30#0] -- register_copy + jmp b30 + //SEG293 myprintf::@30 + b30: + //SEG294 [129] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte) myprintf::b#25 -- pbuc1_derefidx_vbuz1=vbuxx + // swap 0x41 / 0x61 when in lower case mode + ldy bLen + txa + sta strTemp,y + //SEG295 [130] (byte) myprintf::bLen#7 ← ++ (byte) myprintf::bLen#14 -- vbuz1=_inc_vbuz1 + inc bLen + jmp b27_from_b30 + //SEG296 myprintf::@41 + b41: + //SEG297 [131] if((byte) myprintf::b#1<(byte/signed byte/word/signed word/dword/signed dword) $5a+(byte/signed byte/word/signed word/dword/signed dword) 1) goto myprintf::@35 -- vbuxx_lt_vbuc1_then_la1 + cpx #$5a+1 + bcc b35 + //SEG298 [128] phi from myprintf::@41 to myprintf::@30 [phi:myprintf::@41->myprintf::@30] + b30_from_b41: + jmp b30 + //SEG299 myprintf::@35 + b35: + //SEG300 [132] (byte) myprintf::b#6 ← (byte) myprintf::b#1 + (byte/signed byte/word/signed word/dword/signed dword) $20 -- vbuxx=vbuxx_plus_vbuc1 + txa + axs #-[$20] + jmp b30_from_b35 + buf6: .fill 6, 0 +} +//SEG301 utoa +// utoa(word zeropage($12) value, byte* zeropage($14) dst) +utoa: { + .label value = $12 + .label dst = $14 + jmp b13 + //SEG302 utoa::@13 + b13: + //SEG303 [134] if((word) utoa::value#4>=(word/signed word/dword/signed dword) $2710) goto utoa::@5 -- vwuz1_ge_vwuc1_then_la1 + lda value+1 + cmp #>$2710 + bcc !+ + bne b5 + lda value + cmp #<$2710 + bcs b5 + !: + //SEG304 [135] phi from utoa::@13 to utoa::@1 [phi:utoa::@13->utoa::@1] + b1_from_b13: + //SEG305 [135] phi (byte*) utoa::dst#16 = (const byte[6]) myprintf::buf6#0 [phi:utoa::@13->utoa::@1#0] -- pbuz1=pbuc1 + lda #myprintf.buf6 + sta dst+1 + //SEG306 [135] phi (word) utoa::value#6 = (word) utoa::value#4 [phi:utoa::@13->utoa::@1#1] -- register_copy + //SEG307 [135] phi (byte) utoa::bStarted#5 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:utoa::@13->utoa::@1#2] -- vbuxx=vbuc1 + ldx #0 + jmp b1 + //SEG308 utoa::@1 + b1: + //SEG309 [136] if((byte) utoa::bStarted#5==(byte/signed byte/word/signed word/dword/signed dword) 1) goto utoa::@6 -- vbuxx_eq_vbuc1_then_la1 + cpx #1 + beq b6 + jmp b14 + //SEG310 utoa::@14 + b14: + //SEG311 [137] if((word) utoa::value#6>=(word/signed word/dword/signed dword) $3e8) goto utoa::@6 -- vwuz1_ge_vwuc1_then_la1 + lda value+1 + cmp #>$3e8 + bcc !+ + bne b6 + lda value + cmp #<$3e8 + bcs b6 + !: + //SEG312 [138] phi from utoa::@14 to utoa::@2 [phi:utoa::@14->utoa::@2] + b2_from_b14: + //SEG313 [138] phi (byte*) utoa::dst#10 = (byte*) utoa::dst#16 [phi:utoa::@14->utoa::@2#0] -- register_copy + //SEG314 [138] phi (word) utoa::value#11 = (word) utoa::value#6 [phi:utoa::@14->utoa::@2#1] -- register_copy + //SEG315 [138] phi (byte) utoa::bStarted#6 = (byte) utoa::bStarted#5 [phi:utoa::@14->utoa::@2#2] -- register_copy + jmp b2 + //SEG316 utoa::@2 + b2: + //SEG317 [139] if((byte) utoa::bStarted#6==(byte/signed byte/word/signed word/dword/signed dword) 1) goto utoa::@7 -- vbuxx_eq_vbuc1_then_la1 + cpx #1 + beq b7 + jmp b15 + //SEG318 utoa::@15 + b15: + //SEG319 [140] if((word) utoa::value#11>=(byte/signed byte/word/signed word/dword/signed dword) $64) goto utoa::@7 -- vwuz1_ge_vwuc1_then_la1 + lda value+1 + cmp #>$64 + bcc !+ + bne b7 + lda value + cmp #<$64 + bcs b7 + !: + //SEG320 [141] phi from utoa::@15 to utoa::@3 [phi:utoa::@15->utoa::@3] + b3_from_b15: + //SEG321 [141] phi (byte*) utoa::dst#13 = (byte*) utoa::dst#10 [phi:utoa::@15->utoa::@3#0] -- register_copy + //SEG322 [141] phi (word) utoa::value#10 = (word) utoa::value#11 [phi:utoa::@15->utoa::@3#1] -- register_copy + //SEG323 [141] phi (byte) utoa::bStarted#7 = (byte) utoa::bStarted#6 [phi:utoa::@15->utoa::@3#2] -- register_copy + jmp b3 + //SEG324 utoa::@3 + b3: + //SEG325 [142] if((byte) utoa::bStarted#7==(byte/signed byte/word/signed word/dword/signed dword) 1) goto utoa::@8 -- vbuxx_eq_vbuc1_then_la1 + cpx #1 + beq b8 + jmp b16 + //SEG326 utoa::@16 + b16: + //SEG327 [143] if((word) utoa::value#10>=(byte/signed byte/word/signed word/dword/signed dword) $a) goto utoa::@8 -- vwuz1_ge_vwuc1_then_la1 + lda value+1 + cmp #>$a + bcc !+ + bne b8 + lda value + cmp #<$a + bcs b8 + !: + //SEG328 [144] phi from utoa::@12 utoa::@16 to utoa::@4 [phi:utoa::@12/utoa::@16->utoa::@4] + b4_from_b12: + b4_from_b16: + //SEG329 [144] phi (byte*) utoa::dst#12 = (byte*) utoa::dst#4 [phi:utoa::@12/utoa::@16->utoa::@4#0] -- register_copy + //SEG330 [144] phi (word) utoa::value#12 = (word) utoa::value#3 [phi:utoa::@12/utoa::@16->utoa::@4#1] -- register_copy + jmp b4 + //SEG331 utoa::@4 + b4: + //SEG332 [145] (byte~) utoa::$16 ← ((byte)) (word) utoa::value#12 -- vbuaa=_byte_vwuz1 + lda value + //SEG333 [146] (byte~) utoa::$17 ← (byte) '0' + (byte~) utoa::$16 -- vbuaa=vbuc1_plus_vbuaa + clc + adc #'0' + //SEG334 [147] *((byte*) utoa::dst#12) ← (byte~) utoa::$17 -- _deref_pbuz1=vbuaa + ldy #0 + sta (dst),y + //SEG335 [148] (byte*) utoa::dst#3 ← ++ (byte*) utoa::dst#12 -- pbuz1=_inc_pbuz1 + inc dst + bne !+ + inc dst+1 + !: + //SEG336 [149] *((byte*) utoa::dst#3) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuz1=vbuc1 + lda #0 + ldy #0 + sta (dst),y + jmp breturn + //SEG337 utoa::@return + breturn: + //SEG338 [150] return + rts + //SEG339 utoa::@8 + b8: + //SEG340 [151] (byte*) append::dst#3 ← (byte*) utoa::dst#13 + //SEG341 [152] (word) append::value#4 ← (word) utoa::value#10 + //SEG342 [153] call append + //SEG343 [173] phi from utoa::@8 to append [phi:utoa::@8->append] + append_from_b8: + //SEG344 [173] phi (word) append::sub#6 = (byte/signed byte/word/signed word/dword/signed dword) $a [phi:utoa::@8->append#0] -- vwuz1=vbuc1 + lda #$a + sta append.sub + lda #0 + sta append.sub+1 + //SEG345 [173] phi (word) append::value#8 = (word) append::value#4 [phi:utoa::@8->append#1] -- register_copy + //SEG346 [173] phi (byte*) append::dst#4 = (byte*) append::dst#3 [phi:utoa::@8->append#2] -- register_copy + jsr append + //SEG347 [154] (word) append::return#10 ← (word) append::value#5 + jmp b12 + //SEG348 utoa::@12 + b12: + //SEG349 [155] (word) utoa::value#3 ← (word) append::return#10 + //SEG350 [156] (byte*) utoa::dst#4 ← ++ (byte*) utoa::dst#13 -- pbuz1=_inc_pbuz1 + inc dst + bne !+ + inc dst+1 + !: + jmp b4_from_b12 + //SEG351 utoa::@7 + b7: + //SEG352 [157] (byte*) append::dst#2 ← (byte*) utoa::dst#10 + //SEG353 [158] (word) append::value#3 ← (word) utoa::value#11 + //SEG354 [159] call append + //SEG355 [173] phi from utoa::@7 to append [phi:utoa::@7->append] + append_from_b7: + //SEG356 [173] phi (word) append::sub#6 = (byte/signed byte/word/signed word/dword/signed dword) $64 [phi:utoa::@7->append#0] -- vwuz1=vbuc1 + lda #$64 + sta append.sub + lda #0 + sta append.sub+1 + //SEG357 [173] phi (word) append::value#8 = (word) append::value#3 [phi:utoa::@7->append#1] -- register_copy + //SEG358 [173] phi (byte*) append::dst#4 = (byte*) append::dst#2 [phi:utoa::@7->append#2] -- register_copy + jsr append + //SEG359 [160] (word) append::return#4 ← (word) append::value#5 + jmp b11 + //SEG360 utoa::@11 + b11: + //SEG361 [161] (word) utoa::value#2 ← (word) append::return#4 + //SEG362 [162] (byte*) utoa::dst#2 ← ++ (byte*) utoa::dst#10 -- pbuz1=_inc_pbuz1 + inc dst + bne !+ + inc dst+1 + !: + //SEG363 [141] phi from utoa::@11 to utoa::@3 [phi:utoa::@11->utoa::@3] + b3_from_b11: + //SEG364 [141] phi (byte*) utoa::dst#13 = (byte*) utoa::dst#2 [phi:utoa::@11->utoa::@3#0] -- register_copy + //SEG365 [141] phi (word) utoa::value#10 = (word) utoa::value#2 [phi:utoa::@11->utoa::@3#1] -- register_copy + //SEG366 [141] phi (byte) utoa::bStarted#7 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:utoa::@11->utoa::@3#2] -- vbuxx=vbuc1 + ldx #1 + jmp b3 + //SEG367 utoa::@6 + b6: + //SEG368 [163] (byte*) append::dst#1 ← (byte*) utoa::dst#16 + //SEG369 [164] (word) append::value#2 ← (word) utoa::value#6 + //SEG370 [165] call append + //SEG371 [173] phi from utoa::@6 to append [phi:utoa::@6->append] + append_from_b6: + //SEG372 [173] phi (word) append::sub#6 = (word/signed word/dword/signed dword) $3e8 [phi:utoa::@6->append#0] -- vwuz1=vwuc1 + lda #<$3e8 + sta append.sub + lda #>$3e8 + sta append.sub+1 + //SEG373 [173] phi (word) append::value#8 = (word) append::value#2 [phi:utoa::@6->append#1] -- register_copy + //SEG374 [173] phi (byte*) append::dst#4 = (byte*) append::dst#1 [phi:utoa::@6->append#2] -- register_copy + jsr append + //SEG375 [166] (word) append::return#3 ← (word) append::value#5 + jmp b10 + //SEG376 utoa::@10 + b10: + //SEG377 [167] (word) utoa::value#1 ← (word) append::return#3 + //SEG378 [168] (byte*) utoa::dst#1 ← ++ (byte*) utoa::dst#16 -- pbuz1=_inc_pbuz1 + inc dst + bne !+ + inc dst+1 + !: + //SEG379 [138] phi from utoa::@10 to utoa::@2 [phi:utoa::@10->utoa::@2] + b2_from_b10: + //SEG380 [138] phi (byte*) utoa::dst#10 = (byte*) utoa::dst#1 [phi:utoa::@10->utoa::@2#0] -- register_copy + //SEG381 [138] phi (word) utoa::value#11 = (word) utoa::value#1 [phi:utoa::@10->utoa::@2#1] -- register_copy + //SEG382 [138] phi (byte) utoa::bStarted#6 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:utoa::@10->utoa::@2#2] -- vbuxx=vbuc1 + ldx #1 + jmp b2 + //SEG383 utoa::@5 + b5: + //SEG384 [169] (word) append::value#1 ← (word) utoa::value#4 + //SEG385 [170] call append + //SEG386 [173] phi from utoa::@5 to append [phi:utoa::@5->append] + append_from_b5: + //SEG387 [173] phi (word) append::sub#6 = (word/signed word/dword/signed dword) $2710 [phi:utoa::@5->append#0] -- vwuz1=vwuc1 + lda #<$2710 + sta append.sub + lda #>$2710 + sta append.sub+1 + //SEG388 [173] phi (word) append::value#8 = (word) append::value#1 [phi:utoa::@5->append#1] -- register_copy + //SEG389 [173] phi (byte*) append::dst#4 = (const byte[6]) myprintf::buf6#0 [phi:utoa::@5->append#2] -- pbuz1=pbuc1 + lda #myprintf.buf6 + sta append.dst+1 + jsr append + //SEG390 [171] (word) append::return#2 ← (word) append::value#5 + jmp b9 + //SEG391 utoa::@9 + b9: + //SEG392 [172] (word) utoa::value#0 ← (word) append::return#2 + //SEG393 [135] phi from utoa::@9 to utoa::@1 [phi:utoa::@9->utoa::@1] + b1_from_b9: + //SEG394 [135] phi (byte*) utoa::dst#16 = ++(const byte[6]) myprintf::buf6#0 [phi:utoa::@9->utoa::@1#0] -- pbuz1=pbuc1 + lda #myprintf.buf6+1 + sta dst+1 + //SEG395 [135] phi (word) utoa::value#6 = (word) utoa::value#0 [phi:utoa::@9->utoa::@1#1] -- register_copy + //SEG396 [135] phi (byte) utoa::bStarted#5 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:utoa::@9->utoa::@1#2] -- vbuxx=vbuc1 + ldx #1 + jmp b1 +} +//SEG397 append +// simple 'utoa' without using multiply or divide +// append(byte* zeropage($14) dst, word zeropage($12) value, word zeropage($16) sub) +append: { + .label value = $12 + .label return = $12 + .label dst = $14 + .label sub = $16 + //SEG398 [174] *((byte*) append::dst#4) ← (byte) '0' -- _deref_pbuz1=vbuc1 + lda #'0' + ldy #0 + sta (dst),y + //SEG399 [175] phi from append append::@2 to append::@1 [phi:append/append::@2->append::@1] + b1_from_append: + b1_from_b2: + //SEG400 [175] phi (word) append::value#5 = (word) append::value#8 [phi:append/append::@2->append::@1#0] -- register_copy + jmp b1 + //SEG401 append::@1 + b1: + //SEG402 [176] if((word) append::value#5>=(word) append::sub#6) goto append::@2 -- vwuz1_ge_vwuz2_then_la1 + lda sub+1 + cmp value+1 + bne !+ + lda sub + cmp value + !: + bcc b2 + beq b2 + jmp breturn + //SEG403 append::@return + breturn: + //SEG404 [177] return + rts + //SEG405 append::@2 + b2: + //SEG406 [178] *((byte*) append::dst#4) ← ++ *((byte*) append::dst#4) -- _deref_pbuz1=_inc__deref_pbuz1 + ldy #0 + lda (dst),y + clc + adc #1 + ldy #0 + sta (dst),y + //SEG407 [179] (word) append::value#0 ← (word) append::value#5 - (word) append::sub#6 -- vwuz1=vwuz1_minus_vwuz2 + lda value + sec + sbc sub + sta value + lda value+1 + sbc sub+1 + sta value+1 + jmp b1_from_b2 +} +//SEG408 div10 +// div10(word zeropage(4) val) +div10: { + .label _0 = 4 + .label _2 = 6 + .label _3 = 4 + .label _4 = 6 + .label _5 = 6 + .label val = 4 + .label val_1 = 6 + .label return = 4 + .label val_4 = 2 + //SEG409 [180] (word~) div10::$0 ← (word) div10::val#4 >> (byte/signed byte/word/signed word/dword/signed dword) 1 -- vwuz1=vwuz2_ror_1 + lda val_4+1 + lsr + sta _0+1 + lda val_4 + ror + sta _0 + //SEG410 [181] (word) div10::val#0 ← (word~) div10::$0 + (byte/signed byte/word/signed word/dword/signed dword) 1 -- vwuz1=vwuz1_plus_1 + inc val + bne !+ + inc val+1 + !: + //SEG411 [182] (word~) div10::$2 ← (word) div10::val#0 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vwuz1=vwuz2_rol_1 + lda val + asl + sta _2 + lda val+1 + rol + sta _2+1 + //SEG412 [183] (word) div10::val#1 ← (word) div10::val#0 + (word~) div10::$2 -- vwuz1=vwuz2_plus_vwuz1 + lda val_1 + clc + adc val + sta val_1 + lda val_1+1 + adc val+1 + sta val_1+1 + //SEG413 [184] (word~) div10::$3 ← (word) div10::val#1 >> (byte/signed byte/word/signed word/dword/signed dword) 4 -- vwuz1=vwuz2_ror_4 + lda val_1+1 + sta _3+1 + lda val_1 + sta _3 + ldy #4 + !: + lsr _3+1 + ror _3 + dey + bne !- + //SEG414 [185] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 -- vwuz1=vwuz2_plus_vwuz1 + lda val + clc + adc val_1 + sta val + lda val+1 + adc val_1+1 + sta val+1 + //SEG415 [186] (word~) div10::$4 ← (word) div10::val#2 >> (byte/signed byte/word/signed word/dword/signed dword) 4 -- vwuz1=vwuz2_ror_4 + lda val+1 + sta _4+1 + lda val + sta _4 + ldy #4 + !: + lsr _4+1 + ror _4 + dey + bne !- + //SEG416 [187] (word~) div10::$5 ← (word~) div10::$4 >> (byte/signed byte/word/signed word/dword/signed dword) 4 -- vwuz1=vwuz1_ror_4 + ldy #4 + !: + lsr _5+1 + ror _5 + dey + bne !- + //SEG417 [188] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$5 -- vwuz1=vwuz1_plus_vwuz2 + lda val + clc + adc _5 + sta val + lda val+1 + adc _5+1 + sta val+1 + //SEG418 [189] (word) div10::return#0 ← (word) div10::val#3 >> (byte/signed byte/word/signed word/dword/signed dword) 4 -- vwuz1=vwuz1_ror_4 + ldy #4 + !: + lsr return+1 + ror return + dey + bne !- + jmp breturn + //SEG419 div10::@return + breturn: + //SEG420 [190] return + rts +} +//SEG421 div16u +// Performs division on two 16 bit unsigned words +// Returns the quotient dividend/divisor. +// The remainder will be set into the global variable rem16u +// Implemented using simple binary division +// div16u(word zeropage(2) dividend) +div16u: { + .label divisor = $a + .label return = 4 + .label dividend = 2 + //SEG422 [191] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 -- vwuz1=vwuz2 + lda dividend + sta divr16u.dividend + lda dividend+1 + sta divr16u.dividend+1 + //SEG423 [192] call divr16u + //SEG424 [196] phi from div16u to divr16u [phi:div16u->divr16u] + divr16u_from_div16u: + jsr divr16u + //SEG425 [193] (word) divr16u::return#2 ← (word) divr16u::return#0 + jmp b1 + //SEG426 div16u::@1 + b1: + //SEG427 [194] (word) div16u::return#0 ← (word) divr16u::return#2 + jmp breturn + //SEG428 div16u::@return + breturn: + //SEG429 [195] return + rts +} +//SEG430 divr16u +// Performs division on two 16 bit unsigned words and an initial remainder +// Returns the quotient dividend/divisor. +// The final remainder will be set into the global variable rem16u +// Implemented using simple binary division +// divr16u(word zeropage(8) dividend, word zeropage(6) rem) +divr16u: { + .label rem = 6 + .label dividend = 8 + .label quotient = 4 + .label return = 4 + //SEG431 [197] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] + b1_from_divr16u: + //SEG432 [197] phi (byte) divr16u::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:divr16u->divr16u::@1#0] -- vbuxx=vbuc1 + ldx #0 + //SEG433 [197] phi (word) divr16u::quotient#3 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 + lda #0 + sta quotient + lda #0 + sta quotient+1 + //SEG434 [197] phi (word) divr16u::dividend#2 = (word) divr16u::dividend#1 [phi:divr16u->divr16u::@1#2] -- register_copy + //SEG435 [197] phi (word) divr16u::rem#4 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:divr16u->divr16u::@1#3] -- vwuz1=vbuc1 + lda #0 + sta rem + lda #0 + sta rem+1 + jmp b1 + //SEG436 [197] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] + b1_from_b3: + //SEG437 [197] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy + //SEG438 [197] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy + //SEG439 [197] phi (word) divr16u::dividend#2 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy + //SEG440 [197] phi (word) divr16u::rem#4 = (word) divr16u::rem#9 [phi:divr16u::@3->divr16u::@1#3] -- register_copy + jmp b1 + //SEG441 divr16u::@1 + b1: + //SEG442 [198] (word) divr16u::rem#0 ← (word) divr16u::rem#4 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vwuz1=vwuz1_rol_1 + asl rem + rol rem+1 + //SEG443 [199] (byte~) divr16u::$1 ← > (word) divr16u::dividend#2 -- vbuaa=_hi_vwuz1 + lda dividend+1 + //SEG444 [200] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte/word/signed word/dword/signed dword) $80 -- vbuaa=vbuaa_band_vbuc1 + and #$80 + //SEG445 [201] if((byte~) divr16u::$2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16u::@2 -- vbuaa_eq_0_then_la1 + cmp #0 + beq b2_from_b1 + jmp b4 + //SEG446 divr16u::@4 + b4: + //SEG447 [202] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte/signed byte/word/signed word/dword/signed dword) 1 -- vwuz1=vwuz1_bor_vbuc1 + lda #1 + ora rem + sta rem + //SEG448 [203] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] + b2_from_b1: + b2_from_b4: + //SEG449 [203] phi (word) divr16u::rem#5 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy + jmp b2 + //SEG450 divr16u::@2 + b2: + //SEG451 [204] (word) divr16u::dividend#0 ← (word) divr16u::dividend#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vwuz1=vwuz1_rol_1 + asl dividend + rol dividend+1 + //SEG452 [205] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vwuz1=vwuz1_rol_1 + asl quotient + rol quotient+1 + //SEG453 [206] if((word) divr16u::rem#5<(const word) div16u::divisor#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 + lda rem+1 + cmp #>div16u.divisor + bcc b3_from_b2 + bne !+ + lda rem + cmp #div16u.divisor + sta rem+1 + //SEG457 [209] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] + b3_from_b2: + b3_from_b5: + //SEG458 [209] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy + //SEG459 [209] phi (word) divr16u::rem#9 = (word) divr16u::rem#5 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy + jmp b3 + //SEG460 divr16u::@3 + b3: + //SEG461 [210] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuxx=_inc_vbuxx + inx + //SEG462 [211] if((byte) divr16u::i#1!=(byte/signed byte/word/signed word/dword/signed dword) $10) goto divr16u::@1 -- vbuxx_neq_vbuc1_then_la1 + cpx #$10 + bne b1_from_b3 + jmp breturn + //SEG463 divr16u::@return + breturn: + //SEG464 [212] return + rts +} + // "char buf16[16]" is the normal way -- not supported + strTemp: .fill $64, 0 + +ASSEMBLER OPTIMIZATIONS +Removing instruction jmp b1 +Removing instruction jmp bend +Removing instruction jmp b1 +Removing instruction jmp b2 +Removing instruction jmp b8 +Removing instruction jmp b3 +Removing instruction jmp b9 +Removing instruction jmp b10 +Removing instruction jmp b4 +Removing instruction jmp b5 +Removing instruction jmp b6 +Removing instruction jmp b11 +Removing instruction jmp b7 +Removing instruction jmp b12 +Removing instruction jmp b13 +Removing instruction jmp breturn +Removing instruction jmp breturn +Removing instruction jmp b1 +Removing instruction jmp b31 +Removing instruction jmp b27 +Removing instruction jmp b36 +Removing instruction jmp breturn +Removing instruction jmp b4 +Removing instruction jmp b24 +Removing instruction jmp b25 +Removing instruction jmp b38 +Removing instruction jmp b22 +Removing instruction jmp b8 +Removing instruction jmp b9 +Removing instruction jmp b10 +Removing instruction jmp b11 +Removing instruction jmp b12 +Removing instruction jmp b14 +Removing instruction jmp b15 +Removing instruction jmp b19 +Removing instruction jmp b20 +Removing instruction jmp b21 +Removing instruction jmp b16 +Removing instruction jmp b17 +Removing instruction jmp b18 +Removing instruction jmp b32 +Removing instruction jmp b33 +Removing instruction jmp b34 +Removing instruction jmp b29 +Removing instruction jmp b30 +Removing instruction jmp b13 +Removing instruction jmp b1 +Removing instruction jmp b14 +Removing instruction jmp b2 +Removing instruction jmp b15 +Removing instruction jmp b3 +Removing instruction jmp b16 +Removing instruction jmp b4 +Removing instruction jmp breturn +Removing instruction jmp b12 +Removing instruction jmp b11 +Removing instruction jmp b10 +Removing instruction jmp b9 +Removing instruction jmp b1 +Removing instruction jmp breturn +Removing instruction jmp breturn +Removing instruction jmp b1 +Removing instruction jmp breturn +Removing instruction jmp b1 +Removing instruction jmp b4 +Removing instruction jmp b2 +Removing instruction jmp b5 +Removing instruction jmp b3 +Removing instruction jmp breturn +Succesful ASM optimization Pass5NextJumpElimination +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction ldy bLen +Replacing instruction ldy #0 with TAY +Removing instruction ldy #0 +Removing instruction lda val_1+1 +Removing instruction lda val+1 +Replacing instruction lda #0 with TXA +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction lda #0 +Succesful ASM optimization Pass5UnnecesaryLoadElimination +Replacing label b1_from_b10 with b1 +Replacing label b5_from_b13 with b5 +Replacing label b1_from_b27 with b1 +Replacing label b22_from_b11 with b22 +Replacing label b19_from_b19 with b19 +Replacing label b22_from_b20 with b22 +Replacing label b21_from_b40 with b21 +Replacing label b22_from_b40 with b22 +Replacing label b21_from_b21 with b21 +Replacing label b22_from_b21 with b22 +Replacing label b16_from_b39 with b16 +Replacing label b16_from_b18 with b16 +Replacing label b15_from_b18 with b15 +Replacing label b22_from_b6 with b22 +Replacing label b29_from_b43 with b29 +Replacing label b29_from_b42 with b29 +Replacing label b30_from_b35 with b30 +Replacing label b4_from_b12 with b4 +Replacing label b1_from_b2 with b1 +Replacing label b2_from_b1 with b2 +Replacing label b3_from_b2 with b3 +Replacing label b3_from_b2 with b3 +Replacing label b1_from_b3 with b1 +Removing instruction b1_from_bbegin: +Removing instruction b1: +Removing instruction bend_from_b1: +Removing instruction b1_from_b10: +Removing instruction b9_from_b3: +Removing instruction b5_from_b13: +Removing instruction b12_from_b7: +Removing instruction breturn: +Removing instruction b1_from_b27: +Removing instruction b22_from_b11: +Removing instruction b22_from_b20: +Removing instruction b22_from_b21: +Removing instruction b22_from_b38: +Removing instruction b22_from_b40: +Removing instruction b22_from_b6: +Removing instruction b27_from_b22: +Removing instruction b8_from_b26: +Removing instruction b9_from_b8: +Removing instruction b10_from_b9: +Removing instruction b11_from_b10: +Removing instruction b15_from_b14: +Removing instruction b15_from_b18: +Removing instruction b19_from_b15: +Removing instruction b19_from_b19: +Removing instruction b21_from_b21: +Removing instruction b21_from_b40: +Removing instruction b16_from_b18: +Removing instruction b16_from_b39: +Removing instruction b17_from_b16: +Removing instruction b18_from_b17: +Removing instruction b27_from_b23: +Removing instruction b29_from_b34: +Removing instruction b29_from_b42: +Removing instruction b29_from_b43: +Removing instruction b30_from_b28: +Removing instruction b30_from_b35: +Removing instruction b2_from_b14: +Removing instruction b3_from_b15: +Removing instruction b4_from_b12: +Removing instruction b4_from_b16: +Removing instruction append_from_b8: +Removing instruction append_from_b7: +Removing instruction append_from_b6: +Removing instruction append_from_b5: +Removing instruction b1_from_b9: +Removing instruction b1_from_append: +Removing instruction b1_from_b2: +Removing instruction breturn: +Removing instruction b1_from_b3: +Removing instruction b2_from_b1: +Removing instruction b2_from_b4: +Removing instruction b3_from_b2: +Removing instruction b3_from_b5: +Succesful ASM optimization Pass5RedundantLabelElimination +Removing instruction bend: +Removing instruction b1_from_main: +Removing instruction b8: +Removing instruction b3: +Removing instruction myprintf_from_b3: +Removing instruction b9: +Removing instruction b10: +Removing instruction b4: +Removing instruction b5_from_b4: +Removing instruction b11: +Removing instruction b7: +Removing instruction myprintf_from_b7: +Removing instruction b12: +Removing instruction b13: +Removing instruction breturn: +Removing instruction b1_from_myprintf: +Removing instruction b31: +Removing instruction b27_from_b31: +Removing instruction b36: +Removing instruction breturn: +Removing instruction b27_from_b4: +Removing instruction b24: +Removing instruction b25: +Removing instruction b38: +Removing instruction b8: +Removing instruction b10: +Removing instruction utoa_from_b7: +Removing instruction b12_from_b7: +Removing instruction b14: +Removing instruction b20: +Removing instruction b15_from_b39: +Removing instruction b17: +Removing instruction b12_from_b13: +Removing instruction b32: +Removing instruction b33: +Removing instruction b34: +Removing instruction b27_from_b29: +Removing instruction b30_from_b41: +Removing instruction b13: +Removing instruction b1_from_b13: +Removing instruction b14: +Removing instruction b15: +Removing instruction b16: +Removing instruction breturn: +Removing instruction b12: +Removing instruction b11: +Removing instruction b3_from_b11: +Removing instruction b10: +Removing instruction b2_from_b10: +Removing instruction b9: +Removing instruction breturn: +Removing instruction breturn: +Removing instruction divr16u_from_div16u: +Removing instruction b1: +Removing instruction b1_from_divr16u: +Removing instruction b4: +Removing instruction b5: +Removing instruction breturn: +Succesful ASM optimization Pass5UnusedLabelElimination +Updating BasicUpstart to call main directly +Removing instruction jsr main +Succesful ASM optimization Pass5SkipBegin +Skipping double jump to b27 in jmp b27_from_b30 +Succesful ASM optimization Pass5DoubleJumpElimination +Relabelling long label b9_from_b26 to b8 +Relabelling long label b11_from_b9 to b10 +Relabelling long label b18_from_b16 to b14 +Relabelling long label b27_from_b30 to b17 +Succesful ASM optimization Pass5RelabelLongLabels +Removing instruction jmp b1 +Removing instruction jmp b5 +Removing instruction jmp b1 +Removing instruction jmp b19 +Removing instruction jmp b1 +Succesful ASM optimization Pass5NextJumpElimination +Replacing instruction lda #0 with TYA +Removing instruction bbegin: +Removing instruction b17: +Succesful ASM optimization Pass5UnusedLabelElimination +Fixing long branch [183] beq b2 to bne +Fixing long branch [205] bcs b37 to bcc +Fixing long branch [216] beq b6 to bne +Fixing long branch [424] bne b5 to beq +Fixing long branch [429] bcs b5 to bcc + +FINAL SYMBOL TABLE +(label) @1 +(label) @begin +(label) @end +(void()) Print() +(label) Print::@return +(byte*) TIMEHI +(const byte*) TIMEHI#0 TIMEHI = ((byte*))(byte/word/signed word/dword/signed dword) $a1 +(byte*) TIMELO +(const byte*) TIMELO#0 TIMELO = ((byte*))(byte/word/signed word/dword/signed dword) $a2 +(byte*) VICBANK +(const byte*) VICBANK#0 VICBANK = ((byte*))(word/dword/signed dword) $d018 +(word()) append((byte*) append::dst , (word) append::value , (word) append::sub) +(label) append::@1 +(label) append::@2 +(label) append::@return +(byte*) append::dst +(byte*) append::dst#1 dst zp ZP_WORD:20 2.0 +(byte*) append::dst#2 dst zp ZP_WORD:20 2.0 +(byte*) append::dst#3 dst zp ZP_WORD:20 2.0 +(byte*) append::dst#4 dst zp ZP_WORD:20 335.0 +(word) append::return +(word) append::return#10 return zp ZP_WORD:18 4.0 +(word) append::return#2 return zp ZP_WORD:18 4.0 +(word) append::return#3 return zp ZP_WORD:18 4.0 +(word) append::return#4 return zp ZP_WORD:18 4.0 +(word) append::sub +(word) append::sub#6 sub zp ZP_WORD:22 333.6666666666667 +(word) append::value +(word) append::value#0 value zp ZP_WORD:18 2002.0 +(word) append::value#1 value zp ZP_WORD:18 4.0 +(word) append::value#2 value zp ZP_WORD:18 4.0 +(word) append::value#3 value zp ZP_WORD:18 4.0 +(word) append::value#4 value zp ZP_WORD:18 4.0 +(word) append::value#5 value zp ZP_WORD:18 376.625 +(word) append::value#8 value zp ZP_WORD:18 5.0 +(word()) div10((word) div10::val) +(word~) div10::$0 $0 zp ZP_WORD:4 4.0 +(word~) div10::$2 $2 zp ZP_WORD:6 4.0 +(word~) div10::$3 $3 zp ZP_WORD:4 4.0 +(word~) div10::$4 $4 zp ZP_WORD:6 4.0 +(word~) div10::$5 $5 zp ZP_WORD:6 4.0 +(label) div10::@return +(word) div10::return +(word) div10::return#0 return zp ZP_WORD:4 34.33333333333333 +(word) div10::return#2 return zp ZP_WORD:4 202.0 +(word) div10::val +(word) div10::val#0 val zp ZP_WORD:4 3.0 +(word) div10::val#1 val#1 zp ZP_WORD:6 3.0 +(word) div10::val#2 val zp ZP_WORD:4 2.0 +(word) div10::val#3 val zp ZP_WORD:4 4.0 +(word) div10::val#4 val#4 zp ZP_WORD:2 103.0 +(word()) div16u((word) div16u::dividend , (word) div16u::divisor) +(label) div16u::@1 +(label) div16u::@return +(word) div16u::dividend +(word) div16u::dividend#0 dividend zp ZP_WORD:2 103.0 +(word) div16u::divisor +(const word) div16u::divisor#0 divisor = (byte/signed byte/word/signed word/dword/signed dword) $a +(word) div16u::return +(word) div16u::return#0 return zp ZP_WORD:4 34.33333333333333 +(word) div16u::return#2 return zp ZP_WORD:4 202.0 +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) +(byte~) divr16u::$1 reg byte a 2002.0 +(byte~) divr16u::$2 reg byte a 2002.0 +(label) divr16u::@1 +(label) divr16u::@2 +(label) divr16u::@3 +(label) divr16u::@4 +(label) divr16u::@5 +(label) divr16u::@return +(word) divr16u::dividend +(word) divr16u::dividend#0 dividend zp ZP_WORD:8 250.25 +(word) divr16u::dividend#1 dividend zp ZP_WORD:8 2.0 +(word) divr16u::dividend#2 dividend zp ZP_WORD:8 429.2857142857143 +(word) divr16u::divisor +(byte) divr16u::i +(byte) divr16u::i#1 reg byte x 1501.5 +(byte) divr16u::i#2 reg byte x 154.0 +(word) divr16u::quotient +(word) divr16u::quotient#1 quotient zp ZP_WORD:4 1501.5 +(word) divr16u::quotient#2 quotient zp ZP_WORD:4 1001.0 +(word) divr16u::quotient#3 quotient zp ZP_WORD:4 250.25 +(word) divr16u::rem +(word) divr16u::rem#0 rem zp ZP_WORD:6 750.75 +(word) divr16u::rem#1 rem zp ZP_WORD:6 2002.0 +(word) divr16u::rem#2 rem zp ZP_WORD:6 2002.0 +(word) divr16u::rem#4 rem zp ZP_WORD:6 2002.0 +(word) divr16u::rem#5 rem zp ZP_WORD:6 1001.0 +(word) divr16u::rem#9 rem zp ZP_WORD:6 1001.0 +(word) divr16u::return +(word) divr16u::return#0 return zp ZP_WORD:4 601.0 +(word) divr16u::return#2 return zp ZP_WORD:4 4.0 +(signed word()) main() +(word~) main::$11 $11 zp ZP_WORD:6 22.0 +(word~) main::$12 $12 zp ZP_WORD:6 11.0 +(word~) main::$13 $13 zp ZP_WORD:8 22.0 +(word~) main::$2 $2 zp ZP_WORD:6 22.0 +(word~) main::$3 $3 zp ZP_WORD:6 11.0 +(word~) main::$4 $4 zp ZP_WORD:8 22.0 +(label) main::@1 +(label) main::@10 +(label) main::@11 +(label) main::@12 +(label) main::@13 +(label) main::@2 +(label) main::@3 +(label) main::@4 +(label) main::@5 +(label) main::@6 +(label) main::@7 +(label) main::@8 +(label) main::@9 +(label) main::@return +(signed word) main::return +(const string) main::str str = (string) "200 DIV16U: %5d,%4d IN %04d FRAMESm@" +(const string) main::str1 str1 = (string) "200 DIV10 : %5d,%4d IN %04d FRAMESm@" +(word) main::u +(word) main::u#11 u zp ZP_WORD:2 7.05263157894737 +(word) main::u#15 u zp ZP_WORD:2 7.05263157894737 +(word) main::u#2 u zp ZP_WORD:2 7.333333333333333 +(word) main::u#4 u zp ZP_WORD:2 7.333333333333333 +(word) main::v +(word) main::v#1 v zp ZP_WORD:4 14.0 +(word) main::v#2 v zp ZP_WORD:4 14.0 +(byte()) myprintf((byte*) myprintf::dst , (byte*) myprintf::str , (word) myprintf::w1 , (word) myprintf::w2 , (word) myprintf::w3) +(word~) myprintf::$17 $17 zp ZP_WORD:18 202.0 +(byte~) myprintf::$22 reg byte a 101.0 +(byte~) myprintf::$23 reg byte a 202.0 +(byte~) myprintf::$28 reg byte a 101.0 +(byte~) myprintf::$29 reg byte a 202.0 +(byte~) myprintf::$39 reg byte a 1001.0 +(byte~) myprintf::$47 reg byte a 202.0 +(label) myprintf::@1 +(label) myprintf::@10 +(label) myprintf::@11 +(label) myprintf::@12 +(label) myprintf::@13 +(label) myprintf::@14 +(label) myprintf::@15 +(label) myprintf::@16 +(label) myprintf::@17 +(label) myprintf::@18 +(label) myprintf::@19 +(label) myprintf::@2 +(label) myprintf::@20 +(label) myprintf::@21 +(label) myprintf::@22 +(label) myprintf::@23 +(label) myprintf::@24 +(label) myprintf::@25 +(label) myprintf::@26 +(label) myprintf::@27 +(label) myprintf::@28 +(label) myprintf::@29 +(label) myprintf::@3 +(label) myprintf::@30 +(label) myprintf::@31 +(label) myprintf::@32 +(label) myprintf::@33 +(label) myprintf::@34 +(label) myprintf::@35 +(label) myprintf::@36 +(label) myprintf::@37 +(label) myprintf::@38 +(label) myprintf::@39 +(label) myprintf::@4 +(label) myprintf::@40 +(label) myprintf::@41 +(label) myprintf::@42 +(label) myprintf::@43 +(label) myprintf::@5 +(label) myprintf::@6 +(label) myprintf::@7 +(label) myprintf::@8 +(label) myprintf::@9 +(label) myprintf::@return +(byte) myprintf::b +(byte) myprintf::b#1 reg byte x 126.25000000000003 +(byte) myprintf::b#15 reg byte x 75.75 +(byte) myprintf::b#16 reg byte x 75.75 +(byte) myprintf::b#17 reg byte x 248.32 +(byte) myprintf::b#25 reg byte x 303.0 +(byte) myprintf::b#5 reg byte x 2002.0 +(byte) myprintf::b#6 reg byte x 202.0 +(byte) myprintf::bArg +(byte) myprintf::bArg#1 bArg zp ZP_BYTE:11 202.0 +(byte) myprintf::bArg#10 bArg zp ZP_BYTE:11 235.66666666666663 +(byte) myprintf::bArg#12 bArg zp ZP_BYTE:11 12.625 +(byte) myprintf::bDigits +(byte) myprintf::bDigits#1 bDigits zp ZP_BYTE:17 202.0 +(byte) myprintf::bDigits#10 bDigits zp ZP_BYTE:17 350.5 +(byte) myprintf::bDigits#14 bDigits zp ZP_BYTE:17 23.488372093023255 +(byte) myprintf::bDigits#16 bDigits zp ZP_BYTE:17 188.25 +(byte) myprintf::bDigits#2 bDigits zp ZP_BYTE:17 2002.0 +(byte) myprintf::bDigits#24 bDigits zp ZP_BYTE:17 201.99999999999997 +(byte) myprintf::bDigits#25 bDigits zp ZP_BYTE:17 1607.0 +(byte) myprintf::bDigits#3 bDigits zp ZP_BYTE:17 2002.0 +(byte) myprintf::bDigits#8 bDigits zp ZP_BYTE:17 701.0 +(byte) myprintf::bFormat +(byte) myprintf::bFormat#10 bFormat zp ZP_BYTE:10 40.4 +(byte) myprintf::bFormat#4 bFormat zp ZP_BYTE:10 168.33333333333331 +(byte) myprintf::bLeadZero +(byte) myprintf::bLeadZero#10 bLeadZero zp ZP_BYTE:15 22.818181818181817 +(byte) myprintf::bLeadZero#18 bLeadZero zp ZP_BYTE:15 168.33333333333331 +(byte) myprintf::bLen +(byte) myprintf::bLen#1 bLen zp ZP_BYTE:16 202.0 +(byte) myprintf::bLen#10 reg byte y 43.285714285714285 +(byte) myprintf::bLen#11 bLen zp ZP_BYTE:16 620.8 +(byte) myprintf::bLen#12 bLen zp ZP_BYTE:16 1552.0 +(byte) myprintf::bLen#13 bLen zp ZP_BYTE:16 1552.0 +(byte) myprintf::bLen#14 bLen zp ZP_BYTE:16 34.487804878048784 +(byte) myprintf::bLen#23 bLen zp ZP_BYTE:16 1203.0 +(byte) myprintf::bLen#24 bLen zp ZP_BYTE:16 460.99999999999994 +(byte) myprintf::bLen#28 bLen zp ZP_BYTE:16 1607.0 +(byte) myprintf::bLen#3 bLen zp ZP_BYTE:16 202.0 +(byte) myprintf::bLen#4 bLen zp ZP_BYTE:16 1001.0 +(byte) myprintf::bLen#6 bLen zp ZP_BYTE:16 1001.0 +(byte) myprintf::bLen#7 bLen zp ZP_BYTE:16 202.0 +(byte) myprintf::bTrailing +(byte) myprintf::bTrailing#10 bTrailing zp ZP_BYTE:14 10.712121212121211 +(byte) myprintf::bTrailing#21 bTrailing zp ZP_BYTE:14 168.33333333333331 +(byte[6]) myprintf::buf6 +(const byte[6]) myprintf::buf6#0 buf6 = { fill( 6, 0) } +(byte) myprintf::digit +(byte) myprintf::digit#2 digit zp ZP_BYTE:10 1501.5 +(byte) myprintf::digit#3 digit zp ZP_BYTE:10 1001.0 +(byte*) myprintf::dst +(byte) myprintf::return +(byte) myprintf::return#0 return zp ZP_BYTE:16 236.3333333333333 +(byte*) myprintf::str +(byte*) myprintf::str#0 str zp ZP_WORD:8 151.5 +(byte*) myprintf::str#10 str zp ZP_WORD:8 4.121621621621622 +(byte*) myprintf::str#5 str zp ZP_WORD:8 2.0 +(word) myprintf::w +(word) myprintf::w#10 w zp ZP_WORD:12 15.303030303030305 +(word) myprintf::w#17 w zp ZP_WORD:12 235.66666666666663 +(word) myprintf::w#21 w zp ZP_WORD:12 202.0 +(word~) myprintf::w#51 w zp ZP_WORD:12 202.0 +(word~) myprintf::w#52 w zp ZP_WORD:12 202.0 +(word~) myprintf::w#53 w zp ZP_WORD:12 202.0 +(word) myprintf::w1 +(word) myprintf::w1#0 w1 zp ZP_WORD:2 11.0 +(word) myprintf::w1#1 w1 zp ZP_WORD:2 11.0 +(word) myprintf::w1#6 w1 zp ZP_WORD:2 1.5974025974025974 +(word) myprintf::w2 +(word) myprintf::w2#0 w2 zp ZP_WORD:4 22.0 +(word) myprintf::w2#1 w2 zp ZP_WORD:4 22.0 +(word) myprintf::w2#7 w2 zp ZP_WORD:4 1.5974025974025974 +(word) myprintf::w3 +(word) myprintf::w3#0 w3 zp ZP_WORD:6 7.333333333333333 +(word) myprintf::w3#1 w3 zp ZP_WORD:6 7.333333333333333 +(word) myprintf::w3#7 w3 zp ZP_WORD:6 1.5974025974025974 +(byte[$64]) strTemp +(const byte[$64]) strTemp#0 strTemp = { fill( $64, 0) } +(void()) utoa((word) utoa::value , (byte*) utoa::dst) +(byte~) utoa::$16 reg byte a 4.0 +(byte~) utoa::$17 reg byte a 4.0 +(label) utoa::@1 +(label) utoa::@10 +(label) utoa::@11 +(label) utoa::@12 +(label) utoa::@13 +(label) utoa::@14 +(label) utoa::@15 +(label) utoa::@16 +(label) utoa::@2 +(label) utoa::@3 +(label) utoa::@4 +(label) utoa::@5 +(label) utoa::@6 +(label) utoa::@7 +(label) utoa::@8 +(label) utoa::@9 +(label) utoa::@return +(byte) utoa::bStarted +(byte) utoa::bStarted#5 reg byte x 1.3333333333333333 +(byte) utoa::bStarted#6 reg byte x 2.0 +(byte) utoa::bStarted#7 reg byte x 4.0 +(byte*) utoa::dst +(byte*) utoa::dst#1 dst zp ZP_WORD:20 4.0 +(byte*) utoa::dst#10 dst zp ZP_WORD:20 1.25 +(byte*) utoa::dst#12 dst zp ZP_WORD:20 2.0 +(byte*) utoa::dst#13 dst zp ZP_WORD:20 1.25 +(byte*) utoa::dst#16 dst zp ZP_WORD:20 0.75 +(byte*) utoa::dst#2 dst zp ZP_WORD:20 4.0 +(byte*) utoa::dst#3 dst zp ZP_WORD:20 4.0 +(byte*) utoa::dst#4 dst zp ZP_WORD:20 4.0 +(word) utoa::value +(word) utoa::value#0 value zp ZP_WORD:18 4.0 +(word) utoa::value#1 value zp ZP_WORD:18 2.0 +(word) utoa::value#10 value zp ZP_WORD:18 2.5 +(word) utoa::value#11 value zp ZP_WORD:18 2.5 +(word) utoa::value#12 value zp ZP_WORD:18 6.0 +(word) utoa::value#2 value zp ZP_WORD:18 2.0 +(word) utoa::value#3 value zp ZP_WORD:18 2.0 +(word) utoa::value#4 value zp ZP_WORD:18 35.66666666666666 +(word) utoa::value#6 value zp ZP_WORD:18 2.5 +(byte*) zp1 +(const byte*) zp1#0 zp1 = ((byte*))(byte/signed byte/word/signed word/dword/signed dword) $61 +(byte*) zp2 +(const byte*) zp2#0 zp2 = ((byte*))(byte/signed byte/word/signed word/dword/signed dword) $62 + +zp ZP_WORD:2 [ main::u#11 main::u#2 myprintf::w1#6 myprintf::w1#0 myprintf::w1#1 div16u::dividend#0 main::u#15 main::u#4 div10::val#4 ] +zp ZP_WORD:4 [ myprintf::w2#7 myprintf::w2#0 myprintf::w2#1 main::v#1 main::v#2 div16u::return#2 div16u::return#0 div10::return#2 div10::return#0 divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 div10::$3 div10::val#2 div10::val#3 div10::$0 div10::val#0 ] +zp ZP_WORD:6 [ myprintf::w3#7 myprintf::w3#0 myprintf::w3#1 main::$3 main::$12 main::$2 main::$11 divr16u::rem#4 divr16u::rem#9 divr16u::rem#5 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 div10::$2 div10::val#1 div10::$4 div10::$5 ] +zp ZP_WORD:8 [ myprintf::str#10 myprintf::str#5 myprintf::str#0 divr16u::dividend#2 divr16u::dividend#1 divr16u::dividend#0 main::$4 main::$13 ] +zp ZP_BYTE:10 [ myprintf::bFormat#10 myprintf::bFormat#4 myprintf::digit#3 myprintf::digit#2 ] +zp ZP_BYTE:11 [ myprintf::bArg#12 myprintf::bArg#10 myprintf::bArg#1 ] +zp ZP_WORD:12 [ myprintf::w#10 myprintf::w#17 myprintf::w#21 myprintf::w#51 myprintf::w#52 myprintf::w#53 ] +zp ZP_BYTE:14 [ myprintf::bTrailing#10 myprintf::bTrailing#21 ] +zp ZP_BYTE:15 [ myprintf::bLeadZero#10 myprintf::bLeadZero#18 ] +reg byte a [ myprintf::$22 ] +reg byte a [ myprintf::$28 ] +reg byte x [ myprintf::b#17 myprintf::b#5 ] +zp ZP_BYTE:16 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#14 myprintf::return#0 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] +zp ZP_BYTE:17 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#14 myprintf::bDigits#24 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] +reg byte a [ myprintf::$39 ] +reg byte x [ myprintf::b#25 myprintf::b#1 myprintf::b#6 ] +reg byte x [ utoa::bStarted#7 utoa::bStarted#6 utoa::bStarted#5 ] +zp ZP_WORD:18 [ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 append::return#10 append::return#4 append::return#3 append::return#2 myprintf::$17 ] +zp ZP_WORD:20 [ utoa::dst#12 utoa::dst#4 utoa::dst#13 utoa::dst#2 utoa::dst#10 utoa::dst#16 utoa::dst#1 append::dst#4 append::dst#1 append::dst#2 append::dst#3 utoa::dst#3 ] +zp ZP_WORD:22 [ append::sub#6 ] +reg byte x [ divr16u::i#2 divr16u::i#1 ] +reg byte x [ myprintf::b#15 ] +reg byte a [ myprintf::$23 ] +reg byte y [ myprintf::bLen#10 ] +reg byte x [ myprintf::b#16 ] +reg byte a [ myprintf::$29 ] +reg byte a [ myprintf::$47 ] +reg byte a [ utoa::$16 ] +reg byte a [ utoa::$17 ] +reg byte a [ divr16u::$1 ] +reg byte a [ divr16u::$2 ] + + +FINAL ASSEMBLER +Score: 355871 + +//SEG0 File Comments +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" +//SEG2 Global Constants & labels + .label zp1 = $61 + // #define zp1 *(byte *)0x61 -- allows "zp1" vs "*zp1" below -- not supported -- + .label zp2 = $62 + .label TIMEHI = $a1 + .label TIMELO = $a2 + .label VICBANK = $d018 +//SEG3 @begin +//SEG4 [1] phi from @begin to @1 [phi:@begin->@1] +//SEG5 @1 +//SEG6 [2] call main +//SEG7 [3] phi from @1 to @end [phi:@1->@end] +//SEG8 @end +//SEG9 main +main: { + .label _2 = 6 + .label _3 = 6 + .label _4 = 8 + .label _11 = 6 + .label _12 = 6 + .label _13 = 8 + .label v = 4 + .label u = 2 + //SEG10 [4] *((const byte*) VICBANK#0) ← (byte/signed byte/word/signed word/dword/signed dword) $17 -- _deref_pbuc1=vbuc2 + lda #$17 + sta VICBANK + //SEG11 [5] *((const byte*) zp1#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta zp1 + //SEG12 [6] phi from main to main::@1 [phi:main->main::@1] + //SEG13 [6] phi (word) main::u#11 = (word/signed word/dword/signed dword) $6e85 [phi:main->main::@1#0] -- vwuz1=vwuc1 + lda #<$6e85 + sta u + lda #>$6e85 + sta u+1 + //SEG14 [6] phi from main::@10 to main::@1 [phi:main::@10->main::@1] + //SEG15 [6] phi (word) main::u#11 = (word) main::u#2 [phi:main::@10->main::@1#0] -- register_copy + //SEG16 main::@1 + b1: + //SEG17 [7] *((const byte*) TIMEHI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta TIMEHI + //SEG18 [8] *((const byte*) TIMELO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 + sta TIMELO + //SEG19 [9] *((const byte*) zp2#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 + sta zp2 + //SEG20 main::@2 + b2: + //SEG21 [10] (word) div16u::dividend#0 ← (word) main::u#11 + //SEG22 [11] call div16u + jsr div16u + //SEG23 [12] (word) div16u::return#2 ← (word) div16u::return#0 + //SEG24 main::@8 + //SEG25 [13] (word) main::v#1 ← (word) div16u::return#2 + //SEG26 [14] *((const byte*) zp2#0) ← ++ *((const byte*) zp2#0) -- _deref_pbuc1=_inc__deref_pbuc1 + inc zp2 + //SEG27 [15] if(*((const byte*) zp2#0)<(byte/word/signed word/dword/signed dword) $c8) goto main::@2 -- _deref_pbuc1_lt_vbuc2_then_la1 + lda zp2 + cmp #$c8 + bcc b2 + //SEG28 main::@3 + //SEG29 [16] (word~) main::$2 ← ((word)) *((const byte*) TIMEHI#0) -- vwuz1=_word__deref_pbuc1 + lda TIMEHI + sta _2 + lda #0 + sta _2+1 + //SEG30 [17] (word~) main::$3 ← (word~) main::$2 << (byte/signed byte/word/signed word/dword/signed dword) 8 -- vwuz1=vwuz1_rol_vbuc1 + ldy #8 + cpy #0 + beq !e+ + !: + asl _3 + rol _3+1 + dey + bne !- + !e: + //SEG31 [18] (word~) main::$4 ← ((word)) *((const byte*) TIMELO#0) -- vwuz1=_word__deref_pbuc1 + lda TIMELO + sta _4 + lda #0 + sta _4+1 + //SEG32 [19] (word) myprintf::w3#0 ← (word~) main::$3 + (word~) main::$4 -- vwuz1=vwuz1_plus_vwuz2 + lda myprintf.w3 + clc + adc _4 + sta myprintf.w3 + lda myprintf.w3+1 + adc _4+1 + sta myprintf.w3+1 + //SEG33 [20] (word) myprintf::w1#0 ← (word) main::u#11 + //SEG34 [21] (word) myprintf::w2#0 ← (word) main::v#1 + //SEG35 [22] call myprintf + //SEG36 [54] phi from main::@3 to myprintf [phi:main::@3->myprintf] + //SEG37 [54] phi (word) myprintf::w3#7 = (word) myprintf::w3#0 [phi:main::@3->myprintf#0] -- register_copy + //SEG38 [54] phi (word) myprintf::w2#7 = (word) myprintf::w2#0 [phi:main::@3->myprintf#1] -- register_copy + //SEG39 [54] phi (word) myprintf::w1#6 = (word) myprintf::w1#0 [phi:main::@3->myprintf#2] -- register_copy + //SEG40 [54] phi (byte*) myprintf::str#5 = (const string) main::str [phi:main::@3->myprintf#3] -- pbuz1=pbuc1 + lda #str + sta myprintf.str+1 + jsr myprintf + //SEG41 [23] phi from main::@3 to main::@9 [phi:main::@3->main::@9] + //SEG42 main::@9 + //SEG43 [24] call Print + jsr Print + //SEG44 main::@10 + //SEG45 [25] (word) main::u#2 ← (word) main::u#11 - (word/signed word/dword/signed dword) $4d2 -- vwuz1=vwuz1_minus_vwuc1 + lda u + sec + sbc #<$4d2 + sta u + lda u+1 + sbc #>$4d2 + sta u+1 + //SEG46 [26] *((const byte*) zp1#0) ← ++ *((const byte*) zp1#0) -- _deref_pbuc1=_inc__deref_pbuc1 + inc zp1 + //SEG47 [27] if(*((const byte*) zp1#0)<(byte/signed byte/word/signed word/dword/signed dword) $a) goto main::@1 -- _deref_pbuc1_lt_vbuc2_then_la1 + lda zp1 + cmp #$a + bcc b1 + //SEG48 main::@4 + //SEG49 [28] *((const byte*) zp1#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta zp1 + //SEG50 [29] phi from main::@4 to main::@5 [phi:main::@4->main::@5] + //SEG51 [29] phi (word) main::u#15 = (word/signed word/dword/signed dword) $6e85 [phi:main::@4->main::@5#0] -- vwuz1=vwuc1 + lda #<$6e85 + sta u + lda #>$6e85 + sta u+1 + //SEG52 [29] phi from main::@13 to main::@5 [phi:main::@13->main::@5] + //SEG53 [29] phi (word) main::u#15 = (word) main::u#4 [phi:main::@13->main::@5#0] -- register_copy + //SEG54 main::@5 + b5: + //SEG55 [30] *((const byte*) TIMEHI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta TIMEHI + //SEG56 [31] *((const byte*) TIMELO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 + sta TIMELO + //SEG57 [32] *((const byte*) zp2#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 + sta zp2 + //SEG58 main::@6 + b6: + //SEG59 [33] (word) div10::val#4 ← (word) main::u#15 + //SEG60 [34] call div10 + jsr div10 + //SEG61 [35] (word) div10::return#2 ← (word) div10::return#0 + //SEG62 main::@11 + //SEG63 [36] (word) main::v#2 ← (word) div10::return#2 + //SEG64 [37] *((const byte*) zp2#0) ← ++ *((const byte*) zp2#0) -- _deref_pbuc1=_inc__deref_pbuc1 + inc zp2 + //SEG65 [38] if(*((const byte*) zp2#0)<(byte/word/signed word/dword/signed dword) $c8) goto main::@6 -- _deref_pbuc1_lt_vbuc2_then_la1 + lda zp2 + cmp #$c8 + bcc b6 + //SEG66 main::@7 + //SEG67 [39] (word~) main::$11 ← ((word)) *((const byte*) TIMEHI#0) -- vwuz1=_word__deref_pbuc1 + lda TIMEHI + sta _11 + lda #0 + sta _11+1 + //SEG68 [40] (word~) main::$12 ← (word~) main::$11 << (byte/signed byte/word/signed word/dword/signed dword) 8 -- vwuz1=vwuz1_rol_vbuc1 + ldy #8 + cpy #0 + beq !e+ + !: + asl _12 + rol _12+1 + dey + bne !- + !e: + //SEG69 [41] (word~) main::$13 ← ((word)) *((const byte*) TIMELO#0) -- vwuz1=_word__deref_pbuc1 + lda TIMELO + sta _13 + lda #0 + sta _13+1 + //SEG70 [42] (word) myprintf::w3#1 ← (word~) main::$12 + (word~) main::$13 -- vwuz1=vwuz1_plus_vwuz2 + lda myprintf.w3 + clc + adc _13 + sta myprintf.w3 + lda myprintf.w3+1 + adc _13+1 + sta myprintf.w3+1 + //SEG71 [43] (word) myprintf::w1#1 ← (word) main::u#15 + //SEG72 [44] (word) myprintf::w2#1 ← (word) main::v#2 + //SEG73 [45] call myprintf + //SEG74 [54] phi from main::@7 to myprintf [phi:main::@7->myprintf] + //SEG75 [54] phi (word) myprintf::w3#7 = (word) myprintf::w3#1 [phi:main::@7->myprintf#0] -- register_copy + //SEG76 [54] phi (word) myprintf::w2#7 = (word) myprintf::w2#1 [phi:main::@7->myprintf#1] -- register_copy + //SEG77 [54] phi (word) myprintf::w1#6 = (word) myprintf::w1#1 [phi:main::@7->myprintf#2] -- register_copy + //SEG78 [54] phi (byte*) myprintf::str#5 = (const string) main::str1 [phi:main::@7->myprintf#3] -- pbuz1=pbuc1 + lda #str1 + sta myprintf.str+1 + jsr myprintf + //SEG79 [46] phi from main::@7 to main::@12 [phi:main::@7->main::@12] + //SEG80 main::@12 + //SEG81 [47] call Print + jsr Print + //SEG82 main::@13 + //SEG83 [48] (word) main::u#4 ← (word) main::u#15 - (word/signed word/dword/signed dword) $4d2 -- vwuz1=vwuz1_minus_vwuc1 + lda u + sec + sbc #<$4d2 + sta u + lda u+1 + sbc #>$4d2 + sta u+1 + //SEG84 [49] *((const byte*) zp1#0) ← ++ *((const byte*) zp1#0) -- _deref_pbuc1=_inc__deref_pbuc1 + inc zp1 + //SEG85 [50] if(*((const byte*) zp1#0)<(byte/signed byte/word/signed word/dword/signed dword) $a) goto main::@5 -- _deref_pbuc1_lt_vbuc2_then_la1 + lda zp1 + cmp #$a + bcc b5 + //SEG86 main::@return + //SEG87 [51] return + rts + str: .text "200 DIV16U: %5d,%4d IN %04d FRAMESm@" + str1: .text "200 DIV10 : %5d,%4d IN %04d FRAMESm@" +} +//SEG88 Print +Print: { + //SEG89 asm { ldy#0 loop: ldastrTemp,y beqdone jsr$FFD2 iny jmploop done: } + // can this assembly be placed in a separate file and call it from the C code here? + ldy #0 + loop: + lda strTemp,y + beq done + jsr $ffd2 + iny + jmp loop + done: + //SEG90 Print::@return + //SEG91 [53] return + rts +} +//SEG92 myprintf +// myprintf(byte* zeropage(8) str, word zeropage(2) w1, word zeropage(4) w2, word zeropage(6) w3) +myprintf: { + .label _17 = $12 + .label str = 8 + .label bDigits = $11 + .label bLen = $10 + .label digit = $a + .label bArg = $b + .label return = $10 + .label w1 = 2 + .label w2 = 4 + .label w3 = 6 + .label bFormat = $a + .label w = $c + .label bTrailing = $e + .label bLeadZero = $f + //SEG93 [55] phi from myprintf to myprintf::@1 [phi:myprintf->myprintf::@1] + //SEG94 [55] phi (byte) myprintf::bLeadZero#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:myprintf->myprintf::@1#0] -- vbuz1=vbuc1 + lda #0 + sta bLeadZero + //SEG95 [55] phi (byte) myprintf::bDigits#14 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:myprintf->myprintf::@1#1] -- vbuz1=vbuc1 + sta bDigits + //SEG96 [55] phi (byte) myprintf::bTrailing#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:myprintf->myprintf::@1#2] -- vbuz1=vbuc1 + sta bTrailing + //SEG97 [55] phi (word) myprintf::w#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:myprintf->myprintf::@1#3] -- vwuz1=vbuc1 + sta w + sta w+1 + //SEG98 [55] phi (byte) myprintf::bLen#14 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:myprintf->myprintf::@1#4] -- vbuz1=vbuc1 + sta bLen + //SEG99 [55] phi (byte) myprintf::bArg#12 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:myprintf->myprintf::@1#5] -- vbuz1=vbuc1 + sta bArg + //SEG100 [55] phi (byte) myprintf::bFormat#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:myprintf->myprintf::@1#6] -- vbuz1=vbuc1 + sta bFormat + //SEG101 [55] phi (byte*) myprintf::str#10 = (byte*) myprintf::str#5 [phi:myprintf->myprintf::@1#7] -- register_copy + //SEG102 [55] phi from myprintf::@27 to myprintf::@1 [phi:myprintf::@27->myprintf::@1] + //SEG103 [55] phi (byte) myprintf::bLeadZero#10 = (byte) myprintf::bLeadZero#18 [phi:myprintf::@27->myprintf::@1#0] -- register_copy + //SEG104 [55] phi (byte) myprintf::bDigits#14 = (byte) myprintf::bDigits#24 [phi:myprintf::@27->myprintf::@1#1] -- register_copy + //SEG105 [55] phi (byte) myprintf::bTrailing#10 = (byte) myprintf::bTrailing#21 [phi:myprintf::@27->myprintf::@1#2] -- register_copy + //SEG106 [55] phi (word) myprintf::w#10 = (word) myprintf::w#17 [phi:myprintf::@27->myprintf::@1#3] -- register_copy + //SEG107 [55] phi (byte) myprintf::bLen#14 = (byte) myprintf::return#0 [phi:myprintf::@27->myprintf::@1#4] -- register_copy + //SEG108 [55] phi (byte) myprintf::bArg#12 = (byte) myprintf::bArg#10 [phi:myprintf::@27->myprintf::@1#5] -- register_copy + //SEG109 [55] phi (byte) myprintf::bFormat#10 = (byte) myprintf::bFormat#4 [phi:myprintf::@27->myprintf::@1#6] -- register_copy + //SEG110 [55] phi (byte*) myprintf::str#10 = (byte*) myprintf::str#0 [phi:myprintf::@27->myprintf::@1#7] -- register_copy + //SEG111 myprintf::@1 + b1: + //SEG112 [56] (byte) myprintf::b#1 ← *((byte*) myprintf::str#10) -- vbuxx=_deref_pbuz1 + ldy #0 + lda (str),y + tax + //SEG113 [57] if((byte) myprintf::bFormat#10==(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@2 -- vbuz1_eq_0_then_la1 + lda bFormat + cmp #0 + bne !b2+ + jmp b2 + !b2: + //SEG114 myprintf::@31 + //SEG115 [58] if((byte) myprintf::b#1!=(byte) '0') goto myprintf::@3 -- vbuxx_neq_vbuc1_then_la1 + cpx #'0' + bne b3 + //SEG116 [59] phi from myprintf::@31 to myprintf::@27 [phi:myprintf::@31->myprintf::@27] + //SEG117 [59] phi (byte) myprintf::bLeadZero#18 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:myprintf::@31->myprintf::@27#0] -- vbuz1=vbuc1 + lda #1 + sta bLeadZero + //SEG118 [59] phi (byte) myprintf::bDigits#24 = (byte) myprintf::bDigits#14 [phi:myprintf::@31->myprintf::@27#1] -- register_copy + //SEG119 [59] phi (byte) myprintf::bTrailing#21 = (byte) myprintf::bTrailing#10 [phi:myprintf::@31->myprintf::@27#2] -- register_copy + //SEG120 [59] phi (word) myprintf::w#17 = (word) myprintf::w#10 [phi:myprintf::@31->myprintf::@27#3] -- register_copy + //SEG121 [59] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#12 [phi:myprintf::@31->myprintf::@27#4] -- register_copy + //SEG122 [59] phi (byte) myprintf::return#0 = (byte) myprintf::bLen#14 [phi:myprintf::@31->myprintf::@27#5] -- register_copy + //SEG123 [59] phi (byte) myprintf::bFormat#4 = (byte) myprintf::bFormat#10 [phi:myprintf::@31->myprintf::@27#6] -- register_copy + //SEG124 myprintf::@27 + b27: + //SEG125 [60] (byte*) myprintf::str#0 ← ++ (byte*) myprintf::str#10 -- pbuz1=_inc_pbuz1 + inc str + bne !+ + inc str+1 + !: + //SEG126 [61] if(*((byte*) myprintf::str#0)!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@1 -- _deref_pbuz1_neq_0_then_la1 + ldy #0 + lda (str),y + cmp #0 + bne b1 + //SEG127 myprintf::@36 + //SEG128 [62] *((const byte[$64]) strTemp#0 + (byte) myprintf::return#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- pbuc1_derefidx_vbuz1=vbuc2 + tya + ldy return + sta strTemp,y + //SEG129 myprintf::@return + //SEG130 [63] return + rts + //SEG131 myprintf::@3 + b3: + //SEG132 [64] if((byte) myprintf::b#1>=(byte) '1') goto myprintf::@37 -- vbuxx_ge_vbuc1_then_la1 + cpx #'1' + bcc !b37+ + jmp b37 + !b37: + //SEG133 myprintf::@4 + b4: + //SEG134 [65] if((byte) myprintf::b#1!=(byte) '-') goto myprintf::@5 -- vbuxx_neq_vbuc1_then_la1 + cpx #'-' + bne b5 + //SEG135 [59] phi from myprintf::@4 to myprintf::@27 [phi:myprintf::@4->myprintf::@27] + //SEG136 [59] phi (byte) myprintf::bLeadZero#18 = (byte) myprintf::bLeadZero#10 [phi:myprintf::@4->myprintf::@27#0] -- register_copy + //SEG137 [59] phi (byte) myprintf::bDigits#24 = (byte) myprintf::bDigits#14 [phi:myprintf::@4->myprintf::@27#1] -- register_copy + //SEG138 [59] phi (byte) myprintf::bTrailing#21 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:myprintf::@4->myprintf::@27#2] -- vbuz1=vbuc1 + lda #1 + sta bTrailing + //SEG139 [59] phi (word) myprintf::w#17 = (word) myprintf::w#10 [phi:myprintf::@4->myprintf::@27#3] -- register_copy + //SEG140 [59] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#12 [phi:myprintf::@4->myprintf::@27#4] -- register_copy + //SEG141 [59] phi (byte) myprintf::return#0 = (byte) myprintf::bLen#14 [phi:myprintf::@4->myprintf::@27#5] -- register_copy + //SEG142 [59] phi (byte) myprintf::bFormat#4 = (byte) myprintf::bFormat#10 [phi:myprintf::@4->myprintf::@27#6] -- register_copy + jmp b27 + //SEG143 myprintf::@5 + b5: + //SEG144 [66] if((byte) myprintf::b#1==(byte) 'c') goto myprintf::@6 -- vbuxx_eq_vbuc1_then_la1 + cpx #'c' + bne !b6+ + jmp b6 + !b6: + //SEG145 myprintf::@24 + //SEG146 [67] if((byte) myprintf::b#1==(byte) 'd') goto myprintf::@7 -- vbuxx_eq_vbuc1_then_la1 + cpx #'d' + beq b7 + //SEG147 myprintf::@25 + //SEG148 [68] if((byte) myprintf::b#1==(byte) 'x') goto myprintf::@26 -- vbuxx_eq_vbuc1_then_la1 + cpx #'x' + beq b26 + //SEG149 myprintf::@38 + //SEG150 [69] if((byte) myprintf::b#1==(byte) 'X') goto myprintf::@26 -- vbuxx_eq_vbuc1_then_la1 + cpx #'X' + beq b26 + //SEG151 [70] phi from myprintf::@11 myprintf::@20 myprintf::@21 myprintf::@38 myprintf::@40 myprintf::@6 to myprintf::@22 [phi:myprintf::@11/myprintf::@20/myprintf::@21/myprintf::@38/myprintf::@40/myprintf::@6->myprintf::@22] + //SEG152 [70] phi (byte) myprintf::bDigits#25 = (byte) myprintf::bDigits#14 [phi:myprintf::@11/myprintf::@20/myprintf::@21/myprintf::@38/myprintf::@40/myprintf::@6->myprintf::@22#0] -- register_copy + //SEG153 [70] phi (byte) myprintf::bLen#28 = (byte) myprintf::bLen#3 [phi:myprintf::@11/myprintf::@20/myprintf::@21/myprintf::@38/myprintf::@40/myprintf::@6->myprintf::@22#1] -- register_copy + //SEG154 myprintf::@22 + b22: + //SEG155 [59] phi from myprintf::@22 to myprintf::@27 [phi:myprintf::@22->myprintf::@27] + //SEG156 [59] phi (byte) myprintf::bLeadZero#18 = (byte) myprintf::bLeadZero#10 [phi:myprintf::@22->myprintf::@27#0] -- register_copy + //SEG157 [59] phi (byte) myprintf::bDigits#24 = (byte) myprintf::bDigits#25 [phi:myprintf::@22->myprintf::@27#1] -- register_copy + //SEG158 [59] phi (byte) myprintf::bTrailing#21 = (byte) myprintf::bTrailing#10 [phi:myprintf::@22->myprintf::@27#2] -- register_copy + //SEG159 [59] phi (word) myprintf::w#17 = (word) myprintf::w#10 [phi:myprintf::@22->myprintf::@27#3] -- register_copy + //SEG160 [59] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#12 [phi:myprintf::@22->myprintf::@27#4] -- register_copy + //SEG161 [59] phi (byte) myprintf::return#0 = (byte) myprintf::bLen#28 [phi:myprintf::@22->myprintf::@27#5] -- register_copy + //SEG162 [59] phi (byte) myprintf::bFormat#4 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:myprintf::@22->myprintf::@27#6] -- vbuz1=vbuc1 + lda #0 + sta bFormat + jmp b27 + //SEG163 myprintf::@26 + b26: + //SEG164 [71] (word~) myprintf::$17 ← (word) myprintf::w#10 >> (byte/signed byte/word/signed word/dword/signed dword) 4 -- vwuz1=vwuz2_ror_4 + lda w+1 + sta _17+1 + lda w + sta _17 + ldy #4 + !: + lsr _17+1 + ror _17 + dey + bne !- + //SEG165 [72] (byte) myprintf::b#15 ← (word~) myprintf::$17 & (byte/signed byte/word/signed word/dword/signed dword) $f -- vbuxx=vwuz1_band_vbuc1 + lda _17 + and #$f + tax + //SEG166 [73] if((byte) myprintf::b#15<(byte/signed byte/word/signed word/dword/signed dword) $a) goto myprintf::@9 -- vbuxx_lt_vbuc1_then_la1 + cpx #$a + bcc b8 + //SEG167 [74] phi from myprintf::@26 to myprintf::@8 [phi:myprintf::@26->myprintf::@8] + //SEG168 myprintf::@8 + //SEG169 [75] phi from myprintf::@8 to myprintf::@9 [phi:myprintf::@8->myprintf::@9] + //SEG170 [75] phi (byte~) myprintf::$22 = (byte/signed byte/word/signed word/dword/signed dword) $57 [phi:myprintf::@8->myprintf::@9#0] -- vbuaa=vbuc1 + lda #$57 + jmp b9 + //SEG171 [75] phi from myprintf::@26 to myprintf::@9 [phi:myprintf::@26->myprintf::@9] + b8: + //SEG172 [75] phi (byte~) myprintf::$22 = (byte) '0' [phi:myprintf::@26->myprintf::@9#0] -- vbuaa=vbuc1 + lda #'0' + //SEG173 myprintf::@9 + b9: + //SEG174 [76] (byte~) myprintf::$23 ← (byte~) myprintf::$22 + (byte) myprintf::b#15 -- vbuaa=vbuaa_plus_vbuxx + stx $ff + clc + adc $ff + //SEG175 [77] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$23 -- pbuc1_derefidx_vbuz1=vbuaa + ldy bLen + sta strTemp,y + //SEG176 [78] (byte) myprintf::bLen#10 ← ++ (byte) myprintf::bLen#14 -- vbuyy=_inc_vbuz1 + iny + //SEG177 [79] (byte) myprintf::b#16 ← (word) myprintf::w#10 & (byte/signed byte/word/signed word/dword/signed dword) $f -- vbuxx=vwuz1_band_vbuc1 + lda w + and #$f + tax + //SEG178 [80] if((byte) myprintf::b#16<(byte/signed byte/word/signed word/dword/signed dword) $a) goto myprintf::@11 -- vbuxx_lt_vbuc1_then_la1 + cpx #$a + bcc b10 + //SEG179 [81] phi from myprintf::@9 to myprintf::@10 [phi:myprintf::@9->myprintf::@10] + //SEG180 myprintf::@10 + //SEG181 [82] phi from myprintf::@10 to myprintf::@11 [phi:myprintf::@10->myprintf::@11] + //SEG182 [82] phi (byte~) myprintf::$28 = (byte/signed byte/word/signed word/dword/signed dword) $57 [phi:myprintf::@10->myprintf::@11#0] -- vbuaa=vbuc1 + lda #$57 + jmp b11 + //SEG183 [82] phi from myprintf::@9 to myprintf::@11 [phi:myprintf::@9->myprintf::@11] + b10: + //SEG184 [82] phi (byte~) myprintf::$28 = (byte) '0' [phi:myprintf::@9->myprintf::@11#0] -- vbuaa=vbuc1 + lda #'0' + //SEG185 myprintf::@11 + b11: + //SEG186 [83] (byte~) myprintf::$29 ← (byte~) myprintf::$28 + (byte) myprintf::b#16 -- vbuaa=vbuaa_plus_vbuxx + stx $ff + clc + adc $ff + //SEG187 [84] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#10) ← (byte~) myprintf::$29 -- pbuc1_derefidx_vbuyy=vbuaa + sta strTemp,y + //SEG188 [85] (byte) myprintf::bLen#3 ← ++ (byte) myprintf::bLen#10 -- vbuz1=_inc_vbuyy + iny + sty bLen + jmp b22 + //SEG189 myprintf::@7 + b7: + //SEG190 [86] (word) utoa::value#4 ← (word) myprintf::w#10 -- vwuz1=vwuz2 + lda w + sta utoa.value + lda w+1 + sta utoa.value+1 + //SEG191 [87] call utoa + //SEG192 [133] phi from myprintf::@7 to utoa [phi:myprintf::@7->utoa] + jsr utoa + //SEG193 [88] phi from myprintf::@7 to myprintf::@12 [phi:myprintf::@7->myprintf::@12] + //SEG194 [88] phi (byte) myprintf::b#17 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:myprintf::@7->myprintf::@12#0] -- vbuxx=vbuc1 + ldx #1 + //SEG195 myprintf::@12 + b12: + //SEG196 [89] if(*((const byte[6]) myprintf::buf6#0 + (byte) myprintf::b#17)!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@13 -- pbuc1_derefidx_vbuxx_neq_0_then_la1 + lda buf6,x + cmp #0 + bne b13 + //SEG197 myprintf::@14 + //SEG198 [90] if((byte) myprintf::bTrailing#10==(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@39 -- vbuz1_eq_0_then_la1 + lda bTrailing + cmp #0 + beq b39 + //SEG199 [91] phi from myprintf::@14 myprintf::@18 to myprintf::@15 [phi:myprintf::@14/myprintf::@18->myprintf::@15] + //SEG200 [91] phi (byte) myprintf::bDigits#16 = (byte) myprintf::bDigits#14 [phi:myprintf::@14/myprintf::@18->myprintf::@15#0] -- register_copy + //SEG201 [91] phi (byte) myprintf::bLen#23 = (byte) myprintf::bLen#14 [phi:myprintf::@14/myprintf::@18->myprintf::@15#1] -- register_copy + //SEG202 myprintf::@15 + b15: + //SEG203 [92] phi from myprintf::@15 to myprintf::@19 [phi:myprintf::@15->myprintf::@19] + //SEG204 [92] phi (byte) myprintf::bLen#12 = (byte) myprintf::bLen#23 [phi:myprintf::@15->myprintf::@19#0] -- register_copy + //SEG205 [92] phi (byte) myprintf::digit#3 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:myprintf::@15->myprintf::@19#1] -- vbuz1=vbuc1 + lda #0 + sta digit + //SEG206 [92] phi from myprintf::@19 to myprintf::@19 [phi:myprintf::@19->myprintf::@19] + //SEG207 [92] phi (byte) myprintf::bLen#12 = (byte) myprintf::bLen#24 [phi:myprintf::@19->myprintf::@19#0] -- register_copy + //SEG208 [92] phi (byte) myprintf::digit#3 = (byte) myprintf::digit#2 [phi:myprintf::@19->myprintf::@19#1] -- register_copy + //SEG209 myprintf::@19 + b19: + //SEG210 [93] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#12) ← *((const byte[6]) myprintf::buf6#0 + (byte) myprintf::digit#3) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz2 + ldy digit + lda buf6,y + ldy bLen + sta strTemp,y + //SEG211 [94] (byte) myprintf::bLen#24 ← ++ (byte) myprintf::bLen#12 -- vbuz1=_inc_vbuz1 + inc bLen + //SEG212 [95] (byte) myprintf::digit#2 ← ++ (byte) myprintf::digit#3 -- vbuz1=_inc_vbuz1 + inc digit + //SEG213 [96] if((byte) myprintf::digit#2<(byte) myprintf::b#17) goto myprintf::@19 -- vbuz1_lt_vbuxx_then_la1 + txa + cmp digit + beq !+ + bcs b19 + !: + //SEG214 myprintf::@20 + //SEG215 [97] if((byte) myprintf::bTrailing#10!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@40 -- vbuz1_neq_0_then_la1 + lda bTrailing + cmp #0 + bne b40 + jmp b22 + //SEG216 myprintf::@40 + b40: + //SEG217 [98] if((byte) myprintf::bDigits#16>(byte) myprintf::b#17) goto myprintf::@21 -- vbuz1_gt_vbuxx_then_la1 + cpx bDigits + bcc b21 + jmp b22 + //SEG218 [99] phi from myprintf::@21 myprintf::@40 to myprintf::@21 [phi:myprintf::@21/myprintf::@40->myprintf::@21] + //SEG219 [99] phi (byte) myprintf::bDigits#8 = (byte) myprintf::bDigits#3 [phi:myprintf::@21/myprintf::@40->myprintf::@21#0] -- register_copy + //SEG220 [99] phi (byte) myprintf::bLen#13 = (byte) myprintf::bLen#6 [phi:myprintf::@21/myprintf::@40->myprintf::@21#1] -- register_copy + //SEG221 myprintf::@21 + b21: + //SEG222 [100] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#13) ← (byte) ' ' -- pbuc1_derefidx_vbuz1=vbuc2 + lda #' ' + ldy bLen + sta strTemp,y + //SEG223 [101] (byte) myprintf::bLen#6 ← ++ (byte) myprintf::bLen#13 -- vbuz1=_inc_vbuz1 + inc bLen + //SEG224 [102] (byte) myprintf::bDigits#3 ← -- (byte) myprintf::bDigits#8 -- vbuz1=_dec_vbuz1 + dec bDigits + //SEG225 [103] if((byte) myprintf::bDigits#3>(byte) myprintf::b#17) goto myprintf::@21 -- vbuz1_gt_vbuxx_then_la1 + cpx bDigits + bcc b21 + jmp b22 + //SEG226 myprintf::@39 + b39: + //SEG227 [104] if((byte) myprintf::bDigits#14>(byte) myprintf::b#17) goto myprintf::@16 -- vbuz1_gt_vbuxx_then_la1 + cpx bDigits + bcc b16 + //SEG228 [91] phi from myprintf::@39 to myprintf::@15 [phi:myprintf::@39->myprintf::@15] + jmp b15 + //SEG229 [105] phi from myprintf::@18 myprintf::@39 to myprintf::@16 [phi:myprintf::@18/myprintf::@39->myprintf::@16] + //SEG230 [105] phi (byte) myprintf::bDigits#10 = (byte) myprintf::bDigits#2 [phi:myprintf::@18/myprintf::@39->myprintf::@16#0] -- register_copy + //SEG231 [105] phi (byte) myprintf::bLen#11 = (byte) myprintf::bLen#4 [phi:myprintf::@18/myprintf::@39->myprintf::@16#1] -- register_copy + //SEG232 myprintf::@16 + b16: + //SEG233 [106] if((byte) myprintf::bLeadZero#10==(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@18 -- vbuz1_eq_0_then_la1 + lda bLeadZero + cmp #0 + beq b14 + //SEG234 [107] phi from myprintf::@16 to myprintf::@17 [phi:myprintf::@16->myprintf::@17] + //SEG235 myprintf::@17 + //SEG236 [108] phi from myprintf::@17 to myprintf::@18 [phi:myprintf::@17->myprintf::@18] + //SEG237 [108] phi (byte~) myprintf::$39 = (byte) '0' [phi:myprintf::@17->myprintf::@18#0] -- vbuaa=vbuc1 + lda #'0' + jmp b18 + //SEG238 [108] phi from myprintf::@16 to myprintf::@18 [phi:myprintf::@16->myprintf::@18] + b14: + //SEG239 [108] phi (byte~) myprintf::$39 = (byte) ' ' [phi:myprintf::@16->myprintf::@18#0] -- vbuaa=vbuc1 + lda #' ' + //SEG240 myprintf::@18 + b18: + //SEG241 [109] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#11) ← (byte~) myprintf::$39 -- pbuc1_derefidx_vbuz1=vbuaa + ldy bLen + sta strTemp,y + //SEG242 [110] (byte) myprintf::bLen#4 ← ++ (byte) myprintf::bLen#11 -- vbuz1=_inc_vbuz1 + inc bLen + //SEG243 [111] (byte) myprintf::bDigits#2 ← -- (byte) myprintf::bDigits#10 -- vbuz1=_dec_vbuz1 + dec bDigits + //SEG244 [112] if((byte) myprintf::bDigits#2>(byte) myprintf::b#17) goto myprintf::@16 -- vbuz1_gt_vbuxx_then_la1 + cpx bDigits + bcc b16 + jmp b15 + //SEG245 myprintf::@13 + b13: + //SEG246 [113] (byte) myprintf::b#5 ← ++ (byte) myprintf::b#17 -- vbuxx=_inc_vbuxx + inx + //SEG247 [88] phi from myprintf::@13 to myprintf::@12 [phi:myprintf::@13->myprintf::@12] + //SEG248 [88] phi (byte) myprintf::b#17 = (byte) myprintf::b#5 [phi:myprintf::@13->myprintf::@12#0] -- register_copy + jmp b12 + //SEG249 myprintf::@6 + b6: + //SEG250 [114] (byte~) myprintf::$47 ← ((byte)) (word) myprintf::w#10 -- vbuaa=_byte_vwuz1 + lda w + //SEG251 [115] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$47 -- pbuc1_derefidx_vbuz1=vbuaa + // "switch" is the normal way -- not supported + ldy bLen + sta strTemp,y + //SEG252 [116] (byte) myprintf::bLen#1 ← ++ (byte) myprintf::bLen#14 -- vbuz1=_inc_vbuz1 + inc bLen + jmp b22 + //SEG253 myprintf::@37 + b37: + //SEG254 [117] if((byte) myprintf::b#1<=(byte) '9') goto myprintf::@23 -- vbuxx_le_vbuc1_then_la1 + cpx #'9' + bcc b23 + beq b23 + jmp b4 + //SEG255 myprintf::@23 + b23: + //SEG256 [118] (byte) myprintf::bDigits#1 ← (byte) myprintf::b#1 - (byte) '0' -- vbuz1=vbuxx_minus_vbuc1 + txa + axs #'0' + stx bDigits + //SEG257 [59] phi from myprintf::@23 myprintf::@30 to myprintf::@27 [phi:myprintf::@23/myprintf::@30->myprintf::@27] + //SEG258 [59] phi (byte) myprintf::bLeadZero#18 = (byte) myprintf::bLeadZero#10 [phi:myprintf::@23/myprintf::@30->myprintf::@27#0] -- register_copy + //SEG259 [59] phi (byte) myprintf::bDigits#24 = (byte) myprintf::bDigits#1 [phi:myprintf::@23/myprintf::@30->myprintf::@27#1] -- register_copy + //SEG260 [59] phi (byte) myprintf::bTrailing#21 = (byte) myprintf::bTrailing#10 [phi:myprintf::@23/myprintf::@30->myprintf::@27#2] -- register_copy + //SEG261 [59] phi (word) myprintf::w#17 = (word) myprintf::w#10 [phi:myprintf::@23/myprintf::@30->myprintf::@27#3] -- register_copy + //SEG262 [59] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#12 [phi:myprintf::@23/myprintf::@30->myprintf::@27#4] -- register_copy + //SEG263 [59] phi (byte) myprintf::return#0 = (byte) myprintf::bLen#14 [phi:myprintf::@23/myprintf::@30->myprintf::@27#5] -- register_copy + //SEG264 [59] phi (byte) myprintf::bFormat#4 = (byte) myprintf::bFormat#10 [phi:myprintf::@23/myprintf::@30->myprintf::@27#6] -- register_copy + jmp b27 + //SEG265 myprintf::@2 + b2: + //SEG266 [119] if((byte) myprintf::b#1!=(byte) '%') goto myprintf::@28 -- vbuxx_neq_vbuc1_then_la1 + cpx #'%' + bne b28 + //SEG267 myprintf::@32 + //SEG268 [120] if((byte) myprintf::bArg#12==(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@42 -- vbuz1_eq_0_then_la1 + // default format + //w = (bArg == 0) ? w1 : ((bArg == 1) ? w2 : w3); -- "?" is the normal way, but error "sequence does not contain all blocks" + lda bArg + cmp #0 + beq b42 + //SEG269 myprintf::@33 + //SEG270 [121] if((byte) myprintf::bArg#12==(byte/signed byte/word/signed word/dword/signed dword) 1) goto myprintf::@43 -- vbuz1_eq_vbuc1_then_la1 + lda #1 + cmp bArg + beq b43 + //SEG271 myprintf::@34 + //SEG272 [122] (word~) myprintf::w#53 ← (word) myprintf::w3#7 -- vwuz1=vwuz2 + lda w3 + sta w + lda w3+1 + sta w+1 + //SEG273 [123] phi from myprintf::@34 myprintf::@42 myprintf::@43 to myprintf::@29 [phi:myprintf::@34/myprintf::@42/myprintf::@43->myprintf::@29] + //SEG274 [123] phi (word) myprintf::w#21 = (word~) myprintf::w#53 [phi:myprintf::@34/myprintf::@42/myprintf::@43->myprintf::@29#0] -- register_copy + //SEG275 myprintf::@29 + b29: + //SEG276 [124] (byte) myprintf::bArg#1 ← ++ (byte) myprintf::bArg#12 -- vbuz1=_inc_vbuz1 + inc bArg + //SEG277 [59] phi from myprintf::@29 to myprintf::@27 [phi:myprintf::@29->myprintf::@27] + //SEG278 [59] phi (byte) myprintf::bLeadZero#18 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:myprintf::@29->myprintf::@27#0] -- vbuz1=vbuc1 + lda #0 + sta bLeadZero + //SEG279 [59] phi (byte) myprintf::bDigits#24 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:myprintf::@29->myprintf::@27#1] -- vbuz1=vbuc1 + lda #1 + sta bDigits + //SEG280 [59] phi (byte) myprintf::bTrailing#21 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:myprintf::@29->myprintf::@27#2] -- vbuz1=vbuc1 + lda #0 + sta bTrailing + //SEG281 [59] phi (word) myprintf::w#17 = (word) myprintf::w#21 [phi:myprintf::@29->myprintf::@27#3] -- register_copy + //SEG282 [59] phi (byte) myprintf::bArg#10 = (byte) myprintf::bArg#1 [phi:myprintf::@29->myprintf::@27#4] -- register_copy + //SEG283 [59] phi (byte) myprintf::return#0 = (byte) myprintf::bLen#14 [phi:myprintf::@29->myprintf::@27#5] -- register_copy + //SEG284 [59] phi (byte) myprintf::bFormat#4 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:myprintf::@29->myprintf::@27#6] -- vbuz1=vbuc1 + lda #1 + sta bFormat + jmp b27 + //SEG285 myprintf::@43 + b43: + //SEG286 [125] (word~) myprintf::w#52 ← (word) myprintf::w2#7 -- vwuz1=vwuz2 + lda w2 + sta w + lda w2+1 + sta w+1 + jmp b29 + //SEG287 myprintf::@42 + b42: + //SEG288 [126] (word~) myprintf::w#51 ← (word) myprintf::w1#6 -- vwuz1=vwuz2 + lda w1 + sta w + lda w1+1 + sta w+1 + jmp b29 + //SEG289 myprintf::@28 + b28: + //SEG290 [127] if((byte) myprintf::b#1>=(byte/signed byte/word/signed word/dword/signed dword) $41) goto myprintf::@41 -- vbuxx_ge_vbuc1_then_la1 + cpx #$41 + bcs b41 + //SEG291 [128] phi from myprintf::@28 myprintf::@35 to myprintf::@30 [phi:myprintf::@28/myprintf::@35->myprintf::@30] + //SEG292 [128] phi (byte) myprintf::b#25 = (byte) myprintf::b#1 [phi:myprintf::@28/myprintf::@35->myprintf::@30#0] -- register_copy + //SEG293 myprintf::@30 + b30: + //SEG294 [129] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte) myprintf::b#25 -- pbuc1_derefidx_vbuz1=vbuxx + // swap 0x41 / 0x61 when in lower case mode + ldy bLen + txa + sta strTemp,y + //SEG295 [130] (byte) myprintf::bLen#7 ← ++ (byte) myprintf::bLen#14 -- vbuz1=_inc_vbuz1 + inc bLen + jmp b27 + //SEG296 myprintf::@41 + b41: + //SEG297 [131] if((byte) myprintf::b#1<(byte/signed byte/word/signed word/dword/signed dword) $5a+(byte/signed byte/word/signed word/dword/signed dword) 1) goto myprintf::@35 -- vbuxx_lt_vbuc1_then_la1 + cpx #$5a+1 + bcc b35 + //SEG298 [128] phi from myprintf::@41 to myprintf::@30 [phi:myprintf::@41->myprintf::@30] + jmp b30 + //SEG299 myprintf::@35 + b35: + //SEG300 [132] (byte) myprintf::b#6 ← (byte) myprintf::b#1 + (byte/signed byte/word/signed word/dword/signed dword) $20 -- vbuxx=vbuxx_plus_vbuc1 + txa + axs #-[$20] + jmp b30 + buf6: .fill 6, 0 +} +//SEG301 utoa +// utoa(word zeropage($12) value, byte* zeropage($14) dst) +utoa: { + .label value = $12 + .label dst = $14 + //SEG302 utoa::@13 + //SEG303 [134] if((word) utoa::value#4>=(word/signed word/dword/signed dword) $2710) goto utoa::@5 -- vwuz1_ge_vwuc1_then_la1 + lda value+1 + cmp #>$2710 + bcc !+ + beq !b5+ + jmp b5 + !b5: + lda value + cmp #<$2710 + bcc !b5+ + jmp b5 + !b5: + !: + //SEG304 [135] phi from utoa::@13 to utoa::@1 [phi:utoa::@13->utoa::@1] + //SEG305 [135] phi (byte*) utoa::dst#16 = (const byte[6]) myprintf::buf6#0 [phi:utoa::@13->utoa::@1#0] -- pbuz1=pbuc1 + lda #myprintf.buf6 + sta dst+1 + //SEG306 [135] phi (word) utoa::value#6 = (word) utoa::value#4 [phi:utoa::@13->utoa::@1#1] -- register_copy + //SEG307 [135] phi (byte) utoa::bStarted#5 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:utoa::@13->utoa::@1#2] -- vbuxx=vbuc1 + ldx #0 + //SEG308 utoa::@1 + b1: + //SEG309 [136] if((byte) utoa::bStarted#5==(byte/signed byte/word/signed word/dword/signed dword) 1) goto utoa::@6 -- vbuxx_eq_vbuc1_then_la1 + cpx #1 + beq b6 + //SEG310 utoa::@14 + //SEG311 [137] if((word) utoa::value#6>=(word/signed word/dword/signed dword) $3e8) goto utoa::@6 -- vwuz1_ge_vwuc1_then_la1 + lda value+1 + cmp #>$3e8 + bcc !+ + bne b6 + lda value + cmp #<$3e8 + bcs b6 + !: + //SEG312 [138] phi from utoa::@14 to utoa::@2 [phi:utoa::@14->utoa::@2] + //SEG313 [138] phi (byte*) utoa::dst#10 = (byte*) utoa::dst#16 [phi:utoa::@14->utoa::@2#0] -- register_copy + //SEG314 [138] phi (word) utoa::value#11 = (word) utoa::value#6 [phi:utoa::@14->utoa::@2#1] -- register_copy + //SEG315 [138] phi (byte) utoa::bStarted#6 = (byte) utoa::bStarted#5 [phi:utoa::@14->utoa::@2#2] -- register_copy + //SEG316 utoa::@2 + b2: + //SEG317 [139] if((byte) utoa::bStarted#6==(byte/signed byte/word/signed word/dword/signed dword) 1) goto utoa::@7 -- vbuxx_eq_vbuc1_then_la1 + cpx #1 + beq b7 + //SEG318 utoa::@15 + //SEG319 [140] if((word) utoa::value#11>=(byte/signed byte/word/signed word/dword/signed dword) $64) goto utoa::@7 -- vwuz1_ge_vwuc1_then_la1 + lda value+1 + cmp #>$64 + bcc !+ + bne b7 + lda value + cmp #<$64 + bcs b7 + !: + //SEG320 [141] phi from utoa::@15 to utoa::@3 [phi:utoa::@15->utoa::@3] + //SEG321 [141] phi (byte*) utoa::dst#13 = (byte*) utoa::dst#10 [phi:utoa::@15->utoa::@3#0] -- register_copy + //SEG322 [141] phi (word) utoa::value#10 = (word) utoa::value#11 [phi:utoa::@15->utoa::@3#1] -- register_copy + //SEG323 [141] phi (byte) utoa::bStarted#7 = (byte) utoa::bStarted#6 [phi:utoa::@15->utoa::@3#2] -- register_copy + //SEG324 utoa::@3 + b3: + //SEG325 [142] if((byte) utoa::bStarted#7==(byte/signed byte/word/signed word/dword/signed dword) 1) goto utoa::@8 -- vbuxx_eq_vbuc1_then_la1 + cpx #1 + beq b8 + //SEG326 utoa::@16 + //SEG327 [143] if((word) utoa::value#10>=(byte/signed byte/word/signed word/dword/signed dword) $a) goto utoa::@8 -- vwuz1_ge_vwuc1_then_la1 + lda value+1 + cmp #>$a + bcc !+ + bne b8 + lda value + cmp #<$a + bcs b8 + !: + //SEG328 [144] phi from utoa::@12 utoa::@16 to utoa::@4 [phi:utoa::@12/utoa::@16->utoa::@4] + //SEG329 [144] phi (byte*) utoa::dst#12 = (byte*) utoa::dst#4 [phi:utoa::@12/utoa::@16->utoa::@4#0] -- register_copy + //SEG330 [144] phi (word) utoa::value#12 = (word) utoa::value#3 [phi:utoa::@12/utoa::@16->utoa::@4#1] -- register_copy + //SEG331 utoa::@4 + b4: + //SEG332 [145] (byte~) utoa::$16 ← ((byte)) (word) utoa::value#12 -- vbuaa=_byte_vwuz1 + lda value + //SEG333 [146] (byte~) utoa::$17 ← (byte) '0' + (byte~) utoa::$16 -- vbuaa=vbuc1_plus_vbuaa + clc + adc #'0' + //SEG334 [147] *((byte*) utoa::dst#12) ← (byte~) utoa::$17 -- _deref_pbuz1=vbuaa + ldy #0 + sta (dst),y + //SEG335 [148] (byte*) utoa::dst#3 ← ++ (byte*) utoa::dst#12 -- pbuz1=_inc_pbuz1 + inc dst + bne !+ + inc dst+1 + !: + //SEG336 [149] *((byte*) utoa::dst#3) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuz1=vbuc1 + lda #0 + tay + sta (dst),y + //SEG337 utoa::@return + //SEG338 [150] return + rts + //SEG339 utoa::@8 + b8: + //SEG340 [151] (byte*) append::dst#3 ← (byte*) utoa::dst#13 + //SEG341 [152] (word) append::value#4 ← (word) utoa::value#10 + //SEG342 [153] call append + //SEG343 [173] phi from utoa::@8 to append [phi:utoa::@8->append] + //SEG344 [173] phi (word) append::sub#6 = (byte/signed byte/word/signed word/dword/signed dword) $a [phi:utoa::@8->append#0] -- vwuz1=vbuc1 + lda #$a + sta append.sub + lda #0 + sta append.sub+1 + //SEG345 [173] phi (word) append::value#8 = (word) append::value#4 [phi:utoa::@8->append#1] -- register_copy + //SEG346 [173] phi (byte*) append::dst#4 = (byte*) append::dst#3 [phi:utoa::@8->append#2] -- register_copy + jsr append + //SEG347 [154] (word) append::return#10 ← (word) append::value#5 + //SEG348 utoa::@12 + //SEG349 [155] (word) utoa::value#3 ← (word) append::return#10 + //SEG350 [156] (byte*) utoa::dst#4 ← ++ (byte*) utoa::dst#13 -- pbuz1=_inc_pbuz1 + inc dst + bne !+ + inc dst+1 + !: + jmp b4 + //SEG351 utoa::@7 + b7: + //SEG352 [157] (byte*) append::dst#2 ← (byte*) utoa::dst#10 + //SEG353 [158] (word) append::value#3 ← (word) utoa::value#11 + //SEG354 [159] call append + //SEG355 [173] phi from utoa::@7 to append [phi:utoa::@7->append] + //SEG356 [173] phi (word) append::sub#6 = (byte/signed byte/word/signed word/dword/signed dword) $64 [phi:utoa::@7->append#0] -- vwuz1=vbuc1 + lda #$64 + sta append.sub + lda #0 + sta append.sub+1 + //SEG357 [173] phi (word) append::value#8 = (word) append::value#3 [phi:utoa::@7->append#1] -- register_copy + //SEG358 [173] phi (byte*) append::dst#4 = (byte*) append::dst#2 [phi:utoa::@7->append#2] -- register_copy + jsr append + //SEG359 [160] (word) append::return#4 ← (word) append::value#5 + //SEG360 utoa::@11 + //SEG361 [161] (word) utoa::value#2 ← (word) append::return#4 + //SEG362 [162] (byte*) utoa::dst#2 ← ++ (byte*) utoa::dst#10 -- pbuz1=_inc_pbuz1 + inc dst + bne !+ + inc dst+1 + !: + //SEG363 [141] phi from utoa::@11 to utoa::@3 [phi:utoa::@11->utoa::@3] + //SEG364 [141] phi (byte*) utoa::dst#13 = (byte*) utoa::dst#2 [phi:utoa::@11->utoa::@3#0] -- register_copy + //SEG365 [141] phi (word) utoa::value#10 = (word) utoa::value#2 [phi:utoa::@11->utoa::@3#1] -- register_copy + //SEG366 [141] phi (byte) utoa::bStarted#7 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:utoa::@11->utoa::@3#2] -- vbuxx=vbuc1 + ldx #1 + jmp b3 + //SEG367 utoa::@6 + b6: + //SEG368 [163] (byte*) append::dst#1 ← (byte*) utoa::dst#16 + //SEG369 [164] (word) append::value#2 ← (word) utoa::value#6 + //SEG370 [165] call append + //SEG371 [173] phi from utoa::@6 to append [phi:utoa::@6->append] + //SEG372 [173] phi (word) append::sub#6 = (word/signed word/dword/signed dword) $3e8 [phi:utoa::@6->append#0] -- vwuz1=vwuc1 + lda #<$3e8 + sta append.sub + lda #>$3e8 + sta append.sub+1 + //SEG373 [173] phi (word) append::value#8 = (word) append::value#2 [phi:utoa::@6->append#1] -- register_copy + //SEG374 [173] phi (byte*) append::dst#4 = (byte*) append::dst#1 [phi:utoa::@6->append#2] -- register_copy + jsr append + //SEG375 [166] (word) append::return#3 ← (word) append::value#5 + //SEG376 utoa::@10 + //SEG377 [167] (word) utoa::value#1 ← (word) append::return#3 + //SEG378 [168] (byte*) utoa::dst#1 ← ++ (byte*) utoa::dst#16 -- pbuz1=_inc_pbuz1 + inc dst + bne !+ + inc dst+1 + !: + //SEG379 [138] phi from utoa::@10 to utoa::@2 [phi:utoa::@10->utoa::@2] + //SEG380 [138] phi (byte*) utoa::dst#10 = (byte*) utoa::dst#1 [phi:utoa::@10->utoa::@2#0] -- register_copy + //SEG381 [138] phi (word) utoa::value#11 = (word) utoa::value#1 [phi:utoa::@10->utoa::@2#1] -- register_copy + //SEG382 [138] phi (byte) utoa::bStarted#6 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:utoa::@10->utoa::@2#2] -- vbuxx=vbuc1 + ldx #1 + jmp b2 + //SEG383 utoa::@5 + b5: + //SEG384 [169] (word) append::value#1 ← (word) utoa::value#4 + //SEG385 [170] call append + //SEG386 [173] phi from utoa::@5 to append [phi:utoa::@5->append] + //SEG387 [173] phi (word) append::sub#6 = (word/signed word/dword/signed dword) $2710 [phi:utoa::@5->append#0] -- vwuz1=vwuc1 + lda #<$2710 + sta append.sub + lda #>$2710 + sta append.sub+1 + //SEG388 [173] phi (word) append::value#8 = (word) append::value#1 [phi:utoa::@5->append#1] -- register_copy + //SEG389 [173] phi (byte*) append::dst#4 = (const byte[6]) myprintf::buf6#0 [phi:utoa::@5->append#2] -- pbuz1=pbuc1 + lda #myprintf.buf6 + sta append.dst+1 + jsr append + //SEG390 [171] (word) append::return#2 ← (word) append::value#5 + //SEG391 utoa::@9 + //SEG392 [172] (word) utoa::value#0 ← (word) append::return#2 + //SEG393 [135] phi from utoa::@9 to utoa::@1 [phi:utoa::@9->utoa::@1] + //SEG394 [135] phi (byte*) utoa::dst#16 = ++(const byte[6]) myprintf::buf6#0 [phi:utoa::@9->utoa::@1#0] -- pbuz1=pbuc1 + lda #myprintf.buf6+1 + sta dst+1 + //SEG395 [135] phi (word) utoa::value#6 = (word) utoa::value#0 [phi:utoa::@9->utoa::@1#1] -- register_copy + //SEG396 [135] phi (byte) utoa::bStarted#5 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:utoa::@9->utoa::@1#2] -- vbuxx=vbuc1 + ldx #1 + jmp b1 +} +//SEG397 append +// simple 'utoa' without using multiply or divide +// append(byte* zeropage($14) dst, word zeropage($12) value, word zeropage($16) sub) +append: { + .label value = $12 + .label return = $12 + .label dst = $14 + .label sub = $16 + //SEG398 [174] *((byte*) append::dst#4) ← (byte) '0' -- _deref_pbuz1=vbuc1 + lda #'0' + ldy #0 + sta (dst),y + //SEG399 [175] phi from append append::@2 to append::@1 [phi:append/append::@2->append::@1] + //SEG400 [175] phi (word) append::value#5 = (word) append::value#8 [phi:append/append::@2->append::@1#0] -- register_copy + //SEG401 append::@1 + b1: + //SEG402 [176] if((word) append::value#5>=(word) append::sub#6) goto append::@2 -- vwuz1_ge_vwuz2_then_la1 + lda sub+1 + cmp value+1 + bne !+ + lda sub + cmp value + !: + bcc b2 + beq b2 + //SEG403 append::@return + //SEG404 [177] return + rts + //SEG405 append::@2 + b2: + //SEG406 [178] *((byte*) append::dst#4) ← ++ *((byte*) append::dst#4) -- _deref_pbuz1=_inc__deref_pbuz1 + ldy #0 + lda (dst),y + clc + adc #1 + sta (dst),y + //SEG407 [179] (word) append::value#0 ← (word) append::value#5 - (word) append::sub#6 -- vwuz1=vwuz1_minus_vwuz2 + lda value + sec + sbc sub + sta value + lda value+1 + sbc sub+1 + sta value+1 + jmp b1 +} +//SEG408 div10 +// div10(word zeropage(4) val) +div10: { + .label _0 = 4 + .label _2 = 6 + .label _3 = 4 + .label _4 = 6 + .label _5 = 6 + .label val = 4 + .label val_1 = 6 + .label return = 4 + .label val_4 = 2 + //SEG409 [180] (word~) div10::$0 ← (word) div10::val#4 >> (byte/signed byte/word/signed word/dword/signed dword) 1 -- vwuz1=vwuz2_ror_1 + lda val_4+1 + lsr + sta _0+1 + lda val_4 + ror + sta _0 + //SEG410 [181] (word) div10::val#0 ← (word~) div10::$0 + (byte/signed byte/word/signed word/dword/signed dword) 1 -- vwuz1=vwuz1_plus_1 + inc val + bne !+ + inc val+1 + !: + //SEG411 [182] (word~) div10::$2 ← (word) div10::val#0 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vwuz1=vwuz2_rol_1 + lda val + asl + sta _2 + lda val+1 + rol + sta _2+1 + //SEG412 [183] (word) div10::val#1 ← (word) div10::val#0 + (word~) div10::$2 -- vwuz1=vwuz2_plus_vwuz1 + lda val_1 + clc + adc val + sta val_1 + lda val_1+1 + adc val+1 + sta val_1+1 + //SEG413 [184] (word~) div10::$3 ← (word) div10::val#1 >> (byte/signed byte/word/signed word/dword/signed dword) 4 -- vwuz1=vwuz2_ror_4 + sta _3+1 + lda val_1 + sta _3 + ldy #4 + !: + lsr _3+1 + ror _3 + dey + bne !- + //SEG414 [185] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 -- vwuz1=vwuz2_plus_vwuz1 + lda val + clc + adc val_1 + sta val + lda val+1 + adc val_1+1 + sta val+1 + //SEG415 [186] (word~) div10::$4 ← (word) div10::val#2 >> (byte/signed byte/word/signed word/dword/signed dword) 4 -- vwuz1=vwuz2_ror_4 + sta _4+1 + lda val + sta _4 + ldy #4 + !: + lsr _4+1 + ror _4 + dey + bne !- + //SEG416 [187] (word~) div10::$5 ← (word~) div10::$4 >> (byte/signed byte/word/signed word/dword/signed dword) 4 -- vwuz1=vwuz1_ror_4 + ldy #4 + !: + lsr _5+1 + ror _5 + dey + bne !- + //SEG417 [188] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$5 -- vwuz1=vwuz1_plus_vwuz2 + lda val + clc + adc _5 + sta val + lda val+1 + adc _5+1 + sta val+1 + //SEG418 [189] (word) div10::return#0 ← (word) div10::val#3 >> (byte/signed byte/word/signed word/dword/signed dword) 4 -- vwuz1=vwuz1_ror_4 + ldy #4 + !: + lsr return+1 + ror return + dey + bne !- + //SEG419 div10::@return + //SEG420 [190] return + rts +} +//SEG421 div16u +// Performs division on two 16 bit unsigned words +// Returns the quotient dividend/divisor. +// The remainder will be set into the global variable rem16u +// Implemented using simple binary division +// div16u(word zeropage(2) dividend) +div16u: { + .label divisor = $a + .label return = 4 + .label dividend = 2 + //SEG422 [191] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 -- vwuz1=vwuz2 + lda dividend + sta divr16u.dividend + lda dividend+1 + sta divr16u.dividend+1 + //SEG423 [192] call divr16u + //SEG424 [196] phi from div16u to divr16u [phi:div16u->divr16u] + jsr divr16u + //SEG425 [193] (word) divr16u::return#2 ← (word) divr16u::return#0 + //SEG426 div16u::@1 + //SEG427 [194] (word) div16u::return#0 ← (word) divr16u::return#2 + //SEG428 div16u::@return + //SEG429 [195] return + rts +} +//SEG430 divr16u +// Performs division on two 16 bit unsigned words and an initial remainder +// Returns the quotient dividend/divisor. +// The final remainder will be set into the global variable rem16u +// Implemented using simple binary division +// divr16u(word zeropage(8) dividend, word zeropage(6) rem) +divr16u: { + .label rem = 6 + .label dividend = 8 + .label quotient = 4 + .label return = 4 + //SEG431 [197] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] + //SEG432 [197] phi (byte) divr16u::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:divr16u->divr16u::@1#0] -- vbuxx=vbuc1 + ldx #0 + //SEG433 [197] phi (word) divr16u::quotient#3 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 + txa + sta quotient + sta quotient+1 + //SEG434 [197] phi (word) divr16u::dividend#2 = (word) divr16u::dividend#1 [phi:divr16u->divr16u::@1#2] -- register_copy + //SEG435 [197] phi (word) divr16u::rem#4 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:divr16u->divr16u::@1#3] -- vwuz1=vbuc1 + sta rem + sta rem+1 + //SEG436 [197] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] + //SEG437 [197] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy + //SEG438 [197] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy + //SEG439 [197] phi (word) divr16u::dividend#2 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy + //SEG440 [197] phi (word) divr16u::rem#4 = (word) divr16u::rem#9 [phi:divr16u::@3->divr16u::@1#3] -- register_copy + //SEG441 divr16u::@1 + b1: + //SEG442 [198] (word) divr16u::rem#0 ← (word) divr16u::rem#4 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vwuz1=vwuz1_rol_1 + asl rem + rol rem+1 + //SEG443 [199] (byte~) divr16u::$1 ← > (word) divr16u::dividend#2 -- vbuaa=_hi_vwuz1 + lda dividend+1 + //SEG444 [200] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte/word/signed word/dword/signed dword) $80 -- vbuaa=vbuaa_band_vbuc1 + and #$80 + //SEG445 [201] if((byte~) divr16u::$2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16u::@2 -- vbuaa_eq_0_then_la1 + cmp #0 + beq b2 + //SEG446 divr16u::@4 + //SEG447 [202] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte/signed byte/word/signed word/dword/signed dword) 1 -- vwuz1=vwuz1_bor_vbuc1 + lda #1 + ora rem + sta rem + //SEG448 [203] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] + //SEG449 [203] phi (word) divr16u::rem#5 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy + //SEG450 divr16u::@2 + b2: + //SEG451 [204] (word) divr16u::dividend#0 ← (word) divr16u::dividend#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vwuz1=vwuz1_rol_1 + asl dividend + rol dividend+1 + //SEG452 [205] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vwuz1=vwuz1_rol_1 + asl quotient + rol quotient+1 + //SEG453 [206] if((word) divr16u::rem#5<(const word) div16u::divisor#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 + lda rem+1 + cmp #>div16u.divisor + bcc b3 + bne !+ + lda rem + cmp #div16u.divisor + sta rem+1 + //SEG457 [209] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] + //SEG458 [209] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy + //SEG459 [209] phi (word) divr16u::rem#9 = (word) divr16u::rem#5 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy + //SEG460 divr16u::@3 + b3: + //SEG461 [210] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuxx=_inc_vbuxx + inx + //SEG462 [211] if((byte) divr16u::i#1!=(byte/signed byte/word/signed word/dword/signed dword) $10) goto divr16u::@1 -- vbuxx_neq_vbuc1_then_la1 + cpx #$10 + bne b1 + //SEG463 divr16u::@return + //SEG464 [212] return + rts +} + // "char buf16[16]" is the normal way -- not supported + strTemp: .fill $64, 0 + diff --git a/src/test/ref/sandbox.sym b/src/test/ref/sandbox.sym new file mode 100644 index 000000000..4efe44a0d --- /dev/null +++ b/src/test/ref/sandbox.sym @@ -0,0 +1,333 @@ +(label) @1 +(label) @begin +(label) @end +(void()) Print() +(label) Print::@return +(byte*) TIMEHI +(const byte*) TIMEHI#0 TIMEHI = ((byte*))(byte/word/signed word/dword/signed dword) $a1 +(byte*) TIMELO +(const byte*) TIMELO#0 TIMELO = ((byte*))(byte/word/signed word/dword/signed dword) $a2 +(byte*) VICBANK +(const byte*) VICBANK#0 VICBANK = ((byte*))(word/dword/signed dword) $d018 +(word()) append((byte*) append::dst , (word) append::value , (word) append::sub) +(label) append::@1 +(label) append::@2 +(label) append::@return +(byte*) append::dst +(byte*) append::dst#1 dst zp ZP_WORD:20 2.0 +(byte*) append::dst#2 dst zp ZP_WORD:20 2.0 +(byte*) append::dst#3 dst zp ZP_WORD:20 2.0 +(byte*) append::dst#4 dst zp ZP_WORD:20 335.0 +(word) append::return +(word) append::return#10 return zp ZP_WORD:18 4.0 +(word) append::return#2 return zp ZP_WORD:18 4.0 +(word) append::return#3 return zp ZP_WORD:18 4.0 +(word) append::return#4 return zp ZP_WORD:18 4.0 +(word) append::sub +(word) append::sub#6 sub zp ZP_WORD:22 333.6666666666667 +(word) append::value +(word) append::value#0 value zp ZP_WORD:18 2002.0 +(word) append::value#1 value zp ZP_WORD:18 4.0 +(word) append::value#2 value zp ZP_WORD:18 4.0 +(word) append::value#3 value zp ZP_WORD:18 4.0 +(word) append::value#4 value zp ZP_WORD:18 4.0 +(word) append::value#5 value zp ZP_WORD:18 376.625 +(word) append::value#8 value zp ZP_WORD:18 5.0 +(word()) div10((word) div10::val) +(word~) div10::$0 $0 zp ZP_WORD:4 4.0 +(word~) div10::$2 $2 zp ZP_WORD:6 4.0 +(word~) div10::$3 $3 zp ZP_WORD:4 4.0 +(word~) div10::$4 $4 zp ZP_WORD:6 4.0 +(word~) div10::$5 $5 zp ZP_WORD:6 4.0 +(label) div10::@return +(word) div10::return +(word) div10::return#0 return zp ZP_WORD:4 34.33333333333333 +(word) div10::return#2 return zp ZP_WORD:4 202.0 +(word) div10::val +(word) div10::val#0 val zp ZP_WORD:4 3.0 +(word) div10::val#1 val#1 zp ZP_WORD:6 3.0 +(word) div10::val#2 val zp ZP_WORD:4 2.0 +(word) div10::val#3 val zp ZP_WORD:4 4.0 +(word) div10::val#4 val#4 zp ZP_WORD:2 103.0 +(word()) div16u((word) div16u::dividend , (word) div16u::divisor) +(label) div16u::@1 +(label) div16u::@return +(word) div16u::dividend +(word) div16u::dividend#0 dividend zp ZP_WORD:2 103.0 +(word) div16u::divisor +(const word) div16u::divisor#0 divisor = (byte/signed byte/word/signed word/dword/signed dword) $a +(word) div16u::return +(word) div16u::return#0 return zp ZP_WORD:4 34.33333333333333 +(word) div16u::return#2 return zp ZP_WORD:4 202.0 +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) +(byte~) divr16u::$1 reg byte a 2002.0 +(byte~) divr16u::$2 reg byte a 2002.0 +(label) divr16u::@1 +(label) divr16u::@2 +(label) divr16u::@3 +(label) divr16u::@4 +(label) divr16u::@5 +(label) divr16u::@return +(word) divr16u::dividend +(word) divr16u::dividend#0 dividend zp ZP_WORD:8 250.25 +(word) divr16u::dividend#1 dividend zp ZP_WORD:8 2.0 +(word) divr16u::dividend#2 dividend zp ZP_WORD:8 429.2857142857143 +(word) divr16u::divisor +(byte) divr16u::i +(byte) divr16u::i#1 reg byte x 1501.5 +(byte) divr16u::i#2 reg byte x 154.0 +(word) divr16u::quotient +(word) divr16u::quotient#1 quotient zp ZP_WORD:4 1501.5 +(word) divr16u::quotient#2 quotient zp ZP_WORD:4 1001.0 +(word) divr16u::quotient#3 quotient zp ZP_WORD:4 250.25 +(word) divr16u::rem +(word) divr16u::rem#0 rem zp ZP_WORD:6 750.75 +(word) divr16u::rem#1 rem zp ZP_WORD:6 2002.0 +(word) divr16u::rem#2 rem zp ZP_WORD:6 2002.0 +(word) divr16u::rem#4 rem zp ZP_WORD:6 2002.0 +(word) divr16u::rem#5 rem zp ZP_WORD:6 1001.0 +(word) divr16u::rem#9 rem zp ZP_WORD:6 1001.0 +(word) divr16u::return +(word) divr16u::return#0 return zp ZP_WORD:4 601.0 +(word) divr16u::return#2 return zp ZP_WORD:4 4.0 +(signed word()) main() +(word~) main::$11 $11 zp ZP_WORD:6 22.0 +(word~) main::$12 $12 zp ZP_WORD:6 11.0 +(word~) main::$13 $13 zp ZP_WORD:8 22.0 +(word~) main::$2 $2 zp ZP_WORD:6 22.0 +(word~) main::$3 $3 zp ZP_WORD:6 11.0 +(word~) main::$4 $4 zp ZP_WORD:8 22.0 +(label) main::@1 +(label) main::@10 +(label) main::@11 +(label) main::@12 +(label) main::@13 +(label) main::@2 +(label) main::@3 +(label) main::@4 +(label) main::@5 +(label) main::@6 +(label) main::@7 +(label) main::@8 +(label) main::@9 +(label) main::@return +(signed word) main::return +(const string) main::str str = (string) "200 DIV16U: %5d,%4d IN %04d FRAMESm@" +(const string) main::str1 str1 = (string) "200 DIV10 : %5d,%4d IN %04d FRAMESm@" +(word) main::u +(word) main::u#11 u zp ZP_WORD:2 7.05263157894737 +(word) main::u#15 u zp ZP_WORD:2 7.05263157894737 +(word) main::u#2 u zp ZP_WORD:2 7.333333333333333 +(word) main::u#4 u zp ZP_WORD:2 7.333333333333333 +(word) main::v +(word) main::v#1 v zp ZP_WORD:4 14.0 +(word) main::v#2 v zp ZP_WORD:4 14.0 +(byte()) myprintf((byte*) myprintf::dst , (byte*) myprintf::str , (word) myprintf::w1 , (word) myprintf::w2 , (word) myprintf::w3) +(word~) myprintf::$17 $17 zp ZP_WORD:18 202.0 +(byte~) myprintf::$22 reg byte a 101.0 +(byte~) myprintf::$23 reg byte a 202.0 +(byte~) myprintf::$28 reg byte a 101.0 +(byte~) myprintf::$29 reg byte a 202.0 +(byte~) myprintf::$39 reg byte a 1001.0 +(byte~) myprintf::$47 reg byte a 202.0 +(label) myprintf::@1 +(label) myprintf::@10 +(label) myprintf::@11 +(label) myprintf::@12 +(label) myprintf::@13 +(label) myprintf::@14 +(label) myprintf::@15 +(label) myprintf::@16 +(label) myprintf::@17 +(label) myprintf::@18 +(label) myprintf::@19 +(label) myprintf::@2 +(label) myprintf::@20 +(label) myprintf::@21 +(label) myprintf::@22 +(label) myprintf::@23 +(label) myprintf::@24 +(label) myprintf::@25 +(label) myprintf::@26 +(label) myprintf::@27 +(label) myprintf::@28 +(label) myprintf::@29 +(label) myprintf::@3 +(label) myprintf::@30 +(label) myprintf::@31 +(label) myprintf::@32 +(label) myprintf::@33 +(label) myprintf::@34 +(label) myprintf::@35 +(label) myprintf::@36 +(label) myprintf::@37 +(label) myprintf::@38 +(label) myprintf::@39 +(label) myprintf::@4 +(label) myprintf::@40 +(label) myprintf::@41 +(label) myprintf::@42 +(label) myprintf::@43 +(label) myprintf::@5 +(label) myprintf::@6 +(label) myprintf::@7 +(label) myprintf::@8 +(label) myprintf::@9 +(label) myprintf::@return +(byte) myprintf::b +(byte) myprintf::b#1 reg byte x 126.25000000000003 +(byte) myprintf::b#15 reg byte x 75.75 +(byte) myprintf::b#16 reg byte x 75.75 +(byte) myprintf::b#17 reg byte x 248.32 +(byte) myprintf::b#25 reg byte x 303.0 +(byte) myprintf::b#5 reg byte x 2002.0 +(byte) myprintf::b#6 reg byte x 202.0 +(byte) myprintf::bArg +(byte) myprintf::bArg#1 bArg zp ZP_BYTE:11 202.0 +(byte) myprintf::bArg#10 bArg zp ZP_BYTE:11 235.66666666666663 +(byte) myprintf::bArg#12 bArg zp ZP_BYTE:11 12.625 +(byte) myprintf::bDigits +(byte) myprintf::bDigits#1 bDigits zp ZP_BYTE:17 202.0 +(byte) myprintf::bDigits#10 bDigits zp ZP_BYTE:17 350.5 +(byte) myprintf::bDigits#14 bDigits zp ZP_BYTE:17 23.488372093023255 +(byte) myprintf::bDigits#16 bDigits zp ZP_BYTE:17 188.25 +(byte) myprintf::bDigits#2 bDigits zp ZP_BYTE:17 2002.0 +(byte) myprintf::bDigits#24 bDigits zp ZP_BYTE:17 201.99999999999997 +(byte) myprintf::bDigits#25 bDigits zp ZP_BYTE:17 1607.0 +(byte) myprintf::bDigits#3 bDigits zp ZP_BYTE:17 2002.0 +(byte) myprintf::bDigits#8 bDigits zp ZP_BYTE:17 701.0 +(byte) myprintf::bFormat +(byte) myprintf::bFormat#10 bFormat zp ZP_BYTE:10 40.4 +(byte) myprintf::bFormat#4 bFormat zp ZP_BYTE:10 168.33333333333331 +(byte) myprintf::bLeadZero +(byte) myprintf::bLeadZero#10 bLeadZero zp ZP_BYTE:15 22.818181818181817 +(byte) myprintf::bLeadZero#18 bLeadZero zp ZP_BYTE:15 168.33333333333331 +(byte) myprintf::bLen +(byte) myprintf::bLen#1 bLen zp ZP_BYTE:16 202.0 +(byte) myprintf::bLen#10 reg byte y 43.285714285714285 +(byte) myprintf::bLen#11 bLen zp ZP_BYTE:16 620.8 +(byte) myprintf::bLen#12 bLen zp ZP_BYTE:16 1552.0 +(byte) myprintf::bLen#13 bLen zp ZP_BYTE:16 1552.0 +(byte) myprintf::bLen#14 bLen zp ZP_BYTE:16 34.487804878048784 +(byte) myprintf::bLen#23 bLen zp ZP_BYTE:16 1203.0 +(byte) myprintf::bLen#24 bLen zp ZP_BYTE:16 460.99999999999994 +(byte) myprintf::bLen#28 bLen zp ZP_BYTE:16 1607.0 +(byte) myprintf::bLen#3 bLen zp ZP_BYTE:16 202.0 +(byte) myprintf::bLen#4 bLen zp ZP_BYTE:16 1001.0 +(byte) myprintf::bLen#6 bLen zp ZP_BYTE:16 1001.0 +(byte) myprintf::bLen#7 bLen zp ZP_BYTE:16 202.0 +(byte) myprintf::bTrailing +(byte) myprintf::bTrailing#10 bTrailing zp ZP_BYTE:14 10.712121212121211 +(byte) myprintf::bTrailing#21 bTrailing zp ZP_BYTE:14 168.33333333333331 +(byte[6]) myprintf::buf6 +(const byte[6]) myprintf::buf6#0 buf6 = { fill( 6, 0) } +(byte) myprintf::digit +(byte) myprintf::digit#2 digit zp ZP_BYTE:10 1501.5 +(byte) myprintf::digit#3 digit zp ZP_BYTE:10 1001.0 +(byte*) myprintf::dst +(byte) myprintf::return +(byte) myprintf::return#0 return zp ZP_BYTE:16 236.3333333333333 +(byte*) myprintf::str +(byte*) myprintf::str#0 str zp ZP_WORD:8 151.5 +(byte*) myprintf::str#10 str zp ZP_WORD:8 4.121621621621622 +(byte*) myprintf::str#5 str zp ZP_WORD:8 2.0 +(word) myprintf::w +(word) myprintf::w#10 w zp ZP_WORD:12 15.303030303030305 +(word) myprintf::w#17 w zp ZP_WORD:12 235.66666666666663 +(word) myprintf::w#21 w zp ZP_WORD:12 202.0 +(word~) myprintf::w#51 w zp ZP_WORD:12 202.0 +(word~) myprintf::w#52 w zp ZP_WORD:12 202.0 +(word~) myprintf::w#53 w zp ZP_WORD:12 202.0 +(word) myprintf::w1 +(word) myprintf::w1#0 w1 zp ZP_WORD:2 11.0 +(word) myprintf::w1#1 w1 zp ZP_WORD:2 11.0 +(word) myprintf::w1#6 w1 zp ZP_WORD:2 1.5974025974025974 +(word) myprintf::w2 +(word) myprintf::w2#0 w2 zp ZP_WORD:4 22.0 +(word) myprintf::w2#1 w2 zp ZP_WORD:4 22.0 +(word) myprintf::w2#7 w2 zp ZP_WORD:4 1.5974025974025974 +(word) myprintf::w3 +(word) myprintf::w3#0 w3 zp ZP_WORD:6 7.333333333333333 +(word) myprintf::w3#1 w3 zp ZP_WORD:6 7.333333333333333 +(word) myprintf::w3#7 w3 zp ZP_WORD:6 1.5974025974025974 +(byte[$64]) strTemp +(const byte[$64]) strTemp#0 strTemp = { fill( $64, 0) } +(void()) utoa((word) utoa::value , (byte*) utoa::dst) +(byte~) utoa::$16 reg byte a 4.0 +(byte~) utoa::$17 reg byte a 4.0 +(label) utoa::@1 +(label) utoa::@10 +(label) utoa::@11 +(label) utoa::@12 +(label) utoa::@13 +(label) utoa::@14 +(label) utoa::@15 +(label) utoa::@16 +(label) utoa::@2 +(label) utoa::@3 +(label) utoa::@4 +(label) utoa::@5 +(label) utoa::@6 +(label) utoa::@7 +(label) utoa::@8 +(label) utoa::@9 +(label) utoa::@return +(byte) utoa::bStarted +(byte) utoa::bStarted#5 reg byte x 1.3333333333333333 +(byte) utoa::bStarted#6 reg byte x 2.0 +(byte) utoa::bStarted#7 reg byte x 4.0 +(byte*) utoa::dst +(byte*) utoa::dst#1 dst zp ZP_WORD:20 4.0 +(byte*) utoa::dst#10 dst zp ZP_WORD:20 1.25 +(byte*) utoa::dst#12 dst zp ZP_WORD:20 2.0 +(byte*) utoa::dst#13 dst zp ZP_WORD:20 1.25 +(byte*) utoa::dst#16 dst zp ZP_WORD:20 0.75 +(byte*) utoa::dst#2 dst zp ZP_WORD:20 4.0 +(byte*) utoa::dst#3 dst zp ZP_WORD:20 4.0 +(byte*) utoa::dst#4 dst zp ZP_WORD:20 4.0 +(word) utoa::value +(word) utoa::value#0 value zp ZP_WORD:18 4.0 +(word) utoa::value#1 value zp ZP_WORD:18 2.0 +(word) utoa::value#10 value zp ZP_WORD:18 2.5 +(word) utoa::value#11 value zp ZP_WORD:18 2.5 +(word) utoa::value#12 value zp ZP_WORD:18 6.0 +(word) utoa::value#2 value zp ZP_WORD:18 2.0 +(word) utoa::value#3 value zp ZP_WORD:18 2.0 +(word) utoa::value#4 value zp ZP_WORD:18 35.66666666666666 +(word) utoa::value#6 value zp ZP_WORD:18 2.5 +(byte*) zp1 +(const byte*) zp1#0 zp1 = ((byte*))(byte/signed byte/word/signed word/dword/signed dword) $61 +(byte*) zp2 +(const byte*) zp2#0 zp2 = ((byte*))(byte/signed byte/word/signed word/dword/signed dword) $62 + +zp ZP_WORD:2 [ main::u#11 main::u#2 myprintf::w1#6 myprintf::w1#0 myprintf::w1#1 div16u::dividend#0 main::u#15 main::u#4 div10::val#4 ] +zp ZP_WORD:4 [ myprintf::w2#7 myprintf::w2#0 myprintf::w2#1 main::v#1 main::v#2 div16u::return#2 div16u::return#0 div10::return#2 div10::return#0 divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 div10::$3 div10::val#2 div10::val#3 div10::$0 div10::val#0 ] +zp ZP_WORD:6 [ myprintf::w3#7 myprintf::w3#0 myprintf::w3#1 main::$3 main::$12 main::$2 main::$11 divr16u::rem#4 divr16u::rem#9 divr16u::rem#5 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 div10::$2 div10::val#1 div10::$4 div10::$5 ] +zp ZP_WORD:8 [ myprintf::str#10 myprintf::str#5 myprintf::str#0 divr16u::dividend#2 divr16u::dividend#1 divr16u::dividend#0 main::$4 main::$13 ] +zp ZP_BYTE:10 [ myprintf::bFormat#10 myprintf::bFormat#4 myprintf::digit#3 myprintf::digit#2 ] +zp ZP_BYTE:11 [ myprintf::bArg#12 myprintf::bArg#10 myprintf::bArg#1 ] +zp ZP_WORD:12 [ myprintf::w#10 myprintf::w#17 myprintf::w#21 myprintf::w#51 myprintf::w#52 myprintf::w#53 ] +zp ZP_BYTE:14 [ myprintf::bTrailing#10 myprintf::bTrailing#21 ] +zp ZP_BYTE:15 [ myprintf::bLeadZero#10 myprintf::bLeadZero#18 ] +reg byte a [ myprintf::$22 ] +reg byte a [ myprintf::$28 ] +reg byte x [ myprintf::b#17 myprintf::b#5 ] +zp ZP_BYTE:16 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#14 myprintf::return#0 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] +zp ZP_BYTE:17 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#14 myprintf::bDigits#24 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] +reg byte a [ myprintf::$39 ] +reg byte x [ myprintf::b#25 myprintf::b#1 myprintf::b#6 ] +reg byte x [ utoa::bStarted#7 utoa::bStarted#6 utoa::bStarted#5 ] +zp ZP_WORD:18 [ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 append::return#10 append::return#4 append::return#3 append::return#2 myprintf::$17 ] +zp ZP_WORD:20 [ utoa::dst#12 utoa::dst#4 utoa::dst#13 utoa::dst#2 utoa::dst#10 utoa::dst#16 utoa::dst#1 append::dst#4 append::dst#1 append::dst#2 append::dst#3 utoa::dst#3 ] +zp ZP_WORD:22 [ append::sub#6 ] +reg byte x [ divr16u::i#2 divr16u::i#1 ] +reg byte x [ myprintf::b#15 ] +reg byte a [ myprintf::$23 ] +reg byte y [ myprintf::bLen#10 ] +reg byte x [ myprintf::b#16 ] +reg byte a [ myprintf::$29 ] +reg byte a [ myprintf::$47 ] +reg byte a [ utoa::$16 ] +reg byte a [ utoa::$17 ] +reg byte a [ divr16u::$1 ] +reg byte a [ divr16u::$2 ] From 58502ecf79c3911829bd9310ea3e96bc30bf6963 Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Wed, 24 Apr 2019 00:46:45 +0200 Subject: [PATCH 2/5] Added issue links to most coments. Added separate test demonstrating nested ternary problem. --- .../kickc/model/operators/OperatorMinus.java | 3 +++ .../dk/camelot64/kickc/test/TestPrograms.java | 10 ++++++++ src/test/kc/literal-char-minus-number.kc | 6 +++++ src/test/kc/sandbox-ternary-error.kc | 13 ++++++++++ src/test/kc/sandbox.kc | 17 ++++++------- src/test/ref/sandbox.asm | 8 +++---- src/test/ref/sandbox.log | 24 +++++++++---------- 7 files changed, 57 insertions(+), 24 deletions(-) create mode 100644 src/test/kc/literal-char-minus-number.kc create mode 100644 src/test/kc/sandbox-ternary-error.kc diff --git a/src/main/java/dk/camelot64/kickc/model/operators/OperatorMinus.java b/src/main/java/dk/camelot64/kickc/model/operators/OperatorMinus.java index 3053607cd..3f018c9d5 100644 --- a/src/main/java/dk/camelot64/kickc/model/operators/OperatorMinus.java +++ b/src/main/java/dk/camelot64/kickc/model/operators/OperatorMinus.java @@ -5,6 +5,7 @@ import dk.camelot64.kickc.model.types.SymbolType; import dk.camelot64.kickc.model.types.SymbolTypeInteger; import dk.camelot64.kickc.model.types.SymbolTypePointer; import dk.camelot64.kickc.model.types.SymbolTypeSimple; +import dk.camelot64.kickc.model.values.ConstantChar; import dk.camelot64.kickc.model.values.ConstantInteger; import dk.camelot64.kickc.model.values.ConstantLiteral; import dk.camelot64.kickc.model.values.ConstantPointer; @@ -24,6 +25,8 @@ public class OperatorMinus extends OperatorBinary { } else if(left instanceof ConstantPointer && right instanceof ConstantInteger) { long location = ((ConstantPointer) left).getLocation() - ((ConstantInteger) right).getInteger(); return new ConstantPointer(location, ((ConstantPointer) left).getElementType()); + } else if(left instanceof ConstantChar && right instanceof ConstantInteger) { + return new ConstantInteger(((ConstantChar) left).getChar() - ((ConstantInteger) right).getInteger()); } throw new CompileError("Calculation not implemented " + left + " " + getOperator() + " " + right); } diff --git a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java index c68af5ba0..e89ac0f61 100644 --- a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java +++ b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java @@ -32,6 +32,16 @@ public class TestPrograms { public TestPrograms() { } + @Test + public void testLiteralCharMinusNumber() throws IOException, URISyntaxException { + compileAndCompare("literal-char-minus-number"); + } + + //@Test + //public void testPaulNelsenSandboxTernaryError() throws IOException, URISyntaxException { + // compileAndCompare("sandbox-ternary-error", log().verboseParse().verboseCreateSsa().setVerboseSSAOptimize().verboseStatementSequence()); + //} + @Test public void testPaulNelsenSandbox() throws IOException, URISyntaxException { compileAndCompare("sandbox"); diff --git a/src/test/kc/literal-char-minus-number.kc b/src/test/kc/literal-char-minus-number.kc new file mode 100644 index 000000000..f3fcccc34 --- /dev/null +++ b/src/test/kc/literal-char-minus-number.kc @@ -0,0 +1,6 @@ +// Tests subtracting a number from a literal char + +void main() { + const byte* SCREEN = 0x0400; + *SCREEN = 'a' - 1; +} \ No newline at end of file diff --git a/src/test/kc/sandbox-ternary-error.kc b/src/test/kc/sandbox-ternary-error.kc new file mode 100644 index 000000000..6937ececb --- /dev/null +++ b/src/test/kc/sandbox-ternary-error.kc @@ -0,0 +1,13 @@ +// Demonstrates error with nested ternary operator + +void main(void) { + const byte* SCREEN = 0x0400; + for ( byte b: 0..2 ) { + *SCREEN = (b == 0) ? 'a' : ((b == 1) ? 'b' : 'c'); + } +} + + + + + diff --git a/src/test/kc/sandbox.kc b/src/test/kc/sandbox.kc index 90f839738..14c8800b0 100644 --- a/src/test/kc/sandbox.kc +++ b/src/test/kc/sandbox.kc @@ -1,11 +1,11 @@ import "division" -const byte * zp1 = 0x61; // #define zp1 *(byte *)0x61 -- allows "zp1" vs "*zp1" below -- not supported -- +const byte * zp1 = 0x61; // #define zp1 *(byte *)0x61 -- allows "zp1" vs "*zp1" below -- not supported -- https://gitlab.com/camelot/kickc/issues/169 const byte * zp2 = 0x62; const byte * TIMEHI = 0xA1; const byte * TIMELO = 0xA2; const byte * VICBANK = 0xD018; -byte[16] buf16; // "char buf16[16]" is the normal way -- not supported +byte[16] buf16; // "char buf16[16]" is the normal way -- not supported -- https://gitlab.com/camelot/kickc/issues/162 byte[100] strTemp; // simple 'utoa' without using multiply or divide @@ -33,21 +33,22 @@ byte myprintf(byte *dst, byte *str, word w1, word w2, word w3) { for (; *str != 0; ++str) { b = *str; - if (bFormat != 0) { // "(bFormat)" is the normal way -- not supported + if (bFormat != 0) { // "(bFormat)" is the normal way -- not supported -- https://gitlab.com/camelot/kickc/issues/135 if (b == '0') { bLeadZero = 1; continue; } if (b >= '1' && b <= '9') { bDigits = b - '0'; continue; } if (b == '-') { bTrailing = 1; continue; } - if (b == 'c'){ // "switch" is the normal way -- not supported + if (b == 'c'){ // "switch" is the normal way -- not supported -- https://gitlab.com/camelot/kickc/issues/170 dst[bLen++] = (byte)w; } else if (b == 'd') { utoa(w, buf6); - b = 1; while(buf6[b] != 0) ++b; // strlen() not supported - // if (bDigits > b) is used because non-executing for loop is not supported + b = 1; while(buf6[b] != 0) ++b; // strlen() not supported -- https://gitlab.com/camelot/kickc/issues/182 + // if (bDigits > b) is used because non-executing for loop is not supported -- https://gitlab.com/camelot/kickc/issues/183 if (bTrailing == 0 && bDigits > b) for (; bDigits > b; --bDigits) dst[bLen++] = (bLeadZero == 0) ? ' ' : '0'; for (digit = 0; digit < b; ++digit) dst[bLen++] = buf6[digit]; if (bTrailing != 0 && bDigits > b) for (; bDigits > b; --bDigits) dst[bLen++] = ' '; } else if (b == 'x' || b == 'X'){ // hex - b = (w >> 4) & 0xF; dst[bLen++] = (b < 10 ? '0' : 0x57) + b; // "('a' - 10)" is the normal way -- not supported + b = (w >> 4) & 0xF; + dst[bLen++] = (b < 10 ? '0' : 0x57) + b; // "('a' - 10)" is the normal way -- not supported -- https://gitlab.com/camelot/kickc/issues/184 b = w & 0xF; dst[bLen++] = (b < 10 ? '0' : 0x57) + b; } bFormat = 0; @@ -56,7 +57,7 @@ byte myprintf(byte *dst, byte *str, word w1, word w2, word w3) { if (b == '%') { bFormat = 1; bLeadZero = 0; bDigits = 1; bTrailing = 0; // default format - //w = (bArg == 0) ? w1 : ((bArg == 1) ? w2 : w3); -- "?" is the normal way, but error "sequence does not contain all blocks" + //w = (bArg == 0) ? w1 : ((bArg == 1) ? w2 : w3); -- "?" is the normal way, but error "sequence does not contain all blocks" -- https://gitlab.com/camelot/kickc/issues/185 if (bArg == 0) w = w1; else if (bArg == 1) w = w2; else w = w3; diff --git a/src/test/ref/sandbox.asm b/src/test/ref/sandbox.asm index a8836c169..3b8c30fa4 100644 --- a/src/test/ref/sandbox.asm +++ b/src/test/ref/sandbox.asm @@ -2,7 +2,7 @@ :BasicUpstart(main) .pc = $80d "Program" .label zp1 = $61 - // #define zp1 *(byte *)0x61 -- allows "zp1" vs "*zp1" below -- not supported -- + // #define zp1 *(byte *)0x61 -- allows "zp1" vs "*zp1" below -- not supported -- https://gitlab.com/camelot/kickc/issues/169 .label zp2 = $62 .label TIMEHI = $a1 .label TIMELO = $a2 @@ -342,7 +342,7 @@ myprintf: { jmp b12 b6: lda w - // "switch" is the normal way -- not supported + // "switch" is the normal way -- not supported -- https://gitlab.com/camelot/kickc/issues/170 ldy bLen sta strTemp,y inc bLen @@ -361,7 +361,7 @@ myprintf: { cpx #'%' bne b28 // default format - //w = (bArg == 0) ? w1 : ((bArg == 1) ? w2 : w3); -- "?" is the normal way, but error "sequence does not contain all blocks" + //w = (bArg == 0) ? w1 : ((bArg == 1) ? w2 : w3); -- "?" is the normal way, but error "sequence does not contain all blocks" -- https://gitlab.com/camelot/kickc/issues/185 lda bArg cmp #0 beq b42 @@ -722,5 +722,5 @@ divr16u: { bne b1 rts } - // "char buf16[16]" is the normal way -- not supported + // "char buf16[16]" is the normal way -- not supported -- https://gitlab.com/camelot/kickc/issues/162 strTemp: .fill $64, 0 diff --git a/src/test/ref/sandbox.log b/src/test/ref/sandbox.log index 78165ea55..7ff508c4e 100644 --- a/src/test/ref/sandbox.log +++ b/src/test/ref/sandbox.log @@ -3876,7 +3876,7 @@ INITIAL ASM .pc = $80d "Program" //SEG2 Global Constants & labels .label zp1 = $61 - // #define zp1 *(byte *)0x61 -- allows "zp1" vs "*zp1" below -- not supported -- + // #define zp1 *(byte *)0x61 -- allows "zp1" vs "*zp1" below -- not supported -- https://gitlab.com/camelot/kickc/issues/169 .label zp2 = $62 .label TIMEHI = $a1 .label TIMELO = $a2 @@ -4671,7 +4671,7 @@ myprintf: { lda w sta _47 //SEG251 [115] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$47 -- pbuc1_derefidx_vbuz1=vbuz2 - // "switch" is the normal way -- not supported + // "switch" is the normal way -- not supported -- https://gitlab.com/camelot/kickc/issues/170 lda _47 ldy bLen sta strTemp,y @@ -4713,7 +4713,7 @@ myprintf: { b32: //SEG268 [120] if((byte) myprintf::bArg#12==(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@42 -- vbuz1_eq_0_then_la1 // default format - //w = (bArg == 0) ? w1 : ((bArg == 1) ? w2 : w3); -- "?" is the normal way, but error "sequence does not contain all blocks" + //w = (bArg == 0) ? w1 : ((bArg == 1) ? w2 : w3); -- "?" is the normal way, but error "sequence does not contain all blocks" -- https://gitlab.com/camelot/kickc/issues/185 lda bArg cmp #0 beq b42 @@ -5463,7 +5463,7 @@ divr16u: { //SEG464 [212] return rts } - // "char buf16[16]" is the normal way -- not supported + // "char buf16[16]" is the normal way -- not supported -- https://gitlab.com/camelot/kickc/issues/162 strTemp: .fill $64, 0 REGISTER UPLIFT POTENTIAL REGISTERS @@ -5857,7 +5857,7 @@ ASSEMBLER BEFORE OPTIMIZATION .pc = $80d "Program" //SEG2 Global Constants & labels .label zp1 = $61 - // #define zp1 *(byte *)0x61 -- allows "zp1" vs "*zp1" below -- not supported -- + // #define zp1 *(byte *)0x61 -- allows "zp1" vs "*zp1" below -- not supported -- https://gitlab.com/camelot/kickc/issues/169 .label zp2 = $62 .label TIMEHI = $a1 .label TIMELO = $a2 @@ -6561,7 +6561,7 @@ myprintf: { //SEG250 [114] (byte~) myprintf::$47 ← ((byte)) (word) myprintf::w#10 -- vbuaa=_byte_vwuz1 lda w //SEG251 [115] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$47 -- pbuc1_derefidx_vbuz1=vbuaa - // "switch" is the normal way -- not supported + // "switch" is the normal way -- not supported -- https://gitlab.com/camelot/kickc/issues/170 ldy bLen sta strTemp,y //SEG252 [116] (byte) myprintf::bLen#1 ← ++ (byte) myprintf::bLen#14 -- vbuz1=_inc_vbuz1 @@ -6601,7 +6601,7 @@ myprintf: { b32: //SEG268 [120] if((byte) myprintf::bArg#12==(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@42 -- vbuz1_eq_0_then_la1 // default format - //w = (bArg == 0) ? w1 : ((bArg == 1) ? w2 : w3); -- "?" is the normal way, but error "sequence does not contain all blocks" + //w = (bArg == 0) ? w1 : ((bArg == 1) ? w2 : w3); -- "?" is the normal way, but error "sequence does not contain all blocks" -- https://gitlab.com/camelot/kickc/issues/185 lda bArg cmp #0 beq b42 @@ -7235,7 +7235,7 @@ divr16u: { //SEG464 [212] return rts } - // "char buf16[16]" is the normal way -- not supported + // "char buf16[16]" is the normal way -- not supported -- https://gitlab.com/camelot/kickc/issues/162 strTemp: .fill $64, 0 ASSEMBLER OPTIMIZATIONS @@ -7838,7 +7838,7 @@ Score: 355871 .pc = $80d "Program" //SEG2 Global Constants & labels .label zp1 = $61 - // #define zp1 *(byte *)0x61 -- allows "zp1" vs "*zp1" below -- not supported -- + // #define zp1 *(byte *)0x61 -- allows "zp1" vs "*zp1" below -- not supported -- https://gitlab.com/camelot/kickc/issues/169 .label zp2 = $62 .label TIMEHI = $a1 .label TIMELO = $a2 @@ -8427,7 +8427,7 @@ myprintf: { //SEG250 [114] (byte~) myprintf::$47 ← ((byte)) (word) myprintf::w#10 -- vbuaa=_byte_vwuz1 lda w //SEG251 [115] *((const byte[$64]) strTemp#0 + (byte) myprintf::bLen#14) ← (byte~) myprintf::$47 -- pbuc1_derefidx_vbuz1=vbuaa - // "switch" is the normal way -- not supported + // "switch" is the normal way -- not supported -- https://gitlab.com/camelot/kickc/issues/170 ldy bLen sta strTemp,y //SEG252 [116] (byte) myprintf::bLen#1 ← ++ (byte) myprintf::bLen#14 -- vbuz1=_inc_vbuz1 @@ -8463,7 +8463,7 @@ myprintf: { //SEG267 myprintf::@32 //SEG268 [120] if((byte) myprintf::bArg#12==(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@42 -- vbuz1_eq_0_then_la1 // default format - //w = (bArg == 0) ? w1 : ((bArg == 1) ? w2 : w3); -- "?" is the normal way, but error "sequence does not contain all blocks" + //w = (bArg == 0) ? w1 : ((bArg == 1) ? w2 : w3); -- "?" is the normal way, but error "sequence does not contain all blocks" -- https://gitlab.com/camelot/kickc/issues/185 lda bArg cmp #0 beq b42 @@ -9020,6 +9020,6 @@ divr16u: { //SEG464 [212] return rts } - // "char buf16[16]" is the normal way -- not supported + // "char buf16[16]" is the normal way -- not supported -- https://gitlab.com/camelot/kickc/issues/162 strTemp: .fill $64, 0 From c64713c913b6d3549317f1a970d8a7431d8d18fc Mon Sep 17 00:00:00 2001 From: Jesper Gravgaard Date: Thu, 25 Apr 2019 07:58:17 +0200 Subject: [PATCH 3/5] Fixed char - number. Closes #184. Also fixed problem with nested ternary. Closes #185. --- .../java/dk/camelot64/kickc/Compiler.java | 1 + .../kickc/model/StatementSequence.java | 16 +- .../Pass0GenerateStatementSequence.java | 6 +- .../passes/Pass2AssertPhiPredecessors.java | 38 + .../dk/camelot64/kickc/test/TestPrograms.java | 13 +- src/test/kc/simple-loop.kc | 8 + src/test/ref/literal-char-minus-number.asm | 10 + src/test/ref/literal-char-minus-number.cfg | 15 + src/test/ref/literal-char-minus-number.log | 210 ++++ src/test/ref/literal-char-minus-number.sym | 8 + src/test/ref/sandbox-ternary-error.asm | 26 + src/test/ref/sandbox-ternary-error.cfg | 34 + src/test/ref/sandbox-ternary-error.log | 988 ++++++++++++++++++ src/test/ref/sandbox-ternary-error.sym | 20 + src/test/ref/simple-loop.asm | 17 + src/test/ref/simple-loop.cfg | 22 + src/test/ref/simple-loop.log | 328 ++++++ src/test/ref/simple-loop.sym | 13 + 18 files changed, 1766 insertions(+), 7 deletions(-) create mode 100644 src/main/java/dk/camelot64/kickc/passes/Pass2AssertPhiPredecessors.java create mode 100644 src/test/kc/simple-loop.kc create mode 100644 src/test/ref/literal-char-minus-number.asm create mode 100644 src/test/ref/literal-char-minus-number.cfg create mode 100644 src/test/ref/literal-char-minus-number.log create mode 100644 src/test/ref/literal-char-minus-number.sym create mode 100644 src/test/ref/sandbox-ternary-error.asm create mode 100644 src/test/ref/sandbox-ternary-error.cfg create mode 100644 src/test/ref/sandbox-ternary-error.log create mode 100644 src/test/ref/sandbox-ternary-error.sym create mode 100644 src/test/ref/simple-loop.asm create mode 100644 src/test/ref/simple-loop.cfg create mode 100644 src/test/ref/simple-loop.log create mode 100644 src/test/ref/simple-loop.sym diff --git a/src/main/java/dk/camelot64/kickc/Compiler.java b/src/main/java/dk/camelot64/kickc/Compiler.java index c0e8b3084..23310454f 100644 --- a/src/main/java/dk/camelot64/kickc/Compiler.java +++ b/src/main/java/dk/camelot64/kickc/Compiler.java @@ -222,6 +222,7 @@ public class Compiler { assertions.add(new Pass2AssertNoLabels(program)); assertions.add(new Pass2AssertSingleAssignment(program)); assertions.add(new Pass2AssertRValues(program)); + //assertions.add(new Pass2AssertPhiPredecessors(program)); for(Pass2SsaAssertion assertion : assertions) { assertion.check(); } diff --git a/src/main/java/dk/camelot64/kickc/model/StatementSequence.java b/src/main/java/dk/camelot64/kickc/model/StatementSequence.java index 8f1461c83..754286877 100644 --- a/src/main/java/dk/camelot64/kickc/model/StatementSequence.java +++ b/src/main/java/dk/camelot64/kickc/model/StatementSequence.java @@ -4,6 +4,7 @@ import dk.camelot64.kickc.model.statements.Statement; import dk.camelot64.kickc.model.statements.StatementLabel; import dk.camelot64.kickc.model.statements.StatementProcedureBegin; import dk.camelot64.kickc.model.statements.StatementProcedureEnd; +import dk.camelot64.kickc.model.values.LabelRef; import java.util.ArrayList; import java.util.List; @@ -11,7 +12,7 @@ import java.util.List; /** A sequence of Statements */ public class StatementSequence { - private List statements; + private ArrayList statements; public StatementSequence() { this.statements = new ArrayList<>(); @@ -43,4 +44,17 @@ public class StatementSequence { return out.toString(); } + /** + * Look backwar from the end of the sequence and find the last label + * @return The label of the block, currently being build + */ + public LabelRef getCurrentBlockLabel() { + for(int i = statements.size()-1; i >= 0; i--) { + Statement statement = statements.get(i); + if(statement instanceof StatementLabel) { + return ((StatementLabel) statement).getLabel(); + } + } + return null; + } } diff --git a/src/main/java/dk/camelot64/kickc/passes/Pass0GenerateStatementSequence.java b/src/main/java/dk/camelot64/kickc/passes/Pass0GenerateStatementSequence.java index d060c9682..6889b48b4 100644 --- a/src/main/java/dk/camelot64/kickc/passes/Pass0GenerateStatementSequence.java +++ b/src/main/java/dk/camelot64/kickc/passes/Pass0GenerateStatementSequence.java @@ -1371,18 +1371,20 @@ public class Pass0GenerateStatementSequence extends KickCBaseVisitor { RValue falseValue = (RValue) this.visit(ctx.expr(2)); VariableRef falseVar = getCurrentScope().addVariableIntermediate().getRef(); sequence.addStatement(new StatementAssignment(falseVar, null, null, falseValue, new StatementSource(ctx), Comment.NO_COMMENTS)); + LabelRef falseExitLabel = sequence.getCurrentBlockLabel(); sequence.addStatement(new StatementJump(endJumpLabel.getRef(), new StatementSource(ctx), Comment.NO_COMMENTS)); sequence.addStatement(new StatementLabel(trueLabel.getRef(), new StatementSource(ctx), Comment.NO_COMMENTS)); RValue trueValue = (RValue) this.visit(ctx.expr(1)); VariableRef trueVar = getCurrentScope().addVariableIntermediate().getRef(); sequence.addStatement(new StatementAssignment(trueVar, null, null, trueValue, new StatementSource(ctx), Comment.NO_COMMENTS)); + LabelRef trueExitLabel = sequence.getCurrentBlockLabel(); sequence.addStatement(new StatementLabel(endJumpLabel.getRef(), new StatementSource(ctx), Comment.NO_COMMENTS)); StatementPhiBlock phiBlock = new StatementPhiBlock(Comment.NO_COMMENTS); phiBlock.setSource(new StatementSource(ctx)); VariableRef finalVar = getCurrentScope().addVariableIntermediate().getRef(); StatementPhiBlock.PhiVariable phiVariable = phiBlock.addPhiVariable(finalVar); - phiVariable.setrValue(trueLabel.getRef(), trueVar); - phiVariable.setrValue(falseLabel.getRef(), falseVar); + phiVariable.setrValue(trueExitLabel, trueVar); + phiVariable.setrValue(falseExitLabel, falseVar); sequence.addStatement(phiBlock); return finalVar; } diff --git a/src/main/java/dk/camelot64/kickc/passes/Pass2AssertPhiPredecessors.java b/src/main/java/dk/camelot64/kickc/passes/Pass2AssertPhiPredecessors.java new file mode 100644 index 000000000..781346e6b --- /dev/null +++ b/src/main/java/dk/camelot64/kickc/passes/Pass2AssertPhiPredecessors.java @@ -0,0 +1,38 @@ +package dk.camelot64.kickc.passes; + +import dk.camelot64.kickc.model.CompileError; +import dk.camelot64.kickc.model.ControlFlowBlock; +import dk.camelot64.kickc.model.Program; +import dk.camelot64.kickc.model.statements.StatementPhiBlock; +import dk.camelot64.kickc.model.values.LabelRef; + +import java.util.List; +import java.util.stream.Collectors; + +/** Asserts that the program does not contain any predecessors in Phi-blocks that are not true predecessors */ +public class Pass2AssertPhiPredecessors extends Pass2SsaAssertion { + + public Pass2AssertPhiPredecessors(Program program) { + super(program); + } + + @Override + public void check() throws AssertionFailed { + for(ControlFlowBlock block : getGraph().getAllBlocks()) { + if(block.hasPhiBlock()) { + StatementPhiBlock phiBlock = block.getPhiBlock(); + List predecessors = + getGraph().getPredecessors(block).stream().map(ControlFlowBlock::getLabel).collect(Collectors.toList()); + for(StatementPhiBlock.PhiVariable phiVariable : phiBlock.getPhiVariables()) { + for(StatementPhiBlock.PhiRValue phiRValue : phiVariable.getValues()) { + if(!predecessors.contains(phiRValue.getPredecessor())) { + throw new CompileError("INTERNAL ERROR! Block "+block.getLabel()+" phi references non-predecessor block "+phiRValue.getPredecessor()+ + "\n "+phiBlock.toString(getProgram(), false)); + } + } + } + } + } + } + +} diff --git a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java index e89ac0f61..c9ac8c94e 100644 --- a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java +++ b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java @@ -32,15 +32,20 @@ public class TestPrograms { public TestPrograms() { } + @Test + public void testSimpleLoop() throws IOException, URISyntaxException { + compileAndCompare("simple-loop"); + } + @Test public void testLiteralCharMinusNumber() throws IOException, URISyntaxException { compileAndCompare("literal-char-minus-number"); } - //@Test - //public void testPaulNelsenSandboxTernaryError() throws IOException, URISyntaxException { - // compileAndCompare("sandbox-ternary-error", log().verboseParse().verboseCreateSsa().setVerboseSSAOptimize().verboseStatementSequence()); - //} + @Test + public void testPaulNelsenSandboxTernaryError() throws IOException, URISyntaxException { + compileAndCompare("sandbox-ternary-error", log().verboseParse().verboseCreateSsa().setVerboseSSAOptimize().verboseStatementSequence()); + } @Test public void testPaulNelsenSandbox() throws IOException, URISyntaxException { diff --git a/src/test/kc/simple-loop.kc b/src/test/kc/simple-loop.kc new file mode 100644 index 000000000..44546a147 --- /dev/null +++ b/src/test/kc/simple-loop.kc @@ -0,0 +1,8 @@ +void main() { + const unsigned char* SCREEN = 0x0400; + for( unsigned char i = 0; i<128; i+=2) { + SCREEN[i] = 'a'; + (*(unsigned char*)0xD020)=0; + } +} + diff --git a/src/test/ref/literal-char-minus-number.asm b/src/test/ref/literal-char-minus-number.asm new file mode 100644 index 000000000..5330c67fc --- /dev/null +++ b/src/test/ref/literal-char-minus-number.asm @@ -0,0 +1,10 @@ +// Tests subtracting a number from a literal char +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" +main: { + .label SCREEN = $400 + lda #'a'-1 + sta SCREEN + rts +} diff --git a/src/test/ref/literal-char-minus-number.cfg b/src/test/ref/literal-char-minus-number.cfg new file mode 100644 index 000000000..35582016d --- /dev/null +++ b/src/test/ref/literal-char-minus-number.cfg @@ -0,0 +1,15 @@ +@begin: scope:[] from + [0] phi() + to:@1 +@1: scope:[] from @begin + [1] phi() + [2] call main + to:@end +@end: scope:[] from @1 + [3] phi() +main: scope:[main] from @1 + [4] *((const byte*) main::SCREEN#0) ← (byte) 'a'-(byte/signed byte/word/signed word/dword/signed dword) 1 + to:main::@return +main::@return: scope:[main] from main + [5] return + to:@return diff --git a/src/test/ref/literal-char-minus-number.log b/src/test/ref/literal-char-minus-number.log new file mode 100644 index 000000000..57666570a --- /dev/null +++ b/src/test/ref/literal-char-minus-number.log @@ -0,0 +1,210 @@ + +CONTROL FLOW GRAPH SSA +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + (byte*) main::SCREEN#0 ← ((byte*)) (word/signed word/dword/signed dword) $400 + (byte/signed byte/word/signed word/dword/signed dword~) main::$0 ← (byte) 'a' - (byte/signed byte/word/signed word/dword/signed dword) 1 + *((byte*) main::SCREEN#0) ← (byte/signed byte/word/signed word/dword/signed dword~) main::$0 + to:main::@return +main::@return: scope:[main] from main + return + to:@return +@1: scope:[] from @begin + call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +SYMBOL TABLE SSA +(label) @1 +(label) @2 +(label) @begin +(label) @end +(void()) main() +(byte/signed byte/word/signed word/dword/signed dword~) main::$0 +(label) main::@return +(byte*) main::SCREEN +(byte*) main::SCREEN#0 + +Culled Empty Block (label) @2 +Successful SSA optimization Pass2CullEmptyBlocks +Constant (const byte*) main::SCREEN#0 = ((byte*))$400 +Constant (const byte/signed byte/word/signed word/dword/signed dword) main::$0 = 'a'-1 +Successful SSA optimization Pass2ConstantIdentification +Constant inlined main::$0 = (byte) 'a'-(byte/signed byte/word/signed word/dword/signed dword) 1 +Successful SSA optimization Pass2ConstantInlining +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @1 +Adding NOP phi() at start of @end +CALL GRAPH +Calls in [] to main:2 + +Created 0 initial phi equivalence classes +Coalesced down to 0 phi equivalence classes +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @1 +Adding NOP phi() at start of @end + +FINAL CONTROL FLOW GRAPH +@begin: scope:[] from + [0] phi() + to:@1 +@1: scope:[] from @begin + [1] phi() + [2] call main + to:@end +@end: scope:[] from @1 + [3] phi() +main: scope:[main] from @1 + [4] *((const byte*) main::SCREEN#0) ← (byte) 'a'-(byte/signed byte/word/signed word/dword/signed dword) 1 + to:main::@return +main::@return: scope:[main] from main + [5] return + to:@return + + +VARIABLE REGISTER WEIGHTS +(void()) main() +(byte*) main::SCREEN + +Initial phi equivalence classes +Complete equivalence classes + +INITIAL ASM +//SEG0 File Comments +// Tests subtracting a number from a literal char +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" +//SEG2 Global Constants & labels +//SEG3 @begin +bbegin: +//SEG4 [1] phi from @begin to @1 [phi:@begin->@1] +b1_from_bbegin: + jmp b1 +//SEG5 @1 +b1: +//SEG6 [2] call main + jsr main +//SEG7 [3] phi from @1 to @end [phi:@1->@end] +bend_from_b1: + jmp bend +//SEG8 @end +bend: +//SEG9 main +main: { + .label SCREEN = $400 + //SEG10 [4] *((const byte*) main::SCREEN#0) ← (byte) 'a'-(byte/signed byte/word/signed word/dword/signed dword) 1 -- _deref_pbuc1=vbuc2 + lda #'a'-1 + sta SCREEN + jmp breturn + //SEG11 main::@return + breturn: + //SEG12 [5] return + rts +} + +REGISTER UPLIFT POTENTIAL REGISTERS +Statement [4] *((const byte*) main::SCREEN#0) ← (byte) 'a'-(byte/signed byte/word/signed word/dword/signed dword) 1 [ ] ( main:2 [ ] ) always clobbers reg byte a + +REGISTER UPLIFT SCOPES +Uplift Scope [main] +Uplift Scope [] + +Uplifting [main] best 27 combination +Uplifting [] best 27 combination + +ASSEMBLER BEFORE OPTIMIZATION +//SEG0 File Comments +// Tests subtracting a number from a literal char +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" +//SEG2 Global Constants & labels +//SEG3 @begin +bbegin: +//SEG4 [1] phi from @begin to @1 [phi:@begin->@1] +b1_from_bbegin: + jmp b1 +//SEG5 @1 +b1: +//SEG6 [2] call main + jsr main +//SEG7 [3] phi from @1 to @end [phi:@1->@end] +bend_from_b1: + jmp bend +//SEG8 @end +bend: +//SEG9 main +main: { + .label SCREEN = $400 + //SEG10 [4] *((const byte*) main::SCREEN#0) ← (byte) 'a'-(byte/signed byte/word/signed word/dword/signed dword) 1 -- _deref_pbuc1=vbuc2 + lda #'a'-1 + sta SCREEN + jmp breturn + //SEG11 main::@return + breturn: + //SEG12 [5] return + rts +} + +ASSEMBLER OPTIMIZATIONS +Removing instruction jmp b1 +Removing instruction jmp bend +Removing instruction jmp breturn +Succesful ASM optimization Pass5NextJumpElimination +Removing instruction b1_from_bbegin: +Removing instruction b1: +Removing instruction bend_from_b1: +Succesful ASM optimization Pass5RedundantLabelElimination +Removing instruction bend: +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) @begin +(label) @end +(void()) main() +(label) main::@return +(byte*) main::SCREEN +(const byte*) main::SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) $400 + + + +FINAL ASSEMBLER +Score: 12 + +//SEG0 File Comments +// Tests subtracting a number from a literal char +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" +//SEG2 Global Constants & labels +//SEG3 @begin +//SEG4 [1] phi from @begin to @1 [phi:@begin->@1] +//SEG5 @1 +//SEG6 [2] call main +//SEG7 [3] phi from @1 to @end [phi:@1->@end] +//SEG8 @end +//SEG9 main +main: { + .label SCREEN = $400 + //SEG10 [4] *((const byte*) main::SCREEN#0) ← (byte) 'a'-(byte/signed byte/word/signed word/dword/signed dword) 1 -- _deref_pbuc1=vbuc2 + lda #'a'-1 + sta SCREEN + //SEG11 main::@return + //SEG12 [5] return + rts +} + diff --git a/src/test/ref/literal-char-minus-number.sym b/src/test/ref/literal-char-minus-number.sym new file mode 100644 index 000000000..6a928d5b4 --- /dev/null +++ b/src/test/ref/literal-char-minus-number.sym @@ -0,0 +1,8 @@ +(label) @1 +(label) @begin +(label) @end +(void()) main() +(label) main::@return +(byte*) main::SCREEN +(const byte*) main::SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) $400 + diff --git a/src/test/ref/sandbox-ternary-error.asm b/src/test/ref/sandbox-ternary-error.asm new file mode 100644 index 000000000..cf9c393e2 --- /dev/null +++ b/src/test/ref/sandbox-ternary-error.asm @@ -0,0 +1,26 @@ +// Demonstrates error with nested ternary operator +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" +main: { + .label SCREEN = $400 + ldx #0 + b1: + cpx #0 + beq b4 + cpx #1 + beq b2 + lda #'c' + jmp b3 + b2: + lda #'b' + jmp b3 + b4: + lda #'a' + b3: + sta SCREEN + inx + cpx #3 + bne b1 + rts +} diff --git a/src/test/ref/sandbox-ternary-error.cfg b/src/test/ref/sandbox-ternary-error.cfg new file mode 100644 index 000000000..c2d0d8d36 --- /dev/null +++ b/src/test/ref/sandbox-ternary-error.cfg @@ -0,0 +1,34 @@ +@begin: scope:[] from + [0] phi() + to:@1 +@1: scope:[] from @begin + [1] phi() + [2] call main + to:@end +@end: scope:[] from @1 + [3] phi() +main: scope:[main] from @1 + [4] phi() + to:main::@1 +main::@1: scope:[main] from main main::@3 + [5] (byte) main::b#2 ← phi( main/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@3/(byte) main::b#1 ) + [6] if((byte) main::b#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@3 + to:main::@2 +main::@2: scope:[main] from main::@1 + [7] if((byte) main::b#2==(byte/signed byte/word/signed word/dword/signed dword) 1) goto main::@5 + to:main::@4 +main::@4: scope:[main] from main::@2 + [8] phi() + to:main::@5 +main::@5: scope:[main] from main::@2 main::@4 + [9] (byte~) main::$5 ← phi( main::@2/(byte) 'b' main::@4/(byte) 'c' ) + to:main::@3 +main::@3: scope:[main] from main::@1 main::@5 + [10] (byte~) main::$7 ← phi( main::@1/(byte) 'a' main::@5/(byte~) main::$5 ) + [11] *((const byte*) main::SCREEN#0) ← (byte~) main::$7 + [12] (byte) main::b#1 ← ++ (byte) main::b#2 + [13] if((byte) main::b#1!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@3 + [14] return + to:@return diff --git a/src/test/ref/sandbox-ternary-error.log b/src/test/ref/sandbox-ternary-error.log new file mode 100644 index 000000000..fad815c7e --- /dev/null +++ b/src/test/ref/sandbox-ternary-error.log @@ -0,0 +1,988 @@ +PARSING src/test/kc/sandbox-ternary-error.kc +// Demonstrates error with nested ternary operator + +void main(void) { + const byte* SCREEN = 0x0400; + for ( byte b: 0..2 ) { + *SCREEN = (b == 0) ? 'a' : ((b == 1) ? 'b' : 'c'); + } +} + + + + + + + +STATEMENTS +proc (void()) main() + (byte*) main::SCREEN ← (word/signed word/dword/signed dword) $400 + (byte) main:::1::b ← (byte/signed byte/word/signed word/dword/signed dword) 0 +main:::1::@1: + (var) main:::1::$0 ← (byte) main:::1::b == (byte/signed byte/word/signed word/dword/signed dword) 0 + if((var) main:::1::$0) goto main:::1::@2 +main:::1::@3: + (var) main:::1::$1 ← (byte) main:::1::b == (byte/signed byte/word/signed word/dword/signed dword) 1 + if((var) main:::1::$1) goto main:::1::@5 +main:::1::@6: + (var) main:::1::$2 ← (byte) 'c' + goto main:::1::@7 +main:::1::@5: + (var) main:::1::$3 ← (byte) 'b' +main:::1::@7: + (var) main:::1::$4 ← phi( main:::1::@5/(var) main:::1::$3 main:::1::@6/(var) main:::1::$2 ) + (var) main:::1::$5 ← (var) main:::1::$4 + goto main:::1::@4 +main:::1::@2: + (var) main:::1::$6 ← (byte) 'a' +main:::1::@4: + (var) main:::1::$7 ← phi( main:::1::@2/(var) main:::1::$6 main:::1::@7/(var) main:::1::$5 ) + *((byte*) main::SCREEN) ← (var) main:::1::$7 + (byte) main:::1::b ← (byte) main:::1::b + rangenext(0,2) + (var) main:::1::$8 ← (byte) main:::1::b != rangelast(0,2) + if((var) main:::1::$8) goto main:::1::@1 +main::@return: + return +endproc // main() + call main + +SYMBOLS +(label) @1 +(label) @begin +(label) @end +(void()) main() +(bool~) main::$0 +(bool~) main::$1 +(byte~) main::$2 +(byte~) main::$3 +(byte~) main::$4 +(byte~) main::$5 +(byte~) main::$6 +(byte~) main::$7 +(bool~) main::$8 +(label) main::@1 +(label) main::@10 +(label) main::@11 +(label) main::@12 +(label) main::@2 +(label) main::@3 +(label) main::@4 +(label) main::@5 +(label) main::@6 +(label) main::@7 +(label) main::@8 +(label) main::@9 +(label) main::@return +(byte*) main::SCREEN +(byte) main::b + +Promoting word/signed word/dword/signed dword to byte* in main::SCREEN ← ((byte*)) $400 +INITIAL CONTROL FLOW GRAPH +@begin: scope:[] from + to:@1 +main: scope:[main] from + [0] (byte*) main::SCREEN ← ((byte*)) (word/signed word/dword/signed dword) $400 + [1] (byte) main::b ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:main::@1 +main::@1: scope:[main] from main main::@4 + [2] (bool~) main::$0 ← (byte) main::b == (byte/signed byte/word/signed word/dword/signed dword) 0 + [3] if((bool~) main::$0) goto main::@2 + to:main::@8 +main::@2: scope:[main] from main::@1 main::@11 + [4] (byte~) main::$6 ← (byte) 'a' + to:main::@4 +main::@8: scope:[main] from main::@1 + to:main::@3 +main::@3: scope:[main] from main::@8 + [5] (bool~) main::$1 ← (byte) main::b == (byte/signed byte/word/signed word/dword/signed dword) 1 + [6] if((bool~) main::$1) goto main::@5 + to:main::@9 +main::@5: scope:[main] from main::@10 main::@3 + [7] (byte~) main::$3 ← (byte) 'b' + to:main::@7 +main::@9: scope:[main] from main::@3 + to:main::@6 +main::@6: scope:[main] from main::@9 + [8] (byte~) main::$2 ← (byte) 'c' + to:main::@7 +main::@7: scope:[main] from main::@5 main::@6 + [9] (byte~) main::$4 ← phi( main::@5/(byte~) main::$3 main::@6/(byte~) main::$2 ) + [10] (byte~) main::$5 ← (byte~) main::$4 + to:main::@4 +main::@10: scope:[main] from + to:main::@5 +main::@4: scope:[main] from main::@2 main::@7 + [11] (byte~) main::$7 ← phi( main::@2/(byte~) main::$6 main::@7/(byte~) main::$5 ) + [12] *((byte*) main::SCREEN) ← (byte~) main::$7 + [13] (byte) main::b ← (byte) main::b + rangenext(0,2) + [14] (bool~) main::$8 ← (byte) main::b != rangelast(0,2) + [15] if((bool~) main::$8) goto main::@1 + to:main::@12 +main::@11: scope:[main] from + to:main::@2 +main::@12: scope:[main] from main::@4 + to:main::@return +main::@return: scope:[main] from main::@12 + [16] return + to:@return +@1: scope:[] from @begin + [17] call main + to:@end +@end: scope:[] from @1 + +Removing empty block main::@8 +Removing empty block main::@9 +Removing empty block main::@10 +Removing empty block main::@11 +Removing empty block main::@12 +PROCEDURE MODIFY VARIABLE ANALYSIS + +Completing Phi functions... +Completing Phi functions... +Completing Phi functions... + +CONTROL FLOW GRAPH SSA +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + (byte*) main::SCREEN#0 ← ((byte*)) (word/signed word/dword/signed dword) $400 + (byte) main::b#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:main::@1 +main::@1: scope:[main] from main main::@4 + (byte) main::b#2 ← phi( main/(byte) main::b#0 main::@4/(byte) main::b#1 ) + (bool~) main::$0 ← (byte) main::b#2 == (byte/signed byte/word/signed word/dword/signed dword) 0 + if((bool~) main::$0) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 + (byte) main::b#5 ← phi( main::@1/(byte) main::b#2 ) + (byte~) main::$6 ← (byte) 'a' + to:main::@4 +main::@3: scope:[main] from main::@1 + (byte) main::b#3 ← phi( main::@1/(byte) main::b#2 ) + (bool~) main::$1 ← (byte) main::b#3 == (byte/signed byte/word/signed word/dword/signed dword) 1 + if((bool~) main::$1) goto main::@5 + to:main::@6 +main::@5: scope:[main] from main::@3 + (byte) main::b#7 ← phi( main::@3/(byte) main::b#3 ) + (byte~) main::$3 ← (byte) 'b' + to:main::@7 +main::@6: scope:[main] from main::@3 + (byte) main::b#8 ← phi( main::@3/(byte) main::b#3 ) + (byte~) main::$2 ← (byte) 'c' + to:main::@7 +main::@7: scope:[main] from main::@5 main::@6 + (byte) main::b#6 ← phi( main::@5/(byte) main::b#7 main::@6/(byte) main::b#8 ) + (byte~) main::$4 ← phi( main::@5/(byte~) main::$3 main::@6/(byte~) main::$2 ) + (byte~) main::$5 ← (byte~) main::$4 + to:main::@4 +main::@4: scope:[main] from main::@2 main::@7 + (byte) main::b#4 ← phi( main::@2/(byte) main::b#5 main::@7/(byte) main::b#6 ) + (byte~) main::$7 ← phi( main::@2/(byte~) main::$6 main::@7/(byte~) main::$5 ) + *((byte*) main::SCREEN#0) ← (byte~) main::$7 + (byte) main::b#1 ← (byte) main::b#4 + rangenext(0,2) + (bool~) main::$8 ← (byte) main::b#1 != rangelast(0,2) + if((bool~) main::$8) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@4 + return + to:@return +@1: scope:[] from @begin + call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +SYMBOL TABLE SSA +(label) @1 +(label) @2 +(label) @begin +(label) @end +(void()) main() +(bool~) main::$0 +(bool~) main::$1 +(byte~) main::$2 +(byte~) main::$3 +(byte~) main::$4 +(byte~) main::$5 +(byte~) main::$6 +(byte~) main::$7 +(bool~) main::$8 +(label) main::@1 +(label) main::@2 +(label) main::@3 +(label) main::@4 +(label) main::@5 +(label) main::@6 +(label) main::@7 +(label) main::@return +(byte*) main::SCREEN +(byte*) main::SCREEN#0 +(byte) main::b +(byte) main::b#0 +(byte) main::b#1 +(byte) main::b#2 +(byte) main::b#3 +(byte) main::b#4 +(byte) main::b#5 +(byte) main::b#6 +(byte) main::b#7 +(byte) main::b#8 + +Culled Empty Block (label) @2 +Successful SSA optimization Pass2CullEmptyBlocks +CONTROL FLOW GRAPH +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + (byte*) main::SCREEN#0 ← ((byte*)) (word/signed word/dword/signed dword) $400 + (byte) main::b#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:main::@1 +main::@1: scope:[main] from main main::@4 + (byte) main::b#2 ← phi( main/(byte) main::b#0 main::@4/(byte) main::b#1 ) + (bool~) main::$0 ← (byte) main::b#2 == (byte/signed byte/word/signed word/dword/signed dword) 0 + if((bool~) main::$0) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 + (byte) main::b#5 ← phi( main::@1/(byte) main::b#2 ) + (byte~) main::$6 ← (byte) 'a' + to:main::@4 +main::@3: scope:[main] from main::@1 + (byte) main::b#3 ← phi( main::@1/(byte) main::b#2 ) + (bool~) main::$1 ← (byte) main::b#3 == (byte/signed byte/word/signed word/dword/signed dword) 1 + if((bool~) main::$1) goto main::@5 + to:main::@6 +main::@5: scope:[main] from main::@3 + (byte) main::b#7 ← phi( main::@3/(byte) main::b#3 ) + (byte~) main::$3 ← (byte) 'b' + to:main::@7 +main::@6: scope:[main] from main::@3 + (byte) main::b#8 ← phi( main::@3/(byte) main::b#3 ) + (byte~) main::$2 ← (byte) 'c' + to:main::@7 +main::@7: scope:[main] from main::@5 main::@6 + (byte) main::b#6 ← phi( main::@5/(byte) main::b#7 main::@6/(byte) main::b#8 ) + (byte~) main::$4 ← phi( main::@5/(byte~) main::$3 main::@6/(byte~) main::$2 ) + (byte~) main::$5 ← (byte~) main::$4 + to:main::@4 +main::@4: scope:[main] from main::@2 main::@7 + (byte) main::b#4 ← phi( main::@2/(byte) main::b#5 main::@7/(byte) main::b#6 ) + (byte~) main::$7 ← phi( main::@2/(byte~) main::$6 main::@7/(byte~) main::$5 ) + *((byte*) main::SCREEN#0) ← (byte~) main::$7 + (byte) main::b#1 ← (byte) main::b#4 + rangenext(0,2) + (bool~) main::$8 ← (byte) main::b#1 != rangelast(0,2) + if((bool~) main::$8) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@4 + return + to:@return +@1: scope:[] from @begin + call main + to:@end +@end: scope:[] from @1 + +Alias (byte) main::b#2 = (byte) main::b#5 (byte) main::b#3 (byte) main::b#7 (byte) main::b#8 +Alias (byte~) main::$5 = (byte~) main::$4 +Successful SSA optimization Pass2AliasElimination +CONTROL FLOW GRAPH +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + [0] (byte*) main::SCREEN#0 ← ((byte*)) (word/signed word/dword/signed dword) $400 + [1] (byte) main::b#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:main::@1 +main::@1: scope:[main] from main main::@4 + [2] (byte) main::b#2 ← phi( main/(byte) main::b#0 main::@4/(byte) main::b#1 ) + [3] (bool~) main::$0 ← (byte) main::b#2 == (byte/signed byte/word/signed word/dword/signed dword) 0 + [4] if((bool~) main::$0) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 + [6] (byte~) main::$6 ← (byte) 'a' + to:main::@4 +main::@3: scope:[main] from main::@1 + [8] (bool~) main::$1 ← (byte) main::b#2 == (byte/signed byte/word/signed word/dword/signed dword) 1 + [9] if((bool~) main::$1) goto main::@5 + to:main::@6 +main::@5: scope:[main] from main::@3 + [11] (byte~) main::$3 ← (byte) 'b' + to:main::@7 +main::@6: scope:[main] from main::@3 + [13] (byte~) main::$2 ← (byte) 'c' + to:main::@7 +main::@7: scope:[main] from main::@5 main::@6 + [14] (byte) main::b#6 ← phi( main::@5/(byte) main::b#2 main::@6/(byte) main::b#2 ) + [14] (byte~) main::$5 ← phi( main::@5/(byte~) main::$3 main::@6/(byte~) main::$2 ) + to:main::@4 +main::@4: scope:[main] from main::@2 main::@7 + [16] (byte) main::b#4 ← phi( main::@2/(byte) main::b#2 main::@7/(byte) main::b#6 ) + [16] (byte~) main::$7 ← phi( main::@2/(byte~) main::$6 main::@7/(byte~) main::$5 ) + [17] *((byte*) main::SCREEN#0) ← (byte~) main::$7 + [18] (byte) main::b#1 ← (byte) main::b#4 + rangenext(0,2) + [19] (bool~) main::$8 ← (byte) main::b#1 != rangelast(0,2) + [20] if((bool~) main::$8) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@4 + [21] return + to:@return +@1: scope:[] from @begin + [22] call main + to:@end +@end: scope:[] from @1 + +Alias (byte) main::b#2 = (byte) main::b#6 +Successful SSA optimization Pass2AliasElimination +CONTROL FLOW GRAPH +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + [0] (byte*) main::SCREEN#0 ← ((byte*)) (word/signed word/dword/signed dword) $400 + [1] (byte) main::b#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:main::@1 +main::@1: scope:[main] from main main::@4 + [2] (byte) main::b#2 ← phi( main/(byte) main::b#0 main::@4/(byte) main::b#1 ) + [3] (bool~) main::$0 ← (byte) main::b#2 == (byte/signed byte/word/signed word/dword/signed dword) 0 + [4] if((bool~) main::$0) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 + [6] (byte~) main::$6 ← (byte) 'a' + to:main::@4 +main::@3: scope:[main] from main::@1 + [8] (bool~) main::$1 ← (byte) main::b#2 == (byte/signed byte/word/signed word/dword/signed dword) 1 + [9] if((bool~) main::$1) goto main::@5 + to:main::@6 +main::@5: scope:[main] from main::@3 + [11] (byte~) main::$3 ← (byte) 'b' + to:main::@7 +main::@6: scope:[main] from main::@3 + [13] (byte~) main::$2 ← (byte) 'c' + to:main::@7 +main::@7: scope:[main] from main::@5 main::@6 + [14] (byte~) main::$5 ← phi( main::@5/(byte~) main::$3 main::@6/(byte~) main::$2 ) + to:main::@4 +main::@4: scope:[main] from main::@2 main::@7 + [16] (byte) main::b#4 ← phi( main::@2/(byte) main::b#2 main::@7/(byte) main::b#2 ) + [16] (byte~) main::$7 ← phi( main::@2/(byte~) main::$6 main::@7/(byte~) main::$5 ) + [17] *((byte*) main::SCREEN#0) ← (byte~) main::$7 + [18] (byte) main::b#1 ← (byte) main::b#4 + rangenext(0,2) + [19] (bool~) main::$8 ← (byte) main::b#1 != rangelast(0,2) + [20] if((bool~) main::$8) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@4 + [21] return + to:@return +@1: scope:[] from @begin + [22] call main + to:@end +@end: scope:[] from @1 + +Alias (byte) main::b#2 = (byte) main::b#4 +Successful SSA optimization Pass2AliasElimination +CONTROL FLOW GRAPH +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + [0] (byte*) main::SCREEN#0 ← ((byte*)) (word/signed word/dword/signed dword) $400 + [1] (byte) main::b#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:main::@1 +main::@1: scope:[main] from main main::@4 + [2] (byte) main::b#2 ← phi( main/(byte) main::b#0 main::@4/(byte) main::b#1 ) + [3] (bool~) main::$0 ← (byte) main::b#2 == (byte/signed byte/word/signed word/dword/signed dword) 0 + [4] if((bool~) main::$0) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 + [6] (byte~) main::$6 ← (byte) 'a' + to:main::@4 +main::@3: scope:[main] from main::@1 + [8] (bool~) main::$1 ← (byte) main::b#2 == (byte/signed byte/word/signed word/dword/signed dword) 1 + [9] if((bool~) main::$1) goto main::@5 + to:main::@6 +main::@5: scope:[main] from main::@3 + [11] (byte~) main::$3 ← (byte) 'b' + to:main::@7 +main::@6: scope:[main] from main::@3 + [13] (byte~) main::$2 ← (byte) 'c' + to:main::@7 +main::@7: scope:[main] from main::@5 main::@6 + [14] (byte~) main::$5 ← phi( main::@5/(byte~) main::$3 main::@6/(byte~) main::$2 ) + to:main::@4 +main::@4: scope:[main] from main::@2 main::@7 + [16] (byte~) main::$7 ← phi( main::@2/(byte~) main::$6 main::@7/(byte~) main::$5 ) + [17] *((byte*) main::SCREEN#0) ← (byte~) main::$7 + [18] (byte) main::b#1 ← (byte) main::b#2 + rangenext(0,2) + [19] (bool~) main::$8 ← (byte) main::b#1 != rangelast(0,2) + [20] if((bool~) main::$8) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@4 + [21] return + to:@return +@1: scope:[] from @begin + [22] call main + to:@end +@end: scope:[] from @1 + +Simple Condition (bool~) main::$0 [4] if((byte) main::b#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@2 +Simple Condition (bool~) main::$1 [9] if((byte) main::b#2==(byte/signed byte/word/signed word/dword/signed dword) 1) goto main::@5 +Simple Condition (bool~) main::$8 [20] if((byte) main::b#1!=rangelast(0,2)) goto main::@1 +Successful SSA optimization Pass2ConditionalJumpSimplification +CONTROL FLOW GRAPH +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + [0] (byte*) main::SCREEN#0 ← ((byte*)) (word/signed word/dword/signed dword) $400 + [1] (byte) main::b#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:main::@1 +main::@1: scope:[main] from main main::@4 + [2] (byte) main::b#2 ← phi( main/(byte) main::b#0 main::@4/(byte) main::b#1 ) + [4] if((byte) main::b#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 + [6] (byte~) main::$6 ← (byte) 'a' + to:main::@4 +main::@3: scope:[main] from main::@1 + [9] if((byte) main::b#2==(byte/signed byte/word/signed word/dword/signed dword) 1) goto main::@5 + to:main::@6 +main::@5: scope:[main] from main::@3 + [11] (byte~) main::$3 ← (byte) 'b' + to:main::@7 +main::@6: scope:[main] from main::@3 + [13] (byte~) main::$2 ← (byte) 'c' + to:main::@7 +main::@7: scope:[main] from main::@5 main::@6 + [14] (byte~) main::$5 ← phi( main::@5/(byte~) main::$3 main::@6/(byte~) main::$2 ) + to:main::@4 +main::@4: scope:[main] from main::@2 main::@7 + [16] (byte~) main::$7 ← phi( main::@2/(byte~) main::$6 main::@7/(byte~) main::$5 ) + [17] *((byte*) main::SCREEN#0) ← (byte~) main::$7 + [18] (byte) main::b#1 ← (byte) main::b#2 + rangenext(0,2) + [20] if((byte) main::b#1!=rangelast(0,2)) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@4 + [21] return + to:@return +@1: scope:[] from @begin + [22] call main + to:@end +@end: scope:[] from @1 + +Constant (const byte*) main::SCREEN#0 = ((byte*))$400 +Constant (const byte) main::b#0 = 0 +Constant (const byte) main::$6 = 'a' +Constant (const byte) main::$3 = 'b' +Constant (const byte) main::$2 = 'c' +Successful SSA optimization Pass2ConstantIdentification +CONTROL FLOW GRAPH +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main main::@4 + [2] (byte) main::b#2 ← phi( main/(const byte) main::b#0 main::@4/(byte) main::b#1 ) + [4] if((byte) main::b#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 + to:main::@4 +main::@3: scope:[main] from main::@1 + [9] if((byte) main::b#2==(byte/signed byte/word/signed word/dword/signed dword) 1) goto main::@5 + to:main::@6 +main::@5: scope:[main] from main::@3 + to:main::@7 +main::@6: scope:[main] from main::@3 + to:main::@7 +main::@7: scope:[main] from main::@5 main::@6 + [14] (byte~) main::$5 ← phi( main::@5/(const byte) main::$3 main::@6/(const byte) main::$2 ) + to:main::@4 +main::@4: scope:[main] from main::@2 main::@7 + [16] (byte~) main::$7 ← phi( main::@2/(const byte) main::$6 main::@7/(byte~) main::$5 ) + [17] *((const byte*) main::SCREEN#0) ← (byte~) main::$7 + [18] (byte) main::b#1 ← (byte) main::b#2 + rangenext(0,2) + [20] if((byte) main::b#1!=rangelast(0,2)) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@4 + [21] return + to:@return +@1: scope:[] from @begin + [22] call main + to:@end +@end: scope:[] from @1 + +Resolved ranged next value main::b#1 ← ++ main::b#2 to ++ +Resolved ranged comparison value if(main::b#1!=rangelast(0,2)) goto main::@1 to (byte/signed byte/word/signed word/dword/signed dword) 3 +Culled Empty Block (label) main::@2 +Culled Empty Block (label) main::@5 +Successful SSA optimization Pass2CullEmptyBlocks +CONTROL FLOW GRAPH +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main main::@4 + (byte) main::b#2 ← phi( main/(const byte) main::b#0 main::@4/(byte) main::b#1 ) + if((byte) main::b#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@4 + to:main::@3 +main::@3: scope:[main] from main::@1 + if((byte) main::b#2==(byte/signed byte/word/signed word/dword/signed dword) 1) goto main::@7 + to:main::@6 +main::@6: scope:[main] from main::@3 + to:main::@7 +main::@7: scope:[main] from main::@3 main::@6 + (byte~) main::$5 ← phi( main::@3/(const byte) main::$3 main::@6/(const byte) main::$2 ) + to:main::@4 +main::@4: scope:[main] from main::@1 main::@7 + (byte~) main::$7 ← phi( main::@1/(const byte) main::$6 main::@7/(byte~) main::$5 ) + *((const byte*) main::SCREEN#0) ← (byte~) main::$7 + (byte) main::b#1 ← ++ (byte) main::b#2 + if((byte) main::b#1!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@4 + return + to:@return +@1: scope:[] from @begin + call main + to:@end +@end: scope:[] from @1 + +Inlining constant with var siblings (const byte) main::b#0 +Constant inlined main::$6 = (byte) 'a' +Constant inlined main::$3 = (byte) 'b' +Constant inlined main::b#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined main::$2 = (byte) 'c' +Successful SSA optimization Pass2ConstantInlining +CONTROL FLOW GRAPH +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + to:main::@1 +main::@1: scope:[main] from main main::@4 + [0] (byte) main::b#2 ← phi( main/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@4/(byte) main::b#1 ) + [1] if((byte) main::b#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@4 + to:main::@3 +main::@3: scope:[main] from main::@1 + [2] if((byte) main::b#2==(byte/signed byte/word/signed word/dword/signed dword) 1) goto main::@7 + to:main::@6 +main::@6: scope:[main] from main::@3 + to:main::@7 +main::@7: scope:[main] from main::@3 main::@6 + [3] (byte~) main::$5 ← phi( main::@3/(byte) 'b' main::@6/(byte) 'c' ) + to:main::@4 +main::@4: scope:[main] from main::@1 main::@7 + [4] (byte~) main::$7 ← phi( main::@1/(byte) 'a' main::@7/(byte~) main::$5 ) + [5] *((const byte*) main::SCREEN#0) ← (byte~) main::$7 + [6] (byte) main::b#1 ← ++ (byte) main::b#2 + [7] if((byte) main::b#1!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@4 + [8] return + to:@return +@1: scope:[] from @begin + [9] call main + to:@end +@end: scope:[] from @1 + +Added new block during phi lifting main::@13(between main::@4 and main::@1) +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @1 +Adding NOP phi() at start of @end +Adding NOP phi() at start of main +Adding NOP phi() at start of main::@6 +CALL GRAPH +Calls in [] to main:2 + +Created 3 initial phi equivalence classes +Coalesced [10] main::$9 ← main::$5 +Coalesced [16] main::b#9 ← main::b#1 +Coalesced down to 2 phi equivalence classes +Culled Empty Block (label) main::@13 +Renumbering block main::@3 to main::@2 +Renumbering block main::@4 to main::@3 +Renumbering block main::@6 to main::@4 +Renumbering block main::@7 to main::@5 +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @1 +Adding NOP phi() at start of @end +Adding NOP phi() at start of main +Adding NOP phi() at start of main::@4 + +FINAL CONTROL FLOW GRAPH +@begin: scope:[] from + [0] phi() + to:@1 +@1: scope:[] from @begin + [1] phi() + [2] call main + to:@end +@end: scope:[] from @1 + [3] phi() +main: scope:[main] from @1 + [4] phi() + to:main::@1 +main::@1: scope:[main] from main main::@3 + [5] (byte) main::b#2 ← phi( main/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@3/(byte) main::b#1 ) + [6] if((byte) main::b#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@3 + to:main::@2 +main::@2: scope:[main] from main::@1 + [7] if((byte) main::b#2==(byte/signed byte/word/signed word/dword/signed dword) 1) goto main::@5 + to:main::@4 +main::@4: scope:[main] from main::@2 + [8] phi() + to:main::@5 +main::@5: scope:[main] from main::@2 main::@4 + [9] (byte~) main::$5 ← phi( main::@2/(byte) 'b' main::@4/(byte) 'c' ) + to:main::@3 +main::@3: scope:[main] from main::@1 main::@5 + [10] (byte~) main::$7 ← phi( main::@1/(byte) 'a' main::@5/(byte~) main::$5 ) + [11] *((const byte*) main::SCREEN#0) ← (byte~) main::$7 + [12] (byte) main::b#1 ← ++ (byte) main::b#2 + [13] if((byte) main::b#1!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@3 + [14] return + to:@return + + +VARIABLE REGISTER WEIGHTS +(void()) main() +(byte~) main::$5 11.0 +(byte~) main::$7 22.0 +(byte*) main::SCREEN +(byte) main::b +(byte) main::b#1 16.5 +(byte) main::b#2 6.285714285714286 + +Initial phi equivalence classes +[ main::b#2 main::b#1 ] +[ main::$7 main::$5 ] +Complete equivalence classes +[ main::b#2 main::b#1 ] +[ main::$7 main::$5 ] +Allocated zp ZP_BYTE:2 [ main::b#2 main::b#1 ] +Allocated zp ZP_BYTE:3 [ main::$7 main::$5 ] + +INITIAL ASM +//SEG0 File Comments +// Demonstrates error with nested ternary operator +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" +//SEG2 Global Constants & labels +//SEG3 @begin +bbegin: +//SEG4 [1] phi from @begin to @1 [phi:@begin->@1] +b1_from_bbegin: + jmp b1 +//SEG5 @1 +b1: +//SEG6 [2] call main +//SEG7 [4] phi from @1 to main [phi:@1->main] +main_from_b1: + jsr main +//SEG8 [3] phi from @1 to @end [phi:@1->@end] +bend_from_b1: + jmp bend +//SEG9 @end +bend: +//SEG10 main +main: { + .label SCREEN = $400 + .label _5 = 3 + .label _7 = 3 + .label b = 2 + //SEG11 [5] phi from main to main::@1 [phi:main->main::@1] + b1_from_main: + //SEG12 [5] phi (byte) main::b#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1 + lda #0 + sta b + jmp b1 + //SEG13 [5] phi from main::@3 to main::@1 [phi:main::@3->main::@1] + b1_from_b3: + //SEG14 [5] phi (byte) main::b#2 = (byte) main::b#1 [phi:main::@3->main::@1#0] -- register_copy + jmp b1 + //SEG15 main::@1 + b1: + //SEG16 [6] if((byte) main::b#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@3 -- vbuz1_eq_0_then_la1 + lda b + cmp #0 + beq b3_from_b1 + jmp b2 + //SEG17 main::@2 + b2: + //SEG18 [7] if((byte) main::b#2==(byte/signed byte/word/signed word/dword/signed dword) 1) goto main::@5 -- vbuz1_eq_vbuc1_then_la1 + lda #1 + cmp b + beq b5_from_b2 + //SEG19 [8] phi from main::@2 to main::@4 [phi:main::@2->main::@4] + b4_from_b2: + jmp b4 + //SEG20 main::@4 + b4: + //SEG21 [9] phi from main::@4 to main::@5 [phi:main::@4->main::@5] + b5_from_b4: + //SEG22 [9] phi (byte~) main::$5 = (byte) 'c' [phi:main::@4->main::@5#0] -- vbuz1=vbuc1 + lda #'c' + sta _5 + jmp b5 + //SEG23 [9] phi from main::@2 to main::@5 [phi:main::@2->main::@5] + b5_from_b2: + //SEG24 [9] phi (byte~) main::$5 = (byte) 'b' [phi:main::@2->main::@5#0] -- vbuz1=vbuc1 + lda #'b' + sta _5 + jmp b5 + //SEG25 main::@5 + b5: + //SEG26 [10] phi from main::@5 to main::@3 [phi:main::@5->main::@3] + b3_from_b5: + //SEG27 [10] phi (byte~) main::$7 = (byte~) main::$5 [phi:main::@5->main::@3#0] -- register_copy + jmp b3 + //SEG28 [10] phi from main::@1 to main::@3 [phi:main::@1->main::@3] + b3_from_b1: + //SEG29 [10] phi (byte~) main::$7 = (byte) 'a' [phi:main::@1->main::@3#0] -- vbuz1=vbuc1 + lda #'a' + sta _7 + jmp b3 + //SEG30 main::@3 + b3: + //SEG31 [11] *((const byte*) main::SCREEN#0) ← (byte~) main::$7 -- _deref_pbuc1=vbuz1 + lda _7 + sta SCREEN + //SEG32 [12] (byte) main::b#1 ← ++ (byte) main::b#2 -- vbuz1=_inc_vbuz1 + inc b + //SEG33 [13] if((byte) main::b#1!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 + lda #3 + cmp b + bne b1_from_b3 + jmp breturn + //SEG34 main::@return + breturn: + //SEG35 [14] return + rts +} + +REGISTER UPLIFT POTENTIAL REGISTERS +Potential registers zp ZP_BYTE:2 [ main::b#2 main::b#1 ] : zp ZP_BYTE:2 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:3 [ main::$7 main::$5 ] : zp ZP_BYTE:3 , reg byte a , reg byte x , reg byte y , + +REGISTER UPLIFT SCOPES +Uplift Scope [main] 33: zp ZP_BYTE:3 [ main::$7 main::$5 ] 22.79: zp ZP_BYTE:2 [ main::b#2 main::b#1 ] +Uplift Scope [] + +Uplifting [main] best 563 combination reg byte a [ main::$7 main::$5 ] reg byte x [ main::b#2 main::b#1 ] +Uplifting [] best 563 combination + +ASSEMBLER BEFORE OPTIMIZATION +//SEG0 File Comments +// Demonstrates error with nested ternary operator +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" +//SEG2 Global Constants & labels +//SEG3 @begin +bbegin: +//SEG4 [1] phi from @begin to @1 [phi:@begin->@1] +b1_from_bbegin: + jmp b1 +//SEG5 @1 +b1: +//SEG6 [2] call main +//SEG7 [4] phi from @1 to main [phi:@1->main] +main_from_b1: + jsr main +//SEG8 [3] phi from @1 to @end [phi:@1->@end] +bend_from_b1: + jmp bend +//SEG9 @end +bend: +//SEG10 main +main: { + .label SCREEN = $400 + //SEG11 [5] phi from main to main::@1 [phi:main->main::@1] + b1_from_main: + //SEG12 [5] phi (byte) main::b#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 + ldx #0 + jmp b1 + //SEG13 [5] phi from main::@3 to main::@1 [phi:main::@3->main::@1] + b1_from_b3: + //SEG14 [5] phi (byte) main::b#2 = (byte) main::b#1 [phi:main::@3->main::@1#0] -- register_copy + jmp b1 + //SEG15 main::@1 + b1: + //SEG16 [6] if((byte) main::b#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@3 -- vbuxx_eq_0_then_la1 + cpx #0 + beq b3_from_b1 + jmp b2 + //SEG17 main::@2 + b2: + //SEG18 [7] if((byte) main::b#2==(byte/signed byte/word/signed word/dword/signed dword) 1) goto main::@5 -- vbuxx_eq_vbuc1_then_la1 + cpx #1 + beq b5_from_b2 + //SEG19 [8] phi from main::@2 to main::@4 [phi:main::@2->main::@4] + b4_from_b2: + jmp b4 + //SEG20 main::@4 + b4: + //SEG21 [9] phi from main::@4 to main::@5 [phi:main::@4->main::@5] + b5_from_b4: + //SEG22 [9] phi (byte~) main::$5 = (byte) 'c' [phi:main::@4->main::@5#0] -- vbuaa=vbuc1 + lda #'c' + jmp b5 + //SEG23 [9] phi from main::@2 to main::@5 [phi:main::@2->main::@5] + b5_from_b2: + //SEG24 [9] phi (byte~) main::$5 = (byte) 'b' [phi:main::@2->main::@5#0] -- vbuaa=vbuc1 + lda #'b' + jmp b5 + //SEG25 main::@5 + b5: + //SEG26 [10] phi from main::@5 to main::@3 [phi:main::@5->main::@3] + b3_from_b5: + //SEG27 [10] phi (byte~) main::$7 = (byte~) main::$5 [phi:main::@5->main::@3#0] -- register_copy + jmp b3 + //SEG28 [10] phi from main::@1 to main::@3 [phi:main::@1->main::@3] + b3_from_b1: + //SEG29 [10] phi (byte~) main::$7 = (byte) 'a' [phi:main::@1->main::@3#0] -- vbuaa=vbuc1 + lda #'a' + jmp b3 + //SEG30 main::@3 + b3: + //SEG31 [11] *((const byte*) main::SCREEN#0) ← (byte~) main::$7 -- _deref_pbuc1=vbuaa + sta SCREEN + //SEG32 [12] (byte) main::b#1 ← ++ (byte) main::b#2 -- vbuxx=_inc_vbuxx + inx + //SEG33 [13] if((byte) main::b#1!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto main::@1 -- vbuxx_neq_vbuc1_then_la1 + cpx #3 + bne b1_from_b3 + jmp breturn + //SEG34 main::@return + breturn: + //SEG35 [14] return + rts +} + +ASSEMBLER OPTIMIZATIONS +Removing instruction jmp b1 +Removing instruction jmp bend +Removing instruction jmp b1 +Removing instruction jmp b2 +Removing instruction jmp b4 +Removing instruction jmp b5 +Removing instruction jmp b3 +Removing instruction jmp breturn +Succesful ASM optimization Pass5NextJumpElimination +Replacing label b1_from_b3 with b1 +Removing instruction b1_from_bbegin: +Removing instruction b1: +Removing instruction main_from_b1: +Removing instruction bend_from_b1: +Removing instruction b1_from_b3: +Removing instruction b4_from_b2: +Removing instruction b5_from_b4: +Removing instruction b3_from_b5: +Succesful ASM optimization Pass5RedundantLabelElimination +Removing instruction bend: +Removing instruction b1_from_main: +Removing instruction b2: +Removing instruction b4: +Removing instruction breturn: +Succesful ASM optimization Pass5UnusedLabelElimination +Updating BasicUpstart to call main directly +Removing instruction jsr main +Succesful ASM optimization Pass5SkipBegin +Skipping double jump to b3 in jmp b5 +Succesful ASM optimization Pass5DoubleJumpElimination +Relabelling long label b5_from_b2 to b2 +Relabelling long label b3_from_b1 to b4 +Succesful ASM optimization Pass5RelabelLongLabels +Removing instruction jmp b1 +Succesful ASM optimization Pass5NextJumpElimination +Removing instruction bbegin: +Removing instruction b5: +Succesful ASM optimization Pass5UnusedLabelElimination + +FINAL SYMBOL TABLE +(label) @1 +(label) @begin +(label) @end +(void()) main() +(byte~) main::$5 reg byte a 11.0 +(byte~) main::$7 reg byte a 22.0 +(label) main::@1 +(label) main::@2 +(label) main::@3 +(label) main::@4 +(label) main::@5 +(label) main::@return +(byte*) main::SCREEN +(const byte*) main::SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) $400 +(byte) main::b +(byte) main::b#1 reg byte x 16.5 +(byte) main::b#2 reg byte x 6.285714285714286 + +reg byte x [ main::b#2 main::b#1 ] +reg byte a [ main::$7 main::$5 ] + + +FINAL ASSEMBLER +Score: 341 + +//SEG0 File Comments +// Demonstrates error with nested ternary operator +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" +//SEG2 Global Constants & labels +//SEG3 @begin +//SEG4 [1] phi from @begin to @1 [phi:@begin->@1] +//SEG5 @1 +//SEG6 [2] call main +//SEG7 [4] phi from @1 to main [phi:@1->main] +//SEG8 [3] phi from @1 to @end [phi:@1->@end] +//SEG9 @end +//SEG10 main +main: { + .label SCREEN = $400 + //SEG11 [5] phi from main to main::@1 [phi:main->main::@1] + //SEG12 [5] phi (byte) main::b#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 + ldx #0 + //SEG13 [5] phi from main::@3 to main::@1 [phi:main::@3->main::@1] + //SEG14 [5] phi (byte) main::b#2 = (byte) main::b#1 [phi:main::@3->main::@1#0] -- register_copy + //SEG15 main::@1 + b1: + //SEG16 [6] if((byte) main::b#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@3 -- vbuxx_eq_0_then_la1 + cpx #0 + beq b4 + //SEG17 main::@2 + //SEG18 [7] if((byte) main::b#2==(byte/signed byte/word/signed word/dword/signed dword) 1) goto main::@5 -- vbuxx_eq_vbuc1_then_la1 + cpx #1 + beq b2 + //SEG19 [8] phi from main::@2 to main::@4 [phi:main::@2->main::@4] + //SEG20 main::@4 + //SEG21 [9] phi from main::@4 to main::@5 [phi:main::@4->main::@5] + //SEG22 [9] phi (byte~) main::$5 = (byte) 'c' [phi:main::@4->main::@5#0] -- vbuaa=vbuc1 + lda #'c' + jmp b3 + //SEG23 [9] phi from main::@2 to main::@5 [phi:main::@2->main::@5] + b2: + //SEG24 [9] phi (byte~) main::$5 = (byte) 'b' [phi:main::@2->main::@5#0] -- vbuaa=vbuc1 + lda #'b' + //SEG25 main::@5 + //SEG26 [10] phi from main::@5 to main::@3 [phi:main::@5->main::@3] + //SEG27 [10] phi (byte~) main::$7 = (byte~) main::$5 [phi:main::@5->main::@3#0] -- register_copy + jmp b3 + //SEG28 [10] phi from main::@1 to main::@3 [phi:main::@1->main::@3] + b4: + //SEG29 [10] phi (byte~) main::$7 = (byte) 'a' [phi:main::@1->main::@3#0] -- vbuaa=vbuc1 + lda #'a' + //SEG30 main::@3 + b3: + //SEG31 [11] *((const byte*) main::SCREEN#0) ← (byte~) main::$7 -- _deref_pbuc1=vbuaa + sta SCREEN + //SEG32 [12] (byte) main::b#1 ← ++ (byte) main::b#2 -- vbuxx=_inc_vbuxx + inx + //SEG33 [13] if((byte) main::b#1!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto main::@1 -- vbuxx_neq_vbuc1_then_la1 + cpx #3 + bne b1 + //SEG34 main::@return + //SEG35 [14] return + rts +} + diff --git a/src/test/ref/sandbox-ternary-error.sym b/src/test/ref/sandbox-ternary-error.sym new file mode 100644 index 000000000..9f605b4b9 --- /dev/null +++ b/src/test/ref/sandbox-ternary-error.sym @@ -0,0 +1,20 @@ +(label) @1 +(label) @begin +(label) @end +(void()) main() +(byte~) main::$5 reg byte a 11.0 +(byte~) main::$7 reg byte a 22.0 +(label) main::@1 +(label) main::@2 +(label) main::@3 +(label) main::@4 +(label) main::@5 +(label) main::@return +(byte*) main::SCREEN +(const byte*) main::SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) $400 +(byte) main::b +(byte) main::b#1 reg byte x 16.5 +(byte) main::b#2 reg byte x 6.285714285714286 + +reg byte x [ main::b#2 main::b#1 ] +reg byte a [ main::$7 main::$5 ] diff --git a/src/test/ref/simple-loop.asm b/src/test/ref/simple-loop.asm new file mode 100644 index 000000000..2319dc851 --- /dev/null +++ b/src/test/ref/simple-loop.asm @@ -0,0 +1,17 @@ +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" +main: { + .label SCREEN = $400 + ldx #0 + b1: + lda #'a' + sta SCREEN,x + lda #0 + sta $d020 + inx + inx + cpx #$80 + bcc b1 + rts +} diff --git a/src/test/ref/simple-loop.cfg b/src/test/ref/simple-loop.cfg new file mode 100644 index 000000000..c681c2659 --- /dev/null +++ b/src/test/ref/simple-loop.cfg @@ -0,0 +1,22 @@ +@begin: scope:[] from + [0] phi() + to:@1 +@1: scope:[] from @begin + [1] phi() + [2] call main + to:@end +@end: scope:[] from @1 + [3] phi() +main: scope:[main] from @1 + [4] phi() + to:main::@1 +main::@1: scope:[main] from main main::@1 + [5] (byte) main::i#2 ← phi( main/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@1/(byte) main::i#1 ) + [6] *((const byte*) main::SCREEN#0 + (byte) main::i#2) ← (byte) 'a' + [7] *(((byte*))(word/dword/signed dword) $d020) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + [8] (byte) main::i#1 ← (byte) main::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 2 + [9] if((byte) main::i#1<(byte/word/signed word/dword/signed dword) $80) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@1 + [10] return + to:@return diff --git a/src/test/ref/simple-loop.log b/src/test/ref/simple-loop.log new file mode 100644 index 000000000..a8f80bd4e --- /dev/null +++ b/src/test/ref/simple-loop.log @@ -0,0 +1,328 @@ + +CONTROL FLOW GRAPH SSA +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + (byte*) main::SCREEN#0 ← ((byte*)) (word/signed word/dword/signed dword) $400 + (byte) main::i#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:main::@1 +main::@1: scope:[main] from main main::@1 + (byte) main::i#2 ← phi( main/(byte) main::i#0 main::@1/(byte) main::i#1 ) + *((byte*) main::SCREEN#0 + (byte) main::i#2) ← (byte) 'a' + (byte*~) main::$0 ← ((byte*)) (word/dword/signed dword) $d020 + *((byte*~) main::$0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) main::i#1 ← (byte) main::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 2 + (bool~) main::$1 ← (byte) main::i#1 < (byte/word/signed word/dword/signed dword) $80 + if((bool~) main::$1) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@1 + return + to:@return +@1: scope:[] from @begin + call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +SYMBOL TABLE SSA +(label) @1 +(label) @2 +(label) @begin +(label) @end +(void()) main() +(byte*~) main::$0 +(bool~) main::$1 +(label) main::@1 +(label) main::@return +(byte*) main::SCREEN +(byte*) main::SCREEN#0 +(byte) main::i +(byte) main::i#0 +(byte) main::i#1 +(byte) main::i#2 + +Culled Empty Block (label) @2 +Successful SSA optimization Pass2CullEmptyBlocks +Simple Condition (bool~) main::$1 [8] if((byte) main::i#1<(byte/word/signed word/dword/signed dword) $80) goto main::@1 +Successful SSA optimization Pass2ConditionalJumpSimplification +Constant (const byte*) main::SCREEN#0 = ((byte*))$400 +Constant (const byte) main::i#0 = 0 +Constant (const byte*) main::$0 = ((byte*))$d020 +Successful SSA optimization Pass2ConstantIdentification +Inlining constant with var siblings (const byte) main::i#0 +Constant inlined main::i#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined main::$0 = ((byte*))(word/dword/signed dword) $d020 +Successful SSA optimization Pass2ConstantInlining +Added new block during phi lifting main::@3(between main::@1 and main::@1) +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @1 +Adding NOP phi() at start of @end +Adding NOP phi() at start of main +CALL GRAPH +Calls in [] to main:2 + +Created 1 initial phi equivalence classes +Coalesced [11] main::i#3 ← main::i#1 +Coalesced down to 1 phi equivalence classes +Culled Empty Block (label) main::@3 +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @1 +Adding NOP phi() at start of @end +Adding NOP phi() at start of main + +FINAL CONTROL FLOW GRAPH +@begin: scope:[] from + [0] phi() + to:@1 +@1: scope:[] from @begin + [1] phi() + [2] call main + to:@end +@end: scope:[] from @1 + [3] phi() +main: scope:[main] from @1 + [4] phi() + to:main::@1 +main::@1: scope:[main] from main main::@1 + [5] (byte) main::i#2 ← phi( main/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@1/(byte) main::i#1 ) + [6] *((const byte*) main::SCREEN#0 + (byte) main::i#2) ← (byte) 'a' + [7] *(((byte*))(word/dword/signed dword) $d020) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + [8] (byte) main::i#1 ← (byte) main::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 2 + [9] if((byte) main::i#1<(byte/word/signed word/dword/signed dword) $80) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@1 + [10] return + to:@return + + +VARIABLE REGISTER WEIGHTS +(void()) main() +(byte*) main::SCREEN +(byte) main::i +(byte) main::i#1 16.5 +(byte) main::i#2 11.0 + +Initial phi equivalence classes +[ main::i#2 main::i#1 ] +Complete equivalence classes +[ main::i#2 main::i#1 ] +Allocated zp ZP_BYTE:2 [ main::i#2 main::i#1 ] + +INITIAL ASM +//SEG0 File Comments +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" +//SEG2 Global Constants & labels +//SEG3 @begin +bbegin: +//SEG4 [1] phi from @begin to @1 [phi:@begin->@1] +b1_from_bbegin: + jmp b1 +//SEG5 @1 +b1: +//SEG6 [2] call main +//SEG7 [4] phi from @1 to main [phi:@1->main] +main_from_b1: + jsr main +//SEG8 [3] phi from @1 to @end [phi:@1->@end] +bend_from_b1: + jmp bend +//SEG9 @end +bend: +//SEG10 main +main: { + .label SCREEN = $400 + .label i = 2 + //SEG11 [5] phi from main to main::@1 [phi:main->main::@1] + b1_from_main: + //SEG12 [5] phi (byte) main::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1 + lda #0 + sta i + jmp b1 + //SEG13 [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1] + b1_from_b1: + //SEG14 [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@1->main::@1#0] -- register_copy + jmp b1 + //SEG15 main::@1 + b1: + //SEG16 [6] *((const byte*) main::SCREEN#0 + (byte) main::i#2) ← (byte) 'a' -- pbuc1_derefidx_vbuz1=vbuc2 + lda #'a' + ldy i + sta SCREEN,y + //SEG17 [7] *(((byte*))(word/dword/signed dword) $d020) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta $d020 + //SEG18 [8] (byte) main::i#1 ← (byte) main::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 2 -- vbuz1=vbuz1_plus_2 + lda i + clc + adc #2 + sta i + //SEG19 [9] if((byte) main::i#1<(byte/word/signed word/dword/signed dword) $80) goto main::@1 -- vbuz1_lt_vbuc1_then_la1 + lda i + cmp #$80 + bcc b1_from_b1 + jmp breturn + //SEG20 main::@return + breturn: + //SEG21 [10] return + rts +} + +REGISTER UPLIFT POTENTIAL REGISTERS +Statement [6] *((const byte*) main::SCREEN#0 + (byte) main::i#2) ← (byte) 'a' [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::i#2 main::i#1 ] +Statement [7] *(((byte*))(word/dword/signed dword) $d020) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a +Statement [6] *((const byte*) main::SCREEN#0 + (byte) main::i#2) ← (byte) 'a' [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a +Statement [7] *(((byte*))(word/dword/signed dword) $d020) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a +Potential registers zp ZP_BYTE:2 [ main::i#2 main::i#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y , + +REGISTER UPLIFT SCOPES +Uplift Scope [main] 27.5: zp ZP_BYTE:2 [ main::i#2 main::i#1 ] +Uplift Scope [] + +Uplifting [main] best 343 combination reg byte x [ main::i#2 main::i#1 ] +Uplifting [] best 343 combination + +ASSEMBLER BEFORE OPTIMIZATION +//SEG0 File Comments +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" +//SEG2 Global Constants & labels +//SEG3 @begin +bbegin: +//SEG4 [1] phi from @begin to @1 [phi:@begin->@1] +b1_from_bbegin: + jmp b1 +//SEG5 @1 +b1: +//SEG6 [2] call main +//SEG7 [4] phi from @1 to main [phi:@1->main] +main_from_b1: + jsr main +//SEG8 [3] phi from @1 to @end [phi:@1->@end] +bend_from_b1: + jmp bend +//SEG9 @end +bend: +//SEG10 main +main: { + .label SCREEN = $400 + //SEG11 [5] phi from main to main::@1 [phi:main->main::@1] + b1_from_main: + //SEG12 [5] phi (byte) main::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 + ldx #0 + jmp b1 + //SEG13 [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1] + b1_from_b1: + //SEG14 [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@1->main::@1#0] -- register_copy + jmp b1 + //SEG15 main::@1 + b1: + //SEG16 [6] *((const byte*) main::SCREEN#0 + (byte) main::i#2) ← (byte) 'a' -- pbuc1_derefidx_vbuxx=vbuc2 + lda #'a' + sta SCREEN,x + //SEG17 [7] *(((byte*))(word/dword/signed dword) $d020) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta $d020 + //SEG18 [8] (byte) main::i#1 ← (byte) main::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 2 -- vbuxx=vbuxx_plus_2 + inx + inx + //SEG19 [9] if((byte) main::i#1<(byte/word/signed word/dword/signed dword) $80) goto main::@1 -- vbuxx_lt_vbuc1_then_la1 + cpx #$80 + bcc b1_from_b1 + jmp breturn + //SEG20 main::@return + breturn: + //SEG21 [10] return + rts +} + +ASSEMBLER OPTIMIZATIONS +Removing instruction jmp b1 +Removing instruction jmp bend +Removing instruction jmp b1 +Removing instruction jmp breturn +Succesful ASM optimization Pass5NextJumpElimination +Replacing label b1_from_b1 with b1 +Removing instruction b1_from_bbegin: +Removing instruction b1: +Removing instruction main_from_b1: +Removing instruction bend_from_b1: +Removing instruction b1_from_b1: +Succesful ASM optimization Pass5RedundantLabelElimination +Removing instruction bend: +Removing instruction b1_from_main: +Removing instruction breturn: +Succesful ASM optimization Pass5UnusedLabelElimination +Updating BasicUpstart to call main directly +Removing instruction jsr main +Succesful ASM optimization Pass5SkipBegin +Removing instruction jmp b1 +Succesful ASM optimization Pass5NextJumpElimination +Removing instruction bbegin: +Succesful ASM optimization Pass5UnusedLabelElimination + +FINAL SYMBOL TABLE +(label) @1 +(label) @begin +(label) @end +(void()) main() +(label) main::@1 +(label) main::@return +(byte*) main::SCREEN +(const byte*) main::SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) $400 +(byte) main::i +(byte) main::i#1 reg byte x 16.5 +(byte) main::i#2 reg byte x 11.0 + +reg byte x [ main::i#2 main::i#1 ] + + +FINAL ASSEMBLER +Score: 241 + +//SEG0 File Comments +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" +//SEG2 Global Constants & labels +//SEG3 @begin +//SEG4 [1] phi from @begin to @1 [phi:@begin->@1] +//SEG5 @1 +//SEG6 [2] call main +//SEG7 [4] phi from @1 to main [phi:@1->main] +//SEG8 [3] phi from @1 to @end [phi:@1->@end] +//SEG9 @end +//SEG10 main +main: { + .label SCREEN = $400 + //SEG11 [5] phi from main to main::@1 [phi:main->main::@1] + //SEG12 [5] phi (byte) main::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 + ldx #0 + //SEG13 [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1] + //SEG14 [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@1->main::@1#0] -- register_copy + //SEG15 main::@1 + b1: + //SEG16 [6] *((const byte*) main::SCREEN#0 + (byte) main::i#2) ← (byte) 'a' -- pbuc1_derefidx_vbuxx=vbuc2 + lda #'a' + sta SCREEN,x + //SEG17 [7] *(((byte*))(word/dword/signed dword) $d020) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta $d020 + //SEG18 [8] (byte) main::i#1 ← (byte) main::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 2 -- vbuxx=vbuxx_plus_2 + inx + inx + //SEG19 [9] if((byte) main::i#1<(byte/word/signed word/dword/signed dword) $80) goto main::@1 -- vbuxx_lt_vbuc1_then_la1 + cpx #$80 + bcc b1 + //SEG20 main::@return + //SEG21 [10] return + rts +} + diff --git a/src/test/ref/simple-loop.sym b/src/test/ref/simple-loop.sym new file mode 100644 index 000000000..272fe7f04 --- /dev/null +++ b/src/test/ref/simple-loop.sym @@ -0,0 +1,13 @@ +(label) @1 +(label) @begin +(label) @end +(void()) main() +(label) main::@1 +(label) main::@return +(byte*) main::SCREEN +(const byte*) main::SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) $400 +(byte) main::i +(byte) main::i#1 reg byte x 16.5 +(byte) main::i#2 reg byte x 11.0 + +reg byte x [ main::i#2 main::i#1 ] From e43a2e2c617faf45279d4b695833522d043b482f Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Sat, 27 Apr 2019 08:04:44 +0200 Subject: [PATCH 4/5] Added assert securing that phi predecessors are direct predecessors. --- src/main/java/dk/camelot64/kickc/Compiler.java | 2 +- .../Pass1GenerateSingleStaticAssignmentForm.java | 14 +++++++------- .../kickc/passes/Pass2AssertPhiPredecessors.java | 3 ++- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/main/java/dk/camelot64/kickc/Compiler.java b/src/main/java/dk/camelot64/kickc/Compiler.java index 23310454f..cb8d88400 100644 --- a/src/main/java/dk/camelot64/kickc/Compiler.java +++ b/src/main/java/dk/camelot64/kickc/Compiler.java @@ -222,7 +222,7 @@ public class Compiler { assertions.add(new Pass2AssertNoLabels(program)); assertions.add(new Pass2AssertSingleAssignment(program)); assertions.add(new Pass2AssertRValues(program)); - //assertions.add(new Pass2AssertPhiPredecessors(program)); + assertions.add(new Pass2AssertPhiPredecessors(program)); for(Pass2SsaAssertion assertion : assertions) { assertion.check(); } diff --git a/src/main/java/dk/camelot64/kickc/passes/Pass1GenerateSingleStaticAssignmentForm.java b/src/main/java/dk/camelot64/kickc/passes/Pass1GenerateSingleStaticAssignmentForm.java index 2d6db335d..db834cb48 100644 --- a/src/main/java/dk/camelot64/kickc/passes/Pass1GenerateSingleStaticAssignmentForm.java +++ b/src/main/java/dk/camelot64/kickc/passes/Pass1GenerateSingleStaticAssignmentForm.java @@ -197,7 +197,7 @@ public class Pass1GenerateSingleStaticAssignmentForm extends Pass1Base { VariableRef phiLValVarRef = phiVariable.getVariable(); VariableVersion versioned = (VariableVersion) getScope().getVariable(phiLValVarRef); VariableUnversioned unversioned = versioned.getVersionOf(); - List predecessors = getPredecessors(block); + List predecessors = getPhiPredecessors(block, getProgram()); for(ControlFlowBlock predecessor : predecessors) { LabelRef predecessorLabel = predecessor.getLabel(); Map predecessorMap = symbolMap.get(predecessorLabel); @@ -245,15 +245,15 @@ public class Pass1GenerateSingleStaticAssignmentForm extends Pass1Base { * @param block The block to examine * @return All predecessor blocks */ - private List getPredecessors(ControlFlowBlock block) { - List predecessors = getGraph().getPredecessors(block); - Symbol symbol = getScope().getSymbol(block.getLabel()); + public static List getPhiPredecessors(ControlFlowBlock block, Program program) { + List predecessors = program.getGraph().getPredecessors(block); + Symbol symbol = program.getScope().getSymbol(block.getLabel()); if(symbol instanceof Procedure) { Procedure procedure = (Procedure) symbol; - if(procedure.getInterruptType()!=null || Pass2ConstantIdentification.isAddressOfUsed(procedure.getRef(), getProgram())) { + if(procedure.getInterruptType()!=null || Pass2ConstantIdentification.isAddressOfUsed(procedure.getRef(), program)) { // Find all root-level predecessors to the main block - ControlFlowBlock mainBlock = getGraph().getBlock(new LabelRef(SymbolRef.MAIN_PROC_NAME)); - List mainPredecessors = getGraph().getPredecessors(mainBlock); + ControlFlowBlock mainBlock = program.getGraph().getBlock(new LabelRef(SymbolRef.MAIN_PROC_NAME)); + List mainPredecessors = program.getGraph().getPredecessors(mainBlock); for(ControlFlowBlock mainPredecessor : mainPredecessors) { if(mainPredecessor.getScope().equals(ScopeRef.ROOT)) { predecessors.add(mainPredecessor); diff --git a/src/main/java/dk/camelot64/kickc/passes/Pass2AssertPhiPredecessors.java b/src/main/java/dk/camelot64/kickc/passes/Pass2AssertPhiPredecessors.java index 781346e6b..e1065d84b 100644 --- a/src/main/java/dk/camelot64/kickc/passes/Pass2AssertPhiPredecessors.java +++ b/src/main/java/dk/camelot64/kickc/passes/Pass2AssertPhiPredecessors.java @@ -21,8 +21,9 @@ public class Pass2AssertPhiPredecessors extends Pass2SsaAssertion { for(ControlFlowBlock block : getGraph().getAllBlocks()) { if(block.hasPhiBlock()) { StatementPhiBlock phiBlock = block.getPhiBlock(); + List phiPredecessors = Pass1GenerateSingleStaticAssignmentForm.getPhiPredecessors(block, getProgram()); List predecessors = - getGraph().getPredecessors(block).stream().map(ControlFlowBlock::getLabel).collect(Collectors.toList()); + phiPredecessors.stream().map(ControlFlowBlock::getLabel).collect(Collectors.toList()); for(StatementPhiBlock.PhiVariable phiVariable : phiBlock.getPhiVariables()) { for(StatementPhiBlock.PhiRValue phiRValue : phiVariable.getValues()) { if(!predecessors.contains(phiRValue.getPredecessor())) { From 4735c8940b0453035fb2cac7df517d80a2f92b14 Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Sat, 27 Apr 2019 08:13:44 +0200 Subject: [PATCH 5/5] Added fixed comments to sandbox --- src/test/kc/sandbox.kc | 4 ++-- src/test/ref/sandbox.asm | 2 +- src/test/ref/sandbox.log | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/test/kc/sandbox.kc b/src/test/kc/sandbox.kc index 14c8800b0..403776835 100644 --- a/src/test/kc/sandbox.kc +++ b/src/test/kc/sandbox.kc @@ -48,7 +48,7 @@ byte myprintf(byte *dst, byte *str, word w1, word w2, word w3) { if (bTrailing != 0 && bDigits > b) for (; bDigits > b; --bDigits) dst[bLen++] = ' '; } else if (b == 'x' || b == 'X'){ // hex b = (w >> 4) & 0xF; - dst[bLen++] = (b < 10 ? '0' : 0x57) + b; // "('a' - 10)" is the normal way -- not supported -- https://gitlab.com/camelot/kickc/issues/184 + dst[bLen++] = (b < 10 ? '0' : 0x57) + b; // "('a' - 10)" is the normal way -- not supported -- https://gitlab.com/camelot/kickc/issues/184 [FIXED] b = w & 0xF; dst[bLen++] = (b < 10 ? '0' : 0x57) + b; } bFormat = 0; @@ -57,7 +57,7 @@ byte myprintf(byte *dst, byte *str, word w1, word w2, word w3) { if (b == '%') { bFormat = 1; bLeadZero = 0; bDigits = 1; bTrailing = 0; // default format - //w = (bArg == 0) ? w1 : ((bArg == 1) ? w2 : w3); -- "?" is the normal way, but error "sequence does not contain all blocks" -- https://gitlab.com/camelot/kickc/issues/185 + //w = (bArg == 0) ? w1 : ((bArg == 1) ? w2 : w3); -- "?" is the normal way, but error "sequence does not contain all blocks" -- https://gitlab.com/camelot/kickc/issues/185 [FIXED] if (bArg == 0) w = w1; else if (bArg == 1) w = w2; else w = w3; diff --git a/src/test/ref/sandbox.asm b/src/test/ref/sandbox.asm index 3b8c30fa4..83029cccc 100644 --- a/src/test/ref/sandbox.asm +++ b/src/test/ref/sandbox.asm @@ -361,7 +361,7 @@ myprintf: { cpx #'%' bne b28 // default format - //w = (bArg == 0) ? w1 : ((bArg == 1) ? w2 : w3); -- "?" is the normal way, but error "sequence does not contain all blocks" -- https://gitlab.com/camelot/kickc/issues/185 + //w = (bArg == 0) ? w1 : ((bArg == 1) ? w2 : w3); -- "?" is the normal way, but error "sequence does not contain all blocks" -- https://gitlab.com/camelot/kickc/issues/185 [FIXED] lda bArg cmp #0 beq b42 diff --git a/src/test/ref/sandbox.log b/src/test/ref/sandbox.log index 7ff508c4e..85ed8585f 100644 --- a/src/test/ref/sandbox.log +++ b/src/test/ref/sandbox.log @@ -4713,7 +4713,7 @@ myprintf: { b32: //SEG268 [120] if((byte) myprintf::bArg#12==(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@42 -- vbuz1_eq_0_then_la1 // default format - //w = (bArg == 0) ? w1 : ((bArg == 1) ? w2 : w3); -- "?" is the normal way, but error "sequence does not contain all blocks" -- https://gitlab.com/camelot/kickc/issues/185 + //w = (bArg == 0) ? w1 : ((bArg == 1) ? w2 : w3); -- "?" is the normal way, but error "sequence does not contain all blocks" -- https://gitlab.com/camelot/kickc/issues/185 [FIXED] lda bArg cmp #0 beq b42 @@ -6601,7 +6601,7 @@ myprintf: { b32: //SEG268 [120] if((byte) myprintf::bArg#12==(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@42 -- vbuz1_eq_0_then_la1 // default format - //w = (bArg == 0) ? w1 : ((bArg == 1) ? w2 : w3); -- "?" is the normal way, but error "sequence does not contain all blocks" -- https://gitlab.com/camelot/kickc/issues/185 + //w = (bArg == 0) ? w1 : ((bArg == 1) ? w2 : w3); -- "?" is the normal way, but error "sequence does not contain all blocks" -- https://gitlab.com/camelot/kickc/issues/185 [FIXED] lda bArg cmp #0 beq b42 @@ -8463,7 +8463,7 @@ myprintf: { //SEG267 myprintf::@32 //SEG268 [120] if((byte) myprintf::bArg#12==(byte/signed byte/word/signed word/dword/signed dword) 0) goto myprintf::@42 -- vbuz1_eq_0_then_la1 // default format - //w = (bArg == 0) ? w1 : ((bArg == 1) ? w2 : w3); -- "?" is the normal way, but error "sequence does not contain all blocks" -- https://gitlab.com/camelot/kickc/issues/185 + //w = (bArg == 0) ? w1 : ((bArg == 1) ? w2 : w3); -- "?" is the normal way, but error "sequence does not contain all blocks" -- https://gitlab.com/camelot/kickc/issues/185 [FIXED] lda bArg cmp #0 beq b42