const empty_Element const empty_List const empty_LL func Main [in 0, out 0, local 0] $a0 = :empty_LL call :LL.Start $t0{t.0} = $v0 PrintIntS($t0{t.0}) ret func Element.Init [in 0, out 0, local 0] $t0{this} = $a0 $t1{v_Age} = $a1 $t2{v_Salary} = $a2 $t3{v_Married} = $a3 [$t0{this}] = $t1{v_Age} [$t0{this}+4] = $t2{v_Salary} [$t0{this}+8] = $t3{v_Married} $v0 = 1 ret func Element.GetAge [in 0, out 0, local 0] $t0{this} = $a0 $t0{t.0} = [$t0{this}] $v0 = $t0{t.0} ret func Element.GetSalary [in 0, out 0, local 0] $t0{this} = $a0 $t0{t.0} = [$t0{this}+4] $v0 = $t0{t.0} ret func Element.GetMarried [in 0, out 0, local 0] $t0{this} = $a0 $t0{t.0} = [$t0{this}+8] $v0 = $t0{t.0} ret func Element.Equal [in 0, out 0, local 3] local[0] = $s0 local[1] = $s1 local[2] = $s2 $s0{this} = $a0 $s1{other} = $a1 $s2{ret_val} = 1 if $s1{other} goto :null1 Error("null pointer") null1: $a0 = $s1{other} call :Element.GetAge $t0{aux01} = $v0 $t1{t.0} = [$s0{this}] $a0 = $s0{this} $a1 = $t0{aux01} $a2 = $t1{t.0} call :Element.Compare $t1{t.1} = $v0 if $t1{t.1} goto :if1_else $s2{ret_val} = 0 goto :if1_end if1_else: if $s1{other} goto :null2 Error("null pointer") null2: $a0 = $s1{other} call :Element.GetSalary $t1{aux02} = $v0 $t0{t.2} = [$s0{this}+4] $a0 = $s0{this} $a1 = $t1{aux02} $a2 = $t0{t.2} call :Element.Compare $t0{t.3} = $v0 if $t0{t.3} goto :if2_else $s2{ret_val} = 0 goto :if2_end if2_else: $t0{t.4} = [$s0{this}+8] if0 $t0{t.4} goto :if3_else if $s1{other} goto :null3 Error("null pointer") null3: $a0 = $s1{other} call :Element.GetMarried $t0{t.5} = $v0 if $t0{t.5} goto :if4_else $s2{ret_val} = 0 goto :if4_end if4_else: if4_end: goto :if3_end if3_else: if $s1{other} goto :null4 Error("null pointer") null4: $a0 = $s1{other} call :Element.GetMarried $t0{t.6} = $v0 if0 $t0{t.6} goto :if5_else $s2{ret_val} = 0 goto :if5_end if5_else: if5_end: if3_end: if2_end: if1_end: $v0 = $s2{ret_val} $s0 = local[0] $s1 = local[1] $s2 = local[2] ret func Element.Compare [in 0, out 0, local 0] $t0{num1} = $a1 $t1{num2} = $a2 $t2{aux02} = Add($t1{num2} 1) $t1{t.0} = LtS($t0{num1} $t1{num2}) if0 $t1{t.0} goto :if6_else $t1{retval} = 0 goto :if6_end if6_else: $t2{t.1} = LtS($t0{num1} $t2{aux02}) if $t2{t.1} goto :if7_else $t1{retval} = 0 goto :if7_end if7_else: $t1{retval} = 1 if7_end: if6_end: $v0 = $t1{retval} ret func List.Init [in 0, out 0, local 0] $t0{this} = $a0 [$t0{this}+8] = 1 $v0 = 1 ret func List.InitNew [in 0, out 0, local 0] $t0{this} = $a0 $t1{v_elem} = $a1 $t2{v_next} = $a2 $t3{v_end} = $a3 [$t0{this}+8] = $t3{v_end} [$t0{this}] = $t1{v_elem} [$t0{this}+4] = $t2{v_next} $v0 = 1 ret func List.Insert [in 0, out 0, local 1] local[0] = $s0 $t0{this} = $a0 $t1{new_elem} = $a1 $t0{aux03} = $t0{this} $s0{aux02} = HeapAllocZ(12) if $s0{aux02} goto :null5 Error("null pointer") null5: $a0 = $s0{aux02} $a1 = $t1{new_elem} $a2 = $t0{aux03} $a3 = 0 call :List.InitNew $v0 = $s0{aux02} $s0 = local[0] ret func List.SetNext [in 0, out 0, local 0] $t0{this} = $a0 $t1{v_next} = $a1 [$t0{this}+4] = $t1{v_next} $v0 = 1 ret func List.Delete [in 0, out 0, local 8] local[0] = $s0 local[1] = $s1 local[2] = $s2 local[3] = $s3 local[4] = $s4 local[5] = $s5 local[6] = $s6 local[7] = $s7 $t0{this} = $a0 $s0{e} = $a1 $s1{my_head} = $t0{this} $s2{ret_val} = 0 $s3{aux04} = Sub(0 1) $s4{aux01} = $t0{this} $s5{prev} = $t0{this} $s6{var_end} = [$t0{this}+8] $s7{var_elem} = [$t0{this}] while1_top: if $s6{var_end} goto :ss1_else $t0{t.0} = Sub(1 $s2{ret_val}) goto :ss1_end ss1_else: $t0{t.0} = 0 ss1_end: if0 $t0{t.0} goto :while1_end if $s0{e} goto :null6 Error("null pointer") null6: $a0 = $s0{e} $a1 = $s7{var_elem} call :Element.Equal $t0{t.1} = $v0 if0 $t0{t.1} goto :if8_else $s2{ret_val} = 1 $t0{t.2} = LtS($s3{aux04} 0) if0 $t0{t.2} goto :if9_else if $s4{aux01} goto :null7 Error("null pointer") null7: $a0 = $s4{aux01} call :List.GetNext $s1{my_head} = $v0 goto :if9_end if9_else: $t0{t.3} = Sub(0 555) PrintIntS($t0{t.3}) if $s5{prev} goto :null8 Error("null pointer") null8: if $s4{aux01} goto :null9 Error("null pointer") null9: $a0 = $s4{aux01} call :List.GetNext $t0{t.4} = $v0 $a0 = $s5{prev} $a1 = $t0{t.4} call :List.SetNext $t0{t.5} = Sub(0 555) PrintIntS($t0{t.5}) if9_end: goto :if8_end if8_else: if8_end: if $s2{ret_val} goto :if10_else $s5{prev} = $s4{aux01} if $s4{aux01} goto :null10 Error("null pointer") null10: $a0 = $s4{aux01} call :List.GetNext $s4{aux01} = $v0 if $s4{aux01} goto :null11 Error("null pointer") null11: $a0 = $s4{aux01} call :List.GetEnd $s6{var_end} = $v0 if $s4{aux01} goto :null12 Error("null pointer") null12: $a0 = $s4{aux01} call :List.GetElem $s7{var_elem} = $v0 $s3{aux04} = 1 goto :if10_end if10_else: if10_end: goto :while1_top while1_end: $v0 = $s1{my_head} $s0 = local[0] $s1 = local[1] $s2 = local[2] $s3 = local[3] $s4 = local[4] $s5 = local[5] $s6 = local[6] $s7 = local[7] ret func List.Search [in 0, out 0, local 4] local[0] = $s0 local[1] = $s1 local[2] = $s2 local[3] = $s3 $t0{this} = $a0 $s0{e} = $a1 $s1{int_ret_val} = 0 $s2{aux01} = $t0{this} $s3{var_end} = [$t0{this}+8] $t0{var_elem} = [$t0{this}] while2_top: $t1{t.0} = Sub(1 $s3{var_end}) if0 $t1{t.0} goto :while2_end if $s0{e} goto :null13 Error("null pointer") null13: $a0 = $s0{e} $a1 = $t0{var_elem} call :Element.Equal $t1{t.1} = $v0 if0 $t1{t.1} goto :if11_else $s1{int_ret_val} = 1 goto :if11_end if11_else: if11_end: if $s2{aux01} goto :null14 Error("null pointer") null14: $a0 = $s2{aux01} call :List.GetNext $s2{aux01} = $v0 if $s2{aux01} goto :null15 Error("null pointer") null15: $a0 = $s2{aux01} call :List.GetEnd $s3{var_end} = $v0 if $s2{aux01} goto :null16 Error("null pointer") null16: $a0 = $s2{aux01} call :List.GetElem $t0{var_elem} = $v0 goto :while2_top while2_end: $v0 = $s1{int_ret_val} $s0 = local[0] $s1 = local[1] $s2 = local[2] $s3 = local[3] ret func List.GetEnd [in 0, out 0, local 0] $t0{this} = $a0 $t0{t.0} = [$t0{this}+8] $v0 = $t0{t.0} ret func List.GetElem [in 0, out 0, local 0] $t0{this} = $a0 $t0{t.0} = [$t0{this}] $v0 = $t0{t.0} ret func List.GetNext [in 0, out 0, local 0] $t0{this} = $a0 $t0{t.0} = [$t0{this}+4] $v0 = $t0{t.0} ret func List.Print [in 0, out 0, local 2] local[0] = $s0 local[1] = $s1 $t0{this} = $a0 $s0{aux01} = $t0{this} $s1{var_end} = [$t0{this}+8] $t0{var_elem} = [$t0{this}] while3_top: $t1{t.0} = Sub(1 $s1{var_end}) if0 $t1{t.0} goto :while3_end if $t0{var_elem} goto :null17 Error("null pointer") null17: $a0 = $t0{var_elem} call :Element.GetAge $t1{t.1} = $v0 PrintIntS($t1{t.1}) if $s0{aux01} goto :null18 Error("null pointer") null18: $a0 = $s0{aux01} call :List.GetNext $s0{aux01} = $v0 if $s0{aux01} goto :null19 Error("null pointer") null19: $a0 = $s0{aux01} call :List.GetEnd $s1{var_end} = $v0 if $s0{aux01} goto :null20 Error("null pointer") null20: $a0 = $s0{aux01} call :List.GetElem $t0{var_elem} = $v0 goto :while3_top while3_end: $v0 = 1 $s0 = local[0] $s1 = local[1] ret func LL.Start [in 0, out 0, local 4] local[0] = $s0 local[1] = $s1 local[2] = $s2 local[3] = $s3 $s0{last_elem} = HeapAllocZ(12) if $s0{last_elem} goto :null21 Error("null pointer") null21: $a0 = $s0{last_elem} call :List.Init $s0{head} = $s0{last_elem} if $s0{head} goto :null22 Error("null pointer") null22: $a0 = $s0{head} call :List.Init if $s0{head} goto :null23 Error("null pointer") null23: $a0 = $s0{head} call :List.Print $s1{el01} = HeapAllocZ(12) if $s1{el01} goto :null24 Error("null pointer") null24: $a0 = $s1{el01} $a1 = 25 $a2 = 37000 $a3 = 0 call :Element.Init if $s0{head} goto :null25 Error("null pointer") null25: $a0 = $s0{head} $a1 = $s1{el01} call :List.Insert $s0{head} = $v0 if $s0{head} goto :null26 Error("null pointer") null26: $a0 = $s0{head} call :List.Print PrintIntS(10000000) $s1{el01} = HeapAllocZ(12) if $s1{el01} goto :null27 Error("null pointer") null27: $a0 = $s1{el01} $a1 = 39 $a2 = 42000 $a3 = 1 call :Element.Init $s2{el02} = $s1{el01} if $s0{head} goto :null28 Error("null pointer") null28: $a0 = $s0{head} $a1 = $s1{el01} call :List.Insert $s0{head} = $v0 if $s0{head} goto :null29 Error("null pointer") null29: $a0 = $s0{head} call :List.Print PrintIntS(10000000) $s1{el01} = HeapAllocZ(12) if $s1{el01} goto :null30 Error("null pointer") null30: $a0 = $s1{el01} $a1 = 22 $a2 = 34000 $a3 = 0 call :Element.Init if $s0{head} goto :null31 Error("null pointer") null31: $a0 = $s0{head} $a1 = $s1{el01} call :List.Insert $s0{head} = $v0 if $s0{head} goto :null32 Error("null pointer") null32: $a0 = $s0{head} call :List.Print $s3{el03} = HeapAllocZ(12) if $s3{el03} goto :null33 Error("null pointer") null33: $a0 = $s3{el03} $a1 = 27 $a2 = 34000 $a3 = 0 call :Element.Init if $s0{head} goto :null34 Error("null pointer") null34: $a0 = $s0{head} $a1 = $s2{el02} call :List.Search $t0{t.0} = $v0 PrintIntS($t0{t.0}) if $s0{head} goto :null35 Error("null pointer") null35: $a0 = $s0{head} $a1 = $s3{el03} call :List.Search $t0{t.1} = $v0 PrintIntS($t0{t.1}) PrintIntS(10000000) $s1{el01} = HeapAllocZ(12) if $s1{el01} goto :null36 Error("null pointer") null36: $a0 = $s1{el01} $a1 = 28 $a2 = 35000 $a3 = 0 call :Element.Init if $s0{head} goto :null37 Error("null pointer") null37: $a0 = $s0{head} $a1 = $s1{el01} call :List.Insert $s0{head} = $v0 if $s0{head} goto :null38 Error("null pointer") null38: $a0 = $s0{head} call :List.Print PrintIntS(2220000) if $s0{head} goto :null39 Error("null pointer") null39: $a0 = $s0{head} $a1 = $s2{el02} call :List.Delete $s0{head} = $v0 if $s0{head} goto :null40 Error("null pointer") null40: $a0 = $s0{head} call :List.Print PrintIntS(33300000) if $s0{head} goto :null41 Error("null pointer") null41: $a0 = $s0{head} $a1 = $s1{el01} call :List.Delete $s0{head} = $v0 if $s0{head} goto :null42 Error("null pointer") null42: $a0 = $s0{head} call :List.Print PrintIntS(44440000) $v0 = 0 $s0 = local[0] $s1 = local[1] $s2 = local[2] $s3 = local[3] ret