diff --git a/src/main/kc/stdlib/sqr.kc b/src/main/kc/stdlib/sqr.kc index 0e29af67e..b74120065 100644 --- a/src/main/kc/stdlib/sqr.kc +++ b/src/main/kc/stdlib/sqr.kc @@ -15,7 +15,7 @@ void init_squares() { SQUARES = malloc(NUM_SQUARES*sizeof(word)); word* squares = SQUARES; word sqr = 0; - for( byte i: 0..NUM_SQUARES-1) { + for(byte i=0;i= (number) 0 @@ -2859,12 +2875,12 @@ Adding number conversion cast (unumber) init_dist_screen::$7 in (number~) init_d Adding number conversion cast (unumber) $18 in (number~) init_dist_screen::$4 ← (number) $18 - (byte) init_dist_screen::y2#2 Adding number conversion cast (unumber) init_dist_screen::$4 in (number~) init_dist_screen::$4 ← (unumber)(number) $18 - (byte) init_dist_screen::y2#2 Adding number conversion cast (unumber) init_dist_screen::$5 in (number~) init_dist_screen::$5 ← (unumber~) init_dist_screen::$4 -Adding number conversion cast (unumber) init_dist_screen::$8 in (byte*) heap_head#43 ← phi( init_dist_screen::@2/(byte*) heap_head#46 init_dist_screen::@3/(byte*) heap_head#47 ) - (byte) NUM_SQUARES#33 ← phi( init_dist_screen::@2/(byte) NUM_SQUARES#37 init_dist_screen::@3/(byte) NUM_SQUARES#38 ) +Adding number conversion cast (unumber) init_dist_screen::$8 in (byte*) heap_head#44 ← phi( init_dist_screen::@2/(byte*) heap_head#47 init_dist_screen::@3/(byte*) heap_head#48 ) + (byte) NUM_SQUARES#35 ← phi( init_dist_screen::@2/(byte) NUM_SQUARES#39 init_dist_screen::@3/(byte) NUM_SQUARES#40 ) (byte) init_dist_screen::y#7 ← phi( init_dist_screen::@2/(byte) init_dist_screen::y#9 init_dist_screen::@3/(byte) init_dist_screen::y#10 ) (byte*) init_dist_screen::screen_bottomline#8 ← phi( init_dist_screen::@2/(byte*) init_dist_screen::screen_bottomline#11 init_dist_screen::@3/(byte*) init_dist_screen::screen_bottomline#12 ) (byte*) init_dist_screen::screen_topline#8 ← phi( init_dist_screen::@2/(byte*) init_dist_screen::screen_topline#11 init_dist_screen::@3/(byte*) init_dist_screen::screen_topline#12 ) - (word*) SQUARES#19 ← phi( init_dist_screen::@2/(word*) SQUARES#28 init_dist_screen::@3/(word*) SQUARES#29 ) + (word*) SQUARES#19 ← phi( init_dist_screen::@2/(word*) SQUARES#29 init_dist_screen::@3/(word*) SQUARES#30 ) (number~) init_dist_screen::$8 ← phi( init_dist_screen::@2/(unumber~) init_dist_screen::$7 init_dist_screen::@3/(unumber~) init_dist_screen::$5 ) Adding number conversion cast (unumber) $13 in (bool~) init_dist_screen::$10 ← (byte) init_dist_screen::x#2 <= (number) $13 Adding number conversion cast (unumber) 2 in (number~) init_dist_screen::$11 ← (byte) init_dist_screen::x#3 * (number) 2 @@ -2878,15 +2894,15 @@ Adding number conversion cast (unumber) init_dist_screen::$16 in (number~) init_ Adding number conversion cast (unumber) $27 in (number~) init_dist_screen::$13 ← (number) $27 - (byte) init_dist_screen::x2#2 Adding number conversion cast (unumber) init_dist_screen::$13 in (number~) init_dist_screen::$13 ← (unumber)(number) $27 - (byte) init_dist_screen::x2#2 Adding number conversion cast (unumber) init_dist_screen::$14 in (number~) init_dist_screen::$14 ← (unumber~) init_dist_screen::$13 -Adding number conversion cast (unumber) init_dist_screen::$17 in (byte*) heap_head#48 ← phi( init_dist_screen::@8/(byte*) heap_head#51 init_dist_screen::@9/(byte*) heap_head#52 ) +Adding number conversion cast (unumber) init_dist_screen::$17 in (byte*) heap_head#49 ← phi( init_dist_screen::@8/(byte*) heap_head#52 init_dist_screen::@9/(byte*) heap_head#53 ) (byte) init_dist_screen::y#11 ← phi( init_dist_screen::@8/(byte) init_dist_screen::y#12 init_dist_screen::@9/(byte) init_dist_screen::y#13 ) (byte) init_dist_screen::xb#4 ← phi( init_dist_screen::@8/(byte) init_dist_screen::xb#5 init_dist_screen::@9/(byte) init_dist_screen::xb#6 ) (byte*) init_dist_screen::screen_bottomline#7 ← phi( init_dist_screen::@8/(byte*) init_dist_screen::screen_bottomline#9 init_dist_screen::@9/(byte*) init_dist_screen::screen_bottomline#10 ) (byte) init_dist_screen::x#6 ← phi( init_dist_screen::@8/(byte) init_dist_screen::x#7 init_dist_screen::@9/(byte) init_dist_screen::x#8 ) (byte*) init_dist_screen::screen_topline#7 ← phi( init_dist_screen::@8/(byte*) init_dist_screen::screen_topline#9 init_dist_screen::@9/(byte*) init_dist_screen::screen_topline#10 ) - (byte) NUM_SQUARES#21 ← phi( init_dist_screen::@8/(byte) NUM_SQUARES#28 init_dist_screen::@9/(byte) NUM_SQUARES#29 ) + (byte) NUM_SQUARES#23 ← phi( init_dist_screen::@8/(byte) NUM_SQUARES#30 init_dist_screen::@9/(byte) NUM_SQUARES#31 ) (word) init_dist_screen::yds#2 ← phi( init_dist_screen::@8/(word) init_dist_screen::yds#3 init_dist_screen::@9/(word) init_dist_screen::yds#4 ) - (word*) SQUARES#18 ← phi( init_dist_screen::@8/(word*) SQUARES#31 init_dist_screen::@9/(word*) SQUARES#32 ) + (word*) SQUARES#18 ← phi( init_dist_screen::@8/(word*) SQUARES#32 init_dist_screen::@9/(word*) SQUARES#33 ) (number~) init_dist_screen::$17 ← phi( init_dist_screen::@8/(unumber~) init_dist_screen::$16 init_dist_screen::@9/(unumber~) init_dist_screen::$14 ) Adding number conversion cast (unumber) $100 in (bool~) make_plasma_charset::$2 ← (word) make_plasma_charset::c#2 < (number) $100 Adding number conversion cast (unumber) 8 in (bool~) make_plasma_charset::$4 ← (byte) make_plasma_charset::i#2 < (number) 8 @@ -2939,7 +2955,6 @@ Simplifying constant integer cast 0 Simplifying constant integer cast 1 Simplifying constant integer cast 1 Simplifying constant integer cast 1 -Simplifying constant integer cast 1 Simplifying constant integer cast 2 Simplifying constant integer cast 1 Simplifying constant integer cast 0 @@ -3016,7 +3031,6 @@ Finalized signed number type (signed byte) 0 Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 1 -Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 2 Finalized unsigned number type (byte) 1 Finalized signed number type (signed byte) 0 @@ -3084,8 +3098,7 @@ Finalized unsigned number type (byte) 8 Successful SSA optimization PassNFinalizeNumberTypeConversions Inferred type updated to byte in (unumber~) bsearch16u::$17 ← (byte) 1 * (const byte) SIZEOF_WORD Inferred type updated to byte in (unumber~) bsearch16u::$18 ← (byte) 1 * (const byte) SIZEOF_WORD -Inferred type updated to byte in (unumber~) init_squares::$2 ← (byte) NUM_SQUARES#7 - (byte) 1 -Inferred type updated to byte in (unumber~) init_squares::$3 ← (byte) init_squares::i#2 * (byte) 2 +Inferred type updated to byte in (unumber~) init_squares::$3 ← (byte) init_squares::i#3 * (byte) 2 Inferred type updated to byte in (unumber~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 Inferred type updated to word in (unumber~) atan2_16::$12 ← (word) $8000 - (word) atan2_16::angle#9 Inferred type updated to word in (unumber~) main::toD0181_$1 ← (word~) main::toD0181_$0 & (word) $3fff @@ -3154,13 +3167,17 @@ Alias (word*) bsearch16u::return#1 = (word*) bsearch16u::return#4 Alias (word*) bsearch16u::items#0 = (word*~) bsearch16u::$15 Alias (word*~) bsearch16u::$2 = (word*~) bsearch16u::$1 Alias (word*) bsearch16u::return#2 = (word*~) bsearch16u::$4 -Alias (byte*) heap_head#0 = (byte*) heap_head#36 (byte*) heap_head#31 (byte*) heap_head#23 +Alias (byte*) heap_head#0 = (byte*) heap_head#37 (byte*) heap_head#32 (byte*) heap_head#23 Alias (word) malloc::size#0 = (byte~) init_squares::$0 Alias (void*) malloc::return#2 = (void*) malloc::return#6 -Alias (byte) NUM_SQUARES#6 = (byte) NUM_SQUARES#7 +Alias (byte) NUM_SQUARES#14 = (byte) NUM_SQUARES#6 Alias (byte*) heap_head#14 = (byte*) heap_head#3 -Alias (byte*) heap_head#15 = (byte*) heap_head#25 (byte*) heap_head#4 -Alias (word*) SQUARES#17 = (word*) SQUARES#8 (word*) SQUARES#2 +Alias (word) init_squares::sqr#2 = (word) init_squares::sqr#3 +Alias (word*) init_squares::squares#2 = (word*) init_squares::squares#3 +Alias (byte) init_squares::i#2 = (byte) init_squares::i#3 +Alias (byte) NUM_SQUARES#13 = (byte) NUM_SQUARES#7 +Alias (byte*) heap_head#15 = (byte*) heap_head#31 (byte*) heap_head#25 (byte*) heap_head#4 +Alias (word*) SQUARES#17 = (word*) SQUARES#26 (word*) SQUARES#8 (word*) SQUARES#2 Alias (word) sqr::return#0 = (word) sqr::return#4 (word) sqr::return#1 Alias (word*) bsearch16u::return#3 = (word*) bsearch16u::return#5 Alias (word*) SQUARES#10 = (word*) SQUARES#11 @@ -3203,8 +3220,8 @@ Alias (word) atan2_16::angle#4 = (word~) atan2_16::$12 Alias (word) atan2_16::return#0 = (word) atan2_16::angle#10 (word) atan2_16::return#3 (word) atan2_16::return#1 Alias (word) atan2_16::angle#11 = (word) atan2_16::angle#15 Alias (word) atan2_16::angle#5 = (word~) atan2_16::$15 -Alias (byte) NUM_SQUARES#0 = (byte) NUM_SQUARES#39 (byte) NUM_SQUARES#35 (byte) NUM_SQUARES#30 (byte) NUM_SQUARES#25 (byte) NUM_SQUARES#22 (byte) NUM_SQUARES#17 -Alias (word*) SQUARES#0 = (word*) SQUARES#46 (word*) SQUARES#44 (word*) SQUARES#41 (word*) SQUARES#36 (word*) SQUARES#33 (word*) SQUARES#25 +Alias (byte) NUM_SQUARES#0 = (byte) NUM_SQUARES#41 (byte) NUM_SQUARES#37 (byte) NUM_SQUARES#32 (byte) NUM_SQUARES#27 (byte) NUM_SQUARES#24 (byte) NUM_SQUARES#19 +Alias (word*) SQUARES#0 = (word*) SQUARES#47 (word*) SQUARES#45 (word*) SQUARES#42 (word*) SQUARES#37 (word*) SQUARES#34 (word*) SQUARES#25 Alias (byte*) print_line_cursor#0 = (byte*) print_screen#0 (byte*) print_char_cursor#0 (byte*) print_line_cursor#34 (byte*) print_char_cursor#41 (byte*) print_screen#12 (byte*) print_line_cursor#30 (byte*) print_char_cursor#37 (byte*) print_screen#11 (byte*) print_line_cursor#27 (byte*) print_char_cursor#35 (byte*) print_screen#10 (byte*) print_line_cursor#24 (byte*) print_char_cursor#32 (byte*) print_screen#9 (byte*) print_line_cursor#18 (byte*) print_char_cursor#25 (byte*) print_screen#8 Alias (byte*) print_char_cursor#1 = (byte*) print_char_cursor#12 (byte*) print_char_cursor#2 Alias (byte*) print_line_cursor#1 = (byte*) print_screen#2 (byte*) print_screen#1 (byte*) print_char_cursor#3 (byte*) print_line_cursor#8 (byte*) print_char_cursor#13 (byte*) print_line_cursor#2 (byte*) print_char_cursor#4 @@ -3213,7 +3230,7 @@ Alias (void*) malloc::return#3 = (void*) malloc::return#7 Alias (byte*) heap_head#16 = (byte*) heap_head#5 Alias (void*) malloc::return#4 = (void*) malloc::return#8 Alias (byte*) SCREEN_DIST#0 = (byte*) SCREEN_DIST#12 (byte*) SCREEN_DIST#8 (byte*) SCREEN_DIST#3 -Alias (byte*) heap_head#17 = (byte*) heap_head#6 (byte*) heap_head#35 (byte*) heap_head#30 +Alias (byte*) heap_head#17 = (byte*) heap_head#6 (byte*) heap_head#36 (byte*) heap_head#30 Alias (byte*) SCREEN_ANGLE#1 = (byte*) SCREEN_ANGLE#3 (byte*) SCREEN_ANGLE#16 (byte*) SCREEN_ANGLE#13 (byte*) SCREEN_ANGLE#9 Alias (byte*) print_line_cursor#14 = (byte*) print_line_cursor#19 (byte*) print_line_cursor#25 Alias (byte*) print_char_cursor#21 = (byte*) print_char_cursor#26 (byte*) print_char_cursor#33 @@ -3221,18 +3238,18 @@ Alias (byte*) print_screen#5 = (byte*) print_screen#6 (byte*) print_screen#7 Alias (byte) sin_offset_x#19 = (byte) sin_offset_x#29 (byte) sin_offset_x#30 (byte) sin_offset_x#27 (byte) sin_offset_x#23 Alias (byte) sin_offset_y#19 = (byte) sin_offset_y#29 (byte) sin_offset_y#30 (byte) sin_offset_y#27 (byte) sin_offset_y#23 Alias (byte*) SCREEN_DIST#1 = (byte*) SCREEN_DIST#18 (byte*) SCREEN_DIST#16 (byte*) SCREEN_DIST#13 (byte*) SCREEN_DIST#9 -Alias (byte) NUM_SQUARES#1 = (byte) NUM_SQUARES#9 (byte) NUM_SQUARES#31 (byte) NUM_SQUARES#23 (byte) NUM_SQUARES#18 -Alias (byte*) heap_head#18 = (byte*) heap_head#7 (byte*) heap_head#41 (byte*) heap_head#37 (byte*) heap_head#32 -Alias (word*) SQUARES#12 = (word*) SQUARES#3 (word*) SQUARES#42 (word*) SQUARES#34 (word*) SQUARES#26 +Alias (byte) NUM_SQUARES#1 = (byte) NUM_SQUARES#9 (byte) NUM_SQUARES#33 (byte) NUM_SQUARES#25 (byte) NUM_SQUARES#20 +Alias (byte*) heap_head#18 = (byte*) heap_head#7 (byte*) heap_head#42 (byte*) heap_head#38 (byte*) heap_head#33 +Alias (word*) SQUARES#12 = (word*) SQUARES#3 (word*) SQUARES#43 (word*) SQUARES#35 (word*) SQUARES#27 Alias (byte*) print_line_cursor#20 = (byte*) print_line_cursor#3 (byte*) print_line_cursor#9 Alias (byte*) print_char_cursor#14 = (byte*) print_char_cursor#5 (byte*) print_char_cursor#27 Alias (byte) sin_offset_x#14 = (byte) sin_offset_x#16 (byte) sin_offset_x#9 (byte) sin_offset_x#2 Alias (byte) sin_offset_y#14 = (byte) sin_offset_y#16 (byte) sin_offset_y#9 (byte) sin_offset_y#2 Alias (byte*) SCREEN_ANGLE#10 = (byte*) SCREEN_ANGLE#4 (byte*) SCREEN_ANGLE#7 (byte*) SCREEN_ANGLE#14 (byte*) SCREEN_ANGLE#11 (byte*) SCREEN_ANGLE#8 (byte*) SCREEN_ANGLE#5 (byte*) SCREEN_ANGLE#18 (byte*) SCREEN_ANGLE#17 (byte*) SCREEN_ANGLE#15 Alias (byte*) SCREEN_DIST#10 = (byte*) SCREEN_DIST#4 (byte*) SCREEN_DIST#6 (byte*) SCREEN_DIST#14 (byte*) SCREEN_DIST#11 (byte*) SCREEN_DIST#7 (byte*) SCREEN_DIST#5 (byte*) SCREEN_DIST#19 (byte*) SCREEN_DIST#17 (byte*) SCREEN_DIST#15 -Alias (byte) NUM_SQUARES#10 = (byte) NUM_SQUARES#46 (byte) NUM_SQUARES#15 (byte) NUM_SQUARES#45 (byte) NUM_SQUARES#44 (byte) NUM_SQUARES#42 (byte) NUM_SQUARES#40 (byte) NUM_SQUARES#36 (byte) NUM_SQUARES#32 (byte) NUM_SQUARES#24 (byte) NUM_SQUARES#19 (byte) NUM_SQUARES#2 -Alias (byte*) heap_head#19 = (byte*) heap_head#57 (byte*) heap_head#27 (byte*) heap_head#56 (byte*) heap_head#55 (byte*) heap_head#53 (byte*) heap_head#49 (byte*) heap_head#45 (byte*) heap_head#42 (byte*) heap_head#38 (byte*) heap_head#33 (byte*) heap_head#8 -Alias (word*) SQUARES#13 = (word*) SQUARES#51 (word*) SQUARES#22 (word*) SQUARES#50 (word*) SQUARES#49 (word*) SQUARES#48 (word*) SQUARES#47 (word*) SQUARES#45 (word*) SQUARES#43 (word*) SQUARES#35 (word*) SQUARES#27 (word*) SQUARES#4 +Alias (byte) NUM_SQUARES#10 = (byte) NUM_SQUARES#48 (byte) NUM_SQUARES#17 (byte) NUM_SQUARES#47 (byte) NUM_SQUARES#46 (byte) NUM_SQUARES#44 (byte) NUM_SQUARES#42 (byte) NUM_SQUARES#38 (byte) NUM_SQUARES#34 (byte) NUM_SQUARES#26 (byte) NUM_SQUARES#21 (byte) NUM_SQUARES#2 +Alias (byte*) heap_head#19 = (byte*) heap_head#58 (byte*) heap_head#27 (byte*) heap_head#57 (byte*) heap_head#56 (byte*) heap_head#54 (byte*) heap_head#50 (byte*) heap_head#46 (byte*) heap_head#43 (byte*) heap_head#39 (byte*) heap_head#34 (byte*) heap_head#8 +Alias (word*) SQUARES#13 = (word*) SQUARES#52 (word*) SQUARES#22 (word*) SQUARES#51 (word*) SQUARES#50 (word*) SQUARES#49 (word*) SQUARES#48 (word*) SQUARES#46 (word*) SQUARES#44 (word*) SQUARES#36 (word*) SQUARES#28 (word*) SQUARES#4 Alias (byte*) print_line_cursor#10 = (byte*) print_line_cursor#48 (byte*) print_line_cursor#15 (byte*) print_line_cursor#46 (byte*) print_line_cursor#43 (byte*) print_line_cursor#40 (byte*) print_line_cursor#38 (byte*) print_line_cursor#35 (byte*) print_line_cursor#31 (byte*) print_line_cursor#26 (byte*) print_line_cursor#21 (byte*) print_line_cursor#4 Alias (byte*) print_char_cursor#15 = (byte*) print_char_cursor#53 (byte*) print_char_cursor#22 (byte*) print_char_cursor#52 (byte*) print_char_cursor#50 (byte*) print_char_cursor#47 (byte*) print_char_cursor#44 (byte*) print_char_cursor#42 (byte*) print_char_cursor#38 (byte*) print_char_cursor#34 (byte*) print_char_cursor#28 (byte*) print_char_cursor#6 Alias (byte) sin_offset_x#0 = (byte) sin_offset_x#7 (byte) sin_offset_x#24 (byte) sin_offset_x#21 (byte) sin_offset_x#15 @@ -3273,17 +3290,17 @@ Alias (word) atan2_16::return#2 = (word) atan2_16::return#4 Alias (word) init_angle_screen::angle_w#0 = (word~) init_angle_screen::$10 Alias (byte) init_angle_screen::ang_w#0 = (byte~) init_angle_screen::$12 Alias (byte*) init_dist_screen::screen#1 = (byte*) init_dist_screen::screen#2 (byte*) init_dist_screen::screen_topline#0 -Alias (byte) NUM_SQUARES#3 = (byte) NUM_SQUARES#43 +Alias (byte) NUM_SQUARES#3 = (byte) NUM_SQUARES#45 Alias (byte*) heap_head#20 = (byte*) heap_head#9 Alias (word*) SQUARES#14 = (word*) SQUARES#5 Alias (byte*) init_dist_screen::screen_bottomline#0 = (byte*~) init_dist_screen::$1 Alias (byte) init_dist_screen::y2#0 = (byte~) init_dist_screen::$2 (byte) init_dist_screen::y2#1 (byte) init_dist_screen::y2#2 -Alias (word*) SQUARES#28 = (word*) SQUARES#37 (word*) SQUARES#29 +Alias (word*) SQUARES#29 = (word*) SQUARES#38 (word*) SQUARES#30 Alias (byte*) init_dist_screen::screen_topline#11 = (byte*) init_dist_screen::screen_topline#14 (byte*) init_dist_screen::screen_topline#12 Alias (byte*) init_dist_screen::screen_bottomline#11 = (byte*) init_dist_screen::screen_bottomline#14 (byte*) init_dist_screen::screen_bottomline#12 Alias (byte) init_dist_screen::y#10 = (byte) init_dist_screen::y#9 (byte) init_dist_screen::y#2 -Alias (byte) NUM_SQUARES#37 = (byte) NUM_SQUARES#41 (byte) NUM_SQUARES#38 -Alias (byte*) heap_head#46 = (byte*) heap_head#50 (byte*) heap_head#47 +Alias (byte) NUM_SQUARES#39 = (byte) NUM_SQUARES#43 (byte) NUM_SQUARES#40 +Alias (byte*) heap_head#47 = (byte*) heap_head#51 (byte*) heap_head#48 Alias (byte~) init_dist_screen::$7 = (byte~) init_dist_screen::$6 Alias (byte~) init_dist_screen::$5 = (byte~) init_dist_screen::$4 Alias (byte) init_dist_screen::yd#0 = (byte~) init_dist_screen::$8 @@ -3291,33 +3308,33 @@ Alias (word) sqr::return#2 = (word) sqr::return#5 Alias (byte*) init_dist_screen::screen_topline#6 = (byte*) init_dist_screen::screen_topline#8 Alias (byte*) init_dist_screen::screen_bottomline#6 = (byte*) init_dist_screen::screen_bottomline#8 Alias (byte) init_dist_screen::y#5 = (byte) init_dist_screen::y#7 -Alias (byte) NUM_SQUARES#26 = (byte) NUM_SQUARES#33 -Alias (byte*) heap_head#39 = (byte*) heap_head#43 -Alias (word*) SQUARES#19 = (word*) SQUARES#38 +Alias (byte) NUM_SQUARES#28 = (byte) NUM_SQUARES#35 +Alias (byte*) heap_head#40 = (byte*) heap_head#44 +Alias (word*) SQUARES#19 = (word*) SQUARES#39 Alias (word) init_dist_screen::yds#0 = (word~) init_dist_screen::$9 Alias (byte) init_dist_screen::x#2 = (byte) init_dist_screen::x#3 (byte) init_dist_screen::x#7 (byte) init_dist_screen::x#8 -Alias (word*) SQUARES#15 = (word*) SQUARES#40 (word*) SQUARES#30 (word*) SQUARES#24 (word*) SQUARES#31 (word*) SQUARES#32 (word*) SQUARES#6 +Alias (word*) SQUARES#15 = (word*) SQUARES#41 (word*) SQUARES#31 (word*) SQUARES#24 (word*) SQUARES#32 (word*) SQUARES#33 (word*) SQUARES#6 Alias (word) init_dist_screen::yds#3 = (word) init_dist_screen::yds#5 (word) init_dist_screen::yds#6 (word) init_dist_screen::yds#4 -Alias (byte) NUM_SQUARES#11 = (byte) NUM_SQUARES#34 (byte) NUM_SQUARES#20 (byte) NUM_SQUARES#16 (byte) NUM_SQUARES#28 (byte) NUM_SQUARES#29 (byte) NUM_SQUARES#4 +Alias (byte) NUM_SQUARES#11 = (byte) NUM_SQUARES#36 (byte) NUM_SQUARES#22 (byte) NUM_SQUARES#18 (byte) NUM_SQUARES#30 (byte) NUM_SQUARES#31 (byte) NUM_SQUARES#4 Alias (byte*) init_dist_screen::screen_topline#10 = (byte*) init_dist_screen::screen_topline#13 (byte*) init_dist_screen::screen_topline#4 (byte*) init_dist_screen::screen_topline#2 (byte*) init_dist_screen::screen_topline#9 Alias (byte*) init_dist_screen::screen_bottomline#10 = (byte*) init_dist_screen::screen_bottomline#13 (byte*) init_dist_screen::screen_bottomline#4 (byte*) init_dist_screen::screen_bottomline#2 (byte*) init_dist_screen::screen_bottomline#9 Alias (byte) init_dist_screen::xb#5 = (byte) init_dist_screen::xb#7 (byte) init_dist_screen::xb#8 (byte) init_dist_screen::xb#6 Alias (byte) init_dist_screen::y#12 = (byte) init_dist_screen::y#14 (byte) init_dist_screen::y#4 (byte) init_dist_screen::y#3 (byte) init_dist_screen::y#13 -Alias (byte*) heap_head#10 = (byte*) heap_head#54 (byte*) heap_head#34 (byte*) heap_head#29 (byte*) heap_head#51 (byte*) heap_head#52 (byte*) heap_head#21 +Alias (byte*) heap_head#10 = (byte*) heap_head#55 (byte*) heap_head#35 (byte*) heap_head#29 (byte*) heap_head#52 (byte*) heap_head#53 (byte*) heap_head#21 Alias (byte) init_dist_screen::x2#0 = (byte~) init_dist_screen::$11 (byte) init_dist_screen::x2#1 (byte) init_dist_screen::x2#2 Alias (byte~) init_dist_screen::$16 = (byte~) init_dist_screen::$15 Alias (byte~) init_dist_screen::$14 = (byte~) init_dist_screen::$13 Alias (byte) init_dist_screen::xd#0 = (byte~) init_dist_screen::$17 Alias (word) sqr::return#3 = (word) sqr::return#6 Alias (word) init_dist_screen::yds#1 = (word) init_dist_screen::yds#2 (word) init_dist_screen::yds#7 -Alias (word*) SQUARES#18 = (word*) SQUARES#20 (word*) SQUARES#39 -Alias (byte) NUM_SQUARES#13 = (byte) NUM_SQUARES#21 (byte) NUM_SQUARES#27 +Alias (word*) SQUARES#18 = (word*) SQUARES#20 (word*) SQUARES#40 +Alias (byte) NUM_SQUARES#15 = (byte) NUM_SQUARES#23 (byte) NUM_SQUARES#29 Alias (byte*) init_dist_screen::screen_topline#3 = (byte*) init_dist_screen::screen_topline#5 (byte*) init_dist_screen::screen_topline#7 Alias (byte) init_dist_screen::x#4 = (byte) init_dist_screen::x#5 (byte) init_dist_screen::x#6 Alias (byte*) init_dist_screen::screen_bottomline#3 = (byte*) init_dist_screen::screen_bottomline#5 (byte*) init_dist_screen::screen_bottomline#7 Alias (byte) init_dist_screen::xb#2 = (byte) init_dist_screen::xb#3 (byte) init_dist_screen::xb#4 Alias (byte) init_dist_screen::y#11 = (byte) init_dist_screen::y#8 (byte) init_dist_screen::y#6 -Alias (byte*) heap_head#40 = (byte*) heap_head#44 (byte*) heap_head#48 +Alias (byte*) heap_head#41 = (byte*) heap_head#45 (byte*) heap_head#49 Alias (word) init_dist_screen::xds#0 = (word~) init_dist_screen::$18 Alias (word) init_dist_screen::ds#0 = (word~) init_dist_screen::$19 Alias (byte) sqrt::return#2 = (byte) sqrt::return#4 @@ -3369,21 +3386,21 @@ Alias (word) atan2_16::angle#14 = (word) atan2_16::angle#16 Alias (signed word) atan2_16::x#11 = (signed word) atan2_16::x#14 (signed word) atan2_16::x#8 Alias (signed word) atan2_16::y#10 = (signed word) atan2_16::y#16 (signed word) atan2_16::y#8 Alias (signed word) atan2_16::y#4 = (signed word) atan2_16::y#5 -Alias (word*) SQUARES#19 = (word*) SQUARES#28 +Alias (word*) SQUARES#19 = (word*) SQUARES#29 Alias (byte*) init_dist_screen::screen_topline#11 = (byte*) init_dist_screen::screen_topline#6 Alias (byte*) init_dist_screen::screen_bottomline#11 = (byte*) init_dist_screen::screen_bottomline#6 Alias (byte) init_dist_screen::y#10 = (byte) init_dist_screen::y#5 -Alias (byte) NUM_SQUARES#26 = (byte) NUM_SQUARES#37 -Alias (byte*) heap_head#39 = (byte*) heap_head#46 +Alias (byte) NUM_SQUARES#28 = (byte) NUM_SQUARES#39 +Alias (byte*) heap_head#40 = (byte*) heap_head#47 Alias (word*) SQUARES#15 = (word*) SQUARES#18 Alias (word) init_dist_screen::yds#1 = (word) init_dist_screen::yds#3 -Alias (byte) NUM_SQUARES#11 = (byte) NUM_SQUARES#13 +Alias (byte) NUM_SQUARES#11 = (byte) NUM_SQUARES#15 Alias (byte*) init_dist_screen::screen_topline#10 = (byte*) init_dist_screen::screen_topline#3 Alias (byte) init_dist_screen::x#2 = (byte) init_dist_screen::x#4 Alias (byte*) init_dist_screen::screen_bottomline#10 = (byte*) init_dist_screen::screen_bottomline#3 Alias (byte) init_dist_screen::xb#2 = (byte) init_dist_screen::xb#5 Alias (byte) init_dist_screen::y#11 = (byte) init_dist_screen::y#12 -Alias (byte*) heap_head#10 = (byte*) heap_head#40 +Alias (byte*) heap_head#10 = (byte*) heap_head#41 Alias (byte) make_plasma_charset::ii#2 = (byte) make_plasma_charset::ii#3 Alias (word) make_plasma_charset::c#10 = (word) make_plasma_charset::c#13 Alias (byte) make_plasma_charset::i#3 = (byte) make_plasma_charset::i#5 @@ -3402,9 +3419,10 @@ Identical Phi Values (byte) bsearch16u::num#7 (byte) bsearch16u::num#2 Identical Phi Values (word*) bsearch16u::items#7 (word*) bsearch16u::items#1 Identical Phi Values (word) bsearch16u::key#4 (word) bsearch16u::key#0 Identical Phi Values (word) bsearch16u::key#1 (word) bsearch16u::key#4 -Identical Phi Values (byte) NUM_SQUARES#6 (byte) NUM_SQUARES#3 +Identical Phi Values (byte) NUM_SQUARES#14 (byte) NUM_SQUARES#3 Identical Phi Values (byte*) heap_head#24 (byte*) heap_head#28 Identical Phi Values (byte*) heap_head#14 (byte*) heap_head#1 +Identical Phi Values (byte) NUM_SQUARES#13 (byte) NUM_SQUARES#14 Identical Phi Values (byte*) heap_head#15 (byte*) heap_head#14 Identical Phi Values (word*) SQUARES#17 (word*) SQUARES#1 Identical Phi Values (word) sqrt::val#1 (word) sqrt::val#0 @@ -3424,7 +3442,7 @@ Identical Phi Values (byte*) print_line_cursor#1 (byte*) print_screen#3 Identical Phi Values (byte*) heap_head#16 (byte*) heap_head#1 Identical Phi Values (byte*) heap_head#17 (byte*) heap_head#1 Identical Phi Values (byte*) SCREEN_DIST#1 (byte*) SCREEN_DIST#0 -Identical Phi Values (byte) NUM_SQUARES#14 (byte) NUM_SQUARES#0 +Identical Phi Values (byte) NUM_SQUARES#16 (byte) NUM_SQUARES#0 Identical Phi Values (byte*) heap_head#26 (byte*) heap_head#17 Identical Phi Values (word*) SQUARES#21 (word*) SQUARES#0 Identical Phi Values (byte*) SCREEN_ANGLE#1 (byte*) SCREEN_ANGLE#0 @@ -3471,8 +3489,8 @@ Identical Phi Values (word*) SQUARES#14 (word*) SQUARES#17 Identical Phi Values (byte*) init_dist_screen::screen_topline#10 (byte*) init_dist_screen::screen_topline#11 Identical Phi Values (byte*) init_dist_screen::screen_bottomline#10 (byte*) init_dist_screen::screen_bottomline#11 Identical Phi Values (byte) init_dist_screen::y#11 (byte) init_dist_screen::y#10 -Identical Phi Values (byte) NUM_SQUARES#11 (byte) NUM_SQUARES#26 -Identical Phi Values (byte*) heap_head#10 (byte*) heap_head#39 +Identical Phi Values (byte) NUM_SQUARES#11 (byte) NUM_SQUARES#28 +Identical Phi Values (byte*) heap_head#10 (byte*) heap_head#40 Identical Phi Values (word*) SQUARES#15 (word*) SQUARES#19 Identical Phi Values (word) init_dist_screen::yds#1 (word) init_dist_screen::yds#0 Identical Phi Values (byte*) print_screen#3 (byte*) print_screen#5 @@ -3507,8 +3525,8 @@ Identical Phi Values (byte*) doplasma::sin_y#2 (byte*) doplasma::sin_y#0 Identical Phi Values (byte) sin_offset_x#26 (byte) sin_offset_x#10 Identical Phi Values (byte) sin_offset_y#26 (byte) sin_offset_y#10 Identical Phi Values (word*) SQUARES#19 (word*) SQUARES#1 -Identical Phi Values (byte) NUM_SQUARES#26 (byte) NUM_SQUARES#3 -Identical Phi Values (byte*) heap_head#39 (byte*) heap_head#1 +Identical Phi Values (byte) NUM_SQUARES#28 (byte) NUM_SQUARES#3 +Identical Phi Values (byte*) heap_head#40 (byte*) heap_head#1 Identical Phi Values (word) make_plasma_charset::c#11 (word) make_plasma_charset::c#2 Identical Phi Values (byte*) make_plasma_charset::charset#11 (byte*) make_plasma_charset::charset#10 Identical Phi Values (byte*) print_char_cursor#20 (byte*) print_char_cursor#18 @@ -3524,7 +3542,7 @@ Simple Condition (bool~) bsearch16u::$5 [33] if((byte) bsearch16u::num#3>(byte) Simple Condition (bool~) bsearch16u::$12 [45] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@9 Simple Condition (bool~) bsearch16u::$0 [48] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@1 Simple Condition (bool~) bsearch16u::$14 [52] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 -Simple Condition (bool~) init_squares::$5 [97] if((byte) init_squares::i#1!=rangelast(0,init_squares::$2)) goto init_squares::@1 +Simple Condition (bool~) init_squares::$2 [90] if((byte) init_squares::i#2<(byte) NUM_SQUARES#3) goto init_squares::@2 Simple Condition (bool~) atan2_16::$0 [127] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 Simple Condition (bool~) atan2_16::$5 [136] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 Simple Condition (bool~) atan2_16::$17 [149] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16 @@ -3617,8 +3635,8 @@ Rewriting conditional comparison [373] if((byte) init_angle_screen::x#2<=(byte) Rewriting conditional comparison [445] if((byte) init_dist_screen::x#2<=(byte) $13) goto init_dist_screen::@6 De-inlining pointer[w] to *(pointer+w) [531] *((const byte*) make_plasma_charset::charset#0 + (word~) make_plasma_charset::$11) ← (byte) make_plasma_charset::b#2 Successful SSA optimization Pass2DeInlineWordDerefIdx -Eliminating unused variable (void*) memset::return#2 and assignment [105] (void*) memset::return#2 ← (void*) memset::str#3 -Eliminating unused variable (void*) memset::return#3 and assignment [126] (void*) memset::return#3 ← (void*) memset::str#3 +Eliminating unused variable (void*) memset::return#2 and assignment [104] (void*) memset::return#2 ← (void*) memset::str#3 +Eliminating unused variable (void*) memset::return#3 and assignment [125] (void*) memset::return#3 ← (void*) memset::str#3 Eliminating unused constant (const byte) NUM_SQUARES#0 Eliminating unused constant (const word*) SQUARES#0 Successful SSA optimization PassNEliminateUnusedVars @@ -3657,29 +3675,17 @@ Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) $d Successful SSA optimization PassNFinalizeNumberTypeConversions Constant right-side identified [34] (word) malloc::size#0 ← (const byte) NUM_SQUARES#3 * (const byte) SIZEOF_WORD -Constant right-side identified [40] (byte~) init_squares::$2 ← (const byte) NUM_SQUARES#3 - (byte) 1 -Constant right-side identified [127] (word~) main::toD0181_$1 ← (const word) main::toD0181_$0 & (word) $3fff -Constant right-side identified [130] (byte~) main::toD0181_$5 ← > (const word) main::toD0181_$4 -Constant right-side identified [136] (word~) main::toD0182_$1 ← (const word) main::toD0182_$0 & (word) $3fff -Constant right-side identified [139] (byte~) main::toD0182_$5 ← > (const word) main::toD0182_$4 +Constant right-side identified [126] (word~) main::toD0181_$1 ← (const word) main::toD0181_$0 & (word) $3fff +Constant right-side identified [129] (byte~) main::toD0181_$5 ← > (const word) main::toD0181_$4 +Constant right-side identified [135] (word~) main::toD0182_$1 ← (const word) main::toD0182_$0 & (word) $3fff +Constant right-side identified [138] (byte~) main::toD0182_$5 ← > (const word) main::toD0182_$4 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) malloc::size#0 = NUM_SQUARES#3*SIZEOF_WORD -Constant (const byte) init_squares::$2 = NUM_SQUARES#3-1 Constant (const word) main::toD0181_$1 = main::toD0181_$0&$3fff Constant (const byte) main::toD0181_$5 = >main::toD0181_$4 Constant (const word) main::toD0182_$1 = main::toD0182_$0&$3fff Constant (const byte) main::toD0182_$5 = >main::toD0182_$4 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [47] init_squares::i#1 ← ++ init_squares::i#2 to ++ -Resolved ranged comparison value [48] if(init_squares::i#1!=rangelast(0,init_squares::$2)) goto init_squares::@1 to (const byte) init_squares::$2+(number) 1 -Adding number conversion cast (unumber) init_squares::$2+1 in if((byte) init_squares::i#1!=(const byte) init_squares::$2+(number) 1) goto init_squares::@1 -Adding number conversion cast (unumber) 1 in if((byte) init_squares::i#1!=(unumber)(const byte) init_squares::$2+(number) 1) goto init_squares::@1 -Successful SSA optimization PassNAddNumberTypeConversions -Simplifying constant integer cast (const byte) init_squares::$2+(unumber)(number) 1 -Simplifying constant integer cast 1 -Successful SSA optimization PassNCastSimplification -Finalized unsigned number type (byte) 1 -Successful SSA optimization PassNFinalizeNumberTypeConversions Constant right-side identified [125] (word~) main::toD0181_$2 ← (const word) main::toD0181_$1 * (byte) 4 Constant right-side identified [127] (byte~) main::toD0181_$6 ← (const byte) main::toD0181_$5 / (byte) 4 Constant right-side identified [132] (word~) main::toD0182_$2 ← (const word) main::toD0182_$1 * (byte) 4 @@ -3723,7 +3729,7 @@ Inlining Noop Cast [155] (signed word) init_angle_screen::xw#0 ← (signed word) Inlining Noop Cast [158] (signed word) init_angle_screen::yw#0 ← (signed word)(word~) init_angle_screen::$8 keeping init_angle_screen::yw#0 Successful SSA optimization Pass2NopCastInlining Rewriting multiplication to use shift [18] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 * (const byte) SIZEOF_WORD -Rewriting multiplication to use shift [42] (byte~) init_squares::$3 ← (byte) init_squares::i#2 * (byte) 2 +Rewriting multiplication to use shift [43] (byte~) init_squares::$3 ← (byte) init_squares::i#2 * (byte) 2 Rewriting multiplication to use shift [49] (byte~) sqr::$0 ← (byte) sqr::val#2 * (const byte) SIZEOF_WORD Rewriting division to use shift [58] (word~) sqrt::$1 ← (word~) sqrt::$3 / (const byte) SIZEOF_WORD Rewriting division to use shift [70] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 / (byte) 2 @@ -3820,14 +3826,12 @@ Constant inlined bsearch16u::$17 = (byte) 1*(const byte) SIZEOF_WORD Constant inlined bsearch16u::$18 = (byte) 1*(const byte) SIZEOF_WORD Constant inlined main::toD0182_screen#0 = (const byte*) SCREEN2 Constant inlined heap_head#0 = (const byte*) HEAP_TOP -Constant inlined init_squares::$2 = (const byte) NUM_SQUARES#3-(byte) 1 Successful SSA optimization Pass2ConstantInlining Identical Phi Values (word) memset::num#2 (word) $3e8 Successful SSA optimization Pass2IdenticalPhiElimination if() condition always false - eliminating [1] if((word) $3e8<=(byte) 0) goto memset::@1 Successful SSA optimization Pass2ConstantIfs Added new block during phi lifting bsearch16u::@18(between bsearch16u::@9 and bsearch16u::@10) -Added new block during phi lifting init_squares::@4(between init_squares::@1 and init_squares::@1) Added new block during phi lifting atan2_16::@34(between atan2_16::@27 and atan2_16::@15) Added new block during phi lifting atan2_16::@35(between atan2_16::@15 and atan2_16::@17) Added new block during phi lifting atan2_16::@36(between atan2_16::@27 and atan2_16::@17) @@ -3879,7 +3883,7 @@ Calls in [sqrt] to bsearch16u:297 Calls in [init_squares] to malloc:337 Created 61 initial phi equivalence classes -Coalesced [7] heap_head#58 ← heap_head#1 +Coalesced [7] heap_head#59 ← heap_head#1 Coalesced [25] sin_offset_x#32 ← sin_offset_x#14 Coalesced [26] sin_offset_y#32 ← sin_offset_y#14 Coalesced [32] sin_offset_x#33 ← sin_offset_x#12 @@ -3967,11 +3971,11 @@ Coalesced [328] bsearch16u::num#9 ← bsearch16u::num#0 Coalesced [329] bsearch16u::items#11 ← bsearch16u::items#8 Coalesced [330] bsearch16u::num#11 ← bsearch16u::num#3 Coalesced (already) [331] bsearch16u::items#13 ← bsearch16u::items#2 -Coalesced (already) [336] heap_head#59 ← heap_head#1 -Coalesced [340] init_squares::squares#4 ← init_squares::squares#0 -Coalesced [350] init_squares::sqr#3 ← init_squares::sqr#1 -Coalesced [351] init_squares::squares#3 ← init_squares::squares#1 -Coalesced [352] init_squares::i#3 ← init_squares::i#1 +Coalesced (already) [336] heap_head#60 ← heap_head#1 +Coalesced [340] init_squares::squares#5 ← init_squares::squares#0 +Coalesced [350] init_squares::i#4 ← init_squares::i#1 +Coalesced [351] init_squares::sqr#4 ← init_squares::sqr#1 +Coalesced [352] init_squares::squares#4 ← init_squares::squares#1 Not coalescing [355] heap_head#1 ← malloc::mem#0 Coalesced down to 47 phi equivalence classes Culled Empty Block (label) @9 @@ -4003,7 +4007,6 @@ Culled Empty Block (label) atan2_16::@37 Culled Empty Block (label) init_dist_screen::@23 Culled Empty Block (label) bsearch16u::@1 Culled Empty Block (label) bsearch16u::@18 -Culled Empty Block (label) init_squares::@4 Renumbering block @48 to @1 Renumbering block @53 to @2 Renumbering block @54 to @3 @@ -4020,7 +4023,7 @@ Renumbering block bsearch16u::@9 to bsearch16u::@6 Renumbering block bsearch16u::@10 to bsearch16u::@7 Renumbering block bsearch16u::@13 to bsearch16u::@8 Renumbering block bsearch16u::@15 to bsearch16u::@9 -Renumbering block init_squares::@3 to init_squares::@2 +Renumbering block init_squares::@7 to init_squares::@3 Renumbering block sqrt::@2 to sqrt::@1 Renumbering block atan2_16::@13 to atan2_16::@9 Renumbering block atan2_16::@15 to atan2_16::@10 @@ -4598,26 +4601,28 @@ sqr::@return: scope:[sqr] from sqr init_squares: scope:[init_squares] from init_dist_screen [242] phi() [243] call malloc - to:init_squares::@2 -init_squares::@2: scope:[init_squares] from init_squares + to:init_squares::@3 +init_squares::@3: scope:[init_squares] from init_squares [244] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [245] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 to:init_squares::@1 -init_squares::@1: scope:[init_squares] from init_squares::@1 init_squares::@2 - [246] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@2/(byte) 0 ) - [246] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@2/(word*) init_squares::squares#0 ) - [246] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@2/(word) 0 ) - [247] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 - [248] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD - [249] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 - [250] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 - [251] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 - [252] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 - [253] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 +init_squares::@1: scope:[init_squares] from init_squares::@2 init_squares::@3 + [246] (word*) init_squares::squares#2 ← phi( init_squares::@2/(word*) init_squares::squares#1 init_squares::@3/(word*) init_squares::squares#0 ) + [246] (word) init_squares::sqr#2 ← phi( init_squares::@2/(word) init_squares::sqr#1 init_squares::@3/(word) 0 ) + [246] (byte) init_squares::i#2 ← phi( init_squares::@2/(byte) init_squares::i#1 init_squares::@3/(byte) 0 ) + [247] if((byte) init_squares::i#2<(const byte) NUM_SQUARES#3) goto init_squares::@2 to:init_squares::@return init_squares::@return: scope:[init_squares] from init_squares::@1 - [254] return + [248] return to:@return +init_squares::@2: scope:[init_squares] from init_squares::@1 + [249] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 + [250] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD + [251] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 + [252] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 + [253] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 + [254] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 + to:init_squares::@1 (void*()) malloc((word) malloc::size) malloc: scope:[malloc] from @1 @3 init_squares @@ -4824,15 +4829,15 @@ VARIABLE REGISTER WEIGHTS (byte~) init_squares::$3 22.0 (byte~) init_squares::$4 22.0 (byte) init_squares::i -(byte) init_squares::i#1 16.5 -(byte) init_squares::i#2 5.5 +(byte) init_squares::i#1 22.0 +(byte) init_squares::i#2 6.285714285714286 (word) init_squares::sqr -(word) init_squares::sqr#1 7.333333333333333 -(word) init_squares::sqr#2 6.6000000000000005 +(word) init_squares::sqr#1 11.0 +(word) init_squares::sqr#2 5.5 (word*) init_squares::squares (word*) init_squares::squares#0 4.0 -(word*) init_squares::squares#1 3.6666666666666665 -(word*) init_squares::squares#2 17.5 +(word*) init_squares::squares#1 4.4 +(word*) init_squares::squares#2 11.666666666666666 (void()) main() (byte*) main::toD0181_gfx (byte) main::toD0181_return @@ -4966,9 +4971,9 @@ Initial phi equivalence classes [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] [ sqr::val#2 sqr::val#1 sqr::val#0 ] +[ init_squares::i#2 init_squares::i#1 ] [ init_squares::sqr#2 init_squares::sqr#1 ] [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] -[ init_squares::i#2 init_squares::i#1 ] [ heap_head#12 heap_head#1 ] [ malloc::size#3 ] Added variable SCREEN_DIST#0 to live range equivalence class [ SCREEN_DIST#0 ] @@ -5069,9 +5074,9 @@ Complete equivalence classes [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] [ sqr::val#2 sqr::val#1 sqr::val#0 ] +[ init_squares::i#2 init_squares::i#1 ] [ init_squares::sqr#2 init_squares::sqr#1 ] [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] -[ init_squares::i#2 init_squares::i#1 ] [ heap_head#12 heap_head#1 ] [ malloc::size#3 ] [ SCREEN_DIST#0 ] @@ -5171,9 +5176,9 @@ Allocated zp[1]:53 [ init_dist_screen::xd#0 init_dist_screen::$16 init_dist_scre Allocated zp[2]:54 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] Allocated zp[1]:56 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] Allocated zp[1]:57 [ sqr::val#2 sqr::val#1 sqr::val#0 ] -Allocated zp[2]:58 [ init_squares::sqr#2 init_squares::sqr#1 ] -Allocated zp[2]:60 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] -Allocated zp[1]:62 [ init_squares::i#2 init_squares::i#1 ] +Allocated zp[1]:58 [ init_squares::i#2 init_squares::i#1 ] +Allocated zp[2]:59 [ init_squares::sqr#2 init_squares::sqr#1 ] +Allocated zp[2]:61 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] Allocated zp[2]:63 [ heap_head#12 heap_head#1 ] Allocated zp[2]:65 [ malloc::size#3 ] Allocated zp[2]:67 [ SCREEN_DIST#0 ] @@ -6968,9 +6973,9 @@ sqr: { init_squares: { .label __3 = $9a .label __4 = $9b - .label squares = $3c - .label sqr = $3a - .label i = $3e + .label squares = $3d + .label sqr = $3b + .label i = $3a // [243] call malloc // [255] phi from init_squares to malloc [phi:init_squares->malloc] malloc_from_init_squares: @@ -6981,9 +6986,9 @@ init_squares: { sta.z malloc.size+1 // [255] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:init_squares->malloc#1] -- register_copy jsr malloc - jmp __b2 - // init_squares::@2 - __b2: + jmp __b3 + // init_squares::@3 + __b3: // [244] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 -- pvoz1=pvoz2 lda.z malloc.mem sta.z SQUARES @@ -6994,34 +6999,39 @@ init_squares: { sta.z squares lda.z SQUARES+1 sta.z squares+1 - // [246] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] - __b1_from___b2: - // [246] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#0] -- vbuz1=vbuc1 - lda #0 - sta.z i - // [246] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@2->init_squares::@1#1] -- register_copy - // [246] phi (word) init_squares::sqr#2 = (word) 0 [phi:init_squares::@2->init_squares::@1#2] -- vwuz1=vwuc1 + // [246] phi from init_squares::@3 to init_squares::@1 [phi:init_squares::@3->init_squares::@1] + __b1_from___b3: + // [246] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@3->init_squares::@1#0] -- register_copy + // [246] phi (word) init_squares::sqr#2 = (word) 0 [phi:init_squares::@3->init_squares::@1#1] -- vwuz1=vwuc1 lda #<0 sta.z sqr lda #>0 sta.z sqr+1 - jmp __b1 - // [246] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] - __b1_from___b1: - // [246] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy - // [246] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy - // [246] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy + // [246] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@3->init_squares::@1#2] -- vbuz1=vbuc1 + lda #0 + sta.z i jmp __b1 // init_squares::@1 __b1: - // [247] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 + // [247] if((byte) init_squares::i#2<(const byte) NUM_SQUARES#3) goto init_squares::@2 -- vbuz1_lt_vbuc1_then_la1 + lda.z i + cmp #NUM_SQUARES + bcc __b2 + jmp __breturn + // init_squares::@return + __breturn: + // [248] return + rts + // init_squares::@2 + __b2: + // [249] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 ldy #0 lda.z sqr sta (squares),y iny lda.z sqr+1 sta (squares),y - // [248] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + // [250] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 lda #SIZEOF_WORD clc adc.z squares @@ -7029,15 +7039,15 @@ init_squares: { bcc !+ inc.z squares+1 !: - // [249] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + // [251] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda.z i asl sta.z __3 - // [250] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuz1=vbuz2_plus_1 + // [252] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuz1=vbuz2_plus_1 ldy.z __3 iny sty.z __4 - // [251] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuz2 + // [253] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuz2 lda.z __4 clc adc.z sqr @@ -7045,17 +7055,14 @@ init_squares: { bcc !+ inc.z sqr+1 !: - // [252] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuz1=_inc_vbuz1 + // [254] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuz1=_inc_vbuz1 inc.z i - // [253] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuz1_neq_vbuc1_then_la1 - lda #NUM_SQUARES-1+1 - cmp.z i - bne __b1_from___b1 - jmp __breturn - // init_squares::@return - __breturn: - // [254] return - rts + // [246] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] + __b1_from___b2: + // [246] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@2->init_squares::@1#0] -- register_copy + // [246] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@2->init_squares::@1#1] -- register_copy + // [246] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@2->init_squares::@1#2] -- register_copy + jmp __b1 } // malloc // Allocates a block of size bytes of memory, returning a pointer to the beginning of the block. @@ -7247,12 +7254,12 @@ Statement [239] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ SQUARES#1 sq Statement [240] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqr:179 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#11 init_dist_screen::screen_bottomline#11 sqr::return#0 SQUARES#1 ] main:7::init_dist_screen:10::sqr:194 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#11 init_dist_screen::screen_bottomline#11 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 SQUARES#1 ] ) always clobbers reg byte a reg byte y Statement [244] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [ SQUARES#1 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 ] ) always clobbers reg byte a Statement [245] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 [ SQUARES#1 init_squares::squares#0 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::squares#0 ] ) always clobbers reg byte a -Statement [247] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte a as potential for zp[1]:62 [ init_squares::i#2 init_squares::i#1 ] -Removing always clobbered register reg byte y as potential for zp[1]:62 [ init_squares::i#2 init_squares::i#1 ] -Statement [248] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [249] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a -Statement [251] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [249] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#2 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#2 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte a as potential for zp[1]:58 [ init_squares::i#2 init_squares::i#1 ] +Removing always clobbered register reg byte y as potential for zp[1]:58 [ init_squares::i#2 init_squares::i#1 ] +Statement [250] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [251] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 init_squares::$3 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a +Statement [253] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a Statement [256] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 [ malloc::mem#0 ] ( malloc:2 [ malloc::mem#0 ] malloc:4 [ malloc::mem#0 ] main:7::init_dist_screen:10::init_squares:171::malloc:243 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 ] ) always clobbers reg byte a Statement [257] (byte*) heap_head#1 ← (byte*) malloc::mem#0 [ malloc::mem#0 heap_head#1 ] ( malloc:2 [ malloc::mem#0 heap_head#1 ] malloc:4 [ malloc::mem#0 heap_head#1 ] main:7::init_dist_screen:10::init_squares:171::malloc:243 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 heap_head#1 ] ) always clobbers reg byte a Statement [3] (void*) SCREEN_DIST#0 ← (void*)(byte*) malloc::mem#0 [ SCREEN_DIST#0 heap_head#1 ] ( [ SCREEN_DIST#0 heap_head#1 ] ) always clobbers reg byte a @@ -7375,10 +7382,10 @@ Statement [239] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ SQUARES#1 sq Statement [240] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqr:179 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#11 init_dist_screen::screen_bottomline#11 sqr::return#0 SQUARES#1 ] main:7::init_dist_screen:10::sqr:194 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#11 init_dist_screen::screen_bottomline#11 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 SQUARES#1 ] ) always clobbers reg byte a reg byte y Statement [244] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [ SQUARES#1 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 ] ) always clobbers reg byte a Statement [245] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 [ SQUARES#1 init_squares::squares#0 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::squares#0 ] ) always clobbers reg byte a -Statement [247] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y -Statement [248] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [249] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a -Statement [251] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [249] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#2 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#2 ] ) always clobbers reg byte a reg byte y +Statement [250] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [251] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 init_squares::$3 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a +Statement [253] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a Statement [256] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 [ malloc::mem#0 ] ( malloc:2 [ malloc::mem#0 ] malloc:4 [ malloc::mem#0 ] main:7::init_dist_screen:10::init_squares:171::malloc:243 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 ] ) always clobbers reg byte a Statement [257] (byte*) heap_head#1 ← (byte*) malloc::mem#0 [ malloc::mem#0 heap_head#1 ] ( malloc:2 [ malloc::mem#0 heap_head#1 ] malloc:4 [ malloc::mem#0 heap_head#1 ] main:7::init_dist_screen:10::init_squares:171::malloc:243 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 heap_head#1 ] ) always clobbers reg byte a Statement [3] (void*) SCREEN_DIST#0 ← (void*)(byte*) malloc::mem#0 [ SCREEN_DIST#0 heap_head#1 ] ( [ SCREEN_DIST#0 heap_head#1 ] ) always clobbers reg byte a @@ -7500,10 +7507,10 @@ Statement [239] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ SQUARES#1 sq Statement [240] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqr:179 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#11 init_dist_screen::screen_bottomline#11 sqr::return#0 SQUARES#1 ] main:7::init_dist_screen:10::sqr:194 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#11 init_dist_screen::screen_bottomline#11 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 SQUARES#1 ] ) always clobbers reg byte a reg byte y Statement [244] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [ SQUARES#1 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 ] ) always clobbers reg byte a Statement [245] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 [ SQUARES#1 init_squares::squares#0 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::squares#0 ] ) always clobbers reg byte a -Statement [247] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y -Statement [248] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [249] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a -Statement [251] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [249] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#2 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#2 ] ) always clobbers reg byte a reg byte y +Statement [250] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [251] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 init_squares::$3 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a +Statement [253] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a Statement [256] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 [ malloc::mem#0 ] ( malloc:2 [ malloc::mem#0 ] malloc:4 [ malloc::mem#0 ] main:7::init_dist_screen:10::init_squares:171::malloc:243 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 ] ) always clobbers reg byte a Statement [257] (byte*) heap_head#1 ← (byte*) malloc::mem#0 [ malloc::mem#0 heap_head#1 ] ( malloc:2 [ malloc::mem#0 heap_head#1 ] malloc:4 [ malloc::mem#0 heap_head#1 ] main:7::init_dist_screen:10::init_squares:171::malloc:243 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 heap_head#1 ] ) always clobbers reg byte a Potential registers zp[1]:2 [ sin_offset_x#10 sin_offset_x#14 sin_offset_x#12 ] : zp[1]:2 , @@ -7544,9 +7551,9 @@ Potential registers zp[1]:53 [ init_dist_screen::xd#0 init_dist_screen::$16 init Potential registers zp[2]:54 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] : zp[2]:54 , Potential registers zp[1]:56 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] : zp[1]:56 , reg byte x , Potential registers zp[1]:57 [ sqr::val#2 sqr::val#1 sqr::val#0 ] : zp[1]:57 , reg byte a , reg byte x , reg byte y , -Potential registers zp[2]:58 [ init_squares::sqr#2 init_squares::sqr#1 ] : zp[2]:58 , -Potential registers zp[2]:60 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] : zp[2]:60 , -Potential registers zp[1]:62 [ init_squares::i#2 init_squares::i#1 ] : zp[1]:62 , reg byte x , +Potential registers zp[1]:58 [ init_squares::i#2 init_squares::i#1 ] : zp[1]:58 , reg byte x , +Potential registers zp[2]:59 [ init_squares::sqr#2 init_squares::sqr#1 ] : zp[2]:59 , +Potential registers zp[2]:61 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] : zp[2]:61 , Potential registers zp[2]:63 [ heap_head#12 heap_head#1 ] : zp[2]:63 , Potential registers zp[2]:65 [ malloc::size#3 ] : zp[2]:65 , Potential registers zp[2]:67 [ SCREEN_DIST#0 ] : zp[2]:67 , @@ -7619,7 +7626,7 @@ Uplift Scope [init_angle_screen] 220.36: zp[1]:30 [ init_angle_screen::xb#2 init Uplift Scope [init_dist_screen] 707: zp[1]:53 [ init_dist_screen::xd#0 init_dist_screen::$16 init_dist_screen::$14 ] 221.24: zp[1]:52 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] 202: zp[1]:121 [ init_dist_screen::x2#0 ] 202: zp[2]:124 [ init_dist_screen::xds#0 ] 202: zp[2]:126 [ init_dist_screen::ds#0 ] 131.3: zp[1]:51 [ init_dist_screen::x#2 init_dist_screen::x#1 ] 126.25: zp[1]:131 [ init_dist_screen::d#0 ] 77: zp[1]:50 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] 22: zp[1]:116 [ init_dist_screen::y2#0 ] 18.18: zp[2]:48 [ init_dist_screen::screen_bottomline#11 init_dist_screen::screen_bottomline#0 init_dist_screen::screen_bottomline#1 ] 17.47: zp[1]:45 [ init_dist_screen::y#10 init_dist_screen::y#1 ] 14.06: zp[2]:46 [ init_dist_screen::screen_topline#11 init_dist_screen::screen#0 init_dist_screen::screen_topline#1 ] 4.87: zp[2]:119 [ init_dist_screen::yds#0 ] Uplift Scope [sqr] 338: zp[1]:57 [ sqr::val#2 sqr::val#1 sqr::val#0 ] 202: zp[2]:122 [ sqr::return#3 ] 28.5: zp[2]:150 [ sqr::return#0 ] 22: zp[2]:117 [ sqr::return#2 ] 4: zp[1]:149 [ sqr::$0 ] Uplift Scope [sqrt] 202: zp[1]:130 [ sqrt::return#2 ] 103: zp[2]:128 [ sqrt::val#0 ] 34.33: zp[1]:142 [ sqrt::return#0 ] 4: zp[2]:136 [ sqrt::found#0 ] 4: zp[2]:138 [ sqrt::$3 ] 2: zp[2]:140 [ sqrt::$1 ] -Uplift Scope [init_squares] 25.17: zp[2]:60 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] 22: zp[1]:62 [ init_squares::i#2 init_squares::i#1 ] 22: zp[1]:154 [ init_squares::$3 ] 22: zp[1]:155 [ init_squares::$4 ] 13.93: zp[2]:58 [ init_squares::sqr#2 init_squares::sqr#1 ] +Uplift Scope [init_squares] 28.29: zp[1]:58 [ init_squares::i#2 init_squares::i#1 ] 22: zp[1]:154 [ init_squares::$3 ] 22: zp[1]:155 [ init_squares::$4 ] 20.07: zp[2]:61 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] 16.5: zp[2]:59 [ init_squares::sqr#2 init_squares::sqr#1 ] Uplift Scope [] 21.83: zp[2]:19 [ print_char_cursor#18 print_char_cursor#30 print_char_cursor#1 ] 15.53: zp[1]:3 [ sin_offset_y#10 sin_offset_y#14 sin_offset_y#12 ] 15.29: zp[1]:2 [ sin_offset_x#10 sin_offset_x#14 sin_offset_x#12 ] 6.6: zp[2]:63 [ heap_head#12 heap_head#1 ] 0.05: zp[2]:69 [ SCREEN_ANGLE#0 ] 0.05: zp[2]:67 [ SCREEN_DIST#0 ] 0.03: zp[2]:152 [ SQUARES#1 ] Uplift Scope [memset] 41.33: zp[2]:15 [ memset::dst#2 memset::dst#4 memset::dst#1 ] 2.17: zp[2]:78 [ memset::end#0 ] 1.57: zp[1]:14 [ memset::c#4 ] 0: zp[2]:12 [ memset::str#3 ] Uplift Scope [malloc] 2: zp[2]:65 [ malloc::size#3 ] 0.67: zp[2]:156 [ malloc::mem#0 ] @@ -7642,7 +7649,7 @@ Uplifting [init_dist_screen] best 1348318 combination reg byte a [ init_dist_scr Limited combination testing to 100 combinations of 6144 possible. Uplifting [sqr] best 1347981 combination reg byte a [ sqr::val#2 sqr::val#1 sqr::val#0 ] zp[2]:122 [ sqr::return#3 ] zp[2]:150 [ sqr::return#0 ] zp[2]:117 [ sqr::return#2 ] reg byte a [ sqr::$0 ] Uplifting [sqrt] best 1347078 combination reg byte a [ sqrt::return#2 ] zp[2]:128 [ sqrt::val#0 ] reg byte a [ sqrt::return#0 ] zp[2]:136 [ sqrt::found#0 ] zp[2]:138 [ sqrt::$3 ] zp[2]:140 [ sqrt::$1 ] -Uplifting [init_squares] best 1346878 combination zp[2]:60 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] reg byte x [ init_squares::i#2 init_squares::i#1 ] reg byte a [ init_squares::$3 ] reg byte a [ init_squares::$4 ] zp[2]:58 [ init_squares::sqr#2 init_squares::sqr#1 ] +Uplifting [init_squares] best 1346878 combination reg byte x [ init_squares::i#2 init_squares::i#1 ] reg byte a [ init_squares::$3 ] reg byte a [ init_squares::$4 ] zp[2]:61 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] zp[2]:59 [ init_squares::sqr#2 init_squares::sqr#1 ] Uplifting [] best 1346878 combination zp[2]:19 [ print_char_cursor#18 print_char_cursor#30 print_char_cursor#1 ] zp[1]:3 [ sin_offset_y#10 sin_offset_y#14 sin_offset_y#12 ] zp[1]:2 [ sin_offset_x#10 sin_offset_x#14 sin_offset_x#12 ] zp[2]:63 [ heap_head#12 heap_head#1 ] zp[2]:69 [ SCREEN_ANGLE#0 ] zp[2]:67 [ SCREEN_DIST#0 ] zp[2]:152 [ SQUARES#1 ] Uplifting [memset] best 1346862 combination zp[2]:15 [ memset::dst#2 memset::dst#4 memset::dst#1 ] zp[2]:78 [ memset::end#0 ] reg byte x [ memset::c#4 ] zp[2]:12 [ memset::str#3 ] Uplifting [malloc] best 1346862 combination zp[2]:65 [ malloc::size#3 ] zp[2]:156 [ malloc::mem#0 ] @@ -7723,8 +7730,8 @@ Coalescing zero page register [ zp[1]:45 [ init_dist_screen::y#10 init_dist_scre Coalescing zero page register [ zp[2]:46 [ init_dist_screen::screen_topline#11 init_dist_screen::screen#0 init_dist_screen::screen_topline#1 ] ] with [ zp[2]:25 [ init_angle_screen::screen_topline#6 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 ] ] Coalescing zero page register [ zp[2]:48 [ init_dist_screen::screen_bottomline#11 init_dist_screen::screen_bottomline#0 init_dist_screen::screen_bottomline#1 ] ] with [ zp[2]:27 [ init_angle_screen::screen_bottomline#6 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 ] ] Coalescing zero page register [ zp[2]:54 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 ] ] with [ zp[2]:31 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] ] -Coalescing zero page register [ zp[2]:58 [ init_squares::sqr#2 init_squares::sqr#1 ] ] with [ zp[2]:33 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] ] -Coalescing zero page register [ zp[2]:60 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] ] with [ zp[2]:36 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$11 ] ] +Coalescing zero page register [ zp[2]:59 [ init_squares::sqr#2 init_squares::sqr#1 ] ] with [ zp[2]:33 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] ] +Coalescing zero page register [ zp[2]:61 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] ] with [ zp[2]:36 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$11 ] ] Coalescing zero page register [ zp[2]:63 [ heap_head#12 heap_head#1 ] ] with [ zp[2]:41 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] ] Coalescing zero page register [ zp[2]:65 [ malloc::size#3 malloc::mem#0 SQUARES#1 ] ] with [ zp[2]:43 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] ] Coalescing zero page register [ zp[2]:78 [ memset::end#0 ] ] with [ zp[2]:73 [ doplasma::sin_x#0 ] ] @@ -7737,9 +7744,9 @@ Coalescing zero page register [ zp[1]:45 [ init_dist_screen::y#10 init_dist_scre Coalescing zero page register [ zp[2]:46 [ init_dist_screen::screen_topline#11 init_dist_screen::screen#0 init_dist_screen::screen_topline#1 init_angle_screen::screen_topline#6 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 ] ] with [ zp[2]:12 [ memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 doplasma::angle#4 doplasma::angle#0 doplasma::angle#1 ] ] Coalescing zero page register [ zp[2]:48 [ init_dist_screen::screen_bottomline#11 init_dist_screen::screen_bottomline#0 init_dist_screen::screen_bottomline#1 init_angle_screen::screen_bottomline#6 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 ] ] with [ zp[2]:17 [ make_plasma_charset::c#2 make_plasma_charset::c#1 doplasma::dist#4 doplasma::dist#0 doplasma::dist#1 ] ] Coalescing zero page register [ zp[2]:54 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] ] with [ zp[2]:19 [ print_char_cursor#18 print_char_cursor#30 print_char_cursor#1 doplasma::screen#5 doplasma::screen#6 doplasma::screen#2 ] ] -Coalescing zero page register [ zp[2]:78 [ memset::end#0 doplasma::sin_x#0 ] ] with [ zp[2]:58 [ init_squares::sqr#2 init_squares::sqr#1 atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] ] +Coalescing zero page register [ zp[2]:78 [ memset::end#0 doplasma::sin_x#0 ] ] with [ zp[2]:59 [ init_squares::sqr#2 init_squares::sqr#1 atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] ] Coalescing zero page register [ zp[1]:81 [ make_plasma_charset::s#0 init_dist_screen::x#2 init_dist_screen::x#1 ] ] with [ zp[1]:24 [ init_angle_screen::y#5 init_angle_screen::y#1 sin_offset_y#10 sin_offset_y#14 sin_offset_y#12 ] ] -Coalescing zero page register [ zp[2]:83 [ make_plasma_charset::$10 make_plasma_charset::$11 make_plasma_charset::$16 doplasma::sin_y#0 ] ] with [ zp[2]:60 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$11 ] ] +Coalescing zero page register [ zp[2]:83 [ make_plasma_charset::$10 make_plasma_charset::$11 make_plasma_charset::$16 doplasma::sin_y#0 ] ] with [ zp[2]:61 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$11 ] ] Coalescing zero page register [ zp[1]:91 [ make_plasma_charset::$7 init_dist_screen::xb#2 init_dist_screen::xb#1 ] ] with [ zp[1]:29 [ init_angle_screen::x#2 init_angle_screen::x#1 doplasma::y#4 doplasma::y#1 ] ] Coalescing zero page register [ zp[2]:145 [ bsearch16u::pivot#0 ] ] with [ zp[2]:63 [ heap_head#12 heap_head#1 atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] ] Coalescing zero page register [ zp[2]:147 [ bsearch16u::result#0 ] ] with [ zp[2]:78 [ memset::end#0 doplasma::sin_x#0 init_squares::sqr#2 init_squares::sqr#1 atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] ] @@ -9345,42 +9352,46 @@ init_squares: { sta.z malloc.size+1 // [255] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:init_squares->malloc#1] -- register_copy jsr malloc - jmp __b2 - // init_squares::@2 - __b2: + jmp __b3 + // init_squares::@3 + __b3: // [244] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 // [245] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 lda.z SQUARES sta.z squares lda.z SQUARES+1 sta.z squares+1 - // [246] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] - __b1_from___b2: - // [246] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#0] -- vbuxx=vbuc1 - ldx #0 - // [246] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@2->init_squares::@1#1] -- register_copy - // [246] phi (word) init_squares::sqr#2 = (word) 0 [phi:init_squares::@2->init_squares::@1#2] -- vwuz1=vwuc1 + // [246] phi from init_squares::@3 to init_squares::@1 [phi:init_squares::@3->init_squares::@1] + __b1_from___b3: + // [246] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@3->init_squares::@1#0] -- register_copy + // [246] phi (word) init_squares::sqr#2 = (word) 0 [phi:init_squares::@3->init_squares::@1#1] -- vwuz1=vwuc1 lda #<0 sta.z sqr lda #>0 sta.z sqr+1 - jmp __b1 - // [246] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] - __b1_from___b1: - // [246] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy - // [246] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy - // [246] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy + // [246] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@3->init_squares::@1#2] -- vbuxx=vbuc1 + ldx #0 jmp __b1 // init_squares::@1 __b1: - // [247] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 + // [247] if((byte) init_squares::i#2<(const byte) NUM_SQUARES#3) goto init_squares::@2 -- vbuxx_lt_vbuc1_then_la1 + cpx #NUM_SQUARES + bcc __b2 + jmp __breturn + // init_squares::@return + __breturn: + // [248] return + rts + // init_squares::@2 + __b2: + // [249] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 ldy #0 lda.z sqr sta (squares),y iny lda.z sqr+1 sta (squares),y - // [248] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + // [250] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 lda #SIZEOF_WORD clc adc.z squares @@ -9388,29 +9399,27 @@ init_squares: { bcc !+ inc.z squares+1 !: - // [249] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + // [251] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 txa asl - // [250] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuaa=vbuaa_plus_1 + // [252] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuaa=vbuaa_plus_1 clc adc #1 - // [251] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuaa + // [253] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuaa clc adc.z sqr sta.z sqr bcc !+ inc.z sqr+1 !: - // [252] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuxx=_inc_vbuxx + // [254] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuxx=_inc_vbuxx inx - // [253] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuxx_neq_vbuc1_then_la1 - cpx #NUM_SQUARES-1+1 - bne __b1_from___b1 - jmp __breturn - // init_squares::@return - __breturn: - // [254] return - rts + // [246] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] + __b1_from___b2: + // [246] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@2->init_squares::@1#0] -- register_copy + // [246] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@2->init_squares::@1#1] -- register_copy + // [246] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@2->init_squares::@1#2] -- register_copy + jmp __b1 } // malloc // Allocates a block of size bytes of memory, returning a pointer to the beginning of the block. @@ -9535,7 +9544,7 @@ Removing instruction jmp __b8 Removing instruction jmp __b9 Removing instruction jmp __b7 Removing instruction jmp __breturn -Removing instruction jmp __b2 +Removing instruction jmp __b3 Removing instruction jmp __b1 Removing instruction jmp __breturn Removing instruction jmp __breturn @@ -9552,8 +9561,8 @@ Replacing instruction ldx #0 with TAX Removing instruction ldy.z x Removing instruction ldy.z xb Removing instruction lda.z result+1 -Replacing instruction lda #<0 with TXA Removing instruction lda #>0 +Replacing instruction ldx #0 with TAX Succesful ASM optimization Pass5UnnecesaryLoadElimination Replacing label __bbegin with __b1 Replacing label __b1 with __b2 @@ -9580,7 +9589,6 @@ Replacing label __b2_from___b5 with __b2 Replacing label __breturn_from___b8 with __b2 Replacing label __b7_from___b6 with __b7 Replacing label __b7_from___b6 with __b7 -Replacing label __b1_from___b1 with __b1 Removing instruction __bbegin: Removing instruction __b1_from___bbegin: Removing instruction malloc_from___b1: @@ -9645,7 +9653,6 @@ Removing instruction __breturn_from___b8: Removing instruction __breturn: Removing instruction __b7_from___b6: Removing instruction __b7_from___b9: -Removing instruction __b1_from___b1: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction __b3: Removing instruction malloc_from___b3: @@ -9719,9 +9726,10 @@ Removing instruction __b9: Removing instruction __b3_from___b7: Removing instruction __breturn: Removing instruction malloc_from_init_squares: -Removing instruction __b2: -Removing instruction __b1_from___b2: +Removing instruction __b3: +Removing instruction __b1_from___b3: Removing instruction __breturn: +Removing instruction __b1_from___b2: Removing instruction __breturn: Succesful ASM optimization Pass5UnusedLabelElimination Replacing jump to rts with rts in jmp __b2 @@ -9734,7 +9742,6 @@ Removing instruction jmp __b1 Removing instruction jmp __b2 Removing instruction jmp __b1 Removing instruction jmp __b1 -Removing instruction jmp __b1 Succesful ASM optimization Pass5NextJumpElimination Fixing long branch [582] beq __b12 to bne Fixing long branch [476] bpl __b1 to bmi @@ -10022,17 +10029,18 @@ FINAL SYMBOL TABLE (byte~) init_squares::$4 reg byte a 22.0 (label) init_squares::@1 (label) init_squares::@2 +(label) init_squares::@3 (label) init_squares::@return (byte) init_squares::i -(byte) init_squares::i#1 reg byte x 16.5 -(byte) init_squares::i#2 reg byte x 5.5 +(byte) init_squares::i#1 reg byte x 22.0 +(byte) init_squares::i#2 reg byte x 6.285714285714286 (word) init_squares::sqr -(word) init_squares::sqr#1 sqr zp[2]:26 7.333333333333333 -(word) init_squares::sqr#2 sqr zp[2]:26 6.6000000000000005 +(word) init_squares::sqr#1 sqr zp[2]:26 11.0 +(word) init_squares::sqr#2 sqr zp[2]:26 5.5 (word*) init_squares::squares (word*) init_squares::squares#0 squares zp[2]:16 4.0 -(word*) init_squares::squares#1 squares zp[2]:16 3.6666666666666665 -(word*) init_squares::squares#2 squares zp[2]:16 17.5 +(word*) init_squares::squares#1 squares zp[2]:16 4.4 +(word*) init_squares::squares#2 squares zp[2]:16 11.666666666666666 (void()) main() (label) main::@1 (label) main::@2 @@ -10220,7 +10228,7 @@ reg byte a [ init_squares::$4 ] FINAL ASSEMBLER -Score: 1210179 +Score: 1210209 // File Comments // Plasma based on the distance/angle to the screen center @@ -11735,7 +11743,7 @@ init_squares: { sta.z malloc.size+1 // [255] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:init_squares->malloc#1] -- register_copy jsr malloc - // init_squares::@2 + // init_squares::@3 // malloc(NUM_SQUARES*sizeof(word)) // [244] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 // squares = SQUARES @@ -11744,22 +11752,28 @@ init_squares: { sta.z squares lda.z SQUARES+1 sta.z squares+1 - // [246] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] - // [246] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#0] -- vbuxx=vbuc1 - ldx #0 - // [246] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@2->init_squares::@1#1] -- register_copy - // [246] phi (word) init_squares::sqr#2 = (word) 0 [phi:init_squares::@2->init_squares::@1#2] -- vwuz1=vwuc1 - txa + // [246] phi from init_squares::@3 to init_squares::@1 [phi:init_squares::@3->init_squares::@1] + // [246] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@3->init_squares::@1#0] -- register_copy + // [246] phi (word) init_squares::sqr#2 = (word) 0 [phi:init_squares::@3->init_squares::@1#1] -- vwuz1=vwuc1 + lda #<0 sta.z sqr sta.z sqr+1 - // [246] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] - // [246] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy - // [246] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy - // [246] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy + // [246] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@3->init_squares::@1#2] -- vbuxx=vbuc1 + tax // init_squares::@1 __b1: + // for(byte i=0;iinit_squares::@1] + // [246] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@2->init_squares::@1#0] -- register_copy + // [246] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@2->init_squares::@1#1] -- register_copy + // [246] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@2->init_squares::@1#2] -- register_copy + jmp __b1 } // malloc // Allocates a block of size bytes of memory, returning a pointer to the beginning of the block. diff --git a/src/test/ref/plasma-center.sym b/src/test/ref/plasma-center.sym index c3902e974..ffcf36a3e 100644 --- a/src/test/ref/plasma-center.sym +++ b/src/test/ref/plasma-center.sym @@ -279,17 +279,18 @@ (byte~) init_squares::$4 reg byte a 22.0 (label) init_squares::@1 (label) init_squares::@2 +(label) init_squares::@3 (label) init_squares::@return (byte) init_squares::i -(byte) init_squares::i#1 reg byte x 16.5 -(byte) init_squares::i#2 reg byte x 5.5 +(byte) init_squares::i#1 reg byte x 22.0 +(byte) init_squares::i#2 reg byte x 6.285714285714286 (word) init_squares::sqr -(word) init_squares::sqr#1 sqr zp[2]:26 7.333333333333333 -(word) init_squares::sqr#2 sqr zp[2]:26 6.6000000000000005 +(word) init_squares::sqr#1 sqr zp[2]:26 11.0 +(word) init_squares::sqr#2 sqr zp[2]:26 5.5 (word*) init_squares::squares (word*) init_squares::squares#0 squares zp[2]:16 4.0 -(word*) init_squares::squares#1 squares zp[2]:16 3.6666666666666665 -(word*) init_squares::squares#2 squares zp[2]:16 17.5 +(word*) init_squares::squares#1 squares zp[2]:16 4.4 +(word*) init_squares::squares#2 squares zp[2]:16 11.666666666666666 (void()) main() (label) main::@1 (label) main::@2 diff --git a/src/test/ref/screen-center-distance.asm b/src/test/ref/screen-center-distance.asm index c98ce3fab..aae54c446 100644 --- a/src/test/ref/screen-center-distance.asm +++ b/src/test/ref/screen-center-distance.asm @@ -389,15 +389,19 @@ init_squares: { .label squares = 9 .label sqr = 4 jsr malloc - ldx #0 lda #SQUARES sta.z squares+1 - txa + lda #<0 sta.z sqr sta.z sqr+1 + tax __b1: + cpx #NUM_SQUARES + bcc __b2 + rts + __b2: ldy #0 lda.z sqr sta (squares),y @@ -422,9 +426,7 @@ init_squares: { inc.z sqr+1 !: inx - cpx #NUM_SQUARES-1+1 - bne __b1 - rts + jmp __b1 } // Allocates a block of size bytes of memory, returning a pointer to the beginning of the block. // The content of the newly allocated block of memory is not initialized, remaining with indeterminate values. diff --git a/src/test/ref/screen-center-distance.cfg b/src/test/ref/screen-center-distance.cfg index b6e415448..61262de9a 100644 --- a/src/test/ref/screen-center-distance.cfg +++ b/src/test/ref/screen-center-distance.cfg @@ -262,21 +262,23 @@ init_squares: scope:[init_squares] from init_dist_screen [119] phi() [120] call malloc to:init_squares::@1 -init_squares::@1: scope:[init_squares] from init_squares init_squares::@1 - [121] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares/(byte) 0 ) - [121] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares/(const word*) SQUARES#1 ) - [121] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares/(word) 0 ) - [122] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 - [123] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD - [124] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 - [125] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 - [126] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 - [127] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 - [128] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 +init_squares::@1: scope:[init_squares] from init_squares init_squares::@2 + [121] (word*) init_squares::squares#2 ← phi( init_squares::@2/(word*) init_squares::squares#1 init_squares/(const word*) SQUARES#1 ) + [121] (word) init_squares::sqr#2 ← phi( init_squares::@2/(word) init_squares::sqr#1 init_squares/(word) 0 ) + [121] (byte) init_squares::i#2 ← phi( init_squares::@2/(byte) init_squares::i#1 init_squares/(byte) 0 ) + [122] if((byte) init_squares::i#2<(const byte) NUM_SQUARES#3) goto init_squares::@2 to:init_squares::@return init_squares::@return: scope:[init_squares] from init_squares::@1 - [129] return + [123] return to:@return +init_squares::@2: scope:[init_squares] from init_squares::@1 + [124] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 + [125] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD + [126] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 + [127] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 + [128] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 + [129] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 + to:init_squares::@1 (void*()) malloc((word) malloc::size) malloc: scope:[malloc] from init_squares diff --git a/src/test/ref/screen-center-distance.log b/src/test/ref/screen-center-distance.log index ac2cb9369..563dd78d8 100644 --- a/src/test/ref/screen-center-distance.log +++ b/src/test/ref/screen-center-distance.log @@ -40,7 +40,10 @@ Culled Empty Block (label) @9 Culled Empty Block (label) @10 Culled Empty Block (label) @11 Culled Empty Block (label) @12 -Culled Empty Block (label) init_squares::@2 +Culled Empty Block (label) init_squares::@4 +Culled Empty Block (label) init_squares::@3 +Culled Empty Block (label) init_squares::@5 +Culled Empty Block (label) init_squares::@6 Culled Empty Block (label) @14 Culled Empty Block (label) sqr::@1 Culled Empty Block (label) @15 @@ -199,7 +202,7 @@ bsearch16u::@3: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@2 (word*) bsearch16u::return#2 ← (word*~) bsearch16u::$4 to:bsearch16u::@return @13: scope:[] from @5 - (byte*) heap_head#29 ← phi( @5/(byte*) heap_head#0 ) + (byte*) heap_head#30 ← phi( @5/(byte*) heap_head#0 ) (byte) NUM_SQUARES#0 ← (byte) $ff (word*) SQUARES#0 ← (word*) 0 to:@49 @@ -212,9 +215,9 @@ init_squares: scope:[init_squares] from init_dist_screen (word) malloc::size#0 ← (byte~) init_squares::$0 call malloc (void*) malloc::return#2 ← (void*) malloc::return#1 - to:init_squares::@3 -init_squares::@3: scope:[init_squares] from init_squares - (byte) NUM_SQUARES#7 ← phi( init_squares/(byte) NUM_SQUARES#6 ) + to:init_squares::@7 +init_squares::@7: scope:[init_squares] from init_squares + (byte) NUM_SQUARES#14 ← phi( init_squares/(byte) NUM_SQUARES#6 ) (byte*) heap_head#12 ← phi( init_squares/(byte*) heap_head#2 ) (void*) malloc::return#4 ← phi( init_squares/(void*) malloc::return#2 ) (void*~) init_squares::$1 ← (void*) malloc::return#4 @@ -222,24 +225,32 @@ init_squares::@3: scope:[init_squares] from init_squares (word*) SQUARES#1 ← ((word*)) (void*~) init_squares::$1 (word*) init_squares::squares#0 ← (word*) SQUARES#1 (word) init_squares::sqr#0 ← (word) 0 - (number~) init_squares::$2 ← (byte) NUM_SQUARES#7 - (number) 1 (byte) init_squares::i#0 ← (byte) 0 to:init_squares::@1 -init_squares::@1: scope:[init_squares] from init_squares::@1 init_squares::@3 - (word*) SQUARES#17 ← phi( init_squares::@1/(word*) SQUARES#17 init_squares::@3/(word*) SQUARES#1 ) - (byte*) heap_head#20 ← phi( init_squares::@1/(byte*) heap_head#20 init_squares::@3/(byte*) heap_head#3 ) - (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@3/(byte) init_squares::i#0 ) - (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@3/(word*) init_squares::squares#0 ) - (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@3/(word) init_squares::sqr#0 ) +init_squares::@1: scope:[init_squares] from init_squares::@2 init_squares::@7 + (word*) SQUARES#17 ← phi( init_squares::@2/(word*) SQUARES#26 init_squares::@7/(word*) SQUARES#1 ) + (byte*) heap_head#20 ← phi( init_squares::@2/(byte*) heap_head#26 init_squares::@7/(byte*) heap_head#3 ) + (word*) init_squares::squares#3 ← phi( init_squares::@2/(word*) init_squares::squares#1 init_squares::@7/(word*) init_squares::squares#0 ) + (word) init_squares::sqr#3 ← phi( init_squares::@2/(word) init_squares::sqr#1 init_squares::@7/(word) init_squares::sqr#0 ) + (byte) NUM_SQUARES#7 ← phi( init_squares::@2/(byte) NUM_SQUARES#13 init_squares::@7/(byte) NUM_SQUARES#14 ) + (byte) init_squares::i#2 ← phi( init_squares::@2/(byte) init_squares::i#1 init_squares::@7/(byte) init_squares::i#0 ) + (bool~) init_squares::$2 ← (byte) init_squares::i#2 < (byte) NUM_SQUARES#7 + if((bool~) init_squares::$2) goto init_squares::@2 + to:init_squares::@return +init_squares::@2: scope:[init_squares] from init_squares::@1 + (word*) SQUARES#26 ← phi( init_squares::@1/(word*) SQUARES#17 ) + (byte*) heap_head#26 ← phi( init_squares::@1/(byte*) heap_head#20 ) + (byte) NUM_SQUARES#13 ← phi( init_squares::@1/(byte) NUM_SQUARES#7 ) + (byte) init_squares::i#3 ← phi( init_squares::@1/(byte) init_squares::i#2 ) + (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#3 ) + (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#3 ) *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD - (number~) init_squares::$3 ← (byte) init_squares::i#2 * (number) 2 + (number~) init_squares::$3 ← (byte) init_squares::i#3 * (number) 2 (number~) init_squares::$4 ← (number~) init_squares::$3 + (number) 1 (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (number~) init_squares::$4 - (byte) init_squares::i#1 ← (byte) init_squares::i#2 + rangenext(0,init_squares::$2) - (bool~) init_squares::$5 ← (byte) init_squares::i#1 != rangelast(0,init_squares::$2) - if((bool~) init_squares::$5) goto init_squares::@1 - to:init_squares::@return + (byte) init_squares::i#1 ← ++ (byte) init_squares::i#3 + to:init_squares::@1 init_squares::@return: scope:[init_squares] from init_squares::@1 (word*) SQUARES#8 ← phi( init_squares::@1/(word*) SQUARES#17 ) (byte*) heap_head#13 ← phi( init_squares::@1/(byte*) heap_head#20 ) @@ -263,7 +274,7 @@ sqr::@return: scope:[sqr] from sqr (byte()) sqrt((word) sqrt::val) sqrt: scope:[sqrt] from init_dist_screen::@21 - (byte) NUM_SQUARES#8 ← phi( init_dist_screen::@21/(byte) NUM_SQUARES#13 ) + (byte) NUM_SQUARES#8 ← phi( init_dist_screen::@21/(byte) NUM_SQUARES#15 ) (word*) SQUARES#10 ← phi( init_dist_screen::@21/(word*) SQUARES#20 ) (word) sqrt::val#1 ← phi( init_dist_screen::@21/(word) sqrt::val#0 ) (word) bsearch16u::key#0 ← (word) sqrt::val#1 @@ -467,23 +478,23 @@ print_char_at::@return: scope:[print_char_at] from print_char_at (void()) main() main: scope:[main] from @49 - (word*) SQUARES#43 ← phi( @49/(word*) SQUARES#25 ) - (byte*) heap_head#43 ← phi( @49/(byte*) heap_head#25 ) - (byte) NUM_SQUARES#36 ← phi( @49/(byte) NUM_SQUARES#17 ) + (word*) SQUARES#44 ← phi( @49/(word*) SQUARES#25 ) + (byte*) heap_head#44 ← phi( @49/(byte*) heap_head#25 ) + (byte) NUM_SQUARES#38 ← phi( @49/(byte) NUM_SQUARES#19 ) (byte*) init_font_hex::charset#1 ← (const byte*) CHARSET call init_font_hex to:main::@3 main::@3: scope:[main] from main - (word*) SQUARES#41 ← phi( main/(word*) SQUARES#43 ) - (byte*) heap_head#38 ← phi( main/(byte*) heap_head#43 ) - (byte) NUM_SQUARES#32 ← phi( main/(byte) NUM_SQUARES#36 ) + (word*) SQUARES#42 ← phi( main/(word*) SQUARES#44 ) + (byte*) heap_head#39 ← phi( main/(byte*) heap_head#44 ) + (byte) NUM_SQUARES#34 ← phi( main/(byte) NUM_SQUARES#38 ) (byte*) main::toD0181_screen#0 ← (const byte*) SCREEN (byte*) main::toD0181_gfx#0 ← (const byte*) CHARSET to:main::toD0181 main::toD0181: scope:[main] from main::@3 - (word*) SQUARES#39 ← phi( main::@3/(word*) SQUARES#41 ) - (byte*) heap_head#34 ← phi( main::@3/(byte*) heap_head#38 ) - (byte) NUM_SQUARES#28 ← phi( main::@3/(byte) NUM_SQUARES#32 ) + (word*) SQUARES#40 ← phi( main::@3/(word*) SQUARES#42 ) + (byte*) heap_head#35 ← phi( main::@3/(byte*) heap_head#39 ) + (byte) NUM_SQUARES#30 ← phi( main::@3/(byte) NUM_SQUARES#34 ) (byte*) main::toD0181_gfx#1 ← phi( main::@3/(byte*) main::toD0181_gfx#0 ) (byte*) main::toD0181_screen#1 ← phi( main::@3/(byte*) main::toD0181_screen#0 ) (word~) main::toD0181_$0 ← ((word)) (byte*) main::toD0181_screen#1 @@ -498,25 +509,25 @@ main::toD0181: scope:[main] from main::@3 (byte) main::toD0181_return#0 ← (number~) main::toD0181_$8 to:main::toD0181_@return main::toD0181_@return: scope:[main] from main::toD0181 - (word*) SQUARES#33 ← phi( main::toD0181/(word*) SQUARES#39 ) - (byte*) heap_head#30 ← phi( main::toD0181/(byte*) heap_head#34 ) - (byte) NUM_SQUARES#22 ← phi( main::toD0181/(byte) NUM_SQUARES#28 ) + (word*) SQUARES#34 ← phi( main::toD0181/(word*) SQUARES#40 ) + (byte*) heap_head#31 ← phi( main::toD0181/(byte*) heap_head#35 ) + (byte) NUM_SQUARES#24 ← phi( main::toD0181/(byte) NUM_SQUARES#30 ) (byte) main::toD0181_return#2 ← phi( main::toD0181/(byte) main::toD0181_return#0 ) (byte) main::toD0181_return#1 ← (byte) main::toD0181_return#2 to:main::@1 main::@1: scope:[main] from main::toD0181_@return - (word*) SQUARES#26 ← phi( main::toD0181_@return/(word*) SQUARES#33 ) - (byte*) heap_head#26 ← phi( main::toD0181_@return/(byte*) heap_head#30 ) - (byte) NUM_SQUARES#18 ← phi( main::toD0181_@return/(byte) NUM_SQUARES#22 ) + (word*) SQUARES#27 ← phi( main::toD0181_@return/(word*) SQUARES#34 ) + (byte*) heap_head#27 ← phi( main::toD0181_@return/(byte*) heap_head#31 ) + (byte) NUM_SQUARES#20 ← phi( main::toD0181_@return/(byte) NUM_SQUARES#24 ) (byte) main::toD0181_return#3 ← phi( main::toD0181_@return/(byte) main::toD0181_return#1 ) (byte~) main::$1 ← (byte) main::toD0181_return#3 *((const byte*) D018) ← (byte~) main::$1 call clock_start to:main::@4 main::@4: scope:[main] from main::@1 - (word*) SQUARES#21 ← phi( main::@1/(word*) SQUARES#26 ) - (byte*) heap_head#21 ← phi( main::@1/(byte*) heap_head#26 ) - (byte) NUM_SQUARES#14 ← phi( main::@1/(byte) NUM_SQUARES#18 ) + (word*) SQUARES#21 ← phi( main::@1/(word*) SQUARES#27 ) + (byte*) heap_head#21 ← phi( main::@1/(byte*) heap_head#27 ) + (byte) NUM_SQUARES#16 ← phi( main::@1/(byte) NUM_SQUARES#20 ) (byte*) init_dist_screen::screen#0 ← (const byte*) SCREEN call init_dist_screen to:main::@5 @@ -531,9 +542,9 @@ main::@5: scope:[main] from main::@4 (dword) clock::return#2 ← (dword) clock::return#1 to:main::@6 main::@6: scope:[main] from main::@5 - (word*) SQUARES#42 ← phi( main::@5/(word*) SQUARES#3 ) - (byte*) heap_head#39 ← phi( main::@5/(byte*) heap_head#5 ) - (byte) NUM_SQUARES#33 ← phi( main::@5/(byte) NUM_SQUARES#1 ) + (word*) SQUARES#43 ← phi( main::@5/(word*) SQUARES#3 ) + (byte*) heap_head#40 ← phi( main::@5/(byte*) heap_head#5 ) + (byte) NUM_SQUARES#35 ← phi( main::@5/(byte) NUM_SQUARES#1 ) (dword) clock::return#4 ← phi( main::@5/(dword) clock::return#2 ) (dword~) main::$4 ← (dword) clock::return#4 (dword~) main::$5 ← (dword~) main::$4 - (const dword) CLOCKS_PER_INIT @@ -543,16 +554,16 @@ main::@6: scope:[main] from main::@5 call print_dword_at to:main::@7 main::@7: scope:[main] from main::@6 - (word*) SQUARES#40 ← phi( main::@6/(word*) SQUARES#42 ) - (byte*) heap_head#35 ← phi( main::@6/(byte*) heap_head#39 ) - (byte) NUM_SQUARES#29 ← phi( main::@6/(byte) NUM_SQUARES#33 ) + (word*) SQUARES#41 ← phi( main::@6/(word*) SQUARES#43 ) + (byte*) heap_head#36 ← phi( main::@6/(byte*) heap_head#40 ) + (byte) NUM_SQUARES#31 ← phi( main::@6/(byte) NUM_SQUARES#35 ) (byte*) main::toD0182_screen#0 ← (const byte*) main::BASE_SCREEN (byte*) main::toD0182_gfx#0 ← (const byte*) main::BASE_CHARSET to:main::toD0182 main::toD0182: scope:[main] from main::@7 - (word*) SQUARES#34 ← phi( main::@7/(word*) SQUARES#40 ) - (byte*) heap_head#31 ← phi( main::@7/(byte*) heap_head#35 ) - (byte) NUM_SQUARES#23 ← phi( main::@7/(byte) NUM_SQUARES#29 ) + (word*) SQUARES#35 ← phi( main::@7/(word*) SQUARES#41 ) + (byte*) heap_head#32 ← phi( main::@7/(byte*) heap_head#36 ) + (byte) NUM_SQUARES#25 ← phi( main::@7/(byte) NUM_SQUARES#31 ) (byte*) main::toD0182_gfx#1 ← phi( main::@7/(byte*) main::toD0182_gfx#0 ) (byte*) main::toD0182_screen#1 ← phi( main::@7/(byte*) main::toD0182_screen#0 ) (word~) main::toD0182_$0 ← ((word)) (byte*) main::toD0182_screen#1 @@ -567,16 +578,16 @@ main::toD0182: scope:[main] from main::@7 (byte) main::toD0182_return#0 ← (number~) main::toD0182_$8 to:main::toD0182_@return main::toD0182_@return: scope:[main] from main::toD0182 - (word*) SQUARES#27 ← phi( main::toD0182/(word*) SQUARES#34 ) - (byte*) heap_head#27 ← phi( main::toD0182/(byte*) heap_head#31 ) - (byte) NUM_SQUARES#19 ← phi( main::toD0182/(byte) NUM_SQUARES#23 ) + (word*) SQUARES#28 ← phi( main::toD0182/(word*) SQUARES#35 ) + (byte*) heap_head#28 ← phi( main::toD0182/(byte*) heap_head#32 ) + (byte) NUM_SQUARES#21 ← phi( main::toD0182/(byte) NUM_SQUARES#25 ) (byte) main::toD0182_return#2 ← phi( main::toD0182/(byte) main::toD0182_return#0 ) (byte) main::toD0182_return#1 ← (byte) main::toD0182_return#2 to:main::@2 main::@2: scope:[main] from main::toD0182_@return - (word*) SQUARES#22 ← phi( main::toD0182_@return/(word*) SQUARES#27 ) - (byte*) heap_head#22 ← phi( main::toD0182_@return/(byte*) heap_head#27 ) - (byte) NUM_SQUARES#15 ← phi( main::toD0182_@return/(byte) NUM_SQUARES#19 ) + (word*) SQUARES#22 ← phi( main::toD0182_@return/(word*) SQUARES#28 ) + (byte*) heap_head#22 ← phi( main::toD0182_@return/(byte*) heap_head#28 ) + (byte) NUM_SQUARES#17 ← phi( main::toD0182_@return/(byte) NUM_SQUARES#21 ) (byte) main::toD0182_return#3 ← phi( main::toD0182_@return/(byte) main::toD0182_return#1 ) (byte~) main::$7 ← (byte) main::toD0182_return#3 *((const byte*) D018) ← (byte~) main::$7 @@ -584,7 +595,7 @@ main::@2: scope:[main] from main::toD0182_@return main::@return: scope:[main] from main::@2 (word*) SQUARES#13 ← phi( main::@2/(word*) SQUARES#22 ) (byte*) heap_head#15 ← phi( main::@2/(byte*) heap_head#22 ) - (byte) NUM_SQUARES#10 ← phi( main::@2/(byte) NUM_SQUARES#15 ) + (byte) NUM_SQUARES#10 ← phi( main::@2/(byte) NUM_SQUARES#17 ) (byte) NUM_SQUARES#2 ← (byte) NUM_SQUARES#10 (byte*) heap_head#6 ← (byte*) heap_head#15 (word*) SQUARES#4 ← (word*) SQUARES#13 @@ -600,7 +611,7 @@ init_dist_screen: scope:[init_dist_screen] from main::@4 call init_squares to:init_dist_screen::@19 init_dist_screen::@19: scope:[init_dist_screen] from init_dist_screen - (byte) NUM_SQUARES#38 ← phi( init_dist_screen/(byte) NUM_SQUARES#3 ) + (byte) NUM_SQUARES#40 ← phi( init_dist_screen/(byte) NUM_SQUARES#3 ) (byte*) init_dist_screen::screen#1 ← phi( init_dist_screen/(byte*) init_dist_screen::screen#2 ) (word*) SQUARES#14 ← phi( init_dist_screen/(word*) SQUARES#2 ) (byte*) heap_head#16 ← phi( init_dist_screen/(byte*) heap_head#4 ) @@ -612,11 +623,11 @@ init_dist_screen::@19: scope:[init_dist_screen] from init_dist_screen (byte) init_dist_screen::y#0 ← (byte) 0 to:init_dist_screen::@1 init_dist_screen::@1: scope:[init_dist_screen] from init_dist_screen::@19 init_dist_screen::@7 - (byte*) heap_head#44 ← phi( init_dist_screen::@19/(byte*) heap_head#7 init_dist_screen::@7/(byte*) heap_head#24 ) - (byte) NUM_SQUARES#37 ← phi( init_dist_screen::@19/(byte) NUM_SQUARES#38 init_dist_screen::@7/(byte) NUM_SQUARES#16 ) + (byte*) heap_head#45 ← phi( init_dist_screen::@19/(byte*) heap_head#7 init_dist_screen::@7/(byte*) heap_head#24 ) + (byte) NUM_SQUARES#39 ← phi( init_dist_screen::@19/(byte) NUM_SQUARES#40 init_dist_screen::@7/(byte) NUM_SQUARES#18 ) (byte*) init_dist_screen::screen_bottomline#14 ← phi( init_dist_screen::@19/(byte*) init_dist_screen::screen_bottomline#0 init_dist_screen::@7/(byte*) init_dist_screen::screen_bottomline#1 ) (byte*) init_dist_screen::screen_topline#14 ← phi( init_dist_screen::@19/(byte*) init_dist_screen::screen_topline#0 init_dist_screen::@7/(byte*) init_dist_screen::screen_topline#1 ) - (word*) SQUARES#35 ← phi( init_dist_screen::@19/(word*) SQUARES#5 init_dist_screen::@7/(word*) SQUARES#24 ) + (word*) SQUARES#36 ← phi( init_dist_screen::@19/(word*) SQUARES#5 init_dist_screen::@7/(word*) SQUARES#24 ) (byte) init_dist_screen::y#2 ← phi( init_dist_screen::@19/(byte) init_dist_screen::y#0 init_dist_screen::@7/(byte) init_dist_screen::y#1 ) (number~) init_dist_screen::$2 ← (byte) init_dist_screen::y#2 * (number) 2 (byte) init_dist_screen::y2#0 ← (number~) init_dist_screen::$2 @@ -624,34 +635,34 @@ init_dist_screen::@1: scope:[init_dist_screen] from init_dist_screen::@19 init_ if((bool~) init_dist_screen::$3) goto init_dist_screen::@2 to:init_dist_screen::@3 init_dist_screen::@2: scope:[init_dist_screen] from init_dist_screen::@1 - (byte*) heap_head#40 ← phi( init_dist_screen::@1/(byte*) heap_head#44 ) - (byte) NUM_SQUARES#34 ← phi( init_dist_screen::@1/(byte) NUM_SQUARES#37 ) + (byte*) heap_head#41 ← phi( init_dist_screen::@1/(byte*) heap_head#45 ) + (byte) NUM_SQUARES#36 ← phi( init_dist_screen::@1/(byte) NUM_SQUARES#39 ) (byte) init_dist_screen::y#9 ← phi( init_dist_screen::@1/(byte) init_dist_screen::y#2 ) (byte*) init_dist_screen::screen_bottomline#11 ← phi( init_dist_screen::@1/(byte*) init_dist_screen::screen_bottomline#14 ) (byte*) init_dist_screen::screen_topline#11 ← phi( init_dist_screen::@1/(byte*) init_dist_screen::screen_topline#14 ) - (word*) SQUARES#28 ← phi( init_dist_screen::@1/(word*) SQUARES#35 ) + (word*) SQUARES#29 ← phi( init_dist_screen::@1/(word*) SQUARES#36 ) (byte) init_dist_screen::y2#1 ← phi( init_dist_screen::@1/(byte) init_dist_screen::y2#0 ) (number~) init_dist_screen::$6 ← (byte) init_dist_screen::y2#1 - (number) $18 (number~) init_dist_screen::$7 ← (number~) init_dist_screen::$6 to:init_dist_screen::@4 init_dist_screen::@3: scope:[init_dist_screen] from init_dist_screen::@1 - (byte*) heap_head#41 ← phi( init_dist_screen::@1/(byte*) heap_head#44 ) - (byte) NUM_SQUARES#35 ← phi( init_dist_screen::@1/(byte) NUM_SQUARES#37 ) + (byte*) heap_head#42 ← phi( init_dist_screen::@1/(byte*) heap_head#45 ) + (byte) NUM_SQUARES#37 ← phi( init_dist_screen::@1/(byte) NUM_SQUARES#39 ) (byte) init_dist_screen::y#10 ← phi( init_dist_screen::@1/(byte) init_dist_screen::y#2 ) (byte*) init_dist_screen::screen_bottomline#12 ← phi( init_dist_screen::@1/(byte*) init_dist_screen::screen_bottomline#14 ) (byte*) init_dist_screen::screen_topline#12 ← phi( init_dist_screen::@1/(byte*) init_dist_screen::screen_topline#14 ) - (word*) SQUARES#29 ← phi( init_dist_screen::@1/(word*) SQUARES#35 ) + (word*) SQUARES#30 ← phi( init_dist_screen::@1/(word*) SQUARES#36 ) (byte) init_dist_screen::y2#2 ← phi( init_dist_screen::@1/(byte) init_dist_screen::y2#0 ) (number~) init_dist_screen::$4 ← (number) $18 - (byte) init_dist_screen::y2#2 (number~) init_dist_screen::$5 ← (number~) init_dist_screen::$4 to:init_dist_screen::@4 init_dist_screen::@4: scope:[init_dist_screen] from init_dist_screen::@2 init_dist_screen::@3 - (byte*) heap_head#36 ← phi( init_dist_screen::@2/(byte*) heap_head#40 init_dist_screen::@3/(byte*) heap_head#41 ) - (byte) NUM_SQUARES#30 ← phi( init_dist_screen::@2/(byte) NUM_SQUARES#34 init_dist_screen::@3/(byte) NUM_SQUARES#35 ) + (byte*) heap_head#37 ← phi( init_dist_screen::@2/(byte*) heap_head#41 init_dist_screen::@3/(byte*) heap_head#42 ) + (byte) NUM_SQUARES#32 ← phi( init_dist_screen::@2/(byte) NUM_SQUARES#36 init_dist_screen::@3/(byte) NUM_SQUARES#37 ) (byte) init_dist_screen::y#7 ← phi( init_dist_screen::@2/(byte) init_dist_screen::y#9 init_dist_screen::@3/(byte) init_dist_screen::y#10 ) (byte*) init_dist_screen::screen_bottomline#8 ← phi( init_dist_screen::@2/(byte*) init_dist_screen::screen_bottomline#11 init_dist_screen::@3/(byte*) init_dist_screen::screen_bottomline#12 ) (byte*) init_dist_screen::screen_topline#8 ← phi( init_dist_screen::@2/(byte*) init_dist_screen::screen_topline#11 init_dist_screen::@3/(byte*) init_dist_screen::screen_topline#12 ) - (word*) SQUARES#19 ← phi( init_dist_screen::@2/(word*) SQUARES#28 init_dist_screen::@3/(word*) SQUARES#29 ) + (word*) SQUARES#19 ← phi( init_dist_screen::@2/(word*) SQUARES#29 init_dist_screen::@3/(word*) SQUARES#30 ) (number~) init_dist_screen::$8 ← phi( init_dist_screen::@2/(number~) init_dist_screen::$7 init_dist_screen::@3/(number~) init_dist_screen::$5 ) (byte) init_dist_screen::yd#0 ← (number~) init_dist_screen::$8 (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 @@ -659,9 +670,9 @@ init_dist_screen::@4: scope:[init_dist_screen] from init_dist_screen::@2 init_d (word) sqr::return#2 ← (word) sqr::return#1 to:init_dist_screen::@20 init_dist_screen::@20: scope:[init_dist_screen] from init_dist_screen::@4 - (word*) SQUARES#36 ← phi( init_dist_screen::@4/(word*) SQUARES#19 ) - (byte*) heap_head#32 ← phi( init_dist_screen::@4/(byte*) heap_head#36 ) - (byte) NUM_SQUARES#24 ← phi( init_dist_screen::@4/(byte) NUM_SQUARES#30 ) + (word*) SQUARES#37 ← phi( init_dist_screen::@4/(word*) SQUARES#19 ) + (byte*) heap_head#33 ← phi( init_dist_screen::@4/(byte*) heap_head#37 ) + (byte) NUM_SQUARES#26 ← phi( init_dist_screen::@4/(byte) NUM_SQUARES#32 ) (byte) init_dist_screen::y#5 ← phi( init_dist_screen::@4/(byte) init_dist_screen::y#7 ) (byte*) init_dist_screen::screen_bottomline#6 ← phi( init_dist_screen::@4/(byte*) init_dist_screen::screen_bottomline#8 ) (byte*) init_dist_screen::screen_topline#6 ← phi( init_dist_screen::@4/(byte*) init_dist_screen::screen_topline#8 ) @@ -674,9 +685,9 @@ init_dist_screen::@20: scope:[init_dist_screen] from init_dist_screen::@4 init_dist_screen::@5: scope:[init_dist_screen] from init_dist_screen::@20 init_dist_screen::@22 (byte) init_dist_screen::xb#8 ← phi( init_dist_screen::@20/(byte) init_dist_screen::xb#0 init_dist_screen::@22/(byte) init_dist_screen::xb#1 ) (word) init_dist_screen::yds#6 ← phi( init_dist_screen::@20/(word) init_dist_screen::yds#0 init_dist_screen::@22/(word) init_dist_screen::yds#7 ) - (word*) SQUARES#30 ← phi( init_dist_screen::@20/(word*) SQUARES#36 init_dist_screen::@22/(word*) SQUARES#37 ) - (byte*) heap_head#28 ← phi( init_dist_screen::@20/(byte*) heap_head#32 init_dist_screen::@22/(byte*) heap_head#33 ) - (byte) NUM_SQUARES#20 ← phi( init_dist_screen::@20/(byte) NUM_SQUARES#24 init_dist_screen::@22/(byte) NUM_SQUARES#25 ) + (word*) SQUARES#31 ← phi( init_dist_screen::@20/(word*) SQUARES#37 init_dist_screen::@22/(word*) SQUARES#38 ) + (byte*) heap_head#29 ← phi( init_dist_screen::@20/(byte*) heap_head#33 init_dist_screen::@22/(byte*) heap_head#34 ) + (byte) NUM_SQUARES#22 ← phi( init_dist_screen::@20/(byte) NUM_SQUARES#26 init_dist_screen::@22/(byte) NUM_SQUARES#27 ) (byte) init_dist_screen::y#4 ← phi( init_dist_screen::@20/(byte) init_dist_screen::y#5 init_dist_screen::@22/(byte) init_dist_screen::y#6 ) (byte*) init_dist_screen::screen_bottomline#4 ← phi( init_dist_screen::@20/(byte*) init_dist_screen::screen_bottomline#6 init_dist_screen::@22/(byte*) init_dist_screen::screen_bottomline#3 ) (byte*) init_dist_screen::screen_topline#4 ← phi( init_dist_screen::@20/(byte*) init_dist_screen::screen_topline#6 init_dist_screen::@22/(byte*) init_dist_screen::screen_topline#3 ) @@ -685,14 +696,14 @@ init_dist_screen::@5: scope:[init_dist_screen] from init_dist_screen::@20 init_ if((bool~) init_dist_screen::$10) goto init_dist_screen::@6 to:init_dist_screen::@7 init_dist_screen::@6: scope:[init_dist_screen] from init_dist_screen::@5 - (byte*) heap_head#47 ← phi( init_dist_screen::@5/(byte*) heap_head#28 ) + (byte*) heap_head#48 ← phi( init_dist_screen::@5/(byte*) heap_head#29 ) (byte) init_dist_screen::y#14 ← phi( init_dist_screen::@5/(byte) init_dist_screen::y#4 ) (byte) init_dist_screen::xb#7 ← phi( init_dist_screen::@5/(byte) init_dist_screen::xb#8 ) (byte*) init_dist_screen::screen_bottomline#13 ← phi( init_dist_screen::@5/(byte*) init_dist_screen::screen_bottomline#4 ) (byte*) init_dist_screen::screen_topline#13 ← phi( init_dist_screen::@5/(byte*) init_dist_screen::screen_topline#4 ) - (byte) NUM_SQUARES#31 ← phi( init_dist_screen::@5/(byte) NUM_SQUARES#20 ) + (byte) NUM_SQUARES#33 ← phi( init_dist_screen::@5/(byte) NUM_SQUARES#22 ) (word) init_dist_screen::yds#5 ← phi( init_dist_screen::@5/(word) init_dist_screen::yds#6 ) - (word*) SQUARES#38 ← phi( init_dist_screen::@5/(word*) SQUARES#30 ) + (word*) SQUARES#39 ← phi( init_dist_screen::@5/(word*) SQUARES#31 ) (byte) init_dist_screen::x#3 ← phi( init_dist_screen::@5/(byte) init_dist_screen::x#2 ) (number~) init_dist_screen::$11 ← (byte) init_dist_screen::x#3 * (number) 2 (byte) init_dist_screen::x2#0 ← (number~) init_dist_screen::$11 @@ -700,9 +711,9 @@ init_dist_screen::@6: scope:[init_dist_screen] from init_dist_screen::@5 if((bool~) init_dist_screen::$12) goto init_dist_screen::@8 to:init_dist_screen::@9 init_dist_screen::@7: scope:[init_dist_screen] from init_dist_screen::@5 - (word*) SQUARES#24 ← phi( init_dist_screen::@5/(word*) SQUARES#30 ) - (byte*) heap_head#24 ← phi( init_dist_screen::@5/(byte*) heap_head#28 ) - (byte) NUM_SQUARES#16 ← phi( init_dist_screen::@5/(byte) NUM_SQUARES#20 ) + (word*) SQUARES#24 ← phi( init_dist_screen::@5/(word*) SQUARES#31 ) + (byte*) heap_head#24 ← phi( init_dist_screen::@5/(byte*) heap_head#29 ) + (byte) NUM_SQUARES#18 ← phi( init_dist_screen::@5/(byte) NUM_SQUARES#22 ) (byte) init_dist_screen::y#3 ← phi( init_dist_screen::@5/(byte) init_dist_screen::y#4 ) (byte*) init_dist_screen::screen_bottomline#2 ← phi( init_dist_screen::@5/(byte*) init_dist_screen::screen_bottomline#4 ) (byte*) init_dist_screen::screen_topline#2 ← phi( init_dist_screen::@5/(byte*) init_dist_screen::screen_topline#4 ) @@ -713,43 +724,43 @@ init_dist_screen::@7: scope:[init_dist_screen] from init_dist_screen::@5 if((bool~) init_dist_screen::$21) goto init_dist_screen::@1 to:init_dist_screen::@return init_dist_screen::@8: scope:[init_dist_screen] from init_dist_screen::@6 - (byte*) heap_head#45 ← phi( init_dist_screen::@6/(byte*) heap_head#47 ) + (byte*) heap_head#46 ← phi( init_dist_screen::@6/(byte*) heap_head#48 ) (byte) init_dist_screen::y#12 ← phi( init_dist_screen::@6/(byte) init_dist_screen::y#14 ) (byte) init_dist_screen::xb#5 ← phi( init_dist_screen::@6/(byte) init_dist_screen::xb#7 ) (byte*) init_dist_screen::screen_bottomline#9 ← phi( init_dist_screen::@6/(byte*) init_dist_screen::screen_bottomline#13 ) (byte) init_dist_screen::x#7 ← phi( init_dist_screen::@6/(byte) init_dist_screen::x#3 ) (byte*) init_dist_screen::screen_topline#9 ← phi( init_dist_screen::@6/(byte*) init_dist_screen::screen_topline#13 ) - (byte) NUM_SQUARES#26 ← phi( init_dist_screen::@6/(byte) NUM_SQUARES#31 ) + (byte) NUM_SQUARES#28 ← phi( init_dist_screen::@6/(byte) NUM_SQUARES#33 ) (word) init_dist_screen::yds#3 ← phi( init_dist_screen::@6/(word) init_dist_screen::yds#5 ) - (word*) SQUARES#31 ← phi( init_dist_screen::@6/(word*) SQUARES#38 ) + (word*) SQUARES#32 ← phi( init_dist_screen::@6/(word*) SQUARES#39 ) (byte) init_dist_screen::x2#1 ← phi( init_dist_screen::@6/(byte) init_dist_screen::x2#0 ) (number~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#1 - (number) $27 (number~) init_dist_screen::$16 ← (number~) init_dist_screen::$15 to:init_dist_screen::@10 init_dist_screen::@9: scope:[init_dist_screen] from init_dist_screen::@6 - (byte*) heap_head#46 ← phi( init_dist_screen::@6/(byte*) heap_head#47 ) + (byte*) heap_head#47 ← phi( init_dist_screen::@6/(byte*) heap_head#48 ) (byte) init_dist_screen::y#13 ← phi( init_dist_screen::@6/(byte) init_dist_screen::y#14 ) (byte) init_dist_screen::xb#6 ← phi( init_dist_screen::@6/(byte) init_dist_screen::xb#7 ) (byte*) init_dist_screen::screen_bottomline#10 ← phi( init_dist_screen::@6/(byte*) init_dist_screen::screen_bottomline#13 ) (byte) init_dist_screen::x#8 ← phi( init_dist_screen::@6/(byte) init_dist_screen::x#3 ) (byte*) init_dist_screen::screen_topline#10 ← phi( init_dist_screen::@6/(byte*) init_dist_screen::screen_topline#13 ) - (byte) NUM_SQUARES#27 ← phi( init_dist_screen::@6/(byte) NUM_SQUARES#31 ) + (byte) NUM_SQUARES#29 ← phi( init_dist_screen::@6/(byte) NUM_SQUARES#33 ) (word) init_dist_screen::yds#4 ← phi( init_dist_screen::@6/(word) init_dist_screen::yds#5 ) - (word*) SQUARES#32 ← phi( init_dist_screen::@6/(word*) SQUARES#38 ) + (word*) SQUARES#33 ← phi( init_dist_screen::@6/(word*) SQUARES#39 ) (byte) init_dist_screen::x2#2 ← phi( init_dist_screen::@6/(byte) init_dist_screen::x2#0 ) (number~) init_dist_screen::$13 ← (number) $27 - (byte) init_dist_screen::x2#2 (number~) init_dist_screen::$14 ← (number~) init_dist_screen::$13 to:init_dist_screen::@10 init_dist_screen::@10: scope:[init_dist_screen] from init_dist_screen::@8 init_dist_screen::@9 - (byte*) heap_head#42 ← phi( init_dist_screen::@8/(byte*) heap_head#45 init_dist_screen::@9/(byte*) heap_head#46 ) + (byte*) heap_head#43 ← phi( init_dist_screen::@8/(byte*) heap_head#46 init_dist_screen::@9/(byte*) heap_head#47 ) (byte) init_dist_screen::y#11 ← phi( init_dist_screen::@8/(byte) init_dist_screen::y#12 init_dist_screen::@9/(byte) init_dist_screen::y#13 ) (byte) init_dist_screen::xb#4 ← phi( init_dist_screen::@8/(byte) init_dist_screen::xb#5 init_dist_screen::@9/(byte) init_dist_screen::xb#6 ) (byte*) init_dist_screen::screen_bottomline#7 ← phi( init_dist_screen::@8/(byte*) init_dist_screen::screen_bottomline#9 init_dist_screen::@9/(byte*) init_dist_screen::screen_bottomline#10 ) (byte) init_dist_screen::x#6 ← phi( init_dist_screen::@8/(byte) init_dist_screen::x#7 init_dist_screen::@9/(byte) init_dist_screen::x#8 ) (byte*) init_dist_screen::screen_topline#7 ← phi( init_dist_screen::@8/(byte*) init_dist_screen::screen_topline#9 init_dist_screen::@9/(byte*) init_dist_screen::screen_topline#10 ) - (byte) NUM_SQUARES#21 ← phi( init_dist_screen::@8/(byte) NUM_SQUARES#26 init_dist_screen::@9/(byte) NUM_SQUARES#27 ) + (byte) NUM_SQUARES#23 ← phi( init_dist_screen::@8/(byte) NUM_SQUARES#28 init_dist_screen::@9/(byte) NUM_SQUARES#29 ) (word) init_dist_screen::yds#2 ← phi( init_dist_screen::@8/(word) init_dist_screen::yds#3 init_dist_screen::@9/(word) init_dist_screen::yds#4 ) - (word*) SQUARES#18 ← phi( init_dist_screen::@8/(word*) SQUARES#31 init_dist_screen::@9/(word*) SQUARES#32 ) + (word*) SQUARES#18 ← phi( init_dist_screen::@8/(word*) SQUARES#32 init_dist_screen::@9/(word*) SQUARES#33 ) (number~) init_dist_screen::$17 ← phi( init_dist_screen::@8/(number~) init_dist_screen::$16 init_dist_screen::@9/(number~) init_dist_screen::$14 ) (byte) init_dist_screen::xd#0 ← (number~) init_dist_screen::$17 (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 @@ -757,13 +768,13 @@ init_dist_screen::@10: scope:[init_dist_screen] from init_dist_screen::@8 init_ (word) sqr::return#3 ← (word) sqr::return#1 to:init_dist_screen::@21 init_dist_screen::@21: scope:[init_dist_screen] from init_dist_screen::@10 - (byte*) heap_head#37 ← phi( init_dist_screen::@10/(byte*) heap_head#42 ) + (byte*) heap_head#38 ← phi( init_dist_screen::@10/(byte*) heap_head#43 ) (byte) init_dist_screen::y#8 ← phi( init_dist_screen::@10/(byte) init_dist_screen::y#11 ) (byte) init_dist_screen::xb#3 ← phi( init_dist_screen::@10/(byte) init_dist_screen::xb#4 ) (byte*) init_dist_screen::screen_bottomline#5 ← phi( init_dist_screen::@10/(byte*) init_dist_screen::screen_bottomline#7 ) (byte) init_dist_screen::x#5 ← phi( init_dist_screen::@10/(byte) init_dist_screen::x#6 ) (byte*) init_dist_screen::screen_topline#5 ← phi( init_dist_screen::@10/(byte*) init_dist_screen::screen_topline#7 ) - (byte) NUM_SQUARES#13 ← phi( init_dist_screen::@10/(byte) NUM_SQUARES#21 ) + (byte) NUM_SQUARES#15 ← phi( init_dist_screen::@10/(byte) NUM_SQUARES#23 ) (word*) SQUARES#20 ← phi( init_dist_screen::@10/(word*) SQUARES#18 ) (word) init_dist_screen::yds#1 ← phi( init_dist_screen::@10/(word) init_dist_screen::yds#2 ) (word) sqr::return#6 ← phi( init_dist_screen::@10/(word) sqr::return#3 ) @@ -777,9 +788,9 @@ init_dist_screen::@21: scope:[init_dist_screen] from init_dist_screen::@10 to:init_dist_screen::@22 init_dist_screen::@22: scope:[init_dist_screen] from init_dist_screen::@21 (word) init_dist_screen::yds#7 ← phi( init_dist_screen::@21/(word) init_dist_screen::yds#1 ) - (word*) SQUARES#37 ← phi( init_dist_screen::@21/(word*) SQUARES#20 ) - (byte*) heap_head#33 ← phi( init_dist_screen::@21/(byte*) heap_head#37 ) - (byte) NUM_SQUARES#25 ← phi( init_dist_screen::@21/(byte) NUM_SQUARES#13 ) + (word*) SQUARES#38 ← phi( init_dist_screen::@21/(word*) SQUARES#20 ) + (byte*) heap_head#34 ← phi( init_dist_screen::@21/(byte*) heap_head#38 ) + (byte) NUM_SQUARES#27 ← phi( init_dist_screen::@21/(byte) NUM_SQUARES#15 ) (byte) init_dist_screen::y#6 ← phi( init_dist_screen::@21/(byte) init_dist_screen::y#8 ) (byte) init_dist_screen::xb#2 ← phi( init_dist_screen::@21/(byte) init_dist_screen::xb#3 ) (byte*) init_dist_screen::screen_bottomline#3 ← phi( init_dist_screen::@21/(byte*) init_dist_screen::screen_bottomline#5 ) @@ -798,7 +809,7 @@ init_dist_screen::@22: scope:[init_dist_screen] from init_dist_screen::@21 init_dist_screen::@return: scope:[init_dist_screen] from init_dist_screen::@7 (word*) SQUARES#15 ← phi( init_dist_screen::@7/(word*) SQUARES#24 ) (byte*) heap_head#17 ← phi( init_dist_screen::@7/(byte*) heap_head#24 ) - (byte) NUM_SQUARES#11 ← phi( init_dist_screen::@7/(byte) NUM_SQUARES#16 ) + (byte) NUM_SQUARES#11 ← phi( init_dist_screen::@7/(byte) NUM_SQUARES#18 ) (byte) NUM_SQUARES#4 ← (byte) NUM_SQUARES#11 (byte*) heap_head#8 ← (byte*) heap_head#17 (word*) SQUARES#6 ← (word*) SQUARES#15 @@ -806,8 +817,8 @@ init_dist_screen::@return: scope:[init_dist_screen] from init_dist_screen::@7 to:@return @49: scope:[] from @13 (word*) SQUARES#25 ← phi( @13/(word*) SQUARES#0 ) - (byte*) heap_head#25 ← phi( @13/(byte*) heap_head#29 ) - (byte) NUM_SQUARES#17 ← phi( @13/(byte) NUM_SQUARES#0 ) + (byte*) heap_head#25 ← phi( @13/(byte*) heap_head#30 ) + (byte) NUM_SQUARES#19 ← phi( @13/(byte) NUM_SQUARES#0 ) call main to:@50 @50: scope:[] from @49 @@ -874,7 +885,9 @@ SYMBOL TABLE SSA (byte) NUM_SQUARES#36 (byte) NUM_SQUARES#37 (byte) NUM_SQUARES#38 +(byte) NUM_SQUARES#39 (byte) NUM_SQUARES#4 +(byte) NUM_SQUARES#40 (byte) NUM_SQUARES#5 (byte) NUM_SQUARES#6 (byte) NUM_SQUARES#7 @@ -926,6 +939,7 @@ SYMBOL TABLE SSA (word*) SQUARES#41 (word*) SQUARES#42 (word*) SQUARES#43 +(word*) SQUARES#44 (word*) SQUARES#5 (word*) SQUARES#6 (word*) SQUARES#7 @@ -1062,6 +1076,7 @@ SYMBOL TABLE SSA (byte*) heap_head#45 (byte*) heap_head#46 (byte*) heap_head#47 +(byte*) heap_head#48 (byte*) heap_head#5 (byte*) heap_head#6 (byte*) heap_head#7 @@ -1268,25 +1283,28 @@ SYMBOL TABLE SSA (void()) init_squares() (byte~) init_squares::$0 (void*~) init_squares::$1 -(number~) init_squares::$2 +(bool~) init_squares::$2 (number~) init_squares::$3 (number~) init_squares::$4 -(bool~) init_squares::$5 (label) init_squares::@1 -(label) init_squares::@3 +(label) init_squares::@2 +(label) init_squares::@7 (label) init_squares::@return (byte) init_squares::i (byte) init_squares::i#0 (byte) init_squares::i#1 (byte) init_squares::i#2 +(byte) init_squares::i#3 (word) init_squares::sqr (word) init_squares::sqr#0 (word) init_squares::sqr#1 (word) init_squares::sqr#2 +(word) init_squares::sqr#3 (word*) init_squares::squares (word*) init_squares::squares#0 (word*) init_squares::squares#1 (word*) init_squares::squares#2 +(word*) init_squares::squares#3 (void()) main() (byte~) main::$1 (dword~) main::$4 @@ -1467,10 +1485,8 @@ Adding number conversion cast (unumber) 1 in (number~) bsearch16u::$17 ← (numb Adding number conversion cast (unumber) bsearch16u::$17 in (number~) bsearch16u::$17 ← (unumber)(number) 1 * (const byte) SIZEOF_WORD Adding number conversion cast (unumber) 1 in (number~) bsearch16u::$18 ← (number) 1 * (const byte) SIZEOF_WORD Adding number conversion cast (unumber) bsearch16u::$18 in (number~) bsearch16u::$18 ← (unumber)(number) 1 * (const byte) SIZEOF_WORD -Adding number conversion cast (unumber) 1 in (number~) init_squares::$2 ← (byte) NUM_SQUARES#7 - (number) 1 -Adding number conversion cast (unumber) init_squares::$2 in (number~) init_squares::$2 ← (byte) NUM_SQUARES#7 - (unumber)(number) 1 -Adding number conversion cast (unumber) 2 in (number~) init_squares::$3 ← (byte) init_squares::i#2 * (number) 2 -Adding number conversion cast (unumber) init_squares::$3 in (number~) init_squares::$3 ← (byte) init_squares::i#2 * (unumber)(number) 2 +Adding number conversion cast (unumber) 2 in (number~) init_squares::$3 ← (byte) init_squares::i#3 * (number) 2 +Adding number conversion cast (unumber) init_squares::$3 in (number~) init_squares::$3 ← (byte) init_squares::i#3 * (unumber)(number) 2 Adding number conversion cast (unumber) 1 in (number~) init_squares::$4 ← (unumber~) init_squares::$3 + (number) 1 Adding number conversion cast (unumber) init_squares::$4 in (number~) init_squares::$4 ← (unumber~) init_squares::$3 + (unumber)(number) 1 Adding number conversion cast (unumber) 0 in *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#0) ← (number) 0 @@ -1521,12 +1537,12 @@ Adding number conversion cast (unumber) init_dist_screen::$7 in (number~) init_d Adding number conversion cast (unumber) $18 in (number~) init_dist_screen::$4 ← (number) $18 - (byte) init_dist_screen::y2#2 Adding number conversion cast (unumber) init_dist_screen::$4 in (number~) init_dist_screen::$4 ← (unumber)(number) $18 - (byte) init_dist_screen::y2#2 Adding number conversion cast (unumber) init_dist_screen::$5 in (number~) init_dist_screen::$5 ← (unumber~) init_dist_screen::$4 -Adding number conversion cast (unumber) init_dist_screen::$8 in (byte*) heap_head#36 ← phi( init_dist_screen::@2/(byte*) heap_head#40 init_dist_screen::@3/(byte*) heap_head#41 ) - (byte) NUM_SQUARES#30 ← phi( init_dist_screen::@2/(byte) NUM_SQUARES#34 init_dist_screen::@3/(byte) NUM_SQUARES#35 ) +Adding number conversion cast (unumber) init_dist_screen::$8 in (byte*) heap_head#37 ← phi( init_dist_screen::@2/(byte*) heap_head#41 init_dist_screen::@3/(byte*) heap_head#42 ) + (byte) NUM_SQUARES#32 ← phi( init_dist_screen::@2/(byte) NUM_SQUARES#36 init_dist_screen::@3/(byte) NUM_SQUARES#37 ) (byte) init_dist_screen::y#7 ← phi( init_dist_screen::@2/(byte) init_dist_screen::y#9 init_dist_screen::@3/(byte) init_dist_screen::y#10 ) (byte*) init_dist_screen::screen_bottomline#8 ← phi( init_dist_screen::@2/(byte*) init_dist_screen::screen_bottomline#11 init_dist_screen::@3/(byte*) init_dist_screen::screen_bottomline#12 ) (byte*) init_dist_screen::screen_topline#8 ← phi( init_dist_screen::@2/(byte*) init_dist_screen::screen_topline#11 init_dist_screen::@3/(byte*) init_dist_screen::screen_topline#12 ) - (word*) SQUARES#19 ← phi( init_dist_screen::@2/(word*) SQUARES#28 init_dist_screen::@3/(word*) SQUARES#29 ) + (word*) SQUARES#19 ← phi( init_dist_screen::@2/(word*) SQUARES#29 init_dist_screen::@3/(word*) SQUARES#30 ) (number~) init_dist_screen::$8 ← phi( init_dist_screen::@2/(unumber~) init_dist_screen::$7 init_dist_screen::@3/(unumber~) init_dist_screen::$5 ) Adding number conversion cast (unumber) $13 in (bool~) init_dist_screen::$10 ← (byte) init_dist_screen::x#2 <= (number) $13 Adding number conversion cast (unumber) 2 in (number~) init_dist_screen::$11 ← (byte) init_dist_screen::x#3 * (number) 2 @@ -1540,15 +1556,15 @@ Adding number conversion cast (unumber) init_dist_screen::$16 in (number~) init_ Adding number conversion cast (unumber) $27 in (number~) init_dist_screen::$13 ← (number) $27 - (byte) init_dist_screen::x2#2 Adding number conversion cast (unumber) init_dist_screen::$13 in (number~) init_dist_screen::$13 ← (unumber)(number) $27 - (byte) init_dist_screen::x2#2 Adding number conversion cast (unumber) init_dist_screen::$14 in (number~) init_dist_screen::$14 ← (unumber~) init_dist_screen::$13 -Adding number conversion cast (unumber) init_dist_screen::$17 in (byte*) heap_head#42 ← phi( init_dist_screen::@8/(byte*) heap_head#45 init_dist_screen::@9/(byte*) heap_head#46 ) +Adding number conversion cast (unumber) init_dist_screen::$17 in (byte*) heap_head#43 ← phi( init_dist_screen::@8/(byte*) heap_head#46 init_dist_screen::@9/(byte*) heap_head#47 ) (byte) init_dist_screen::y#11 ← phi( init_dist_screen::@8/(byte) init_dist_screen::y#12 init_dist_screen::@9/(byte) init_dist_screen::y#13 ) (byte) init_dist_screen::xb#4 ← phi( init_dist_screen::@8/(byte) init_dist_screen::xb#5 init_dist_screen::@9/(byte) init_dist_screen::xb#6 ) (byte*) init_dist_screen::screen_bottomline#7 ← phi( init_dist_screen::@8/(byte*) init_dist_screen::screen_bottomline#9 init_dist_screen::@9/(byte*) init_dist_screen::screen_bottomline#10 ) (byte) init_dist_screen::x#6 ← phi( init_dist_screen::@8/(byte) init_dist_screen::x#7 init_dist_screen::@9/(byte) init_dist_screen::x#8 ) (byte*) init_dist_screen::screen_topline#7 ← phi( init_dist_screen::@8/(byte*) init_dist_screen::screen_topline#9 init_dist_screen::@9/(byte*) init_dist_screen::screen_topline#10 ) - (byte) NUM_SQUARES#21 ← phi( init_dist_screen::@8/(byte) NUM_SQUARES#26 init_dist_screen::@9/(byte) NUM_SQUARES#27 ) + (byte) NUM_SQUARES#23 ← phi( init_dist_screen::@8/(byte) NUM_SQUARES#28 init_dist_screen::@9/(byte) NUM_SQUARES#29 ) (word) init_dist_screen::yds#2 ← phi( init_dist_screen::@8/(word) init_dist_screen::yds#3 init_dist_screen::@9/(word) init_dist_screen::yds#4 ) - (word*) SQUARES#18 ← phi( init_dist_screen::@8/(word*) SQUARES#31 init_dist_screen::@9/(word*) SQUARES#32 ) + (word*) SQUARES#18 ← phi( init_dist_screen::@8/(word*) SQUARES#32 init_dist_screen::@9/(word*) SQUARES#33 ) (number~) init_dist_screen::$17 ← phi( init_dist_screen::@8/(unumber~) init_dist_screen::$16 init_dist_screen::@9/(unumber~) init_dist_screen::$14 ) Successful SSA optimization PassNAddNumberTypeConversions Inlining cast (void*) malloc::return#0 ← (void*)(byte*) malloc::mem#0 @@ -1582,7 +1598,6 @@ Simplifying constant integer cast 0 Simplifying constant integer cast 1 Simplifying constant integer cast 1 Simplifying constant integer cast 1 -Simplifying constant integer cast 1 Simplifying constant integer cast 2 Simplifying constant integer cast 1 Simplifying constant integer cast 0 @@ -1628,7 +1643,6 @@ Finalized signed number type (signed byte) 0 Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 1 -Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 2 Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 0 @@ -1669,8 +1683,7 @@ Finalized unsigned number type (byte) $27 Successful SSA optimization PassNFinalizeNumberTypeConversions Inferred type updated to byte in (unumber~) bsearch16u::$17 ← (byte) 1 * (const byte) SIZEOF_WORD Inferred type updated to byte in (unumber~) bsearch16u::$18 ← (byte) 1 * (const byte) SIZEOF_WORD -Inferred type updated to byte in (unumber~) init_squares::$2 ← (byte) NUM_SQUARES#7 - (byte) 1 -Inferred type updated to byte in (unumber~) init_squares::$3 ← (byte) init_squares::i#2 * (byte) 2 +Inferred type updated to byte in (unumber~) init_squares::$3 ← (byte) init_squares::i#3 * (byte) 2 Inferred type updated to byte in (unumber~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 Inferred type updated to dword in (unumber~) clock::$0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB) Inferred type updated to byte in (unumber~) print_byte_at::$2 ← (byte) print_byte_at::b#3 & (byte) $f @@ -1713,13 +1726,17 @@ Alias (word*) bsearch16u::return#1 = (word*) bsearch16u::return#4 Alias (word*) bsearch16u::items#0 = (word*~) bsearch16u::$15 Alias (word*~) bsearch16u::$2 = (word*~) bsearch16u::$1 Alias (word*) bsearch16u::return#2 = (word*~) bsearch16u::$4 -Alias (byte*) heap_head#0 = (byte*) heap_head#29 (byte*) heap_head#25 +Alias (byte*) heap_head#0 = (byte*) heap_head#30 (byte*) heap_head#25 Alias (word) malloc::size#0 = (byte~) init_squares::$0 Alias (void*) malloc::return#2 = (void*) malloc::return#4 -Alias (byte) NUM_SQUARES#6 = (byte) NUM_SQUARES#7 +Alias (byte) NUM_SQUARES#14 = (byte) NUM_SQUARES#6 Alias (byte*) heap_head#12 = (byte*) heap_head#3 -Alias (byte*) heap_head#13 = (byte*) heap_head#20 (byte*) heap_head#4 -Alias (word*) SQUARES#17 = (word*) SQUARES#8 (word*) SQUARES#2 +Alias (word) init_squares::sqr#2 = (word) init_squares::sqr#3 +Alias (word*) init_squares::squares#2 = (word*) init_squares::squares#3 +Alias (byte) init_squares::i#2 = (byte) init_squares::i#3 +Alias (byte) NUM_SQUARES#13 = (byte) NUM_SQUARES#7 +Alias (byte*) heap_head#13 = (byte*) heap_head#26 (byte*) heap_head#20 (byte*) heap_head#4 +Alias (word*) SQUARES#17 = (word*) SQUARES#26 (word*) SQUARES#8 (word*) SQUARES#2 Alias (word) sqr::return#0 = (word) sqr::return#4 (word) sqr::return#1 Alias (word*) bsearch16u::return#3 = (word*) bsearch16u::return#5 Alias (word*) SQUARES#10 = (word*) SQUARES#11 @@ -1746,32 +1763,32 @@ Alias (byte*) print_word_at::at#1 = (byte*~) print_dword_at::$3 Alias (byte) print_byte_at::b#2 = (byte) print_byte_at::b#3 Alias (byte*) print_byte_at::at#2 = (byte*) print_byte_at::at#3 Alias (byte*) print_char_at::at#1 = (byte*~) print_byte_at::$3 -Alias (byte) NUM_SQUARES#14 = (byte) NUM_SQUARES#32 (byte) NUM_SQUARES#36 (byte) NUM_SQUARES#28 (byte) NUM_SQUARES#22 (byte) NUM_SQUARES#18 -Alias (byte*) heap_head#21 = (byte*) heap_head#38 (byte*) heap_head#43 (byte*) heap_head#34 (byte*) heap_head#30 (byte*) heap_head#26 -Alias (word*) SQUARES#21 = (word*) SQUARES#41 (word*) SQUARES#43 (word*) SQUARES#39 (word*) SQUARES#33 (word*) SQUARES#26 +Alias (byte) NUM_SQUARES#16 = (byte) NUM_SQUARES#34 (byte) NUM_SQUARES#38 (byte) NUM_SQUARES#30 (byte) NUM_SQUARES#24 (byte) NUM_SQUARES#20 +Alias (byte*) heap_head#21 = (byte*) heap_head#39 (byte*) heap_head#44 (byte*) heap_head#35 (byte*) heap_head#31 (byte*) heap_head#27 +Alias (word*) SQUARES#21 = (word*) SQUARES#42 (word*) SQUARES#44 (word*) SQUARES#40 (word*) SQUARES#34 (word*) SQUARES#27 Alias (byte*) main::toD0181_screen#0 = (byte*) main::toD0181_screen#1 Alias (byte*) main::toD0181_gfx#0 = (byte*) main::toD0181_gfx#1 Alias (byte) main::toD0181_return#0 = (byte~) main::toD0181_$8 (byte) main::toD0181_return#2 (byte) main::toD0181_return#1 (byte) main::toD0181_return#3 (byte~) main::$1 -Alias (byte) NUM_SQUARES#1 = (byte) NUM_SQUARES#9 (byte) NUM_SQUARES#33 (byte) NUM_SQUARES#29 (byte) NUM_SQUARES#23 (byte) NUM_SQUARES#19 (byte) NUM_SQUARES#15 (byte) NUM_SQUARES#10 (byte) NUM_SQUARES#2 -Alias (byte*) heap_head#14 = (byte*) heap_head#5 (byte*) heap_head#39 (byte*) heap_head#35 (byte*) heap_head#31 (byte*) heap_head#27 (byte*) heap_head#22 (byte*) heap_head#15 (byte*) heap_head#6 -Alias (word*) SQUARES#12 = (word*) SQUARES#3 (word*) SQUARES#42 (word*) SQUARES#40 (word*) SQUARES#34 (word*) SQUARES#27 (word*) SQUARES#22 (word*) SQUARES#13 (word*) SQUARES#4 +Alias (byte) NUM_SQUARES#1 = (byte) NUM_SQUARES#9 (byte) NUM_SQUARES#35 (byte) NUM_SQUARES#31 (byte) NUM_SQUARES#25 (byte) NUM_SQUARES#21 (byte) NUM_SQUARES#17 (byte) NUM_SQUARES#10 (byte) NUM_SQUARES#2 +Alias (byte*) heap_head#14 = (byte*) heap_head#5 (byte*) heap_head#40 (byte*) heap_head#36 (byte*) heap_head#32 (byte*) heap_head#28 (byte*) heap_head#22 (byte*) heap_head#15 (byte*) heap_head#6 +Alias (word*) SQUARES#12 = (word*) SQUARES#3 (word*) SQUARES#43 (word*) SQUARES#41 (word*) SQUARES#35 (word*) SQUARES#28 (word*) SQUARES#22 (word*) SQUARES#13 (word*) SQUARES#4 Alias (dword) clock::return#2 = (dword) clock::return#4 Alias (dword) main::cyclecount#0 = (dword~) main::$5 Alias (byte*) main::toD0182_screen#0 = (byte*) main::toD0182_screen#1 Alias (byte*) main::toD0182_gfx#0 = (byte*) main::toD0182_gfx#1 Alias (byte) main::toD0182_return#0 = (byte~) main::toD0182_$8 (byte) main::toD0182_return#2 (byte) main::toD0182_return#1 (byte) main::toD0182_return#3 (byte~) main::$7 Alias (byte*) init_dist_screen::screen#1 = (byte*) init_dist_screen::screen#2 (byte*) init_dist_screen::screen_topline#0 -Alias (byte) NUM_SQUARES#3 = (byte) NUM_SQUARES#38 +Alias (byte) NUM_SQUARES#3 = (byte) NUM_SQUARES#40 Alias (byte*) heap_head#16 = (byte*) heap_head#7 Alias (word*) SQUARES#14 = (word*) SQUARES#5 Alias (byte*) init_dist_screen::screen_bottomline#0 = (byte*~) init_dist_screen::$1 Alias (byte) init_dist_screen::y2#0 = (byte~) init_dist_screen::$2 (byte) init_dist_screen::y2#1 (byte) init_dist_screen::y2#2 -Alias (word*) SQUARES#28 = (word*) SQUARES#35 (word*) SQUARES#29 +Alias (word*) SQUARES#29 = (word*) SQUARES#36 (word*) SQUARES#30 Alias (byte*) init_dist_screen::screen_topline#11 = (byte*) init_dist_screen::screen_topline#14 (byte*) init_dist_screen::screen_topline#12 Alias (byte*) init_dist_screen::screen_bottomline#11 = (byte*) init_dist_screen::screen_bottomline#14 (byte*) init_dist_screen::screen_bottomline#12 Alias (byte) init_dist_screen::y#10 = (byte) init_dist_screen::y#9 (byte) init_dist_screen::y#2 -Alias (byte) NUM_SQUARES#34 = (byte) NUM_SQUARES#37 (byte) NUM_SQUARES#35 -Alias (byte*) heap_head#40 = (byte*) heap_head#44 (byte*) heap_head#41 +Alias (byte) NUM_SQUARES#36 = (byte) NUM_SQUARES#39 (byte) NUM_SQUARES#37 +Alias (byte*) heap_head#41 = (byte*) heap_head#45 (byte*) heap_head#42 Alias (byte~) init_dist_screen::$7 = (byte~) init_dist_screen::$6 Alias (byte~) init_dist_screen::$5 = (byte~) init_dist_screen::$4 Alias (byte) init_dist_screen::yd#0 = (byte~) init_dist_screen::$8 @@ -1779,59 +1796,59 @@ Alias (word) sqr::return#2 = (word) sqr::return#5 Alias (byte*) init_dist_screen::screen_topline#6 = (byte*) init_dist_screen::screen_topline#8 Alias (byte*) init_dist_screen::screen_bottomline#6 = (byte*) init_dist_screen::screen_bottomline#8 Alias (byte) init_dist_screen::y#5 = (byte) init_dist_screen::y#7 -Alias (byte) NUM_SQUARES#24 = (byte) NUM_SQUARES#30 -Alias (byte*) heap_head#32 = (byte*) heap_head#36 -Alias (word*) SQUARES#19 = (word*) SQUARES#36 +Alias (byte) NUM_SQUARES#26 = (byte) NUM_SQUARES#32 +Alias (byte*) heap_head#33 = (byte*) heap_head#37 +Alias (word*) SQUARES#19 = (word*) SQUARES#37 Alias (word) init_dist_screen::yds#0 = (word~) init_dist_screen::$9 Alias (byte) init_dist_screen::x#2 = (byte) init_dist_screen::x#3 (byte) init_dist_screen::x#7 (byte) init_dist_screen::x#8 -Alias (word*) SQUARES#15 = (word*) SQUARES#38 (word*) SQUARES#30 (word*) SQUARES#24 (word*) SQUARES#31 (word*) SQUARES#32 (word*) SQUARES#6 +Alias (word*) SQUARES#15 = (word*) SQUARES#39 (word*) SQUARES#31 (word*) SQUARES#24 (word*) SQUARES#32 (word*) SQUARES#33 (word*) SQUARES#6 Alias (word) init_dist_screen::yds#3 = (word) init_dist_screen::yds#5 (word) init_dist_screen::yds#6 (word) init_dist_screen::yds#4 -Alias (byte) NUM_SQUARES#11 = (byte) NUM_SQUARES#31 (byte) NUM_SQUARES#20 (byte) NUM_SQUARES#16 (byte) NUM_SQUARES#26 (byte) NUM_SQUARES#27 (byte) NUM_SQUARES#4 +Alias (byte) NUM_SQUARES#11 = (byte) NUM_SQUARES#33 (byte) NUM_SQUARES#22 (byte) NUM_SQUARES#18 (byte) NUM_SQUARES#28 (byte) NUM_SQUARES#29 (byte) NUM_SQUARES#4 Alias (byte*) init_dist_screen::screen_topline#10 = (byte*) init_dist_screen::screen_topline#13 (byte*) init_dist_screen::screen_topline#4 (byte*) init_dist_screen::screen_topline#2 (byte*) init_dist_screen::screen_topline#9 Alias (byte*) init_dist_screen::screen_bottomline#10 = (byte*) init_dist_screen::screen_bottomline#13 (byte*) init_dist_screen::screen_bottomline#4 (byte*) init_dist_screen::screen_bottomline#2 (byte*) init_dist_screen::screen_bottomline#9 Alias (byte) init_dist_screen::xb#5 = (byte) init_dist_screen::xb#7 (byte) init_dist_screen::xb#8 (byte) init_dist_screen::xb#6 Alias (byte) init_dist_screen::y#12 = (byte) init_dist_screen::y#14 (byte) init_dist_screen::y#4 (byte) init_dist_screen::y#3 (byte) init_dist_screen::y#13 -Alias (byte*) heap_head#17 = (byte*) heap_head#47 (byte*) heap_head#28 (byte*) heap_head#24 (byte*) heap_head#45 (byte*) heap_head#46 (byte*) heap_head#8 +Alias (byte*) heap_head#17 = (byte*) heap_head#48 (byte*) heap_head#29 (byte*) heap_head#24 (byte*) heap_head#46 (byte*) heap_head#47 (byte*) heap_head#8 Alias (byte) init_dist_screen::x2#0 = (byte~) init_dist_screen::$11 (byte) init_dist_screen::x2#1 (byte) init_dist_screen::x2#2 Alias (byte~) init_dist_screen::$16 = (byte~) init_dist_screen::$15 Alias (byte~) init_dist_screen::$14 = (byte~) init_dist_screen::$13 Alias (byte) init_dist_screen::xd#0 = (byte~) init_dist_screen::$17 Alias (word) sqr::return#3 = (word) sqr::return#6 Alias (word) init_dist_screen::yds#1 = (word) init_dist_screen::yds#2 (word) init_dist_screen::yds#7 -Alias (word*) SQUARES#18 = (word*) SQUARES#20 (word*) SQUARES#37 -Alias (byte) NUM_SQUARES#13 = (byte) NUM_SQUARES#21 (byte) NUM_SQUARES#25 +Alias (word*) SQUARES#18 = (word*) SQUARES#20 (word*) SQUARES#38 +Alias (byte) NUM_SQUARES#15 = (byte) NUM_SQUARES#23 (byte) NUM_SQUARES#27 Alias (byte*) init_dist_screen::screen_topline#3 = (byte*) init_dist_screen::screen_topline#5 (byte*) init_dist_screen::screen_topline#7 Alias (byte) init_dist_screen::x#4 = (byte) init_dist_screen::x#5 (byte) init_dist_screen::x#6 Alias (byte*) init_dist_screen::screen_bottomline#3 = (byte*) init_dist_screen::screen_bottomline#5 (byte*) init_dist_screen::screen_bottomline#7 Alias (byte) init_dist_screen::xb#2 = (byte) init_dist_screen::xb#3 (byte) init_dist_screen::xb#4 Alias (byte) init_dist_screen::y#11 = (byte) init_dist_screen::y#8 (byte) init_dist_screen::y#6 -Alias (byte*) heap_head#33 = (byte*) heap_head#37 (byte*) heap_head#42 +Alias (byte*) heap_head#34 = (byte*) heap_head#38 (byte*) heap_head#43 Alias (word) init_dist_screen::xds#0 = (word~) init_dist_screen::$18 Alias (word) init_dist_screen::ds#0 = (word~) init_dist_screen::$19 Alias (byte) sqrt::return#2 = (byte) sqrt::return#4 Alias (byte) init_dist_screen::d#0 = (byte~) init_dist_screen::$20 -Alias (byte) NUM_SQUARES#0 = (byte) NUM_SQUARES#17 +Alias (byte) NUM_SQUARES#0 = (byte) NUM_SQUARES#19 Alias (word*) SQUARES#0 = (word*) SQUARES#25 Alias (byte) NUM_SQUARES#12 = (byte) NUM_SQUARES#5 Alias (byte*) heap_head#18 = (byte*) heap_head#9 Alias (word*) SQUARES#16 = (word*) SQUARES#7 Successful SSA optimization Pass2AliasElimination Alias (word) bsearch16u::key#1 = (word) bsearch16u::key#5 -Alias (word*) SQUARES#19 = (word*) SQUARES#28 +Alias (word*) SQUARES#19 = (word*) SQUARES#29 Alias (byte*) init_dist_screen::screen_topline#11 = (byte*) init_dist_screen::screen_topline#6 Alias (byte*) init_dist_screen::screen_bottomline#11 = (byte*) init_dist_screen::screen_bottomline#6 Alias (byte) init_dist_screen::y#10 = (byte) init_dist_screen::y#5 -Alias (byte) NUM_SQUARES#24 = (byte) NUM_SQUARES#34 -Alias (byte*) heap_head#32 = (byte*) heap_head#40 +Alias (byte) NUM_SQUARES#26 = (byte) NUM_SQUARES#36 +Alias (byte*) heap_head#33 = (byte*) heap_head#41 Alias (word*) SQUARES#15 = (word*) SQUARES#18 Alias (word) init_dist_screen::yds#1 = (word) init_dist_screen::yds#3 -Alias (byte) NUM_SQUARES#11 = (byte) NUM_SQUARES#13 +Alias (byte) NUM_SQUARES#11 = (byte) NUM_SQUARES#15 Alias (byte*) init_dist_screen::screen_topline#10 = (byte*) init_dist_screen::screen_topline#3 Alias (byte) init_dist_screen::x#2 = (byte) init_dist_screen::x#4 Alias (byte*) init_dist_screen::screen_bottomline#10 = (byte*) init_dist_screen::screen_bottomline#3 Alias (byte) init_dist_screen::xb#2 = (byte) init_dist_screen::xb#5 Alias (byte) init_dist_screen::y#11 = (byte) init_dist_screen::y#12 -Alias (byte*) heap_head#17 = (byte*) heap_head#33 +Alias (byte*) heap_head#17 = (byte*) heap_head#34 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte*) heap_head#10 (byte*) heap_head#19 Identical Phi Values (word) malloc::size#1 (word) malloc::size#0 @@ -1839,9 +1856,10 @@ Identical Phi Values (byte) bsearch16u::num#7 (byte) bsearch16u::num#2 Identical Phi Values (word*) bsearch16u::items#7 (word*) bsearch16u::items#1 Identical Phi Values (word) bsearch16u::key#4 (word) bsearch16u::key#0 Identical Phi Values (word) bsearch16u::key#1 (word) bsearch16u::key#4 -Identical Phi Values (byte) NUM_SQUARES#6 (byte) NUM_SQUARES#3 +Identical Phi Values (byte) NUM_SQUARES#14 (byte) NUM_SQUARES#3 Identical Phi Values (byte*) heap_head#19 (byte*) heap_head#23 Identical Phi Values (byte*) heap_head#12 (byte*) heap_head#1 +Identical Phi Values (byte) NUM_SQUARES#13 (byte) NUM_SQUARES#14 Identical Phi Values (byte*) heap_head#13 (byte*) heap_head#12 Identical Phi Values (word*) SQUARES#17 (word*) SQUARES#1 Identical Phi Values (word) sqrt::val#1 (word) sqrt::val#0 @@ -1855,7 +1873,7 @@ Identical Phi Values (byte) init_font_hex::c1#2 (byte) init_font_hex::c1#4 Identical Phi Values (byte) init_font_hex::c#2 (byte) init_font_hex::c#5 Identical Phi Values (dword) print_dword_at::dw#1 (dword) print_dword_at::dw#0 Identical Phi Values (byte*) print_dword_at::at#1 (byte*) print_dword_at::at#0 -Identical Phi Values (byte) NUM_SQUARES#14 (byte) NUM_SQUARES#0 +Identical Phi Values (byte) NUM_SQUARES#16 (byte) NUM_SQUARES#0 Identical Phi Values (byte*) heap_head#21 (byte*) heap_head#0 Identical Phi Values (word*) SQUARES#21 (word*) SQUARES#0 Identical Phi Values (byte) NUM_SQUARES#1 (byte) NUM_SQUARES#11 @@ -1869,8 +1887,8 @@ Identical Phi Values (word*) SQUARES#14 (word*) SQUARES#17 Identical Phi Values (byte*) init_dist_screen::screen_topline#10 (byte*) init_dist_screen::screen_topline#11 Identical Phi Values (byte*) init_dist_screen::screen_bottomline#10 (byte*) init_dist_screen::screen_bottomline#11 Identical Phi Values (byte) init_dist_screen::y#11 (byte) init_dist_screen::y#10 -Identical Phi Values (byte) NUM_SQUARES#11 (byte) NUM_SQUARES#24 -Identical Phi Values (byte*) heap_head#17 (byte*) heap_head#32 +Identical Phi Values (byte) NUM_SQUARES#11 (byte) NUM_SQUARES#26 +Identical Phi Values (byte*) heap_head#17 (byte*) heap_head#33 Identical Phi Values (word*) SQUARES#15 (word*) SQUARES#19 Identical Phi Values (word) init_dist_screen::yds#1 (word) init_dist_screen::yds#0 Identical Phi Values (byte) NUM_SQUARES#12 (byte) NUM_SQUARES#1 @@ -1881,14 +1899,14 @@ Identical Phi Values (word*) SQUARES#9 (word*) SQUARES#19 Identical Phi Values (byte*) init_font_hex::proto_hi#4 (byte*) init_font_hex::proto_hi#6 Identical Phi Values (byte) init_font_hex::c#5 (byte) init_font_hex::c#6 Identical Phi Values (word*) SQUARES#19 (word*) SQUARES#1 -Identical Phi Values (byte) NUM_SQUARES#24 (byte) NUM_SQUARES#3 -Identical Phi Values (byte*) heap_head#32 (byte*) heap_head#1 +Identical Phi Values (byte) NUM_SQUARES#26 (byte) NUM_SQUARES#3 +Identical Phi Values (byte*) heap_head#33 (byte*) heap_head#1 Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) bsearch16u::$5 [13] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@7 Simple Condition (bool~) bsearch16u::$12 [25] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@9 Simple Condition (bool~) bsearch16u::$0 [28] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@1 Simple Condition (bool~) bsearch16u::$14 [32] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 -Simple Condition (bool~) init_squares::$5 [77] if((byte) init_squares::i#1!=rangelast(0,init_squares::$2)) goto init_squares::@1 +Simple Condition (bool~) init_squares::$2 [70] if((byte) init_squares::i#2<(byte) NUM_SQUARES#3) goto init_squares::@2 Simple Condition (bool~) init_font_hex::$3 [124] if((byte) init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 Simple Condition (bool~) init_font_hex::$4 [134] if((byte) init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 Simple Condition (bool~) init_font_hex::$5 [139] if((byte) init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 @@ -1952,7 +1970,7 @@ Successful SSA optimization PassNSimplifyExpressionWithZero Simplifying expression containing zero CIA_TIMER_CONTROL_START in [150] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (byte*) heap_head#1 and assignment [1] (byte*) heap_head#1 ← (byte*) malloc::mem#0 -Eliminating unused variable (byte) init_font_hex::idx#4 and assignment [67] (byte) init_font_hex::idx#4 ← ++ (byte) init_font_hex::idx#3 +Eliminating unused variable (byte) init_font_hex::idx#4 and assignment [66] (byte) init_font_hex::idx#4 ← ++ (byte) init_font_hex::idx#3 Eliminating unused constant (const byte) CIA_TIMER_CONTROL_STOP Eliminating unused constant (const byte) CIA_TIMER_CONTROL_CONTINUOUS Eliminating unused constant (const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES @@ -1980,17 +1998,15 @@ Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) $d Successful SSA optimization PassNFinalizeNumberTypeConversions Constant right-side identified [22] (word) malloc::size#0 ← (const byte) NUM_SQUARES#3 * (const byte) SIZEOF_WORD -Constant right-side identified [28] (byte~) init_squares::$2 ← (const byte) NUM_SQUARES#3 - (byte) 1 -Constant right-side identified [54] (byte) init_font_hex::idx#1 ← ++ (const byte) init_font_hex::idx#0 -Constant right-side identified [93] (byte*) print_word_at::at#1 ← (const byte*) print_dword_at::at#0 + (byte) 4 -Constant right-side identified [110] (word~) main::toD0181_$1 ← (const word) main::toD0181_$0 & (word) $3fff -Constant right-side identified [113] (byte~) main::toD0181_$5 ← > (const word) main::toD0181_$4 -Constant right-side identified [126] (word~) main::toD0182_$1 ← (const word) main::toD0182_$0 & (word) $3fff -Constant right-side identified [129] (byte~) main::toD0182_$5 ← > (const word) main::toD0182_$4 -Constant right-side identified [136] (byte*) init_dist_screen::screen_bottomline#0 ← (const byte*) init_dist_screen::screen#0 + (word)(number) $28*(number) $18 +Constant right-side identified [53] (byte) init_font_hex::idx#1 ← ++ (const byte) init_font_hex::idx#0 +Constant right-side identified [92] (byte*) print_word_at::at#1 ← (const byte*) print_dword_at::at#0 + (byte) 4 +Constant right-side identified [109] (word~) main::toD0181_$1 ← (const word) main::toD0181_$0 & (word) $3fff +Constant right-side identified [112] (byte~) main::toD0181_$5 ← > (const word) main::toD0181_$4 +Constant right-side identified [125] (word~) main::toD0182_$1 ← (const word) main::toD0182_$0 & (word) $3fff +Constant right-side identified [128] (byte~) main::toD0182_$5 ← > (const word) main::toD0182_$4 +Constant right-side identified [135] (byte*) init_dist_screen::screen_bottomline#0 ← (const byte*) init_dist_screen::screen#0 + (word)(number) $28*(number) $18 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) malloc::size#0 = NUM_SQUARES#3*SIZEOF_WORD -Constant (const byte) init_squares::$2 = NUM_SQUARES#3-1 Constant (const byte) init_font_hex::idx#1 = ++init_font_hex::idx#0 Constant (const byte*) print_word_at::at#1 = print_dword_at::at#0+4 Constant (const word) main::toD0181_$1 = main::toD0181_$0&$3fff @@ -1999,16 +2015,6 @@ Constant (const word) main::toD0182_$1 = main::toD0182_$0&$3fff Constant (const byte) main::toD0182_$5 = >main::toD0182_$4 Constant (const byte*) init_dist_screen::screen_bottomline#0 = init_dist_screen::screen#0+(word)$28*$18 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [35] init_squares::i#1 ← ++ init_squares::i#2 to ++ -Resolved ranged comparison value [36] if(init_squares::i#1!=rangelast(0,init_squares::$2)) goto init_squares::@1 to (const byte) init_squares::$2+(number) 1 -Adding number conversion cast (unumber) init_squares::$2+1 in if((byte) init_squares::i#1!=(const byte) init_squares::$2+(number) 1) goto init_squares::@1 -Adding number conversion cast (unumber) 1 in if((byte) init_squares::i#1!=(unumber)(const byte) init_squares::$2+(number) 1) goto init_squares::@1 -Successful SSA optimization PassNAddNumberTypeConversions -Simplifying constant integer cast (const byte) init_squares::$2+(unumber)(number) 1 -Simplifying constant integer cast 1 -Successful SSA optimization PassNCastSimplification -Finalized unsigned number type (byte) 1 -Successful SSA optimization PassNFinalizeNumberTypeConversions Constant right-side identified [0] (byte*) malloc::mem#0 ← (const byte*) heap_head#0 - (const word) malloc::size#0 Constant right-side identified [106] (word~) main::toD0181_$2 ← (const word) main::toD0181_$1 * (byte) 4 Constant right-side identified [108] (byte~) main::toD0181_$6 ← (const byte) main::toD0181_$5 / (byte) 4 @@ -2052,7 +2058,7 @@ Inlining Noop Cast [6] (signed word~) bsearch16u::$8 ← (signed word)(word) bse Inlining Noop Cast [7] (signed word~) bsearch16u::$9 ← (signed word)*((word*) bsearch16u::pivot#0) keeping *(bsearch16u::pivot#0) Successful SSA optimization Pass2NopCastInlining Rewriting multiplication to use shift [4] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 * (const byte) SIZEOF_WORD -Rewriting multiplication to use shift [24] (byte~) init_squares::$3 ← (byte) init_squares::i#2 * (byte) 2 +Rewriting multiplication to use shift [25] (byte~) init_squares::$3 ← (byte) init_squares::i#2 * (byte) 2 Rewriting multiplication to use shift [31] (byte~) sqr::$0 ← (byte) sqr::val#2 * (const byte) SIZEOF_WORD Rewriting division to use shift [39] (word~) sqrt::$1 ← (word~) sqrt::$3 / (const byte) SIZEOF_WORD Rewriting multiplication to use shift [112] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 * (byte) 2 @@ -2123,13 +2129,11 @@ Constant inlined init_font_hex::c#0 = (byte) 0 Constant inlined init_squares::$1 = (const void*) malloc::return#0 Constant inlined print_word_at::at#1 = (const byte*) main::BASE_SCREEN+(byte) 4 Constant inlined print_word_at::at#0 = (const byte*) main::BASE_SCREEN -Constant inlined init_squares::$2 = (const byte) NUM_SQUARES#3-(byte) 1 Constant inlined bsearch16u::items#1 = (const word*) SQUARES#1 Successful SSA optimization Pass2ConstantInlining Simplifying constant integer increment ++0 Successful SSA optimization Pass2ConstantSimplification Added new block during phi lifting bsearch16u::@18(between bsearch16u::@9 and bsearch16u::@10) -Added new block during phi lifting init_squares::@4(between init_squares::@1 and init_squares::@1) Added new block during phi lifting init_font_hex::@7(between init_font_hex::@5 and init_font_hex::@1) Added new block during phi lifting init_font_hex::@8(between init_font_hex::@4 and init_font_hex::@2) Added new block during phi lifting init_font_hex::@9(between init_font_hex::@3 and init_font_hex::@3) @@ -2156,7 +2160,7 @@ Adding NOP phi() at start of init_dist_screen Adding NOP phi() at start of init_dist_screen::@19 Adding NOP phi() at start of bsearch16u Adding NOP phi() at start of init_squares -Adding NOP phi() at start of init_squares::@3 +Adding NOP phi() at start of init_squares::@7 Adding NOP phi() at start of malloc Adding NOP phi() at start of init_font_hex CALL GRAPH @@ -2201,9 +2205,9 @@ Coalesced [152] bsearch16u::num#9 ← bsearch16u::num#0 Coalesced [153] bsearch16u::items#10 ← bsearch16u::items#8 Coalesced [154] bsearch16u::num#11 ← bsearch16u::num#3 Coalesced (already) [155] bsearch16u::items#12 ← bsearch16u::items#2 -Coalesced [172] init_squares::sqr#3 ← init_squares::sqr#1 -Coalesced [173] init_squares::squares#3 ← init_squares::squares#1 -Coalesced [174] init_squares::i#3 ← init_squares::i#1 +Coalesced [172] init_squares::i#4 ← init_squares::i#1 +Coalesced [173] init_squares::sqr#4 ← init_squares::sqr#1 +Coalesced [174] init_squares::squares#4 ← init_squares::squares#1 Coalesced [185] init_font_hex::charset#9 ← init_font_hex::charset#5 Coalesced [207] init_font_hex::charset#8 ← init_font_hex::charset#0 Coalesced [208] init_font_hex::proto_hi#7 ← init_font_hex::proto_hi#1 @@ -2228,8 +2232,7 @@ Culled Empty Block (label) init_dist_screen::@19 Culled Empty Block (label) init_dist_screen::@23 Culled Empty Block (label) bsearch16u::@1 Culled Empty Block (label) bsearch16u::@18 -Culled Empty Block (label) init_squares::@3 -Culled Empty Block (label) init_squares::@4 +Culled Empty Block (label) init_squares::@7 Culled Empty Block (label) init_font_hex::@7 Culled Empty Block (label) init_font_hex::@8 Culled Empty Block (label) init_font_hex::@9 @@ -2529,21 +2532,23 @@ init_squares: scope:[init_squares] from init_dist_screen [119] phi() [120] call malloc to:init_squares::@1 -init_squares::@1: scope:[init_squares] from init_squares init_squares::@1 - [121] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares/(byte) 0 ) - [121] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares/(const word*) SQUARES#1 ) - [121] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares/(word) 0 ) - [122] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 - [123] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD - [124] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 - [125] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 - [126] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 - [127] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 - [128] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 +init_squares::@1: scope:[init_squares] from init_squares init_squares::@2 + [121] (word*) init_squares::squares#2 ← phi( init_squares::@2/(word*) init_squares::squares#1 init_squares/(const word*) SQUARES#1 ) + [121] (word) init_squares::sqr#2 ← phi( init_squares::@2/(word) init_squares::sqr#1 init_squares/(word) 0 ) + [121] (byte) init_squares::i#2 ← phi( init_squares::@2/(byte) init_squares::i#1 init_squares/(byte) 0 ) + [122] if((byte) init_squares::i#2<(const byte) NUM_SQUARES#3) goto init_squares::@2 to:init_squares::@return init_squares::@return: scope:[init_squares] from init_squares::@1 - [129] return + [123] return to:@return +init_squares::@2: scope:[init_squares] from init_squares::@1 + [124] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 + [125] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD + [126] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 + [127] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 + [128] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 + [129] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 + to:init_squares::@1 (void*()) malloc((word) malloc::size) malloc: scope:[malloc] from init_squares @@ -2711,14 +2716,14 @@ VARIABLE REGISTER WEIGHTS (byte~) init_squares::$3 22.0 (byte~) init_squares::$4 22.0 (byte) init_squares::i -(byte) init_squares::i#1 16.5 -(byte) init_squares::i#2 5.5 +(byte) init_squares::i#1 22.0 +(byte) init_squares::i#2 6.285714285714286 (word) init_squares::sqr -(word) init_squares::sqr#1 7.333333333333333 -(word) init_squares::sqr#2 6.6000000000000005 +(word) init_squares::sqr#1 11.0 +(word) init_squares::sqr#2 5.5 (word*) init_squares::squares -(word*) init_squares::squares#1 3.6666666666666665 -(word*) init_squares::squares#2 16.5 +(word*) init_squares::squares#1 4.4 +(word*) init_squares::squares#2 11.0 (void()) main() (dword~) main::$4 4.0 (dword) main::cyclecount @@ -2803,9 +2808,9 @@ Initial phi equivalence classes [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] [ sqr::val#2 sqr::val#1 sqr::val#0 ] +[ init_squares::i#2 init_squares::i#1 ] [ init_squares::sqr#2 init_squares::sqr#1 ] [ init_squares::squares#2 init_squares::squares#1 ] -[ init_squares::i#2 init_squares::i#1 ] [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] [ init_font_hex::c#6 init_font_hex::c#1 ] [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] @@ -2865,9 +2870,9 @@ Complete equivalence classes [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] [ sqr::val#2 sqr::val#1 sqr::val#0 ] +[ init_squares::i#2 init_squares::i#1 ] [ init_squares::sqr#2 init_squares::sqr#1 ] [ init_squares::squares#2 init_squares::squares#1 ] -[ init_squares::i#2 init_squares::i#1 ] [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] [ init_font_hex::c#6 init_font_hex::c#1 ] [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] @@ -2926,9 +2931,9 @@ Allocated zp[1]:22 [ init_dist_screen::xd#0 init_dist_screen::$16 init_dist_scre Allocated zp[2]:23 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] Allocated zp[1]:25 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] Allocated zp[1]:26 [ sqr::val#2 sqr::val#1 sqr::val#0 ] -Allocated zp[2]:27 [ init_squares::sqr#2 init_squares::sqr#1 ] -Allocated zp[2]:29 [ init_squares::squares#2 init_squares::squares#1 ] -Allocated zp[1]:31 [ init_squares::i#2 init_squares::i#1 ] +Allocated zp[1]:27 [ init_squares::i#2 init_squares::i#1 ] +Allocated zp[2]:28 [ init_squares::sqr#2 init_squares::sqr#1 ] +Allocated zp[2]:30 [ init_squares::squares#2 init_squares::squares#1 ] Allocated zp[2]:32 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] Allocated zp[1]:34 [ init_font_hex::c#6 init_font_hex::c#1 ] Allocated zp[2]:35 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] @@ -3811,45 +3816,50 @@ sqr: { init_squares: { .label __3 = $64 .label __4 = $65 - .label squares = $1d - .label sqr = $1b - .label i = $1f + .label squares = $1e + .label sqr = $1c + .label i = $1b // [120] call malloc // [130] phi from init_squares to malloc [phi:init_squares->malloc] malloc_from_init_squares: jsr malloc // [121] phi from init_squares to init_squares::@1 [phi:init_squares->init_squares::@1] __b1_from_init_squares: - // [121] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares->init_squares::@1#0] -- vbuz1=vbuc1 - lda #0 - sta.z i - // [121] phi (word*) init_squares::squares#2 = (const word*) SQUARES#1 [phi:init_squares->init_squares::@1#1] -- pwuz1=pwuc1 + // [121] phi (word*) init_squares::squares#2 = (const word*) SQUARES#1 [phi:init_squares->init_squares::@1#0] -- pwuz1=pwuc1 lda #SQUARES sta.z squares+1 - // [121] phi (word) init_squares::sqr#2 = (word) 0 [phi:init_squares->init_squares::@1#2] -- vwuz1=vwuc1 + // [121] phi (word) init_squares::sqr#2 = (word) 0 [phi:init_squares->init_squares::@1#1] -- vwuz1=vwuc1 lda #<0 sta.z sqr lda #>0 sta.z sqr+1 - jmp __b1 - // [121] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] - __b1_from___b1: - // [121] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy - // [121] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy - // [121] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy + // [121] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares->init_squares::@1#2] -- vbuz1=vbuc1 + lda #0 + sta.z i jmp __b1 // init_squares::@1 __b1: - // [122] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 + // [122] if((byte) init_squares::i#2<(const byte) NUM_SQUARES#3) goto init_squares::@2 -- vbuz1_lt_vbuc1_then_la1 + lda.z i + cmp #NUM_SQUARES + bcc __b2 + jmp __breturn + // init_squares::@return + __breturn: + // [123] return + rts + // init_squares::@2 + __b2: + // [124] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 ldy #0 lda.z sqr sta (squares),y iny lda.z sqr+1 sta (squares),y - // [123] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + // [125] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 lda #SIZEOF_WORD clc adc.z squares @@ -3857,15 +3867,15 @@ init_squares: { bcc !+ inc.z squares+1 !: - // [124] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + // [126] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda.z i asl sta.z __3 - // [125] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuz1=vbuz2_plus_1 + // [127] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuz1=vbuz2_plus_1 ldy.z __3 iny sty.z __4 - // [126] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuz2 + // [128] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuz2 lda.z __4 clc adc.z sqr @@ -3873,17 +3883,14 @@ init_squares: { bcc !+ inc.z sqr+1 !: - // [127] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuz1=_inc_vbuz1 + // [129] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuz1=_inc_vbuz1 inc.z i - // [128] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuz1_neq_vbuc1_then_la1 - lda #NUM_SQUARES-1+1 - cmp.z i - bne __b1_from___b1 - jmp __breturn - // init_squares::@return - __breturn: - // [129] return - rts + // [121] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] + __b1_from___b2: + // [121] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@2->init_squares::@1#0] -- register_copy + // [121] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@2->init_squares::@1#1] -- register_copy + // [121] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@2->init_squares::@1#2] -- register_copy + jmp __b1 } // malloc // Allocates a block of size bytes of memory, returning a pointer to the beginning of the block. @@ -4164,12 +4171,12 @@ Statement [110] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bse Statement [111] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ( main:2::init_dist_screen:10::sqrt:77::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#11 init_dist_screen::screen_bottomline#11 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ) always clobbers reg byte a Statement [116] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ sqr::$0 ] ( main:2::init_dist_screen:10::sqr:57 [ init_dist_screen::y#10 init_dist_screen::screen_topline#11 init_dist_screen::screen_bottomline#11 sqr::$0 ] main:2::init_dist_screen:10::sqr:72 [ init_dist_screen::y#10 init_dist_screen::screen_topline#11 init_dist_screen::screen_bottomline#11 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::$0 ] ) always clobbers reg byte a Statement [117] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 ] ( main:2::init_dist_screen:10::sqr:57 [ init_dist_screen::y#10 init_dist_screen::screen_topline#11 init_dist_screen::screen_bottomline#11 sqr::return#0 ] main:2::init_dist_screen:10::sqr:72 [ init_dist_screen::y#10 init_dist_screen::screen_topline#11 init_dist_screen::screen_bottomline#11 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 ] ) always clobbers reg byte a -Statement [122] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte a as potential for zp[1]:31 [ init_squares::i#2 init_squares::i#1 ] -Removing always clobbered register reg byte y as potential for zp[1]:31 [ init_squares::i#2 init_squares::i#1 ] -Statement [123] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [124] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a -Statement [126] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [124] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ init_squares::i#2 init_squares::sqr#2 init_squares::squares#2 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::i#2 init_squares::sqr#2 init_squares::squares#2 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte a as potential for zp[1]:27 [ init_squares::i#2 init_squares::i#1 ] +Removing always clobbered register reg byte y as potential for zp[1]:27 [ init_squares::i#2 init_squares::i#1 ] +Statement [125] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [126] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 init_squares::$3 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a +Statement [128] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a Statement [132] *((const byte*) CIA2_TIMER_A_CONTROL) ← (byte) 0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a Statement [133] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a Statement [134] *((const dword*) CIA2_TIMER_AB) ← (dword) $ffffffff [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a @@ -4243,10 +4250,10 @@ Statement [110] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bse Statement [111] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ( main:2::init_dist_screen:10::sqrt:77::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#11 init_dist_screen::screen_bottomline#11 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ) always clobbers reg byte a Statement [116] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ sqr::$0 ] ( main:2::init_dist_screen:10::sqr:57 [ init_dist_screen::y#10 init_dist_screen::screen_topline#11 init_dist_screen::screen_bottomline#11 sqr::$0 ] main:2::init_dist_screen:10::sqr:72 [ init_dist_screen::y#10 init_dist_screen::screen_topline#11 init_dist_screen::screen_bottomline#11 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::$0 ] ) always clobbers reg byte a Statement [117] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 ] ( main:2::init_dist_screen:10::sqr:57 [ init_dist_screen::y#10 init_dist_screen::screen_topline#11 init_dist_screen::screen_bottomline#11 sqr::return#0 ] main:2::init_dist_screen:10::sqr:72 [ init_dist_screen::y#10 init_dist_screen::screen_topline#11 init_dist_screen::screen_bottomline#11 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 ] ) always clobbers reg byte a -Statement [122] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y -Statement [123] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [124] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a -Statement [126] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [124] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ init_squares::i#2 init_squares::sqr#2 init_squares::squares#2 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::i#2 init_squares::sqr#2 init_squares::squares#2 ] ) always clobbers reg byte a reg byte y +Statement [125] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [126] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 init_squares::$3 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a +Statement [128] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a Statement [132] *((const byte*) CIA2_TIMER_A_CONTROL) ← (byte) 0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a Statement [133] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a Statement [134] *((const dword*) CIA2_TIMER_AB) ← (dword) $ffffffff [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a @@ -4312,10 +4319,10 @@ Statement [110] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bse Statement [111] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ( main:2::init_dist_screen:10::sqrt:77::bsearch16u:89 [ init_dist_screen::y#10 init_dist_screen::screen_topline#11 init_dist_screen::screen_bottomline#11 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ) always clobbers reg byte a Statement [116] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ sqr::$0 ] ( main:2::init_dist_screen:10::sqr:57 [ init_dist_screen::y#10 init_dist_screen::screen_topline#11 init_dist_screen::screen_bottomline#11 sqr::$0 ] main:2::init_dist_screen:10::sqr:72 [ init_dist_screen::y#10 init_dist_screen::screen_topline#11 init_dist_screen::screen_bottomline#11 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::$0 ] ) always clobbers reg byte a Statement [117] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 ] ( main:2::init_dist_screen:10::sqr:57 [ init_dist_screen::y#10 init_dist_screen::screen_topline#11 init_dist_screen::screen_bottomline#11 sqr::return#0 ] main:2::init_dist_screen:10::sqr:72 [ init_dist_screen::y#10 init_dist_screen::screen_topline#11 init_dist_screen::screen_bottomline#11 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 ] ) always clobbers reg byte a -Statement [122] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y -Statement [123] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [124] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a -Statement [126] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [124] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ init_squares::i#2 init_squares::sqr#2 init_squares::squares#2 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::i#2 init_squares::sqr#2 init_squares::squares#2 ] ) always clobbers reg byte a reg byte y +Statement [125] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [126] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 init_squares::$3 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a +Statement [128] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:2::init_dist_screen:10::init_squares:50 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a Statement [132] *((const byte*) CIA2_TIMER_A_CONTROL) ← (byte) 0 [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a Statement [133] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a Statement [134] *((const dword*) CIA2_TIMER_AB) ← (dword) $ffffffff [ ] ( main:2::clock_start:8 [ ] ) always clobbers reg byte a @@ -4345,9 +4352,9 @@ Potential registers zp[1]:22 [ init_dist_screen::xd#0 init_dist_screen::$16 init Potential registers zp[2]:23 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] : zp[2]:23 , Potential registers zp[1]:25 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] : zp[1]:25 , reg byte x , Potential registers zp[1]:26 [ sqr::val#2 sqr::val#1 sqr::val#0 ] : zp[1]:26 , reg byte a , reg byte x , reg byte y , -Potential registers zp[2]:27 [ init_squares::sqr#2 init_squares::sqr#1 ] : zp[2]:27 , -Potential registers zp[2]:29 [ init_squares::squares#2 init_squares::squares#1 ] : zp[2]:29 , -Potential registers zp[1]:31 [ init_squares::i#2 init_squares::i#1 ] : zp[1]:31 , reg byte x , +Potential registers zp[1]:27 [ init_squares::i#2 init_squares::i#1 ] : zp[1]:27 , reg byte x , +Potential registers zp[2]:28 [ init_squares::sqr#2 init_squares::sqr#1 ] : zp[2]:28 , +Potential registers zp[2]:30 [ init_squares::squares#2 init_squares::squares#1 ] : zp[2]:30 , Potential registers zp[2]:32 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] : zp[2]:32 , Potential registers zp[1]:34 [ init_font_hex::c#6 init_font_hex::c#1 ] : zp[1]:34 , reg byte x , Potential registers zp[2]:35 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] : zp[2]:35 , @@ -4397,7 +4404,7 @@ Uplift Scope [init_font_hex] 2,168.83: zp[1]:40 [ init_font_hex::i#2 init_font_h Uplift Scope [init_dist_screen] 707: zp[1]:22 [ init_dist_screen::xd#0 init_dist_screen::$16 init_dist_screen::$14 ] 221.24: zp[1]:21 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] 202: zp[1]:69 [ init_dist_screen::x2#0 ] 202: zp[2]:72 [ init_dist_screen::xds#0 ] 202: zp[2]:74 [ init_dist_screen::ds#0 ] 131.3: zp[1]:20 [ init_dist_screen::x#2 init_dist_screen::x#1 ] 126.25: zp[1]:79 [ init_dist_screen::d#0 ] 77: zp[1]:19 [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ] 22: zp[1]:64 [ init_dist_screen::y2#0 ] 17.47: zp[1]:14 [ init_dist_screen::y#10 init_dist_screen::y#1 ] 14.12: zp[2]:17 [ init_dist_screen::screen_bottomline#11 init_dist_screen::screen_bottomline#1 ] 12.5: zp[2]:15 [ init_dist_screen::screen_topline#11 init_dist_screen::screen_topline#1 ] 4.87: zp[2]:67 [ init_dist_screen::yds#0 ] Uplift Scope [sqr] 338: zp[1]:26 [ sqr::val#2 sqr::val#1 sqr::val#0 ] 202: zp[2]:70 [ sqr::return#3 ] 28.5: zp[2]:98 [ sqr::return#0 ] 22: zp[2]:65 [ sqr::return#2 ] 4: zp[1]:97 [ sqr::$0 ] Uplift Scope [sqrt] 202: zp[1]:78 [ sqrt::return#2 ] 103: zp[2]:76 [ sqrt::val#0 ] 34.33: zp[1]:90 [ sqrt::return#0 ] 4: zp[2]:84 [ sqrt::found#0 ] 4: zp[2]:86 [ sqrt::$3 ] 2: zp[2]:88 [ sqrt::$1 ] -Uplift Scope [init_squares] 22: zp[1]:31 [ init_squares::i#2 init_squares::i#1 ] 22: zp[1]:100 [ init_squares::$3 ] 22: zp[1]:101 [ init_squares::$4 ] 20.17: zp[2]:29 [ init_squares::squares#2 init_squares::squares#1 ] 13.93: zp[2]:27 [ init_squares::sqr#2 init_squares::sqr#1 ] +Uplift Scope [init_squares] 28.29: zp[1]:27 [ init_squares::i#2 init_squares::i#1 ] 22: zp[1]:100 [ init_squares::$3 ] 22: zp[1]:101 [ init_squares::$4 ] 16.5: zp[2]:28 [ init_squares::sqr#2 init_squares::sqr#1 ] 15.4: zp[2]:30 [ init_squares::squares#2 init_squares::squares#1 ] Uplift Scope [print_char_at] 12: zp[1]:11 [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] 12: zp[2]:12 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] Uplift Scope [print_byte_at] 9.33: zp[2]:9 [ print_byte_at::at#2 print_byte_at::at#0 print_byte_at::at#1 ] 5.6: zp[1]:6 [ print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] 4: zp[1]:58 [ print_byte_at::$0 ] 2: zp[1]:59 [ print_byte_at::$2 ] Uplift Scope [print_word_at] 10: zp[2]:2 [ print_word_at::w#2 print_word_at::w#0 print_word_at::w#1 ] 0.8: zp[2]:4 [ print_word_at::at#2 ] @@ -4416,7 +4423,7 @@ Uplifting [init_dist_screen] best 241051 combination reg byte a [ init_dist_scre Limited combination testing to 100 combinations of 6144 possible. Uplifting [sqr] best 240714 combination reg byte a [ sqr::val#2 sqr::val#1 sqr::val#0 ] zp[2]:70 [ sqr::return#3 ] zp[2]:98 [ sqr::return#0 ] zp[2]:65 [ sqr::return#2 ] reg byte a [ sqr::$0 ] Uplifting [sqrt] best 239811 combination reg byte a [ sqrt::return#2 ] zp[2]:76 [ sqrt::val#0 ] reg byte a [ sqrt::return#0 ] zp[2]:84 [ sqrt::found#0 ] zp[2]:86 [ sqrt::$3 ] zp[2]:88 [ sqrt::$1 ] -Uplifting [init_squares] best 239611 combination reg byte x [ init_squares::i#2 init_squares::i#1 ] reg byte a [ init_squares::$3 ] reg byte a [ init_squares::$4 ] zp[2]:29 [ init_squares::squares#2 init_squares::squares#1 ] zp[2]:27 [ init_squares::sqr#2 init_squares::sqr#1 ] +Uplifting [init_squares] best 239611 combination reg byte x [ init_squares::i#2 init_squares::i#1 ] reg byte a [ init_squares::$3 ] reg byte a [ init_squares::$4 ] zp[2]:28 [ init_squares::sqr#2 init_squares::sqr#1 ] zp[2]:30 [ init_squares::squares#2 init_squares::squares#1 ] Uplifting [print_char_at] best 239604 combination reg byte x [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] zp[2]:12 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] Uplifting [print_byte_at] best 239596 combination zp[2]:9 [ print_byte_at::at#2 print_byte_at::at#0 print_byte_at::at#1 ] zp[1]:6 [ print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ] reg byte a [ print_byte_at::$0 ] reg byte y [ print_byte_at::$2 ] Uplifting [print_word_at] best 239596 combination zp[2]:2 [ print_word_at::w#2 print_word_at::w#0 print_word_at::w#1 ] zp[2]:4 [ print_word_at::at#2 ] @@ -4468,9 +4475,9 @@ Coalescing zero page register [ zp[1]:14 [ init_dist_screen::y#10 init_dist_scre Coalescing zero page register [ zp[2]:15 [ init_dist_screen::screen_topline#11 init_dist_screen::screen_topline#1 ] ] with [ zp[2]:2 [ print_word_at::w#2 print_word_at::w#0 print_word_at::w#1 ] ] Coalescing zero page register [ zp[2]:17 [ init_dist_screen::screen_bottomline#11 init_dist_screen::screen_bottomline#1 ] ] with [ zp[2]:4 [ print_word_at::at#2 print_byte_at::at#2 print_byte_at::at#0 print_byte_at::at#1 ] ] Coalescing zero page register [ zp[2]:23 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 ] ] with [ zp[2]:12 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] ] -Coalescing zero page register [ zp[2]:32 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] ] with [ zp[2]:27 [ init_squares::sqr#2 init_squares::sqr#1 ] ] +Coalescing zero page register [ zp[2]:32 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] ] with [ zp[2]:28 [ init_squares::sqr#2 init_squares::sqr#1 ] ] Coalescing zero page register [ zp[1]:34 [ init_font_hex::c#6 init_font_hex::c#1 ] ] with [ zp[1]:20 [ init_dist_screen::x#2 init_dist_screen::x#1 ] ] -Coalescing zero page register [ zp[2]:35 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] ] with [ zp[2]:29 [ init_squares::squares#2 init_squares::squares#1 ] ] +Coalescing zero page register [ zp[2]:35 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] ] with [ zp[2]:30 [ init_squares::squares#2 init_squares::squares#1 ] ] Coalescing zero page register [ zp[1]:39 [ init_font_hex::c1#4 init_font_hex::c1#1 ] ] with [ zp[1]:21 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] ] Coalescing zero page register [ zp[2]:65 [ sqr::return#2 init_dist_screen::yds#0 ] ] with [ zp[2]:37 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] ] Coalescing zero page register [ zp[2]:32 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 init_squares::sqr#2 init_squares::sqr#1 ] ] with [ zp[2]:15 [ init_dist_screen::screen_topline#11 init_dist_screen::screen_topline#1 print_word_at::w#2 print_word_at::w#0 print_word_at::w#1 ] ] @@ -5221,35 +5228,39 @@ init_squares: { jsr malloc // [121] phi from init_squares to init_squares::@1 [phi:init_squares->init_squares::@1] __b1_from_init_squares: - // [121] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares->init_squares::@1#0] -- vbuxx=vbuc1 - ldx #0 - // [121] phi (word*) init_squares::squares#2 = (const word*) SQUARES#1 [phi:init_squares->init_squares::@1#1] -- pwuz1=pwuc1 + // [121] phi (word*) init_squares::squares#2 = (const word*) SQUARES#1 [phi:init_squares->init_squares::@1#0] -- pwuz1=pwuc1 lda #SQUARES sta.z squares+1 - // [121] phi (word) init_squares::sqr#2 = (word) 0 [phi:init_squares->init_squares::@1#2] -- vwuz1=vwuc1 + // [121] phi (word) init_squares::sqr#2 = (word) 0 [phi:init_squares->init_squares::@1#1] -- vwuz1=vwuc1 lda #<0 sta.z sqr lda #>0 sta.z sqr+1 - jmp __b1 - // [121] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] - __b1_from___b1: - // [121] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy - // [121] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy - // [121] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy + // [121] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares->init_squares::@1#2] -- vbuxx=vbuc1 + ldx #0 jmp __b1 // init_squares::@1 __b1: - // [122] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 + // [122] if((byte) init_squares::i#2<(const byte) NUM_SQUARES#3) goto init_squares::@2 -- vbuxx_lt_vbuc1_then_la1 + cpx #NUM_SQUARES + bcc __b2 + jmp __breturn + // init_squares::@return + __breturn: + // [123] return + rts + // init_squares::@2 + __b2: + // [124] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 ldy #0 lda.z sqr sta (squares),y iny lda.z sqr+1 sta (squares),y - // [123] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + // [125] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 lda #SIZEOF_WORD clc adc.z squares @@ -5257,29 +5268,27 @@ init_squares: { bcc !+ inc.z squares+1 !: - // [124] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + // [126] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 txa asl - // [125] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuaa=vbuaa_plus_1 + // [127] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuaa=vbuaa_plus_1 clc adc #1 - // [126] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuaa + // [128] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuaa clc adc.z sqr sta.z sqr bcc !+ inc.z sqr+1 !: - // [127] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuxx=_inc_vbuxx + // [129] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuxx=_inc_vbuxx inx - // [128] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuxx_neq_vbuc1_then_la1 - cpx #NUM_SQUARES-1+1 - bne __b1_from___b1 - jmp __breturn - // init_squares::@return - __breturn: - // [129] return - rts + // [121] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] + __b1_from___b2: + // [121] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@2->init_squares::@1#0] -- register_copy + // [121] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@2->init_squares::@1#1] -- register_copy + // [121] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@2->init_squares::@1#2] -- register_copy + jmp __b1 } // malloc // Allocates a block of size bytes of memory, returning a pointer to the beginning of the block. @@ -5544,8 +5553,8 @@ Succesful ASM optimization Pass5NextJumpElimination Removing instruction ldy.z x Removing instruction ldy.z xb Removing instruction lda.z result+1 -Replacing instruction lda #<0 with TXA Removing instruction lda #>0 +Replacing instruction ldx #0 with TAX Replacing instruction ldy #0 with TAY Removing instruction ldy.z idx Removing instruction lda #0 @@ -5559,7 +5568,6 @@ Replacing label __b2_from___b5 with __b2 Replacing label __breturn_from___b8 with __b2 Replacing label __b7_from___b6 with __b7 Replacing label __b7_from___b6 with __b7 -Replacing label __b1_from___b1 with __b1 Replacing label __b3_from___b3 with __b3 Replacing label __b2_from___b4 with __b2 Replacing label __b1_from___b5 with __b1 @@ -5589,7 +5597,6 @@ Removing instruction __breturn_from___b8: Removing instruction __breturn: Removing instruction __b7_from___b6: Removing instruction __b7_from___b9: -Removing instruction __b1_from___b1: Removing instruction __b1_from___b5: Removing instruction __b2_from___b1: Removing instruction __b2_from___b4: @@ -5640,6 +5647,7 @@ Removing instruction __breturn: Removing instruction malloc_from_init_squares: Removing instruction __b1_from_init_squares: Removing instruction __breturn: +Removing instruction __b1_from___b2: Removing instruction __breturn: Removing instruction __breturn: Removing instruction __b1_from_init_font_hex: @@ -5655,7 +5663,6 @@ Replacing jump to rts with rts in jmp __b2 Succesful ASM optimization Pass5DoubleJumpElimination Removing instruction jmp __b1 Removing instruction jmp __b1 -Removing instruction jmp __b1 Removing instruction jmp __b2 Removing instruction jmp __b3 Succesful ASM optimization Pass5NextJumpElimination @@ -5816,16 +5823,17 @@ FINAL SYMBOL TABLE (byte~) init_squares::$3 reg byte a 22.0 (byte~) init_squares::$4 reg byte a 22.0 (label) init_squares::@1 +(label) init_squares::@2 (label) init_squares::@return (byte) init_squares::i -(byte) init_squares::i#1 reg byte x 16.5 -(byte) init_squares::i#2 reg byte x 5.5 +(byte) init_squares::i#1 reg byte x 22.0 +(byte) init_squares::i#2 reg byte x 6.285714285714286 (word) init_squares::sqr -(word) init_squares::sqr#1 sqr zp[2]:4 7.333333333333333 -(word) init_squares::sqr#2 sqr zp[2]:4 6.6000000000000005 +(word) init_squares::sqr#1 sqr zp[2]:4 11.0 +(word) init_squares::sqr#2 sqr zp[2]:4 5.5 (word*) init_squares::squares -(word*) init_squares::squares#1 squares zp[2]:9 3.6666666666666665 -(word*) init_squares::squares#2 squares zp[2]:9 16.5 +(word*) init_squares::squares#1 squares zp[2]:9 4.4 +(word*) init_squares::squares#2 squares zp[2]:9 11.0 (void()) main() (dword~) main::$4 zp[4]:13 4.0 (label) main::@1 @@ -5957,7 +5965,7 @@ reg byte y [ init_font_hex::idx#3 ] FINAL ASSEMBLER -Score: 203637 +Score: 203667 // File Comments // Calculate the distance to the center of the screen - and show it using font-hex @@ -6644,25 +6652,31 @@ init_squares: { // [130] phi from init_squares to malloc [phi:init_squares->malloc] jsr malloc // [121] phi from init_squares to init_squares::@1 [phi:init_squares->init_squares::@1] - // [121] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares->init_squares::@1#0] -- vbuxx=vbuc1 - ldx #0 - // [121] phi (word*) init_squares::squares#2 = (const word*) SQUARES#1 [phi:init_squares->init_squares::@1#1] -- pwuz1=pwuc1 + // [121] phi (word*) init_squares::squares#2 = (const word*) SQUARES#1 [phi:init_squares->init_squares::@1#0] -- pwuz1=pwuc1 lda #SQUARES sta.z squares+1 - // [121] phi (word) init_squares::sqr#2 = (word) 0 [phi:init_squares->init_squares::@1#2] -- vwuz1=vwuc1 - txa + // [121] phi (word) init_squares::sqr#2 = (word) 0 [phi:init_squares->init_squares::@1#1] -- vwuz1=vwuc1 + lda #<0 sta.z sqr sta.z sqr+1 - // [121] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] - // [121] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy - // [121] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy - // [121] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy + // [121] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares->init_squares::@1#2] -- vbuxx=vbuc1 + tax // init_squares::@1 __b1: + // for(byte i=0;iinit_squares::@1] + // [121] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@2->init_squares::@1#0] -- register_copy + // [121] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@2->init_squares::@1#1] -- register_copy + // [121] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@2->init_squares::@1#2] -- register_copy + jmp __b1 } // malloc // Allocates a block of size bytes of memory, returning a pointer to the beginning of the block. @@ -6713,6 +6725,7 @@ malloc: { .label mem = HEAP_TOP-size .label return = mem // malloc::@return + // } // [131] return rts } diff --git a/src/test/ref/screen-center-distance.sym b/src/test/ref/screen-center-distance.sym index 19087a495..a6e18af15 100644 --- a/src/test/ref/screen-center-distance.sym +++ b/src/test/ref/screen-center-distance.sym @@ -151,16 +151,17 @@ (byte~) init_squares::$3 reg byte a 22.0 (byte~) init_squares::$4 reg byte a 22.0 (label) init_squares::@1 +(label) init_squares::@2 (label) init_squares::@return (byte) init_squares::i -(byte) init_squares::i#1 reg byte x 16.5 -(byte) init_squares::i#2 reg byte x 5.5 +(byte) init_squares::i#1 reg byte x 22.0 +(byte) init_squares::i#2 reg byte x 6.285714285714286 (word) init_squares::sqr -(word) init_squares::sqr#1 sqr zp[2]:4 7.333333333333333 -(word) init_squares::sqr#2 sqr zp[2]:4 6.6000000000000005 +(word) init_squares::sqr#1 sqr zp[2]:4 11.0 +(word) init_squares::sqr#2 sqr zp[2]:4 5.5 (word*) init_squares::squares -(word*) init_squares::squares#1 squares zp[2]:9 3.6666666666666665 -(word*) init_squares::squares#2 squares zp[2]:9 16.5 +(word*) init_squares::squares#1 squares zp[2]:9 4.4 +(word*) init_squares::squares#2 squares zp[2]:9 11.0 (void()) main() (dword~) main::$4 zp[4]:13 4.0 (label) main::@1 diff --git a/src/test/ref/screen-show-spiral-buckets.asm b/src/test/ref/screen-show-spiral-buckets.asm index 80f396b11..31be7c8b7 100644 --- a/src/test/ref/screen-show-spiral-buckets.asm +++ b/src/test/ref/screen-show-spiral-buckets.asm @@ -954,11 +954,15 @@ init_squares: { sta.z squares lda.z SQUARES+1 sta.z squares+1 - ldx #0 - txa + lda #<0 sta.z sqr sta.z sqr+1 + tax __b1: + cpx #NUM_SQUARES + bcc __b2 + rts + __b2: ldy #0 lda.z sqr sta (squares),y @@ -983,9 +987,7 @@ init_squares: { inc.z sqr+1 !: inx - cpx #NUM_SQUARES-1+1 - bne __b1 - rts + jmp __b1 } // Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ... CORDIC_ATAN2_ANGLES_16: diff --git a/src/test/ref/screen-show-spiral-buckets.cfg b/src/test/ref/screen-show-spiral-buckets.cfg index 4311ba101..f93c7355d 100644 --- a/src/test/ref/screen-show-spiral-buckets.cfg +++ b/src/test/ref/screen-show-spiral-buckets.cfg @@ -488,23 +488,25 @@ sqr::@return: scope:[sqr] from sqr init_squares: scope:[init_squares] from init_dist_screen [242] phi() [243] call malloc - to:init_squares::@2 -init_squares::@2: scope:[init_squares] from init_squares + to:init_squares::@3 +init_squares::@3: scope:[init_squares] from init_squares [244] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [245] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 to:init_squares::@1 -init_squares::@1: scope:[init_squares] from init_squares::@1 init_squares::@2 - [246] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@2/(byte) 0 ) - [246] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@2/(word*) init_squares::squares#0 ) - [246] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@2/(word) 0 ) - [247] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 - [248] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD - [249] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 - [250] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 - [251] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 - [252] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 - [253] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 +init_squares::@1: scope:[init_squares] from init_squares::@2 init_squares::@3 + [246] (word*) init_squares::squares#2 ← phi( init_squares::@2/(word*) init_squares::squares#1 init_squares::@3/(word*) init_squares::squares#0 ) + [246] (word) init_squares::sqr#2 ← phi( init_squares::@2/(word) init_squares::sqr#1 init_squares::@3/(word) 0 ) + [246] (byte) init_squares::i#2 ← phi( init_squares::@2/(byte) init_squares::i#1 init_squares::@3/(byte) 0 ) + [247] if((byte) init_squares::i#2<(const byte) NUM_SQUARES#3) goto init_squares::@2 to:init_squares::@return init_squares::@return: scope:[init_squares] from init_squares::@1 - [254] return + [248] return to:@return +init_squares::@2: scope:[init_squares] from init_squares::@1 + [249] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 + [250] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD + [251] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 + [252] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 + [253] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 + [254] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 + to:init_squares::@1 diff --git a/src/test/ref/screen-show-spiral-buckets.log b/src/test/ref/screen-show-spiral-buckets.log index e6ac1cfcc..c07f280ea 100644 --- a/src/test/ref/screen-show-spiral-buckets.log +++ b/src/test/ref/screen-show-spiral-buckets.log @@ -41,7 +41,10 @@ Culled Empty Block (label) @13 Culled Empty Block (label) @14 Culled Empty Block (label) @15 Culled Empty Block (label) @16 -Culled Empty Block (label) init_squares::@2 +Culled Empty Block (label) init_squares::@4 +Culled Empty Block (label) init_squares::@3 +Culled Empty Block (label) init_squares::@5 +Culled Empty Block (label) init_squares::@6 Culled Empty Block (label) @18 Culled Empty Block (label) sqr::@1 Culled Empty Block (label) @19 @@ -202,7 +205,7 @@ bsearch16u::@3: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@2 (word*) bsearch16u::return#2 ← (word*~) bsearch16u::$4 to:bsearch16u::@return @17: scope:[] from @9 - (byte*) heap_head#46 ← phi( @9/(byte*) heap_head#0 ) + (byte*) heap_head#47 ← phi( @9/(byte*) heap_head#0 ) (byte) NUM_SQUARES#0 ← (byte) $ff (word*) SQUARES#0 ← (word*) 0 to:@22 @@ -215,9 +218,9 @@ init_squares: scope:[init_squares] from init_dist_screen (word) malloc::size#0 ← (byte~) init_squares::$0 call malloc (void*) malloc::return#2 ← (void*) malloc::return#1 - to:init_squares::@3 -init_squares::@3: scope:[init_squares] from init_squares - (byte) NUM_SQUARES#7 ← phi( init_squares/(byte) NUM_SQUARES#6 ) + to:init_squares::@7 +init_squares::@7: scope:[init_squares] from init_squares + (byte) NUM_SQUARES#14 ← phi( init_squares/(byte) NUM_SQUARES#6 ) (byte*) heap_head#20 ← phi( init_squares/(byte*) heap_head#2 ) (void*) malloc::return#10 ← phi( init_squares/(void*) malloc::return#2 ) (void*~) init_squares::$1 ← (void*) malloc::return#10 @@ -225,24 +228,32 @@ init_squares::@3: scope:[init_squares] from init_squares (word*) SQUARES#1 ← ((word*)) (void*~) init_squares::$1 (word*) init_squares::squares#0 ← (word*) SQUARES#1 (word) init_squares::sqr#0 ← (word) 0 - (number~) init_squares::$2 ← (byte) NUM_SQUARES#7 - (number) 1 (byte) init_squares::i#0 ← (byte) 0 to:init_squares::@1 -init_squares::@1: scope:[init_squares] from init_squares::@1 init_squares::@3 - (word*) SQUARES#17 ← phi( init_squares::@1/(word*) SQUARES#17 init_squares::@3/(word*) SQUARES#1 ) - (byte*) heap_head#38 ← phi( init_squares::@1/(byte*) heap_head#38 init_squares::@3/(byte*) heap_head#3 ) - (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@3/(byte) init_squares::i#0 ) - (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@3/(word*) init_squares::squares#0 ) - (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@3/(word) init_squares::sqr#0 ) +init_squares::@1: scope:[init_squares] from init_squares::@2 init_squares::@7 + (word*) SQUARES#17 ← phi( init_squares::@2/(word*) SQUARES#26 init_squares::@7/(word*) SQUARES#1 ) + (byte*) heap_head#38 ← phi( init_squares::@2/(byte*) heap_head#46 init_squares::@7/(byte*) heap_head#3 ) + (word*) init_squares::squares#3 ← phi( init_squares::@2/(word*) init_squares::squares#1 init_squares::@7/(word*) init_squares::squares#0 ) + (word) init_squares::sqr#3 ← phi( init_squares::@2/(word) init_squares::sqr#1 init_squares::@7/(word) init_squares::sqr#0 ) + (byte) NUM_SQUARES#7 ← phi( init_squares::@2/(byte) NUM_SQUARES#13 init_squares::@7/(byte) NUM_SQUARES#14 ) + (byte) init_squares::i#2 ← phi( init_squares::@2/(byte) init_squares::i#1 init_squares::@7/(byte) init_squares::i#0 ) + (bool~) init_squares::$2 ← (byte) init_squares::i#2 < (byte) NUM_SQUARES#7 + if((bool~) init_squares::$2) goto init_squares::@2 + to:init_squares::@return +init_squares::@2: scope:[init_squares] from init_squares::@1 + (word*) SQUARES#26 ← phi( init_squares::@1/(word*) SQUARES#17 ) + (byte*) heap_head#46 ← phi( init_squares::@1/(byte*) heap_head#38 ) + (byte) NUM_SQUARES#13 ← phi( init_squares::@1/(byte) NUM_SQUARES#7 ) + (byte) init_squares::i#3 ← phi( init_squares::@1/(byte) init_squares::i#2 ) + (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#3 ) + (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#3 ) *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD - (number~) init_squares::$3 ← (byte) init_squares::i#2 * (number) 2 + (number~) init_squares::$3 ← (byte) init_squares::i#3 * (number) 2 (number~) init_squares::$4 ← (number~) init_squares::$3 + (number) 1 (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (number~) init_squares::$4 - (byte) init_squares::i#1 ← (byte) init_squares::i#2 + rangenext(0,init_squares::$2) - (bool~) init_squares::$5 ← (byte) init_squares::i#1 != rangelast(0,init_squares::$2) - if((bool~) init_squares::$5) goto init_squares::@1 - to:init_squares::@return + (byte) init_squares::i#1 ← ++ (byte) init_squares::i#3 + to:init_squares::@1 init_squares::@return: scope:[init_squares] from init_squares::@1 (word*) SQUARES#8 ← phi( init_squares::@1/(word*) SQUARES#17 ) (byte*) heap_head#21 ← phi( init_squares::@1/(byte*) heap_head#38 ) @@ -266,7 +277,7 @@ sqr::@return: scope:[sqr] from sqr (byte()) sqrt((word) sqrt::val) sqrt: scope:[sqrt] from init_dist_screen::@21 - (byte) NUM_SQUARES#8 ← phi( init_dist_screen::@21/(byte) NUM_SQUARES#13 ) + (byte) NUM_SQUARES#8 ← phi( init_dist_screen::@21/(byte) NUM_SQUARES#15 ) (word*) SQUARES#10 ← phi( init_dist_screen::@21/(word*) SQUARES#20 ) (word) sqrt::val#1 ← phi( init_dist_screen::@21/(word) sqrt::val#0 ) (word) bsearch16u::key#0 ← (word) sqrt::val#1 @@ -503,16 +514,16 @@ atan2_16::@return: scope:[atan2_16] from atan2_16::@8 return to:@return @22: scope:[] from @17 - (word*) SQUARES#54 ← phi( @17/(word*) SQUARES#0 ) - (byte) NUM_SQUARES#48 ← phi( @17/(byte) NUM_SQUARES#0 ) - (byte*) heap_head#35 ← phi( @17/(byte*) heap_head#46 ) + (word*) SQUARES#55 ← phi( @17/(word*) SQUARES#0 ) + (byte) NUM_SQUARES#50 ← phi( @17/(byte) NUM_SQUARES#0 ) + (byte*) heap_head#35 ← phi( @17/(byte*) heap_head#47 ) (word) malloc::size#1 ← (number) $3e8 call malloc (void*) malloc::return#3 ← (void*) malloc::return#1 to:@27 @27: scope:[] from @22 - (word*) SQUARES#51 ← phi( @22/(word*) SQUARES#54 ) - (byte) NUM_SQUARES#44 ← phi( @22/(byte) NUM_SQUARES#48 ) + (word*) SQUARES#52 ← phi( @22/(word*) SQUARES#55 ) + (byte) NUM_SQUARES#46 ← phi( @22/(byte) NUM_SQUARES#50 ) (byte*) heap_head#22 ← phi( @22/(byte*) heap_head#2 ) (void*) malloc::return#11 ← phi( @22/(void*) malloc::return#3 ) (void*~) $0 ← (void*) malloc::return#11 @@ -523,8 +534,8 @@ atan2_16::@return: scope:[atan2_16] from atan2_16::@8 (void*) malloc::return#4 ← (void*) malloc::return#1 to:@28 @28: scope:[] from @27 - (word*) SQUARES#48 ← phi( @27/(word*) SQUARES#51 ) - (byte) NUM_SQUARES#39 ← phi( @27/(byte) NUM_SQUARES#44 ) + (word*) SQUARES#49 ← phi( @27/(word*) SQUARES#52 ) + (byte) NUM_SQUARES#41 ← phi( @27/(byte) NUM_SQUARES#46 ) (byte*) SCREEN_DIST#8 ← phi( @27/(byte*) SCREEN_DIST#0 ) (byte*) heap_head#23 ← phi( @27/(byte*) heap_head#2 ) (void*) malloc::return#12 ← phi( @27/(void*) malloc::return#4 ) @@ -537,8 +548,8 @@ atan2_16::@return: scope:[atan2_16] from atan2_16::@8 to:@29 @29: scope:[] from @28 (byte*) SCREEN_ANGLE#13 ← phi( @28/(byte*) SCREEN_ANGLE#0 ) - (word*) SQUARES#44 ← phi( @28/(word*) SQUARES#48 ) - (byte) NUM_SQUARES#33 ← phi( @28/(byte) NUM_SQUARES#39 ) + (word*) SQUARES#45 ← phi( @28/(word*) SQUARES#49 ) + (byte) NUM_SQUARES#35 ← phi( @28/(byte) NUM_SQUARES#41 ) (byte*) SCREEN_DIST#7 ← phi( @28/(byte*) SCREEN_DIST#8 ) (byte*) heap_head#24 ← phi( @28/(byte*) heap_head#2 ) (void*) malloc::return#13 ← phi( @28/(void*) malloc::return#5 ) @@ -552,8 +563,8 @@ atan2_16::@return: scope:[atan2_16] from atan2_16::@8 @30: scope:[] from @29 (byte*) BUCKET_SIZES#24 ← phi( @29/(byte*) BUCKET_SIZES#0 ) (byte*) SCREEN_ANGLE#10 ← phi( @29/(byte*) SCREEN_ANGLE#13 ) - (word*) SQUARES#35 ← phi( @29/(word*) SQUARES#44 ) - (byte) NUM_SQUARES#24 ← phi( @29/(byte) NUM_SQUARES#33 ) + (word*) SQUARES#36 ← phi( @29/(word*) SQUARES#45 ) + (byte) NUM_SQUARES#26 ← phi( @29/(byte) NUM_SQUARES#35 ) (byte*) SCREEN_DIST#6 ← phi( @29/(byte*) SCREEN_DIST#7 ) (byte*) heap_head#25 ← phi( @29/(byte*) heap_head#2 ) (void*) malloc::return#14 ← phi( @29/(void*) malloc::return#6 ) @@ -568,8 +579,8 @@ atan2_16::@return: scope:[atan2_16] from atan2_16::@8 (word**) BUCKETS#30 ← phi( @30/(word**) BUCKETS#0 ) (byte*) BUCKET_SIZES#23 ← phi( @30/(byte*) BUCKET_SIZES#24 ) (byte*) SCREEN_ANGLE#9 ← phi( @30/(byte*) SCREEN_ANGLE#10 ) - (word*) SQUARES#34 ← phi( @30/(word*) SQUARES#35 ) - (byte) NUM_SQUARES#23 ← phi( @30/(byte) NUM_SQUARES#24 ) + (word*) SQUARES#35 ← phi( @30/(word*) SQUARES#36 ) + (byte) NUM_SQUARES#25 ← phi( @30/(byte) NUM_SQUARES#26 ) (byte*) SCREEN_DIST#5 ← phi( @30/(byte*) SCREEN_DIST#6 ) (byte*) heap_head#26 ← phi( @30/(byte*) heap_head#2 ) (void*) malloc::return#15 ← phi( @30/(void*) malloc::return#7 ) @@ -586,7 +597,7 @@ main: scope:[main] from @26 (byte*) SCREEN_ANGLE#3 ← phi( @26/(byte*) SCREEN_ANGLE#5 ) (word*) SQUARES#21 ← phi( @26/(word*) SQUARES#25 ) (byte*) heap_head#39 ← phi( @26/(byte*) heap_head#45 ) - (byte) NUM_SQUARES#14 ← phi( @26/(byte) NUM_SQUARES#17 ) + (byte) NUM_SQUARES#16 ← phi( @26/(byte) NUM_SQUARES#19 ) (byte*) SCREEN_DIST#1 ← phi( @26/(byte*) SCREEN_DIST#3 ) asm { sei } (byte*) init_dist_screen::screen#0 ← (byte*) SCREEN_DIST#1 @@ -610,8 +621,8 @@ main::@34: scope:[main] from main main::@35: scope:[main] from main::@34 (byte*) BUCKET_IDX#12 ← phi( main::@34/(byte*) BUCKET_IDX#13 ) (byte*) SCREEN_ANGLE#19 ← phi( main::@34/(byte*) SCREEN_ANGLE#1 ) - (word*) SQUARES#45 ← phi( main::@34/(word*) SQUARES#3 ) - (byte) NUM_SQUARES#34 ← phi( main::@34/(byte) NUM_SQUARES#1 ) + (word*) SQUARES#46 ← phi( main::@34/(word*) SQUARES#3 ) + (byte) NUM_SQUARES#36 ← phi( main::@34/(byte) NUM_SQUARES#1 ) (word**) BUCKETS#15 ← phi( main::@34/(word**) BUCKETS#19 ) (byte*) BUCKET_SIZES#11 ← phi( main::@34/(byte*) BUCKET_SIZES#12 ) (byte*) heap_head#40 ← phi( main::@34/(byte*) heap_head#10 ) @@ -621,8 +632,8 @@ main::@35: scope:[main] from main::@34 to:main::@36 main::@36: scope:[main] from main::@35 (byte*) SCREEN_ANGLE#18 ← phi( main::@35/(byte*) SCREEN_ANGLE#19 ) - (word*) SQUARES#38 ← phi( main::@35/(word*) SQUARES#45 ) - (byte) NUM_SQUARES#27 ← phi( main::@35/(byte) NUM_SQUARES#34 ) + (word*) SQUARES#39 ← phi( main::@35/(word*) SQUARES#46 ) + (byte) NUM_SQUARES#29 ← phi( main::@35/(byte) NUM_SQUARES#36 ) (byte*) BUCKET_SIZES#15 ← phi( main::@35/(byte*) BUCKET_SIZES#11 ) (word**) BUCKETS#12 ← phi( main::@35/(word**) BUCKETS#15 ) (byte*) heap_head#28 ← phi( main::@35/(byte*) heap_head#14 ) @@ -631,9 +642,9 @@ main::@36: scope:[main] from main::@35 to:main::@1 main::@1: scope:[main] from main::@18 main::@21 main::@36 (byte*) SCREEN_ANGLE#15 ← phi( main::@18/(byte*) SCREEN_ANGLE#16 main::@21/(byte*) SCREEN_ANGLE#17 main::@36/(byte*) SCREEN_ANGLE#18 ) - (word*) SQUARES#26 ← phi( main::@18/(word*) SQUARES#36 main::@21/(word*) SQUARES#37 main::@36/(word*) SQUARES#38 ) - (byte*) heap_head#47 ← phi( main::@18/(byte*) heap_head#53 main::@21/(byte*) heap_head#54 main::@36/(byte*) heap_head#11 ) - (byte) NUM_SQUARES#18 ← phi( main::@18/(byte) NUM_SQUARES#25 main::@21/(byte) NUM_SQUARES#26 main::@36/(byte) NUM_SQUARES#27 ) + (word*) SQUARES#27 ← phi( main::@18/(word*) SQUARES#37 main::@21/(word*) SQUARES#38 main::@36/(word*) SQUARES#39 ) + (byte*) heap_head#48 ← phi( main::@18/(byte*) heap_head#54 main::@21/(byte*) heap_head#55 main::@36/(byte*) heap_head#11 ) + (byte) NUM_SQUARES#20 ← phi( main::@18/(byte) NUM_SQUARES#27 main::@21/(byte) NUM_SQUARES#28 main::@36/(byte) NUM_SQUARES#29 ) (byte*) BUCKET_SIZES#10 ← phi( main::@18/(byte*) BUCKET_SIZES#13 main::@21/(byte*) BUCKET_SIZES#14 main::@36/(byte*) BUCKET_SIZES#15 ) (word**) BUCKETS#7 ← phi( main::@18/(word**) BUCKETS#10 main::@21/(word**) BUCKETS#11 main::@36/(word**) BUCKETS#12 ) (byte) main::bucket_idx#6 ← phi( main::@18/(byte) main::bucket_idx#8 main::@21/(byte) main::bucket_idx#9 main::@36/(byte) main::bucket_idx#0 ) @@ -641,9 +652,9 @@ main::@1: scope:[main] from main::@18 main::@21 main::@36 to:main::@28 main::@4: scope:[main] from main::@1 main::@4 (byte*) SCREEN_ANGLE#14 ← phi( main::@1/(byte*) SCREEN_ANGLE#15 main::@4/(byte*) SCREEN_ANGLE#14 ) - (word*) SQUARES#49 ← phi( main::@1/(word*) SQUARES#26 main::@4/(word*) SQUARES#49 ) - (byte*) heap_head#66 ← phi( main::@1/(byte*) heap_head#47 main::@4/(byte*) heap_head#66 ) - (byte) NUM_SQUARES#40 ← phi( main::@1/(byte) NUM_SQUARES#18 main::@4/(byte) NUM_SQUARES#40 ) + (word*) SQUARES#50 ← phi( main::@1/(word*) SQUARES#27 main::@4/(word*) SQUARES#50 ) + (byte*) heap_head#67 ← phi( main::@1/(byte*) heap_head#48 main::@4/(byte*) heap_head#67 ) + (byte) NUM_SQUARES#42 ← phi( main::@1/(byte) NUM_SQUARES#20 main::@4/(byte) NUM_SQUARES#42 ) (byte*) BUCKET_SIZES#5 ← phi( main::@1/(byte*) BUCKET_SIZES#10 main::@4/(byte*) BUCKET_SIZES#5 ) (word**) BUCKETS#4 ← phi( main::@1/(word**) BUCKETS#7 main::@4/(word**) BUCKETS#4 ) (byte) main::bucket_idx#4 ← phi( main::@1/(byte) main::bucket_idx#6 main::@4/(byte) main::bucket_idx#4 ) @@ -652,9 +663,9 @@ main::@4: scope:[main] from main::@1 main::@4 to:main::@5 main::@5: scope:[main] from main::@4 (byte*) SCREEN_ANGLE#11 ← phi( main::@4/(byte*) SCREEN_ANGLE#14 ) - (word*) SQUARES#47 ← phi( main::@4/(word*) SQUARES#49 ) - (byte*) heap_head#61 ← phi( main::@4/(byte*) heap_head#66 ) - (byte) NUM_SQUARES#36 ← phi( main::@4/(byte) NUM_SQUARES#40 ) + (word*) SQUARES#48 ← phi( main::@4/(word*) SQUARES#50 ) + (byte*) heap_head#62 ← phi( main::@4/(byte*) heap_head#67 ) + (byte) NUM_SQUARES#38 ← phi( main::@4/(byte) NUM_SQUARES#42 ) (byte*) BUCKET_SIZES#1 ← phi( main::@4/(byte*) BUCKET_SIZES#5 ) (word**) BUCKETS#1 ← phi( main::@4/(word**) BUCKETS#4 ) (byte) main::bucket_idx#2 ← phi( main::@4/(byte) main::bucket_idx#4 ) @@ -670,9 +681,9 @@ main::@7: scope:[main] from main::@10 main::@5 (byte*) SCREEN_ANGLE#21 ← phi( main::@10/(byte*) SCREEN_ANGLE#20 main::@5/(byte*) SCREEN_ANGLE#11 ) (byte*) BUCKET_SIZES#18 ← phi( main::@10/(byte*) BUCKET_SIZES#17 main::@5/(byte*) BUCKET_SIZES#1 ) (word**) BUCKETS#17 ← phi( main::@10/(word**) BUCKETS#16 main::@5/(word**) BUCKETS#1 ) - (word*) SQUARES#39 ← phi( main::@10/(word*) SQUARES#46 main::@5/(word*) SQUARES#47 ) - (byte*) heap_head#55 ← phi( main::@10/(byte*) heap_head#60 main::@5/(byte*) heap_head#61 ) - (byte) NUM_SQUARES#28 ← phi( main::@10/(byte) NUM_SQUARES#35 main::@5/(byte) NUM_SQUARES#36 ) + (word*) SQUARES#40 ← phi( main::@10/(word*) SQUARES#47 main::@5/(word*) SQUARES#48 ) + (byte*) heap_head#56 ← phi( main::@10/(byte*) heap_head#61 main::@5/(byte*) heap_head#62 ) + (byte) NUM_SQUARES#30 ← phi( main::@10/(byte) NUM_SQUARES#37 main::@5/(byte) NUM_SQUARES#38 ) (byte) main::bucket_idx#3 ← phi( main::@10/(byte) main::bucket_idx#5 main::@5/(byte) main::bucket_idx#2 ) (byte) main::bucket_idx#1 ← ++ (byte) main::bucket_idx#3 (bool~) main::$18 ← (byte) main::bucket_idx#1 == (const byte) NUM_BUCKETS @@ -682,9 +693,9 @@ main::@7: scope:[main] from main::@10 main::@5 main::@6: scope:[main] from main::@5 (byte*) BUCKET_SIZES#22 ← phi( main::@5/(byte*) BUCKET_SIZES#1 ) (word**) BUCKETS#24 ← phi( main::@5/(word**) BUCKETS#1 ) - (word*) SQUARES#53 ← phi( main::@5/(word*) SQUARES#47 ) - (byte*) heap_head#73 ← phi( main::@5/(byte*) heap_head#61 ) - (byte) NUM_SQUARES#46 ← phi( main::@5/(byte) NUM_SQUARES#36 ) + (word*) SQUARES#54 ← phi( main::@5/(word*) SQUARES#48 ) + (byte*) heap_head#74 ← phi( main::@5/(byte*) heap_head#62 ) + (byte) NUM_SQUARES#48 ← phi( main::@5/(byte) NUM_SQUARES#38 ) (byte) main::bucket_idx#11 ← phi( main::@5/(byte) main::bucket_idx#2 ) (byte*) SCREEN_ANGLE#8 ← phi( main::@5/(byte*) SCREEN_ANGLE#11 ) (word*) main::bucket#4 ← phi( main::@5/(word*) main::bucket#0 ) @@ -696,9 +707,9 @@ main::@6: scope:[main] from main::@5 main::@8: scope:[main] from main::@11 main::@6 (byte*) BUCKET_SIZES#20 ← phi( main::@11/(byte*) BUCKET_SIZES#21 main::@6/(byte*) BUCKET_SIZES#22 ) (word**) BUCKETS#20 ← phi( main::@11/(word**) BUCKETS#23 main::@6/(word**) BUCKETS#24 ) - (word*) SQUARES#50 ← phi( main::@11/(word*) SQUARES#52 main::@6/(word*) SQUARES#53 ) - (byte*) heap_head#67 ← phi( main::@11/(byte*) heap_head#72 main::@6/(byte*) heap_head#73 ) - (byte) NUM_SQUARES#41 ← phi( main::@11/(byte) NUM_SQUARES#45 main::@6/(byte) NUM_SQUARES#46 ) + (word*) SQUARES#51 ← phi( main::@11/(word*) SQUARES#53 main::@6/(word*) SQUARES#54 ) + (byte*) heap_head#68 ← phi( main::@11/(byte*) heap_head#73 main::@6/(byte*) heap_head#74 ) + (byte) NUM_SQUARES#43 ← phi( main::@11/(byte) NUM_SQUARES#47 main::@6/(byte) NUM_SQUARES#48 ) (byte) main::bucket_idx#7 ← phi( main::@11/(byte) main::bucket_idx#10 main::@6/(byte) main::bucket_idx#11 ) (byte) main::min_angle#4 ← phi( main::@11/(byte) main::min_angle#5 main::@6/(byte) main::min_angle#0 ) (byte*) SCREEN_ANGLE#6 ← phi( main::@11/(byte*) SCREEN_ANGLE#7 main::@6/(byte*) SCREEN_ANGLE#8 ) @@ -712,9 +723,9 @@ main::@8: scope:[main] from main::@11 main::@6 main::@9: scope:[main] from main::@8 (byte*) BUCKET_SIZES#27 ← phi( main::@8/(byte*) BUCKET_SIZES#20 ) (word**) BUCKETS#29 ← phi( main::@8/(word**) BUCKETS#20 ) - (word*) SQUARES#57 ← phi( main::@8/(word*) SQUARES#50 ) - (byte*) heap_head#80 ← phi( main::@8/(byte*) heap_head#67 ) - (byte) NUM_SQUARES#51 ← phi( main::@8/(byte) NUM_SQUARES#41 ) + (word*) SQUARES#58 ← phi( main::@8/(word*) SQUARES#51 ) + (byte*) heap_head#81 ← phi( main::@8/(byte*) heap_head#68 ) + (byte) NUM_SQUARES#53 ← phi( main::@8/(byte) NUM_SQUARES#43 ) (byte) main::bucket_idx#14 ← phi( main::@8/(byte) main::bucket_idx#7 ) (word) main::min_offset#7 ← phi( main::@8/(word) main::min_offset#4 ) (byte) main::bucket_size#6 ← phi( main::@8/(byte) main::bucket_size#1 ) @@ -734,9 +745,9 @@ main::@10: scope:[main] from main::@8 (byte*) SCREEN_ANGLE#20 ← phi( main::@8/(byte*) SCREEN_ANGLE#6 ) (byte*) BUCKET_SIZES#17 ← phi( main::@8/(byte*) BUCKET_SIZES#20 ) (word**) BUCKETS#16 ← phi( main::@8/(word**) BUCKETS#20 ) - (word*) SQUARES#46 ← phi( main::@8/(word*) SQUARES#50 ) - (byte*) heap_head#60 ← phi( main::@8/(byte*) heap_head#67 ) - (byte) NUM_SQUARES#35 ← phi( main::@8/(byte) NUM_SQUARES#41 ) + (word*) SQUARES#47 ← phi( main::@8/(word*) SQUARES#51 ) + (byte*) heap_head#61 ← phi( main::@8/(byte*) heap_head#68 ) + (byte) NUM_SQUARES#37 ← phi( main::@8/(byte) NUM_SQUARES#43 ) (byte) main::bucket_idx#5 ← phi( main::@8/(byte) main::bucket_idx#7 ) (word) main::min_offset#2 ← phi( main::@8/(word) main::min_offset#4 ) (bool~) main::$14 ← (word) main::min_offset#2 != (number) $ffff @@ -746,9 +757,9 @@ main::@10: scope:[main] from main::@8 main::@11: scope:[main] from main::@15 main::@16 main::@9 (byte*) BUCKET_SIZES#21 ← phi( main::@15/(byte*) BUCKET_SIZES#25 main::@16/(byte*) BUCKET_SIZES#26 main::@9/(byte*) BUCKET_SIZES#27 ) (word**) BUCKETS#23 ← phi( main::@15/(word**) BUCKETS#27 main::@16/(word**) BUCKETS#28 main::@9/(word**) BUCKETS#29 ) - (word*) SQUARES#52 ← phi( main::@15/(word*) SQUARES#55 main::@16/(word*) SQUARES#56 main::@9/(word*) SQUARES#57 ) - (byte*) heap_head#72 ← phi( main::@15/(byte*) heap_head#78 main::@16/(byte*) heap_head#79 main::@9/(byte*) heap_head#80 ) - (byte) NUM_SQUARES#45 ← phi( main::@15/(byte) NUM_SQUARES#49 main::@16/(byte) NUM_SQUARES#50 main::@9/(byte) NUM_SQUARES#51 ) + (word*) SQUARES#53 ← phi( main::@15/(word*) SQUARES#56 main::@16/(word*) SQUARES#57 main::@9/(word*) SQUARES#58 ) + (byte*) heap_head#73 ← phi( main::@15/(byte*) heap_head#79 main::@16/(byte*) heap_head#80 main::@9/(byte*) heap_head#81 ) + (byte) NUM_SQUARES#47 ← phi( main::@15/(byte) NUM_SQUARES#51 main::@16/(byte) NUM_SQUARES#52 main::@9/(byte) NUM_SQUARES#53 ) (byte) main::bucket_idx#10 ← phi( main::@15/(byte) main::bucket_idx#12 main::@16/(byte) main::bucket_idx#13 main::@9/(byte) main::bucket_idx#14 ) (byte) main::min_angle#5 ← phi( main::@15/(byte) main::min_angle#2 main::@16/(byte) main::min_angle#1 main::@9/(byte) main::min_angle#3 ) (byte*) SCREEN_ANGLE#7 ← phi( main::@15/(byte*) SCREEN_ANGLE#2 main::@16/(byte*) SCREEN_ANGLE#12 main::@9/(byte*) SCREEN_ANGLE#4 ) @@ -761,9 +772,9 @@ main::@11: scope:[main] from main::@15 main::@16 main::@9 main::@15: scope:[main] from main::@9 (byte*) BUCKET_SIZES#25 ← phi( main::@9/(byte*) BUCKET_SIZES#27 ) (word**) BUCKETS#27 ← phi( main::@9/(word**) BUCKETS#29 ) - (word*) SQUARES#55 ← phi( main::@9/(word*) SQUARES#57 ) - (byte*) heap_head#78 ← phi( main::@9/(byte*) heap_head#80 ) - (byte) NUM_SQUARES#49 ← phi( main::@9/(byte) NUM_SQUARES#51 ) + (word*) SQUARES#56 ← phi( main::@9/(word*) SQUARES#58 ) + (byte*) heap_head#79 ← phi( main::@9/(byte*) heap_head#81 ) + (byte) NUM_SQUARES#51 ← phi( main::@9/(byte) NUM_SQUARES#53 ) (byte) main::bucket_idx#12 ← phi( main::@9/(byte) main::bucket_idx#14 ) (word) main::min_offset#6 ← phi( main::@9/(word) main::min_offset#7 ) (word*) main::bucket#5 ← phi( main::@9/(word*) main::bucket#1 ) @@ -781,9 +792,9 @@ main::@15: scope:[main] from main::@9 main::@16: scope:[main] from main::@15 (byte*) BUCKET_SIZES#26 ← phi( main::@15/(byte*) BUCKET_SIZES#25 ) (word**) BUCKETS#28 ← phi( main::@15/(word**) BUCKETS#27 ) - (word*) SQUARES#56 ← phi( main::@15/(word*) SQUARES#55 ) - (byte*) heap_head#79 ← phi( main::@15/(byte*) heap_head#78 ) - (byte) NUM_SQUARES#50 ← phi( main::@15/(byte) NUM_SQUARES#49 ) + (word*) SQUARES#57 ← phi( main::@15/(word*) SQUARES#56 ) + (byte*) heap_head#80 ← phi( main::@15/(byte*) heap_head#79 ) + (byte) NUM_SQUARES#52 ← phi( main::@15/(byte) NUM_SQUARES#51 ) (byte) main::bucket_idx#13 ← phi( main::@15/(byte) main::bucket_idx#12 ) (byte*) SCREEN_ANGLE#12 ← phi( main::@15/(byte*) SCREEN_ANGLE#2 ) (word*) main::bucket#6 ← phi( main::@15/(word*) main::bucket#5 ) @@ -796,9 +807,9 @@ main::@16: scope:[main] from main::@15 to:main::@11 main::@18: scope:[main] from main::@10 (byte*) SCREEN_ANGLE#16 ← phi( main::@10/(byte*) SCREEN_ANGLE#20 ) - (word*) SQUARES#36 ← phi( main::@10/(word*) SQUARES#46 ) - (byte*) heap_head#53 ← phi( main::@10/(byte*) heap_head#60 ) - (byte) NUM_SQUARES#25 ← phi( main::@10/(byte) NUM_SQUARES#35 ) + (word*) SQUARES#37 ← phi( main::@10/(word*) SQUARES#47 ) + (byte*) heap_head#54 ← phi( main::@10/(byte*) heap_head#61 ) + (byte) NUM_SQUARES#27 ← phi( main::@10/(byte) NUM_SQUARES#37 ) (byte*) BUCKET_SIZES#13 ← phi( main::@10/(byte*) BUCKET_SIZES#17 ) (word**) BUCKETS#10 ← phi( main::@10/(word**) BUCKETS#16 ) (byte) main::bucket_idx#8 ← phi( main::@10/(byte) main::bucket_idx#5 ) @@ -810,36 +821,36 @@ main::@18: scope:[main] from main::@10 to:main::@1 main::@21: scope:[main] from main::@7 (byte*) SCREEN_ANGLE#17 ← phi( main::@7/(byte*) SCREEN_ANGLE#21 ) - (word*) SQUARES#37 ← phi( main::@7/(word*) SQUARES#39 ) - (byte*) heap_head#54 ← phi( main::@7/(byte*) heap_head#55 ) - (byte) NUM_SQUARES#26 ← phi( main::@7/(byte) NUM_SQUARES#28 ) + (word*) SQUARES#38 ← phi( main::@7/(word*) SQUARES#40 ) + (byte*) heap_head#55 ← phi( main::@7/(byte*) heap_head#56 ) + (byte) NUM_SQUARES#28 ← phi( main::@7/(byte) NUM_SQUARES#30 ) (byte*) BUCKET_SIZES#14 ← phi( main::@7/(byte*) BUCKET_SIZES#18 ) (word**) BUCKETS#11 ← phi( main::@7/(word**) BUCKETS#17 ) (byte) main::bucket_idx#9 ← phi( main::@7/(byte) main::bucket_idx#1 ) *((const byte*) BORDERCOL) ← -- *((const byte*) BORDERCOL) to:main::@1 main::@25: scope:[main] from main::@7 - (word*) SQUARES#27 ← phi( main::@7/(word*) SQUARES#39 ) - (byte*) heap_head#48 ← phi( main::@7/(byte*) heap_head#55 ) - (byte) NUM_SQUARES#19 ← phi( main::@7/(byte) NUM_SQUARES#28 ) + (word*) SQUARES#28 ← phi( main::@7/(word*) SQUARES#40 ) + (byte*) heap_head#49 ← phi( main::@7/(byte*) heap_head#56 ) + (byte) NUM_SQUARES#21 ← phi( main::@7/(byte) NUM_SQUARES#30 ) *((const byte*) BORDERCOL) ← -- *((const byte*) BORDERCOL) to:main::@28 main::@28: scope:[main] from main::@1 main::@25 main::@29 - (word*) SQUARES#22 ← phi( main::@1/(word*) SQUARES#26 main::@25/(word*) SQUARES#27 main::@29/(word*) SQUARES#28 ) - (byte*) heap_head#41 ← phi( main::@1/(byte*) heap_head#47 main::@25/(byte*) heap_head#48 main::@29/(byte*) heap_head#49 ) - (byte) NUM_SQUARES#15 ← phi( main::@1/(byte) NUM_SQUARES#18 main::@25/(byte) NUM_SQUARES#19 main::@29/(byte) NUM_SQUARES#20 ) + (word*) SQUARES#22 ← phi( main::@1/(word*) SQUARES#27 main::@25/(word*) SQUARES#28 main::@29/(word*) SQUARES#29 ) + (byte*) heap_head#41 ← phi( main::@1/(byte*) heap_head#48 main::@25/(byte*) heap_head#49 main::@29/(byte*) heap_head#50 ) + (byte) NUM_SQUARES#17 ← phi( main::@1/(byte) NUM_SQUARES#20 main::@25/(byte) NUM_SQUARES#21 main::@29/(byte) NUM_SQUARES#22 ) if(true) goto main::@29 to:main::@return main::@29: scope:[main] from main::@28 - (word*) SQUARES#28 ← phi( main::@28/(word*) SQUARES#22 ) - (byte*) heap_head#49 ← phi( main::@28/(byte*) heap_head#41 ) - (byte) NUM_SQUARES#20 ← phi( main::@28/(byte) NUM_SQUARES#15 ) + (word*) SQUARES#29 ← phi( main::@28/(word*) SQUARES#22 ) + (byte*) heap_head#50 ← phi( main::@28/(byte*) heap_head#41 ) + (byte) NUM_SQUARES#22 ← phi( main::@28/(byte) NUM_SQUARES#17 ) *((const byte*) COLS+(number) $3e7) ← ++ *((const byte*) COLS+(number) $3e7) to:main::@28 main::@return: scope:[main] from main::@28 (word*) SQUARES#13 ← phi( main::@28/(word*) SQUARES#22 ) (byte*) heap_head#29 ← phi( main::@28/(byte*) heap_head#41 ) - (byte) NUM_SQUARES#10 ← phi( main::@28/(byte) NUM_SQUARES#15 ) + (byte) NUM_SQUARES#10 ← phi( main::@28/(byte) NUM_SQUARES#17 ) (byte) NUM_SQUARES#2 ← (byte) NUM_SQUARES#10 (byte*) heap_head#12 ← (byte*) heap_head#29 (word*) SQUARES#4 ← (word*) SQUARES#13 @@ -850,7 +861,7 @@ main::@return: scope:[main] from main::@28 init_buckets: scope:[init_buckets] from main::@35 (byte*) BUCKET_IDX#11 ← phi( main::@35/(byte*) BUCKET_IDX#12 ) (word**) BUCKETS#25 ← phi( main::@35/(word**) BUCKETS#15 ) - (byte*) heap_head#74 ← phi( main::@35/(byte*) heap_head#40 ) + (byte*) heap_head#75 ← phi( main::@35/(byte*) heap_head#40 ) (byte*) init_buckets::screen#6 ← phi( main::@35/(byte*) init_buckets::screen#0 ) (byte*) BUCKET_SIZES#6 ← phi( main::@35/(byte*) BUCKET_SIZES#11 ) (byte) init_buckets::i#0 ← (byte) 0 @@ -858,7 +869,7 @@ init_buckets: scope:[init_buckets] from main::@35 init_buckets::@1: scope:[init_buckets] from init_buckets init_buckets::@1 (byte*) BUCKET_IDX#10 ← phi( init_buckets/(byte*) BUCKET_IDX#11 init_buckets::@1/(byte*) BUCKET_IDX#10 ) (word**) BUCKETS#21 ← phi( init_buckets/(word**) BUCKETS#25 init_buckets::@1/(word**) BUCKETS#21 ) - (byte*) heap_head#68 ← phi( init_buckets/(byte*) heap_head#74 init_buckets::@1/(byte*) heap_head#68 ) + (byte*) heap_head#69 ← phi( init_buckets/(byte*) heap_head#75 init_buckets::@1/(byte*) heap_head#69 ) (byte*) init_buckets::screen#4 ← phi( init_buckets/(byte*) init_buckets::screen#6 init_buckets::@1/(byte*) init_buckets::screen#4 ) (byte) init_buckets::i#2 ← phi( init_buckets/(byte) init_buckets::i#0 init_buckets::@1/(byte) init_buckets::i#1 ) (byte*) BUCKET_SIZES#2 ← phi( init_buckets/(byte*) BUCKET_SIZES#6 init_buckets::@1/(byte*) BUCKET_SIZES#2 ) @@ -870,7 +881,7 @@ init_buckets::@1: scope:[init_buckets] from init_buckets init_buckets::@1 init_buckets::@2: scope:[init_buckets] from init_buckets::@1 (byte*) BUCKET_IDX#9 ← phi( init_buckets::@1/(byte*) BUCKET_IDX#10 ) (word**) BUCKETS#18 ← phi( init_buckets::@1/(word**) BUCKETS#21 ) - (byte*) heap_head#62 ← phi( init_buckets::@1/(byte*) heap_head#68 ) + (byte*) heap_head#63 ← phi( init_buckets::@1/(byte*) heap_head#69 ) (byte*) BUCKET_SIZES#7 ← phi( init_buckets::@1/(byte*) BUCKET_SIZES#2 ) (byte*) init_buckets::screen#1 ← phi( init_buckets::@1/(byte*) init_buckets::screen#4 ) (byte*) init_buckets::dist#0 ← (byte*) init_buckets::screen#1 @@ -880,7 +891,7 @@ init_buckets::@3: scope:[init_buckets] from init_buckets::@2 init_buckets::@3 (byte*) init_buckets::screen#11 ← phi( init_buckets::@2/(byte*) init_buckets::screen#1 init_buckets::@3/(byte*) init_buckets::screen#11 ) (byte*) BUCKET_IDX#8 ← phi( init_buckets::@2/(byte*) BUCKET_IDX#9 init_buckets::@3/(byte*) BUCKET_IDX#8 ) (word**) BUCKETS#13 ← phi( init_buckets::@2/(word**) BUCKETS#18 init_buckets::@3/(word**) BUCKETS#13 ) - (byte*) heap_head#56 ← phi( init_buckets::@2/(byte*) heap_head#62 init_buckets::@3/(byte*) heap_head#56 ) + (byte*) heap_head#57 ← phi( init_buckets::@2/(byte*) heap_head#63 init_buckets::@3/(byte*) heap_head#57 ) (word) init_buckets::i1#2 ← phi( init_buckets::@2/(word) init_buckets::i1#0 init_buckets::@3/(word) init_buckets::i1#1 ) (byte*) init_buckets::dist#4 ← phi( init_buckets::@2/(byte*) init_buckets::dist#0 init_buckets::@3/(byte*) init_buckets::dist#1 ) (byte*) BUCKET_SIZES#3 ← phi( init_buckets::@2/(byte*) BUCKET_SIZES#7 init_buckets::@3/(byte*) BUCKET_SIZES#3 ) @@ -894,7 +905,7 @@ init_buckets::@4: scope:[init_buckets] from init_buckets::@3 (byte*) init_buckets::screen#10 ← phi( init_buckets::@3/(byte*) init_buckets::screen#11 ) (byte*) BUCKET_IDX#7 ← phi( init_buckets::@3/(byte*) BUCKET_IDX#8 ) (word**) BUCKETS#8 ← phi( init_buckets::@3/(word**) BUCKETS#13 ) - (byte*) heap_head#50 ← phi( init_buckets::@3/(byte*) heap_head#56 ) + (byte*) heap_head#51 ← phi( init_buckets::@3/(byte*) heap_head#57 ) (byte*) BUCKET_SIZES#9 ← phi( init_buckets::@3/(byte*) BUCKET_SIZES#3 ) (word) init_buckets::i2#0 ← (word) 0 to:init_buckets::@5 @@ -902,7 +913,7 @@ init_buckets::@5: scope:[init_buckets] from init_buckets::@11 init_buckets::@4 (byte*) init_buckets::screen#9 ← phi( init_buckets::@11/(byte*) init_buckets::screen#8 init_buckets::@4/(byte*) init_buckets::screen#10 ) (byte*) BUCKET_IDX#6 ← phi( init_buckets::@11/(byte*) BUCKET_IDX#5 init_buckets::@4/(byte*) BUCKET_IDX#7 ) (word**) BUCKETS#5 ← phi( init_buckets::@11/(word**) BUCKETS#2 init_buckets::@4/(word**) BUCKETS#8 ) - (byte*) heap_head#36 ← phi( init_buckets::@11/(byte*) heap_head#13 init_buckets::@4/(byte*) heap_head#50 ) + (byte*) heap_head#36 ← phi( init_buckets::@11/(byte*) heap_head#13 init_buckets::@4/(byte*) heap_head#51 ) (word) init_buckets::i2#2 ← phi( init_buckets::@11/(word) init_buckets::i2#1 init_buckets::@4/(word) init_buckets::i2#0 ) (byte*) BUCKET_SIZES#4 ← phi( init_buckets::@11/(byte*) BUCKET_SIZES#8 init_buckets::@4/(byte*) BUCKET_SIZES#9 ) (byte~) init_buckets::$3 ← *((byte*) BUCKET_SIZES#4 + (word) init_buckets::i2#2) * (const byte) SIZEOF_POINTER @@ -927,14 +938,14 @@ init_buckets::@11: scope:[init_buckets] from init_buckets::@5 if((bool~) init_buckets::$5) goto init_buckets::@5 to:init_buckets::@6 init_buckets::@6: scope:[init_buckets] from init_buckets::@11 - (byte*) heap_head#63 ← phi( init_buckets::@11/(byte*) heap_head#13 ) + (byte*) heap_head#64 ← phi( init_buckets::@11/(byte*) heap_head#13 ) (word**) BUCKETS#14 ← phi( init_buckets::@11/(word**) BUCKETS#2 ) (byte*) init_buckets::screen#7 ← phi( init_buckets::@11/(byte*) init_buckets::screen#8 ) (byte*) BUCKET_IDX#3 ← phi( init_buckets::@11/(byte*) BUCKET_IDX#5 ) (byte) init_buckets::i3#0 ← (byte) 0 to:init_buckets::@7 init_buckets::@7: scope:[init_buckets] from init_buckets::@6 init_buckets::@7 - (byte*) heap_head#57 ← phi( init_buckets::@6/(byte*) heap_head#63 init_buckets::@7/(byte*) heap_head#57 ) + (byte*) heap_head#58 ← phi( init_buckets::@6/(byte*) heap_head#64 init_buckets::@7/(byte*) heap_head#58 ) (word**) BUCKETS#9 ← phi( init_buckets::@6/(word**) BUCKETS#14 init_buckets::@7/(word**) BUCKETS#9 ) (byte*) init_buckets::screen#5 ← phi( init_buckets::@6/(byte*) init_buckets::screen#7 init_buckets::@7/(byte*) init_buckets::screen#5 ) (byte) init_buckets::i3#2 ← phi( init_buckets::@6/(byte) init_buckets::i3#0 init_buckets::@7/(byte) init_buckets::i3#1 ) @@ -945,7 +956,7 @@ init_buckets::@7: scope:[init_buckets] from init_buckets::@6 init_buckets::@7 if((bool~) init_buckets::$6) goto init_buckets::@7 to:init_buckets::@8 init_buckets::@8: scope:[init_buckets] from init_buckets::@7 - (byte*) heap_head#51 ← phi( init_buckets::@7/(byte*) heap_head#57 ) + (byte*) heap_head#52 ← phi( init_buckets::@7/(byte*) heap_head#58 ) (byte*) BUCKET_IDX#4 ← phi( init_buckets::@7/(byte*) BUCKET_IDX#1 ) (word**) BUCKETS#6 ← phi( init_buckets::@7/(word**) BUCKETS#9 ) (byte*) init_buckets::screen#2 ← phi( init_buckets::@7/(byte*) init_buckets::screen#5 ) @@ -953,7 +964,7 @@ init_buckets::@8: scope:[init_buckets] from init_buckets::@7 (word) init_buckets::i4#0 ← (word) 0 to:init_buckets::@9 init_buckets::@9: scope:[init_buckets] from init_buckets::@8 init_buckets::@9 - (byte*) heap_head#42 ← phi( init_buckets::@8/(byte*) heap_head#51 init_buckets::@9/(byte*) heap_head#42 ) + (byte*) heap_head#42 ← phi( init_buckets::@8/(byte*) heap_head#52 init_buckets::@9/(byte*) heap_head#42 ) (word) init_buckets::i4#2 ← phi( init_buckets::@8/(word) init_buckets::i4#0 init_buckets::@9/(word) init_buckets::i4#1 ) (byte*) BUCKET_IDX#2 ← phi( init_buckets::@8/(byte*) BUCKET_IDX#4 init_buckets::@9/(byte*) BUCKET_IDX#2 ) (byte*) init_buckets::screen#3 ← phi( init_buckets::@8/(byte*) init_buckets::screen#2 init_buckets::@9/(byte*) init_buckets::screen#3 ) @@ -1068,7 +1079,7 @@ init_dist_screen: scope:[init_dist_screen] from main call init_squares to:init_dist_screen::@19 init_dist_screen::@19: scope:[init_dist_screen] from init_dist_screen - (byte) NUM_SQUARES#52 ← phi( init_dist_screen/(byte) NUM_SQUARES#3 ) + (byte) NUM_SQUARES#54 ← phi( init_dist_screen/(byte) NUM_SQUARES#3 ) (byte*) init_dist_screen::screen#1 ← phi( init_dist_screen/(byte*) init_dist_screen::screen#2 ) (word*) SQUARES#14 ← phi( init_dist_screen/(word*) SQUARES#2 ) (byte*) heap_head#32 ← phi( init_dist_screen/(byte*) heap_head#4 ) @@ -1080,11 +1091,11 @@ init_dist_screen::@19: scope:[init_dist_screen] from init_dist_screen (byte) init_dist_screen::y#0 ← (byte) 0 to:init_dist_screen::@1 init_dist_screen::@1: scope:[init_dist_screen] from init_dist_screen::@19 init_dist_screen::@7 - (byte*) heap_head#75 ← phi( init_dist_screen::@19/(byte*) heap_head#15 init_dist_screen::@7/(byte*) heap_head#44 ) - (byte) NUM_SQUARES#47 ← phi( init_dist_screen::@19/(byte) NUM_SQUARES#52 init_dist_screen::@7/(byte) NUM_SQUARES#16 ) + (byte*) heap_head#76 ← phi( init_dist_screen::@19/(byte*) heap_head#15 init_dist_screen::@7/(byte*) heap_head#44 ) + (byte) NUM_SQUARES#49 ← phi( init_dist_screen::@19/(byte) NUM_SQUARES#54 init_dist_screen::@7/(byte) NUM_SQUARES#18 ) (byte*) init_dist_screen::screen_bottomline#14 ← phi( init_dist_screen::@19/(byte*) init_dist_screen::screen_bottomline#0 init_dist_screen::@7/(byte*) init_dist_screen::screen_bottomline#1 ) (byte*) init_dist_screen::screen_topline#14 ← phi( init_dist_screen::@19/(byte*) init_dist_screen::screen_topline#0 init_dist_screen::@7/(byte*) init_dist_screen::screen_topline#1 ) - (word*) SQUARES#40 ← phi( init_dist_screen::@19/(word*) SQUARES#5 init_dist_screen::@7/(word*) SQUARES#24 ) + (word*) SQUARES#41 ← phi( init_dist_screen::@19/(word*) SQUARES#5 init_dist_screen::@7/(word*) SQUARES#24 ) (byte) init_dist_screen::y#2 ← phi( init_dist_screen::@19/(byte) init_dist_screen::y#0 init_dist_screen::@7/(byte) init_dist_screen::y#1 ) (number~) init_dist_screen::$2 ← (byte) init_dist_screen::y#2 * (number) 2 (byte) init_dist_screen::y2#0 ← (number~) init_dist_screen::$2 @@ -1092,34 +1103,34 @@ init_dist_screen::@1: scope:[init_dist_screen] from init_dist_screen::@19 init_ if((bool~) init_dist_screen::$3) goto init_dist_screen::@2 to:init_dist_screen::@3 init_dist_screen::@2: scope:[init_dist_screen] from init_dist_screen::@1 - (byte*) heap_head#69 ← phi( init_dist_screen::@1/(byte*) heap_head#75 ) - (byte) NUM_SQUARES#42 ← phi( init_dist_screen::@1/(byte) NUM_SQUARES#47 ) + (byte*) heap_head#70 ← phi( init_dist_screen::@1/(byte*) heap_head#76 ) + (byte) NUM_SQUARES#44 ← phi( init_dist_screen::@1/(byte) NUM_SQUARES#49 ) (byte) init_dist_screen::y#9 ← phi( init_dist_screen::@1/(byte) init_dist_screen::y#2 ) (byte*) init_dist_screen::screen_bottomline#11 ← phi( init_dist_screen::@1/(byte*) init_dist_screen::screen_bottomline#14 ) (byte*) init_dist_screen::screen_topline#11 ← phi( init_dist_screen::@1/(byte*) init_dist_screen::screen_topline#14 ) - (word*) SQUARES#29 ← phi( init_dist_screen::@1/(word*) SQUARES#40 ) + (word*) SQUARES#30 ← phi( init_dist_screen::@1/(word*) SQUARES#41 ) (byte) init_dist_screen::y2#1 ← phi( init_dist_screen::@1/(byte) init_dist_screen::y2#0 ) (number~) init_dist_screen::$6 ← (byte) init_dist_screen::y2#1 - (number) $18 (number~) init_dist_screen::$7 ← (number~) init_dist_screen::$6 to:init_dist_screen::@4 init_dist_screen::@3: scope:[init_dist_screen] from init_dist_screen::@1 - (byte*) heap_head#70 ← phi( init_dist_screen::@1/(byte*) heap_head#75 ) - (byte) NUM_SQUARES#43 ← phi( init_dist_screen::@1/(byte) NUM_SQUARES#47 ) + (byte*) heap_head#71 ← phi( init_dist_screen::@1/(byte*) heap_head#76 ) + (byte) NUM_SQUARES#45 ← phi( init_dist_screen::@1/(byte) NUM_SQUARES#49 ) (byte) init_dist_screen::y#10 ← phi( init_dist_screen::@1/(byte) init_dist_screen::y#2 ) (byte*) init_dist_screen::screen_bottomline#12 ← phi( init_dist_screen::@1/(byte*) init_dist_screen::screen_bottomline#14 ) (byte*) init_dist_screen::screen_topline#12 ← phi( init_dist_screen::@1/(byte*) init_dist_screen::screen_topline#14 ) - (word*) SQUARES#30 ← phi( init_dist_screen::@1/(word*) SQUARES#40 ) + (word*) SQUARES#31 ← phi( init_dist_screen::@1/(word*) SQUARES#41 ) (byte) init_dist_screen::y2#2 ← phi( init_dist_screen::@1/(byte) init_dist_screen::y2#0 ) (number~) init_dist_screen::$4 ← (number) $18 - (byte) init_dist_screen::y2#2 (number~) init_dist_screen::$5 ← (number~) init_dist_screen::$4 to:init_dist_screen::@4 init_dist_screen::@4: scope:[init_dist_screen] from init_dist_screen::@2 init_dist_screen::@3 - (byte*) heap_head#64 ← phi( init_dist_screen::@2/(byte*) heap_head#69 init_dist_screen::@3/(byte*) heap_head#70 ) - (byte) NUM_SQUARES#37 ← phi( init_dist_screen::@2/(byte) NUM_SQUARES#42 init_dist_screen::@3/(byte) NUM_SQUARES#43 ) + (byte*) heap_head#65 ← phi( init_dist_screen::@2/(byte*) heap_head#70 init_dist_screen::@3/(byte*) heap_head#71 ) + (byte) NUM_SQUARES#39 ← phi( init_dist_screen::@2/(byte) NUM_SQUARES#44 init_dist_screen::@3/(byte) NUM_SQUARES#45 ) (byte) init_dist_screen::y#7 ← phi( init_dist_screen::@2/(byte) init_dist_screen::y#9 init_dist_screen::@3/(byte) init_dist_screen::y#10 ) (byte*) init_dist_screen::screen_bottomline#8 ← phi( init_dist_screen::@2/(byte*) init_dist_screen::screen_bottomline#11 init_dist_screen::@3/(byte*) init_dist_screen::screen_bottomline#12 ) (byte*) init_dist_screen::screen_topline#8 ← phi( init_dist_screen::@2/(byte*) init_dist_screen::screen_topline#11 init_dist_screen::@3/(byte*) init_dist_screen::screen_topline#12 ) - (word*) SQUARES#19 ← phi( init_dist_screen::@2/(word*) SQUARES#29 init_dist_screen::@3/(word*) SQUARES#30 ) + (word*) SQUARES#19 ← phi( init_dist_screen::@2/(word*) SQUARES#30 init_dist_screen::@3/(word*) SQUARES#31 ) (number~) init_dist_screen::$8 ← phi( init_dist_screen::@2/(number~) init_dist_screen::$7 init_dist_screen::@3/(number~) init_dist_screen::$5 ) (byte) init_dist_screen::yd#0 ← (number~) init_dist_screen::$8 (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 @@ -1127,9 +1138,9 @@ init_dist_screen::@4: scope:[init_dist_screen] from init_dist_screen::@2 init_d (word) sqr::return#2 ← (word) sqr::return#1 to:init_dist_screen::@20 init_dist_screen::@20: scope:[init_dist_screen] from init_dist_screen::@4 - (word*) SQUARES#41 ← phi( init_dist_screen::@4/(word*) SQUARES#19 ) - (byte*) heap_head#58 ← phi( init_dist_screen::@4/(byte*) heap_head#64 ) - (byte) NUM_SQUARES#29 ← phi( init_dist_screen::@4/(byte) NUM_SQUARES#37 ) + (word*) SQUARES#42 ← phi( init_dist_screen::@4/(word*) SQUARES#19 ) + (byte*) heap_head#59 ← phi( init_dist_screen::@4/(byte*) heap_head#65 ) + (byte) NUM_SQUARES#31 ← phi( init_dist_screen::@4/(byte) NUM_SQUARES#39 ) (byte) init_dist_screen::y#5 ← phi( init_dist_screen::@4/(byte) init_dist_screen::y#7 ) (byte*) init_dist_screen::screen_bottomline#6 ← phi( init_dist_screen::@4/(byte*) init_dist_screen::screen_bottomline#8 ) (byte*) init_dist_screen::screen_topline#6 ← phi( init_dist_screen::@4/(byte*) init_dist_screen::screen_topline#8 ) @@ -1142,9 +1153,9 @@ init_dist_screen::@20: scope:[init_dist_screen] from init_dist_screen::@4 init_dist_screen::@5: scope:[init_dist_screen] from init_dist_screen::@20 init_dist_screen::@22 (byte) init_dist_screen::xb#8 ← phi( init_dist_screen::@20/(byte) init_dist_screen::xb#0 init_dist_screen::@22/(byte) init_dist_screen::xb#1 ) (word) init_dist_screen::yds#6 ← phi( init_dist_screen::@20/(word) init_dist_screen::yds#0 init_dist_screen::@22/(word) init_dist_screen::yds#7 ) - (word*) SQUARES#31 ← phi( init_dist_screen::@20/(word*) SQUARES#41 init_dist_screen::@22/(word*) SQUARES#42 ) - (byte*) heap_head#52 ← phi( init_dist_screen::@20/(byte*) heap_head#58 init_dist_screen::@22/(byte*) heap_head#59 ) - (byte) NUM_SQUARES#21 ← phi( init_dist_screen::@20/(byte) NUM_SQUARES#29 init_dist_screen::@22/(byte) NUM_SQUARES#30 ) + (word*) SQUARES#32 ← phi( init_dist_screen::@20/(word*) SQUARES#42 init_dist_screen::@22/(word*) SQUARES#43 ) + (byte*) heap_head#53 ← phi( init_dist_screen::@20/(byte*) heap_head#59 init_dist_screen::@22/(byte*) heap_head#60 ) + (byte) NUM_SQUARES#23 ← phi( init_dist_screen::@20/(byte) NUM_SQUARES#31 init_dist_screen::@22/(byte) NUM_SQUARES#32 ) (byte) init_dist_screen::y#4 ← phi( init_dist_screen::@20/(byte) init_dist_screen::y#5 init_dist_screen::@22/(byte) init_dist_screen::y#6 ) (byte*) init_dist_screen::screen_bottomline#4 ← phi( init_dist_screen::@20/(byte*) init_dist_screen::screen_bottomline#6 init_dist_screen::@22/(byte*) init_dist_screen::screen_bottomline#3 ) (byte*) init_dist_screen::screen_topline#4 ← phi( init_dist_screen::@20/(byte*) init_dist_screen::screen_topline#6 init_dist_screen::@22/(byte*) init_dist_screen::screen_topline#3 ) @@ -1153,14 +1164,14 @@ init_dist_screen::@5: scope:[init_dist_screen] from init_dist_screen::@20 init_ if((bool~) init_dist_screen::$10) goto init_dist_screen::@6 to:init_dist_screen::@7 init_dist_screen::@6: scope:[init_dist_screen] from init_dist_screen::@5 - (byte*) heap_head#81 ← phi( init_dist_screen::@5/(byte*) heap_head#52 ) + (byte*) heap_head#82 ← phi( init_dist_screen::@5/(byte*) heap_head#53 ) (byte) init_dist_screen::y#14 ← phi( init_dist_screen::@5/(byte) init_dist_screen::y#4 ) (byte) init_dist_screen::xb#7 ← phi( init_dist_screen::@5/(byte) init_dist_screen::xb#8 ) (byte*) init_dist_screen::screen_bottomline#13 ← phi( init_dist_screen::@5/(byte*) init_dist_screen::screen_bottomline#4 ) (byte*) init_dist_screen::screen_topline#13 ← phi( init_dist_screen::@5/(byte*) init_dist_screen::screen_topline#4 ) - (byte) NUM_SQUARES#38 ← phi( init_dist_screen::@5/(byte) NUM_SQUARES#21 ) + (byte) NUM_SQUARES#40 ← phi( init_dist_screen::@5/(byte) NUM_SQUARES#23 ) (word) init_dist_screen::yds#5 ← phi( init_dist_screen::@5/(word) init_dist_screen::yds#6 ) - (word*) SQUARES#43 ← phi( init_dist_screen::@5/(word*) SQUARES#31 ) + (word*) SQUARES#44 ← phi( init_dist_screen::@5/(word*) SQUARES#32 ) (byte) init_dist_screen::x#3 ← phi( init_dist_screen::@5/(byte) init_dist_screen::x#2 ) (number~) init_dist_screen::$11 ← (byte) init_dist_screen::x#3 * (number) 2 (byte) init_dist_screen::x2#0 ← (number~) init_dist_screen::$11 @@ -1168,9 +1179,9 @@ init_dist_screen::@6: scope:[init_dist_screen] from init_dist_screen::@5 if((bool~) init_dist_screen::$12) goto init_dist_screen::@8 to:init_dist_screen::@9 init_dist_screen::@7: scope:[init_dist_screen] from init_dist_screen::@5 - (word*) SQUARES#24 ← phi( init_dist_screen::@5/(word*) SQUARES#31 ) - (byte*) heap_head#44 ← phi( init_dist_screen::@5/(byte*) heap_head#52 ) - (byte) NUM_SQUARES#16 ← phi( init_dist_screen::@5/(byte) NUM_SQUARES#21 ) + (word*) SQUARES#24 ← phi( init_dist_screen::@5/(word*) SQUARES#32 ) + (byte*) heap_head#44 ← phi( init_dist_screen::@5/(byte*) heap_head#53 ) + (byte) NUM_SQUARES#18 ← phi( init_dist_screen::@5/(byte) NUM_SQUARES#23 ) (byte) init_dist_screen::y#3 ← phi( init_dist_screen::@5/(byte) init_dist_screen::y#4 ) (byte*) init_dist_screen::screen_bottomline#2 ← phi( init_dist_screen::@5/(byte*) init_dist_screen::screen_bottomline#4 ) (byte*) init_dist_screen::screen_topline#2 ← phi( init_dist_screen::@5/(byte*) init_dist_screen::screen_topline#4 ) @@ -1181,43 +1192,43 @@ init_dist_screen::@7: scope:[init_dist_screen] from init_dist_screen::@5 if((bool~) init_dist_screen::$21) goto init_dist_screen::@1 to:init_dist_screen::@return init_dist_screen::@8: scope:[init_dist_screen] from init_dist_screen::@6 - (byte*) heap_head#76 ← phi( init_dist_screen::@6/(byte*) heap_head#81 ) + (byte*) heap_head#77 ← phi( init_dist_screen::@6/(byte*) heap_head#82 ) (byte) init_dist_screen::y#12 ← phi( init_dist_screen::@6/(byte) init_dist_screen::y#14 ) (byte) init_dist_screen::xb#5 ← phi( init_dist_screen::@6/(byte) init_dist_screen::xb#7 ) (byte*) init_dist_screen::screen_bottomline#9 ← phi( init_dist_screen::@6/(byte*) init_dist_screen::screen_bottomline#13 ) (byte) init_dist_screen::x#7 ← phi( init_dist_screen::@6/(byte) init_dist_screen::x#3 ) (byte*) init_dist_screen::screen_topline#9 ← phi( init_dist_screen::@6/(byte*) init_dist_screen::screen_topline#13 ) - (byte) NUM_SQUARES#31 ← phi( init_dist_screen::@6/(byte) NUM_SQUARES#38 ) + (byte) NUM_SQUARES#33 ← phi( init_dist_screen::@6/(byte) NUM_SQUARES#40 ) (word) init_dist_screen::yds#3 ← phi( init_dist_screen::@6/(word) init_dist_screen::yds#5 ) - (word*) SQUARES#32 ← phi( init_dist_screen::@6/(word*) SQUARES#43 ) + (word*) SQUARES#33 ← phi( init_dist_screen::@6/(word*) SQUARES#44 ) (byte) init_dist_screen::x2#1 ← phi( init_dist_screen::@6/(byte) init_dist_screen::x2#0 ) (number~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#1 - (number) $27 (number~) init_dist_screen::$16 ← (number~) init_dist_screen::$15 to:init_dist_screen::@10 init_dist_screen::@9: scope:[init_dist_screen] from init_dist_screen::@6 - (byte*) heap_head#77 ← phi( init_dist_screen::@6/(byte*) heap_head#81 ) + (byte*) heap_head#78 ← phi( init_dist_screen::@6/(byte*) heap_head#82 ) (byte) init_dist_screen::y#13 ← phi( init_dist_screen::@6/(byte) init_dist_screen::y#14 ) (byte) init_dist_screen::xb#6 ← phi( init_dist_screen::@6/(byte) init_dist_screen::xb#7 ) (byte*) init_dist_screen::screen_bottomline#10 ← phi( init_dist_screen::@6/(byte*) init_dist_screen::screen_bottomline#13 ) (byte) init_dist_screen::x#8 ← phi( init_dist_screen::@6/(byte) init_dist_screen::x#3 ) (byte*) init_dist_screen::screen_topline#10 ← phi( init_dist_screen::@6/(byte*) init_dist_screen::screen_topline#13 ) - (byte) NUM_SQUARES#32 ← phi( init_dist_screen::@6/(byte) NUM_SQUARES#38 ) + (byte) NUM_SQUARES#34 ← phi( init_dist_screen::@6/(byte) NUM_SQUARES#40 ) (word) init_dist_screen::yds#4 ← phi( init_dist_screen::@6/(word) init_dist_screen::yds#5 ) - (word*) SQUARES#33 ← phi( init_dist_screen::@6/(word*) SQUARES#43 ) + (word*) SQUARES#34 ← phi( init_dist_screen::@6/(word*) SQUARES#44 ) (byte) init_dist_screen::x2#2 ← phi( init_dist_screen::@6/(byte) init_dist_screen::x2#0 ) (number~) init_dist_screen::$13 ← (number) $27 - (byte) init_dist_screen::x2#2 (number~) init_dist_screen::$14 ← (number~) init_dist_screen::$13 to:init_dist_screen::@10 init_dist_screen::@10: scope:[init_dist_screen] from init_dist_screen::@8 init_dist_screen::@9 - (byte*) heap_head#71 ← phi( init_dist_screen::@8/(byte*) heap_head#76 init_dist_screen::@9/(byte*) heap_head#77 ) + (byte*) heap_head#72 ← phi( init_dist_screen::@8/(byte*) heap_head#77 init_dist_screen::@9/(byte*) heap_head#78 ) (byte) init_dist_screen::y#11 ← phi( init_dist_screen::@8/(byte) init_dist_screen::y#12 init_dist_screen::@9/(byte) init_dist_screen::y#13 ) (byte) init_dist_screen::xb#4 ← phi( init_dist_screen::@8/(byte) init_dist_screen::xb#5 init_dist_screen::@9/(byte) init_dist_screen::xb#6 ) (byte*) init_dist_screen::screen_bottomline#7 ← phi( init_dist_screen::@8/(byte*) init_dist_screen::screen_bottomline#9 init_dist_screen::@9/(byte*) init_dist_screen::screen_bottomline#10 ) (byte) init_dist_screen::x#6 ← phi( init_dist_screen::@8/(byte) init_dist_screen::x#7 init_dist_screen::@9/(byte) init_dist_screen::x#8 ) (byte*) init_dist_screen::screen_topline#7 ← phi( init_dist_screen::@8/(byte*) init_dist_screen::screen_topline#9 init_dist_screen::@9/(byte*) init_dist_screen::screen_topline#10 ) - (byte) NUM_SQUARES#22 ← phi( init_dist_screen::@8/(byte) NUM_SQUARES#31 init_dist_screen::@9/(byte) NUM_SQUARES#32 ) + (byte) NUM_SQUARES#24 ← phi( init_dist_screen::@8/(byte) NUM_SQUARES#33 init_dist_screen::@9/(byte) NUM_SQUARES#34 ) (word) init_dist_screen::yds#2 ← phi( init_dist_screen::@8/(word) init_dist_screen::yds#3 init_dist_screen::@9/(word) init_dist_screen::yds#4 ) - (word*) SQUARES#18 ← phi( init_dist_screen::@8/(word*) SQUARES#32 init_dist_screen::@9/(word*) SQUARES#33 ) + (word*) SQUARES#18 ← phi( init_dist_screen::@8/(word*) SQUARES#33 init_dist_screen::@9/(word*) SQUARES#34 ) (number~) init_dist_screen::$17 ← phi( init_dist_screen::@8/(number~) init_dist_screen::$16 init_dist_screen::@9/(number~) init_dist_screen::$14 ) (byte) init_dist_screen::xd#0 ← (number~) init_dist_screen::$17 (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 @@ -1225,13 +1236,13 @@ init_dist_screen::@10: scope:[init_dist_screen] from init_dist_screen::@8 init_ (word) sqr::return#3 ← (word) sqr::return#1 to:init_dist_screen::@21 init_dist_screen::@21: scope:[init_dist_screen] from init_dist_screen::@10 - (byte*) heap_head#65 ← phi( init_dist_screen::@10/(byte*) heap_head#71 ) + (byte*) heap_head#66 ← phi( init_dist_screen::@10/(byte*) heap_head#72 ) (byte) init_dist_screen::y#8 ← phi( init_dist_screen::@10/(byte) init_dist_screen::y#11 ) (byte) init_dist_screen::xb#3 ← phi( init_dist_screen::@10/(byte) init_dist_screen::xb#4 ) (byte*) init_dist_screen::screen_bottomline#5 ← phi( init_dist_screen::@10/(byte*) init_dist_screen::screen_bottomline#7 ) (byte) init_dist_screen::x#5 ← phi( init_dist_screen::@10/(byte) init_dist_screen::x#6 ) (byte*) init_dist_screen::screen_topline#5 ← phi( init_dist_screen::@10/(byte*) init_dist_screen::screen_topline#7 ) - (byte) NUM_SQUARES#13 ← phi( init_dist_screen::@10/(byte) NUM_SQUARES#22 ) + (byte) NUM_SQUARES#15 ← phi( init_dist_screen::@10/(byte) NUM_SQUARES#24 ) (word*) SQUARES#20 ← phi( init_dist_screen::@10/(word*) SQUARES#18 ) (word) init_dist_screen::yds#1 ← phi( init_dist_screen::@10/(word) init_dist_screen::yds#2 ) (word) sqr::return#6 ← phi( init_dist_screen::@10/(word) sqr::return#3 ) @@ -1245,9 +1256,9 @@ init_dist_screen::@21: scope:[init_dist_screen] from init_dist_screen::@10 to:init_dist_screen::@22 init_dist_screen::@22: scope:[init_dist_screen] from init_dist_screen::@21 (word) init_dist_screen::yds#7 ← phi( init_dist_screen::@21/(word) init_dist_screen::yds#1 ) - (word*) SQUARES#42 ← phi( init_dist_screen::@21/(word*) SQUARES#20 ) - (byte*) heap_head#59 ← phi( init_dist_screen::@21/(byte*) heap_head#65 ) - (byte) NUM_SQUARES#30 ← phi( init_dist_screen::@21/(byte) NUM_SQUARES#13 ) + (word*) SQUARES#43 ← phi( init_dist_screen::@21/(word*) SQUARES#20 ) + (byte*) heap_head#60 ← phi( init_dist_screen::@21/(byte*) heap_head#66 ) + (byte) NUM_SQUARES#32 ← phi( init_dist_screen::@21/(byte) NUM_SQUARES#15 ) (byte) init_dist_screen::y#6 ← phi( init_dist_screen::@21/(byte) init_dist_screen::y#8 ) (byte) init_dist_screen::xb#2 ← phi( init_dist_screen::@21/(byte) init_dist_screen::xb#3 ) (byte*) init_dist_screen::screen_bottomline#3 ← phi( init_dist_screen::@21/(byte*) init_dist_screen::screen_bottomline#5 ) @@ -1266,7 +1277,7 @@ init_dist_screen::@22: scope:[init_dist_screen] from init_dist_screen::@21 init_dist_screen::@return: scope:[init_dist_screen] from init_dist_screen::@7 (word*) SQUARES#15 ← phi( init_dist_screen::@7/(word*) SQUARES#24 ) (byte*) heap_head#33 ← phi( init_dist_screen::@7/(byte*) heap_head#44 ) - (byte) NUM_SQUARES#11 ← phi( init_dist_screen::@7/(byte) NUM_SQUARES#16 ) + (byte) NUM_SQUARES#11 ← phi( init_dist_screen::@7/(byte) NUM_SQUARES#18 ) (byte) NUM_SQUARES#4 ← (byte) NUM_SQUARES#11 (byte*) heap_head#16 ← (byte*) heap_head#33 (word*) SQUARES#6 ← (word*) SQUARES#15 @@ -1277,9 +1288,9 @@ init_dist_screen::@return: scope:[init_dist_screen] from init_dist_screen::@7 (word**) BUCKETS#26 ← phi( @31/(word**) BUCKETS#30 ) (byte*) BUCKET_SIZES#19 ← phi( @31/(byte*) BUCKET_SIZES#23 ) (byte*) SCREEN_ANGLE#5 ← phi( @31/(byte*) SCREEN_ANGLE#9 ) - (word*) SQUARES#25 ← phi( @31/(word*) SQUARES#34 ) + (word*) SQUARES#25 ← phi( @31/(word*) SQUARES#35 ) (byte*) heap_head#45 ← phi( @31/(byte*) heap_head#9 ) - (byte) NUM_SQUARES#17 ← phi( @31/(byte) NUM_SQUARES#23 ) + (byte) NUM_SQUARES#19 ← phi( @31/(byte) NUM_SQUARES#25 ) (byte*) SCREEN_DIST#3 ← phi( @31/(byte*) SCREEN_DIST#5 ) call main to:@32 @@ -1448,6 +1459,8 @@ SYMBOL TABLE SSA (byte) NUM_SQUARES#50 (byte) NUM_SQUARES#51 (byte) NUM_SQUARES#52 +(byte) NUM_SQUARES#53 +(byte) NUM_SQUARES#54 (byte) NUM_SQUARES#6 (byte) NUM_SQUARES#7 (byte) NUM_SQUARES#8 @@ -1549,6 +1562,7 @@ SYMBOL TABLE SSA (word*) SQUARES#55 (word*) SQUARES#56 (word*) SQUARES#57 +(word*) SQUARES#58 (word*) SQUARES#6 (word*) SQUARES#7 (word*) SQUARES#8 @@ -1901,6 +1915,7 @@ SYMBOL TABLE SSA (byte*) heap_head#8 (byte*) heap_head#80 (byte*) heap_head#81 +(byte*) heap_head#82 (byte*) heap_head#9 (void()) init_angle_screen((byte*) init_angle_screen::screen) (byte*~) init_angle_screen::$0 @@ -2181,25 +2196,28 @@ SYMBOL TABLE SSA (void()) init_squares() (byte~) init_squares::$0 (void*~) init_squares::$1 -(number~) init_squares::$2 +(bool~) init_squares::$2 (number~) init_squares::$3 (number~) init_squares::$4 -(bool~) init_squares::$5 (label) init_squares::@1 -(label) init_squares::@3 +(label) init_squares::@2 +(label) init_squares::@7 (label) init_squares::@return (byte) init_squares::i (byte) init_squares::i#0 (byte) init_squares::i#1 (byte) init_squares::i#2 +(byte) init_squares::i#3 (word) init_squares::sqr (word) init_squares::sqr#0 (word) init_squares::sqr#1 (word) init_squares::sqr#2 +(word) init_squares::sqr#3 (word*) init_squares::squares (word*) init_squares::squares#0 (word*) init_squares::squares#1 (word*) init_squares::squares#2 +(word*) init_squares::squares#3 (void()) main() (bool~) main::$10 (byte*~) main::$11 @@ -2385,10 +2403,8 @@ Adding number conversion cast (unumber) 1 in (number~) bsearch16u::$17 ← (numb Adding number conversion cast (unumber) bsearch16u::$17 in (number~) bsearch16u::$17 ← (unumber)(number) 1 * (const byte) SIZEOF_WORD Adding number conversion cast (unumber) 1 in (number~) bsearch16u::$18 ← (number) 1 * (const byte) SIZEOF_WORD Adding number conversion cast (unumber) bsearch16u::$18 in (number~) bsearch16u::$18 ← (unumber)(number) 1 * (const byte) SIZEOF_WORD -Adding number conversion cast (unumber) 1 in (number~) init_squares::$2 ← (byte) NUM_SQUARES#7 - (number) 1 -Adding number conversion cast (unumber) init_squares::$2 in (number~) init_squares::$2 ← (byte) NUM_SQUARES#7 - (unumber)(number) 1 -Adding number conversion cast (unumber) 2 in (number~) init_squares::$3 ← (byte) init_squares::i#2 * (number) 2 -Adding number conversion cast (unumber) init_squares::$3 in (number~) init_squares::$3 ← (byte) init_squares::i#2 * (unumber)(number) 2 +Adding number conversion cast (unumber) 2 in (number~) init_squares::$3 ← (byte) init_squares::i#3 * (number) 2 +Adding number conversion cast (unumber) init_squares::$3 in (number~) init_squares::$3 ← (byte) init_squares::i#3 * (unumber)(number) 2 Adding number conversion cast (unumber) 1 in (number~) init_squares::$4 ← (unumber~) init_squares::$3 + (number) 1 Adding number conversion cast (unumber) init_squares::$4 in (number~) init_squares::$4 ← (unumber~) init_squares::$3 + (unumber)(number) 1 Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$0 ← (signed word) atan2_16::y#1 >= (number) 0 @@ -2448,12 +2464,12 @@ Adding number conversion cast (unumber) init_dist_screen::$7 in (number~) init_d Adding number conversion cast (unumber) $18 in (number~) init_dist_screen::$4 ← (number) $18 - (byte) init_dist_screen::y2#2 Adding number conversion cast (unumber) init_dist_screen::$4 in (number~) init_dist_screen::$4 ← (unumber)(number) $18 - (byte) init_dist_screen::y2#2 Adding number conversion cast (unumber) init_dist_screen::$5 in (number~) init_dist_screen::$5 ← (unumber~) init_dist_screen::$4 -Adding number conversion cast (unumber) init_dist_screen::$8 in (byte*) heap_head#64 ← phi( init_dist_screen::@2/(byte*) heap_head#69 init_dist_screen::@3/(byte*) heap_head#70 ) - (byte) NUM_SQUARES#37 ← phi( init_dist_screen::@2/(byte) NUM_SQUARES#42 init_dist_screen::@3/(byte) NUM_SQUARES#43 ) +Adding number conversion cast (unumber) init_dist_screen::$8 in (byte*) heap_head#65 ← phi( init_dist_screen::@2/(byte*) heap_head#70 init_dist_screen::@3/(byte*) heap_head#71 ) + (byte) NUM_SQUARES#39 ← phi( init_dist_screen::@2/(byte) NUM_SQUARES#44 init_dist_screen::@3/(byte) NUM_SQUARES#45 ) (byte) init_dist_screen::y#7 ← phi( init_dist_screen::@2/(byte) init_dist_screen::y#9 init_dist_screen::@3/(byte) init_dist_screen::y#10 ) (byte*) init_dist_screen::screen_bottomline#8 ← phi( init_dist_screen::@2/(byte*) init_dist_screen::screen_bottomline#11 init_dist_screen::@3/(byte*) init_dist_screen::screen_bottomline#12 ) (byte*) init_dist_screen::screen_topline#8 ← phi( init_dist_screen::@2/(byte*) init_dist_screen::screen_topline#11 init_dist_screen::@3/(byte*) init_dist_screen::screen_topline#12 ) - (word*) SQUARES#19 ← phi( init_dist_screen::@2/(word*) SQUARES#29 init_dist_screen::@3/(word*) SQUARES#30 ) + (word*) SQUARES#19 ← phi( init_dist_screen::@2/(word*) SQUARES#30 init_dist_screen::@3/(word*) SQUARES#31 ) (number~) init_dist_screen::$8 ← phi( init_dist_screen::@2/(unumber~) init_dist_screen::$7 init_dist_screen::@3/(unumber~) init_dist_screen::$5 ) Adding number conversion cast (unumber) $13 in (bool~) init_dist_screen::$10 ← (byte) init_dist_screen::x#2 <= (number) $13 Adding number conversion cast (unumber) 2 in (number~) init_dist_screen::$11 ← (byte) init_dist_screen::x#3 * (number) 2 @@ -2467,15 +2483,15 @@ Adding number conversion cast (unumber) init_dist_screen::$16 in (number~) init_ Adding number conversion cast (unumber) $27 in (number~) init_dist_screen::$13 ← (number) $27 - (byte) init_dist_screen::x2#2 Adding number conversion cast (unumber) init_dist_screen::$13 in (number~) init_dist_screen::$13 ← (unumber)(number) $27 - (byte) init_dist_screen::x2#2 Adding number conversion cast (unumber) init_dist_screen::$14 in (number~) init_dist_screen::$14 ← (unumber~) init_dist_screen::$13 -Adding number conversion cast (unumber) init_dist_screen::$17 in (byte*) heap_head#71 ← phi( init_dist_screen::@8/(byte*) heap_head#76 init_dist_screen::@9/(byte*) heap_head#77 ) +Adding number conversion cast (unumber) init_dist_screen::$17 in (byte*) heap_head#72 ← phi( init_dist_screen::@8/(byte*) heap_head#77 init_dist_screen::@9/(byte*) heap_head#78 ) (byte) init_dist_screen::y#11 ← phi( init_dist_screen::@8/(byte) init_dist_screen::y#12 init_dist_screen::@9/(byte) init_dist_screen::y#13 ) (byte) init_dist_screen::xb#4 ← phi( init_dist_screen::@8/(byte) init_dist_screen::xb#5 init_dist_screen::@9/(byte) init_dist_screen::xb#6 ) (byte*) init_dist_screen::screen_bottomline#7 ← phi( init_dist_screen::@8/(byte*) init_dist_screen::screen_bottomline#9 init_dist_screen::@9/(byte*) init_dist_screen::screen_bottomline#10 ) (byte) init_dist_screen::x#6 ← phi( init_dist_screen::@8/(byte) init_dist_screen::x#7 init_dist_screen::@9/(byte) init_dist_screen::x#8 ) (byte*) init_dist_screen::screen_topline#7 ← phi( init_dist_screen::@8/(byte*) init_dist_screen::screen_topline#9 init_dist_screen::@9/(byte*) init_dist_screen::screen_topline#10 ) - (byte) NUM_SQUARES#22 ← phi( init_dist_screen::@8/(byte) NUM_SQUARES#31 init_dist_screen::@9/(byte) NUM_SQUARES#32 ) + (byte) NUM_SQUARES#24 ← phi( init_dist_screen::@8/(byte) NUM_SQUARES#33 init_dist_screen::@9/(byte) NUM_SQUARES#34 ) (word) init_dist_screen::yds#2 ← phi( init_dist_screen::@8/(word) init_dist_screen::yds#3 init_dist_screen::@9/(word) init_dist_screen::yds#4 ) - (word*) SQUARES#18 ← phi( init_dist_screen::@8/(word*) SQUARES#32 init_dist_screen::@9/(word*) SQUARES#33 ) + (word*) SQUARES#18 ← phi( init_dist_screen::@8/(word*) SQUARES#33 init_dist_screen::@9/(word*) SQUARES#34 ) (number~) init_dist_screen::$17 ← phi( init_dist_screen::@8/(unumber~) init_dist_screen::$16 init_dist_screen::@9/(unumber~) init_dist_screen::$14 ) Successful SSA optimization PassNAddNumberTypeConversions Inlining cast (void*) malloc::return#0 ← (void*)(byte*) malloc::mem#0 @@ -2510,7 +2526,6 @@ Simplifying constant integer cast 0 Simplifying constant integer cast 1 Simplifying constant integer cast 1 Simplifying constant integer cast 1 -Simplifying constant integer cast 1 Simplifying constant integer cast 2 Simplifying constant integer cast 1 Simplifying constant integer cast 0 @@ -2571,7 +2586,6 @@ Finalized signed number type (signed byte) 0 Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 1 -Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 2 Finalized unsigned number type (byte) 1 Finalized signed number type (signed byte) 0 @@ -2625,8 +2639,7 @@ Finalized unsigned number type (byte) $27 Successful SSA optimization PassNFinalizeNumberTypeConversions Inferred type updated to byte in (unumber~) bsearch16u::$17 ← (byte) 1 * (const byte) SIZEOF_WORD Inferred type updated to byte in (unumber~) bsearch16u::$18 ← (byte) 1 * (const byte) SIZEOF_WORD -Inferred type updated to byte in (unumber~) init_squares::$2 ← (byte) NUM_SQUARES#7 - (byte) 1 -Inferred type updated to byte in (unumber~) init_squares::$3 ← (byte) init_squares::i#2 * (byte) 2 +Inferred type updated to byte in (unumber~) init_squares::$3 ← (byte) init_squares::i#3 * (byte) 2 Inferred type updated to byte in (unumber~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 Inferred type updated to word in (unumber~) atan2_16::$12 ← (word) $8000 - (word) atan2_16::angle#9 Inferred type updated to byte in (unumber~) init_angle_screen::$3 ← (byte) init_angle_screen::x#3 * (byte) 2 @@ -2672,13 +2685,17 @@ Alias (word*) bsearch16u::return#1 = (word*) bsearch16u::return#4 Alias (word*) bsearch16u::items#0 = (word*~) bsearch16u::$15 Alias (word*~) bsearch16u::$2 = (word*~) bsearch16u::$1 Alias (word*) bsearch16u::return#2 = (word*~) bsearch16u::$4 -Alias (byte*) heap_head#0 = (byte*) heap_head#46 (byte*) heap_head#35 +Alias (byte*) heap_head#0 = (byte*) heap_head#47 (byte*) heap_head#35 Alias (word) malloc::size#0 = (byte~) init_squares::$0 Alias (void*) malloc::return#10 = (void*) malloc::return#2 -Alias (byte) NUM_SQUARES#6 = (byte) NUM_SQUARES#7 +Alias (byte) NUM_SQUARES#14 = (byte) NUM_SQUARES#6 Alias (byte*) heap_head#20 = (byte*) heap_head#3 -Alias (byte*) heap_head#21 = (byte*) heap_head#38 (byte*) heap_head#4 -Alias (word*) SQUARES#17 = (word*) SQUARES#8 (word*) SQUARES#2 +Alias (word) init_squares::sqr#2 = (word) init_squares::sqr#3 +Alias (word*) init_squares::squares#2 = (word*) init_squares::squares#3 +Alias (byte) init_squares::i#2 = (byte) init_squares::i#3 +Alias (byte) NUM_SQUARES#13 = (byte) NUM_SQUARES#7 +Alias (byte*) heap_head#21 = (byte*) heap_head#46 (byte*) heap_head#38 (byte*) heap_head#4 +Alias (word*) SQUARES#17 = (word*) SQUARES#26 (word*) SQUARES#8 (word*) SQUARES#2 Alias (word) sqr::return#0 = (word) sqr::return#4 (word) sqr::return#1 Alias (word*) bsearch16u::return#3 = (word*) bsearch16u::return#5 Alias (word*) SQUARES#10 = (word*) SQUARES#11 @@ -2721,8 +2738,8 @@ Alias (word) atan2_16::angle#4 = (word~) atan2_16::$12 Alias (word) atan2_16::return#0 = (word) atan2_16::angle#10 (word) atan2_16::return#3 (word) atan2_16::return#1 Alias (word) atan2_16::angle#11 = (word) atan2_16::angle#15 Alias (word) atan2_16::angle#5 = (word~) atan2_16::$15 -Alias (byte) NUM_SQUARES#0 = (byte) NUM_SQUARES#48 (byte) NUM_SQUARES#44 (byte) NUM_SQUARES#39 (byte) NUM_SQUARES#33 (byte) NUM_SQUARES#24 (byte) NUM_SQUARES#23 (byte) NUM_SQUARES#17 -Alias (word*) SQUARES#0 = (word*) SQUARES#54 (word*) SQUARES#51 (word*) SQUARES#48 (word*) SQUARES#44 (word*) SQUARES#35 (word*) SQUARES#34 (word*) SQUARES#25 +Alias (byte) NUM_SQUARES#0 = (byte) NUM_SQUARES#50 (byte) NUM_SQUARES#46 (byte) NUM_SQUARES#41 (byte) NUM_SQUARES#35 (byte) NUM_SQUARES#26 (byte) NUM_SQUARES#25 (byte) NUM_SQUARES#19 +Alias (word*) SQUARES#0 = (word*) SQUARES#55 (word*) SQUARES#52 (word*) SQUARES#49 (word*) SQUARES#45 (word*) SQUARES#36 (word*) SQUARES#35 (word*) SQUARES#25 Alias (void*) malloc::return#11 = (void*) malloc::return#3 Alias (byte*) heap_head#22 = (byte*) heap_head#5 Alias (void*) malloc::return#12 = (void*) malloc::return#4 @@ -2742,16 +2759,16 @@ Alias (byte*) SCREEN_DIST#1 = (byte*) SCREEN_DIST#4 (byte*) SCREEN_DIST#2 Alias (byte*) BUCKET_SIZES#11 = (byte*) BUCKET_SIZES#12 (byte*) BUCKET_SIZES#16 (byte*) BUCKET_SIZES#15 Alias (word**) BUCKETS#12 = (word**) BUCKETS#19 (word**) BUCKETS#22 (word**) BUCKETS#15 Alias (byte*) BUCKET_IDX#12 = (byte*) BUCKET_IDX#13 (byte*) BUCKET_IDX#14 -Alias (byte) NUM_SQUARES#1 = (byte) NUM_SQUARES#9 (byte) NUM_SQUARES#34 (byte) NUM_SQUARES#27 +Alias (byte) NUM_SQUARES#1 = (byte) NUM_SQUARES#9 (byte) NUM_SQUARES#36 (byte) NUM_SQUARES#29 Alias (byte*) heap_head#10 = (byte*) heap_head#27 (byte*) heap_head#40 -Alias (word*) SQUARES#12 = (word*) SQUARES#3 (word*) SQUARES#45 (word*) SQUARES#38 +Alias (word*) SQUARES#12 = (word*) SQUARES#3 (word*) SQUARES#46 (word*) SQUARES#39 Alias (byte*) heap_head#11 = (byte*) heap_head#28 Alias (byte) main::bucket_idx#11 = (byte) main::bucket_idx#2 (byte) main::bucket_idx#4 Alias (word**) BUCKETS#1 = (word**) BUCKETS#4 (word**) BUCKETS#24 Alias (byte*) BUCKET_SIZES#1 = (byte*) BUCKET_SIZES#5 (byte*) BUCKET_SIZES#22 -Alias (byte) NUM_SQUARES#36 = (byte) NUM_SQUARES#40 (byte) NUM_SQUARES#46 -Alias (byte*) heap_head#61 = (byte*) heap_head#66 (byte*) heap_head#73 -Alias (word*) SQUARES#47 = (word*) SQUARES#49 (word*) SQUARES#53 +Alias (byte) NUM_SQUARES#38 = (byte) NUM_SQUARES#42 (byte) NUM_SQUARES#48 +Alias (byte*) heap_head#62 = (byte*) heap_head#67 (byte*) heap_head#74 +Alias (word*) SQUARES#48 = (word*) SQUARES#50 (word*) SQUARES#54 Alias (byte*) SCREEN_ANGLE#11 = (byte*) SCREEN_ANGLE#14 (byte*) SCREEN_ANGLE#8 Alias (byte) main::bucket_size#0 = (byte) main::bucket_size#3 Alias (word*) main::bucket#0 = (word*) main::bucket#4 @@ -2762,9 +2779,9 @@ Alias (byte) main::min_angle#2 = (byte) main::min_angle#3 (byte) main::min_angle Alias (byte) main::bucket_size#1 = (byte) main::bucket_size#6 (byte) main::bucket_size#4 (byte) main::bucket_size#5 Alias (word) main::min_offset#2 = (word) main::min_offset#7 (word) main::min_offset#4 (word) main::min_offset#6 (word) main::min_offset#3 Alias (byte) main::bucket_idx#12 = (byte) main::bucket_idx#14 (byte) main::bucket_idx#7 (byte) main::bucket_idx#5 (byte) main::bucket_idx#13 (byte) main::bucket_idx#8 -Alias (byte) NUM_SQUARES#25 = (byte) NUM_SQUARES#51 (byte) NUM_SQUARES#41 (byte) NUM_SQUARES#35 (byte) NUM_SQUARES#49 (byte) NUM_SQUARES#50 -Alias (byte*) heap_head#53 = (byte*) heap_head#80 (byte*) heap_head#67 (byte*) heap_head#60 (byte*) heap_head#78 (byte*) heap_head#79 -Alias (word*) SQUARES#36 = (word*) SQUARES#57 (word*) SQUARES#50 (word*) SQUARES#46 (word*) SQUARES#55 (word*) SQUARES#56 +Alias (byte) NUM_SQUARES#27 = (byte) NUM_SQUARES#53 (byte) NUM_SQUARES#43 (byte) NUM_SQUARES#37 (byte) NUM_SQUARES#51 (byte) NUM_SQUARES#52 +Alias (byte*) heap_head#54 = (byte*) heap_head#81 (byte*) heap_head#68 (byte*) heap_head#61 (byte*) heap_head#79 (byte*) heap_head#80 +Alias (word*) SQUARES#37 = (word*) SQUARES#58 (word*) SQUARES#51 (word*) SQUARES#47 (word*) SQUARES#56 (word*) SQUARES#57 Alias (word**) BUCKETS#10 = (word**) BUCKETS#29 (word**) BUCKETS#20 (word**) BUCKETS#16 (word**) BUCKETS#27 (word**) BUCKETS#28 Alias (byte*) BUCKET_SIZES#13 = (byte*) BUCKET_SIZES#27 (byte*) BUCKET_SIZES#20 (byte*) BUCKET_SIZES#17 (byte*) BUCKET_SIZES#25 (byte*) BUCKET_SIZES#26 Alias (byte*) main::fill#0 = (byte*~) main::$8 @@ -2774,20 +2791,20 @@ Alias (byte*) main::fill1#0 = (byte*~) main::$16 Alias (byte) main::bucket_idx#1 = (byte) main::bucket_idx#9 Alias (word**) BUCKETS#11 = (word**) BUCKETS#17 Alias (byte*) BUCKET_SIZES#14 = (byte*) BUCKET_SIZES#18 -Alias (byte) NUM_SQUARES#19 = (byte) NUM_SQUARES#26 (byte) NUM_SQUARES#28 -Alias (byte*) heap_head#48 = (byte*) heap_head#54 (byte*) heap_head#55 -Alias (word*) SQUARES#27 = (word*) SQUARES#37 (word*) SQUARES#39 +Alias (byte) NUM_SQUARES#21 = (byte) NUM_SQUARES#28 (byte) NUM_SQUARES#30 +Alias (byte*) heap_head#49 = (byte*) heap_head#55 (byte*) heap_head#56 +Alias (word*) SQUARES#28 = (word*) SQUARES#38 (word*) SQUARES#40 Alias (byte*) SCREEN_ANGLE#17 = (byte*) SCREEN_ANGLE#21 -Alias (byte) NUM_SQUARES#10 = (byte) NUM_SQUARES#20 (byte) NUM_SQUARES#15 (byte) NUM_SQUARES#2 -Alias (byte*) heap_head#12 = (byte*) heap_head#49 (byte*) heap_head#41 (byte*) heap_head#29 -Alias (word*) SQUARES#13 = (word*) SQUARES#28 (word*) SQUARES#22 (word*) SQUARES#4 +Alias (byte) NUM_SQUARES#10 = (byte) NUM_SQUARES#22 (byte) NUM_SQUARES#17 (byte) NUM_SQUARES#2 +Alias (byte*) heap_head#12 = (byte*) heap_head#50 (byte*) heap_head#41 (byte*) heap_head#29 +Alias (word*) SQUARES#13 = (word*) SQUARES#29 (word*) SQUARES#22 (word*) SQUARES#4 Alias (byte*) init_buckets::screen#1 = (byte*) init_buckets::screen#4 (byte*) init_buckets::dist#0 Alias (byte*) BUCKET_SIZES#2 = (byte*) BUCKET_SIZES#7 -Alias (byte*) heap_head#62 = (byte*) heap_head#68 +Alias (byte*) heap_head#63 = (byte*) heap_head#69 Alias (word**) BUCKETS#18 = (word**) BUCKETS#21 Alias (byte*) BUCKET_IDX#10 = (byte*) BUCKET_IDX#9 Alias (byte*) BUCKET_SIZES#3 = (byte*) BUCKET_SIZES#9 -Alias (byte*) heap_head#50 = (byte*) heap_head#56 +Alias (byte*) heap_head#51 = (byte*) heap_head#57 Alias (word**) BUCKETS#13 = (word**) BUCKETS#8 Alias (byte*) BUCKET_IDX#7 = (byte*) BUCKET_IDX#8 Alias (byte*) init_buckets::screen#10 = (byte*) init_buckets::screen#11 @@ -2798,11 +2815,11 @@ Alias (word**) BUCKETS#14 = (word**) BUCKETS#2 (word**) BUCKETS#5 Alias (byte*) BUCKET_SIZES#4 = (byte*) BUCKET_SIZES#8 Alias (byte*) BUCKET_IDX#3 = (byte*) BUCKET_IDX#5 (byte*) BUCKET_IDX#6 Alias (byte*) init_buckets::screen#7 = (byte*) init_buckets::screen#8 (byte*) init_buckets::screen#9 -Alias (byte*) heap_head#13 = (byte*) heap_head#30 (byte*) heap_head#63 +Alias (byte*) heap_head#13 = (byte*) heap_head#30 (byte*) heap_head#64 Alias (byte*) init_buckets::screen#2 = (byte*) init_buckets::screen#5 (byte*) init_buckets::dist#2 Alias (word**) BUCKETS#6 = (word**) BUCKETS#9 Alias (byte*) BUCKET_IDX#1 = (byte*) BUCKET_IDX#4 -Alias (byte*) heap_head#51 = (byte*) heap_head#57 +Alias (byte*) heap_head#52 = (byte*) heap_head#58 Alias (byte*) heap_head#14 = (byte*) heap_head#31 (byte*) heap_head#42 Alias (byte*) init_angle_screen::screen_topline#0 = (byte*~) init_angle_screen::$0 Alias (byte*) init_angle_screen::screen_bottomline#0 = (byte*~) init_angle_screen::$1 @@ -2819,17 +2836,17 @@ Alias (word) atan2_16::return#2 = (word) atan2_16::return#4 Alias (word) init_angle_screen::angle_w#0 = (word~) init_angle_screen::$10 Alias (byte) init_angle_screen::ang_w#0 = (byte~) init_angle_screen::$12 Alias (byte*) init_dist_screen::screen#1 = (byte*) init_dist_screen::screen#2 (byte*) init_dist_screen::screen_topline#0 -Alias (byte) NUM_SQUARES#3 = (byte) NUM_SQUARES#52 +Alias (byte) NUM_SQUARES#3 = (byte) NUM_SQUARES#54 Alias (byte*) heap_head#15 = (byte*) heap_head#32 Alias (word*) SQUARES#14 = (word*) SQUARES#5 Alias (byte*) init_dist_screen::screen_bottomline#0 = (byte*~) init_dist_screen::$1 Alias (byte) init_dist_screen::y2#0 = (byte~) init_dist_screen::$2 (byte) init_dist_screen::y2#1 (byte) init_dist_screen::y2#2 -Alias (word*) SQUARES#29 = (word*) SQUARES#40 (word*) SQUARES#30 +Alias (word*) SQUARES#30 = (word*) SQUARES#41 (word*) SQUARES#31 Alias (byte*) init_dist_screen::screen_topline#11 = (byte*) init_dist_screen::screen_topline#14 (byte*) init_dist_screen::screen_topline#12 Alias (byte*) init_dist_screen::screen_bottomline#11 = (byte*) init_dist_screen::screen_bottomline#14 (byte*) init_dist_screen::screen_bottomline#12 Alias (byte) init_dist_screen::y#10 = (byte) init_dist_screen::y#9 (byte) init_dist_screen::y#2 -Alias (byte) NUM_SQUARES#42 = (byte) NUM_SQUARES#47 (byte) NUM_SQUARES#43 -Alias (byte*) heap_head#69 = (byte*) heap_head#75 (byte*) heap_head#70 +Alias (byte) NUM_SQUARES#44 = (byte) NUM_SQUARES#49 (byte) NUM_SQUARES#45 +Alias (byte*) heap_head#70 = (byte*) heap_head#76 (byte*) heap_head#71 Alias (byte~) init_dist_screen::$7 = (byte~) init_dist_screen::$6 Alias (byte~) init_dist_screen::$5 = (byte~) init_dist_screen::$4 Alias (byte) init_dist_screen::yd#0 = (byte~) init_dist_screen::$8 @@ -2837,33 +2854,33 @@ Alias (word) sqr::return#2 = (word) sqr::return#5 Alias (byte*) init_dist_screen::screen_topline#6 = (byte*) init_dist_screen::screen_topline#8 Alias (byte*) init_dist_screen::screen_bottomline#6 = (byte*) init_dist_screen::screen_bottomline#8 Alias (byte) init_dist_screen::y#5 = (byte) init_dist_screen::y#7 -Alias (byte) NUM_SQUARES#29 = (byte) NUM_SQUARES#37 -Alias (byte*) heap_head#58 = (byte*) heap_head#64 -Alias (word*) SQUARES#19 = (word*) SQUARES#41 +Alias (byte) NUM_SQUARES#31 = (byte) NUM_SQUARES#39 +Alias (byte*) heap_head#59 = (byte*) heap_head#65 +Alias (word*) SQUARES#19 = (word*) SQUARES#42 Alias (word) init_dist_screen::yds#0 = (word~) init_dist_screen::$9 Alias (byte) init_dist_screen::x#2 = (byte) init_dist_screen::x#3 (byte) init_dist_screen::x#7 (byte) init_dist_screen::x#8 -Alias (word*) SQUARES#15 = (word*) SQUARES#43 (word*) SQUARES#31 (word*) SQUARES#24 (word*) SQUARES#32 (word*) SQUARES#33 (word*) SQUARES#6 +Alias (word*) SQUARES#15 = (word*) SQUARES#44 (word*) SQUARES#32 (word*) SQUARES#24 (word*) SQUARES#33 (word*) SQUARES#34 (word*) SQUARES#6 Alias (word) init_dist_screen::yds#3 = (word) init_dist_screen::yds#5 (word) init_dist_screen::yds#6 (word) init_dist_screen::yds#4 -Alias (byte) NUM_SQUARES#11 = (byte) NUM_SQUARES#38 (byte) NUM_SQUARES#21 (byte) NUM_SQUARES#16 (byte) NUM_SQUARES#31 (byte) NUM_SQUARES#32 (byte) NUM_SQUARES#4 +Alias (byte) NUM_SQUARES#11 = (byte) NUM_SQUARES#40 (byte) NUM_SQUARES#23 (byte) NUM_SQUARES#18 (byte) NUM_SQUARES#33 (byte) NUM_SQUARES#34 (byte) NUM_SQUARES#4 Alias (byte*) init_dist_screen::screen_topline#10 = (byte*) init_dist_screen::screen_topline#13 (byte*) init_dist_screen::screen_topline#4 (byte*) init_dist_screen::screen_topline#2 (byte*) init_dist_screen::screen_topline#9 Alias (byte*) init_dist_screen::screen_bottomline#10 = (byte*) init_dist_screen::screen_bottomline#13 (byte*) init_dist_screen::screen_bottomline#4 (byte*) init_dist_screen::screen_bottomline#2 (byte*) init_dist_screen::screen_bottomline#9 Alias (byte) init_dist_screen::xb#5 = (byte) init_dist_screen::xb#7 (byte) init_dist_screen::xb#8 (byte) init_dist_screen::xb#6 Alias (byte) init_dist_screen::y#12 = (byte) init_dist_screen::y#14 (byte) init_dist_screen::y#4 (byte) init_dist_screen::y#3 (byte) init_dist_screen::y#13 -Alias (byte*) heap_head#16 = (byte*) heap_head#81 (byte*) heap_head#52 (byte*) heap_head#44 (byte*) heap_head#76 (byte*) heap_head#77 (byte*) heap_head#33 +Alias (byte*) heap_head#16 = (byte*) heap_head#82 (byte*) heap_head#53 (byte*) heap_head#44 (byte*) heap_head#77 (byte*) heap_head#78 (byte*) heap_head#33 Alias (byte) init_dist_screen::x2#0 = (byte~) init_dist_screen::$11 (byte) init_dist_screen::x2#1 (byte) init_dist_screen::x2#2 Alias (byte~) init_dist_screen::$16 = (byte~) init_dist_screen::$15 Alias (byte~) init_dist_screen::$14 = (byte~) init_dist_screen::$13 Alias (byte) init_dist_screen::xd#0 = (byte~) init_dist_screen::$17 Alias (word) sqr::return#3 = (word) sqr::return#6 Alias (word) init_dist_screen::yds#1 = (word) init_dist_screen::yds#2 (word) init_dist_screen::yds#7 -Alias (word*) SQUARES#18 = (word*) SQUARES#20 (word*) SQUARES#42 -Alias (byte) NUM_SQUARES#13 = (byte) NUM_SQUARES#22 (byte) NUM_SQUARES#30 +Alias (word*) SQUARES#18 = (word*) SQUARES#20 (word*) SQUARES#43 +Alias (byte) NUM_SQUARES#15 = (byte) NUM_SQUARES#24 (byte) NUM_SQUARES#32 Alias (byte*) init_dist_screen::screen_topline#3 = (byte*) init_dist_screen::screen_topline#5 (byte*) init_dist_screen::screen_topline#7 Alias (byte) init_dist_screen::x#4 = (byte) init_dist_screen::x#5 (byte) init_dist_screen::x#6 Alias (byte*) init_dist_screen::screen_bottomline#3 = (byte*) init_dist_screen::screen_bottomline#5 (byte*) init_dist_screen::screen_bottomline#7 Alias (byte) init_dist_screen::xb#2 = (byte) init_dist_screen::xb#3 (byte) init_dist_screen::xb#4 Alias (byte) init_dist_screen::y#11 = (byte) init_dist_screen::y#8 (byte) init_dist_screen::y#6 -Alias (byte*) heap_head#59 = (byte*) heap_head#65 (byte*) heap_head#71 +Alias (byte*) heap_head#60 = (byte*) heap_head#66 (byte*) heap_head#72 Alias (word) init_dist_screen::xds#0 = (word~) init_dist_screen::$18 Alias (word) init_dist_screen::ds#0 = (word~) init_dist_screen::$19 Alias (byte) sqrt::return#2 = (byte) sqrt::return#4 @@ -2889,34 +2906,35 @@ Alias (byte) main::bucket_size#1 = (byte) main::bucket_size#2 Alias (word*) main::bucket#1 = (word*) main::bucket#3 Alias (byte*) SCREEN_ANGLE#12 = (byte*) SCREEN_ANGLE#7 Alias (byte) main::bucket_idx#10 = (byte) main::bucket_idx#12 -Alias (byte) NUM_SQUARES#25 = (byte) NUM_SQUARES#45 -Alias (byte*) heap_head#53 = (byte*) heap_head#72 -Alias (word*) SQUARES#36 = (word*) SQUARES#52 +Alias (byte) NUM_SQUARES#27 = (byte) NUM_SQUARES#47 +Alias (byte*) heap_head#54 = (byte*) heap_head#73 +Alias (word*) SQUARES#37 = (word*) SQUARES#53 Alias (word**) BUCKETS#10 = (word**) BUCKETS#23 Alias (byte*) BUCKET_SIZES#13 = (byte*) BUCKET_SIZES#21 -Alias (word*) SQUARES#19 = (word*) SQUARES#29 +Alias (word*) SQUARES#19 = (word*) SQUARES#30 Alias (byte*) init_dist_screen::screen_topline#11 = (byte*) init_dist_screen::screen_topline#6 Alias (byte*) init_dist_screen::screen_bottomline#11 = (byte*) init_dist_screen::screen_bottomline#6 Alias (byte) init_dist_screen::y#10 = (byte) init_dist_screen::y#5 -Alias (byte) NUM_SQUARES#29 = (byte) NUM_SQUARES#42 -Alias (byte*) heap_head#58 = (byte*) heap_head#69 +Alias (byte) NUM_SQUARES#31 = (byte) NUM_SQUARES#44 +Alias (byte*) heap_head#59 = (byte*) heap_head#70 Alias (word*) SQUARES#15 = (word*) SQUARES#18 Alias (word) init_dist_screen::yds#1 = (word) init_dist_screen::yds#3 -Alias (byte) NUM_SQUARES#11 = (byte) NUM_SQUARES#13 +Alias (byte) NUM_SQUARES#11 = (byte) NUM_SQUARES#15 Alias (byte*) init_dist_screen::screen_topline#10 = (byte*) init_dist_screen::screen_topline#3 Alias (byte) init_dist_screen::x#2 = (byte) init_dist_screen::x#4 Alias (byte*) init_dist_screen::screen_bottomline#10 = (byte*) init_dist_screen::screen_bottomline#3 Alias (byte) init_dist_screen::xb#2 = (byte) init_dist_screen::xb#5 Alias (byte) init_dist_screen::y#11 = (byte) init_dist_screen::y#12 -Alias (byte*) heap_head#16 = (byte*) heap_head#59 +Alias (byte*) heap_head#16 = (byte*) heap_head#60 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) bsearch16u::num#7 (byte) bsearch16u::num#2 Identical Phi Values (word*) bsearch16u::items#7 (word*) bsearch16u::items#1 Identical Phi Values (word) bsearch16u::key#4 (word) bsearch16u::key#0 Identical Phi Values (word) bsearch16u::key#1 (word) bsearch16u::key#4 -Identical Phi Values (byte) NUM_SQUARES#6 (byte) NUM_SQUARES#3 +Identical Phi Values (byte) NUM_SQUARES#14 (byte) NUM_SQUARES#3 Identical Phi Values (byte*) heap_head#37 (byte*) heap_head#43 Identical Phi Values (byte*) heap_head#20 (byte*) heap_head#1 +Identical Phi Values (byte) NUM_SQUARES#13 (byte) NUM_SQUARES#14 Identical Phi Values (byte*) heap_head#21 (byte*) heap_head#20 Identical Phi Values (word*) SQUARES#17 (word*) SQUARES#1 Identical Phi Values (word) sqrt::val#1 (word) sqrt::val#0 @@ -2936,7 +2954,7 @@ Identical Phi Values (byte*) heap_head#24 (byte*) heap_head#1 Identical Phi Values (byte*) heap_head#25 (byte*) heap_head#1 Identical Phi Values (byte*) heap_head#26 (byte*) heap_head#1 Identical Phi Values (byte*) SCREEN_DIST#1 (byte*) SCREEN_DIST#0 -Identical Phi Values (byte) NUM_SQUARES#14 (byte) NUM_SQUARES#0 +Identical Phi Values (byte) NUM_SQUARES#16 (byte) NUM_SQUARES#0 Identical Phi Values (byte*) heap_head#39 (byte*) heap_head#26 Identical Phi Values (word*) SQUARES#21 (word*) SQUARES#0 Identical Phi Values (byte*) SCREEN_ANGLE#1 (byte*) SCREEN_ANGLE#0 @@ -2950,31 +2968,31 @@ Identical Phi Values (byte*) heap_head#11 (byte*) heap_head#14 Identical Phi Values (byte) main::bucket_idx#11 (byte) main::bucket_idx#6 Identical Phi Values (word**) BUCKETS#1 (word**) BUCKETS#7 Identical Phi Values (byte*) BUCKET_SIZES#1 (byte*) BUCKET_SIZES#10 -Identical Phi Values (byte) NUM_SQUARES#36 (byte) NUM_SQUARES#18 -Identical Phi Values (byte*) heap_head#61 (byte*) heap_head#47 -Identical Phi Values (word*) SQUARES#47 (word*) SQUARES#26 +Identical Phi Values (byte) NUM_SQUARES#38 (byte) NUM_SQUARES#20 +Identical Phi Values (byte*) heap_head#62 (byte*) heap_head#48 +Identical Phi Values (word*) SQUARES#48 (word*) SQUARES#27 Identical Phi Values (byte*) SCREEN_ANGLE#11 (byte*) SCREEN_ANGLE#15 Identical Phi Values (byte) main::bucket_size#1 (byte) main::bucket_size#0 Identical Phi Values (word*) main::bucket#1 (word*) main::bucket#0 Identical Phi Values (byte*) SCREEN_ANGLE#12 (byte*) SCREEN_ANGLE#11 Identical Phi Values (byte) main::bucket_idx#10 (byte) main::bucket_idx#11 -Identical Phi Values (byte) NUM_SQUARES#25 (byte) NUM_SQUARES#36 -Identical Phi Values (byte*) heap_head#53 (byte*) heap_head#61 -Identical Phi Values (word*) SQUARES#36 (word*) SQUARES#47 +Identical Phi Values (byte) NUM_SQUARES#27 (byte) NUM_SQUARES#38 +Identical Phi Values (byte*) heap_head#54 (byte*) heap_head#62 +Identical Phi Values (word*) SQUARES#37 (word*) SQUARES#48 Identical Phi Values (word**) BUCKETS#10 (word**) BUCKETS#1 Identical Phi Values (byte*) BUCKET_SIZES#13 (byte*) BUCKET_SIZES#1 Identical Phi Values (byte*) BUCKET_SIZES#6 (byte*) BUCKET_SIZES#11 Identical Phi Values (byte*) init_buckets::screen#6 (byte*) init_buckets::screen#0 -Identical Phi Values (byte*) heap_head#74 (byte*) heap_head#10 +Identical Phi Values (byte*) heap_head#75 (byte*) heap_head#10 Identical Phi Values (word**) BUCKETS#25 (word**) BUCKETS#12 Identical Phi Values (byte*) BUCKET_IDX#11 (byte*) BUCKET_IDX#12 Identical Phi Values (byte*) BUCKET_SIZES#2 (byte*) BUCKET_SIZES#6 Identical Phi Values (byte*) init_buckets::screen#1 (byte*) init_buckets::screen#6 -Identical Phi Values (byte*) heap_head#62 (byte*) heap_head#74 +Identical Phi Values (byte*) heap_head#63 (byte*) heap_head#75 Identical Phi Values (word**) BUCKETS#18 (word**) BUCKETS#25 Identical Phi Values (byte*) BUCKET_IDX#10 (byte*) BUCKET_IDX#11 Identical Phi Values (byte*) BUCKET_SIZES#3 (byte*) BUCKET_SIZES#2 -Identical Phi Values (byte*) heap_head#50 (byte*) heap_head#62 +Identical Phi Values (byte*) heap_head#51 (byte*) heap_head#63 Identical Phi Values (word**) BUCKETS#13 (word**) BUCKETS#18 Identical Phi Values (byte*) BUCKET_IDX#7 (byte*) BUCKET_IDX#10 Identical Phi Values (byte*) init_buckets::screen#10 (byte*) init_buckets::screen#1 @@ -2986,11 +3004,11 @@ Identical Phi Values (byte*) heap_head#13 (byte*) heap_head#1 Identical Phi Values (byte*) BUCKET_IDX#1 (byte*) BUCKET_IDX#3 Identical Phi Values (byte*) init_buckets::screen#2 (byte*) init_buckets::screen#7 Identical Phi Values (word**) BUCKETS#6 (word**) BUCKETS#14 -Identical Phi Values (byte*) heap_head#51 (byte*) heap_head#13 +Identical Phi Values (byte*) heap_head#52 (byte*) heap_head#13 Identical Phi Values (word**) BUCKETS#3 (word**) BUCKETS#6 Identical Phi Values (byte*) init_buckets::screen#3 (byte*) init_buckets::screen#2 Identical Phi Values (byte*) BUCKET_IDX#2 (byte*) BUCKET_IDX#1 -Identical Phi Values (byte*) heap_head#14 (byte*) heap_head#51 +Identical Phi Values (byte*) heap_head#14 (byte*) heap_head#52 Identical Phi Values (byte*) init_angle_screen::screen#1 (byte*) init_angle_screen::screen#0 Identical Phi Values (byte) init_angle_screen::y#2 (byte) init_angle_screen::y#5 Identical Phi Values (byte*) init_angle_screen::screen_topline#2 (byte*) init_angle_screen::screen_topline#6 @@ -3003,8 +3021,8 @@ Identical Phi Values (word*) SQUARES#14 (word*) SQUARES#17 Identical Phi Values (byte*) init_dist_screen::screen_topline#10 (byte*) init_dist_screen::screen_topline#11 Identical Phi Values (byte*) init_dist_screen::screen_bottomline#10 (byte*) init_dist_screen::screen_bottomline#11 Identical Phi Values (byte) init_dist_screen::y#11 (byte) init_dist_screen::y#10 -Identical Phi Values (byte) NUM_SQUARES#11 (byte) NUM_SQUARES#29 -Identical Phi Values (byte*) heap_head#16 (byte*) heap_head#58 +Identical Phi Values (byte) NUM_SQUARES#11 (byte) NUM_SQUARES#31 +Identical Phi Values (byte*) heap_head#16 (byte*) heap_head#59 Identical Phi Values (word*) SQUARES#15 (word*) SQUARES#19 Identical Phi Values (word) init_dist_screen::yds#1 (word) init_dist_screen::yds#0 Identical Phi Values (byte) NUM_SQUARES#12 (byte) NUM_SQUARES#10 @@ -3017,32 +3035,32 @@ Identical Phi Values (signed word) atan2_16::y#19 (signed word) atan2_16::y#0 Identical Phi Values (signed word) atan2_16::x#4 (signed word) atan2_16::x#17 Identical Phi Values (signed word) atan2_16::y#4 (signed word) atan2_16::y#19 Identical Phi Values (byte) main::bucket_idx#3 (byte) main::bucket_idx#6 -Identical Phi Values (byte) NUM_SQUARES#19 (byte) NUM_SQUARES#18 -Identical Phi Values (byte*) heap_head#48 (byte*) heap_head#47 -Identical Phi Values (word*) SQUARES#27 (word*) SQUARES#26 +Identical Phi Values (byte) NUM_SQUARES#21 (byte) NUM_SQUARES#20 +Identical Phi Values (byte*) heap_head#49 (byte*) heap_head#48 +Identical Phi Values (word*) SQUARES#28 (word*) SQUARES#27 Identical Phi Values (word**) BUCKETS#11 (word**) BUCKETS#7 Identical Phi Values (byte*) BUCKET_SIZES#14 (byte*) BUCKET_SIZES#10 Identical Phi Values (byte*) SCREEN_ANGLE#17 (byte*) SCREEN_ANGLE#15 Identical Phi Values (word*) SQUARES#19 (word*) SQUARES#1 -Identical Phi Values (byte) NUM_SQUARES#29 (byte) NUM_SQUARES#3 -Identical Phi Values (byte*) heap_head#58 (byte*) heap_head#1 +Identical Phi Values (byte) NUM_SQUARES#31 (byte) NUM_SQUARES#3 +Identical Phi Values (byte*) heap_head#59 (byte*) heap_head#1 Successful SSA optimization Pass2IdenticalPhiElimination Identical Phi Values (word**) BUCKETS#7 (word**) BUCKETS#0 Identical Phi Values (byte*) BUCKET_SIZES#10 (byte*) BUCKET_SIZES#0 -Identical Phi Values (byte) NUM_SQUARES#18 (byte) NUM_SQUARES#3 -Identical Phi Values (byte*) heap_head#47 (byte*) heap_head#1 -Identical Phi Values (word*) SQUARES#26 (word*) SQUARES#1 +Identical Phi Values (byte) NUM_SQUARES#20 (byte) NUM_SQUARES#3 +Identical Phi Values (byte*) heap_head#48 (byte*) heap_head#1 +Identical Phi Values (word*) SQUARES#27 (word*) SQUARES#1 Identical Phi Values (byte*) SCREEN_ANGLE#15 (byte*) SCREEN_ANGLE#0 -Identical Phi Values (byte) NUM_SQUARES#10 (byte) NUM_SQUARES#18 -Identical Phi Values (byte*) heap_head#12 (byte*) heap_head#47 -Identical Phi Values (word*) SQUARES#13 (word*) SQUARES#26 +Identical Phi Values (byte) NUM_SQUARES#10 (byte) NUM_SQUARES#20 +Identical Phi Values (byte*) heap_head#12 (byte*) heap_head#48 +Identical Phi Values (word*) SQUARES#13 (word*) SQUARES#27 Identical Phi Values (byte*) heap_head#36 (byte*) heap_head#1 Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) bsearch16u::$5 [13] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@7 Simple Condition (bool~) bsearch16u::$12 [25] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@9 Simple Condition (bool~) bsearch16u::$0 [28] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@1 Simple Condition (bool~) bsearch16u::$14 [32] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 -Simple Condition (bool~) init_squares::$5 [77] if((byte) init_squares::i#1!=rangelast(0,init_squares::$2)) goto init_squares::@1 +Simple Condition (bool~) init_squares::$2 [70] if((byte) init_squares::i#2<(byte) NUM_SQUARES#3) goto init_squares::@2 Simple Condition (bool~) atan2_16::$0 [107] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 Simple Condition (bool~) atan2_16::$5 [116] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 Simple Condition (bool~) atan2_16::$17 [129] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16 @@ -3187,21 +3205,9 @@ Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) $d Successful SSA optimization PassNFinalizeNumberTypeConversions Constant right-side identified [24] (word) malloc::size#0 ← (const byte) NUM_SQUARES#3 * (const byte) SIZEOF_WORD -Constant right-side identified [30] (byte~) init_squares::$2 ← (const byte) NUM_SQUARES#3 - (byte) 1 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) malloc::size#0 = NUM_SQUARES#3*SIZEOF_WORD -Constant (const byte) init_squares::$2 = NUM_SQUARES#3-1 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [37] init_squares::i#1 ← ++ init_squares::i#2 to ++ -Resolved ranged comparison value [38] if(init_squares::i#1!=rangelast(0,init_squares::$2)) goto init_squares::@1 to (const byte) init_squares::$2+(number) 1 -Adding number conversion cast (unumber) init_squares::$2+1 in if((byte) init_squares::i#1!=(const byte) init_squares::$2+(number) 1) goto init_squares::@1 -Adding number conversion cast (unumber) 1 in if((byte) init_squares::i#1!=(unumber)(const byte) init_squares::$2+(number) 1) goto init_squares::@1 -Successful SSA optimization PassNAddNumberTypeConversions -Simplifying constant integer cast (const byte) init_squares::$2+(unumber)(number) 1 -Simplifying constant integer cast 1 -Successful SSA optimization PassNCastSimplification -Finalized unsigned number type (byte) 1 -Successful SSA optimization PassNFinalizeNumberTypeConversions Inlining Noop Cast [3] (void*) malloc::return#0 ← (void*)(byte*) malloc::mem#0 keeping malloc::mem#0 Inlining Noop Cast [10] (signed word~) bsearch16u::$8 ← (signed word)(word) bsearch16u::key#0 keeping bsearch16u::key#0 Inlining Noop Cast [11] (signed word~) bsearch16u::$9 ← (signed word)*((word*) bsearch16u::pivot#0) keeping *(bsearch16u::pivot#0) @@ -3224,7 +3230,7 @@ Inlining Noop Cast [189] (signed word) init_angle_screen::xw#0 ← (signed word) Inlining Noop Cast [192] (signed word) init_angle_screen::yw#0 ← (signed word)(word~) init_angle_screen::$8 keeping init_angle_screen::yw#0 Successful SSA optimization Pass2NopCastInlining Rewriting multiplication to use shift [8] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 * (const byte) SIZEOF_WORD -Rewriting multiplication to use shift [32] (byte~) init_squares::$3 ← (byte) init_squares::i#2 * (byte) 2 +Rewriting multiplication to use shift [33] (byte~) init_squares::$3 ← (byte) init_squares::i#2 * (byte) 2 Rewriting multiplication to use shift [39] (byte~) sqr::$0 ← (byte) sqr::val#2 * (const byte) SIZEOF_WORD Rewriting division to use shift [48] (word~) sqrt::$1 ← (word~) sqrt::$3 / (const byte) SIZEOF_WORD Rewriting division to use shift [60] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 / (byte) 2 @@ -3297,10 +3303,8 @@ Constant inlined bsearch16u::$17 = (byte) 1*(const byte) SIZEOF_WORD Constant inlined bsearch16u::$18 = (byte) 1*(const byte) SIZEOF_WORD Constant inlined init_squares::i#0 = (byte) 0 Constant inlined heap_head#0 = (const byte*) HEAP_TOP -Constant inlined init_squares::$2 = (const byte) NUM_SQUARES#3-(byte) 1 Successful SSA optimization Pass2ConstantInlining Added new block during phi lifting bsearch16u::@18(between bsearch16u::@9 and bsearch16u::@10) -Added new block during phi lifting init_squares::@4(between init_squares::@1 and init_squares::@1) Added new block during phi lifting atan2_16::@34(between atan2_16::@27 and atan2_16::@15) Added new block during phi lifting atan2_16::@35(between atan2_16::@15 and atan2_16::@17) Added new block during phi lifting atan2_16::@36(between atan2_16::@27 and atan2_16::@17) @@ -3340,10 +3344,10 @@ Calls in [sqrt] to bsearch16u:288 Calls in [init_squares] to malloc:328 Created 54 initial phi equivalence classes -Coalesced [6] heap_head#82 ← heap_head#1 -Coalesced (already) [9] heap_head#83 ← heap_head#1 -Coalesced (already) [12] heap_head#84 ← heap_head#1 -Coalesced (already) [15] heap_head#85 ← heap_head#1 +Coalesced [6] heap_head#83 ← heap_head#1 +Coalesced (already) [9] heap_head#84 ← heap_head#1 +Coalesced (already) [12] heap_head#85 ← heap_head#1 +Coalesced (already) [15] heap_head#86 ← heap_head#1 Coalesced (already) [44] main::bucket_idx#15 ← main::bucket_idx#6 Coalesced [51] main::bucket_idx#16 ← main::bucket_idx#1 Coalesced [59] main::min_offset#10 ← main::offset#0 @@ -3356,7 +3360,7 @@ Coalesced (already) [67] main::min_angle#7 ← main::min_angle#2 Not coalescing [68] main::min_offset#11 ← main::min_offset#2 Coalesced (already) [69] main::min_angle#9 ← main::min_angle#2 Not coalescing [75] init_buckets::dist#6 ← init_buckets::screen#0 -Coalesced (already) [85] heap_head#86 ← heap_head#1 +Coalesced (already) [85] heap_head#87 ← heap_head#1 Coalesced [86] malloc::size#8 ← malloc::size#6 Not coalescing [99] init_buckets::dist#8 ← init_buckets::screen#0 Coalesced [114] init_buckets::dist#9 ← init_buckets::dist#3 @@ -3430,11 +3434,11 @@ Coalesced [319] bsearch16u::num#9 ← bsearch16u::num#0 Coalesced [320] bsearch16u::items#11 ← bsearch16u::items#8 Coalesced [321] bsearch16u::num#11 ← bsearch16u::num#3 Coalesced (already) [322] bsearch16u::items#13 ← bsearch16u::items#2 -Coalesced (already) [327] heap_head#87 ← heap_head#1 -Coalesced [331] init_squares::squares#4 ← init_squares::squares#0 -Coalesced [341] init_squares::sqr#3 ← init_squares::sqr#1 -Coalesced [342] init_squares::squares#3 ← init_squares::squares#1 -Coalesced [343] init_squares::i#3 ← init_squares::i#1 +Coalesced (already) [327] heap_head#88 ← heap_head#1 +Coalesced [331] init_squares::squares#5 ← init_squares::squares#0 +Coalesced [341] init_squares::i#4 ← init_squares::i#1 +Coalesced [342] init_squares::sqr#4 ← init_squares::sqr#1 +Coalesced [343] init_squares::squares#4 ← init_squares::squares#1 Coalesced down to 45 phi equivalence classes Culled Empty Block (label) @9 Culled Empty Block (label) @17 @@ -3459,7 +3463,6 @@ Culled Empty Block (label) atan2_16::@37 Culled Empty Block (label) init_dist_screen::@23 Culled Empty Block (label) bsearch16u::@1 Culled Empty Block (label) bsearch16u::@18 -Culled Empty Block (label) init_squares::@4 Renumbering block @22 to @1 Renumbering block @26 to @2 Renumbering block @27 to @3 @@ -3476,7 +3479,7 @@ Renumbering block bsearch16u::@9 to bsearch16u::@6 Renumbering block bsearch16u::@10 to bsearch16u::@7 Renumbering block bsearch16u::@13 to bsearch16u::@8 Renumbering block bsearch16u::@15 to bsearch16u::@9 -Renumbering block init_squares::@3 to init_squares::@2 +Renumbering block init_squares::@7 to init_squares::@3 Renumbering block sqrt::@2 to sqrt::@1 Renumbering block atan2_16::@13 to atan2_16::@9 Renumbering block atan2_16::@15 to atan2_16::@10 @@ -4018,26 +4021,28 @@ sqr::@return: scope:[sqr] from sqr init_squares: scope:[init_squares] from init_dist_screen [242] phi() [243] call malloc - to:init_squares::@2 -init_squares::@2: scope:[init_squares] from init_squares + to:init_squares::@3 +init_squares::@3: scope:[init_squares] from init_squares [244] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [245] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 to:init_squares::@1 -init_squares::@1: scope:[init_squares] from init_squares::@1 init_squares::@2 - [246] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@2/(byte) 0 ) - [246] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@2/(word*) init_squares::squares#0 ) - [246] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@2/(word) 0 ) - [247] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 - [248] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD - [249] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 - [250] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 - [251] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 - [252] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 - [253] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 +init_squares::@1: scope:[init_squares] from init_squares::@2 init_squares::@3 + [246] (word*) init_squares::squares#2 ← phi( init_squares::@2/(word*) init_squares::squares#1 init_squares::@3/(word*) init_squares::squares#0 ) + [246] (word) init_squares::sqr#2 ← phi( init_squares::@2/(word) init_squares::sqr#1 init_squares::@3/(word) 0 ) + [246] (byte) init_squares::i#2 ← phi( init_squares::@2/(byte) init_squares::i#1 init_squares::@3/(byte) 0 ) + [247] if((byte) init_squares::i#2<(const byte) NUM_SQUARES#3) goto init_squares::@2 to:init_squares::@return init_squares::@return: scope:[init_squares] from init_squares::@1 - [254] return + [248] return to:@return +init_squares::@2: scope:[init_squares] from init_squares::@1 + [249] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 + [250] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD + [251] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 + [252] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 + [253] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 + [254] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 + to:init_squares::@1 null depth in calling loop Loop head: init_buckets::@4 tails: init_buckets::@8 blocks: init_buckets::@8 init_buckets::@4 in scope malloc @@ -4254,15 +4259,15 @@ VARIABLE REGISTER WEIGHTS (byte~) init_squares::$3 22.0 (byte~) init_squares::$4 22.0 (byte) init_squares::i -(byte) init_squares::i#1 16.5 -(byte) init_squares::i#2 5.5 +(byte) init_squares::i#1 22.0 +(byte) init_squares::i#2 6.285714285714286 (word) init_squares::sqr -(word) init_squares::sqr#1 7.333333333333333 -(word) init_squares::sqr#2 6.6000000000000005 +(word) init_squares::sqr#1 11.0 +(word) init_squares::sqr#2 5.5 (word*) init_squares::squares (word*) init_squares::squares#0 4.0 -(word*) init_squares::squares#1 3.6666666666666665 -(word*) init_squares::squares#2 17.5 +(word*) init_squares::squares#1 4.4 +(word*) init_squares::squares#2 11.666666666666666 (void()) main() (byte~) main::$23 22.0 (byte~) main::$24 202.0 @@ -4361,9 +4366,9 @@ Initial phi equivalence classes [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] [ sqr::val#2 sqr::val#1 sqr::val#0 ] +[ init_squares::i#2 init_squares::i#1 ] [ init_squares::sqr#2 init_squares::sqr#1 ] [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] -[ init_squares::i#2 init_squares::i#1 ] Added variable SCREEN_DIST#0 to live range equivalence class [ SCREEN_DIST#0 ] Added variable SCREEN_ANGLE#0 to live range equivalence class [ SCREEN_ANGLE#0 ] Added variable BUCKET_SIZES#0 to live range equivalence class [ BUCKET_SIZES#0 ] @@ -4469,9 +4474,9 @@ Complete equivalence classes [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] [ sqr::val#2 sqr::val#1 sqr::val#0 ] +[ init_squares::i#2 init_squares::i#1 ] [ init_squares::sqr#2 init_squares::sqr#1 ] [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] -[ init_squares::i#2 init_squares::i#1 ] [ SCREEN_DIST#0 ] [ SCREEN_ANGLE#0 ] [ BUCKET_SIZES#0 ] @@ -4576,9 +4581,9 @@ Allocated zp[1]:54 [ init_dist_screen::xd#0 init_dist_screen::$16 init_dist_scre Allocated zp[2]:55 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] Allocated zp[1]:57 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] Allocated zp[1]:58 [ sqr::val#2 sqr::val#1 sqr::val#0 ] -Allocated zp[2]:59 [ init_squares::sqr#2 init_squares::sqr#1 ] -Allocated zp[2]:61 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] -Allocated zp[1]:63 [ init_squares::i#2 init_squares::i#1 ] +Allocated zp[1]:59 [ init_squares::i#2 init_squares::i#1 ] +Allocated zp[2]:60 [ init_squares::sqr#2 init_squares::sqr#1 ] +Allocated zp[2]:62 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] Allocated zp[2]:64 [ SCREEN_DIST#0 ] Allocated zp[2]:66 [ SCREEN_ANGLE#0 ] Allocated zp[2]:68 [ BUCKET_SIZES#0 ] @@ -6415,9 +6420,9 @@ sqr: { init_squares: { .label __3 = $ac .label __4 = $ad - .label squares = $3d - .label sqr = $3b - .label i = $3f + .label squares = $3e + .label sqr = $3c + .label i = $3b // [243] call malloc // [92] phi from init_squares to malloc [phi:init_squares->malloc] malloc_from_init_squares: @@ -6428,9 +6433,9 @@ init_squares: { sta.z malloc.size+1 // [92] phi (byte*) heap_head#18 = (byte*) heap_head#1 [phi:init_squares->malloc#1] -- register_copy jsr malloc - jmp __b2 - // init_squares::@2 - __b2: + jmp __b3 + // init_squares::@3 + __b3: // [244] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 -- pvoz1=pvoz2 lda.z malloc.mem sta.z SQUARES @@ -6441,34 +6446,39 @@ init_squares: { sta.z squares lda.z SQUARES+1 sta.z squares+1 - // [246] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] - __b1_from___b2: - // [246] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#0] -- vbuz1=vbuc1 - lda #0 - sta.z i - // [246] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@2->init_squares::@1#1] -- register_copy - // [246] phi (word) init_squares::sqr#2 = (word) 0 [phi:init_squares::@2->init_squares::@1#2] -- vwuz1=vwuc1 + // [246] phi from init_squares::@3 to init_squares::@1 [phi:init_squares::@3->init_squares::@1] + __b1_from___b3: + // [246] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@3->init_squares::@1#0] -- register_copy + // [246] phi (word) init_squares::sqr#2 = (word) 0 [phi:init_squares::@3->init_squares::@1#1] -- vwuz1=vwuc1 lda #<0 sta.z sqr lda #>0 sta.z sqr+1 - jmp __b1 - // [246] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] - __b1_from___b1: - // [246] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy - // [246] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy - // [246] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy + // [246] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@3->init_squares::@1#2] -- vbuz1=vbuc1 + lda #0 + sta.z i jmp __b1 // init_squares::@1 __b1: - // [247] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 + // [247] if((byte) init_squares::i#2<(const byte) NUM_SQUARES#3) goto init_squares::@2 -- vbuz1_lt_vbuc1_then_la1 + lda.z i + cmp #NUM_SQUARES + bcc __b2 + jmp __breturn + // init_squares::@return + __breturn: + // [248] return + rts + // init_squares::@2 + __b2: + // [249] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 ldy #0 lda.z sqr sta (squares),y iny lda.z sqr+1 sta (squares),y - // [248] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + // [250] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 lda #SIZEOF_WORD clc adc.z squares @@ -6476,15 +6486,15 @@ init_squares: { bcc !+ inc.z squares+1 !: - // [249] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + // [251] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda.z i asl sta.z __3 - // [250] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuz1=vbuz2_plus_1 + // [252] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuz1=vbuz2_plus_1 ldy.z __3 iny sty.z __4 - // [251] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuz2 + // [253] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuz2 lda.z __4 clc adc.z sqr @@ -6492,17 +6502,14 @@ init_squares: { bcc !+ inc.z sqr+1 !: - // [252] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuz1=_inc_vbuz1 + // [254] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuz1=_inc_vbuz1 inc.z i - // [253] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuz1_neq_vbuc1_then_la1 - lda #NUM_SQUARES-1+1 - cmp.z i - bne __b1_from___b1 - jmp __breturn - // init_squares::@return - __breturn: - // [254] return - rts + // [246] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] + __b1_from___b2: + // [246] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@2->init_squares::@1#0] -- register_copy + // [246] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@2->init_squares::@1#1] -- register_copy + // [246] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@2->init_squares::@1#2] -- register_copy + jmp __b1 } // File Data // Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ... @@ -6675,12 +6682,12 @@ Statement [239] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ SQUARES#1 sq Statement [240] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 SQUARES#1 ] ( main:13::init_dist_screen:17::sqr:179 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#11 init_dist_screen::screen_bottomline#11 sqr::return#0 SQUARES#1 ] main:13::init_dist_screen:17::sqr:194 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#11 init_dist_screen::screen_bottomline#11 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 SQUARES#1 ] ) always clobbers reg byte a reg byte y Statement [244] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [ heap_head#1 SQUARES#1 ] ( main:13::init_dist_screen:17::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 ] ) always clobbers reg byte a Statement [245] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 [ heap_head#1 SQUARES#1 init_squares::squares#0 ] ( main:13::init_dist_screen:17::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::squares#0 ] ) always clobbers reg byte a -Statement [247] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:13::init_dist_screen:17::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte a as potential for zp[1]:63 [ init_squares::i#2 init_squares::i#1 ] -Removing always clobbered register reg byte y as potential for zp[1]:63 [ init_squares::i#2 init_squares::i#1 ] -Statement [248] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:13::init_dist_screen:17::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [249] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:13::init_dist_screen:17::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a -Statement [251] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:13::init_dist_screen:17::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [249] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#2 ] ( main:13::init_dist_screen:17::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#2 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte a as potential for zp[1]:59 [ init_squares::i#2 init_squares::i#1 ] +Removing always clobbered register reg byte y as potential for zp[1]:59 [ init_squares::i#2 init_squares::i#1 ] +Statement [250] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 ] ( main:13::init_dist_screen:17::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [251] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 init_squares::$3 ] ( main:13::init_dist_screen:17::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a +Statement [253] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:13::init_dist_screen:17::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a Statement [3] (void*) SCREEN_DIST#0 ← (void*)(byte*) malloc::mem#0 [ SCREEN_DIST#0 heap_head#1 ] ( [ SCREEN_DIST#0 heap_head#1 ] ) always clobbers reg byte a Statement [5] (void*) SCREEN_ANGLE#0 ← (void*)(byte*) malloc::mem#0 [ SCREEN_DIST#0 SCREEN_ANGLE#0 heap_head#1 ] ( [ SCREEN_DIST#0 SCREEN_ANGLE#0 heap_head#1 ] ) always clobbers reg byte a Statement [7] (void*) BUCKET_SIZES#0 ← (void*)(byte*) malloc::mem#0 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 heap_head#1 ] ( [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 heap_head#1 ] ) always clobbers reg byte a @@ -6819,10 +6826,10 @@ Statement [239] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ SQUARES#1 sq Statement [240] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 SQUARES#1 ] ( main:13::init_dist_screen:17::sqr:179 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#11 init_dist_screen::screen_bottomline#11 sqr::return#0 SQUARES#1 ] main:13::init_dist_screen:17::sqr:194 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#11 init_dist_screen::screen_bottomline#11 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 SQUARES#1 ] ) always clobbers reg byte a reg byte y Statement [244] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [ heap_head#1 SQUARES#1 ] ( main:13::init_dist_screen:17::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 ] ) always clobbers reg byte a Statement [245] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 [ heap_head#1 SQUARES#1 init_squares::squares#0 ] ( main:13::init_dist_screen:17::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::squares#0 ] ) always clobbers reg byte a -Statement [247] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:13::init_dist_screen:17::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y -Statement [248] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:13::init_dist_screen:17::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [249] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:13::init_dist_screen:17::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a -Statement [251] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:13::init_dist_screen:17::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [249] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#2 ] ( main:13::init_dist_screen:17::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#2 ] ) always clobbers reg byte a reg byte y +Statement [250] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 ] ( main:13::init_dist_screen:17::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [251] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 init_squares::$3 ] ( main:13::init_dist_screen:17::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a +Statement [253] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:13::init_dist_screen:17::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a Statement [3] (void*) SCREEN_DIST#0 ← (void*)(byte*) malloc::mem#0 [ SCREEN_DIST#0 heap_head#1 ] ( [ SCREEN_DIST#0 heap_head#1 ] ) always clobbers reg byte a Statement [5] (void*) SCREEN_ANGLE#0 ← (void*)(byte*) malloc::mem#0 [ SCREEN_DIST#0 SCREEN_ANGLE#0 heap_head#1 ] ( [ SCREEN_DIST#0 SCREEN_ANGLE#0 heap_head#1 ] ) always clobbers reg byte a Statement [7] (void*) BUCKET_SIZES#0 ← (void*)(byte*) malloc::mem#0 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 heap_head#1 ] ( [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 heap_head#1 ] ) always clobbers reg byte a @@ -6960,10 +6967,10 @@ Statement [239] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ SQUARES#1 sq Statement [240] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 SQUARES#1 ] ( main:13::init_dist_screen:17::sqr:179 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#11 init_dist_screen::screen_bottomline#11 sqr::return#0 SQUARES#1 ] main:13::init_dist_screen:17::sqr:194 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 heap_head#1 init_dist_screen::y#10 init_dist_screen::screen_topline#11 init_dist_screen::screen_bottomline#11 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 SQUARES#1 ] ) always clobbers reg byte a reg byte y Statement [244] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [ heap_head#1 SQUARES#1 ] ( main:13::init_dist_screen:17::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 ] ) always clobbers reg byte a Statement [245] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 [ heap_head#1 SQUARES#1 init_squares::squares#0 ] ( main:13::init_dist_screen:17::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::squares#0 ] ) always clobbers reg byte a -Statement [247] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:13::init_dist_screen:17::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y -Statement [248] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:13::init_dist_screen:17::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [249] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:13::init_dist_screen:17::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a -Statement [251] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:13::init_dist_screen:17::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [249] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#2 ] ( main:13::init_dist_screen:17::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#2 ] ) always clobbers reg byte a reg byte y +Statement [250] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 ] ( main:13::init_dist_screen:17::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [251] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 init_squares::$3 ] ( main:13::init_dist_screen:17::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a +Statement [253] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:13::init_dist_screen:17::init_squares:171 [ SCREEN_DIST#0 SCREEN_ANGLE#0 BUCKET_SIZES#0 BUCKETS#0 BUCKET_IDX#0 init_dist_screen::screen#0 heap_head#1 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a Potential registers zp[1]:2 [ main::bucket_idx#6 main::bucket_idx#1 ] : zp[1]:2 , reg byte x , Potential registers zp[1]:3 [ main::i#2 main::i#1 ] : zp[1]:3 , reg byte x , Potential registers zp[2]:4 [ main::min_offset#2 main::min_offset#8 ] : zp[2]:4 , @@ -7001,9 +7008,9 @@ Potential registers zp[1]:54 [ init_dist_screen::xd#0 init_dist_screen::$16 init Potential registers zp[2]:55 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] : zp[2]:55 , Potential registers zp[1]:57 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] : zp[1]:57 , reg byte x , Potential registers zp[1]:58 [ sqr::val#2 sqr::val#1 sqr::val#0 ] : zp[1]:58 , reg byte a , reg byte x , reg byte y , -Potential registers zp[2]:59 [ init_squares::sqr#2 init_squares::sqr#1 ] : zp[2]:59 , -Potential registers zp[2]:61 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] : zp[2]:61 , -Potential registers zp[1]:63 [ init_squares::i#2 init_squares::i#1 ] : zp[1]:63 , reg byte x , +Potential registers zp[1]:59 [ init_squares::i#2 init_squares::i#1 ] : zp[1]:59 , reg byte x , +Potential registers zp[2]:60 [ init_squares::sqr#2 init_squares::sqr#1 ] : zp[2]:60 , +Potential registers zp[2]:62 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] : zp[2]:62 , Potential registers zp[2]:64 [ SCREEN_DIST#0 ] : zp[2]:64 , Potential registers zp[2]:66 [ SCREEN_ANGLE#0 ] : zp[2]:66 , Potential registers zp[2]:68 [ BUCKET_SIZES#0 ] : zp[2]:68 , @@ -7081,7 +7088,7 @@ Uplift Scope [init_dist_screen] 707: zp[1]:54 [ init_dist_screen::xd#0 init_dist Uplift Scope [sqr] 338: zp[1]:58 [ sqr::val#2 sqr::val#1 sqr::val#0 ] 202: zp[2]:140 [ sqr::return#3 ] 28.5: zp[2]:168 [ sqr::return#0 ] 22: zp[2]:135 [ sqr::return#2 ] 4: zp[1]:167 [ sqr::$0 ] Uplift Scope [init_buckets] 34.33: zp[2]:10 [ init_buckets::dist#4 init_buckets::dist#6 init_buckets::dist#1 ] 33: zp[1]:9 [ init_buckets::i#2 init_buckets::i#1 ] 33: zp[1]:16 [ init_buckets::i3#2 init_buckets::i3#1 ] 23.83: zp[2]:12 [ init_buckets::i1#2 init_buckets::i1#1 ] 22: zp[2]:14 [ init_buckets::i2#2 init_buckets::i2#1 ] 22: zp[2]:89 [ init_buckets::$15 ] 22: zp[2]:93 [ init_buckets::$12 ] 22: zp[2]:95 [ init_buckets::$16 ] 22: zp[2]:98 [ init_buckets::$7 ] 22: zp[2]:100 [ init_buckets::$13 ] 22: zp[2]:102 [ init_buckets::$17 ] 22: zp[1]:108 [ init_buckets::$14 ] 18.5: zp[2]:19 [ init_buckets::i4#2 init_buckets::i4#1 ] 15.93: zp[2]:17 [ init_buckets::dist#5 init_buckets::dist#8 init_buckets::dist#3 ] 11: zp[2]:106 [ init_buckets::$8 ] 7.33: zp[2]:104 [ init_buckets::bucket#0 ] 5.5: zp[1]:97 [ init_buckets::distance#0 ] 3.67: zp[2]:91 [ init_buckets::$4 ] 0.43: zp[2]:76 [ init_buckets::screen#0 ] Uplift Scope [sqrt] 202: zp[1]:148 [ sqrt::return#2 ] 103: zp[2]:146 [ sqrt::val#0 ] 34.33: zp[1]:160 [ sqrt::return#0 ] 4: zp[2]:154 [ sqrt::found#0 ] 4: zp[2]:156 [ sqrt::$3 ] 2: zp[2]:158 [ sqrt::$1 ] -Uplift Scope [init_squares] 25.17: zp[2]:61 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] 22: zp[1]:63 [ init_squares::i#2 init_squares::i#1 ] 22: zp[1]:172 [ init_squares::$3 ] 22: zp[1]:173 [ init_squares::$4 ] 13.93: zp[2]:59 [ init_squares::sqr#2 init_squares::sqr#1 ] +Uplift Scope [init_squares] 28.29: zp[1]:59 [ init_squares::i#2 init_squares::i#1 ] 22: zp[1]:172 [ init_squares::$3 ] 22: zp[1]:173 [ init_squares::$4 ] 20.07: zp[2]:62 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] 16.5: zp[2]:60 [ init_squares::sqr#2 init_squares::sqr#1 ] Uplift Scope [malloc] 35: zp[2]:23 [ malloc::size#7 malloc::size#6 ] 0.4: zp[2]:109 [ malloc::mem#0 ] Uplift Scope [] 23.25: zp[2]:21 [ heap_head#18 heap_head#1 ] 0.13: zp[2]:64 [ SCREEN_DIST#0 ] 0.05: zp[2]:66 [ SCREEN_ANGLE#0 ] 0.04: zp[2]:72 [ BUCKET_IDX#0 ] 0.03: zp[2]:170 [ SQUARES#1 ] 0.03: zp[2]:70 [ BUCKETS#0 ] 0.02: zp[2]:68 [ BUCKET_SIZES#0 ] Uplift Scope [RADIX] @@ -7098,7 +7105,7 @@ Limited combination testing to 100 combinations of 6144 possible. Uplifting [sqr] best 1228399 combination reg byte a [ sqr::val#2 sqr::val#1 sqr::val#0 ] zp[2]:140 [ sqr::return#3 ] zp[2]:168 [ sqr::return#0 ] zp[2]:135 [ sqr::return#2 ] reg byte a [ sqr::$0 ] Uplifting [init_buckets] best 1228119 combination zp[2]:10 [ init_buckets::dist#4 init_buckets::dist#6 init_buckets::dist#1 ] reg byte y [ init_buckets::i#2 init_buckets::i#1 ] reg byte y [ init_buckets::i3#2 init_buckets::i3#1 ] zp[2]:12 [ init_buckets::i1#2 init_buckets::i1#1 ] zp[2]:14 [ init_buckets::i2#2 init_buckets::i2#1 ] zp[2]:89 [ init_buckets::$15 ] zp[2]:93 [ init_buckets::$12 ] zp[2]:95 [ init_buckets::$16 ] zp[2]:98 [ init_buckets::$7 ] zp[2]:100 [ init_buckets::$13 ] zp[2]:102 [ init_buckets::$17 ] reg byte a [ init_buckets::$14 ] zp[2]:19 [ init_buckets::i4#2 init_buckets::i4#1 ] zp[2]:17 [ init_buckets::dist#5 init_buckets::dist#8 init_buckets::dist#3 ] zp[2]:106 [ init_buckets::$8 ] zp[2]:104 [ init_buckets::bucket#0 ] zp[1]:97 [ init_buckets::distance#0 ] zp[2]:91 [ init_buckets::$4 ] zp[2]:76 [ init_buckets::screen#0 ] Uplifting [sqrt] best 1227216 combination reg byte a [ sqrt::return#2 ] zp[2]:146 [ sqrt::val#0 ] reg byte a [ sqrt::return#0 ] zp[2]:154 [ sqrt::found#0 ] zp[2]:156 [ sqrt::$3 ] zp[2]:158 [ sqrt::$1 ] -Uplifting [init_squares] best 1227016 combination zp[2]:61 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] reg byte x [ init_squares::i#2 init_squares::i#1 ] reg byte a [ init_squares::$3 ] reg byte a [ init_squares::$4 ] zp[2]:59 [ init_squares::sqr#2 init_squares::sqr#1 ] +Uplifting [init_squares] best 1227016 combination reg byte x [ init_squares::i#2 init_squares::i#1 ] reg byte a [ init_squares::$3 ] reg byte a [ init_squares::$4 ] zp[2]:62 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] zp[2]:60 [ init_squares::sqr#2 init_squares::sqr#1 ] Uplifting [malloc] best 1227016 combination zp[2]:23 [ malloc::size#7 malloc::size#6 ] zp[2]:109 [ malloc::mem#0 ] Uplifting [] best 1227016 combination zp[2]:21 [ heap_head#18 heap_head#1 ] zp[2]:64 [ SCREEN_DIST#0 ] zp[2]:66 [ SCREEN_ANGLE#0 ] zp[2]:72 [ BUCKET_IDX#0 ] zp[2]:170 [ SQUARES#1 ] zp[2]:70 [ BUCKETS#0 ] zp[2]:68 [ BUCKET_SIZES#0 ] Uplifting [RADIX] best 1227016 combination @@ -7173,8 +7180,8 @@ Coalescing zero page register [ zp[1]:46 [ init_dist_screen::y#10 init_dist_scre Coalescing zero page register [ zp[2]:47 [ init_dist_screen::screen_topline#11 init_dist_screen::screen#0 init_dist_screen::screen_topline#1 ] ] with [ zp[2]:34 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] ] Coalescing zero page register [ zp[2]:49 [ init_dist_screen::screen_bottomline#11 init_dist_screen::screen_bottomline#0 init_dist_screen::screen_bottomline#1 ] ] with [ zp[2]:37 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$11 ] ] Coalescing zero page register [ zp[2]:55 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 ] ] with [ zp[2]:42 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] ] -Coalescing zero page register [ zp[2]:59 [ init_squares::sqr#2 init_squares::sqr#1 ] ] with [ zp[2]:44 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] ] -Coalescing zero page register [ zp[2]:79 [ main::bucket#0 ] ] with [ zp[2]:61 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] ] +Coalescing zero page register [ zp[2]:60 [ init_squares::sqr#2 init_squares::sqr#1 ] ] with [ zp[2]:44 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] ] +Coalescing zero page register [ zp[2]:79 [ main::bucket#0 ] ] with [ zp[2]:62 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] ] Coalescing zero page register [ zp[1]:81 [ main::bucket_size#0 ] ] with [ zp[1]:52 [ init_dist_screen::x#2 init_dist_screen::x#1 ] ] Coalescing zero page register [ zp[2]:85 [ main::fill#0 ] ] with [ zp[2]:64 [ SCREEN_DIST#0 init_buckets::screen#0 ] ] Coalescing zero page register [ zp[2]:87 [ main::angle#0 ] ] with [ zp[2]:72 [ BUCKET_IDX#0 ] ] @@ -7187,7 +7194,7 @@ Coalescing zero page register [ zp[2]:49 [ init_dist_screen::screen_bottomline#1 Coalescing zero page register [ zp[2]:79 [ main::bucket#0 init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] ] with [ zp[2]:26 [ init_angle_screen::screen_topline#6 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 init_buckets::i2#2 init_buckets::i2#1 ] ] Coalescing zero page register [ zp[1]:97 [ init_buckets::distance#0 init_dist_screen::xb#2 init_dist_screen::xb#1 ] ] with [ zp[1]:25 [ init_angle_screen::y#5 init_angle_screen::y#1 main::bucket_idx#6 main::bucket_idx#1 ] ] Coalescing zero page register [ zp[1]:128 [ init_angle_screen::ang_w#0 ] ] with [ zp[1]:81 [ main::bucket_size#0 init_dist_screen::x#2 init_dist_screen::x#1 ] ] -Coalescing zero page register [ zp[2]:135 [ sqr::return#2 init_dist_screen::yds#0 init_buckets::$8 ] ] with [ zp[2]:59 [ init_squares::sqr#2 init_squares::sqr#1 atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] ] +Coalescing zero page register [ zp[2]:135 [ sqr::return#2 init_dist_screen::yds#0 init_buckets::$8 ] ] with [ zp[2]:60 [ init_squares::sqr#2 init_squares::sqr#1 atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] ] Coalescing zero page register [ zp[2]:140 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 ] ] with [ zp[2]:28 [ init_angle_screen::screen_bottomline#6 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 init_buckets::i4#2 init_buckets::i4#1 ] ] Coalescing zero page register [ zp[2]:163 [ bsearch16u::pivot#0 ] ] with [ zp[2]:113 [ init_angle_screen::xw#0 atan2_16::x#0 init_buckets::$12 init_buckets::$16 ] ] Coalescing zero page register [ zp[2]:165 [ bsearch16u::result#0 ] ] with [ zp[2]:116 [ init_angle_screen::yw#0 atan2_16::y#0 init_buckets::$7 init_buckets::$13 init_buckets::$17 init_buckets::bucket#0 ] ] @@ -8837,42 +8844,46 @@ init_squares: { sta.z malloc.size+1 // [92] phi (byte*) heap_head#18 = (byte*) heap_head#1 [phi:init_squares->malloc#1] -- register_copy jsr malloc - jmp __b2 - // init_squares::@2 - __b2: + jmp __b3 + // init_squares::@3 + __b3: // [244] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 // [245] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 lda.z SQUARES sta.z squares lda.z SQUARES+1 sta.z squares+1 - // [246] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] - __b1_from___b2: - // [246] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#0] -- vbuxx=vbuc1 - ldx #0 - // [246] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@2->init_squares::@1#1] -- register_copy - // [246] phi (word) init_squares::sqr#2 = (word) 0 [phi:init_squares::@2->init_squares::@1#2] -- vwuz1=vwuc1 + // [246] phi from init_squares::@3 to init_squares::@1 [phi:init_squares::@3->init_squares::@1] + __b1_from___b3: + // [246] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@3->init_squares::@1#0] -- register_copy + // [246] phi (word) init_squares::sqr#2 = (word) 0 [phi:init_squares::@3->init_squares::@1#1] -- vwuz1=vwuc1 lda #<0 sta.z sqr lda #>0 sta.z sqr+1 - jmp __b1 - // [246] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] - __b1_from___b1: - // [246] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy - // [246] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy - // [246] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy + // [246] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@3->init_squares::@1#2] -- vbuxx=vbuc1 + ldx #0 jmp __b1 // init_squares::@1 __b1: - // [247] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 + // [247] if((byte) init_squares::i#2<(const byte) NUM_SQUARES#3) goto init_squares::@2 -- vbuxx_lt_vbuc1_then_la1 + cpx #NUM_SQUARES + bcc __b2 + jmp __breturn + // init_squares::@return + __breturn: + // [248] return + rts + // init_squares::@2 + __b2: + // [249] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 ldy #0 lda.z sqr sta (squares),y iny lda.z sqr+1 sta (squares),y - // [248] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + // [250] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 lda #SIZEOF_WORD clc adc.z squares @@ -8880,29 +8891,27 @@ init_squares: { bcc !+ inc.z squares+1 !: - // [249] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + // [251] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 txa asl - // [250] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuaa=vbuaa_plus_1 + // [252] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuaa=vbuaa_plus_1 clc adc #1 - // [251] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuaa + // [253] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuaa clc adc.z sqr sta.z sqr bcc !+ inc.z sqr+1 !: - // [252] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuxx=_inc_vbuxx + // [254] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuxx=_inc_vbuxx inx - // [253] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuxx_neq_vbuc1_then_la1 - cpx #NUM_SQUARES-1+1 - bne __b1_from___b1 - jmp __breturn - // init_squares::@return - __breturn: - // [254] return - rts + // [246] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] + __b1_from___b2: + // [246] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@2->init_squares::@1#0] -- register_copy + // [246] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@2->init_squares::@1#1] -- register_copy + // [246] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@2->init_squares::@1#2] -- register_copy + jmp __b1 } // File Data // Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ... @@ -8988,7 +8997,7 @@ Removing instruction jmp __b8 Removing instruction jmp __b9 Removing instruction jmp __b7 Removing instruction jmp __breturn -Removing instruction jmp __b2 +Removing instruction jmp __b3 Removing instruction jmp __b1 Removing instruction jmp __breturn Succesful ASM optimization Pass5NextJumpElimination @@ -9010,8 +9019,8 @@ Replacing instruction ldx #0 with TAX Removing instruction ldy.z x Removing instruction ldy.z xb Removing instruction lda.z result+1 -Replacing instruction lda #<0 with TXA Removing instruction lda #>0 +Replacing instruction ldx #0 with TAX Succesful ASM optimization Pass5UnnecesaryLoadElimination Replacing label __bbegin with __b1 Replacing label __b1 with __b2 @@ -9042,7 +9051,6 @@ Replacing label __b2_from___b5 with __b2 Replacing label __breturn_from___b8 with __b2 Replacing label __b7_from___b6 with __b7 Replacing label __b7_from___b6 with __b7 -Replacing label __b1_from___b1 with __b1 Removing instruction __bbegin: Removing instruction __b1_from___bbegin: Removing instruction malloc_from___b1: @@ -9094,7 +9102,6 @@ Removing instruction __breturn_from___b8: Removing instruction __breturn: Removing instruction __b7_from___b6: Removing instruction __b7_from___b9: -Removing instruction __b1_from___b1: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction __b3: Removing instruction malloc_from___b3: @@ -9165,9 +9172,10 @@ Removing instruction __b9: Removing instruction __b3_from___b7: Removing instruction __breturn: Removing instruction malloc_from_init_squares: -Removing instruction __b2: -Removing instruction __b1_from___b2: +Removing instruction __b3: +Removing instruction __b1_from___b3: Removing instruction __breturn: +Removing instruction __b1_from___b2: Succesful ASM optimization Pass5UnusedLabelElimination Skipping double jump to __b2 in jmp __b1_from___b12 Replacing jump to rts with rts in jmp __b2 @@ -9183,7 +9191,6 @@ Removing instruction jmp __b5 Removing instruction jmp __b7 Removing instruction jmp __b1 Removing instruction jmp __b1 -Removing instruction jmp __b1 Succesful ASM optimization Pass5NextJumpElimination Removing instruction ldy #0 Succesful ASM optimization Pass5UnnecesaryLoadElimination @@ -9497,17 +9504,18 @@ FINAL SYMBOL TABLE (byte~) init_squares::$4 reg byte a 22.0 (label) init_squares::@1 (label) init_squares::@2 +(label) init_squares::@3 (label) init_squares::@return (byte) init_squares::i -(byte) init_squares::i#1 reg byte x 16.5 -(byte) init_squares::i#2 reg byte x 5.5 +(byte) init_squares::i#1 reg byte x 22.0 +(byte) init_squares::i#2 reg byte x 6.285714285714286 (word) init_squares::sqr -(word) init_squares::sqr#1 sqr zp[2]:28 7.333333333333333 -(word) init_squares::sqr#2 sqr zp[2]:28 6.6000000000000005 +(word) init_squares::sqr#1 sqr zp[2]:28 11.0 +(word) init_squares::sqr#2 sqr zp[2]:28 5.5 (word*) init_squares::squares (word*) init_squares::squares#0 squares zp[2]:20 4.0 -(word*) init_squares::squares#1 squares zp[2]:20 3.6666666666666665 -(word*) init_squares::squares#2 squares zp[2]:20 17.5 +(word*) init_squares::squares#1 squares zp[2]:20 4.4 +(word*) init_squares::squares#2 squares zp[2]:20 11.666666666666666 (void()) main() (byte~) main::$23 reg byte a 22.0 (byte~) main::$24 reg byte a 202.0 @@ -9643,7 +9651,7 @@ reg byte a [ init_squares::$4 ] FINAL ASSEMBLER -Score: 1116684 +Score: 1116714 // File Comments // Fill screen using a spiral based on distance-to-center / angle-to-center @@ -11210,7 +11218,7 @@ init_squares: { sta.z malloc.size+1 // [92] phi (byte*) heap_head#18 = (byte*) heap_head#1 [phi:init_squares->malloc#1] -- register_copy jsr malloc - // init_squares::@2 + // init_squares::@3 // malloc(NUM_SQUARES*sizeof(word)) // [244] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 // squares = SQUARES @@ -11219,22 +11227,28 @@ init_squares: { sta.z squares lda.z SQUARES+1 sta.z squares+1 - // [246] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] - // [246] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#0] -- vbuxx=vbuc1 - ldx #0 - // [246] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@2->init_squares::@1#1] -- register_copy - // [246] phi (word) init_squares::sqr#2 = (word) 0 [phi:init_squares::@2->init_squares::@1#2] -- vwuz1=vwuc1 - txa + // [246] phi from init_squares::@3 to init_squares::@1 [phi:init_squares::@3->init_squares::@1] + // [246] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@3->init_squares::@1#0] -- register_copy + // [246] phi (word) init_squares::sqr#2 = (word) 0 [phi:init_squares::@3->init_squares::@1#1] -- vwuz1=vwuc1 + lda #<0 sta.z sqr sta.z sqr+1 - // [246] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] - // [246] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy - // [246] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy - // [246] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy + // [246] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@3->init_squares::@1#2] -- vbuxx=vbuc1 + tax // init_squares::@1 __b1: + // for(byte i=0;iinit_squares::@1] + // [246] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@2->init_squares::@1#0] -- register_copy + // [246] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@2->init_squares::@1#1] -- register_copy + // [246] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@2->init_squares::@1#2] -- register_copy + jmp __b1 } // File Data // Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ... diff --git a/src/test/ref/screen-show-spiral-buckets.sym b/src/test/ref/screen-show-spiral-buckets.sym index 73e0c5423..b313c8ace 100644 --- a/src/test/ref/screen-show-spiral-buckets.sym +++ b/src/test/ref/screen-show-spiral-buckets.sym @@ -301,17 +301,18 @@ (byte~) init_squares::$4 reg byte a 22.0 (label) init_squares::@1 (label) init_squares::@2 +(label) init_squares::@3 (label) init_squares::@return (byte) init_squares::i -(byte) init_squares::i#1 reg byte x 16.5 -(byte) init_squares::i#2 reg byte x 5.5 +(byte) init_squares::i#1 reg byte x 22.0 +(byte) init_squares::i#2 reg byte x 6.285714285714286 (word) init_squares::sqr -(word) init_squares::sqr#1 sqr zp[2]:28 7.333333333333333 -(word) init_squares::sqr#2 sqr zp[2]:28 6.6000000000000005 +(word) init_squares::sqr#1 sqr zp[2]:28 11.0 +(word) init_squares::sqr#2 sqr zp[2]:28 5.5 (word*) init_squares::squares (word*) init_squares::squares#0 squares zp[2]:20 4.0 -(word*) init_squares::squares#1 squares zp[2]:20 3.6666666666666665 -(word*) init_squares::squares#2 squares zp[2]:20 17.5 +(word*) init_squares::squares#1 squares zp[2]:20 4.4 +(word*) init_squares::squares#2 squares zp[2]:20 11.666666666666666 (void()) main() (byte~) main::$23 reg byte a 22.0 (byte~) main::$24 reg byte a 202.0 diff --git a/src/test/ref/screen-show-spiral.asm b/src/test/ref/screen-show-spiral.asm index 7bd11f7d8..4c5c5dc20 100644 --- a/src/test/ref/screen-show-spiral.asm +++ b/src/test/ref/screen-show-spiral.asm @@ -688,11 +688,15 @@ init_squares: { sta.z squares lda.z SQUARES+1 sta.z squares+1 - ldx #0 - txa + lda #<0 sta.z sqr sta.z sqr+1 + tax __b1: + cpx #NUM_SQUARES + bcc __b2 + rts + __b2: ldy #0 lda.z sqr sta (squares),y @@ -717,9 +721,7 @@ init_squares: { inc.z sqr+1 !: inx - cpx #NUM_SQUARES-1+1 - bne __b1 - rts + jmp __b1 } // Allocates a block of size bytes of memory, returning a pointer to the beginning of the block. // The content of the newly allocated block of memory is not initialized, remaining with indeterminate values. diff --git a/src/test/ref/screen-show-spiral.cfg b/src/test/ref/screen-show-spiral.cfg index 11b59dba7..4bfcf0eaa 100644 --- a/src/test/ref/screen-show-spiral.cfg +++ b/src/test/ref/screen-show-spiral.cfg @@ -376,26 +376,28 @@ sqr::@return: scope:[sqr] from sqr init_squares: scope:[init_squares] from init_dist_screen [177] phi() [178] call malloc - to:init_squares::@2 -init_squares::@2: scope:[init_squares] from init_squares + to:init_squares::@3 +init_squares::@3: scope:[init_squares] from init_squares [179] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [180] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 to:init_squares::@1 -init_squares::@1: scope:[init_squares] from init_squares::@1 init_squares::@2 - [181] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@2/(byte) 0 ) - [181] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@2/(word*) init_squares::squares#0 ) - [181] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@2/(word) 0 ) - [182] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 - [183] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD - [184] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 - [185] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 - [186] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 - [187] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 - [188] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 +init_squares::@1: scope:[init_squares] from init_squares::@2 init_squares::@3 + [181] (word*) init_squares::squares#2 ← phi( init_squares::@2/(word*) init_squares::squares#1 init_squares::@3/(word*) init_squares::squares#0 ) + [181] (word) init_squares::sqr#2 ← phi( init_squares::@2/(word) init_squares::sqr#1 init_squares::@3/(word) 0 ) + [181] (byte) init_squares::i#2 ← phi( init_squares::@2/(byte) init_squares::i#1 init_squares::@3/(byte) 0 ) + [182] if((byte) init_squares::i#2<(const byte) NUM_SQUARES#3) goto init_squares::@2 to:init_squares::@return init_squares::@return: scope:[init_squares] from init_squares::@1 - [189] return + [183] return to:@return +init_squares::@2: scope:[init_squares] from init_squares::@1 + [184] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 + [185] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD + [186] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 + [187] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 + [188] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 + [189] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 + to:init_squares::@1 (void*()) malloc((word) malloc::size) malloc: scope:[malloc] from @1 @3 init_squares diff --git a/src/test/ref/screen-show-spiral.log b/src/test/ref/screen-show-spiral.log index 9afba628e..4d18b457f 100644 --- a/src/test/ref/screen-show-spiral.log +++ b/src/test/ref/screen-show-spiral.log @@ -31,7 +31,10 @@ Culled Empty Block (label) @9 Culled Empty Block (label) @10 Culled Empty Block (label) @11 Culled Empty Block (label) @12 -Culled Empty Block (label) init_squares::@2 +Culled Empty Block (label) init_squares::@4 +Culled Empty Block (label) init_squares::@3 +Culled Empty Block (label) init_squares::@5 +Culled Empty Block (label) init_squares::@6 Culled Empty Block (label) @14 Culled Empty Block (label) sqr::@1 Culled Empty Block (label) @15 @@ -181,7 +184,7 @@ bsearch16u::@3: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@2 (word*) bsearch16u::return#2 ← (word*~) bsearch16u::$4 to:bsearch16u::@return @13: scope:[] from @5 - (byte*) heap_head#32 ← phi( @5/(byte*) heap_head#0 ) + (byte*) heap_head#33 ← phi( @5/(byte*) heap_head#0 ) (byte) NUM_SQUARES#0 ← (byte) $ff (word*) SQUARES#0 ← (word*) 0 to:@18 @@ -194,9 +197,9 @@ init_squares: scope:[init_squares] from init_dist_screen (word) malloc::size#0 ← (byte~) init_squares::$0 call malloc (void*) malloc::return#2 ← (void*) malloc::return#1 - to:init_squares::@3 -init_squares::@3: scope:[init_squares] from init_squares - (byte) NUM_SQUARES#7 ← phi( init_squares/(byte) NUM_SQUARES#6 ) + to:init_squares::@7 +init_squares::@7: scope:[init_squares] from init_squares + (byte) NUM_SQUARES#14 ← phi( init_squares/(byte) NUM_SQUARES#6 ) (byte*) heap_head#14 ← phi( init_squares/(byte*) heap_head#2 ) (void*) malloc::return#6 ← phi( init_squares/(void*) malloc::return#2 ) (void*~) init_squares::$1 ← (void*) malloc::return#6 @@ -204,24 +207,32 @@ init_squares::@3: scope:[init_squares] from init_squares (word*) SQUARES#1 ← ((word*)) (void*~) init_squares::$1 (word*) init_squares::squares#0 ← (word*) SQUARES#1 (word) init_squares::sqr#0 ← (word) 0 - (number~) init_squares::$2 ← (byte) NUM_SQUARES#7 - (number) 1 (byte) init_squares::i#0 ← (byte) 0 to:init_squares::@1 -init_squares::@1: scope:[init_squares] from init_squares::@1 init_squares::@3 - (word*) SQUARES#17 ← phi( init_squares::@1/(word*) SQUARES#17 init_squares::@3/(word*) SQUARES#1 ) - (byte*) heap_head#25 ← phi( init_squares::@1/(byte*) heap_head#25 init_squares::@3/(byte*) heap_head#3 ) - (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@3/(byte) init_squares::i#0 ) - (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@3/(word*) init_squares::squares#0 ) - (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@3/(word) init_squares::sqr#0 ) +init_squares::@1: scope:[init_squares] from init_squares::@2 init_squares::@7 + (word*) SQUARES#17 ← phi( init_squares::@2/(word*) SQUARES#27 init_squares::@7/(word*) SQUARES#1 ) + (byte*) heap_head#25 ← phi( init_squares::@2/(byte*) heap_head#32 init_squares::@7/(byte*) heap_head#3 ) + (word*) init_squares::squares#3 ← phi( init_squares::@2/(word*) init_squares::squares#1 init_squares::@7/(word*) init_squares::squares#0 ) + (word) init_squares::sqr#3 ← phi( init_squares::@2/(word) init_squares::sqr#1 init_squares::@7/(word) init_squares::sqr#0 ) + (byte) NUM_SQUARES#7 ← phi( init_squares::@2/(byte) NUM_SQUARES#13 init_squares::@7/(byte) NUM_SQUARES#14 ) + (byte) init_squares::i#2 ← phi( init_squares::@2/(byte) init_squares::i#1 init_squares::@7/(byte) init_squares::i#0 ) + (bool~) init_squares::$2 ← (byte) init_squares::i#2 < (byte) NUM_SQUARES#7 + if((bool~) init_squares::$2) goto init_squares::@2 + to:init_squares::@return +init_squares::@2: scope:[init_squares] from init_squares::@1 + (word*) SQUARES#27 ← phi( init_squares::@1/(word*) SQUARES#17 ) + (byte*) heap_head#32 ← phi( init_squares::@1/(byte*) heap_head#25 ) + (byte) NUM_SQUARES#13 ← phi( init_squares::@1/(byte) NUM_SQUARES#7 ) + (byte) init_squares::i#3 ← phi( init_squares::@1/(byte) init_squares::i#2 ) + (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#3 ) + (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#3 ) *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD - (number~) init_squares::$3 ← (byte) init_squares::i#2 * (number) 2 + (number~) init_squares::$3 ← (byte) init_squares::i#3 * (number) 2 (number~) init_squares::$4 ← (number~) init_squares::$3 + (number) 1 (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (number~) init_squares::$4 - (byte) init_squares::i#1 ← (byte) init_squares::i#2 + rangenext(0,init_squares::$2) - (bool~) init_squares::$5 ← (byte) init_squares::i#1 != rangelast(0,init_squares::$2) - if((bool~) init_squares::$5) goto init_squares::@1 - to:init_squares::@return + (byte) init_squares::i#1 ← ++ (byte) init_squares::i#3 + to:init_squares::@1 init_squares::@return: scope:[init_squares] from init_squares::@1 (word*) SQUARES#8 ← phi( init_squares::@1/(word*) SQUARES#17 ) (byte*) heap_head#15 ← phi( init_squares::@1/(byte*) heap_head#25 ) @@ -245,7 +256,7 @@ sqr::@return: scope:[sqr] from sqr (byte()) sqrt((word) sqrt::val) sqrt: scope:[sqrt] from init_dist_screen::@21 - (byte) NUM_SQUARES#8 ← phi( init_dist_screen::@21/(byte) NUM_SQUARES#13 ) + (byte) NUM_SQUARES#8 ← phi( init_dist_screen::@21/(byte) NUM_SQUARES#15 ) (word*) SQUARES#10 ← phi( init_dist_screen::@21/(word*) SQUARES#20 ) (word) sqrt::val#1 ← phi( init_dist_screen::@21/(word) sqrt::val#0 ) (word) bsearch16u::key#0 ← (word) sqrt::val#1 @@ -482,16 +493,16 @@ atan2_16::@return: scope:[atan2_16] from atan2_16::@8 return to:@return @18: scope:[] from @13 - (word*) SQUARES#44 ← phi( @13/(word*) SQUARES#0 ) - (byte) NUM_SQUARES#33 ← phi( @13/(byte) NUM_SQUARES#0 ) - (byte*) heap_head#23 ← phi( @13/(byte*) heap_head#32 ) + (word*) SQUARES#45 ← phi( @13/(word*) SQUARES#0 ) + (byte) NUM_SQUARES#35 ← phi( @13/(byte) NUM_SQUARES#0 ) + (byte*) heap_head#23 ← phi( @13/(byte*) heap_head#33 ) (word) malloc::size#1 ← (number) $3e8 call malloc (void*) malloc::return#3 ← (void*) malloc::return#1 to:@22 @22: scope:[] from @18 - (word*) SQUARES#36 ← phi( @18/(word*) SQUARES#44 ) - (byte) NUM_SQUARES#25 ← phi( @18/(byte) NUM_SQUARES#33 ) + (word*) SQUARES#37 ← phi( @18/(word*) SQUARES#45 ) + (byte) NUM_SQUARES#27 ← phi( @18/(byte) NUM_SQUARES#35 ) (byte*) heap_head#16 ← phi( @18/(byte*) heap_head#2 ) (void*) malloc::return#7 ← phi( @18/(void*) malloc::return#3 ) (void*~) $0 ← (void*) malloc::return#7 @@ -502,8 +513,8 @@ atan2_16::@return: scope:[atan2_16] from atan2_16::@8 (void*) malloc::return#4 ← (void*) malloc::return#1 to:@23 @23: scope:[] from @22 - (word*) SQUARES#35 ← phi( @22/(word*) SQUARES#36 ) - (byte) NUM_SQUARES#24 ← phi( @22/(byte) NUM_SQUARES#25 ) + (word*) SQUARES#36 ← phi( @22/(word*) SQUARES#37 ) + (byte) NUM_SQUARES#26 ← phi( @22/(byte) NUM_SQUARES#27 ) (byte*) SCREEN_DIST#7 ← phi( @22/(byte*) SCREEN_DIST#0 ) (byte*) heap_head#17 ← phi( @22/(byte*) heap_head#2 ) (void*) malloc::return#8 ← phi( @22/(void*) malloc::return#4 ) @@ -517,7 +528,7 @@ main: scope:[main] from @21 (byte*) SCREEN_ANGLE#3 ← phi( @21/(byte*) SCREEN_ANGLE#5 ) (word*) SQUARES#21 ← phi( @21/(word*) SQUARES#26 ) (byte*) heap_head#26 ← phi( @21/(byte*) heap_head#31 ) - (byte) NUM_SQUARES#14 ← phi( @21/(byte) NUM_SQUARES#18 ) + (byte) NUM_SQUARES#16 ← phi( @21/(byte) NUM_SQUARES#20 ) (byte*) SCREEN_DIST#1 ← phi( @21/(byte*) SCREEN_DIST#3 ) (byte*) init_dist_screen::screen#0 ← (byte*) SCREEN_DIST#1 call init_dist_screen @@ -535,24 +546,24 @@ main::@17: scope:[main] from main call init_angle_screen to:main::@18 main::@18: scope:[main] from main::@17 - (word*) SQUARES#28 ← phi( main::@17/(word*) SQUARES#3 ) - (byte*) heap_head#34 ← phi( main::@17/(byte*) heap_head#7 ) - (byte) NUM_SQUARES#20 ← phi( main::@17/(byte) NUM_SQUARES#1 ) + (word*) SQUARES#29 ← phi( main::@17/(word*) SQUARES#3 ) + (byte*) heap_head#35 ← phi( main::@17/(byte*) heap_head#7 ) + (byte) NUM_SQUARES#22 ← phi( main::@17/(byte) NUM_SQUARES#1 ) (byte*) SCREEN_ANGLE#7 ← phi( main::@17/(byte*) SCREEN_ANGLE#1 ) (byte*) SCREEN_DIST#6 ← phi( main::@17/(byte*) SCREEN_DIST#8 ) to:main::@1 main::@1: scope:[main] from main::@12 main::@18 - (word*) SQUARES#22 ← phi( main::@12/(word*) SQUARES#27 main::@18/(word*) SQUARES#28 ) - (byte*) heap_head#27 ← phi( main::@12/(byte*) heap_head#33 main::@18/(byte*) heap_head#34 ) - (byte) NUM_SQUARES#15 ← phi( main::@12/(byte) NUM_SQUARES#19 main::@18/(byte) NUM_SQUARES#20 ) + (word*) SQUARES#22 ← phi( main::@12/(word*) SQUARES#28 main::@18/(word*) SQUARES#29 ) + (byte*) heap_head#27 ← phi( main::@12/(byte*) heap_head#34 main::@18/(byte*) heap_head#35 ) + (byte) NUM_SQUARES#17 ← phi( main::@12/(byte) NUM_SQUARES#21 main::@18/(byte) NUM_SQUARES#22 ) (byte*) SCREEN_ANGLE#4 ← phi( main::@12/(byte*) SCREEN_ANGLE#6 main::@18/(byte*) SCREEN_ANGLE#7 ) (byte*) SCREEN_DIST#4 ← phi( main::@12/(byte*) SCREEN_DIST#5 main::@18/(byte*) SCREEN_DIST#6 ) if(true) goto main::@2 to:main::@return main::@2: scope:[main] from main::@1 - (word*) SQUARES#45 ← phi( main::@1/(word*) SQUARES#22 ) - (byte*) heap_head#42 ← phi( main::@1/(byte*) heap_head#27 ) - (byte) NUM_SQUARES#34 ← phi( main::@1/(byte) NUM_SQUARES#15 ) + (word*) SQUARES#46 ← phi( main::@1/(word*) SQUARES#22 ) + (byte*) heap_head#43 ← phi( main::@1/(byte*) heap_head#27 ) + (byte) NUM_SQUARES#36 ← phi( main::@1/(byte) NUM_SQUARES#17 ) (byte*) SCREEN_ANGLE#2 ← phi( main::@1/(byte*) SCREEN_ANGLE#4 ) (byte*) SCREEN_DIST#2 ← phi( main::@1/(byte*) SCREEN_DIST#4 ) (byte*) main::dist#0 ← (byte*) SCREEN_DIST#2 @@ -564,9 +575,9 @@ main::@2: scope:[main] from main::@1 main::@4: scope:[main] from main::@2 main::@5 (byte*) SCREEN_ANGLE#10 ← phi( main::@2/(byte*) SCREEN_ANGLE#2 main::@5/(byte*) SCREEN_ANGLE#9 ) (byte*) SCREEN_DIST#11 ← phi( main::@2/(byte*) SCREEN_DIST#2 main::@5/(byte*) SCREEN_DIST#10 ) - (word*) SQUARES#37 ← phi( main::@2/(word*) SQUARES#45 main::@5/(word*) SQUARES#29 ) - (byte*) heap_head#37 ← phi( main::@2/(byte*) heap_head#42 main::@5/(byte*) heap_head#35 ) - (byte) NUM_SQUARES#26 ← phi( main::@2/(byte) NUM_SQUARES#34 main::@5/(byte) NUM_SQUARES#21 ) + (word*) SQUARES#38 ← phi( main::@2/(word*) SQUARES#46 main::@5/(word*) SQUARES#30 ) + (byte*) heap_head#38 ← phi( main::@2/(byte*) heap_head#43 main::@5/(byte*) heap_head#36 ) + (byte) NUM_SQUARES#28 ← phi( main::@2/(byte) NUM_SQUARES#36 main::@5/(byte) NUM_SQUARES#23 ) (byte*) main::min_fill#5 ← phi( main::@2/(byte*) main::min_fill#0 main::@5/(byte*) main::min_fill#4 ) (word) main::min_dist_angle#4 ← phi( main::@2/(word) main::min_dist_angle#0 main::@5/(word) main::min_dist_angle#5 ) (byte*) main::angle#4 ← phi( main::@2/(byte*) main::angle#0 main::@5/(byte*) main::angle#1 ) @@ -579,9 +590,9 @@ main::@4: scope:[main] from main::@2 main::@5 main::@5: scope:[main] from main::@4 main::@7 main::@8 (byte*) SCREEN_ANGLE#9 ← phi( main::@4/(byte*) SCREEN_ANGLE#10 main::@7/(byte*) SCREEN_ANGLE#11 main::@8/(byte*) SCREEN_ANGLE#12 ) (byte*) SCREEN_DIST#10 ← phi( main::@4/(byte*) SCREEN_DIST#11 main::@7/(byte*) SCREEN_DIST#12 main::@8/(byte*) SCREEN_DIST#13 ) - (word*) SQUARES#29 ← phi( main::@4/(word*) SQUARES#37 main::@7/(word*) SQUARES#38 main::@8/(word*) SQUARES#39 ) - (byte*) heap_head#35 ← phi( main::@4/(byte*) heap_head#37 main::@7/(byte*) heap_head#38 main::@8/(byte*) heap_head#39 ) - (byte) NUM_SQUARES#21 ← phi( main::@4/(byte) NUM_SQUARES#26 main::@7/(byte) NUM_SQUARES#27 main::@8/(byte) NUM_SQUARES#28 ) + (word*) SQUARES#30 ← phi( main::@4/(word*) SQUARES#38 main::@7/(word*) SQUARES#39 main::@8/(word*) SQUARES#40 ) + (byte*) heap_head#36 ← phi( main::@4/(byte*) heap_head#38 main::@7/(byte*) heap_head#39 main::@8/(byte*) heap_head#40 ) + (byte) NUM_SQUARES#23 ← phi( main::@4/(byte) NUM_SQUARES#28 main::@7/(byte) NUM_SQUARES#29 main::@8/(byte) NUM_SQUARES#30 ) (byte*) main::min_fill#4 ← phi( main::@4/(byte*) main::min_fill#5 main::@7/(byte*) main::min_fill#6 main::@8/(byte*) main::min_fill#1 ) (word) main::min_dist_angle#5 ← phi( main::@4/(word) main::min_dist_angle#4 main::@7/(word) main::min_dist_angle#2 main::@8/(word) main::min_dist_angle#1 ) (byte*) main::fill#3 ← phi( main::@4/(byte*) main::fill#2 main::@7/(byte*) main::fill#5 main::@8/(byte*) main::fill#4 ) @@ -596,9 +607,9 @@ main::@5: scope:[main] from main::@4 main::@7 main::@8 main::@7: scope:[main] from main::@4 (byte*) SCREEN_ANGLE#11 ← phi( main::@4/(byte*) SCREEN_ANGLE#10 ) (byte*) SCREEN_DIST#12 ← phi( main::@4/(byte*) SCREEN_DIST#11 ) - (word*) SQUARES#38 ← phi( main::@4/(word*) SQUARES#37 ) - (byte*) heap_head#38 ← phi( main::@4/(byte*) heap_head#37 ) - (byte) NUM_SQUARES#27 ← phi( main::@4/(byte) NUM_SQUARES#26 ) + (word*) SQUARES#39 ← phi( main::@4/(word*) SQUARES#38 ) + (byte*) heap_head#39 ← phi( main::@4/(byte*) heap_head#38 ) + (byte) NUM_SQUARES#29 ← phi( main::@4/(byte) NUM_SQUARES#28 ) (byte*) main::min_fill#6 ← phi( main::@4/(byte*) main::min_fill#5 ) (byte*) main::fill#5 ← phi( main::@4/(byte*) main::fill#2 ) (word) main::min_dist_angle#2 ← phi( main::@4/(word) main::min_dist_angle#4 ) @@ -612,9 +623,9 @@ main::@7: scope:[main] from main::@4 main::@8: scope:[main] from main::@7 (byte*) SCREEN_ANGLE#12 ← phi( main::@7/(byte*) SCREEN_ANGLE#11 ) (byte*) SCREEN_DIST#13 ← phi( main::@7/(byte*) SCREEN_DIST#12 ) - (word*) SQUARES#39 ← phi( main::@7/(word*) SQUARES#38 ) - (byte*) heap_head#39 ← phi( main::@7/(byte*) heap_head#38 ) - (byte) NUM_SQUARES#28 ← phi( main::@7/(byte) NUM_SQUARES#27 ) + (word*) SQUARES#40 ← phi( main::@7/(word*) SQUARES#39 ) + (byte*) heap_head#40 ← phi( main::@7/(byte*) heap_head#39 ) + (byte) NUM_SQUARES#30 ← phi( main::@7/(byte) NUM_SQUARES#29 ) (byte*) main::angle#5 ← phi( main::@7/(byte*) main::angle#3 ) (byte*) main::dist#5 ← phi( main::@7/(byte*) main::dist#3 ) (word) main::dist_angle#1 ← phi( main::@7/(word) main::dist_angle#0 ) @@ -625,9 +636,9 @@ main::@8: scope:[main] from main::@7 main::@9: scope:[main] from main::@5 (byte*) SCREEN_ANGLE#8 ← phi( main::@5/(byte*) SCREEN_ANGLE#9 ) (byte*) SCREEN_DIST#9 ← phi( main::@5/(byte*) SCREEN_DIST#10 ) - (word*) SQUARES#23 ← phi( main::@5/(word*) SQUARES#29 ) - (byte*) heap_head#28 ← phi( main::@5/(byte*) heap_head#35 ) - (byte) NUM_SQUARES#16 ← phi( main::@5/(byte) NUM_SQUARES#21 ) + (word*) SQUARES#23 ← phi( main::@5/(word*) SQUARES#30 ) + (byte*) heap_head#28 ← phi( main::@5/(byte*) heap_head#36 ) + (byte) NUM_SQUARES#18 ← phi( main::@5/(byte) NUM_SQUARES#23 ) (byte*) main::min_fill#3 ← phi( main::@5/(byte*) main::min_fill#4 ) (word) main::min_dist_angle#3 ← phi( main::@5/(word) main::min_dist_angle#5 ) (bool~) main::$7 ← (word) main::min_dist_angle#3 == (number) $ffff @@ -635,9 +646,9 @@ main::@9: scope:[main] from main::@5 if((bool~) main::$8) goto main::@12 to:main::@return main::@12: scope:[main] from main::@9 - (word*) SQUARES#27 ← phi( main::@9/(word*) SQUARES#23 ) - (byte*) heap_head#33 ← phi( main::@9/(byte*) heap_head#28 ) - (byte) NUM_SQUARES#19 ← phi( main::@9/(byte) NUM_SQUARES#16 ) + (word*) SQUARES#28 ← phi( main::@9/(word*) SQUARES#23 ) + (byte*) heap_head#34 ← phi( main::@9/(byte*) heap_head#28 ) + (byte) NUM_SQUARES#21 ← phi( main::@9/(byte) NUM_SQUARES#18 ) (byte*) SCREEN_ANGLE#6 ← phi( main::@9/(byte*) SCREEN_ANGLE#8 ) (byte*) SCREEN_DIST#5 ← phi( main::@9/(byte*) SCREEN_DIST#9 ) (byte*) main::min_fill#2 ← phi( main::@9/(byte*) main::min_fill#3 ) @@ -646,7 +657,7 @@ main::@12: scope:[main] from main::@9 main::@return: scope:[main] from main::@1 main::@9 (word*) SQUARES#13 ← phi( main::@1/(word*) SQUARES#22 main::@9/(word*) SQUARES#23 ) (byte*) heap_head#19 ← phi( main::@1/(byte*) heap_head#27 main::@9/(byte*) heap_head#28 ) - (byte) NUM_SQUARES#10 ← phi( main::@1/(byte) NUM_SQUARES#15 main::@9/(byte) NUM_SQUARES#16 ) + (byte) NUM_SQUARES#10 ← phi( main::@1/(byte) NUM_SQUARES#17 main::@9/(byte) NUM_SQUARES#18 ) (byte) NUM_SQUARES#2 ← (byte) NUM_SQUARES#10 (byte*) heap_head#8 ← (byte*) heap_head#19 (word*) SQUARES#4 ← (word*) SQUARES#13 @@ -743,7 +754,7 @@ init_dist_screen: scope:[init_dist_screen] from main call init_squares to:init_dist_screen::@19 init_dist_screen::@19: scope:[init_dist_screen] from init_dist_screen - (byte) NUM_SQUARES#40 ← phi( init_dist_screen/(byte) NUM_SQUARES#3 ) + (byte) NUM_SQUARES#42 ← phi( init_dist_screen/(byte) NUM_SQUARES#3 ) (byte*) init_dist_screen::screen#1 ← phi( init_dist_screen/(byte*) init_dist_screen::screen#2 ) (word*) SQUARES#14 ← phi( init_dist_screen/(word*) SQUARES#2 ) (byte*) heap_head#20 ← phi( init_dist_screen/(byte*) heap_head#4 ) @@ -755,11 +766,11 @@ init_dist_screen::@19: scope:[init_dist_screen] from init_dist_screen (byte) init_dist_screen::y#0 ← (byte) 0 to:init_dist_screen::@1 init_dist_screen::@1: scope:[init_dist_screen] from init_dist_screen::@19 init_dist_screen::@7 - (byte*) heap_head#48 ← phi( init_dist_screen::@19/(byte*) heap_head#9 init_dist_screen::@7/(byte*) heap_head#30 ) - (byte) NUM_SQUARES#39 ← phi( init_dist_screen::@19/(byte) NUM_SQUARES#40 init_dist_screen::@7/(byte) NUM_SQUARES#17 ) + (byte*) heap_head#49 ← phi( init_dist_screen::@19/(byte*) heap_head#9 init_dist_screen::@7/(byte*) heap_head#30 ) + (byte) NUM_SQUARES#41 ← phi( init_dist_screen::@19/(byte) NUM_SQUARES#42 init_dist_screen::@7/(byte) NUM_SQUARES#19 ) (byte*) init_dist_screen::screen_bottomline#14 ← phi( init_dist_screen::@19/(byte*) init_dist_screen::screen_bottomline#0 init_dist_screen::@7/(byte*) init_dist_screen::screen_bottomline#1 ) (byte*) init_dist_screen::screen_topline#14 ← phi( init_dist_screen::@19/(byte*) init_dist_screen::screen_topline#0 init_dist_screen::@7/(byte*) init_dist_screen::screen_topline#1 ) - (word*) SQUARES#40 ← phi( init_dist_screen::@19/(word*) SQUARES#5 init_dist_screen::@7/(word*) SQUARES#25 ) + (word*) SQUARES#41 ← phi( init_dist_screen::@19/(word*) SQUARES#5 init_dist_screen::@7/(word*) SQUARES#25 ) (byte) init_dist_screen::y#2 ← phi( init_dist_screen::@19/(byte) init_dist_screen::y#0 init_dist_screen::@7/(byte) init_dist_screen::y#1 ) (number~) init_dist_screen::$2 ← (byte) init_dist_screen::y#2 * (number) 2 (byte) init_dist_screen::y2#0 ← (number~) init_dist_screen::$2 @@ -767,34 +778,34 @@ init_dist_screen::@1: scope:[init_dist_screen] from init_dist_screen::@19 init_ if((bool~) init_dist_screen::$3) goto init_dist_screen::@2 to:init_dist_screen::@3 init_dist_screen::@2: scope:[init_dist_screen] from init_dist_screen::@1 - (byte*) heap_head#45 ← phi( init_dist_screen::@1/(byte*) heap_head#48 ) - (byte) NUM_SQUARES#37 ← phi( init_dist_screen::@1/(byte) NUM_SQUARES#39 ) + (byte*) heap_head#46 ← phi( init_dist_screen::@1/(byte*) heap_head#49 ) + (byte) NUM_SQUARES#39 ← phi( init_dist_screen::@1/(byte) NUM_SQUARES#41 ) (byte) init_dist_screen::y#9 ← phi( init_dist_screen::@1/(byte) init_dist_screen::y#2 ) (byte*) init_dist_screen::screen_bottomline#11 ← phi( init_dist_screen::@1/(byte*) init_dist_screen::screen_bottomline#14 ) (byte*) init_dist_screen::screen_topline#11 ← phi( init_dist_screen::@1/(byte*) init_dist_screen::screen_topline#14 ) - (word*) SQUARES#30 ← phi( init_dist_screen::@1/(word*) SQUARES#40 ) + (word*) SQUARES#31 ← phi( init_dist_screen::@1/(word*) SQUARES#41 ) (byte) init_dist_screen::y2#1 ← phi( init_dist_screen::@1/(byte) init_dist_screen::y2#0 ) (number~) init_dist_screen::$6 ← (byte) init_dist_screen::y2#1 - (number) $18 (number~) init_dist_screen::$7 ← (number~) init_dist_screen::$6 to:init_dist_screen::@4 init_dist_screen::@3: scope:[init_dist_screen] from init_dist_screen::@1 - (byte*) heap_head#46 ← phi( init_dist_screen::@1/(byte*) heap_head#48 ) - (byte) NUM_SQUARES#38 ← phi( init_dist_screen::@1/(byte) NUM_SQUARES#39 ) + (byte*) heap_head#47 ← phi( init_dist_screen::@1/(byte*) heap_head#49 ) + (byte) NUM_SQUARES#40 ← phi( init_dist_screen::@1/(byte) NUM_SQUARES#41 ) (byte) init_dist_screen::y#10 ← phi( init_dist_screen::@1/(byte) init_dist_screen::y#2 ) (byte*) init_dist_screen::screen_bottomline#12 ← phi( init_dist_screen::@1/(byte*) init_dist_screen::screen_bottomline#14 ) (byte*) init_dist_screen::screen_topline#12 ← phi( init_dist_screen::@1/(byte*) init_dist_screen::screen_topline#14 ) - (word*) SQUARES#31 ← phi( init_dist_screen::@1/(word*) SQUARES#40 ) + (word*) SQUARES#32 ← phi( init_dist_screen::@1/(word*) SQUARES#41 ) (byte) init_dist_screen::y2#2 ← phi( init_dist_screen::@1/(byte) init_dist_screen::y2#0 ) (number~) init_dist_screen::$4 ← (number) $18 - (byte) init_dist_screen::y2#2 (number~) init_dist_screen::$5 ← (number~) init_dist_screen::$4 to:init_dist_screen::@4 init_dist_screen::@4: scope:[init_dist_screen] from init_dist_screen::@2 init_dist_screen::@3 - (byte*) heap_head#43 ← phi( init_dist_screen::@2/(byte*) heap_head#45 init_dist_screen::@3/(byte*) heap_head#46 ) - (byte) NUM_SQUARES#35 ← phi( init_dist_screen::@2/(byte) NUM_SQUARES#37 init_dist_screen::@3/(byte) NUM_SQUARES#38 ) + (byte*) heap_head#44 ← phi( init_dist_screen::@2/(byte*) heap_head#46 init_dist_screen::@3/(byte*) heap_head#47 ) + (byte) NUM_SQUARES#37 ← phi( init_dist_screen::@2/(byte) NUM_SQUARES#39 init_dist_screen::@3/(byte) NUM_SQUARES#40 ) (byte) init_dist_screen::y#7 ← phi( init_dist_screen::@2/(byte) init_dist_screen::y#9 init_dist_screen::@3/(byte) init_dist_screen::y#10 ) (byte*) init_dist_screen::screen_bottomline#8 ← phi( init_dist_screen::@2/(byte*) init_dist_screen::screen_bottomline#11 init_dist_screen::@3/(byte*) init_dist_screen::screen_bottomline#12 ) (byte*) init_dist_screen::screen_topline#8 ← phi( init_dist_screen::@2/(byte*) init_dist_screen::screen_topline#11 init_dist_screen::@3/(byte*) init_dist_screen::screen_topline#12 ) - (word*) SQUARES#19 ← phi( init_dist_screen::@2/(word*) SQUARES#30 init_dist_screen::@3/(word*) SQUARES#31 ) + (word*) SQUARES#19 ← phi( init_dist_screen::@2/(word*) SQUARES#31 init_dist_screen::@3/(word*) SQUARES#32 ) (number~) init_dist_screen::$8 ← phi( init_dist_screen::@2/(number~) init_dist_screen::$7 init_dist_screen::@3/(number~) init_dist_screen::$5 ) (byte) init_dist_screen::yd#0 ← (number~) init_dist_screen::$8 (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0 @@ -802,9 +813,9 @@ init_dist_screen::@4: scope:[init_dist_screen] from init_dist_screen::@2 init_d (word) sqr::return#2 ← (word) sqr::return#1 to:init_dist_screen::@20 init_dist_screen::@20: scope:[init_dist_screen] from init_dist_screen::@4 - (word*) SQUARES#41 ← phi( init_dist_screen::@4/(word*) SQUARES#19 ) - (byte*) heap_head#40 ← phi( init_dist_screen::@4/(byte*) heap_head#43 ) - (byte) NUM_SQUARES#29 ← phi( init_dist_screen::@4/(byte) NUM_SQUARES#35 ) + (word*) SQUARES#42 ← phi( init_dist_screen::@4/(word*) SQUARES#19 ) + (byte*) heap_head#41 ← phi( init_dist_screen::@4/(byte*) heap_head#44 ) + (byte) NUM_SQUARES#31 ← phi( init_dist_screen::@4/(byte) NUM_SQUARES#37 ) (byte) init_dist_screen::y#5 ← phi( init_dist_screen::@4/(byte) init_dist_screen::y#7 ) (byte*) init_dist_screen::screen_bottomline#6 ← phi( init_dist_screen::@4/(byte*) init_dist_screen::screen_bottomline#8 ) (byte*) init_dist_screen::screen_topline#6 ← phi( init_dist_screen::@4/(byte*) init_dist_screen::screen_topline#8 ) @@ -817,9 +828,9 @@ init_dist_screen::@20: scope:[init_dist_screen] from init_dist_screen::@4 init_dist_screen::@5: scope:[init_dist_screen] from init_dist_screen::@20 init_dist_screen::@22 (byte) init_dist_screen::xb#8 ← phi( init_dist_screen::@20/(byte) init_dist_screen::xb#0 init_dist_screen::@22/(byte) init_dist_screen::xb#1 ) (word) init_dist_screen::yds#6 ← phi( init_dist_screen::@20/(word) init_dist_screen::yds#0 init_dist_screen::@22/(word) init_dist_screen::yds#7 ) - (word*) SQUARES#32 ← phi( init_dist_screen::@20/(word*) SQUARES#41 init_dist_screen::@22/(word*) SQUARES#42 ) - (byte*) heap_head#36 ← phi( init_dist_screen::@20/(byte*) heap_head#40 init_dist_screen::@22/(byte*) heap_head#41 ) - (byte) NUM_SQUARES#22 ← phi( init_dist_screen::@20/(byte) NUM_SQUARES#29 init_dist_screen::@22/(byte) NUM_SQUARES#30 ) + (word*) SQUARES#33 ← phi( init_dist_screen::@20/(word*) SQUARES#42 init_dist_screen::@22/(word*) SQUARES#43 ) + (byte*) heap_head#37 ← phi( init_dist_screen::@20/(byte*) heap_head#41 init_dist_screen::@22/(byte*) heap_head#42 ) + (byte) NUM_SQUARES#24 ← phi( init_dist_screen::@20/(byte) NUM_SQUARES#31 init_dist_screen::@22/(byte) NUM_SQUARES#32 ) (byte) init_dist_screen::y#4 ← phi( init_dist_screen::@20/(byte) init_dist_screen::y#5 init_dist_screen::@22/(byte) init_dist_screen::y#6 ) (byte*) init_dist_screen::screen_bottomline#4 ← phi( init_dist_screen::@20/(byte*) init_dist_screen::screen_bottomline#6 init_dist_screen::@22/(byte*) init_dist_screen::screen_bottomline#3 ) (byte*) init_dist_screen::screen_topline#4 ← phi( init_dist_screen::@20/(byte*) init_dist_screen::screen_topline#6 init_dist_screen::@22/(byte*) init_dist_screen::screen_topline#3 ) @@ -828,14 +839,14 @@ init_dist_screen::@5: scope:[init_dist_screen] from init_dist_screen::@20 init_ if((bool~) init_dist_screen::$10) goto init_dist_screen::@6 to:init_dist_screen::@7 init_dist_screen::@6: scope:[init_dist_screen] from init_dist_screen::@5 - (byte*) heap_head#51 ← phi( init_dist_screen::@5/(byte*) heap_head#36 ) + (byte*) heap_head#52 ← phi( init_dist_screen::@5/(byte*) heap_head#37 ) (byte) init_dist_screen::y#14 ← phi( init_dist_screen::@5/(byte) init_dist_screen::y#4 ) (byte) init_dist_screen::xb#7 ← phi( init_dist_screen::@5/(byte) init_dist_screen::xb#8 ) (byte*) init_dist_screen::screen_bottomline#13 ← phi( init_dist_screen::@5/(byte*) init_dist_screen::screen_bottomline#4 ) (byte*) init_dist_screen::screen_topline#13 ← phi( init_dist_screen::@5/(byte*) init_dist_screen::screen_topline#4 ) - (byte) NUM_SQUARES#36 ← phi( init_dist_screen::@5/(byte) NUM_SQUARES#22 ) + (byte) NUM_SQUARES#38 ← phi( init_dist_screen::@5/(byte) NUM_SQUARES#24 ) (word) init_dist_screen::yds#5 ← phi( init_dist_screen::@5/(word) init_dist_screen::yds#6 ) - (word*) SQUARES#43 ← phi( init_dist_screen::@5/(word*) SQUARES#32 ) + (word*) SQUARES#44 ← phi( init_dist_screen::@5/(word*) SQUARES#33 ) (byte) init_dist_screen::x#3 ← phi( init_dist_screen::@5/(byte) init_dist_screen::x#2 ) (number~) init_dist_screen::$11 ← (byte) init_dist_screen::x#3 * (number) 2 (byte) init_dist_screen::x2#0 ← (number~) init_dist_screen::$11 @@ -843,9 +854,9 @@ init_dist_screen::@6: scope:[init_dist_screen] from init_dist_screen::@5 if((bool~) init_dist_screen::$12) goto init_dist_screen::@8 to:init_dist_screen::@9 init_dist_screen::@7: scope:[init_dist_screen] from init_dist_screen::@5 - (word*) SQUARES#25 ← phi( init_dist_screen::@5/(word*) SQUARES#32 ) - (byte*) heap_head#30 ← phi( init_dist_screen::@5/(byte*) heap_head#36 ) - (byte) NUM_SQUARES#17 ← phi( init_dist_screen::@5/(byte) NUM_SQUARES#22 ) + (word*) SQUARES#25 ← phi( init_dist_screen::@5/(word*) SQUARES#33 ) + (byte*) heap_head#30 ← phi( init_dist_screen::@5/(byte*) heap_head#37 ) + (byte) NUM_SQUARES#19 ← phi( init_dist_screen::@5/(byte) NUM_SQUARES#24 ) (byte) init_dist_screen::y#3 ← phi( init_dist_screen::@5/(byte) init_dist_screen::y#4 ) (byte*) init_dist_screen::screen_bottomline#2 ← phi( init_dist_screen::@5/(byte*) init_dist_screen::screen_bottomline#4 ) (byte*) init_dist_screen::screen_topline#2 ← phi( init_dist_screen::@5/(byte*) init_dist_screen::screen_topline#4 ) @@ -856,43 +867,43 @@ init_dist_screen::@7: scope:[init_dist_screen] from init_dist_screen::@5 if((bool~) init_dist_screen::$21) goto init_dist_screen::@1 to:init_dist_screen::@return init_dist_screen::@8: scope:[init_dist_screen] from init_dist_screen::@6 - (byte*) heap_head#49 ← phi( init_dist_screen::@6/(byte*) heap_head#51 ) + (byte*) heap_head#50 ← phi( init_dist_screen::@6/(byte*) heap_head#52 ) (byte) init_dist_screen::y#12 ← phi( init_dist_screen::@6/(byte) init_dist_screen::y#14 ) (byte) init_dist_screen::xb#5 ← phi( init_dist_screen::@6/(byte) init_dist_screen::xb#7 ) (byte*) init_dist_screen::screen_bottomline#9 ← phi( init_dist_screen::@6/(byte*) init_dist_screen::screen_bottomline#13 ) (byte) init_dist_screen::x#7 ← phi( init_dist_screen::@6/(byte) init_dist_screen::x#3 ) (byte*) init_dist_screen::screen_topline#9 ← phi( init_dist_screen::@6/(byte*) init_dist_screen::screen_topline#13 ) - (byte) NUM_SQUARES#31 ← phi( init_dist_screen::@6/(byte) NUM_SQUARES#36 ) + (byte) NUM_SQUARES#33 ← phi( init_dist_screen::@6/(byte) NUM_SQUARES#38 ) (word) init_dist_screen::yds#3 ← phi( init_dist_screen::@6/(word) init_dist_screen::yds#5 ) - (word*) SQUARES#33 ← phi( init_dist_screen::@6/(word*) SQUARES#43 ) + (word*) SQUARES#34 ← phi( init_dist_screen::@6/(word*) SQUARES#44 ) (byte) init_dist_screen::x2#1 ← phi( init_dist_screen::@6/(byte) init_dist_screen::x2#0 ) (number~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#1 - (number) $27 (number~) init_dist_screen::$16 ← (number~) init_dist_screen::$15 to:init_dist_screen::@10 init_dist_screen::@9: scope:[init_dist_screen] from init_dist_screen::@6 - (byte*) heap_head#50 ← phi( init_dist_screen::@6/(byte*) heap_head#51 ) + (byte*) heap_head#51 ← phi( init_dist_screen::@6/(byte*) heap_head#52 ) (byte) init_dist_screen::y#13 ← phi( init_dist_screen::@6/(byte) init_dist_screen::y#14 ) (byte) init_dist_screen::xb#6 ← phi( init_dist_screen::@6/(byte) init_dist_screen::xb#7 ) (byte*) init_dist_screen::screen_bottomline#10 ← phi( init_dist_screen::@6/(byte*) init_dist_screen::screen_bottomline#13 ) (byte) init_dist_screen::x#8 ← phi( init_dist_screen::@6/(byte) init_dist_screen::x#3 ) (byte*) init_dist_screen::screen_topline#10 ← phi( init_dist_screen::@6/(byte*) init_dist_screen::screen_topline#13 ) - (byte) NUM_SQUARES#32 ← phi( init_dist_screen::@6/(byte) NUM_SQUARES#36 ) + (byte) NUM_SQUARES#34 ← phi( init_dist_screen::@6/(byte) NUM_SQUARES#38 ) (word) init_dist_screen::yds#4 ← phi( init_dist_screen::@6/(word) init_dist_screen::yds#5 ) - (word*) SQUARES#34 ← phi( init_dist_screen::@6/(word*) SQUARES#43 ) + (word*) SQUARES#35 ← phi( init_dist_screen::@6/(word*) SQUARES#44 ) (byte) init_dist_screen::x2#2 ← phi( init_dist_screen::@6/(byte) init_dist_screen::x2#0 ) (number~) init_dist_screen::$13 ← (number) $27 - (byte) init_dist_screen::x2#2 (number~) init_dist_screen::$14 ← (number~) init_dist_screen::$13 to:init_dist_screen::@10 init_dist_screen::@10: scope:[init_dist_screen] from init_dist_screen::@8 init_dist_screen::@9 - (byte*) heap_head#47 ← phi( init_dist_screen::@8/(byte*) heap_head#49 init_dist_screen::@9/(byte*) heap_head#50 ) + (byte*) heap_head#48 ← phi( init_dist_screen::@8/(byte*) heap_head#50 init_dist_screen::@9/(byte*) heap_head#51 ) (byte) init_dist_screen::y#11 ← phi( init_dist_screen::@8/(byte) init_dist_screen::y#12 init_dist_screen::@9/(byte) init_dist_screen::y#13 ) (byte) init_dist_screen::xb#4 ← phi( init_dist_screen::@8/(byte) init_dist_screen::xb#5 init_dist_screen::@9/(byte) init_dist_screen::xb#6 ) (byte*) init_dist_screen::screen_bottomline#7 ← phi( init_dist_screen::@8/(byte*) init_dist_screen::screen_bottomline#9 init_dist_screen::@9/(byte*) init_dist_screen::screen_bottomline#10 ) (byte) init_dist_screen::x#6 ← phi( init_dist_screen::@8/(byte) init_dist_screen::x#7 init_dist_screen::@9/(byte) init_dist_screen::x#8 ) (byte*) init_dist_screen::screen_topline#7 ← phi( init_dist_screen::@8/(byte*) init_dist_screen::screen_topline#9 init_dist_screen::@9/(byte*) init_dist_screen::screen_topline#10 ) - (byte) NUM_SQUARES#23 ← phi( init_dist_screen::@8/(byte) NUM_SQUARES#31 init_dist_screen::@9/(byte) NUM_SQUARES#32 ) + (byte) NUM_SQUARES#25 ← phi( init_dist_screen::@8/(byte) NUM_SQUARES#33 init_dist_screen::@9/(byte) NUM_SQUARES#34 ) (word) init_dist_screen::yds#2 ← phi( init_dist_screen::@8/(word) init_dist_screen::yds#3 init_dist_screen::@9/(word) init_dist_screen::yds#4 ) - (word*) SQUARES#18 ← phi( init_dist_screen::@8/(word*) SQUARES#33 init_dist_screen::@9/(word*) SQUARES#34 ) + (word*) SQUARES#18 ← phi( init_dist_screen::@8/(word*) SQUARES#34 init_dist_screen::@9/(word*) SQUARES#35 ) (number~) init_dist_screen::$17 ← phi( init_dist_screen::@8/(number~) init_dist_screen::$16 init_dist_screen::@9/(number~) init_dist_screen::$14 ) (byte) init_dist_screen::xd#0 ← (number~) init_dist_screen::$17 (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0 @@ -900,13 +911,13 @@ init_dist_screen::@10: scope:[init_dist_screen] from init_dist_screen::@8 init_ (word) sqr::return#3 ← (word) sqr::return#1 to:init_dist_screen::@21 init_dist_screen::@21: scope:[init_dist_screen] from init_dist_screen::@10 - (byte*) heap_head#44 ← phi( init_dist_screen::@10/(byte*) heap_head#47 ) + (byte*) heap_head#45 ← phi( init_dist_screen::@10/(byte*) heap_head#48 ) (byte) init_dist_screen::y#8 ← phi( init_dist_screen::@10/(byte) init_dist_screen::y#11 ) (byte) init_dist_screen::xb#3 ← phi( init_dist_screen::@10/(byte) init_dist_screen::xb#4 ) (byte*) init_dist_screen::screen_bottomline#5 ← phi( init_dist_screen::@10/(byte*) init_dist_screen::screen_bottomline#7 ) (byte) init_dist_screen::x#5 ← phi( init_dist_screen::@10/(byte) init_dist_screen::x#6 ) (byte*) init_dist_screen::screen_topline#5 ← phi( init_dist_screen::@10/(byte*) init_dist_screen::screen_topline#7 ) - (byte) NUM_SQUARES#13 ← phi( init_dist_screen::@10/(byte) NUM_SQUARES#23 ) + (byte) NUM_SQUARES#15 ← phi( init_dist_screen::@10/(byte) NUM_SQUARES#25 ) (word*) SQUARES#20 ← phi( init_dist_screen::@10/(word*) SQUARES#18 ) (word) init_dist_screen::yds#1 ← phi( init_dist_screen::@10/(word) init_dist_screen::yds#2 ) (word) sqr::return#6 ← phi( init_dist_screen::@10/(word) sqr::return#3 ) @@ -920,9 +931,9 @@ init_dist_screen::@21: scope:[init_dist_screen] from init_dist_screen::@10 to:init_dist_screen::@22 init_dist_screen::@22: scope:[init_dist_screen] from init_dist_screen::@21 (word) init_dist_screen::yds#7 ← phi( init_dist_screen::@21/(word) init_dist_screen::yds#1 ) - (word*) SQUARES#42 ← phi( init_dist_screen::@21/(word*) SQUARES#20 ) - (byte*) heap_head#41 ← phi( init_dist_screen::@21/(byte*) heap_head#44 ) - (byte) NUM_SQUARES#30 ← phi( init_dist_screen::@21/(byte) NUM_SQUARES#13 ) + (word*) SQUARES#43 ← phi( init_dist_screen::@21/(word*) SQUARES#20 ) + (byte*) heap_head#42 ← phi( init_dist_screen::@21/(byte*) heap_head#45 ) + (byte) NUM_SQUARES#32 ← phi( init_dist_screen::@21/(byte) NUM_SQUARES#15 ) (byte) init_dist_screen::y#6 ← phi( init_dist_screen::@21/(byte) init_dist_screen::y#8 ) (byte) init_dist_screen::xb#2 ← phi( init_dist_screen::@21/(byte) init_dist_screen::xb#3 ) (byte*) init_dist_screen::screen_bottomline#3 ← phi( init_dist_screen::@21/(byte*) init_dist_screen::screen_bottomline#5 ) @@ -941,7 +952,7 @@ init_dist_screen::@22: scope:[init_dist_screen] from init_dist_screen::@21 init_dist_screen::@return: scope:[init_dist_screen] from init_dist_screen::@7 (word*) SQUARES#15 ← phi( init_dist_screen::@7/(word*) SQUARES#25 ) (byte*) heap_head#21 ← phi( init_dist_screen::@7/(byte*) heap_head#30 ) - (byte) NUM_SQUARES#11 ← phi( init_dist_screen::@7/(byte) NUM_SQUARES#17 ) + (byte) NUM_SQUARES#11 ← phi( init_dist_screen::@7/(byte) NUM_SQUARES#19 ) (byte) NUM_SQUARES#4 ← (byte) NUM_SQUARES#11 (byte*) heap_head#10 ← (byte*) heap_head#21 (word*) SQUARES#6 ← (word*) SQUARES#15 @@ -949,9 +960,9 @@ init_dist_screen::@return: scope:[init_dist_screen] from init_dist_screen::@7 to:@return @21: scope:[] from @23 (byte*) SCREEN_ANGLE#5 ← phi( @23/(byte*) SCREEN_ANGLE#0 ) - (word*) SQUARES#26 ← phi( @23/(word*) SQUARES#35 ) + (word*) SQUARES#26 ← phi( @23/(word*) SQUARES#36 ) (byte*) heap_head#31 ← phi( @23/(byte*) heap_head#6 ) - (byte) NUM_SQUARES#18 ← phi( @23/(byte) NUM_SQUARES#24 ) + (byte) NUM_SQUARES#20 ← phi( @23/(byte) NUM_SQUARES#26 ) (byte*) SCREEN_DIST#3 ← phi( @23/(byte*) SCREEN_DIST#7 ) call main to:@24 @@ -1020,6 +1031,8 @@ SYMBOL TABLE SSA (byte) NUM_SQUARES#39 (byte) NUM_SQUARES#4 (byte) NUM_SQUARES#40 +(byte) NUM_SQUARES#41 +(byte) NUM_SQUARES#42 (byte) NUM_SQUARES#5 (byte) NUM_SQUARES#6 (byte) NUM_SQUARES#7 @@ -1102,6 +1115,7 @@ SYMBOL TABLE SSA (word*) SQUARES#43 (word*) SQUARES#44 (word*) SQUARES#45 +(word*) SQUARES#46 (word*) SQUARES#5 (word*) SQUARES#6 (word*) SQUARES#7 @@ -1422,6 +1436,7 @@ SYMBOL TABLE SSA (byte*) heap_head#5 (byte*) heap_head#50 (byte*) heap_head#51 +(byte*) heap_head#52 (byte*) heap_head#6 (byte*) heap_head#7 (byte*) heap_head#8 @@ -1636,25 +1651,28 @@ SYMBOL TABLE SSA (void()) init_squares() (byte~) init_squares::$0 (void*~) init_squares::$1 -(number~) init_squares::$2 +(bool~) init_squares::$2 (number~) init_squares::$3 (number~) init_squares::$4 -(bool~) init_squares::$5 (label) init_squares::@1 -(label) init_squares::@3 +(label) init_squares::@2 +(label) init_squares::@7 (label) init_squares::@return (byte) init_squares::i (byte) init_squares::i#0 (byte) init_squares::i#1 (byte) init_squares::i#2 +(byte) init_squares::i#3 (word) init_squares::sqr (word) init_squares::sqr#0 (word) init_squares::sqr#1 (word) init_squares::sqr#2 +(word) init_squares::sqr#3 (word*) init_squares::squares (word*) init_squares::squares#0 (word*) init_squares::squares#1 (word*) init_squares::squares#2 +(word*) init_squares::squares#3 (void()) main() (bool~) main::$2 (bool~) main::$3 @@ -1782,10 +1800,8 @@ Adding number conversion cast (unumber) 1 in (number~) bsearch16u::$17 ← (numb Adding number conversion cast (unumber) bsearch16u::$17 in (number~) bsearch16u::$17 ← (unumber)(number) 1 * (const byte) SIZEOF_WORD Adding number conversion cast (unumber) 1 in (number~) bsearch16u::$18 ← (number) 1 * (const byte) SIZEOF_WORD Adding number conversion cast (unumber) bsearch16u::$18 in (number~) bsearch16u::$18 ← (unumber)(number) 1 * (const byte) SIZEOF_WORD -Adding number conversion cast (unumber) 1 in (number~) init_squares::$2 ← (byte) NUM_SQUARES#7 - (number) 1 -Adding number conversion cast (unumber) init_squares::$2 in (number~) init_squares::$2 ← (byte) NUM_SQUARES#7 - (unumber)(number) 1 -Adding number conversion cast (unumber) 2 in (number~) init_squares::$3 ← (byte) init_squares::i#2 * (number) 2 -Adding number conversion cast (unumber) init_squares::$3 in (number~) init_squares::$3 ← (byte) init_squares::i#2 * (unumber)(number) 2 +Adding number conversion cast (unumber) 2 in (number~) init_squares::$3 ← (byte) init_squares::i#3 * (number) 2 +Adding number conversion cast (unumber) init_squares::$3 in (number~) init_squares::$3 ← (byte) init_squares::i#3 * (unumber)(number) 2 Adding number conversion cast (unumber) 1 in (number~) init_squares::$4 ← (unumber~) init_squares::$3 + (number) 1 Adding number conversion cast (unumber) init_squares::$4 in (number~) init_squares::$4 ← (unumber~) init_squares::$3 + (unumber)(number) 1 Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$0 ← (signed word) atan2_16::y#1 >= (number) 0 @@ -1838,12 +1854,12 @@ Adding number conversion cast (unumber) init_dist_screen::$7 in (number~) init_d Adding number conversion cast (unumber) $18 in (number~) init_dist_screen::$4 ← (number) $18 - (byte) init_dist_screen::y2#2 Adding number conversion cast (unumber) init_dist_screen::$4 in (number~) init_dist_screen::$4 ← (unumber)(number) $18 - (byte) init_dist_screen::y2#2 Adding number conversion cast (unumber) init_dist_screen::$5 in (number~) init_dist_screen::$5 ← (unumber~) init_dist_screen::$4 -Adding number conversion cast (unumber) init_dist_screen::$8 in (byte*) heap_head#43 ← phi( init_dist_screen::@2/(byte*) heap_head#45 init_dist_screen::@3/(byte*) heap_head#46 ) - (byte) NUM_SQUARES#35 ← phi( init_dist_screen::@2/(byte) NUM_SQUARES#37 init_dist_screen::@3/(byte) NUM_SQUARES#38 ) +Adding number conversion cast (unumber) init_dist_screen::$8 in (byte*) heap_head#44 ← phi( init_dist_screen::@2/(byte*) heap_head#46 init_dist_screen::@3/(byte*) heap_head#47 ) + (byte) NUM_SQUARES#37 ← phi( init_dist_screen::@2/(byte) NUM_SQUARES#39 init_dist_screen::@3/(byte) NUM_SQUARES#40 ) (byte) init_dist_screen::y#7 ← phi( init_dist_screen::@2/(byte) init_dist_screen::y#9 init_dist_screen::@3/(byte) init_dist_screen::y#10 ) (byte*) init_dist_screen::screen_bottomline#8 ← phi( init_dist_screen::@2/(byte*) init_dist_screen::screen_bottomline#11 init_dist_screen::@3/(byte*) init_dist_screen::screen_bottomline#12 ) (byte*) init_dist_screen::screen_topline#8 ← phi( init_dist_screen::@2/(byte*) init_dist_screen::screen_topline#11 init_dist_screen::@3/(byte*) init_dist_screen::screen_topline#12 ) - (word*) SQUARES#19 ← phi( init_dist_screen::@2/(word*) SQUARES#30 init_dist_screen::@3/(word*) SQUARES#31 ) + (word*) SQUARES#19 ← phi( init_dist_screen::@2/(word*) SQUARES#31 init_dist_screen::@3/(word*) SQUARES#32 ) (number~) init_dist_screen::$8 ← phi( init_dist_screen::@2/(unumber~) init_dist_screen::$7 init_dist_screen::@3/(unumber~) init_dist_screen::$5 ) Adding number conversion cast (unumber) $13 in (bool~) init_dist_screen::$10 ← (byte) init_dist_screen::x#2 <= (number) $13 Adding number conversion cast (unumber) 2 in (number~) init_dist_screen::$11 ← (byte) init_dist_screen::x#3 * (number) 2 @@ -1857,15 +1873,15 @@ Adding number conversion cast (unumber) init_dist_screen::$16 in (number~) init_ Adding number conversion cast (unumber) $27 in (number~) init_dist_screen::$13 ← (number) $27 - (byte) init_dist_screen::x2#2 Adding number conversion cast (unumber) init_dist_screen::$13 in (number~) init_dist_screen::$13 ← (unumber)(number) $27 - (byte) init_dist_screen::x2#2 Adding number conversion cast (unumber) init_dist_screen::$14 in (number~) init_dist_screen::$14 ← (unumber~) init_dist_screen::$13 -Adding number conversion cast (unumber) init_dist_screen::$17 in (byte*) heap_head#47 ← phi( init_dist_screen::@8/(byte*) heap_head#49 init_dist_screen::@9/(byte*) heap_head#50 ) +Adding number conversion cast (unumber) init_dist_screen::$17 in (byte*) heap_head#48 ← phi( init_dist_screen::@8/(byte*) heap_head#50 init_dist_screen::@9/(byte*) heap_head#51 ) (byte) init_dist_screen::y#11 ← phi( init_dist_screen::@8/(byte) init_dist_screen::y#12 init_dist_screen::@9/(byte) init_dist_screen::y#13 ) (byte) init_dist_screen::xb#4 ← phi( init_dist_screen::@8/(byte) init_dist_screen::xb#5 init_dist_screen::@9/(byte) init_dist_screen::xb#6 ) (byte*) init_dist_screen::screen_bottomline#7 ← phi( init_dist_screen::@8/(byte*) init_dist_screen::screen_bottomline#9 init_dist_screen::@9/(byte*) init_dist_screen::screen_bottomline#10 ) (byte) init_dist_screen::x#6 ← phi( init_dist_screen::@8/(byte) init_dist_screen::x#7 init_dist_screen::@9/(byte) init_dist_screen::x#8 ) (byte*) init_dist_screen::screen_topline#7 ← phi( init_dist_screen::@8/(byte*) init_dist_screen::screen_topline#9 init_dist_screen::@9/(byte*) init_dist_screen::screen_topline#10 ) - (byte) NUM_SQUARES#23 ← phi( init_dist_screen::@8/(byte) NUM_SQUARES#31 init_dist_screen::@9/(byte) NUM_SQUARES#32 ) + (byte) NUM_SQUARES#25 ← phi( init_dist_screen::@8/(byte) NUM_SQUARES#33 init_dist_screen::@9/(byte) NUM_SQUARES#34 ) (word) init_dist_screen::yds#2 ← phi( init_dist_screen::@8/(word) init_dist_screen::yds#3 init_dist_screen::@9/(word) init_dist_screen::yds#4 ) - (word*) SQUARES#18 ← phi( init_dist_screen::@8/(word*) SQUARES#33 init_dist_screen::@9/(word*) SQUARES#34 ) + (word*) SQUARES#18 ← phi( init_dist_screen::@8/(word*) SQUARES#34 init_dist_screen::@9/(word*) SQUARES#35 ) (number~) init_dist_screen::$17 ← phi( init_dist_screen::@8/(unumber~) init_dist_screen::$16 init_dist_screen::@9/(unumber~) init_dist_screen::$14 ) Successful SSA optimization PassNAddNumberTypeConversions Inlining cast (void*) malloc::return#0 ← (void*)(byte*) malloc::mem#0 @@ -1890,7 +1906,6 @@ Simplifying constant integer cast 0 Simplifying constant integer cast 1 Simplifying constant integer cast 1 Simplifying constant integer cast 1 -Simplifying constant integer cast 1 Simplifying constant integer cast 2 Simplifying constant integer cast 1 Simplifying constant integer cast 0 @@ -1946,7 +1961,6 @@ Finalized signed number type (signed byte) 0 Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 1 -Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 2 Finalized unsigned number type (byte) 1 Finalized signed number type (signed byte) 0 @@ -1993,8 +2007,7 @@ Finalized unsigned number type (byte) $27 Successful SSA optimization PassNFinalizeNumberTypeConversions Inferred type updated to byte in (unumber~) bsearch16u::$17 ← (byte) 1 * (const byte) SIZEOF_WORD Inferred type updated to byte in (unumber~) bsearch16u::$18 ← (byte) 1 * (const byte) SIZEOF_WORD -Inferred type updated to byte in (unumber~) init_squares::$2 ← (byte) NUM_SQUARES#7 - (byte) 1 -Inferred type updated to byte in (unumber~) init_squares::$3 ← (byte) init_squares::i#2 * (byte) 2 +Inferred type updated to byte in (unumber~) init_squares::$3 ← (byte) init_squares::i#3 * (byte) 2 Inferred type updated to byte in (unumber~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 Inferred type updated to word in (unumber~) atan2_16::$12 ← (word) $8000 - (word) atan2_16::angle#9 Inferred type updated to byte in (unumber~) init_angle_screen::$3 ← (byte) init_angle_screen::x#3 * (byte) 2 @@ -2038,13 +2051,17 @@ Alias (word*) bsearch16u::return#1 = (word*) bsearch16u::return#4 Alias (word*) bsearch16u::items#0 = (word*~) bsearch16u::$15 Alias (word*~) bsearch16u::$2 = (word*~) bsearch16u::$1 Alias (word*) bsearch16u::return#2 = (word*~) bsearch16u::$4 -Alias (byte*) heap_head#0 = (byte*) heap_head#32 (byte*) heap_head#23 +Alias (byte*) heap_head#0 = (byte*) heap_head#33 (byte*) heap_head#23 Alias (word) malloc::size#0 = (byte~) init_squares::$0 Alias (void*) malloc::return#2 = (void*) malloc::return#6 -Alias (byte) NUM_SQUARES#6 = (byte) NUM_SQUARES#7 +Alias (byte) NUM_SQUARES#14 = (byte) NUM_SQUARES#6 Alias (byte*) heap_head#14 = (byte*) heap_head#3 -Alias (byte*) heap_head#15 = (byte*) heap_head#25 (byte*) heap_head#4 -Alias (word*) SQUARES#17 = (word*) SQUARES#8 (word*) SQUARES#2 +Alias (word) init_squares::sqr#2 = (word) init_squares::sqr#3 +Alias (word*) init_squares::squares#2 = (word*) init_squares::squares#3 +Alias (byte) init_squares::i#2 = (byte) init_squares::i#3 +Alias (byte) NUM_SQUARES#13 = (byte) NUM_SQUARES#7 +Alias (byte*) heap_head#15 = (byte*) heap_head#32 (byte*) heap_head#25 (byte*) heap_head#4 +Alias (word*) SQUARES#17 = (word*) SQUARES#27 (word*) SQUARES#8 (word*) SQUARES#2 Alias (word) sqr::return#0 = (word) sqr::return#4 (word) sqr::return#1 Alias (word*) bsearch16u::return#3 = (word*) bsearch16u::return#5 Alias (word*) SQUARES#10 = (word*) SQUARES#11 @@ -2087,8 +2104,8 @@ Alias (word) atan2_16::angle#4 = (word~) atan2_16::$12 Alias (word) atan2_16::return#0 = (word) atan2_16::angle#10 (word) atan2_16::return#3 (word) atan2_16::return#1 Alias (word) atan2_16::angle#11 = (word) atan2_16::angle#15 Alias (word) atan2_16::angle#5 = (word~) atan2_16::$15 -Alias (byte) NUM_SQUARES#0 = (byte) NUM_SQUARES#33 (byte) NUM_SQUARES#25 (byte) NUM_SQUARES#24 (byte) NUM_SQUARES#18 -Alias (word*) SQUARES#0 = (word*) SQUARES#44 (word*) SQUARES#36 (word*) SQUARES#35 (word*) SQUARES#26 +Alias (byte) NUM_SQUARES#0 = (byte) NUM_SQUARES#35 (byte) NUM_SQUARES#27 (byte) NUM_SQUARES#26 (byte) NUM_SQUARES#20 +Alias (word*) SQUARES#0 = (word*) SQUARES#45 (word*) SQUARES#37 (word*) SQUARES#36 (word*) SQUARES#26 Alias (void*) malloc::return#3 = (void*) malloc::return#7 Alias (byte*) heap_head#16 = (byte*) heap_head#5 Alias (void*) malloc::return#4 = (void*) malloc::return#8 @@ -2096,30 +2113,30 @@ Alias (byte*) SCREEN_DIST#0 = (byte*) SCREEN_DIST#7 (byte*) SCREEN_DIST#3 Alias (byte*) heap_head#17 = (byte*) heap_head#6 (byte*) heap_head#31 Alias (byte*) SCREEN_ANGLE#1 = (byte*) SCREEN_ANGLE#3 (byte*) SCREEN_ANGLE#7 Alias (byte*) SCREEN_DIST#1 = (byte*) SCREEN_DIST#8 (byte*) SCREEN_DIST#6 -Alias (byte) NUM_SQUARES#1 = (byte) NUM_SQUARES#9 (byte) NUM_SQUARES#20 -Alias (byte*) heap_head#18 = (byte*) heap_head#7 (byte*) heap_head#34 -Alias (word*) SQUARES#12 = (word*) SQUARES#3 (word*) SQUARES#28 +Alias (byte) NUM_SQUARES#1 = (byte) NUM_SQUARES#9 (byte) NUM_SQUARES#22 +Alias (byte*) heap_head#18 = (byte*) heap_head#7 (byte*) heap_head#35 +Alias (word*) SQUARES#12 = (word*) SQUARES#3 (word*) SQUARES#29 Alias (byte*) SCREEN_DIST#2 = (byte*) SCREEN_DIST#4 Alias (byte*) SCREEN_ANGLE#2 = (byte*) SCREEN_ANGLE#4 -Alias (byte) NUM_SQUARES#15 = (byte) NUM_SQUARES#34 -Alias (byte*) heap_head#27 = (byte*) heap_head#42 -Alias (word*) SQUARES#22 = (word*) SQUARES#45 +Alias (byte) NUM_SQUARES#17 = (byte) NUM_SQUARES#36 +Alias (byte*) heap_head#27 = (byte*) heap_head#43 +Alias (word*) SQUARES#22 = (word*) SQUARES#46 Alias (byte*) main::dist#3 = (byte*) main::dist#4 (byte*) main::dist#5 Alias (byte*) main::angle#3 = (byte*) main::angle#4 (byte*) main::angle#5 Alias (word) main::min_dist_angle#2 = (word) main::min_dist_angle#4 Alias (byte*) main::fill#2 = (byte*) main::fill#5 (byte*) main::fill#4 (byte*) main::min_fill#1 Alias (byte*) main::min_fill#5 = (byte*) main::min_fill#6 -Alias (byte) NUM_SQUARES#26 = (byte) NUM_SQUARES#27 (byte) NUM_SQUARES#28 -Alias (byte*) heap_head#37 = (byte*) heap_head#38 (byte*) heap_head#39 -Alias (word*) SQUARES#37 = (word*) SQUARES#38 (word*) SQUARES#39 +Alias (byte) NUM_SQUARES#28 = (byte) NUM_SQUARES#29 (byte) NUM_SQUARES#30 +Alias (byte*) heap_head#38 = (byte*) heap_head#39 (byte*) heap_head#40 +Alias (word*) SQUARES#38 = (word*) SQUARES#39 (word*) SQUARES#40 Alias (byte*) SCREEN_DIST#11 = (byte*) SCREEN_DIST#12 (byte*) SCREEN_DIST#13 Alias (byte*) SCREEN_ANGLE#10 = (byte*) SCREEN_ANGLE#11 (byte*) SCREEN_ANGLE#12 Alias (word) main::dist_angle#0 = (word~) main::$9 (word) main::dist_angle#1 (word) main::min_dist_angle#1 Alias (word) main::min_dist_angle#3 = (word) main::min_dist_angle#5 Alias (byte*) main::min_fill#2 = (byte*) main::min_fill#3 (byte*) main::min_fill#4 -Alias (byte) NUM_SQUARES#16 = (byte) NUM_SQUARES#21 (byte) NUM_SQUARES#19 -Alias (byte*) heap_head#28 = (byte*) heap_head#35 (byte*) heap_head#33 -Alias (word*) SQUARES#23 = (word*) SQUARES#29 (word*) SQUARES#27 +Alias (byte) NUM_SQUARES#18 = (byte) NUM_SQUARES#23 (byte) NUM_SQUARES#21 +Alias (byte*) heap_head#28 = (byte*) heap_head#36 (byte*) heap_head#34 +Alias (word*) SQUARES#23 = (word*) SQUARES#30 (word*) SQUARES#28 Alias (byte*) SCREEN_DIST#10 = (byte*) SCREEN_DIST#9 (byte*) SCREEN_DIST#5 Alias (byte*) SCREEN_ANGLE#6 = (byte*) SCREEN_ANGLE#8 (byte*) SCREEN_ANGLE#9 Alias (byte) NUM_SQUARES#10 = (byte) NUM_SQUARES#2 @@ -2140,17 +2157,17 @@ Alias (word) atan2_16::return#2 = (word) atan2_16::return#4 Alias (word) init_angle_screen::angle_w#0 = (word~) init_angle_screen::$10 Alias (byte) init_angle_screen::ang_w#0 = (byte~) init_angle_screen::$12 Alias (byte*) init_dist_screen::screen#1 = (byte*) init_dist_screen::screen#2 (byte*) init_dist_screen::screen_topline#0 -Alias (byte) NUM_SQUARES#3 = (byte) NUM_SQUARES#40 +Alias (byte) NUM_SQUARES#3 = (byte) NUM_SQUARES#42 Alias (byte*) heap_head#20 = (byte*) heap_head#9 Alias (word*) SQUARES#14 = (word*) SQUARES#5 Alias (byte*) init_dist_screen::screen_bottomline#0 = (byte*~) init_dist_screen::$1 Alias (byte) init_dist_screen::y2#0 = (byte~) init_dist_screen::$2 (byte) init_dist_screen::y2#1 (byte) init_dist_screen::y2#2 -Alias (word*) SQUARES#30 = (word*) SQUARES#40 (word*) SQUARES#31 +Alias (word*) SQUARES#31 = (word*) SQUARES#41 (word*) SQUARES#32 Alias (byte*) init_dist_screen::screen_topline#11 = (byte*) init_dist_screen::screen_topline#14 (byte*) init_dist_screen::screen_topline#12 Alias (byte*) init_dist_screen::screen_bottomline#11 = (byte*) init_dist_screen::screen_bottomline#14 (byte*) init_dist_screen::screen_bottomline#12 Alias (byte) init_dist_screen::y#10 = (byte) init_dist_screen::y#9 (byte) init_dist_screen::y#2 -Alias (byte) NUM_SQUARES#37 = (byte) NUM_SQUARES#39 (byte) NUM_SQUARES#38 -Alias (byte*) heap_head#45 = (byte*) heap_head#48 (byte*) heap_head#46 +Alias (byte) NUM_SQUARES#39 = (byte) NUM_SQUARES#41 (byte) NUM_SQUARES#40 +Alias (byte*) heap_head#46 = (byte*) heap_head#49 (byte*) heap_head#47 Alias (byte~) init_dist_screen::$7 = (byte~) init_dist_screen::$6 Alias (byte~) init_dist_screen::$5 = (byte~) init_dist_screen::$4 Alias (byte) init_dist_screen::yd#0 = (byte~) init_dist_screen::$8 @@ -2158,33 +2175,33 @@ Alias (word) sqr::return#2 = (word) sqr::return#5 Alias (byte*) init_dist_screen::screen_topline#6 = (byte*) init_dist_screen::screen_topline#8 Alias (byte*) init_dist_screen::screen_bottomline#6 = (byte*) init_dist_screen::screen_bottomline#8 Alias (byte) init_dist_screen::y#5 = (byte) init_dist_screen::y#7 -Alias (byte) NUM_SQUARES#29 = (byte) NUM_SQUARES#35 -Alias (byte*) heap_head#40 = (byte*) heap_head#43 -Alias (word*) SQUARES#19 = (word*) SQUARES#41 +Alias (byte) NUM_SQUARES#31 = (byte) NUM_SQUARES#37 +Alias (byte*) heap_head#41 = (byte*) heap_head#44 +Alias (word*) SQUARES#19 = (word*) SQUARES#42 Alias (word) init_dist_screen::yds#0 = (word~) init_dist_screen::$9 Alias (byte) init_dist_screen::x#2 = (byte) init_dist_screen::x#3 (byte) init_dist_screen::x#7 (byte) init_dist_screen::x#8 -Alias (word*) SQUARES#15 = (word*) SQUARES#43 (word*) SQUARES#32 (word*) SQUARES#25 (word*) SQUARES#33 (word*) SQUARES#34 (word*) SQUARES#6 +Alias (word*) SQUARES#15 = (word*) SQUARES#44 (word*) SQUARES#33 (word*) SQUARES#25 (word*) SQUARES#34 (word*) SQUARES#35 (word*) SQUARES#6 Alias (word) init_dist_screen::yds#3 = (word) init_dist_screen::yds#5 (word) init_dist_screen::yds#6 (word) init_dist_screen::yds#4 -Alias (byte) NUM_SQUARES#11 = (byte) NUM_SQUARES#36 (byte) NUM_SQUARES#22 (byte) NUM_SQUARES#17 (byte) NUM_SQUARES#31 (byte) NUM_SQUARES#32 (byte) NUM_SQUARES#4 +Alias (byte) NUM_SQUARES#11 = (byte) NUM_SQUARES#38 (byte) NUM_SQUARES#24 (byte) NUM_SQUARES#19 (byte) NUM_SQUARES#33 (byte) NUM_SQUARES#34 (byte) NUM_SQUARES#4 Alias (byte*) init_dist_screen::screen_topline#10 = (byte*) init_dist_screen::screen_topline#13 (byte*) init_dist_screen::screen_topline#4 (byte*) init_dist_screen::screen_topline#2 (byte*) init_dist_screen::screen_topline#9 Alias (byte*) init_dist_screen::screen_bottomline#10 = (byte*) init_dist_screen::screen_bottomline#13 (byte*) init_dist_screen::screen_bottomline#4 (byte*) init_dist_screen::screen_bottomline#2 (byte*) init_dist_screen::screen_bottomline#9 Alias (byte) init_dist_screen::xb#5 = (byte) init_dist_screen::xb#7 (byte) init_dist_screen::xb#8 (byte) init_dist_screen::xb#6 Alias (byte) init_dist_screen::y#12 = (byte) init_dist_screen::y#14 (byte) init_dist_screen::y#4 (byte) init_dist_screen::y#3 (byte) init_dist_screen::y#13 -Alias (byte*) heap_head#10 = (byte*) heap_head#51 (byte*) heap_head#36 (byte*) heap_head#30 (byte*) heap_head#49 (byte*) heap_head#50 (byte*) heap_head#21 +Alias (byte*) heap_head#10 = (byte*) heap_head#52 (byte*) heap_head#37 (byte*) heap_head#30 (byte*) heap_head#50 (byte*) heap_head#51 (byte*) heap_head#21 Alias (byte) init_dist_screen::x2#0 = (byte~) init_dist_screen::$11 (byte) init_dist_screen::x2#1 (byte) init_dist_screen::x2#2 Alias (byte~) init_dist_screen::$16 = (byte~) init_dist_screen::$15 Alias (byte~) init_dist_screen::$14 = (byte~) init_dist_screen::$13 Alias (byte) init_dist_screen::xd#0 = (byte~) init_dist_screen::$17 Alias (word) sqr::return#3 = (word) sqr::return#6 Alias (word) init_dist_screen::yds#1 = (word) init_dist_screen::yds#2 (word) init_dist_screen::yds#7 -Alias (word*) SQUARES#18 = (word*) SQUARES#20 (word*) SQUARES#42 -Alias (byte) NUM_SQUARES#13 = (byte) NUM_SQUARES#23 (byte) NUM_SQUARES#30 +Alias (word*) SQUARES#18 = (word*) SQUARES#20 (word*) SQUARES#43 +Alias (byte) NUM_SQUARES#15 = (byte) NUM_SQUARES#25 (byte) NUM_SQUARES#32 Alias (byte*) init_dist_screen::screen_topline#3 = (byte*) init_dist_screen::screen_topline#5 (byte*) init_dist_screen::screen_topline#7 Alias (byte) init_dist_screen::x#4 = (byte) init_dist_screen::x#5 (byte) init_dist_screen::x#6 Alias (byte*) init_dist_screen::screen_bottomline#3 = (byte*) init_dist_screen::screen_bottomline#5 (byte*) init_dist_screen::screen_bottomline#7 Alias (byte) init_dist_screen::xb#2 = (byte) init_dist_screen::xb#3 (byte) init_dist_screen::xb#4 Alias (byte) init_dist_screen::y#11 = (byte) init_dist_screen::y#8 (byte) init_dist_screen::y#6 -Alias (byte*) heap_head#41 = (byte*) heap_head#44 (byte*) heap_head#47 +Alias (byte*) heap_head#42 = (byte*) heap_head#45 (byte*) heap_head#48 Alias (word) init_dist_screen::xds#0 = (word~) init_dist_screen::$18 Alias (word) init_dist_screen::ds#0 = (word~) init_dist_screen::$19 Alias (byte) sqrt::return#2 = (byte) sqrt::return#4 @@ -2208,35 +2225,36 @@ Alias (signed word) atan2_16::y#10 = (signed word) atan2_16::y#16 (signed word) Alias (signed word) atan2_16::y#4 = (signed word) atan2_16::y#5 Alias (byte*) main::dist#2 = (byte*) main::dist#3 Alias (byte*) main::angle#2 = (byte*) main::angle#3 -Alias (byte) NUM_SQUARES#16 = (byte) NUM_SQUARES#26 -Alias (byte*) heap_head#28 = (byte*) heap_head#37 -Alias (word*) SQUARES#23 = (word*) SQUARES#37 +Alias (byte) NUM_SQUARES#18 = (byte) NUM_SQUARES#28 +Alias (byte*) heap_head#28 = (byte*) heap_head#38 +Alias (word*) SQUARES#23 = (word*) SQUARES#38 Alias (byte*) SCREEN_DIST#10 = (byte*) SCREEN_DIST#11 Alias (byte*) SCREEN_ANGLE#10 = (byte*) SCREEN_ANGLE#6 -Alias (word*) SQUARES#19 = (word*) SQUARES#30 +Alias (word*) SQUARES#19 = (word*) SQUARES#31 Alias (byte*) init_dist_screen::screen_topline#11 = (byte*) init_dist_screen::screen_topline#6 Alias (byte*) init_dist_screen::screen_bottomline#11 = (byte*) init_dist_screen::screen_bottomline#6 Alias (byte) init_dist_screen::y#10 = (byte) init_dist_screen::y#5 -Alias (byte) NUM_SQUARES#29 = (byte) NUM_SQUARES#37 -Alias (byte*) heap_head#40 = (byte*) heap_head#45 +Alias (byte) NUM_SQUARES#31 = (byte) NUM_SQUARES#39 +Alias (byte*) heap_head#41 = (byte*) heap_head#46 Alias (word*) SQUARES#15 = (word*) SQUARES#18 Alias (word) init_dist_screen::yds#1 = (word) init_dist_screen::yds#3 -Alias (byte) NUM_SQUARES#11 = (byte) NUM_SQUARES#13 +Alias (byte) NUM_SQUARES#11 = (byte) NUM_SQUARES#15 Alias (byte*) init_dist_screen::screen_topline#10 = (byte*) init_dist_screen::screen_topline#3 Alias (byte) init_dist_screen::x#2 = (byte) init_dist_screen::x#4 Alias (byte*) init_dist_screen::screen_bottomline#10 = (byte*) init_dist_screen::screen_bottomline#3 Alias (byte) init_dist_screen::xb#2 = (byte) init_dist_screen::xb#5 Alias (byte) init_dist_screen::y#11 = (byte) init_dist_screen::y#12 -Alias (byte*) heap_head#10 = (byte*) heap_head#41 +Alias (byte*) heap_head#10 = (byte*) heap_head#42 Successful SSA optimization Pass2AliasElimination Alias candidate removed (phi-usage) (byte*) main::fill#2 = (byte*) main::fill#3 Identical Phi Values (byte) bsearch16u::num#7 (byte) bsearch16u::num#2 Identical Phi Values (word*) bsearch16u::items#7 (word*) bsearch16u::items#1 Identical Phi Values (word) bsearch16u::key#4 (word) bsearch16u::key#0 Identical Phi Values (word) bsearch16u::key#1 (word) bsearch16u::key#4 -Identical Phi Values (byte) NUM_SQUARES#6 (byte) NUM_SQUARES#3 +Identical Phi Values (byte) NUM_SQUARES#14 (byte) NUM_SQUARES#3 Identical Phi Values (byte*) heap_head#24 (byte*) heap_head#29 Identical Phi Values (byte*) heap_head#14 (byte*) heap_head#1 +Identical Phi Values (byte) NUM_SQUARES#13 (byte) NUM_SQUARES#14 Identical Phi Values (byte*) heap_head#15 (byte*) heap_head#14 Identical Phi Values (word*) SQUARES#17 (word*) SQUARES#1 Identical Phi Values (word) sqrt::val#1 (word) sqrt::val#0 @@ -2253,14 +2271,14 @@ Identical Phi Values (signed word) atan2_16::y#10 (signed word) atan2_16::y#19 Identical Phi Values (byte*) heap_head#16 (byte*) heap_head#1 Identical Phi Values (byte*) heap_head#17 (byte*) heap_head#1 Identical Phi Values (byte*) SCREEN_DIST#1 (byte*) SCREEN_DIST#0 -Identical Phi Values (byte) NUM_SQUARES#14 (byte) NUM_SQUARES#0 +Identical Phi Values (byte) NUM_SQUARES#16 (byte) NUM_SQUARES#0 Identical Phi Values (byte*) heap_head#26 (byte*) heap_head#17 Identical Phi Values (word*) SQUARES#21 (word*) SQUARES#0 Identical Phi Values (byte*) SCREEN_ANGLE#1 (byte*) SCREEN_ANGLE#0 Identical Phi Values (byte) NUM_SQUARES#1 (byte) NUM_SQUARES#11 Identical Phi Values (byte*) heap_head#18 (byte*) heap_head#10 Identical Phi Values (word*) SQUARES#12 (word*) SQUARES#15 -Identical Phi Values (byte) NUM_SQUARES#16 (byte) NUM_SQUARES#15 +Identical Phi Values (byte) NUM_SQUARES#18 (byte) NUM_SQUARES#17 Identical Phi Values (byte*) heap_head#28 (byte*) heap_head#27 Identical Phi Values (word*) SQUARES#23 (word*) SQUARES#22 Identical Phi Values (byte*) SCREEN_DIST#10 (byte*) SCREEN_DIST#2 @@ -2278,8 +2296,8 @@ Identical Phi Values (word*) SQUARES#14 (word*) SQUARES#17 Identical Phi Values (byte*) init_dist_screen::screen_topline#10 (byte*) init_dist_screen::screen_topline#11 Identical Phi Values (byte*) init_dist_screen::screen_bottomline#10 (byte*) init_dist_screen::screen_bottomline#11 Identical Phi Values (byte) init_dist_screen::y#11 (byte) init_dist_screen::y#10 -Identical Phi Values (byte) NUM_SQUARES#11 (byte) NUM_SQUARES#29 -Identical Phi Values (byte*) heap_head#10 (byte*) heap_head#40 +Identical Phi Values (byte) NUM_SQUARES#11 (byte) NUM_SQUARES#31 +Identical Phi Values (byte*) heap_head#10 (byte*) heap_head#41 Identical Phi Values (word*) SQUARES#15 (word*) SQUARES#19 Identical Phi Values (word) init_dist_screen::yds#1 (word) init_dist_screen::yds#0 Identical Phi Values (byte) NUM_SQUARES#12 (byte) NUM_SQUARES#10 @@ -2293,21 +2311,21 @@ Identical Phi Values (signed word) atan2_16::x#4 (signed word) atan2_16::x#17 Identical Phi Values (signed word) atan2_16::y#4 (signed word) atan2_16::y#19 Identical Phi Values (byte*) SCREEN_DIST#2 (byte*) SCREEN_DIST#0 Identical Phi Values (byte*) SCREEN_ANGLE#2 (byte*) SCREEN_ANGLE#0 -Identical Phi Values (byte) NUM_SQUARES#15 (byte) NUM_SQUARES#29 -Identical Phi Values (byte*) heap_head#27 (byte*) heap_head#40 +Identical Phi Values (byte) NUM_SQUARES#17 (byte) NUM_SQUARES#31 +Identical Phi Values (byte*) heap_head#27 (byte*) heap_head#41 Identical Phi Values (word*) SQUARES#22 (word*) SQUARES#19 -Identical Phi Values (byte) NUM_SQUARES#10 (byte) NUM_SQUARES#15 +Identical Phi Values (byte) NUM_SQUARES#10 (byte) NUM_SQUARES#17 Identical Phi Values (byte*) heap_head#19 (byte*) heap_head#27 Identical Phi Values (word*) SQUARES#13 (word*) SQUARES#22 Identical Phi Values (word*) SQUARES#19 (word*) SQUARES#1 -Identical Phi Values (byte) NUM_SQUARES#29 (byte) NUM_SQUARES#3 -Identical Phi Values (byte*) heap_head#40 (byte*) heap_head#1 +Identical Phi Values (byte) NUM_SQUARES#31 (byte) NUM_SQUARES#3 +Identical Phi Values (byte*) heap_head#41 (byte*) heap_head#1 Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) bsearch16u::$5 [13] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@7 Simple Condition (bool~) bsearch16u::$12 [25] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@9 Simple Condition (bool~) bsearch16u::$0 [28] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@1 Simple Condition (bool~) bsearch16u::$14 [32] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 -Simple Condition (bool~) init_squares::$5 [77] if((byte) init_squares::i#1!=rangelast(0,init_squares::$2)) goto init_squares::@1 +Simple Condition (bool~) init_squares::$2 [70] if((byte) init_squares::i#2<(byte) NUM_SQUARES#3) goto init_squares::@2 Simple Condition (bool~) atan2_16::$0 [107] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 Simple Condition (bool~) atan2_16::$5 [116] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 Simple Condition (bool~) atan2_16::$17 [129] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16 @@ -2397,21 +2415,9 @@ Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) $d Successful SSA optimization PassNFinalizeNumberTypeConversions Constant right-side identified [24] (word) malloc::size#0 ← (const byte) NUM_SQUARES#3 * (const byte) SIZEOF_WORD -Constant right-side identified [30] (byte~) init_squares::$2 ← (const byte) NUM_SQUARES#3 - (byte) 1 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) malloc::size#0 = NUM_SQUARES#3*SIZEOF_WORD -Constant (const byte) init_squares::$2 = NUM_SQUARES#3-1 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [37] init_squares::i#1 ← ++ init_squares::i#2 to ++ -Resolved ranged comparison value [38] if(init_squares::i#1!=rangelast(0,init_squares::$2)) goto init_squares::@1 to (const byte) init_squares::$2+(number) 1 -Adding number conversion cast (unumber) init_squares::$2+1 in if((byte) init_squares::i#1!=(const byte) init_squares::$2+(number) 1) goto init_squares::@1 -Adding number conversion cast (unumber) 1 in if((byte) init_squares::i#1!=(unumber)(const byte) init_squares::$2+(number) 1) goto init_squares::@1 -Successful SSA optimization PassNAddNumberTypeConversions -Simplifying constant integer cast (const byte) init_squares::$2+(unumber)(number) 1 -Simplifying constant integer cast 1 -Successful SSA optimization PassNCastSimplification -Finalized unsigned number type (byte) 1 -Successful SSA optimization PassNFinalizeNumberTypeConversions Inlining Noop Cast [3] (void*) malloc::return#0 ← (void*)(byte*) malloc::mem#0 keeping malloc::mem#0 Inlining Noop Cast [10] (signed word~) bsearch16u::$8 ← (signed word)(word) bsearch16u::key#0 keeping bsearch16u::key#0 Inlining Noop Cast [11] (signed word~) bsearch16u::$9 ← (signed word)*((word*) bsearch16u::pivot#0) keeping *(bsearch16u::pivot#0) @@ -2427,7 +2433,7 @@ Inlining Noop Cast [123] (signed word) init_angle_screen::xw#0 ← (signed word) Inlining Noop Cast [126] (signed word) init_angle_screen::yw#0 ← (signed word)(word~) init_angle_screen::$8 keeping init_angle_screen::yw#0 Successful SSA optimization Pass2NopCastInlining Rewriting multiplication to use shift [8] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 * (const byte) SIZEOF_WORD -Rewriting multiplication to use shift [32] (byte~) init_squares::$3 ← (byte) init_squares::i#2 * (byte) 2 +Rewriting multiplication to use shift [33] (byte~) init_squares::$3 ← (byte) init_squares::i#2 * (byte) 2 Rewriting multiplication to use shift [39] (byte~) sqr::$0 ← (byte) sqr::val#2 * (const byte) SIZEOF_WORD Rewriting division to use shift [48] (word~) sqrt::$1 ← (word~) sqrt::$3 / (const byte) SIZEOF_WORD Rewriting division to use shift [60] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 / (byte) 2 @@ -2476,10 +2482,8 @@ Constant inlined init_dist_screen::x#0 = (byte) 0 Constant inlined init_squares::i#0 = (byte) 0 Constant inlined main::min_fill#0 = (const byte*) SCREEN_FILL Constant inlined heap_head#0 = (const byte*) HEAP_TOP -Constant inlined init_squares::$2 = (const byte) NUM_SQUARES#3-(byte) 1 Successful SSA optimization Pass2ConstantInlining Added new block during phi lifting bsearch16u::@18(between bsearch16u::@9 and bsearch16u::@10) -Added new block during phi lifting init_squares::@4(between init_squares::@1 and init_squares::@1) Added new block during phi lifting atan2_16::@34(between atan2_16::@27 and atan2_16::@15) Added new block during phi lifting atan2_16::@35(between atan2_16::@15 and atan2_16::@17) Added new block during phi lifting atan2_16::@36(between atan2_16::@27 and atan2_16::@17) @@ -2510,7 +2514,7 @@ Calls in [sqrt] to bsearch16u:209 Calls in [init_squares] to malloc:249 Created 48 initial phi equivalence classes -Coalesced [6] heap_head#52 ← heap_head#1 +Coalesced [6] heap_head#53 ← heap_head#1 Coalesced [21] main::dist#6 ← main::dist#0 Coalesced [22] main::angle#6 ← main::angle#0 Coalesced [27] main::min_dist_angle#9 ← main::dist_angle#0 @@ -2587,11 +2591,11 @@ Coalesced [240] bsearch16u::num#9 ← bsearch16u::num#0 Coalesced [241] bsearch16u::items#11 ← bsearch16u::items#8 Coalesced [242] bsearch16u::num#11 ← bsearch16u::num#3 Coalesced (already) [243] bsearch16u::items#13 ← bsearch16u::items#2 -Coalesced (already) [248] heap_head#53 ← heap_head#1 -Coalesced [252] init_squares::squares#4 ← init_squares::squares#0 -Coalesced [262] init_squares::sqr#3 ← init_squares::sqr#1 -Coalesced [263] init_squares::squares#3 ← init_squares::squares#1 -Coalesced [264] init_squares::i#3 ← init_squares::i#1 +Coalesced (already) [248] heap_head#54 ← heap_head#1 +Coalesced [252] init_squares::squares#5 ← init_squares::squares#0 +Coalesced [262] init_squares::i#4 ← init_squares::i#1 +Coalesced [263] init_squares::sqr#4 ← init_squares::sqr#1 +Coalesced [264] init_squares::squares#4 ← init_squares::squares#1 Not coalescing [267] heap_head#1 ← malloc::mem#0 Coalesced down to 38 phi equivalence classes Culled Empty Block (label) @5 @@ -2609,7 +2613,6 @@ Culled Empty Block (label) atan2_16::@37 Culled Empty Block (label) init_dist_screen::@23 Culled Empty Block (label) bsearch16u::@1 Culled Empty Block (label) bsearch16u::@18 -Culled Empty Block (label) init_squares::@4 Renumbering block @18 to @1 Renumbering block @21 to @2 Renumbering block @22 to @3 @@ -2623,7 +2626,7 @@ Renumbering block bsearch16u::@9 to bsearch16u::@6 Renumbering block bsearch16u::@10 to bsearch16u::@7 Renumbering block bsearch16u::@13 to bsearch16u::@8 Renumbering block bsearch16u::@15 to bsearch16u::@9 -Renumbering block init_squares::@3 to init_squares::@2 +Renumbering block init_squares::@7 to init_squares::@3 Renumbering block sqrt::@2 to sqrt::@1 Renumbering block atan2_16::@13 to atan2_16::@9 Renumbering block atan2_16::@15 to atan2_16::@10 @@ -3041,26 +3044,28 @@ sqr::@return: scope:[sqr] from sqr init_squares: scope:[init_squares] from init_dist_screen [177] phi() [178] call malloc - to:init_squares::@2 -init_squares::@2: scope:[init_squares] from init_squares + to:init_squares::@3 +init_squares::@3: scope:[init_squares] from init_squares [179] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [180] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 to:init_squares::@1 -init_squares::@1: scope:[init_squares] from init_squares::@1 init_squares::@2 - [181] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@2/(byte) 0 ) - [181] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@2/(word*) init_squares::squares#0 ) - [181] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@2/(word) 0 ) - [182] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 - [183] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD - [184] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 - [185] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 - [186] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 - [187] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 - [188] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 +init_squares::@1: scope:[init_squares] from init_squares::@2 init_squares::@3 + [181] (word*) init_squares::squares#2 ← phi( init_squares::@2/(word*) init_squares::squares#1 init_squares::@3/(word*) init_squares::squares#0 ) + [181] (word) init_squares::sqr#2 ← phi( init_squares::@2/(word) init_squares::sqr#1 init_squares::@3/(word) 0 ) + [181] (byte) init_squares::i#2 ← phi( init_squares::@2/(byte) init_squares::i#1 init_squares::@3/(byte) 0 ) + [182] if((byte) init_squares::i#2<(const byte) NUM_SQUARES#3) goto init_squares::@2 to:init_squares::@return init_squares::@return: scope:[init_squares] from init_squares::@1 - [189] return + [183] return to:@return +init_squares::@2: scope:[init_squares] from init_squares::@1 + [184] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 + [185] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD + [186] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 + [187] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 + [188] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 + [189] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 + to:init_squares::@1 (void*()) malloc((word) malloc::size) malloc: scope:[malloc] from @1 @3 init_squares @@ -3243,15 +3248,15 @@ VARIABLE REGISTER WEIGHTS (byte~) init_squares::$3 22.0 (byte~) init_squares::$4 22.0 (byte) init_squares::i -(byte) init_squares::i#1 16.5 -(byte) init_squares::i#2 5.5 +(byte) init_squares::i#1 22.0 +(byte) init_squares::i#2 6.285714285714286 (word) init_squares::sqr -(word) init_squares::sqr#1 7.333333333333333 -(word) init_squares::sqr#2 6.6000000000000005 +(word) init_squares::sqr#1 11.0 +(word) init_squares::sqr#2 5.5 (word*) init_squares::squares (word*) init_squares::squares#0 4.0 -(word*) init_squares::squares#1 3.6666666666666665 -(word*) init_squares::squares#2 17.5 +(word*) init_squares::squares#1 4.4 +(word*) init_squares::squares#2 11.666666666666666 (void()) main() (byte*) main::angle (byte*) main::angle#0 22.0 @@ -3334,9 +3339,9 @@ Initial phi equivalence classes [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] [ sqr::val#2 sqr::val#1 sqr::val#0 ] +[ init_squares::i#2 init_squares::i#1 ] [ init_squares::sqr#2 init_squares::sqr#1 ] [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] -[ init_squares::i#2 init_squares::i#1 ] [ heap_head#12 heap_head#1 ] [ malloc::size#3 ] Added variable SCREEN_DIST#0 to live range equivalence class [ SCREEN_DIST#0 ] @@ -3414,9 +3419,9 @@ Complete equivalence classes [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] [ sqr::val#2 sqr::val#1 sqr::val#0 ] +[ init_squares::i#2 init_squares::i#1 ] [ init_squares::sqr#2 init_squares::sqr#1 ] [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] -[ init_squares::i#2 init_squares::i#1 ] [ heap_head#12 heap_head#1 ] [ malloc::size#3 ] [ SCREEN_DIST#0 ] @@ -3493,9 +3498,9 @@ Allocated zp[1]:43 [ init_dist_screen::xd#0 init_dist_screen::$16 init_dist_scre Allocated zp[2]:44 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] Allocated zp[1]:46 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] Allocated zp[1]:47 [ sqr::val#2 sqr::val#1 sqr::val#0 ] -Allocated zp[2]:48 [ init_squares::sqr#2 init_squares::sqr#1 ] -Allocated zp[2]:50 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] -Allocated zp[1]:52 [ init_squares::i#2 init_squares::i#1 ] +Allocated zp[1]:48 [ init_squares::i#2 init_squares::i#1 ] +Allocated zp[2]:49 [ init_squares::sqr#2 init_squares::sqr#1 ] +Allocated zp[2]:51 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] Allocated zp[2]:53 [ heap_head#12 heap_head#1 ] Allocated zp[2]:55 [ malloc::size#3 ] Allocated zp[2]:57 [ SCREEN_DIST#0 ] @@ -4845,9 +4850,9 @@ sqr: { init_squares: { .label __3 = $7c .label __4 = $7d - .label squares = $32 - .label sqr = $30 - .label i = $34 + .label squares = $33 + .label sqr = $31 + .label i = $30 // [178] call malloc // [190] phi from init_squares to malloc [phi:init_squares->malloc] malloc_from_init_squares: @@ -4858,9 +4863,9 @@ init_squares: { sta.z malloc.size+1 // [190] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:init_squares->malloc#1] -- register_copy jsr malloc - jmp __b2 - // init_squares::@2 - __b2: + jmp __b3 + // init_squares::@3 + __b3: // [179] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 -- pvoz1=pvoz2 lda.z malloc.mem sta.z SQUARES @@ -4871,34 +4876,39 @@ init_squares: { sta.z squares lda.z SQUARES+1 sta.z squares+1 - // [181] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] - __b1_from___b2: - // [181] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#0] -- vbuz1=vbuc1 - lda #0 - sta.z i - // [181] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@2->init_squares::@1#1] -- register_copy - // [181] phi (word) init_squares::sqr#2 = (word) 0 [phi:init_squares::@2->init_squares::@1#2] -- vwuz1=vwuc1 + // [181] phi from init_squares::@3 to init_squares::@1 [phi:init_squares::@3->init_squares::@1] + __b1_from___b3: + // [181] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@3->init_squares::@1#0] -- register_copy + // [181] phi (word) init_squares::sqr#2 = (word) 0 [phi:init_squares::@3->init_squares::@1#1] -- vwuz1=vwuc1 lda #<0 sta.z sqr lda #>0 sta.z sqr+1 - jmp __b1 - // [181] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] - __b1_from___b1: - // [181] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy - // [181] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy - // [181] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy + // [181] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@3->init_squares::@1#2] -- vbuz1=vbuc1 + lda #0 + sta.z i jmp __b1 // init_squares::@1 __b1: - // [182] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 + // [182] if((byte) init_squares::i#2<(const byte) NUM_SQUARES#3) goto init_squares::@2 -- vbuz1_lt_vbuc1_then_la1 + lda.z i + cmp #NUM_SQUARES + bcc __b2 + jmp __breturn + // init_squares::@return + __breturn: + // [183] return + rts + // init_squares::@2 + __b2: + // [184] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 ldy #0 lda.z sqr sta (squares),y iny lda.z sqr+1 sta (squares),y - // [183] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + // [185] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 lda #SIZEOF_WORD clc adc.z squares @@ -4906,15 +4916,15 @@ init_squares: { bcc !+ inc.z squares+1 !: - // [184] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + // [186] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda.z i asl sta.z __3 - // [185] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuz1=vbuz2_plus_1 + // [187] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuz1=vbuz2_plus_1 ldy.z __3 iny sty.z __4 - // [186] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuz2 + // [188] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuz2 lda.z __4 clc adc.z sqr @@ -4922,17 +4932,14 @@ init_squares: { bcc !+ inc.z sqr+1 !: - // [187] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuz1=_inc_vbuz1 + // [189] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuz1=_inc_vbuz1 inc.z i - // [188] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuz1_neq_vbuc1_then_la1 - lda #NUM_SQUARES-1+1 - cmp.z i - bne __b1_from___b1 - jmp __breturn - // init_squares::@return - __breturn: - // [189] return - rts + // [181] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] + __b1_from___b2: + // [181] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@2->init_squares::@1#0] -- register_copy + // [181] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@2->init_squares::@1#1] -- register_copy + // [181] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@2->init_squares::@1#2] -- register_copy + jmp __b1 } // malloc // Allocates a block of size bytes of memory, returning a pointer to the beginning of the block. @@ -5085,12 +5092,12 @@ Statement [174] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ SQUARES#1 sq Statement [175] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqr:114 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#11 init_dist_screen::screen_bottomline#11 sqr::return#0 SQUARES#1 ] main:7::init_dist_screen:10::sqr:129 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#11 init_dist_screen::screen_bottomline#11 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 SQUARES#1 ] ) always clobbers reg byte a reg byte y Statement [179] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [ SQUARES#1 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 ] ) always clobbers reg byte a Statement [180] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 [ SQUARES#1 init_squares::squares#0 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::squares#0 ] ) always clobbers reg byte a -Statement [182] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte a as potential for zp[1]:52 [ init_squares::i#2 init_squares::i#1 ] -Removing always clobbered register reg byte y as potential for zp[1]:52 [ init_squares::i#2 init_squares::i#1 ] -Statement [183] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [184] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a -Statement [186] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [184] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#2 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#2 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte a as potential for zp[1]:48 [ init_squares::i#2 init_squares::i#1 ] +Removing always clobbered register reg byte y as potential for zp[1]:48 [ init_squares::i#2 init_squares::i#1 ] +Statement [185] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [186] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 init_squares::$3 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a +Statement [188] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a Statement [191] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 [ malloc::mem#0 ] ( malloc:2 [ malloc::mem#0 ] malloc:4 [ malloc::mem#0 ] main:7::init_dist_screen:10::init_squares:106::malloc:178 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 ] ) always clobbers reg byte a Statement [192] (byte*) heap_head#1 ← (byte*) malloc::mem#0 [ malloc::mem#0 heap_head#1 ] ( malloc:2 [ malloc::mem#0 heap_head#1 ] malloc:4 [ malloc::mem#0 heap_head#1 ] main:7::init_dist_screen:10::init_squares:106::malloc:178 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 heap_head#1 ] ) always clobbers reg byte a Statement [3] (void*) SCREEN_DIST#0 ← (void*)(byte*) malloc::mem#0 [ SCREEN_DIST#0 heap_head#1 ] ( [ SCREEN_DIST#0 heap_head#1 ] ) always clobbers reg byte a @@ -5197,10 +5204,10 @@ Statement [174] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ SQUARES#1 sq Statement [175] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqr:114 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#11 init_dist_screen::screen_bottomline#11 sqr::return#0 SQUARES#1 ] main:7::init_dist_screen:10::sqr:129 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#11 init_dist_screen::screen_bottomline#11 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 SQUARES#1 ] ) always clobbers reg byte a reg byte y Statement [179] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [ SQUARES#1 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 ] ) always clobbers reg byte a Statement [180] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 [ SQUARES#1 init_squares::squares#0 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::squares#0 ] ) always clobbers reg byte a -Statement [182] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y -Statement [183] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [184] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a -Statement [186] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [184] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#2 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#2 ] ) always clobbers reg byte a reg byte y +Statement [185] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [186] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 init_squares::$3 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a +Statement [188] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a Statement [191] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 [ malloc::mem#0 ] ( malloc:2 [ malloc::mem#0 ] malloc:4 [ malloc::mem#0 ] main:7::init_dist_screen:10::init_squares:106::malloc:178 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 ] ) always clobbers reg byte a Statement [192] (byte*) heap_head#1 ← (byte*) malloc::mem#0 [ malloc::mem#0 heap_head#1 ] ( malloc:2 [ malloc::mem#0 heap_head#1 ] malloc:4 [ malloc::mem#0 heap_head#1 ] main:7::init_dist_screen:10::init_squares:106::malloc:178 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 heap_head#1 ] ) always clobbers reg byte a Statement [3] (void*) SCREEN_DIST#0 ← (void*)(byte*) malloc::mem#0 [ SCREEN_DIST#0 heap_head#1 ] ( [ SCREEN_DIST#0 heap_head#1 ] ) always clobbers reg byte a @@ -5306,10 +5313,10 @@ Statement [174] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ SQUARES#1 sq Statement [175] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 SQUARES#1 ] ( main:7::init_dist_screen:10::sqr:114 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#11 init_dist_screen::screen_bottomline#11 sqr::return#0 SQUARES#1 ] main:7::init_dist_screen:10::sqr:129 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::y#10 init_dist_screen::screen_topline#11 init_dist_screen::screen_bottomline#11 init_dist_screen::yds#0 init_dist_screen::x#2 init_dist_screen::xb#2 sqr::return#0 SQUARES#1 ] ) always clobbers reg byte a reg byte y Statement [179] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 [ SQUARES#1 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 ] ) always clobbers reg byte a Statement [180] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 [ SQUARES#1 init_squares::squares#0 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::squares#0 ] ) always clobbers reg byte a -Statement [182] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y -Statement [183] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [184] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a -Statement [186] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [184] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#2 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#2 ] ) always clobbers reg byte a reg byte y +Statement [185] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [186] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 init_squares::$3 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a +Statement [188] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:7::init_dist_screen:10::init_squares:106 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 SQUARES#1 init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a Statement [191] (byte*) malloc::mem#0 ← (byte*) heap_head#12 - (word) malloc::size#3 [ malloc::mem#0 ] ( malloc:2 [ malloc::mem#0 ] malloc:4 [ malloc::mem#0 ] main:7::init_dist_screen:10::init_squares:106::malloc:178 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 ] ) always clobbers reg byte a Statement [192] (byte*) heap_head#1 ← (byte*) malloc::mem#0 [ malloc::mem#0 heap_head#1 ] ( malloc:2 [ malloc::mem#0 heap_head#1 ] malloc:4 [ malloc::mem#0 heap_head#1 ] main:7::init_dist_screen:10::init_squares:106::malloc:178 [ SCREEN_DIST#0 SCREEN_ANGLE#0 init_dist_screen::screen#0 malloc::mem#0 heap_head#1 ] ) always clobbers reg byte a Potential registers zp[2]:2 [ main::fill#2 main::fill#1 ] : zp[2]:2 , @@ -5341,9 +5348,9 @@ Potential registers zp[1]:43 [ init_dist_screen::xd#0 init_dist_screen::$16 init Potential registers zp[2]:44 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] : zp[2]:44 , Potential registers zp[1]:46 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] : zp[1]:46 , reg byte x , Potential registers zp[1]:47 [ sqr::val#2 sqr::val#1 sqr::val#0 ] : zp[1]:47 , reg byte a , reg byte x , reg byte y , -Potential registers zp[2]:48 [ init_squares::sqr#2 init_squares::sqr#1 ] : zp[2]:48 , -Potential registers zp[2]:50 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] : zp[2]:50 , -Potential registers zp[1]:52 [ init_squares::i#2 init_squares::i#1 ] : zp[1]:52 , reg byte x , +Potential registers zp[1]:48 [ init_squares::i#2 init_squares::i#1 ] : zp[1]:48 , reg byte x , +Potential registers zp[2]:49 [ init_squares::sqr#2 init_squares::sqr#1 ] : zp[2]:49 , +Potential registers zp[2]:51 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] : zp[2]:51 , Potential registers zp[2]:53 [ heap_head#12 heap_head#1 ] : zp[2]:53 , Potential registers zp[2]:55 [ malloc::size#3 ] : zp[2]:55 , Potential registers zp[2]:57 [ SCREEN_DIST#0 ] : zp[2]:57 , @@ -5400,7 +5407,7 @@ Uplift Scope [init_dist_screen] 707: zp[1]:43 [ init_dist_screen::xd#0 init_dist Uplift Scope [main] 588: zp[2]:12 [ main::min_dist_angle#3 main::min_dist_angle#7 main::min_dist_angle#8 main::dist_angle#0 ] 311.79: zp[2]:10 [ main::min_fill#5 main::min_fill#2 main::min_fill#10 ] 303: zp[2]:8 [ main::min_dist_angle#2 main::min_dist_angle#6 ] 141.4: zp[2]:2 [ main::fill#2 main::fill#1 ] 107.39: zp[2]:6 [ main::angle#2 main::angle#0 main::angle#1 ] 90.65: zp[2]:4 [ main::dist#2 main::dist#0 main::dist#1 ] Uplift Scope [sqr] 338: zp[1]:47 [ sqr::val#2 sqr::val#1 sqr::val#0 ] 202: zp[2]:92 [ sqr::return#3 ] 28.5: zp[2]:120 [ sqr::return#0 ] 22: zp[2]:87 [ sqr::return#2 ] 4: zp[1]:119 [ sqr::$0 ] Uplift Scope [sqrt] 202: zp[1]:100 [ sqrt::return#2 ] 103: zp[2]:98 [ sqrt::val#0 ] 34.33: zp[1]:112 [ sqrt::return#0 ] 4: zp[2]:106 [ sqrt::found#0 ] 4: zp[2]:108 [ sqrt::$3 ] 2: zp[2]:110 [ sqrt::$1 ] -Uplift Scope [init_squares] 25.17: zp[2]:50 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] 22: zp[1]:52 [ init_squares::i#2 init_squares::i#1 ] 22: zp[1]:124 [ init_squares::$3 ] 22: zp[1]:125 [ init_squares::$4 ] 13.93: zp[2]:48 [ init_squares::sqr#2 init_squares::sqr#1 ] +Uplift Scope [init_squares] 28.29: zp[1]:48 [ init_squares::i#2 init_squares::i#1 ] 22: zp[1]:124 [ init_squares::$3 ] 22: zp[1]:125 [ init_squares::$4 ] 20.07: zp[2]:51 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] 16.5: zp[2]:49 [ init_squares::sqr#2 init_squares::sqr#1 ] Uplift Scope [] 6.6: zp[2]:53 [ heap_head#12 heap_head#1 ] 0.09: zp[2]:59 [ SCREEN_ANGLE#0 ] 0.08: zp[2]:57 [ SCREEN_DIST#0 ] 0.03: zp[2]:122 [ SQUARES#1 ] Uplift Scope [malloc] 2: zp[2]:55 [ malloc::size#3 ] 0.67: zp[2]:126 [ malloc::mem#0 ] Uplift Scope [RADIX] @@ -5415,7 +5422,7 @@ Limited combination testing to 100 combinations of 6144 possible. Uplifting [main] best 1223486 combination zp[2]:12 [ main::min_dist_angle#3 main::min_dist_angle#7 main::min_dist_angle#8 main::dist_angle#0 ] zp[2]:10 [ main::min_fill#5 main::min_fill#2 main::min_fill#10 ] zp[2]:8 [ main::min_dist_angle#2 main::min_dist_angle#6 ] zp[2]:2 [ main::fill#2 main::fill#1 ] zp[2]:6 [ main::angle#2 main::angle#0 main::angle#1 ] zp[2]:4 [ main::dist#2 main::dist#0 main::dist#1 ] Uplifting [sqr] best 1223149 combination reg byte a [ sqr::val#2 sqr::val#1 sqr::val#0 ] zp[2]:92 [ sqr::return#3 ] zp[2]:120 [ sqr::return#0 ] zp[2]:87 [ sqr::return#2 ] reg byte a [ sqr::$0 ] Uplifting [sqrt] best 1222246 combination reg byte a [ sqrt::return#2 ] zp[2]:98 [ sqrt::val#0 ] reg byte a [ sqrt::return#0 ] zp[2]:106 [ sqrt::found#0 ] zp[2]:108 [ sqrt::$3 ] zp[2]:110 [ sqrt::$1 ] -Uplifting [init_squares] best 1222046 combination zp[2]:50 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] reg byte x [ init_squares::i#2 init_squares::i#1 ] reg byte a [ init_squares::$3 ] reg byte a [ init_squares::$4 ] zp[2]:48 [ init_squares::sqr#2 init_squares::sqr#1 ] +Uplifting [init_squares] best 1222046 combination reg byte x [ init_squares::i#2 init_squares::i#1 ] reg byte a [ init_squares::$3 ] reg byte a [ init_squares::$4 ] zp[2]:51 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] zp[2]:49 [ init_squares::sqr#2 init_squares::sqr#1 ] Uplifting [] best 1222046 combination zp[2]:53 [ heap_head#12 heap_head#1 ] zp[2]:59 [ SCREEN_ANGLE#0 ] zp[2]:57 [ SCREEN_DIST#0 ] zp[2]:122 [ SQUARES#1 ] Uplifting [malloc] best 1222046 combination zp[2]:55 [ malloc::size#3 ] zp[2]:126 [ malloc::mem#0 ] Uplifting [RADIX] best 1222046 combination @@ -5472,12 +5479,12 @@ Coalescing zero page register [ zp[1]:35 [ init_dist_screen::y#10 init_dist_scre Coalescing zero page register [ zp[2]:36 [ init_dist_screen::screen_topline#11 init_dist_screen::screen#0 init_dist_screen::screen_topline#1 ] ] with [ zp[2]:33 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] ] Coalescing zero page register [ zp[1]:41 [ init_dist_screen::x#2 init_dist_screen::x#1 ] ] with [ zp[1]:19 [ init_angle_screen::x#2 init_angle_screen::x#1 ] ] Coalescing zero page register [ zp[1]:42 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ] ] with [ zp[1]:20 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] ] -Coalescing zero page register [ zp[2]:48 [ init_squares::sqr#2 init_squares::sqr#1 ] ] with [ zp[2]:38 [ init_dist_screen::screen_bottomline#11 init_dist_screen::screen_bottomline#0 init_dist_screen::screen_bottomline#1 ] ] -Coalescing zero page register [ zp[2]:50 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] ] with [ zp[2]:44 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 ] ] +Coalescing zero page register [ zp[2]:49 [ init_squares::sqr#2 init_squares::sqr#1 ] ] with [ zp[2]:38 [ init_dist_screen::screen_bottomline#11 init_dist_screen::screen_bottomline#0 init_dist_screen::screen_bottomline#1 ] ] +Coalescing zero page register [ zp[2]:51 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ] ] with [ zp[2]:44 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 ] ] Coalescing zero page register [ zp[2]:65 [ init_angle_screen::xw#0 atan2_16::x#0 ] ] with [ zp[2]:53 [ heap_head#12 heap_head#1 ] ] Coalescing zero page register [ zp[2]:68 [ init_angle_screen::yw#0 atan2_16::y#0 ] ] with [ zp[2]:55 [ malloc::size#3 malloc::mem#0 SQUARES#1 ] ] -Coalescing zero page register [ zp[2]:48 [ init_squares::sqr#2 init_squares::sqr#1 init_dist_screen::screen_bottomline#11 init_dist_screen::screen_bottomline#0 init_dist_screen::screen_bottomline#1 ] ] with [ zp[2]:15 [ init_angle_screen::screen_topline#6 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 main::fill#2 main::fill#1 ] ] -Coalescing zero page register [ zp[2]:50 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 ] ] with [ zp[2]:17 [ init_angle_screen::screen_bottomline#6 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 main::dist#2 main::dist#0 main::dist#1 ] ] +Coalescing zero page register [ zp[2]:49 [ init_squares::sqr#2 init_squares::sqr#1 init_dist_screen::screen_bottomline#11 init_dist_screen::screen_bottomline#0 init_dist_screen::screen_bottomline#1 ] ] with [ zp[2]:15 [ init_angle_screen::screen_topline#6 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 main::fill#2 main::fill#1 ] ] +Coalescing zero page register [ zp[2]:51 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 ] ] with [ zp[2]:17 [ init_angle_screen::screen_bottomline#6 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 main::dist#2 main::dist#0 main::dist#1 ] ] Coalescing zero page register [ zp[2]:87 [ sqr::return#2 init_dist_screen::yds#0 ] ] with [ zp[2]:21 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 main::angle#2 main::angle#0 main::angle#1 ] ] Coalescing zero page register [ zp[2]:92 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 ] ] with [ zp[2]:23 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 main::min_dist_angle#2 main::min_dist_angle#6 ] ] Coalescing zero page register [ zp[2]:115 [ bsearch16u::pivot#0 ] ] with [ zp[2]:26 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$11 main::min_fill#5 main::min_fill#2 main::min_fill#10 ] ] @@ -5486,8 +5493,8 @@ Allocated (was zp[1]:35) zp[1]:2 [ init_dist_screen::y#10 init_dist_screen::y#1 Allocated (was zp[2]:36) zp[2]:3 [ init_dist_screen::screen_topline#11 init_dist_screen::screen#0 init_dist_screen::screen_topline#1 atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] Allocated (was zp[1]:41) zp[1]:5 [ init_dist_screen::x#2 init_dist_screen::x#1 init_angle_screen::x#2 init_angle_screen::x#1 ] Allocated (was zp[1]:42) zp[1]:6 [ init_dist_screen::xb#2 init_dist_screen::xb#1 init_angle_screen::xb#2 init_angle_screen::xb#1 ] -Allocated (was zp[2]:48) zp[2]:7 [ init_squares::sqr#2 init_squares::sqr#1 init_dist_screen::screen_bottomline#11 init_dist_screen::screen_bottomline#0 init_dist_screen::screen_bottomline#1 init_angle_screen::screen_topline#6 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 main::fill#2 main::fill#1 ] -Allocated (was zp[2]:50) zp[2]:9 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 init_angle_screen::screen_bottomline#6 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 main::dist#2 main::dist#0 main::dist#1 ] +Allocated (was zp[2]:49) zp[2]:7 [ init_squares::sqr#2 init_squares::sqr#1 init_dist_screen::screen_bottomline#11 init_dist_screen::screen_bottomline#0 init_dist_screen::screen_bottomline#1 init_angle_screen::screen_topline#6 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 main::fill#2 main::fill#1 ] +Allocated (was zp[2]:51) zp[2]:9 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 init_angle_screen::screen_bottomline#6 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 main::dist#2 main::dist#0 main::dist#1 ] Allocated (was zp[2]:57) zp[2]:11 [ SCREEN_DIST#0 ] Allocated (was zp[2]:59) zp[2]:13 [ SCREEN_ANGLE#0 ] Allocated (was zp[2]:65) zp[2]:15 [ init_angle_screen::xw#0 atan2_16::x#0 heap_head#12 heap_head#1 ] @@ -6684,42 +6691,46 @@ init_squares: { sta.z malloc.size+1 // [190] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:init_squares->malloc#1] -- register_copy jsr malloc - jmp __b2 - // init_squares::@2 - __b2: + jmp __b3 + // init_squares::@3 + __b3: // [179] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 // [180] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1 -- pwuz1=pwuz2 lda.z SQUARES sta.z squares lda.z SQUARES+1 sta.z squares+1 - // [181] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] - __b1_from___b2: - // [181] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#0] -- vbuxx=vbuc1 - ldx #0 - // [181] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@2->init_squares::@1#1] -- register_copy - // [181] phi (word) init_squares::sqr#2 = (word) 0 [phi:init_squares::@2->init_squares::@1#2] -- vwuz1=vwuc1 + // [181] phi from init_squares::@3 to init_squares::@1 [phi:init_squares::@3->init_squares::@1] + __b1_from___b3: + // [181] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@3->init_squares::@1#0] -- register_copy + // [181] phi (word) init_squares::sqr#2 = (word) 0 [phi:init_squares::@3->init_squares::@1#1] -- vwuz1=vwuc1 lda #<0 sta.z sqr lda #>0 sta.z sqr+1 - jmp __b1 - // [181] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] - __b1_from___b1: - // [181] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy - // [181] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy - // [181] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy + // [181] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@3->init_squares::@1#2] -- vbuxx=vbuc1 + ldx #0 jmp __b1 // init_squares::@1 __b1: - // [182] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 + // [182] if((byte) init_squares::i#2<(const byte) NUM_SQUARES#3) goto init_squares::@2 -- vbuxx_lt_vbuc1_then_la1 + cpx #NUM_SQUARES + bcc __b2 + jmp __breturn + // init_squares::@return + __breturn: + // [183] return + rts + // init_squares::@2 + __b2: + // [184] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 ldy #0 lda.z sqr sta (squares),y iny lda.z sqr+1 sta (squares),y - // [183] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + // [185] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 lda #SIZEOF_WORD clc adc.z squares @@ -6727,29 +6738,27 @@ init_squares: { bcc !+ inc.z squares+1 !: - // [184] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + // [186] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 txa asl - // [185] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuaa=vbuaa_plus_1 + // [187] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuaa=vbuaa_plus_1 clc adc #1 - // [186] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuaa + // [188] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuaa clc adc.z sqr sta.z sqr bcc !+ inc.z sqr+1 !: - // [187] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuxx=_inc_vbuxx + // [189] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuxx=_inc_vbuxx inx - // [188] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuxx_neq_vbuc1_then_la1 - cpx #NUM_SQUARES-1+1 - bne __b1_from___b1 - jmp __breturn - // init_squares::@return - __breturn: - // [189] return - rts + // [181] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] + __b1_from___b2: + // [181] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@2->init_squares::@1#0] -- register_copy + // [181] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@2->init_squares::@1#1] -- register_copy + // [181] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@2->init_squares::@1#2] -- register_copy + jmp __b1 } // malloc // Allocates a block of size bytes of memory, returning a pointer to the beginning of the block. @@ -6843,7 +6852,7 @@ Removing instruction jmp __b8 Removing instruction jmp __b9 Removing instruction jmp __b7 Removing instruction jmp __breturn -Removing instruction jmp __b2 +Removing instruction jmp __b3 Removing instruction jmp __b1 Removing instruction jmp __breturn Removing instruction jmp __breturn @@ -6858,8 +6867,8 @@ Replacing instruction ldx #0 with TAX Removing instruction ldy.z x Removing instruction ldy.z xb Removing instruction lda.z result+1 -Replacing instruction lda #<0 with TXA Removing instruction lda #>0 +Replacing instruction ldx #0 with TAX Succesful ASM optimization Pass5UnnecesaryLoadElimination Replacing label __bbegin with __b1 Replacing label __b3_from___b11 with __b3 @@ -6881,7 +6890,6 @@ Replacing label __b2_from___b5 with __b2 Replacing label __breturn_from___b8 with __b2 Replacing label __b7_from___b6 with __b7 Replacing label __b7_from___b6 with __b7 -Replacing label __b1_from___b1 with __b1 Removing instruction __bbegin: Removing instruction __b1_from___bbegin: Removing instruction malloc_from___b1: @@ -6925,7 +6933,6 @@ Removing instruction __breturn_from___b8: Removing instruction __breturn: Removing instruction __b7_from___b6: Removing instruction __b7_from___b9: -Removing instruction __b1_from___b1: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction __b3: Removing instruction malloc_from___b3: @@ -6975,9 +6982,10 @@ Removing instruction __b9: Removing instruction __b3_from___b7: Removing instruction __breturn: Removing instruction malloc_from_init_squares: -Removing instruction __b2: -Removing instruction __b1_from___b2: +Removing instruction __b3: +Removing instruction __b1_from___b3: Removing instruction __breturn: +Removing instruction __b1_from___b2: Removing instruction __breturn: Succesful ASM optimization Pass5UnusedLabelElimination Replacing jump to rts with rts in jmp __b2 @@ -6986,7 +6994,6 @@ Adding RTS to root block Succesful ASM optimization Pass5AddMainRts Removing instruction jmp __b1 Removing instruction jmp __b1 -Removing instruction jmp __b1 Succesful ASM optimization Pass5NextJumpElimination Removing instruction ldy #0 Succesful ASM optimization Pass5UnnecesaryLoadElimination @@ -7236,17 +7243,18 @@ FINAL SYMBOL TABLE (byte~) init_squares::$4 reg byte a 22.0 (label) init_squares::@1 (label) init_squares::@2 +(label) init_squares::@3 (label) init_squares::@return (byte) init_squares::i -(byte) init_squares::i#1 reg byte x 16.5 -(byte) init_squares::i#2 reg byte x 5.5 +(byte) init_squares::i#1 reg byte x 22.0 +(byte) init_squares::i#2 reg byte x 6.285714285714286 (word) init_squares::sqr -(word) init_squares::sqr#1 sqr zp[2]:7 7.333333333333333 -(word) init_squares::sqr#2 sqr zp[2]:7 6.6000000000000005 +(word) init_squares::sqr#1 sqr zp[2]:7 11.0 +(word) init_squares::sqr#2 sqr zp[2]:7 5.5 (word*) init_squares::squares (word*) init_squares::squares#0 squares zp[2]:9 4.0 -(word*) init_squares::squares#1 squares zp[2]:9 3.6666666666666665 -(word*) init_squares::squares#2 squares zp[2]:9 17.5 +(word*) init_squares::squares#1 squares zp[2]:9 4.4 +(word*) init_squares::squares#2 squares zp[2]:9 11.666666666666666 (void()) main() (label) main::@1 (label) main::@10 @@ -7325,9 +7333,9 @@ zp[1]:6 [ init_dist_screen::xb#2 init_dist_screen::xb#1 init_angle_screen::xb#2 reg byte a [ init_dist_screen::xd#0 init_dist_screen::$16 init_dist_screen::$14 ] reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] reg byte a [ sqr::val#2 sqr::val#1 sqr::val#0 ] +reg byte x [ init_squares::i#2 init_squares::i#1 ] zp[2]:7 [ init_squares::sqr#2 init_squares::sqr#1 init_dist_screen::screen_bottomline#11 init_dist_screen::screen_bottomline#0 init_dist_screen::screen_bottomline#1 init_angle_screen::screen_topline#6 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 main::fill#2 main::fill#1 ] zp[2]:9 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 init_angle_screen::screen_bottomline#6 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 main::dist#2 main::dist#0 main::dist#1 ] -reg byte x [ init_squares::i#2 init_squares::i#1 ] zp[2]:11 [ SCREEN_DIST#0 ] zp[2]:13 [ SCREEN_ANGLE#0 ] reg byte a [ init_angle_screen::$3 ] @@ -7358,7 +7366,7 @@ reg byte a [ init_squares::$4 ] FINAL ASSEMBLER -Score: 1112746 +Score: 1112776 // File Comments // Fill screen using a spiral based on distance-to-center / angle-to-center @@ -8503,7 +8511,7 @@ init_squares: { sta.z malloc.size+1 // [190] phi (byte*) heap_head#12 = (byte*) heap_head#1 [phi:init_squares->malloc#1] -- register_copy jsr malloc - // init_squares::@2 + // init_squares::@3 // malloc(NUM_SQUARES*sizeof(word)) // [179] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0 // squares = SQUARES @@ -8512,22 +8520,28 @@ init_squares: { sta.z squares lda.z SQUARES+1 sta.z squares+1 - // [181] phi from init_squares::@2 to init_squares::@1 [phi:init_squares::@2->init_squares::@1] - // [181] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@2->init_squares::@1#0] -- vbuxx=vbuc1 - ldx #0 - // [181] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@2->init_squares::@1#1] -- register_copy - // [181] phi (word) init_squares::sqr#2 = (word) 0 [phi:init_squares::@2->init_squares::@1#2] -- vwuz1=vwuc1 - txa + // [181] phi from init_squares::@3 to init_squares::@1 [phi:init_squares::@3->init_squares::@1] + // [181] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#0 [phi:init_squares::@3->init_squares::@1#0] -- register_copy + // [181] phi (word) init_squares::sqr#2 = (word) 0 [phi:init_squares::@3->init_squares::@1#1] -- vwuz1=vwuc1 + lda #<0 sta.z sqr sta.z sqr+1 - // [181] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] - // [181] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy - // [181] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy - // [181] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy + // [181] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares::@3->init_squares::@1#2] -- vbuxx=vbuc1 + tax // init_squares::@1 __b1: + // for(byte i=0;iinit_squares::@1] + // [181] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@2->init_squares::@1#0] -- register_copy + // [181] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@2->init_squares::@1#1] -- register_copy + // [181] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@2->init_squares::@1#2] -- register_copy + jmp __b1 } // malloc // Allocates a block of size bytes of memory, returning a pointer to the beginning of the block. diff --git a/src/test/ref/screen-show-spiral.sym b/src/test/ref/screen-show-spiral.sym index eed1c44ba..aea3500bd 100644 --- a/src/test/ref/screen-show-spiral.sym +++ b/src/test/ref/screen-show-spiral.sym @@ -239,17 +239,18 @@ (byte~) init_squares::$4 reg byte a 22.0 (label) init_squares::@1 (label) init_squares::@2 +(label) init_squares::@3 (label) init_squares::@return (byte) init_squares::i -(byte) init_squares::i#1 reg byte x 16.5 -(byte) init_squares::i#2 reg byte x 5.5 +(byte) init_squares::i#1 reg byte x 22.0 +(byte) init_squares::i#2 reg byte x 6.285714285714286 (word) init_squares::sqr -(word) init_squares::sqr#1 sqr zp[2]:7 7.333333333333333 -(word) init_squares::sqr#2 sqr zp[2]:7 6.6000000000000005 +(word) init_squares::sqr#1 sqr zp[2]:7 11.0 +(word) init_squares::sqr#2 sqr zp[2]:7 5.5 (word*) init_squares::squares (word*) init_squares::squares#0 squares zp[2]:9 4.0 -(word*) init_squares::squares#1 squares zp[2]:9 3.6666666666666665 -(word*) init_squares::squares#2 squares zp[2]:9 17.5 +(word*) init_squares::squares#1 squares zp[2]:9 4.4 +(word*) init_squares::squares#2 squares zp[2]:9 11.666666666666666 (void()) main() (label) main::@1 (label) main::@10 @@ -328,9 +329,9 @@ zp[1]:6 [ init_dist_screen::xb#2 init_dist_screen::xb#1 init_angle_screen::xb#2 reg byte a [ init_dist_screen::xd#0 init_dist_screen::$16 init_dist_screen::$14 ] reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] reg byte a [ sqr::val#2 sqr::val#1 sqr::val#0 ] +reg byte x [ init_squares::i#2 init_squares::i#1 ] zp[2]:7 [ init_squares::sqr#2 init_squares::sqr#1 init_dist_screen::screen_bottomline#11 init_dist_screen::screen_bottomline#0 init_dist_screen::screen_bottomline#1 init_angle_screen::screen_topline#6 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 main::fill#2 main::fill#1 ] zp[2]:9 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 init_angle_screen::screen_bottomline#6 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 main::dist#2 main::dist#0 main::dist#1 ] -reg byte x [ init_squares::i#2 init_squares::i#1 ] zp[2]:11 [ SCREEN_DIST#0 ] zp[2]:13 [ SCREEN_ANGLE#0 ] reg byte a [ init_angle_screen::$3 ]