summaryrefslogtreecommitdiff
path: root/output/BubbleSort.vapor
diff options
context:
space:
mode:
Diffstat (limited to 'output/BubbleSort.vapor')
-rw-r--r--output/BubbleSort.vapor469
1 files changed, 289 insertions, 180 deletions
diff --git a/output/BubbleSort.vapor b/output/BubbleSort.vapor
index 5315afc..c2cf8ab 100644
--- a/output/BubbleSort.vapor
+++ b/output/BubbleSort.vapor
@@ -2,12 +2,15 @@ func Main()
t.3 = HeapAllocZ(24)
[t.3+0] = :functable_BBS
t.4 = t.3
- t.5 = [t.4+0]
+ t.5 = t.4
t.6 = [t.5+0]
- t.7 = 10
- t.2 = call t.6(t.4 t.7)
- t.8 = t.2
- PrintIntS(t.8)
+ t.7 = [t.6+0]
+ t.8 = 10
+ t.9 = t.8
+ t.2 = call t.7(t.5 t.9)
+ t.10 = t.2
+ t.11 = t.10
+ PrintIntS(t.11)
ret
const functable_BBS
@@ -17,202 +20,308 @@ const functable_BBS
:BBS_Init
func BBS_Start(this t.0 )
- t.3 = [this]
- t.4 = t.0
- t.3 = [t.3+12]
- t.2 = call t.3(this t.4)
- t.1 = t.2
- t.6 = [this]
- t.6 = [t.6+8]
- t.5 = call t.6(this )
- t.1 = t.5
- t.7 = 99999
- PrintIntS(t.7)
- t.9 = [this]
- t.9 = [t.9+4]
- t.8 = call t.9(this )
- t.1 = t.8
- t.11 = [this]
- t.11 = [t.11+8]
- t.10 = call t.11(this )
- t.1 = t.10
- t.12 = 0
- ret t.12
+ t.3 = this
+ t.4 = [this]
+ t.5 = t.0
+ t.6 = t.5
+ t.4 = [t.4+12]
+ t.2 = call t.4(this t.6)
+ t.7 = t.2
+ t.1 = t.7
+ t.9 = this
+ t.10 = [this]
+ t.10 = [t.10+8]
+ t.8 = call t.10(this)
+ t.11 = t.8
+ t.1 = t.11
+ t.12 = 99999
+ t.13 = t.12
+ t.14 = t.13
+ PrintIntS(t.14)
+ t.16 = this
+ t.17 = [this]
+ t.17 = [t.17+4]
+ t.15 = call t.17(this)
+ t.18 = t.15
+ t.1 = t.18
+ t.20 = this
+ t.21 = [this]
+ t.21 = [t.21+8]
+ t.19 = call t.21(this)
+ t.22 = t.19
+ t.1 = t.22
+ t.23 = 0
+ t.24 = t.23
+ t.25 = t.24
+ ret t.25
func BBS_Sort(this )
t.2 = [this+20]
t.3 = 1
t.1 = Sub(t.2 t.3)
- t.0 = t.1
- t.6 = 0
- t.7 = 1
- t.5 = Sub(t.6 t.7)
- t.4 = t.5
-while23_test:
- t.9 = t.4
- t.10 = t.0
- t.8 = LtS(t.9 t.10)
- t.11 = t.8
- if0 t.11 goto :while23_end
-while23_body:
- t.12 = 1
-while28_test:
- t.14 = t.12
- t.16 = t.0
- t.17 = 1
- t.15 = Add(t.16 t.17)
- t.18 = t.15
- t.13 = LtS(t.14 t.18)
- t.19 = t.13
- if0 t.19 goto :while28_end
-while28_body:
- t.22 = t.12
- t.23 = 1
- t.21 = Sub(t.22 t.23)
- t.20 = t.21
- t.26 = [this+16]
- t.27 = MulS(t.20 4)
- t.27 = Add(t.27 4)
- t.27 = Add(t.26 t.27)
- t.25 = [t.27]
- t.24 = t.25
- t.30 = [this+16]
- t.31 = MulS(t.12 4)
- t.31 = Add(t.31 4)
- t.31 = Add(t.30 t.31)
- t.29 = [t.31]
- t.28 = t.29
- t.33 = t.28
- t.34 = t.24
- t.32 = LtS(t.33 t.34)
- t.35 = t.32
- if0 t.35 goto :if45_else
-if45_body:
- t.38 = t.12
- t.39 = 1
- t.37 = Sub(t.38 t.39)
- t.36 = t.37
+ t.4 = t.1
+ t.0 = t.4
+ t.7 = 0
+ t.8 = 1
+ t.6 = Sub(t.7 t.8)
+ t.9 = t.6
+ t.5 = t.9
+while41_test:
+ t.11 = t.5
+ t.12 = t.0
+ t.10 = LtS(t.11 t.12)
+ t.13 = t.10
+ t.14 = t.13
+ if0 t.14 goto :while41_end
+while41_body:
+ t.16 = 1
+ t.17 = t.16
+ t.15 = t.17
+while49_test:
+ t.19 = t.15
+ t.21 = t.0
+ t.22 = 1
+ t.20 = Add(t.21 t.22)
+ t.23 = t.20
+ t.24 = t.23
+ t.18 = LtS(t.19 t.24)
+ t.25 = t.18
+ t.26 = t.25
+ if0 t.26 goto :while49_end
+while49_body:
+ t.29 = t.15
+ t.30 = 1
+ t.28 = Sub(t.29 t.30)
+ t.31 = t.28
+ t.27 = t.31
+ t.35 = [this+16]
+ t.34 = t.35
+ t.37 = t.27
+ t.36 = MulS(t.37 4)
+ t.36 = Add(t.36 4)
+ t.36 = Add(t.34 t.36)
+ t.33 = [t.36]
+ t.38 = t.33
+ t.32 = t.38
t.42 = [this+16]
- t.43 = MulS(t.36 4)
+ t.41 = t.42
+ t.44 = t.15
+ t.43 = MulS(t.44 4)
t.43 = Add(t.43 4)
- t.43 = Add(t.42 t.43)
- t.41 = [t.43]
- t.40 = t.41
- t.44 = [this+16]
- t.45 = MulS(t.36 4)
- t.45 = Add(t.45 4)
- t.45 = Add(t.44 t.45)
- t.47 = [this+16]
- t.48 = MulS(t.12 4)
- t.48 = Add(t.48 4)
- t.48 = Add(t.47 t.48)
- t.46 = [t.48]
- [t.45] = t.46
- t.49 = [this+16]
- t.50 = MulS(t.12 4)
- t.50 = Add(t.50 4)
- t.50 = Add(t.49 t.50)
- [t.50] = t.40
- goto :if45_end
-if45_else:
- t.51 = 0
-if45_end:
- t.53 = t.12
+ t.43 = Add(t.41 t.43)
+ t.40 = [t.43]
+ t.45 = t.40
+ t.39 = t.45
+ t.47 = t.39
+ t.48 = t.32
+ t.46 = LtS(t.47 t.48)
+ t.49 = t.46
+ t.50 = t.49
+ if0 t.50 goto :if75_else
+if75_body:
+ t.53 = t.15
t.54 = 1
- t.52 = Add(t.53 t.54)
- t.12 = t.52
- goto :while28_test
-while28_end:
- t.56 = t.0
- t.57 = 1
- t.55 = Sub(t.56 t.57)
- t.0 = t.55
- goto :while23_test
-while23_end:
- t.58 = 0
- ret t.58
+ t.52 = Sub(t.53 t.54)
+ t.55 = t.52
+ t.51 = t.55
+ t.59 = [this+16]
+ t.58 = t.59
+ t.61 = t.51
+ t.60 = MulS(t.61 4)
+ t.60 = Add(t.60 4)
+ t.60 = Add(t.58 t.60)
+ t.57 = [t.60]
+ t.62 = t.57
+ t.56 = t.62
+ t.63 = [this+16]
+ t.65 = t.51
+ t.66 = t.65
+ t.64 = MulS(t.66 4)
+ t.64 = Add(t.64 4)
+ t.64 = Add(t.63 t.64)
+ t.69 = [this+16]
+ t.68 = t.69
+ t.71 = t.15
+ t.70 = MulS(t.71 4)
+ t.70 = Add(t.70 4)
+ t.70 = Add(t.68 t.70)
+ t.67 = [t.70]
+ t.72 = t.67
+ [t.64] = t.72
+ t.73 = [this+16]
+ t.75 = t.15
+ t.76 = t.75
+ t.74 = MulS(t.76 4)
+ t.74 = Add(t.74 4)
+ t.74 = Add(t.73 t.74)
+ t.77 = t.56
+ t.78 = t.77
+ [t.74] = t.78
+ goto :if75_end
+if75_else:
+ t.80 = 0
+ t.81 = t.80
+ t.79 = t.81
+if75_end:
+ t.83 = t.15
+ t.84 = 1
+ t.82 = Add(t.83 t.84)
+ t.85 = t.82
+ t.15 = t.85
+ goto :while49_test
+while49_end:
+ t.87 = t.0
+ t.88 = 1
+ t.86 = Sub(t.87 t.88)
+ t.89 = t.86
+ t.0 = t.89
+ goto :while41_test
+while41_end:
+ t.90 = 0
+ t.91 = t.90
+ t.92 = t.91
+ ret t.92
func BBS_Print(this )
- t.0 = 0
-while69_test:
- t.2 = t.0
- t.3 = [this+20]
- t.1 = LtS(t.2 t.3)
- t.4 = t.1
- if0 t.4 goto :while69_end
-while69_body:
- t.6 = [this+16]
- t.7 = MulS(t.0 4)
- t.7 = Add(t.7 4)
- t.7 = Add(t.6 t.7)
- t.5 = [t.7]
- t.8 = t.5
- PrintIntS(t.8)
- t.10 = t.0
- t.11 = 1
- t.9 = Add(t.10 t.11)
- t.0 = t.9
- goto :while69_test
-while69_end:
- t.12 = 0
- ret t.12
+ t.1 = 0
+ t.2 = t.1
+ t.0 = t.2
+while121_test:
+ t.4 = t.0
+ t.5 = [this+20]
+ t.6 = t.5
+ t.7 = t.6
+ t.3 = LtS(t.4 t.7)
+ t.8 = t.3
+ t.9 = t.8
+ if0 t.9 goto :while121_end
+while121_body:
+ t.12 = [this+16]
+ t.11 = t.12
+ t.14 = t.0
+ t.13 = MulS(t.14 4)
+ t.13 = Add(t.13 4)
+ t.13 = Add(t.11 t.13)
+ t.10 = [t.13]
+ t.15 = t.10
+ t.16 = t.15
+ PrintIntS(t.16)
+ t.18 = t.0
+ t.19 = 1
+ t.17 = Add(t.18 t.19)
+ t.20 = t.17
+ t.0 = t.20
+ goto :while121_test
+while121_end:
+ t.21 = 0
+ t.22 = t.21
+ t.23 = t.22
+ ret t.23
func BBS_Init(this t.0 )
- [this+20] = t.0
- t.1 = call :AllocArray(t.0)
- [this+16] = t.1
- t.2 = [this+16]
- t.3 = MulS(0 4)
- t.3 = Add(t.3 4)
- t.3 = Add(t.2 t.3)
- [t.3] = 20
- t.4 = [this+16]
- t.5 = MulS(1 4)
- t.5 = Add(t.5 4)
- t.5 = Add(t.4 t.5)
- [t.5] = 7
- t.6 = [this+16]
- t.7 = MulS(2 4)
- t.7 = Add(t.7 4)
- t.7 = Add(t.6 t.7)
- [t.7] = 12
+ t.1 = t.0
+ t.2 = t.1
+ [this+20] = t.2
+ t.3 = t.0
+ t.4 = t.3
+ t.5 = call :AllocArray(t.4)
+ t.6 = t.5
+ t.7 = t.6
+ [this+16] = t.7
t.8 = [this+16]
- t.9 = MulS(3 4)
+ t.10 = 0
+ t.11 = t.10
+ t.9 = MulS(t.11 4)
t.9 = Add(t.9 4)
t.9 = Add(t.8 t.9)
- [t.9] = 18
- t.10 = [this+16]
- t.11 = MulS(4 4)
- t.11 = Add(t.11 4)
- t.11 = Add(t.10 t.11)
- [t.11] = 2
- t.12 = [this+16]
- t.13 = MulS(5 4)
- t.13 = Add(t.13 4)
- t.13 = Add(t.12 t.13)
- [t.13] = 11
+ t.12 = 20
+ t.13 = t.12
+ [t.9] = t.13
t.14 = [this+16]
- t.15 = MulS(6 4)
+ t.16 = 1
+ t.17 = t.16
+ t.15 = MulS(t.17 4)
t.15 = Add(t.15 4)
t.15 = Add(t.14 t.15)
- [t.15] = 6
- t.16 = [this+16]
- t.17 = MulS(7 4)
- t.17 = Add(t.17 4)
- t.17 = Add(t.16 t.17)
- [t.17] = 9
- t.18 = [this+16]
- t.19 = MulS(8 4)
- t.19 = Add(t.19 4)
- t.19 = Add(t.18 t.19)
- [t.19] = 19
+ t.18 = 7
+ t.19 = t.18
+ [t.15] = t.19
t.20 = [this+16]
- t.21 = MulS(9 4)
+ t.22 = 2
+ t.23 = t.22
+ t.21 = MulS(t.23 4)
t.21 = Add(t.21 4)
t.21 = Add(t.20 t.21)
- [t.21] = 5
- t.22 = 0
- ret t.22
+ t.24 = 12
+ t.25 = t.24
+ [t.21] = t.25
+ t.26 = [this+16]
+ t.28 = 3
+ t.29 = t.28
+ t.27 = MulS(t.29 4)
+ t.27 = Add(t.27 4)
+ t.27 = Add(t.26 t.27)
+ t.30 = 18
+ t.31 = t.30
+ [t.27] = t.31
+ t.32 = [this+16]
+ t.34 = 4
+ t.35 = t.34
+ t.33 = MulS(t.35 4)
+ t.33 = Add(t.33 4)
+ t.33 = Add(t.32 t.33)
+ t.36 = 2
+ t.37 = t.36
+ [t.33] = t.37
+ t.38 = [this+16]
+ t.40 = 5
+ t.41 = t.40
+ t.39 = MulS(t.41 4)
+ t.39 = Add(t.39 4)
+ t.39 = Add(t.38 t.39)
+ t.42 = 11
+ t.43 = t.42
+ [t.39] = t.43
+ t.44 = [this+16]
+ t.46 = 6
+ t.47 = t.46
+ t.45 = MulS(t.47 4)
+ t.45 = Add(t.45 4)
+ t.45 = Add(t.44 t.45)
+ t.48 = 6
+ t.49 = t.48
+ [t.45] = t.49
+ t.50 = [this+16]
+ t.52 = 7
+ t.53 = t.52
+ t.51 = MulS(t.53 4)
+ t.51 = Add(t.51 4)
+ t.51 = Add(t.50 t.51)
+ t.54 = 9
+ t.55 = t.54
+ [t.51] = t.55
+ t.56 = [this+16]
+ t.58 = 8
+ t.59 = t.58
+ t.57 = MulS(t.59 4)
+ t.57 = Add(t.57 4)
+ t.57 = Add(t.56 t.57)
+ t.60 = 19
+ t.61 = t.60
+ [t.57] = t.61
+ t.62 = [this+16]
+ t.64 = 9
+ t.65 = t.64
+ t.63 = MulS(t.65 4)
+ t.63 = Add(t.63 4)
+ t.63 = Add(t.62 t.63)
+ t.66 = 5
+ t.67 = t.66
+ [t.63] = t.67
+ t.68 = 0
+ t.69 = t.68
+ t.70 = t.69
+ ret t.70
func AllocArray(size)
bytes = MulS(size 4)