diff options
Diffstat (limited to 'output/LinkedList.vapor')
-rw-r--r-- | output/LinkedList.vapor | 556 |
1 files changed, 556 insertions, 0 deletions
diff --git a/output/LinkedList.vapor b/output/LinkedList.vapor new file mode 100644 index 0000000..6a04bc4 --- /dev/null +++ b/output/LinkedList.vapor @@ -0,0 +1,556 @@ +func Main() + t.3 = HeapAllocZ(4) + [t.3+0] = :functable_LL + t.4 = t.3 + t.5 = [t.4+0] + t.6 = [t.5+0] + t.2 = call t.6(t.4 ) + t.7 = t.2 + PrintIntS(t.7) + ret + +const functable_Element + :Element_Init + :Element_GetAge + :Element_GetSalary + :Element_GetMarried + :Element_Equal + :Element_Compare + +func Element_Init(this t.0 t.1 t.2 ) + [this+24] = t.0 + [this+28] = t.1 + [this+32] = t.2 + t.3 = 1 + ret t.3 + +func Element_GetAge(this ) + t.0 = [this+24] + ret t.0 + +func Element_GetSalary(this ) + t.0 = [this+28] + ret t.0 + +func Element_GetMarried(this ) + t.0 = [this+32] + ret t.0 + +func Element_Equal(this t.0 ) + t.1 = 1 + t.0 = t.0 + t.4 = [t.0+0] + t.5 = [t.4+4] + t.3 = call t.5(t.0 ) + t.2 = t.3 + t.8 = [this] + t.9 = t.2 + t.10 = [this+24] + t.8 = [t.8+20] + t.7 = call t.8(this t.9 t.10) + t.6 = Eq(t.7 0) + t.11 = t.6 + if0 t.11 goto :if12_else +if12_body: + t.1 = 0 + goto :if12_end +if12_else: + t.0 = t.0 + t.14 = [t.0+0] + t.15 = [t.14+8] + t.13 = call t.15(t.0 ) + t.12 = t.13 + t.18 = [this] + t.19 = t.12 + t.20 = [this+28] + t.18 = [t.18+20] + t.17 = call t.18(this t.19 t.20) + t.16 = Eq(t.17 0) + t.21 = t.16 + if0 t.21 goto :if21_else +if21_body: + t.1 = 0 + goto :if21_end +if21_else: + t.22 = [this+32] + if0 t.22 goto :if27_else +if27_body: + t.0 = t.0 + t.25 = [t.0+0] + t.26 = [t.25+12] + t.24 = call t.26(t.0 ) + t.23 = Eq(t.24 0) + t.27 = t.23 + if0 t.27 goto :if28_else +if28_body: + t.1 = 0 + goto :if28_end +if28_else: + t.28 = 0 +if28_end: + goto :if27_end +if27_else: + t.0 = t.0 + t.30 = [t.0+0] + t.31 = [t.30+12] + t.29 = call t.31(t.0 ) + t.32 = t.29 + if0 t.32 goto :if33_else +if33_body: + t.1 = 0 + goto :if33_end +if33_else: + t.28 = 0 +if33_end: +if27_end: +if21_end: +if12_end: + t.33 = t.1 + ret t.33 + +func Element_Compare(this t.0 t.1 ) + t.2 = 0 + t.5 = t.1 + t.6 = 1 + t.4 = Add(t.5 t.6) + t.3 = t.4 + t.8 = t.0 + t.9 = t.1 + t.7 = LtS(t.8 t.9) + t.10 = t.7 + if0 t.10 goto :if41_else +if41_body: + t.2 = 0 + goto :if41_end +if41_else: + t.13 = t.0 + t.14 = t.3 + t.12 = LtS(t.13 t.14) + t.11 = Eq(t.12 0) + t.15 = t.11 + if0 t.15 goto :if45_else +if45_body: + t.2 = 0 + goto :if45_end +if45_else: + t.2 = 1 +if45_end: +if41_end: + t.16 = t.2 + ret t.16 + +const functable_List + :List_Init + :List_InitNew + :List_Insert + :List_SetNext + :List_Delete + :List_Search + :List_GetEnd + :List_GetElem + :List_GetNext + :List_Print + +func List_Init(this ) + [this+48] = 1 + t.0 = 1 + ret t.0 + +func List_InitNew(this t.0 t.1 t.2 ) + [this+48] = t.2 + [this+40] = t.0 + [this+44] = t.1 + t.3 = 1 + ret t.3 + +func List_Insert(this t.0 ) + t.2 = this + t.4 = HeapAllocZ(52) + [t.4+0] = :functable_List + t.3 = t.4 + t.3 = t.3 + t.7 = [t.3+0] + t.8 = [t.7+4] + t.9 = t.0 + t.10 = t.2 + t.11 = 0 + t.6 = call t.8(t.3 t.9 t.10 t.11) + t.5 = t.6 + t.12 = t.3 + ret t.12 + +func List_SetNext(this t.0 ) + [this+44] = t.0 + t.1 = 1 + ret t.1 + +func List_Delete(this t.0 ) + t.3 = this + t.4 = 0 + t.7 = 0 + t.8 = 1 + t.6 = Sub(t.7 t.8) + t.5 = t.6 + t.9 = this + t.10 = this + t.11 = [this+48] + t.12 = [this+40] +while65_test: + t.14 = Eq(t.11 0) + t.15 = t.14 + t.16 = Eq(t.4 0) + t.17 = t.16 + t.18 = Eq(1 t.15) + t.19 = Eq(1 t.17) + t.13 = Eq(t.18 t.19) + t.20 = t.13 + if0 t.20 goto :while65_end +while65_body: + t.0 = t.0 + t.22 = [t.0+0] + t.23 = [t.22+16] + t.24 = t.12 + t.21 = call t.23(t.0 t.24) + t.25 = t.21 + if0 t.25 goto :if74_else +if74_body: + t.4 = 1 + t.27 = t.5 + t.28 = 0 + t.26 = LtS(t.27 t.28) + t.29 = t.26 + if0 t.29 goto :if79_else +if79_body: + t.9 = t.9 + t.31 = [t.9+0] + t.32 = [t.31+32] + t.30 = call t.32(t.9 ) + t.3 = t.30 + goto :if79_end +if79_else: + t.34 = 0 + t.35 = 555 + t.33 = Sub(t.34 t.35) + t.36 = t.33 + PrintIntS(t.36) + t.10 = t.10 + t.39 = [t.10+0] + t.40 = [t.39+12] + t.9 = t.9 + t.42 = [t.9+0] + t.43 = [t.42+32] + t.41 = call t.43(t.9 ) + t.44 = t.41 + t.38 = call t.40(t.10 t.44) + t.37 = t.38 + t.46 = 0 + t.47 = 555 + t.45 = Sub(t.46 t.47) + t.48 = t.45 + PrintIntS(t.48) +if79_end: + goto :if74_end +if74_else: + t.49 = 0 +if74_end: + t.50 = Eq(t.4 0) + t.51 = t.50 + if0 t.51 goto :if101_else +if101_body: + t.10 = t.9 + t.9 = t.9 + t.53 = [t.9+0] + t.54 = [t.53+32] + t.52 = call t.54(t.9 ) + t.9 = t.52 + t.9 = t.9 + t.56 = [t.9+0] + t.57 = [t.56+24] + t.55 = call t.57(t.9 ) + t.11 = t.55 + t.9 = t.9 + t.59 = [t.9+0] + t.60 = [t.59+28] + t.58 = call t.60(t.9 ) + t.12 = t.58 + t.5 = 1 + goto :if101_end +if101_else: + t.49 = 0 +if101_end: + goto :while65_test +while65_end: + t.61 = t.3 + ret t.61 + +func List_Search(this t.0 ) + t.3 = 0 + t.4 = this + t.5 = [this+48] + t.6 = [this+40] +while113_test: + t.7 = Eq(t.5 0) + t.8 = t.7 + if0 t.8 goto :while113_end +while113_body: + t.0 = t.0 + t.10 = [t.0+0] + t.11 = [t.10+16] + t.12 = t.6 + t.9 = call t.11(t.0 t.12) + t.13 = t.9 + if0 t.13 goto :if116_else +if116_body: + t.3 = 1 + goto :if116_end +if116_else: + t.14 = 0 +if116_end: + t.4 = t.4 + t.16 = [t.4+0] + t.17 = [t.16+32] + t.15 = call t.17(t.4 ) + t.4 = t.15 + t.4 = t.4 + t.19 = [t.4+0] + t.20 = [t.19+24] + t.18 = call t.20(t.4 ) + t.5 = t.18 + t.4 = t.4 + t.22 = [t.4+0] + t.23 = [t.22+28] + t.21 = call t.23(t.4 ) + t.6 = t.21 + goto :while113_test +while113_end: + t.24 = t.3 + ret t.24 + +func List_GetEnd(this ) + t.0 = [this+48] + ret t.0 + +func List_GetElem(this ) + t.0 = [this+40] + ret t.0 + +func List_GetNext(this ) + t.0 = [this+44] + ret t.0 + +func List_Print(this ) + t.2 = this + t.3 = [this+48] + t.4 = [this+40] +while134_test: + t.5 = Eq(t.3 0) + t.6 = t.5 + if0 t.6 goto :while134_end +while134_body: + t.4 = t.4 + t.8 = [t.4+0] + t.9 = [t.8+4] + t.7 = call t.9(t.4 ) + t.10 = t.7 + PrintIntS(t.10) + t.2 = t.2 + t.12 = [t.2+0] + t.13 = [t.12+32] + t.11 = call t.13(t.2 ) + t.2 = t.11 + t.2 = t.2 + t.15 = [t.2+0] + t.16 = [t.15+24] + t.14 = call t.16(t.2 ) + t.3 = t.14 + t.2 = t.2 + t.18 = [t.2+0] + t.19 = [t.18+28] + t.17 = call t.19(t.2 ) + t.4 = t.17 + goto :while134_test +while134_end: + t.20 = 1 + ret t.20 + +const functable_LL + :LL_Start + +func LL_Start(this ) + t.3 = HeapAllocZ(52) + [t.3+0] = :functable_List + t.2 = t.3 + t.2 = t.2 + t.6 = [t.2+0] + t.7 = [t.6+0] + t.5 = call t.7(t.2 ) + t.4 = t.5 + t.8 = t.2 + t.8 = t.8 + t.10 = [t.8+0] + t.11 = [t.10+0] + t.9 = call t.11(t.8 ) + t.4 = t.9 + t.8 = t.8 + t.13 = [t.8+0] + t.14 = [t.13+36] + t.12 = call t.14(t.8 ) + t.4 = t.12 + t.16 = HeapAllocZ(36) + [t.16+0] = :functable_Element + t.15 = t.16 + t.15 = t.15 + t.18 = [t.15+0] + t.19 = [t.18+0] + t.20 = 25 + t.21 = 37000 + t.22 = 0 + t.17 = call t.19(t.15 t.20 t.21 t.22) + t.4 = t.17 + t.8 = t.8 + t.24 = [t.8+0] + t.25 = [t.24+8] + t.26 = t.15 + t.23 = call t.25(t.8 t.26) + t.8 = t.23 + t.8 = t.8 + t.28 = [t.8+0] + t.29 = [t.28+36] + t.27 = call t.29(t.8 ) + t.4 = t.27 + t.30 = 10000000 + PrintIntS(t.30) + t.31 = HeapAllocZ(36) + [t.31+0] = :functable_Element + t.15 = t.31 + t.15 = t.15 + t.33 = [t.15+0] + t.34 = [t.33+0] + t.35 = 39 + t.36 = 42000 + t.37 = 1 + t.32 = call t.34(t.15 t.35 t.36 t.37) + t.4 = t.32 + t.38 = t.15 + t.8 = t.8 + t.40 = [t.8+0] + t.41 = [t.40+8] + t.42 = t.15 + t.39 = call t.41(t.8 t.42) + t.8 = t.39 + t.8 = t.8 + t.44 = [t.8+0] + t.45 = [t.44+36] + t.43 = call t.45(t.8 ) + t.4 = t.43 + t.46 = 10000000 + PrintIntS(t.46) + t.47 = HeapAllocZ(36) + [t.47+0] = :functable_Element + t.15 = t.47 + t.15 = t.15 + t.49 = [t.15+0] + t.50 = [t.49+0] + t.51 = 22 + t.52 = 34000 + t.53 = 0 + t.48 = call t.50(t.15 t.51 t.52 t.53) + t.4 = t.48 + t.8 = t.8 + t.55 = [t.8+0] + t.56 = [t.55+8] + t.57 = t.15 + t.54 = call t.56(t.8 t.57) + t.8 = t.54 + t.8 = t.8 + t.59 = [t.8+0] + t.60 = [t.59+36] + t.58 = call t.60(t.8 ) + t.4 = t.58 + t.62 = HeapAllocZ(36) + [t.62+0] = :functable_Element + t.61 = t.62 + t.61 = t.61 + t.64 = [t.61+0] + t.65 = [t.64+0] + t.66 = 27 + t.67 = 34000 + t.68 = 0 + t.63 = call t.65(t.61 t.66 t.67 t.68) + t.4 = t.63 + t.8 = t.8 + t.70 = [t.8+0] + t.71 = [t.70+20] + t.72 = t.38 + t.69 = call t.71(t.8 t.72) + t.73 = t.69 + PrintIntS(t.73) + t.8 = t.8 + t.75 = [t.8+0] + t.76 = [t.75+20] + t.77 = t.61 + t.74 = call t.76(t.8 t.77) + t.78 = t.74 + PrintIntS(t.78) + t.79 = 10000000 + PrintIntS(t.79) + t.80 = HeapAllocZ(36) + [t.80+0] = :functable_Element + t.15 = t.80 + t.15 = t.15 + t.82 = [t.15+0] + t.83 = [t.82+0] + t.84 = 28 + t.85 = 35000 + t.86 = 0 + t.81 = call t.83(t.15 t.84 t.85 t.86) + t.4 = t.81 + t.8 = t.8 + t.88 = [t.8+0] + t.89 = [t.88+8] + t.90 = t.15 + t.87 = call t.89(t.8 t.90) + t.8 = t.87 + t.8 = t.8 + t.92 = [t.8+0] + t.93 = [t.92+36] + t.91 = call t.93(t.8 ) + t.4 = t.91 + t.94 = 2220000 + PrintIntS(t.94) + t.8 = t.8 + t.96 = [t.8+0] + t.97 = [t.96+16] + t.98 = t.38 + t.95 = call t.97(t.8 t.98) + t.8 = t.95 + t.8 = t.8 + t.100 = [t.8+0] + t.101 = [t.100+36] + t.99 = call t.101(t.8 ) + t.4 = t.99 + t.102 = 33300000 + PrintIntS(t.102) + t.8 = t.8 + t.104 = [t.8+0] + t.105 = [t.104+16] + t.106 = t.15 + t.103 = call t.105(t.8 t.106) + t.8 = t.103 + t.8 = t.8 + t.108 = [t.8+0] + t.109 = [t.108+36] + t.107 = call t.109(t.8 ) + t.4 = t.107 + t.110 = 44440000 + PrintIntS(t.110) + t.111 = 0 + ret t.111 + +func AllocArray(size) + bytes = MulS(size 4) + bytes = Add(bytes 4) + v = HeapAllocZ(bytes) + [v] = size + ret v + |