const vmt_TV :TV.Start const vmt_Tree :Tree.Init :Tree.SetRight :Tree.SetLeft :Tree.GetRight :Tree.GetLeft :Tree.GetKey :Tree.SetKey :Tree.GetHas_Right :Tree.GetHas_Left :Tree.SetHas_Left :Tree.SetHas_Right :Tree.Compare :Tree.Insert :Tree.Delete :Tree.Remove :Tree.RemoveRight :Tree.RemoveLeft :Tree.Search :Tree.Print :Tree.RecPrint :Tree.accept const vmt_Visitor :Visitor.visit const vmt_MyVisitor :MyVisitor.visit func Main [in 0, out 0, local 0] $t0 = HeapAllocZ(4) [$t0] = :vmt_TV if $t0 goto :null1 Error("null pointer") null1: $t1 = [$t0] $t1 = [$t1] $a0 = $t0 call $t1 $t1 = $v0 PrintIntS($t1) ret func TV.Start [in 0, out 0, local 1] local[0] = $s0 $t0 = HeapAllocZ(28) [$t0] = :vmt_Tree $s0 = $t0 if $s0 goto :null2 Error("null pointer") null2: $t0 = [$s0] $t0 = [$t0] $a0 = $s0 $a1 = 16 call $t0 if $s0 goto :null3 Error("null pointer") null3: $t0 = [$s0] $t0 = [$t0+72] $a0 = $s0 call $t0 PrintIntS(100000000) if $s0 goto :null4 Error("null pointer") null4: $t0 = [$s0] $t0 = [$t0+48] $a0 = $s0 $a1 = 8 call $t0 if $s0 goto :null5 Error("null pointer") null5: $t0 = [$s0] $t0 = [$t0+48] $a0 = $s0 $a1 = 24 call $t0 if $s0 goto :null6 Error("null pointer") null6: $t0 = [$s0] $t0 = [$t0+48] $a0 = $s0 $a1 = 4 call $t0 if $s0 goto :null7 Error("null pointer") null7: $t0 = [$s0] $t0 = [$t0+48] $a0 = $s0 $a1 = 12 call $t0 if $s0 goto :null8 Error("null pointer") null8: $t0 = [$s0] $t0 = [$t0+48] $a0 = $s0 $a1 = 20 call $t0 if $s0 goto :null9 Error("null pointer") null9: $t0 = [$s0] $t0 = [$t0+48] $a0 = $s0 $a1 = 28 call $t0 if $s0 goto :null10 Error("null pointer") null10: $t0 = [$s0] $t0 = [$t0+48] $a0 = $s0 $a1 = 14 call $t0 if $s0 goto :null11 Error("null pointer") null11: $t0 = [$s0] $t0 = [$t0+72] $a0 = $s0 call $t0 PrintIntS(100000000) $t0 = HeapAllocZ(12) [$t0] = :vmt_MyVisitor $t0 = $t0 PrintIntS(50000000) if $s0 goto :null12 Error("null pointer") null12: $t1 = [$s0] $t1 = [$t1+80] $a0 = $s0 $a1 = $t0 call $t1 PrintIntS(100000000) if $s0 goto :null13 Error("null pointer") null13: $t1 = [$s0] $t1 = [$t1+68] $a0 = $s0 $a1 = 24 call $t1 $t1 = $v0 PrintIntS($t1) if $s0 goto :null14 Error("null pointer") null14: $t1 = [$s0] $t1 = [$t1+68] $a0 = $s0 $a1 = 12 call $t1 $t1 = $v0 PrintIntS($t1) if $s0 goto :null15 Error("null pointer") null15: $t1 = [$s0] $t1 = [$t1+68] $a0 = $s0 $a1 = 16 call $t1 $t1 = $v0 PrintIntS($t1) if $s0 goto :null16 Error("null pointer") null16: $t1 = [$s0] $t1 = [$t1+68] $a0 = $s0 $a1 = 50 call $t1 $t1 = $v0 PrintIntS($t1) if $s0 goto :null17 Error("null pointer") null17: $t1 = [$s0] $t1 = [$t1+68] $a0 = $s0 $a1 = 12 call $t1 $t1 = $v0 PrintIntS($t1) if $s0 goto :null18 Error("null pointer") null18: $t1 = [$s0] $t1 = [$t1+52] $a0 = $s0 $a1 = 12 call $t1 if $s0 goto :null19 Error("null pointer") null19: $t1 = [$s0] $t1 = [$t1+72] $a0 = $s0 call $t1 if $s0 goto :null20 Error("null pointer") null20: $t1 = [$s0] $t1 = [$t1+68] $a0 = $s0 $a1 = 12 call $t1 $t1 = $v0 PrintIntS($t1) $v0 = 0 $s0 = local[0] ret func Tree.Init [in 0, out 0, local 0] $t0 = $a0 $t1 = $a1 [$t0+12] = $t1 [$t0+16] = 0 [$t0+20] = 0 $v0 = 1 ret func Tree.SetRight [in 0, out 0, local 0] $t0 = $a0 $t1 = $a1 [$t0+8] = $t1 $v0 = 1 ret func Tree.SetLeft [in 0, out 0, local 0] $t0 = $a0 $t1 = $a1 [$t0+4] = $t1 $v0 = 1 ret func Tree.GetRight [in 0, out 0, local 0] $t0 = $a0 $t0 = [$t0+8] $v0 = $t0 ret func Tree.GetLeft [in 0, out 0, local 0] $t0 = $a0 $t0 = [$t0+4] $v0 = $t0 ret func Tree.GetKey [in 0, out 0, local 0] $t0 = $a0 $t0 = [$t0+12] $v0 = $t0 ret func Tree.SetKey [in 0, out 0, local 0] $t0 = $a0 $t1 = $a1 [$t0+12] = $t1 $v0 = 1 ret func Tree.GetHas_Right [in 0, out 0, local 0] $t0 = $a0 $t0 = [$t0+20] $v0 = $t0 ret func Tree.GetHas_Left [in 0, out 0, local 0] $t0 = $a0 $t0 = [$t0+16] $v0 = $t0 ret func Tree.SetHas_Left [in 0, out 0, local 0] $t0 = $a0 $t1 = $a1 [$t0+16] = $t1 $v0 = 1 ret func Tree.SetHas_Right [in 0, out 0, local 0] $t0 = $a0 $t1 = $a1 [$t0+20] = $t1 $v0 = 1 ret func Tree.Compare [in 0, out 0, local 0] $t0 = $a1 $t1 = $a2 $t2 = Add($t1 1) $t1 = LtS($t0 $t1) if0 $t1 goto :if1_else $t1 = 0 goto :if1_end if1_else: $t2 = LtS($t0 $t2) $t2 = Sub(1 $t2) if0 $t2 goto :if2_else $t1 = 0 goto :if2_end if2_else: $t1 = 1 if2_end: if1_end: $v0 = $t1 ret func Tree.Insert [in 0, out 0, local 4] local[0] = $s0 local[1] = $s1 local[2] = $s2 local[3] = $s3 $s0 = $a0 $s1 = $a1 $t0 = HeapAllocZ(28) [$t0] = :vmt_Tree $s2 = $t0 if $s2 goto :null21 Error("null pointer") null21: $t0 = [$s2] $t0 = [$t0] $a0 = $s2 $a1 = $s1 call $t0 $s0 = $s0 $s3 = 1 while1_top: if0 $s3 goto :while1_end if $s0 goto :null22 Error("null pointer") null22: $t0 = [$s0] $t0 = [$t0+20] $a0 = $s0 call $t0 $t0 = $v0 $t0 = LtS($s1 $t0) if0 $t0 goto :if3_else if $s0 goto :null23 Error("null pointer") null23: $t0 = [$s0] $t0 = [$t0+32] $a0 = $s0 call $t0 $t0 = $v0 if0 $t0 goto :if4_else if $s0 goto :null24 Error("null pointer") null24: $t0 = [$s0] $t0 = [$t0+16] $a0 = $s0 call $t0 $s0 = $v0 goto :if4_end if4_else: $s3 = 0 if $s0 goto :null25 Error("null pointer") null25: $t0 = [$s0] $t0 = [$t0+36] $a0 = $s0 $a1 = 1 call $t0 if $s0 goto :null26 Error("null pointer") null26: $t0 = [$s0] $t0 = [$t0+8] $a0 = $s0 $a1 = $s2 call $t0 if4_end: goto :if3_end if3_else: if $s0 goto :null27 Error("null pointer") null27: $t0 = [$s0] $t0 = [$t0+28] $a0 = $s0 call $t0 $t0 = $v0 if0 $t0 goto :if5_else if $s0 goto :null28 Error("null pointer") null28: $t0 = [$s0] $t0 = [$t0+12] $a0 = $s0 call $t0 $s0 = $v0 goto :if5_end if5_else: $s3 = 0 if $s0 goto :null29 Error("null pointer") null29: $t0 = [$s0] $t0 = [$t0+40] $a0 = $s0 $a1 = 1 call $t0 if $s0 goto :null30 Error("null pointer") null30: $t0 = [$s0] $t0 = [$t0+4] $a0 = $s0 $a1 = $s2 call $t0 if5_end: if3_end: goto :while1_top while1_end: $v0 = 1 $s0 = local[0] $s1 = local[1] $s2 = local[2] $s3 = local[3] ret func Tree.Delete [in 0, out 0, local 7] local[0] = $s0 local[1] = $s1 local[2] = $s2 local[3] = $s3 local[4] = $s4 local[5] = $s5 local[6] = $s6 $s0 = $a0 $s1 = $a1 $s2 = $s0 $s3 = $s0 $s4 = 1 $s5 = 0 $s6 = 1 while2_top: if0 $s4 goto :while2_end if $s2 goto :null31 Error("null pointer") null31: $t0 = [$s2] $t0 = [$t0+20] $a0 = $s2 call $t0 $t0 = $v0 $t1 = LtS($s1 $t0) if0 $t1 goto :if6_else if $s2 goto :null32 Error("null pointer") null32: $t1 = [$s2] $t1 = [$t1+32] $a0 = $s2 call $t1 $t1 = $v0 if0 $t1 goto :if7_else $s3 = $s2 if $s2 goto :null33 Error("null pointer") null33: $t1 = [$s2] $t1 = [$t1+16] $a0 = $s2 call $t1 $s2 = $v0 goto :if7_end if7_else: $s4 = 0 if7_end: goto :if6_end if6_else: $t0 = LtS($t0 $s1) if0 $t0 goto :if8_else if $s2 goto :null34 Error("null pointer") null34: $t0 = [$s2] $t0 = [$t0+28] $a0 = $s2 call $t0 $t0 = $v0 if0 $t0 goto :if9_else $s3 = $s2 if $s2 goto :null35 Error("null pointer") null35: $t0 = [$s2] $t0 = [$t0+12] $a0 = $s2 call $t0 $s2 = $v0 goto :if9_end if9_else: $s4 = 0 if9_end: goto :if8_end if8_else: if0 $s6 goto :if10_else if $s2 goto :null36 Error("null pointer") null36: $t0 = [$s2] $t0 = [$t0+28] $a0 = $s2 call $t0 $t0 = $v0 $t0 = Sub(1 $t0) if0 $t0 goto :ss1_else if $s2 goto :null37 Error("null pointer") null37: $t0 = [$s2] $t0 = [$t0+32] $a0 = $s2 call $t0 $t0 = $v0 $t0 = Sub(1 $t0) goto :ss1_end ss1_else: $t0 = 0 ss1_end: if0 $t0 goto :if11_else goto :if11_end if11_else: $t0 = [$s0] $t0 = [$t0+56] $a0 = $s0 $a1 = $s3 $a2 = $s2 call $t0 if11_end: goto :if10_end if10_else: $t0 = [$s0] $t0 = [$t0+56] $a0 = $s0 $a1 = $s3 $a2 = $s2 call $t0 if10_end: $s5 = 1 $s4 = 0 if8_end: if6_end: $s6 = 0 goto :while2_top while2_end: $v0 = $s5 $s0 = local[0] $s1 = local[1] $s2 = local[2] $s3 = local[3] $s4 = local[4] $s5 = local[5] $s6 = local[6] ret func Tree.Remove [in 0, out 0, local 3] local[0] = $s0 local[1] = $s1 local[2] = $s2 $s0 = $a0 $s1 = $a1 $s2 = $a2 if $s2 goto :null38 Error("null pointer") null38: $t0 = [$s2] $t0 = [$t0+32] $a0 = $s2 call $t0 $t0 = $v0 if0 $t0 goto :if12_else $t0 = [$s0] $t0 = [$t0+64] $a0 = $s0 $a1 = $s1 $a2 = $s2 call $t0 goto :if12_end if12_else: if $s2 goto :null39 Error("null pointer") null39: $t0 = [$s2] $t0 = [$t0+28] $a0 = $s2 call $t0 $t0 = $v0 if0 $t0 goto :if13_else $t0 = [$s0] $t0 = [$t0+60] $a0 = $s0 $a1 = $s1 $a2 = $s2 call $t0 goto :if13_end if13_else: if $s2 goto :null40 Error("null pointer") null40: $t0 = [$s2] $t0 = [$t0+20] $a0 = $s2 call $t0 $s2 = $v0 if $s1 goto :null41 Error("null pointer") null41: $t0 = [$s1] $t0 = [$t0+16] $a0 = $s1 call $t0 $t0 = $v0 if $t0 goto :null42 Error("null pointer") null42: $t1 = [$t0] $t1 = [$t1+20] $a0 = $t0 call $t1 $t1 = $v0 $t0 = [$s0] $t0 = [$t0+44] $a0 = $s0 $a1 = $s2 $a2 = $t1 call $t0 $t0 = $v0 if0 $t0 goto :if14_else if $s1 goto :null43 Error("null pointer") null43: $t0 = [$s1] $t0 = [$t0+8] $t1 = [$s0+24] $a0 = $s1 $a1 = $t1 call $t0 if $s1 goto :null44 Error("null pointer") null44: $t1 = [$s1] $t1 = [$t1+36] $a0 = $s1 $a1 = 0 call $t1 goto :if14_end if14_else: if $s1 goto :null45 Error("null pointer") null45: $t1 = [$s1] $t1 = [$t1+4] $t0 = [$s0+24] $a0 = $s1 $a1 = $t0 call $t1 if $s1 goto :null46 Error("null pointer") null46: $t0 = [$s1] $t0 = [$t0+40] $a0 = $s1 $a1 = 0 call $t0 if14_end: if13_end: if12_end: $v0 = 1 $s0 = local[0] $s1 = local[1] $s2 = local[2] ret func Tree.RemoveRight [in 0, out 0, local 4] local[0] = $s0 local[1] = $s1 local[2] = $s2 local[3] = $s3 $s0 = $a0 $s1 = $a1 $s2 = $a2 while3_top: if $s2 goto :null47 Error("null pointer") null47: $t0 = [$s2] $t0 = [$t0+28] $a0 = $s2 call $t0 $t0 = $v0 if0 $t0 goto :while3_end if $s2 goto :null48 Error("null pointer") null48: $s3 = [$s2] $s3 = [$s3+24] if $s2 goto :null49 Error("null pointer") null49: $t0 = [$s2] $t0 = [$t0+12] $a0 = $s2 call $t0 $t0 = $v0 if $t0 goto :null50 Error("null pointer") null50: $t1 = [$t0] $t1 = [$t1+20] $a0 = $t0 call $t1 $t1 = $v0 $a0 = $s2 $a1 = $t1 call $s3 $s1 = $s2 if $s2 goto :null51 Error("null pointer") null51: $t1 = [$s2] $t1 = [$t1+12] $a0 = $s2 call $t1 $s2 = $v0 goto :while3_top while3_end: if $s1 goto :null52 Error("null pointer") null52: $t1 = [$s1] $t1 = [$t1+4] $t0 = [$s0+24] $a0 = $s1 $a1 = $t0 call $t1 if $s1 goto :null53 Error("null pointer") null53: $t0 = [$s1] $t0 = [$t0+40] $a0 = $s1 $a1 = 0 call $t0 $v0 = 1 $s0 = local[0] $s1 = local[1] $s2 = local[2] $s3 = local[3] ret func Tree.RemoveLeft [in 0, out 0, local 4] local[0] = $s0 local[1] = $s1 local[2] = $s2 local[3] = $s3 $s0 = $a0 $s1 = $a1 $s2 = $a2 while4_top: if $s2 goto :null54 Error("null pointer") null54: $t0 = [$s2] $t0 = [$t0+32] $a0 = $s2 call $t0 $t0 = $v0 if0 $t0 goto :while4_end if $s2 goto :null55 Error("null pointer") null55: $s3 = [$s2] $s3 = [$s3+24] if $s2 goto :null56 Error("null pointer") null56: $t0 = [$s2] $t0 = [$t0+16] $a0 = $s2 call $t0 $t0 = $v0 if $t0 goto :null57 Error("null pointer") null57: $t1 = [$t0] $t1 = [$t1+20] $a0 = $t0 call $t1 $t1 = $v0 $a0 = $s2 $a1 = $t1 call $s3 $s1 = $s2 if $s2 goto :null58 Error("null pointer") null58: $t1 = [$s2] $t1 = [$t1+16] $a0 = $s2 call $t1 $s2 = $v0 goto :while4_top while4_end: if $s1 goto :null59 Error("null pointer") null59: $t1 = [$s1] $t1 = [$t1+8] $t0 = [$s0+24] $a0 = $s1 $a1 = $t0 call $t1 if $s1 goto :null60 Error("null pointer") null60: $t0 = [$s1] $t0 = [$t0+36] $a0 = $s1 $a1 = 0 call $t0 $v0 = 1 $s0 = local[0] $s1 = local[1] $s2 = local[2] $s3 = local[3] ret func Tree.Search [in 0, out 0, local 4] local[0] = $s0 local[1] = $s1 local[2] = $s2 local[3] = $s3 $t0 = $a0 $s0 = $a1 $s1 = $t0 $s2 = 1 $s3 = 0 while5_top: if0 $s2 goto :while5_end if $s1 goto :null61 Error("null pointer") null61: $t0 = [$s1] $t0 = [$t0+20] $a0 = $s1 call $t0 $t0 = $v0 $t1 = LtS($s0 $t0) if0 $t1 goto :if15_else if $s1 goto :null62 Error("null pointer") null62: $t1 = [$s1] $t1 = [$t1+32] $a0 = $s1 call $t1 $t1 = $v0 if0 $t1 goto :if16_else if $s1 goto :null63 Error("null pointer") null63: $t1 = [$s1] $t1 = [$t1+16] $a0 = $s1 call $t1 $s1 = $v0 goto :if16_end if16_else: $s2 = 0 if16_end: goto :if15_end if15_else: $t0 = LtS($t0 $s0) if0 $t0 goto :if17_else if $s1 goto :null64 Error("null pointer") null64: $t0 = [$s1] $t0 = [$t0+28] $a0 = $s1 call $t0 $t0 = $v0 if0 $t0 goto :if18_else if $s1 goto :null65 Error("null pointer") null65: $t0 = [$s1] $t0 = [$t0+12] $a0 = $s1 call $t0 $s1 = $v0 goto :if18_end if18_else: $s2 = 0 if18_end: goto :if17_end if17_else: $s3 = 1 $s2 = 0 if17_end: if15_end: goto :while5_top while5_end: $v0 = $s3 $s0 = local[0] $s1 = local[1] $s2 = local[2] $s3 = local[3] ret func Tree.Print [in 0, out 0, local 0] $t0 = $a0 $t1 = $t0 $t2 = [$t0] $t2 = [$t2+76] $a0 = $t0 $a1 = $t1 call $t2 $v0 = 1 ret func Tree.RecPrint [in 0, out 0, local 3] local[0] = $s0 local[1] = $s1 local[2] = $s2 $s0 = $a0 $s1 = $a1 if $s1 goto :null66 Error("null pointer") null66: $t0 = [$s1] $t0 = [$t0+32] $a0 = $s1 call $t0 $t0 = $v0 if0 $t0 goto :if19_else $s2 = [$s0] $s2 = [$s2+76] if $s1 goto :null67 Error("null pointer") null67: $t0 = [$s1] $t0 = [$t0+16] $a0 = $s1 call $t0 $t0 = $v0 $a0 = $s0 $a1 = $t0 call $s2 goto :if19_end if19_else: if19_end: if $s1 goto :null68 Error("null pointer") null68: $t0 = [$s1] $t0 = [$t0+20] $a0 = $s1 call $t0 $t0 = $v0 PrintIntS($t0) if $s1 goto :null69 Error("null pointer") null69: $t0 = [$s1] $t0 = [$t0+28] $a0 = $s1 call $t0 $t0 = $v0 if0 $t0 goto :if20_else $s2 = [$s0] $s2 = [$s2+76] if $s1 goto :null70 Error("null pointer") null70: $t0 = [$s1] $t0 = [$t0+12] $a0 = $s1 call $t0 $t0 = $v0 $a0 = $s0 $a1 = $t0 call $s2 goto :if20_end if20_else: if20_end: $v0 = 1 $s0 = local[0] $s1 = local[1] $s2 = local[2] ret func Tree.accept [in 0, out 0, local 0] $t0 = $a0 $t1 = $a1 PrintIntS(333) if $t1 goto :null71 Error("null pointer") null71: $t2 = [$t1] $t2 = [$t2] $a0 = $t1 $a1 = $t0 call $t2 $v0 = 0 ret func Visitor.visit [in 0, out 0, local 2] local[0] = $s0 local[1] = $s1 $s0 = $a0 $s1 = $a1 if $s1 goto :null72 Error("null pointer") null72: $t0 = [$s1] $t0 = [$t0+28] $a0 = $s1 call $t0 $t0 = $v0 if0 $t0 goto :if21_else if $s1 goto :null73 Error("null pointer") null73: $t0 = [$s1] $t0 = [$t0+12] $a0 = $s1 call $t0 $t0 = $v0 [$s0+8] = $t0 $t0 = [$s0+8] if $t0 goto :null74 Error("null pointer") null74: $t1 = [$t0] $t1 = [$t1+80] $a0 = $t0 $a1 = $s0 call $t1 goto :if21_end if21_else: if21_end: if $s1 goto :null75 Error("null pointer") null75: $t1 = [$s1] $t1 = [$t1+32] $a0 = $s1 call $t1 $t1 = $v0 if0 $t1 goto :if22_else if $s1 goto :null76 Error("null pointer") null76: $t1 = [$s1] $t1 = [$t1+16] $a0 = $s1 call $t1 $t1 = $v0 [$s0+4] = $t1 $t1 = [$s0+4] if $t1 goto :null77 Error("null pointer") null77: $t0 = [$t1] $t0 = [$t0+80] $a0 = $t1 $a1 = $s0 call $t0 goto :if22_end if22_else: if22_end: $v0 = 0 $s0 = local[0] $s1 = local[1] ret func MyVisitor.visit [in 0, out 0, local 2] local[0] = $s0 local[1] = $s1 $s0 = $a0 $s1 = $a1 if $s1 goto :null78 Error("null pointer") null78: $t0 = [$s1] $t0 = [$t0+28] $a0 = $s1 call $t0 $t0 = $v0 if0 $t0 goto :if23_else if $s1 goto :null79 Error("null pointer") null79: $t0 = [$s1] $t0 = [$t0+12] $a0 = $s1 call $t0 $t0 = $v0 [$s0+8] = $t0 $t0 = [$s0+8] if $t0 goto :null80 Error("null pointer") null80: $t1 = [$t0] $t1 = [$t1+80] $a0 = $t0 $a1 = $s0 call $t1 goto :if23_end if23_else: if23_end: if $s1 goto :null81 Error("null pointer") null81: $t1 = [$s1] $t1 = [$t1+20] $a0 = $s1 call $t1 $t1 = $v0 PrintIntS($t1) if $s1 goto :null82 Error("null pointer") null82: $t1 = [$s1] $t1 = [$t1+32] $a0 = $s1 call $t1 $t1 = $v0 if0 $t1 goto :if24_else if $s1 goto :null83 Error("null pointer") null83: $t1 = [$s1] $t1 = [$t1+16] $a0 = $s1 call $t1 $t1 = $v0 [$s0+4] = $t1 $t1 = [$s0+4] if $t1 goto :null84 Error("null pointer") null84: $t0 = [$t1] $t0 = [$t0+80] $a0 = $t1 $a1 = $s0 call $t0 goto :if24_end if24_else: if24_end: $v0 = 0 $s0 = local[0] $s1 = local[1] ret