1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-11-26 12:49:21 +00:00

Added second MD5 test.

This commit is contained in:
jespergravgaard 2020-10-30 20:10:13 +01:00
parent 77754f8d39
commit 9a44547552
7 changed files with 19536 additions and 18962 deletions

File diff suppressed because it is too large Load Diff

View File

@ -49,6 +49,10 @@ public class TestPrograms {
compileAndCompare("32bit-rols.c"); compileAndCompare("32bit-rols.c");
} }
@Test
public void testAtariXlMd5b() throws IOException, URISyntaxException {
compileAndCompare("atarixl-md5b.c");
}
@Test @Test
public void testAtariXlMd5() throws IOException, URISyntaxException { public void testAtariXlMd5() throws IOException, URISyntaxException {
compileAndCompare("atarixl-md5.c"); compileAndCompare("atarixl-md5.c");

190
src/test/kc/atarixl-md5b.c Normal file
View File

@ -0,0 +1,190 @@
// 8 bit converted md5 calculator
#pragma target(atarixl)
#pragma encoding(atascii)
#pragma zp_reserve(0x00..0x7f)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <printf.h>
#include <conio.h>
#include <6502.h>
#define ROUNDS 1
char * const RTCLOK = 0x12;
void main() {
uint32_t dr;
char *message = "The quick brown fox jumps over the lazy dog";
printf("Calculating MD5\n");
md5(message, strlen(message));
printf("Success MD5\n");
for(;;) ;
}
#define LEFTROTATE(x, c) (((x) << (c)) | ((x) >> (32 - (c))))
uint32_t h0, h1, h2, h3;
uint16_t mul3(uint8_t a) {
return ((uint16_t) a) * 3;
}
uint16_t mul5(uint8_t a) {
return ((uint16_t) a) * 5;
}
uint16_t mul7(uint8_t a) {
return ((uint16_t) a) * 7;
}
uint8_t mod16(uint16_t a) {
uint16_t t = a % 16;
return (uint8_t) (t & 0xff);
}
void print32(uint32_t l) {
uint8_t *dp;
dp = (uint8_t *) &l;
printf("%02x%02x%02x%02x", dp[0], dp[1], dp[2], dp[3]);
}
inline void waitFrame() {
asm {
lda RTCLOK+2
!: cmp RTCLOK+2
beq !-
}
}
void waitFrames(int8_t frames) {
while(frames > 0) {
waitFrame();
frames--;
}
}
void md5(uint8_t *initial_msg, size_t initial_len) {
uint8_t *msg;
uint8_t r[] = {7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22,
5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20,
4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23,
6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21};
uint32_t k[] = {
0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee,
0xf57c0faf, 0x4787c62a, 0xa8304613, 0xfd469501,
0x698098d8, 0x8b44f7af, 0xffff5bb1, 0x895cd7be,
0x6b901122, 0xfd987193, 0xa679438e, 0x49b40821,
0xf61e2562, 0xc040b340, 0x265e5a51, 0xe9b6c7aa,
0xd62f105d, 0x02441453, 0xd8a1e681, 0xe7d3fbc8,
0x21e1cde6, 0xc33707d6, 0xf4d50d87, 0x455a14ed,
0xa9e3e905, 0xfcefa3f8, 0x676f02d9, 0x8d2a4c8a,
0xfffa3942, 0x8771f681, 0x6d9d6122, 0xfde5380c,
0xa4beea44, 0x4bdecfa9, 0xf6bb4b60, 0xbebfbc70,
0x289b7ec6, 0xeaa127fa, 0xd4ef3085, 0x04881d05,
0xd9d4d039, 0xe6db99e5, 0x1fa27cf8, 0xc4ac5665,
0xf4292244, 0x432aff97, 0xab9423a7, 0xfc93a039,
0x655b59c3, 0x8f0ccc92, 0xffeff47d, 0x85845dd1,
0x6fa87e4f, 0xfe2ce6e0, 0xa3014314, 0x4e0811a1,
0xf7537e82, 0xbd3af235, 0x2ad7d2bb, 0xeb86d391};
h0 = 0x67452301;
h1 = 0xefcdab89;
h2 = 0x98badcfe;
h3 = 0x10325476;
uint16_t new_len = ((((initial_len + 8) / 64) + 1) * 64) - 8;
msg = calloc(new_len + 64, 1);
memcpy(msg, initial_msg, initial_len);
msg[initial_len] = 128;
uint32_t bits_len = initial_len * 8;
memcpy(msg + new_len, &bits_len, 4);
for(int offset=0; offset<new_len; offset += (512/8)) {
uint32_t *w = (uint32_t *) (msg + offset);
uint32_t a = h0;
uint32_t b = h1;
uint32_t c = h2;
uint32_t d = h3;
for(uint8_t i = 0; i<64; i++) {
#ifdef ROUNDS
uint8_t *p;
printf("%2x: ", i);
print32(a); cputc(' ');
print32(b); cputc(' ');
print32(c); cputc(' ');
print32(d); cputln();
waitFrames(2);
BREAK();
#endif
uint32_t f;
uint8_t g;
switch ((i >> 4) & 3)
{
case 0: // (i < 16)
f = (b & c) | ((~b) & d);
g = i;
break;
case 1: // (i < 32)
f = (d & b) | ((~d) & c);
g = mod16(mul5(i) + 1);
break;
case 2: // (i < 48)
f = b ^ c ^ d;
g = mod16(mul3(i) + 5);
break;
case 3: // other
f = c ^ (b | (~d));
g = mod16(mul7(i));
break;
}
#ifdef ROUNDS
printf("f: "); print32(f); cputc(' ');
printf("g:%2x w[g]:", g); print32(w[g]); cputln();
// printf("f=%x g=%d w[g]=%x\n", f, g, w[g]);
waitFrames(2);
BREAK();
#endif
uint32_t temp = d;
d = c + 0;
c = b + 0;
cputs("L ");
print32(a); cputc(' ');
print32(f); cputc(' ');
print32(k[i]); cputc(' ');
print32(w[g]); cputc(' ');
printf("r: %2x\n", r[i]);
waitFrames(2);
BREAK();
// printf("rotateLeft(%2x + %2x + %2x + %2x, %2x)\n", a, f, k[i], w[g], r[i]);
uint32_t lr = LEFTROTATE((a + f + k[i] + w[g]), r[i]);
cputs("lr: "); print32(lr); cputln();
b = b + lr;
//uint32_t lr = leftRotate((a + f + k[i] + w[g]), r[i]);
//b += lr;
a = temp;
}
h0 += a;
h1 += b;
h2 += c;
h3 += d;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,811 @@
void main()
main: scope:[main] from
[0] phi()
[1] call cputs
to:main::@2
main::@2: scope:[main] from main
[2] phi()
[3] call strlen
[4] strlen::return#3 = strlen::len#2
to:main::@3
main::@3: scope:[main] from main::@2
[5] md5::initial_len#0 = strlen::return#3
[6] call md5
to:main::@4
main::@4: scope:[main] from main::@3
[7] phi()
[8] call cputs
to:main::@1
main::@1: scope:[main] from main::@1 main::@4
[9] phi()
to:main::@1
void cputs(to_nomodify byte* cputs::s)
cputs: scope:[cputs] from main main::@4 md5::@10 md5::@16 md5::@17 md5::@20 md5::@38 md5::@40 md5::@52 md5::@54 printf_number_buffer::@4
[10] cputs::s#13 = phi( main/main::s, main::@4/main::s1, md5::@10/md5::s1, md5::@16/md5::s4, md5::@17/md5::s7, md5::@20/md5::s, md5::@38/md5::s2, md5::@40/md5::s3, md5::@52/md5::s5, md5::@54/md5::s6, printf_number_buffer::@4/printf_number_buffer::buffer_digits#0 )
to:cputs::@1
cputs::@1: scope:[cputs] from cputs cputs::@2
[11] cputs::s#12 = phi( cputs/cputs::s#13, cputs::@2/cputs::s#0 )
[12] cputs::c#1 = *cputs::s#12
[13] cputs::s#0 = ++ cputs::s#12
[14] if(0!=cputs::c#1) goto cputs::@2
to:cputs::@return
cputs::@return: scope:[cputs] from cputs::@1
[15] return
to:@return
cputs::@2: scope:[cputs] from cputs::@1
[16] cputc::c = cputs::c#1
[17] call cputc
to:cputs::@1
word strlen(byte* strlen::str)
strlen: scope:[strlen] from main::@2 printf_number_buffer::@5
[18] strlen::str#5 = phi( main::@2/main::message, printf_number_buffer::@5/printf_number_buffer::buffer_digits#0 )
to:strlen::@1
strlen::@1: scope:[strlen] from strlen strlen::@2
[19] strlen::len#2 = phi( strlen/0, strlen::@2/strlen::len#1 )
[19] strlen::str#3 = phi( strlen/strlen::str#5, strlen::@2/strlen::str#0 )
[20] if(0!=*strlen::str#3) goto strlen::@2
to:strlen::@return
strlen::@return: scope:[strlen] from strlen::@1
[21] return
to:@return
strlen::@2: scope:[strlen] from strlen::@1
[22] strlen::len#1 = ++ strlen::len#2
[23] strlen::str#0 = ++ strlen::str#3
to:strlen::@1
void md5(byte* md5::initial_msg , word md5::initial_len)
md5: scope:[md5] from main::@3
[24] md5::$0 = md5::initial_len#0 + 8
[25] md5::$1 = md5::$0 >> 6
[26] md5::$2 = md5::$1 + 1
[27] md5::$3 = md5::$2 << 6
[28] md5::new_len#0 = md5::$3 - 8
[29] calloc::nitems#0 = md5::new_len#0 + $40
[30] call calloc
[31] calloc::return#2 = calloc::return#0
to:md5::@18
md5::@18: scope:[md5] from md5
[32] md5::msg#1 = calloc::return#2
[33] memcpy::num#1 = md5::initial_len#0
[34] memcpy::destination#7 = (void*)(byte*)md5::msg#1
[35] call memcpy
to:md5::@19
md5::@19: scope:[md5] from md5::@18
[36] md5::$91 = (byte*)md5::msg#1 + md5::initial_len#0
[37] *md5::$91 = $80
[38] md5::$8 = md5::initial_len#0 << 3
[39] md5::bits_len = md5::$8
[40] memcpy::destination#2 = (byte*)md5::msg#1 + md5::new_len#0
[41] memcpy::destination#8 = (void*)memcpy::destination#2
[42] call memcpy
to:md5::@1
md5::@1: scope:[md5] from md5::@19 md5::@5
[43] h3#10 = phi( md5::@19/$10325476, md5::@5/h3#3 )
[43] h2#10 = phi( md5::@19/$98badcfe, md5::@5/h2#3 )
[43] h1#10 = phi( md5::@19/$efcdab89, md5::@5/h1#3 )
[43] h0#10 = phi( md5::@19/$67452301, md5::@5/h0#3 )
[43] md5::offset#2 = phi( md5::@19/0, md5::@5/md5::offset#1 )
[44] if(md5::offset#2<md5::new_len#0) goto md5::@2
to:md5::@return
md5::@return: scope:[md5] from md5::@1
[45] return
to:@return
md5::@2: scope:[md5] from md5::@1
[46] md5::w#0 = (byte*)md5::msg#1 + md5::offset#2
[47] md5::a#0 = h0#10
[48] md5::b#0 = h1#10
[49] md5::c#0 = h2#10
[50] md5::d#0 = h3#10
to:md5::@3
md5::@3: scope:[md5] from md5::@11 md5::@2
[51] md5::temp#0 = phi( md5::@11/md5::temp#19, md5::@2/md5::d#0 )
[51] md5::c#10 = phi( md5::@11/md5::c#1, md5::@2/md5::c#0 )
[51] md5::b#10 = phi( md5::@11/md5::b#1, md5::@2/md5::b#0 )
[51] md5::a#11 = phi( md5::@11/md5::a#59, md5::@2/md5::a#0 )
[51] md5::i#10 = phi( md5::@11/md5::i#1, md5::@2/0 )
[52] if(md5::i#10<$40) goto md5::@4
to:md5::@5
md5::@5: scope:[md5] from md5::@3
[53] h0#3 = h0#10 + md5::a#11
[54] h1#3 = h1#10 + md5::b#10
[55] h2#3 = h2#10 + md5::c#10
[56] h3#3 = h3#10 + md5::temp#0
[57] md5::offset#1 = md5::offset#2 + (signed byte)$200/8
to:md5::@1
md5::@4: scope:[md5] from md5::@3
[58] printf_uchar::uvalue#4 = md5::i#10
[59] call printf_uchar
to:md5::@20
md5::@20: scope:[md5] from md5::@4
[60] phi()
[61] call cputs
to:md5::@21
md5::@21: scope:[md5] from md5::@20
[62] print32::l = md5::a#11
[63] call print32
to:md5::@22
md5::@22: scope:[md5] from md5::@21
[64] cputc::c = ' 'at
[65] call cputc
to:md5::@23
md5::@23: scope:[md5] from md5::@22
[66] print32::l = md5::b#10
[67] call print32
to:md5::@24
md5::@24: scope:[md5] from md5::@23
[68] cputc::c = ' 'at
[69] call cputc
to:md5::@25
md5::@25: scope:[md5] from md5::@24
[70] print32::l = md5::c#10
[71] call print32
to:md5::@26
md5::@26: scope:[md5] from md5::@25
[72] cputc::c = ' 'at
[73] call cputc
to:md5::@27
md5::@27: scope:[md5] from md5::@26
[74] print32::l = md5::temp#0
[75] call print32
to:md5::@28
md5::@28: scope:[md5] from md5::@27
[76] phi()
[77] call cputln
to:md5::@29
md5::@29: scope:[md5] from md5::@28
[78] phi()
[79] call waitFrames
to:md5::BREAK1
md5::BREAK1: scope:[md5] from md5::@29
kickasm() {{ .break }}
to:md5::@15
md5::@15: scope:[md5] from md5::BREAK1
[81] md5::$25 = md5::i#10 >> 4
[82] md5::$26 = md5::$25 & 3
[83] if(md5::$26==0) goto md5::@6
to:md5::@12
md5::@12: scope:[md5] from md5::@15
[84] if(md5::$26==1) goto md5::@7
to:md5::@13
md5::@13: scope:[md5] from md5::@12
[85] if(md5::$26==2) goto md5::@8
to:md5::@14
md5::@14: scope:[md5] from md5::@13
[86] if(md5::$26==3) goto md5::@9
to:md5::@10
md5::@10: scope:[md5] from md5::@14 md5::@31 md5::@33 md5::@35 md5::@6
[87] md5::g#10 = phi( md5::@14/0, md5::@31/md5::g#2, md5::@33/md5::g#3, md5::@35/md5::g#4, md5::@6/md5::g#38 )
[87] md5::f#10 = phi( md5::@14/0, md5::@31/md5::f#12, md5::@33/md5::f#13, md5::@35/md5::f#14, md5::@6/md5::f#1 )
[88] call cputs
to:md5::@36
md5::@36: scope:[md5] from md5::@10
[89] print32::l = md5::f#10
[90] call print32
to:md5::@37
md5::@37: scope:[md5] from md5::@36
[91] cputc::c = ' 'at
[92] call cputc
to:md5::@38
md5::@38: scope:[md5] from md5::@37
[93] phi()
[94] call cputs
to:md5::@39
md5::@39: scope:[md5] from md5::@38
[95] printf_uchar::uvalue#5 = md5::g#10
[96] call printf_uchar
to:md5::@40
md5::@40: scope:[md5] from md5::@39
[97] phi()
[98] call cputs
to:md5::@41
md5::@41: scope:[md5] from md5::@40
[99] md5::$86 = md5::g#10 << 2
[100] print32::l = ((dword*)md5::w#0)[md5::$86]
[101] call print32
to:md5::@42
md5::@42: scope:[md5] from md5::@41
[102] phi()
[103] call cputln
to:md5::@43
md5::@43: scope:[md5] from md5::@42
[104] phi()
[105] call waitFrames
to:md5::BREAK2
md5::BREAK2: scope:[md5] from md5::@43
kickasm() {{ .break }}
to:md5::@16
md5::@16: scope:[md5] from md5::BREAK2
[107] md5::d#1 = md5::c#10
[108] md5::c#1 = md5::b#10
[109] call cputs
to:md5::@44
md5::@44: scope:[md5] from md5::@16
[110] print32::l = md5::a#11
[111] call print32
to:md5::@45
md5::@45: scope:[md5] from md5::@44
[112] cputc::c = ' 'at
[113] call cputc
to:md5::@46
md5::@46: scope:[md5] from md5::@45
[114] print32::l = md5::f#10
[115] call print32
to:md5::@47
md5::@47: scope:[md5] from md5::@46
[116] cputc::c = ' 'at
[117] call cputc
to:md5::@48
md5::@48: scope:[md5] from md5::@47
[118] md5::$89 = md5::i#10 << 2
[119] print32::l = md5::k[md5::$89]
[120] call print32
to:md5::@49
md5::@49: scope:[md5] from md5::@48
[121] cputc::c = ' 'at
[122] call cputc
to:md5::@50
md5::@50: scope:[md5] from md5::@49
[123] print32::l = ((dword*)md5::w#0)[md5::$86]
[124] call print32
to:md5::@51
md5::@51: scope:[md5] from md5::@50
[125] cputc::c = ' 'at
[126] call cputc
to:md5::@52
md5::@52: scope:[md5] from md5::@51
[127] phi()
[128] call cputs
to:md5::@53
md5::@53: scope:[md5] from md5::@52
[129] printf_uchar::uvalue#6 = md5::r[md5::i#10]
[130] call printf_uchar
to:md5::@54
md5::@54: scope:[md5] from md5::@53
[131] phi()
[132] call cputs
to:md5::@55
md5::@55: scope:[md5] from md5::@54
[133] phi()
[134] call waitFrames
to:md5::BREAK3
md5::BREAK3: scope:[md5] from md5::@55
kickasm() {{ .break }}
to:md5::@17
md5::@17: scope:[md5] from md5::BREAK3
[136] md5::$74 = md5::a#11 + md5::f#10
[137] md5::$71 = md5::$74 + md5::k[md5::$89]
[138] md5::$72 = md5::$71 + ((dword*)md5::w#0)[md5::$86]
[139] md5::$73 = md5::$72 << md5::r[md5::i#10]
[140] md5::$75 = md5::$74 + md5::k[md5::$89]
[141] md5::$76 = md5::$75 + ((dword*)md5::w#0)[md5::$86]
[142] md5::$77 = $20 - md5::r[md5::i#10]
[143] md5::$78 = md5::$76 >> md5::$77
[144] md5::lr#0 = md5::$73 | md5::$78
[145] call cputs
to:md5::@56
md5::@56: scope:[md5] from md5::@17
[146] print32::l = md5::lr#0
[147] call print32
to:md5::@57
md5::@57: scope:[md5] from md5::@56
[148] phi()
[149] call cputln
to:md5::@58
md5::@58: scope:[md5] from md5::@57
[150] md5::b#1 = md5::b#10 + md5::lr#0
to:md5::@11
md5::@11: scope:[md5] from md5::@58
[151] md5::i#1 = ++ md5::i#10
[152] md5::a#59 = md5::temp#0
[153] md5::temp#19 = md5::d#1
to:md5::@3
md5::@9: scope:[md5] from md5::@14
[154] md5::$43 = ~ md5::temp#0
[155] md5::$44 = md5::b#10 | md5::$43
[156] md5::f#14 = md5::c#10 ^ md5::$44
[157] mul7::a#0 = md5::i#10
[158] call mul7
[159] mul7::return#2 = mul7::return#0
to:md5::@34
md5::@34: scope:[md5] from md5::@9
[160] mod16::a#2 = mul7::return#2
[161] call mod16
[162] mod16::return#4 = mod16::return#0
to:md5::@35
md5::@35: scope:[md5] from md5::@34
[163] md5::g#4 = mod16::return#4
to:md5::@10
md5::@8: scope:[md5] from md5::@13
[164] md5::$38 = md5::b#10 ^ md5::c#10
[165] md5::f#13 = md5::$38 ^ md5::temp#0
[166] mul3::a#0 = md5::i#10
[167] call mul3
[168] mul3::return#2 = mul3::return#0
to:md5::@32
md5::@32: scope:[md5] from md5::@8
[169] md5::$40 = mul3::return#2
[170] mod16::a#1 = md5::$40 + 5
[171] call mod16
[172] mod16::return#3 = mod16::return#0
to:md5::@33
md5::@33: scope:[md5] from md5::@32
[173] md5::g#3 = mod16::return#3
to:md5::@10
md5::@7: scope:[md5] from md5::@12
[174] md5::$31 = md5::temp#0 & md5::b#10
[175] md5::$32 = ~ md5::temp#0
[176] md5::$33 = md5::$32 & md5::c#10
[177] md5::f#12 = md5::$31 | md5::$33
[178] mul5::a#0 = md5::i#10
[179] call mul5
[180] mul5::return#2 = mul5::return#0
to:md5::@30
md5::@30: scope:[md5] from md5::@7
[181] md5::$35 = mul5::return#2
[182] mod16::a#0 = md5::$35 + 1
[183] call mod16
[184] mod16::return#2 = mod16::return#0
to:md5::@31
md5::@31: scope:[md5] from md5::@30
[185] md5::g#2 = mod16::return#2
to:md5::@10
md5::@6: scope:[md5] from md5::@15
[186] md5::$27 = md5::b#10 & md5::c#10
[187] md5::$28 = ~ md5::b#10
[188] md5::$29 = md5::$28 & md5::temp#0
[189] md5::f#1 = md5::$27 | md5::$29
[190] md5::g#38 = md5::i#10
to:md5::@10
void cputc(volatile byte cputc::c)
cputc: scope:[cputc] from cputs::@2 md5::@22 md5::@24 md5::@26 md5::@37 md5::@45 md5::@47 md5::@49 md5::@51 printf_number_buffer::@8 printf_padding::@2
[191] if(cputc::c==' 'at) goto cputc::@1
to:cputc::@3
cputc::@3: scope:[cputc] from cputc
[192] if(cputc::c=='
'at) goto cputc::@2
to:cputc::@8
cputc::@8: scope:[cputc] from cputc::@3
[193] if(cputc::c==$9b) goto cputc::@2
to:cputc::convertToScreenCode1
cputc::convertToScreenCode1: scope:[cputc] from cputc::@8
[194] cputc::convertToScreenCode1_return#0 = rawmap[*cputc::convertToScreenCode1_v#0]
to:cputc::@6
cputc::@6: scope:[cputc] from cputc::convertToScreenCode1
[195] phi()
[196] call putchar
to:cputc::@7
cputc::@7: scope:[cputc] from cputc::@6
[197] *COLCRS = ++ *COLCRS
[198] if(*COLCRS==$28) goto cputc::@5
to:cputc::@4
cputc::@4: scope:[cputc] from cputc::@7
[199] phi()
[200] call setcursor
to:cputc::@return
cputc::@return: scope:[cputc] from cputc::@1 cputc::@2 cputc::@4 cputc::@5
[201] return
to:@return
cputc::@5: scope:[cputc] from cputc::@7
[202] *COLCRS = 0
[203] call newline
to:cputc::@return
cputc::@2: scope:[cputc] from cputc::@3 cputc::@8
[204] *COLCRS = 0
[205] call newline
to:cputc::@return
cputc::@1: scope:[cputc] from cputc
[206] *COLCRS = 0
[207] call setcursor
to:cputc::@return
void* calloc(word calloc::nitems , word calloc::size)
calloc: scope:[calloc] from md5
[208] malloc::size#0 = calloc::nitems#0
[209] call malloc
to:calloc::@1
calloc::@1: scope:[calloc] from calloc
[210] calloc::return#0 = (void*)malloc::mem#0
[211] memset::num#0 = calloc::nitems#0
[212] memset::str#0 = calloc::return#0
[213] call memset
to:calloc::@return
calloc::@return: scope:[calloc] from calloc::@1
[214] return
to:@return
void* memcpy(void* memcpy::destination , void* memcpy::source , word memcpy::num)
memcpy: scope:[memcpy] from md5::@18 md5::@19 newline::@2
[215] memcpy::num#3 = phi( md5::@18/memcpy::num#1, md5::@19/4, newline::@2/(word)$28*$17 )
[215] memcpy::destination#3 = phi( md5::@18/memcpy::destination#7, md5::@19/memcpy::destination#8, newline::@2/memcpy::destination#0 )
[215] memcpy::source#3 = phi( md5::@18/(void*)main::message, md5::@19/(void*)&md5::bits_len, newline::@2/memcpy::source#4 )
[216] memcpy::src_end#0 = (byte*)memcpy::source#3 + memcpy::num#3
[217] memcpy::src#4 = (byte*)memcpy::source#3
[218] memcpy::dst#4 = (byte*)memcpy::destination#3
to:memcpy::@1
memcpy::@1: scope:[memcpy] from memcpy memcpy::@2
[219] memcpy::dst#2 = phi( memcpy/memcpy::dst#4, memcpy::@2/memcpy::dst#1 )
[219] memcpy::src#2 = phi( memcpy/memcpy::src#4, memcpy::@2/memcpy::src#1 )
[220] if(memcpy::src#2!=memcpy::src_end#0) goto memcpy::@2
to:memcpy::@return
memcpy::@return: scope:[memcpy] from memcpy::@1
[221] return
to:@return
memcpy::@2: scope:[memcpy] from memcpy::@1
[222] *memcpy::dst#2 = *memcpy::src#2
[223] memcpy::dst#1 = ++ memcpy::dst#2
[224] memcpy::src#1 = ++ memcpy::src#2
to:memcpy::@1
void printf_uchar(byte printf_uchar::uvalue , byte printf_uchar::format_min_length , byte printf_uchar::format_justify_left , byte printf_uchar::format_sign_always , byte printf_uchar::format_zero_padding , byte printf_uchar::format_upper_case , byte printf_uchar::format_radix)
printf_uchar: scope:[printf_uchar] from md5::@39 md5::@4 md5::@53 print32 print32::@1 print32::@2 print32::@3
[225] printf_uchar::format_zero_padding#10 = phi( md5::@4/0, md5::@39/0, md5::@53/0, print32/1, print32::@1/1, print32::@2/1, print32::@3/1 )
[225] printf_uchar::uvalue#10 = phi( md5::@4/printf_uchar::uvalue#4, md5::@39/printf_uchar::uvalue#5, md5::@53/printf_uchar::uvalue#6, print32/printf_uchar::uvalue#0, print32::@1/printf_uchar::uvalue#1, print32::@2/printf_uchar::uvalue#2, print32::@3/printf_uchar::uvalue#3 )
to:printf_uchar::@1
printf_uchar::@1: scope:[printf_uchar] from printf_uchar
[226] *((byte*)&printf_buffer) = 0
[227] uctoa::value#1 = printf_uchar::uvalue#10
[228] call uctoa
to:printf_uchar::@2
printf_uchar::@2: scope:[printf_uchar] from printf_uchar::@1
[229] printf_number_buffer::buffer_sign#0 = *((byte*)&printf_buffer)
[230] printf_number_buffer::format_zero_padding#0 = printf_uchar::format_zero_padding#10
[231] call printf_number_buffer
to:printf_uchar::@return
printf_uchar::@return: scope:[printf_uchar] from printf_uchar::@2
[232] return
to:@return
void print32(volatile dword print32::l)
print32: scope:[print32] from md5::@21 md5::@23 md5::@25 md5::@27 md5::@36 md5::@41 md5::@44 md5::@46 md5::@48 md5::@50 md5::@56
[233] printf_uchar::uvalue#0 = *print32::dp#1
[234] call printf_uchar
to:print32::@1
print32::@1: scope:[print32] from print32
[235] printf_uchar::uvalue#1 = *(print32::dp#1+1)
[236] call printf_uchar
to:print32::@2
print32::@2: scope:[print32] from print32::@1
[237] printf_uchar::uvalue#2 = *(print32::dp#1+2)
[238] call printf_uchar
to:print32::@3
print32::@3: scope:[print32] from print32::@2
[239] printf_uchar::uvalue#3 = *(print32::dp#1+3)
[240] call printf_uchar
to:print32::@return
print32::@return: scope:[print32] from print32::@3
[241] return
to:@return
void cputln()
cputln: scope:[cputln] from md5::@28 md5::@42 md5::@57
[242] *COLCRS = 0
[243] call newline
to:cputln::@return
cputln::@return: scope:[cputln] from cputln
[244] return
to:@return
void waitFrames(signed byte waitFrames::frames)
waitFrames: scope:[waitFrames] from md5::@29 md5::@43 md5::@55
[245] phi()
to:waitFrames::@1
waitFrames::@1: scope:[waitFrames] from waitFrames waitFrames::@2
[246] waitFrames::frames#4 = phi( waitFrames/2, waitFrames::@2/waitFrames::frames#0 )
[247] if(waitFrames::frames#4>0) goto waitFrames::waitFrame1
to:waitFrames::@return
waitFrames::@return: scope:[waitFrames] from waitFrames::@1
[248] return
to:@return
waitFrames::waitFrame1: scope:[waitFrames] from waitFrames::@1
asm { ldaRTCLOK+2 !: cmpRTCLOK+2 beq!- }
to:waitFrames::@2
waitFrames::@2: scope:[waitFrames] from waitFrames::waitFrame1
[250] waitFrames::frames#0 = -- waitFrames::frames#4
to:waitFrames::@1
word mul7(byte mul7::a)
mul7: scope:[mul7] from md5::@9
[251] mul7::$1 = (word)mul7::a#0
[252] mul7::$2 = mul7::$1 << 1
[253] mul7::$3 = mul7::$2 + mul7::$1
[254] mul7::$4 = mul7::$3 << 1
[255] mul7::return#0 = mul7::$4 + mul7::$1
to:mul7::@return
mul7::@return: scope:[mul7] from mul7
[256] return
to:@return
byte mod16(word mod16::a)
mod16: scope:[mod16] from md5::@30 md5::@32 md5::@34
[257] mod16::a#3 = phi( md5::@30/mod16::a#0, md5::@32/mod16::a#1, md5::@34/mod16::a#2 )
[258] mod16::t#0 = mod16::a#3 & $10-1
[259] mod16::return#0 = mod16::t#0 & $ff
to:mod16::@return
mod16::@return: scope:[mod16] from mod16
[260] return
to:@return
word mul3(byte mul3::a)
mul3: scope:[mul3] from md5::@8
[261] mul3::$1 = (word)mul3::a#0
[262] mul3::$2 = mul3::$1 << 1
[263] mul3::return#0 = mul3::$2 + mul3::$1
to:mul3::@return
mul3::@return: scope:[mul3] from mul3
[264] return
to:@return
word mul5(byte mul5::a)
mul5: scope:[mul5] from md5::@7
[265] mul5::$1 = (word)mul5::a#0
[266] mul5::$2 = mul5::$1 << 2
[267] mul5::return#0 = mul5::$2 + mul5::$1
to:mul5::@return
mul5::@return: scope:[mul5] from mul5
[268] return
to:@return
void putchar(byte putchar::code)
putchar: scope:[putchar] from cputc::@6
[269] *(*OLDADR) = *OLDCHR
[270] call cursorLocation
[271] cursorLocation::return#0 = cursorLocation::return#1
to:putchar::@1
putchar::@1: scope:[putchar] from putchar
[272] putchar::loc#0 = cursorLocation::return#0
[273] putchar::newChar#0 = cputc::convertToScreenCode1_return#0
[274] *putchar::loc#0 = putchar::newChar#0
[275] *OLDCHR = putchar::newChar#0
[276] call setcursor
to:putchar::@return
putchar::@return: scope:[putchar] from putchar::@1
[277] return
to:@return
void setcursor()
setcursor: scope:[setcursor] from cputc::@1 cputc::@4 newline::@1 putchar::@1
[278] *(*OLDADR) = *OLDCHR
[279] call cursorLocation
[280] cursorLocation::return#3 = cursorLocation::return#1
to:setcursor::@3
setcursor::@3: scope:[setcursor] from setcursor
[281] setcursor::loc#0 = cursorLocation::return#3
[282] setcursor::c#0 = *setcursor::loc#0
[283] *OLDCHR = setcursor::c#0
[284] *OLDADR = setcursor::loc#0
to:setcursor::@2
setcursor::@2: scope:[setcursor] from setcursor::@3
[285] *CRSINH = 0
[286] setcursor::c#1 = setcursor::c#0 ^ $80
to:setcursor::@1
setcursor::@1: scope:[setcursor] from setcursor::@2
[287] *(*OLDADR) = setcursor::c#1
to:setcursor::@return
setcursor::@return: scope:[setcursor] from setcursor::@1
[288] return
to:@return
void newline()
newline: scope:[newline] from cputc::@2 cputc::@5 cputln
[289] *ROWCRS = ++ *ROWCRS
[290] if(*ROWCRS!=$18) goto newline::@1
to:newline::@3
newline::@3: scope:[newline] from newline
[291] *(*OLDADR) = *(*OLDADR) ^ $80
to:newline::@2
newline::@2: scope:[newline] from newline::@3
[292] newline::start#0 = *SAVMSC
[293] memcpy::source#0 = newline::start#0 + $28
[294] memcpy::destination#0 = (void*)newline::start#0
[295] memcpy::source#4 = (void*)memcpy::source#0
[296] call memcpy
to:newline::@4
newline::@4: scope:[newline] from newline::@2
[297] memset::str#1 = newline::start#0 + (word)$28*$17
[298] memset::str#8 = (void*)memset::str#1
[299] call memset
to:newline::@5
newline::@5: scope:[newline] from newline::@4
[300] *ROWCRS = (byte)$18-1
to:newline::@1
newline::@1: scope:[newline] from newline newline::@5
[301] phi()
[302] call setcursor
to:newline::@return
newline::@return: scope:[newline] from newline::@1
[303] return
to:@return
void* malloc(word malloc::size)
malloc: scope:[malloc] from calloc
[304] malloc::mem#0 = HEAP_TOP - malloc::size#0
to:malloc::@return
malloc::@return: scope:[malloc] from malloc
[305] return
to:@return
void* memset(void* memset::str , byte memset::c , word memset::num)
memset: scope:[memset] from calloc::@1 newline::@4
[306] memset::str#3 = phi( calloc::@1/memset::str#0, newline::@4/memset::str#8 )
[306] memset::num#2 = phi( calloc::@1/memset::num#0, newline::@4/$28 )
[307] if(memset::num#2<=0) goto memset::@return
to:memset::@1
memset::@1: scope:[memset] from memset
[308] memset::end#0 = (byte*)memset::str#3 + memset::num#2
[309] memset::dst#4 = (byte*)memset::str#3
to:memset::@2
memset::@2: scope:[memset] from memset::@1 memset::@3
[310] memset::dst#2 = phi( memset::@1/memset::dst#4, memset::@3/memset::dst#1 )
[311] if(memset::dst#2!=memset::end#0) goto memset::@3
to:memset::@return
memset::@return: scope:[memset] from memset memset::@2
[312] return
to:@return
memset::@3: scope:[memset] from memset::@2
[313] *memset::dst#2 = 0
[314] memset::dst#1 = ++ memset::dst#2
to:memset::@2
void uctoa(byte uctoa::value , byte* uctoa::buffer , byte uctoa::radix)
uctoa: scope:[uctoa] from printf_uchar::@1
[315] phi()
to:uctoa::@1
uctoa::@1: scope:[uctoa] from uctoa uctoa::@4
[316] uctoa::buffer#11 = phi( uctoa::@4/uctoa::buffer#14, uctoa/(byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
[316] uctoa::started#2 = phi( uctoa::@4/uctoa::started#4, uctoa/0 )
[316] uctoa::value#2 = phi( uctoa::@4/uctoa::value#6, uctoa/uctoa::value#1 )
[316] uctoa::digit#2 = phi( uctoa::@4/uctoa::digit#1, uctoa/0 )
[317] if(uctoa::digit#2<2-1) goto uctoa::@2
to:uctoa::@3
uctoa::@3: scope:[uctoa] from uctoa::@1
[318] *uctoa::buffer#11 = DIGITS[uctoa::value#2]
[319] uctoa::buffer#3 = ++ uctoa::buffer#11
[320] *uctoa::buffer#3 = 0
to:uctoa::@return
uctoa::@return: scope:[uctoa] from uctoa::@3
[321] return
to:@return
uctoa::@2: scope:[uctoa] from uctoa::@1
[322] uctoa::digit_value#0 = RADIX_HEXADECIMAL_VALUES_CHAR[uctoa::digit#2]
[323] if(0!=uctoa::started#2) goto uctoa::@5
to:uctoa::@7
uctoa::@7: scope:[uctoa] from uctoa::@2
[324] if(uctoa::value#2>=uctoa::digit_value#0) goto uctoa::@5
to:uctoa::@4
uctoa::@4: scope:[uctoa] from uctoa::@6 uctoa::@7
[325] uctoa::buffer#14 = phi( uctoa::@7/uctoa::buffer#11, uctoa::@6/uctoa::buffer#4 )
[325] uctoa::started#4 = phi( uctoa::@7/uctoa::started#2, uctoa::@6/1 )
[325] uctoa::value#6 = phi( uctoa::@7/uctoa::value#2, uctoa::@6/uctoa::value#0 )
[326] uctoa::digit#1 = ++ uctoa::digit#2
to:uctoa::@1
uctoa::@5: scope:[uctoa] from uctoa::@2 uctoa::@7
[327] uctoa_append::buffer#0 = uctoa::buffer#11
[328] uctoa_append::value#0 = uctoa::value#2
[329] uctoa_append::sub#0 = uctoa::digit_value#0
[330] call uctoa_append
[331] uctoa_append::return#0 = uctoa_append::value#2
to:uctoa::@6
uctoa::@6: scope:[uctoa] from uctoa::@5
[332] uctoa::value#0 = uctoa_append::return#0
[333] uctoa::buffer#4 = ++ uctoa::buffer#11
to:uctoa::@4
void printf_number_buffer(byte printf_number_buffer::buffer_sign , byte* printf_number_buffer::buffer_digits , byte printf_number_buffer::format_min_length , byte printf_number_buffer::format_justify_left , byte printf_number_buffer::format_sign_always , byte printf_number_buffer::format_zero_padding , byte printf_number_buffer::format_upper_case , byte printf_number_buffer::format_radix)
printf_number_buffer: scope:[printf_number_buffer] from printf_uchar::@2
[334] phi()
to:printf_number_buffer::@5
printf_number_buffer::@5: scope:[printf_number_buffer] from printf_number_buffer
[335] phi()
[336] call strlen
[337] strlen::return#2 = strlen::len#2
to:printf_number_buffer::@11
printf_number_buffer::@11: scope:[printf_number_buffer] from printf_number_buffer::@5
[338] printf_number_buffer::$19 = strlen::return#2
[339] printf_number_buffer::len#0 = (signed byte)printf_number_buffer::$19
[340] if(0==printf_number_buffer::buffer_sign#0) goto printf_number_buffer::@10
to:printf_number_buffer::@6
printf_number_buffer::@6: scope:[printf_number_buffer] from printf_number_buffer::@11
[341] printf_number_buffer::len#1 = ++ printf_number_buffer::len#0
to:printf_number_buffer::@10
printf_number_buffer::@10: scope:[printf_number_buffer] from printf_number_buffer::@11 printf_number_buffer::@6
[342] printf_number_buffer::len#2 = phi( printf_number_buffer::@11/printf_number_buffer::len#0, printf_number_buffer::@6/printf_number_buffer::len#1 )
[343] printf_number_buffer::padding#1 = (signed byte)printf_number_buffer::format_min_length#0 - printf_number_buffer::len#2
[344] if(printf_number_buffer::padding#1>=0) goto printf_number_buffer::@15
to:printf_number_buffer::@1
printf_number_buffer::@15: scope:[printf_number_buffer] from printf_number_buffer::@10
[345] phi()
to:printf_number_buffer::@1
printf_number_buffer::@1: scope:[printf_number_buffer] from printf_number_buffer::@10 printf_number_buffer::@15
[346] printf_number_buffer::padding#10 = phi( printf_number_buffer::@15/printf_number_buffer::padding#1, printf_number_buffer::@10/0 )
to:printf_number_buffer::@13
printf_number_buffer::@13: scope:[printf_number_buffer] from printf_number_buffer::@1
[347] if(0!=printf_number_buffer::format_zero_padding#0) goto printf_number_buffer::@2
to:printf_number_buffer::@12
printf_number_buffer::@12: scope:[printf_number_buffer] from printf_number_buffer::@13
[348] if(0!=printf_number_buffer::padding#10) goto printf_number_buffer::@7
to:printf_number_buffer::@2
printf_number_buffer::@7: scope:[printf_number_buffer] from printf_number_buffer::@12
[349] printf_padding::length#0 = (byte)printf_number_buffer::padding#10
[350] call printf_padding
to:printf_number_buffer::@2
printf_number_buffer::@2: scope:[printf_number_buffer] from printf_number_buffer::@12 printf_number_buffer::@13 printf_number_buffer::@7
[351] if(0==printf_number_buffer::buffer_sign#0) goto printf_number_buffer::@3
to:printf_number_buffer::@8
printf_number_buffer::@8: scope:[printf_number_buffer] from printf_number_buffer::@2
[352] cputc::c = printf_number_buffer::buffer_sign#0
[353] call cputc
to:printf_number_buffer::@3
printf_number_buffer::@3: scope:[printf_number_buffer] from printf_number_buffer::@2 printf_number_buffer::@8
[354] if(0==printf_number_buffer::format_zero_padding#0) goto printf_number_buffer::@4
to:printf_number_buffer::@14
printf_number_buffer::@14: scope:[printf_number_buffer] from printf_number_buffer::@3
[355] if(0!=printf_number_buffer::padding#10) goto printf_number_buffer::@9
to:printf_number_buffer::@4
printf_number_buffer::@9: scope:[printf_number_buffer] from printf_number_buffer::@14
[356] printf_padding::length#1 = (byte)printf_number_buffer::padding#10
[357] call printf_padding
to:printf_number_buffer::@4
printf_number_buffer::@4: scope:[printf_number_buffer] from printf_number_buffer::@14 printf_number_buffer::@3 printf_number_buffer::@9
[358] phi()
[359] call cputs
to:printf_number_buffer::@return
printf_number_buffer::@return: scope:[printf_number_buffer] from printf_number_buffer::@4
[360] return
to:@return
byte* cursorLocation()
cursorLocation: scope:[cursorLocation] from putchar setcursor
[361] cursorLocation::$3 = (word)*ROWCRS
[362] cursorLocation::$4 = cursorLocation::$3 << 2
[363] cursorLocation::$5 = cursorLocation::$4 + cursorLocation::$3
[364] cursorLocation::$0 = cursorLocation::$5 << 3
[365] cursorLocation::$1 = *SAVMSC + cursorLocation::$0
[366] cursorLocation::return#1 = cursorLocation::$1 + *COLCRS
to:cursorLocation::@return
cursorLocation::@return: scope:[cursorLocation] from cursorLocation
[367] return
to:@return
byte uctoa_append(byte* uctoa_append::buffer , byte uctoa_append::value , byte uctoa_append::sub)
uctoa_append: scope:[uctoa_append] from uctoa::@5
[368] phi()
to:uctoa_append::@1
uctoa_append::@1: scope:[uctoa_append] from uctoa_append uctoa_append::@2
[369] uctoa_append::digit#2 = phi( uctoa_append/0, uctoa_append::@2/uctoa_append::digit#1 )
[369] uctoa_append::value#2 = phi( uctoa_append/uctoa_append::value#0, uctoa_append::@2/uctoa_append::value#1 )
[370] if(uctoa_append::value#2>=uctoa_append::sub#0) goto uctoa_append::@2
to:uctoa_append::@3
uctoa_append::@3: scope:[uctoa_append] from uctoa_append::@1
[371] *uctoa_append::buffer#0 = DIGITS[uctoa_append::digit#2]
to:uctoa_append::@return
uctoa_append::@return: scope:[uctoa_append] from uctoa_append::@3
[372] return
to:@return
uctoa_append::@2: scope:[uctoa_append] from uctoa_append::@1
[373] uctoa_append::digit#1 = ++ uctoa_append::digit#2
[374] uctoa_append::value#1 = uctoa_append::value#2 - uctoa_append::sub#0
to:uctoa_append::@1
void printf_padding(byte printf_padding::pad , byte printf_padding::length)
printf_padding: scope:[printf_padding] from printf_number_buffer::@7 printf_number_buffer::@9
[375] printf_padding::pad#5 = phi( printf_number_buffer::@9/'0'at, printf_number_buffer::@7/' 'at )
[375] printf_padding::length#4 = phi( printf_number_buffer::@9/printf_padding::length#1, printf_number_buffer::@7/printf_padding::length#0 )
to:printf_padding::@1
printf_padding::@1: scope:[printf_padding] from printf_padding printf_padding::@3
[376] printf_padding::i#2 = phi( printf_padding/0, printf_padding::@3/printf_padding::i#1 )
[377] if(printf_padding::i#2<printf_padding::length#4) goto printf_padding::@2
to:printf_padding::@return
printf_padding::@return: scope:[printf_padding] from printf_padding::@1
[378] return
to:@return
printf_padding::@2: scope:[printf_padding] from printf_padding::@1
[379] cputc::c = printf_padding::pad#5
[380] call cputc
to:printf_padding::@3
printf_padding::@3: scope:[printf_padding] from printf_padding::@2
[381] printf_padding::i#1 = ++ printf_padding::i#2
to:printf_padding::@1

15115
src/test/ref/atarixl-md5b.log Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,431 @@
const word* COLCRS = (word*) 85
const nomodify byte* CRSINH = (byte*) 752
const byte* DIGITS[] = "0123456789abcdef"atz
const byte* HEAP_TOP = (byte*) 40960
const byte OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS = 1
const nomodify byte** OLDADR = (byte**) 94
const nomodify byte* OLDCHR = (byte*) 93
const byte RADIX::BINARY = 2
const byte RADIX::DECIMAL = $a
const byte RADIX::HEXADECIMAL = $10
const byte RADIX::OCTAL = 8
const byte* RADIX_HEXADECIMAL_VALUES_CHAR[] = { $10 }
const byte* ROWCRS = (byte*) 84
const nomodify byte* RTCLOK = (byte*) 18
const nomodify byte** SAVMSC = (byte**) 88
const byte SIZEOF_STRUCT_PRINTF_BUFFER_NUMBER = $c
void* calloc(word calloc::nitems , word calloc::size)
void* calloc::mem
word calloc::nitems
word calloc::nitems#0 nitems zp[2]:216 53.25
void* calloc::return
void* calloc::return#0 return zp[2]:181 35.5
void* calloc::return#2 return zp[2]:181 22.0
word calloc::size
void cputc(volatile byte cputc::c)
volatile byte cputc::c loadstore zp[1]:178 2.3853923693384613E10
byte cputc::convertToScreenCode1_return
byte cputc::convertToScreenCode1_return#0 reg byte x 1.833333333336667E11
byte* cputc::convertToScreenCode1_v
const byte* cputc::convertToScreenCode1_v#0 convertToScreenCode1_v = &cputc::c
void cputln()
void cputs(to_nomodify byte* cputs::s)
byte cputs::c
byte cputs::c#1 reg byte a 1.00000001E8
to_nomodify byte* cputs::s
to_nomodify byte* cputs::s#0 s zp[2]:183 5.00000005E7
to_nomodify byte* cputs::s#12 s zp[2]:183 1.55000002E8
to_nomodify byte* cputs::s#13 s zp[2]:183 1.0000001E7
byte* cursorLocation()
word~ cursorLocation::$0 zp[2]:213 2.00000000000002E14
byte*~ cursorLocation::$1 zp[2]:213 2.00000000000002E14
word~ cursorLocation::$3 zp[2]:213 1.500000000000015E14
word~ cursorLocation::$4 zp[2]:216 2.00000000000002E14
word~ cursorLocation::$5 zp[2]:213 2.00000000000002E14
byte* cursorLocation::return
byte* cursorLocation::return#0 return zp[2]:213 2.000000000002E12
byte* cursorLocation::return#1 return zp[2]:213 2.775000000000075E13
byte* cursorLocation::return#3 return zp[2]:213 2.0000000000002E13
dword h0
dword h0#10 h0 zp[4]:132 2.1338028169014085
dword h0#3 h0 zp[4]:132 40.4
dword h1
dword h1#10 h1 zp[4]:136 2.1188811188811187
dword h1#3 h1 zp[4]:136 50.5
dword h2
dword h2#10 h2 zp[4]:140 2.1041666666666665
dword h2#3 h2 zp[4]:140 67.33333333333333
dword h3
dword h3#10 h3 zp[4]:144 2.089655172413793
dword h3#3 h3 zp[4]:144 101.0
byte* heap_head
void main()
const byte* main::message = "The quick brown fox jumps over the lazy dog"at
const byte* main::s[$11] = "Calculating MD5
"at
const byte* main::s1[$d] = "Success MD5
"at
void* malloc(word malloc::size)
byte* malloc::mem
byte* malloc::mem#0 mem zp[2]:181 333.6666666666667
void* malloc::return
word malloc::size
word malloc::size#0 size zp[2]:181 1102.0
void md5(byte* md5::initial_msg , word md5::initial_len)
word~ md5::$0 zp[2]:179 22.0
word~ md5::$1 zp[2]:179 22.0
word~ md5::$2 zp[2]:179 22.0
byte~ md5::$25 reg byte a 2002.0
byte~ md5::$26 reg byte a 1251.25
dword~ md5::$27 zp[4]:165 667.3333333333334
dword~ md5::$28 zp[4]:208 2002.0
dword~ md5::$29 zp[4]:208 2002.0
word~ md5::$3 zp[2]:179 22.0
dword~ md5::$31 zp[4]:165 667.3333333333334
dword~ md5::$32 zp[4]:204 2002.0
dword~ md5::$33 zp[4]:204 2002.0
word~ md5::$35 zp[2]:171 2002.0
dword~ md5::$38 zp[4]:165 2002.0
word~ md5::$40 zp[2]:171 2002.0
dword~ md5::$43 zp[4]:165 2002.0
dword~ md5::$44 zp[4]:165 2002.0
dword~ md5::$71 zp[4]:200 2002.0
dword~ md5::$72 zp[4]:200 2002.0
dword~ md5::$73 zp[4]:200 400.4
dword~ md5::$74 zp[4]:149 750.75
dword~ md5::$75 zp[4]:149 2002.0
dword~ md5::$76 zp[4]:149 1001.0
byte~ md5::$77 reg byte a 2002.0
dword~ md5::$78 zp[4]:149 2002.0
word~ md5::$8 zp[2]:128 22.0
byte~ md5::$86 zp[1]:169 119.16666666666666
byte~ md5::$89 zp[1]:199 182.0
byte*~ md5::$91 zp[2]:183 22.0
dword md5::a
dword md5::a#0 a zp[4]:149 50.5
dword md5::a#11 a zp[4]:149 35.94871794871795
dword md5::a#59 a zp[4]:149 1001.0
dword md5::b
dword md5::b#0 b zp[4]:153 67.33333333333333
dword md5::b#1 b zp[4]:153 500.5
dword md5::b#10 b zp[4]:153 69.78030303030303
volatile dword md5::bits_len loadstore zp[4]:185 110.0
dword md5::c
dword md5::c#0 c zp[4]:157 101.0
dword md5::c#1 c zp[4]:157 43.52173913043478
dword md5::c#10 c zp[4]:157 80.1
dword md5::d
dword md5::d#0 d zp[4]:161 202.0
dword md5::d#1 d_1 zp[4]:195 43.52173913043478
dword md5::f
dword md5::f#1 f zp[4]:165 1001.0
dword md5::f#10 f zp[4]:165 143.0
dword md5::f#12 f zp[4]:165 222.44444444444446
dword md5::f#13 f zp[4]:165 222.44444444444446
dword md5::f#14 f zp[4]:165 250.25
byte md5::g
byte md5::g#10 g zp[1]:169 500.50000000000006
byte md5::g#2 g zp[1]:169 2002.0
byte md5::g#3 g zp[1]:169 2002.0
byte md5::g#38 g zp[1]:169 2002.0
byte md5::g#4 g zp[1]:169 2002.0
byte md5::i
byte md5::i#1 i zp[1]:148 667.3333333333334
byte md5::i#10 i zp[1]:148 98.58333333333331
word md5::initial_len
word md5::initial_len#0 initial_len zp[2]:128 3.0666666666666664
byte* md5::initial_msg
const dword* md5::k[] = { $d76aa478, $e8c7b756, $242070db, $c1bdceee, $f57c0faf, $4787c62a, $a8304613, $fd469501, $698098d8, $8b44f7af, $ffff5bb1, $895cd7be, $6b901122, $fd987193, $a679438e, $49b40821, $f61e2562, $c040b340, $265e5a51, $e9b6c7aa, $d62f105d, $2441453, $d8a1e681, $e7d3fbc8, $21e1cde6, $c33707d6, $f4d50d87, $455a14ed, $a9e3e905, $fcefa3f8, $676f02d9, $8d2a4c8a, $fffa3942, $8771f681, $6d9d6122, $fde5380c, $a4beea44, $4bdecfa9, $f6bb4b60, $bebfbc70, $289b7ec6, $eaa127fa, $d4ef3085, $4881d05, $d9d4d039, $e6db99e5, $1fa27cf8, $c4ac5665, $f4292244, $432aff97, $ab9423a7, $fc93a039, $655b59c3, $8f0ccc92, $ffeff47d, $85845dd1, $6fa87e4f, $fe2ce6e0, $a3014314, $4e0811a1, $f7537e82, $bd3af235, $2ad7d2bb, $eb86d391 }
dword md5::lr
dword md5::lr#0 lr zp[4]:200 500.5
byte* md5::msg
void* md5::msg#1 msg zp[2]:181 0.06962025316455696
word md5::new_len
word md5::new_len#0 new_len zp[2]:179 0.8271604938271605
signed word md5::offset
signed word md5::offset#1 offset zp[2]:130 202.0
signed word md5::offset#2 offset zp[2]:130 2.767123287671233
const byte* md5::r[] = { 7, $c, $11, $16, 7, $c, $11, $16, 7, $c, $11, $16, 7, $c, $11, $16, 5, 9, $e, $14, 5, 9, $e, $14, 5, 9, $e, $14, 5, 9, $e, $14, 4, $b, $10, $17, 4, $b, $10, $17, 4, $b, $10, $17, 4, $b, $10, $17, 6, $a, $f, $15, 6, $a, $f, $15, 6, $a, $f, $15, 6, $a, $f, $15 }
const byte* md5::s[3] = ": "at
const byte* md5::s1[4] = "f: "at
const byte* md5::s2[3] = "g:"at
const byte* md5::s3[7] = " w[g]:"at
const byte* md5::s4[3] = "L "at
const byte* md5::s5[4] = "r: "at
const byte* md5::s6[2] = "
"at
const byte* md5::s7[5] = "lr: "at
dword md5::temp
dword md5::temp#0 temp zp[4]:161 60.36764705882353
dword md5::temp#19 temp zp[4]:161 2002.0
dword* md5::w
byte* md5::w#0 w zp[2]:189 0.7214285714285714
void* memcpy(void* memcpy::destination , void* memcpy::source , word memcpy::num)
void* memcpy::destination
void* memcpy::destination#0 destination zp[2]:216 1.000000000001E12
byte* memcpy::destination#2 destination zp[2]:216 11.0
void* memcpy::destination#3 destination zp[2]:216 3.33333333341E11
void* memcpy::destination#7 destination zp[2]:216 22.0
void* memcpy::destination#8 destination zp[2]:216 22.0
byte* memcpy::dst
byte* memcpy::dst#1 dst zp[2]:216 1.0E16
byte* memcpy::dst#2 dst zp[2]:216 1.0003333333333334E16
byte* memcpy::dst#4 dst zp[2]:216 2.0000000000002E13
word memcpy::num
word memcpy::num#1 num zp[2]:128 11.0
word memcpy::num#3 num zp[2]:128 1.0000000000012E13
void* memcpy::return
void* memcpy::source
byte* memcpy::source#0 source zp[2]:171 5.000000000005E11
void* memcpy::source#3 source zp[2]:171 5.000000000005E11
void* memcpy::source#4 source zp[2]:171 2.000000000002E12
byte* memcpy::src
byte* memcpy::src#1 src zp[2]:171 2.0E16
byte* memcpy::src#2 src zp[2]:171 1.00025E16
byte* memcpy::src#4 src zp[2]:171 1.0000000000001E13
byte* memcpy::src_end
byte* memcpy::src_end#0 src_end zp[2]:213 1.25125E15
void* memset(void* memset::str , byte memset::c , word memset::num)
byte memset::c
byte* memset::dst
byte* memset::dst#1 dst zp[2]:173 2.0E16
byte* memset::dst#2 dst zp[2]:173 1.3336666666666668E16
byte* memset::dst#4 dst zp[2]:173 2.0000000000002E13
byte* memset::end
byte* memset::end#0 end zp[2]:216 1.6683333333333335E15
word memset::num
word memset::num#0 num zp[2]:216 101.0
word memset::num#2 num zp[2]:216 1.00000000000515E13
void* memset::return
void* memset::str
void* memset::str#0 str zp[2]:173 202.0
byte* memset::str#1 str zp[2]:173 1.000000000001E12
void* memset::str#3 str zp[2]:173 3.333333333673334E11
void* memset::str#8 str zp[2]:173 2.000000000002E12
byte mod16(word mod16::a)
word mod16::a
word mod16::a#0 a zp[2]:171 2002.0
word mod16::a#1 a zp[2]:171 2002.0
word mod16::a#2 a zp[2]:171 2002.0
word mod16::a#3 a zp[2]:171 13004.0
byte mod16::return
byte mod16::return#0 reg byte a 2600.8
byte mod16::return#2 reg byte a 2002.0
byte mod16::return#3 reg byte a 2002.0
byte mod16::return#4 reg byte a 2002.0
word mod16::t
word mod16::t#0 t zp[2]:171 20002.0
word mul3(byte mul3::a)
word~ mul3::$1 zp[2]:171 15001.5
word~ mul3::$2 zp[2]:216 20002.0
byte mul3::a
byte mul3::a#0 reg byte a 1001.0
word mul3::return
word mul3::return#0 return zp[2]:171 3667.333333333333
word mul3::return#2 return zp[2]:171 2002.0
word mul5(byte mul5::a)
word~ mul5::$1 zp[2]:171 15001.5
word~ mul5::$2 zp[2]:216 20002.0
byte mul5::a
byte mul5::a#0 reg byte a 1001.0
word mul5::return
word mul5::return#0 return zp[2]:171 3667.333333333333
word mul5::return#2 return zp[2]:171 2002.0
word mul7(byte mul7::a)
word~ mul7::$1 zp[2]:171 10001.0
word~ mul7::$2 zp[2]:213 20002.0
word~ mul7::$3 zp[2]:213 20002.0
word~ mul7::$4 zp[2]:213 20002.0
byte mul7::a
byte mul7::a#0 reg byte a 1001.0
word mul7::return
word mul7::return#0 return zp[2]:171 3667.333333333333
word mul7::return#2 return zp[2]:171 2002.0
void newline()
byte* newline::start
byte* newline::start#0 start zp[2]:173 6.000000000006001E11
void print32(volatile dword print32::l)
byte* print32::dp
const byte* print32::dp#1 dp = (byte*)&print32::l
volatile dword print32::l loadstore zp[4]:191 110110.0
struct printf_buffer_number printf_buffer loadstore mem[12] = {}
void printf_number_buffer(byte printf_number_buffer::buffer_sign , byte* printf_number_buffer::buffer_digits , byte printf_number_buffer::format_min_length , byte printf_number_buffer::format_justify_left , byte printf_number_buffer::format_sign_always , byte printf_number_buffer::format_zero_padding , byte printf_number_buffer::format_upper_case , byte printf_number_buffer::format_radix)
word~ printf_number_buffer::$19 zp[2]:128 1000001.0
struct printf_buffer_number printf_number_buffer::buffer
byte* printf_number_buffer::buffer_digits
const byte* printf_number_buffer::buffer_digits#0 buffer_digits = (byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS
byte printf_number_buffer::buffer_sign
byte printf_number_buffer::buffer_sign#0 buffer_sign zp[1]:212 155000.2
struct printf_format_number printf_number_buffer::format
byte printf_number_buffer::format_justify_left
byte printf_number_buffer::format_min_length
const byte printf_number_buffer::format_min_length#0 format_min_length = 2
byte printf_number_buffer::format_radix
byte printf_number_buffer::format_sign_always
byte printf_number_buffer::format_upper_case
byte printf_number_buffer::format_zero_padding
byte printf_number_buffer::format_zero_padding#0 format_zero_padding zp[1]:170 100000.14285714286
signed byte printf_number_buffer::len
signed byte printf_number_buffer::len#0 reg byte x 1500001.5
signed byte printf_number_buffer::len#1 reg byte x 2000002.0
signed byte printf_number_buffer::len#2 reg byte x 3000003.0
signed byte printf_number_buffer::padding
signed byte printf_number_buffer::padding#1 padding zp[1]:175 1000001.0
signed byte printf_number_buffer::padding#10 padding zp[1]:175 300000.30000000005
void printf_padding(byte printf_padding::pad , byte printf_padding::length)
byte printf_padding::i
byte printf_padding::i#1 i zp[1]:177 2.0000000002E10
byte printf_padding::i#2 i zp[1]:177 7.50000000075E9
byte printf_padding::length
byte printf_padding::length#0 length zp[1]:176 2000002.0
byte printf_padding::length#1 length zp[1]:176 2000002.0
byte printf_padding::length#4 length zp[1]:176 1.6670000005E9
byte printf_padding::pad
byte printf_padding::pad#5 pad zp[1]:215 1.6666666668333333E9
void printf_uchar(byte printf_uchar::uvalue , byte printf_uchar::format_min_length , byte printf_uchar::format_justify_left , byte printf_uchar::format_sign_always , byte printf_uchar::format_zero_padding , byte printf_uchar::format_upper_case , byte printf_uchar::format_radix)
struct printf_format_number printf_uchar::format
byte printf_uchar::format_justify_left
byte printf_uchar::format_min_length
byte printf_uchar::format_radix
byte printf_uchar::format_sign_always
byte printf_uchar::format_upper_case
byte printf_uchar::format_zero_padding
byte printf_uchar::format_zero_padding#10 format_zero_padding zp[1]:170 20000.2
byte printf_uchar::uvalue
byte printf_uchar::uvalue#0 reg byte x 20002.0
byte printf_uchar::uvalue#1 reg byte x 20002.0
byte printf_uchar::uvalue#10 reg byte x 71504.0
byte printf_uchar::uvalue#2 reg byte x 20002.0
byte printf_uchar::uvalue#3 reg byte x 20002.0
byte printf_uchar::uvalue#4 reg byte x 2002.0
byte printf_uchar::uvalue#5 reg byte x 2002.0
byte printf_uchar::uvalue#6 reg byte x 2002.0
void putchar(byte putchar::code)
byte putchar::code
byte* putchar::loc
byte* putchar::loc#0 loc zp[2]:213 1.000000000001E12
byte putchar::newChar
byte putchar::newChar#0 reg byte a 1.5000000000015E12
const byte* rawmap[$100] = kickasm {{ .var ht = Hashtable().put(0,64, 1,0, 2,32, 3,96) // the table for converting bit 6,7 into ora value
.for(var i=0; i<256; i++) {
.var idx = (i & $60) / 32
.var mask = i & $9f
.byte mask | ht.get(idx)
}
}}
void setcursor()
byte setcursor::c
byte setcursor::c#0 reg byte x 7.50000000000075E12
byte setcursor::c#1 reg byte a 2.0000000000002E13
byte* setcursor::loc
byte* setcursor::loc#0 loc zp[2]:213 1.0000000000001E13
word strlen(byte* strlen::str)
word strlen::len
word strlen::len#1 len zp[2]:128 1.00000001E8
word strlen::len#2 len zp[2]:128 4.0200001E7
word strlen::return
word strlen::return#2 return zp[2]:128 2000002.0
word strlen::return#3 return zp[2]:128 4.0
byte* strlen::str
byte* strlen::str#0 str zp[2]:183 2.00000002E8
byte* strlen::str#3 str zp[2]:183 1.0333333466666667E8
byte* strlen::str#5 str zp[2]:183 1.0000001E7
void uctoa(byte uctoa::value , byte* uctoa::buffer , byte uctoa::radix)
byte* uctoa::buffer
byte* uctoa::buffer#11 buffer zp[2]:173 3.3350000050000006E8
byte* uctoa::buffer#14 buffer zp[2]:173 1.5000000015E9
byte* uctoa::buffer#3 buffer zp[2]:173 2000002.0
byte* uctoa::buffer#4 buffer zp[2]:173 2.000000002E9
byte uctoa::digit
byte uctoa::digit#1 digit zp[1]:175 2.000000002E9
byte uctoa::digit#2 digit zp[1]:175 3.07692308E8
byte uctoa::digit_value
byte uctoa::digit_value#0 digit_value zp[1]:215 6.000000005999999E8
byte* uctoa::digit_values
byte uctoa::max_digits
byte uctoa::radix
byte uctoa::started
byte uctoa::started#2 started zp[1]:176 6.000000005999999E8
byte uctoa::started#4 started zp[1]:176 1.000000001E9
byte uctoa::value
byte uctoa::value#0 reg byte x 1.000000001E9
byte uctoa::value#1 reg byte x 550001.0
byte uctoa::value#2 reg byte x 6.670000010000001E8
byte uctoa::value#6 reg byte x 1.5000000015E9
byte uctoa_append(byte* uctoa_append::buffer , byte uctoa_append::value , byte uctoa_append::sub)
byte* uctoa_append::buffer
byte* uctoa_append::buffer#0 buffer zp[2]:173 1.37500000025E9
byte uctoa_append::digit
byte uctoa_append::digit#1 reg byte y 1.00000000000001E14
byte uctoa_append::digit#2 reg byte y 1.000050000000015E14
byte uctoa_append::return
byte uctoa_append::return#0 reg byte x 2.000000002E9
byte uctoa_append::sub
byte uctoa_append::sub#0 sub zp[1]:215 3.33335000000005E13
byte uctoa_append::value
byte uctoa_append::value#0 reg byte x 3.666666667333333E9
byte uctoa_append::value#1 reg byte x 2.00000000000002E14
byte uctoa_append::value#2 reg byte x 5.000183333333417E13
void waitFrames(signed byte waitFrames::frames)
signed byte waitFrames::frames
signed byte waitFrames::frames#0 reg byte x 2.0000002E7
signed byte waitFrames::frames#4 reg byte x 1.0000001E7
zp[2]:128 [ strlen::len#2 strlen::len#1 strlen::return#3 strlen::return#2 memcpy::num#3 memcpy::num#1 md5::initial_len#0 printf_number_buffer::$19 md5::$8 ]
zp[2]:130 [ md5::offset#2 md5::offset#1 ]
zp[4]:132 [ h0#10 h0#3 ]
zp[4]:136 [ h1#10 h1#3 ]
zp[4]:140 [ h2#10 h2#3 ]
zp[4]:144 [ h3#10 h3#3 ]
zp[1]:148 [ md5::i#10 md5::i#1 ]
zp[4]:149 [ md5::a#11 md5::a#59 md5::a#0 md5::$74 md5::$75 md5::$76 md5::$78 ]
zp[4]:153 [ md5::b#10 md5::b#1 md5::b#0 ]
zp[4]:157 [ md5::c#10 md5::c#1 md5::c#0 ]
zp[4]:161 [ md5::temp#0 md5::temp#19 md5::d#0 ]
zp[4]:165 [ md5::f#10 md5::f#12 md5::f#13 md5::f#14 md5::f#1 md5::$44 md5::$38 md5::$31 md5::$27 md5::$43 ]
zp[1]:169 [ md5::g#10 md5::g#2 md5::g#3 md5::g#4 md5::g#38 md5::$86 ]
reg byte x [ printf_uchar::uvalue#10 printf_uchar::uvalue#4 printf_uchar::uvalue#5 printf_uchar::uvalue#6 printf_uchar::uvalue#0 printf_uchar::uvalue#1 printf_uchar::uvalue#2 printf_uchar::uvalue#3 ]
zp[1]:170 [ printf_uchar::format_zero_padding#10 printf_number_buffer::format_zero_padding#0 ]
reg byte x [ waitFrames::frames#4 waitFrames::frames#0 ]
zp[2]:171 [ mod16::a#3 mod16::a#0 mod16::a#1 mod16::a#2 mul7::return#2 md5::$40 md5::$35 mod16::t#0 mul3::return#2 mul3::return#0 mul5::return#2 mul5::return#0 mul7::$1 mul7::return#0 mul3::$1 mul5::$1 memcpy::source#3 memcpy::source#4 memcpy::src#2 memcpy::src#4 memcpy::src#1 memcpy::source#0 ]
reg byte x [ uctoa::value#2 uctoa::value#6 uctoa::value#1 uctoa::value#0 ]
zp[2]:173 [ uctoa::buffer#11 uctoa::buffer#14 uctoa::buffer#4 uctoa::buffer#3 uctoa_append::buffer#0 memset::str#3 memset::str#0 memset::str#8 memset::dst#2 memset::dst#4 memset::dst#1 memset::str#1 newline::start#0 ]
reg byte x [ printf_number_buffer::len#2 printf_number_buffer::len#0 printf_number_buffer::len#1 ]
zp[1]:175 [ printf_number_buffer::padding#10 printf_number_buffer::padding#1 uctoa::digit#2 uctoa::digit#1 ]
reg byte x [ uctoa_append::value#2 uctoa_append::value#0 uctoa_append::value#1 ]
reg byte y [ uctoa_append::digit#2 uctoa_append::digit#1 ]
zp[1]:176 [ printf_padding::length#4 printf_padding::length#1 printf_padding::length#0 uctoa::started#2 uctoa::started#4 ]
zp[1]:177 [ printf_padding::i#2 printf_padding::i#1 ]
reg byte a [ cputs::c#1 ]
zp[1]:178 [ cputc::c ]
zp[2]:179 [ md5::$0 md5::$1 md5::$2 md5::$3 md5::new_len#0 ]
zp[2]:181 [ calloc::return#2 md5::msg#1 calloc::return#0 malloc::size#0 malloc::mem#0 ]
zp[2]:183 [ md5::$91 strlen::str#3 strlen::str#5 strlen::str#0 cputs::s#12 cputs::s#13 cputs::s#0 ]
zp[4]:185 [ md5::bits_len ]
zp[2]:189 [ md5::w#0 ]
zp[4]:191 [ print32::l ]
reg byte a [ md5::$25 ]
reg byte a [ md5::$26 ]
zp[4]:195 [ md5::d#1 ]
zp[1]:199 [ md5::$89 ]
zp[4]:200 [ md5::$71 md5::$72 md5::$73 md5::lr#0 ]
reg byte a [ md5::$77 ]
reg byte a [ mul7::a#0 ]
reg byte a [ mod16::return#4 ]
reg byte a [ mul3::a#0 ]
reg byte a [ mod16::return#3 ]
zp[4]:204 [ md5::$32 md5::$33 ]
reg byte a [ mul5::a#0 ]
reg byte a [ mod16::return#2 ]
zp[4]:208 [ md5::$28 md5::$29 ]
reg byte x [ cputc::convertToScreenCode1_return#0 ]
zp[1]:212 [ printf_number_buffer::buffer_sign#0 ]
reg byte a [ mod16::return#0 ]
zp[2]:213 [ cursorLocation::return#0 putchar::loc#0 cursorLocation::return#1 cursorLocation::return#3 setcursor::loc#0 cursorLocation::$0 cursorLocation::$1 cursorLocation::$3 cursorLocation::$5 mul7::$2 mul7::$3 mul7::$4 memcpy::src_end#0 ]
reg byte a [ putchar::newChar#0 ]
reg byte x [ setcursor::c#0 ]
reg byte a [ setcursor::c#1 ]
zp[1]:215 [ uctoa::digit_value#0 uctoa_append::sub#0 printf_padding::pad#5 ]
reg byte x [ uctoa_append::return#0 ]
zp[2]:216 [ cursorLocation::$4 mul5::$2 mul3::$2 memset::num#2 memset::num#0 calloc::nitems#0 memset::end#0 memcpy::destination#3 memcpy::destination#7 memcpy::destination#8 memcpy::destination#0 memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 memcpy::destination#2 ]
mem[12] [ printf_buffer ]