summaryrefslogtreecommitdiff
path: root/output/LinearSearch.vapor
diff options
context:
space:
mode:
Diffstat (limited to 'output/LinearSearch.vapor')
-rw-r--r--output/LinearSearch.vapor398
1 files changed, 243 insertions, 155 deletions
diff --git a/output/LinearSearch.vapor b/output/LinearSearch.vapor
index 868e715..a595d8b 100644
--- a/output/LinearSearch.vapor
+++ b/output/LinearSearch.vapor
@@ -2,12 +2,15 @@ func Main()
t.3 = HeapAllocZ(24)
[t.3+0] = :functable_LS
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_LS
@@ -17,167 +20,252 @@ const functable_LS
:LS_Init
func LS_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.7 = [this]
- t.7 = [t.7+4]
- t.6 = call t.7(this )
- t.5 = t.6
- t.8 = 9999
- PrintIntS(t.8)
- t.10 = [this]
- t.11 = 8
- t.10 = [t.10+8]
- t.9 = call t.10(this t.11)
+ 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.10 = this
+ t.11 = [this]
+ t.11 = [t.11+4]
+ t.9 = call t.11(this)
t.12 = t.9
- PrintIntS(t.12)
- t.14 = [this]
- t.15 = 12
- t.14 = [t.14+8]
- t.13 = call t.14(this t.15)
- t.16 = t.13
- PrintIntS(t.16)
+ t.8 = t.12
+ t.13 = 9999
+ t.14 = t.13
+ t.15 = t.14
+ PrintIntS(t.15)
+ t.17 = this
t.18 = [this]
- t.19 = 17
+ t.19 = 8
+ t.20 = t.19
t.18 = [t.18+8]
- t.17 = call t.18(this t.19)
- t.20 = t.17
- PrintIntS(t.20)
- t.22 = [this]
- t.23 = 50
- t.22 = [t.22+8]
- t.21 = call t.22(this t.23)
- t.24 = t.21
- PrintIntS(t.24)
- t.25 = 55
- ret t.25
+ t.16 = call t.18(this t.20)
+ t.21 = t.16
+ t.22 = t.21
+ PrintIntS(t.22)
+ t.24 = this
+ t.25 = [this]
+ t.26 = 12
+ t.27 = t.26
+ t.25 = [t.25+8]
+ t.23 = call t.25(this t.27)
+ t.28 = t.23
+ t.29 = t.28
+ PrintIntS(t.29)
+ t.31 = this
+ t.32 = [this]
+ t.33 = 17
+ t.34 = t.33
+ t.32 = [t.32+8]
+ t.30 = call t.32(this t.34)
+ t.35 = t.30
+ t.36 = t.35
+ PrintIntS(t.36)
+ t.38 = this
+ t.39 = [this]
+ t.40 = 50
+ t.41 = t.40
+ t.39 = [t.39+8]
+ t.37 = call t.39(this t.41)
+ t.42 = t.37
+ t.43 = t.42
+ PrintIntS(t.43)
+ t.44 = 55
+ t.45 = t.44
+ t.46 = t.45
+ ret t.46
func LS_Print(this )
- t.0 = 1
-while29_test:
- t.2 = t.0
- t.3 = [this+20]
- t.1 = LtS(t.2 t.3)
- t.4 = t.1
- if0 t.4 goto :while29_end
-while29_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 :while29_test
-while29_end:
- t.12 = 0
- ret t.12
-
-func LS_Search(this t.0 )
t.1 = 1
- t.2 = 0
- t.3 = 0
-while42_test:
- t.5 = t.1
- t.6 = [this+20]
- t.4 = LtS(t.5 t.6)
- t.7 = t.4
- if0 t.7 goto :while42_end
-while42_body:
- t.10 = [this+16]
- t.11 = MulS(t.1 4)
- t.11 = Add(t.11 4)
- t.11 = Add(t.10 t.11)
- t.9 = [t.11]
- t.8 = t.9
+ t.2 = t.1
+ t.0 = t.2
+while55_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 :while55_end
+while55_body:
+ t.12 = [this+16]
+ t.11 = t.12
t.14 = t.0
- t.15 = 1
- t.13 = Add(t.14 t.15)
- t.12 = t.13
- t.17 = t.8
+ 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.16 = LtS(t.17 t.18)
- t.19 = t.16
- if0 t.19 goto :if53_else
-if53_body:
- t.20 = 0
- goto :if53_end
-if53_else:
- t.23 = t.8
- t.24 = t.12
- t.22 = LtS(t.23 t.24)
- t.21 = Eq(t.22 0)
- t.25 = t.21
- if0 t.25 goto :if57_else
-if57_body:
- t.20 = 0
- goto :if57_end
-if57_else:
+ t.19 = 1
+ t.17 = Add(t.18 t.19)
+ t.20 = t.17
+ t.0 = t.20
+ goto :while55_test
+while55_end:
+ t.21 = 0
+ t.22 = t.21
+ t.23 = t.22
+ ret t.23
+
+func LS_Search(this t.0 )
t.2 = 1
- t.3 = 1
- t.1 = [this+20]
-if57_end:
-if53_end:
- t.27 = t.1
- t.28 = 1
- t.26 = Add(t.27 t.28)
- t.1 = t.26
- goto :while42_test
-while42_end:
- t.29 = t.3
- ret t.29
+ t.3 = t.2
+ t.1 = t.3
+ t.5 = 0
+ t.6 = t.5
+ t.4 = t.6
+ t.8 = 0
+ t.9 = t.8
+ t.7 = t.9
+while83_test:
+ t.11 = t.1
+ t.12 = [this+20]
+ t.13 = t.12
+ t.14 = t.13
+ t.10 = LtS(t.11 t.14)
+ t.15 = t.10
+ t.16 = t.15
+ if0 t.16 goto :while83_end
+while83_body:
+ t.20 = [this+16]
+ t.19 = t.20
+ t.22 = t.1
+ t.21 = MulS(t.22 4)
+ t.21 = Add(t.21 4)
+ t.21 = Add(t.19 t.21)
+ t.18 = [t.21]
+ t.23 = t.18
+ t.17 = t.23
+ t.26 = t.0
+ t.27 = 1
+ t.25 = Add(t.26 t.27)
+ t.28 = t.25
+ t.24 = t.28
+ t.30 = t.17
+ t.31 = t.0
+ t.29 = LtS(t.30 t.31)
+ t.32 = t.29
+ t.33 = t.32
+ if0 t.33 goto :if101_else
+if101_body:
+ t.35 = 0
+ t.36 = t.35
+ t.34 = t.36
+ goto :if101_end
+if101_else:
+ t.39 = t.17
+ t.40 = t.24
+ t.38 = LtS(t.39 t.40)
+ t.41 = t.38
+ t.42 = t.41
+ t.43 = t.42
+ t.37 = Eq(t.43 0)
+ t.44 = t.37
+ t.45 = t.44
+ t.46 = t.45
+ if0 t.46 goto :if108_else
+if108_body:
+ t.47 = 0
+ t.48 = t.47
+ t.34 = t.48
+ goto :if108_end
+if108_else:
+ t.49 = 1
+ t.50 = t.49
+ t.4 = t.50
+ t.51 = 1
+ t.52 = t.51
+ t.7 = t.52
+ t.53 = [this+20]
+ t.54 = t.53
+ t.1 = t.54
+if108_end:
+if101_end:
+ t.56 = t.1
+ t.57 = 1
+ t.55 = Add(t.56 t.57)
+ t.58 = t.55
+ t.1 = t.58
+ goto :while83_test
+while83_end:
+ t.59 = t.7
+ t.60 = t.59
+ t.61 = t.60
+ ret t.61
func LS_Init(this t.0 )
- [this+20] = t.0
- t.1 = call :AllocArray(t.0)
- [this+16] = t.1
- t.2 = 1
- t.5 = [this+20]
- t.6 = 1
- t.4 = Add(t.5 t.6)
- t.3 = t.4
-while70_test:
- t.8 = t.2
- t.9 = [this+20]
- t.7 = LtS(t.8 t.9)
- t.10 = t.7
- if0 t.10 goto :while70_end
-while70_body:
- t.13 = 2
- t.14 = t.2
- t.12 = MulS(t.13 t.14)
- t.11 = t.12
- t.17 = t.3
- t.18 = 3
- t.16 = Sub(t.17 t.18)
- t.15 = t.16
- t.19 = [this+16]
- t.20 = MulS(t.2 4)
- t.20 = Add(t.20 4)
- t.20 = Add(t.19 t.20)
- t.22 = t.11
- t.23 = t.15
- t.21 = Add(t.22 t.23)
- [t.20] = t.21
- t.25 = t.2
- t.26 = 1
- t.24 = Add(t.25 t.26)
- t.2 = t.24
- t.28 = t.3
- t.29 = 1
- t.27 = Sub(t.28 t.29)
- t.3 = t.27
- goto :while70_test
-while70_end:
- t.30 = 0
- ret t.30
+ 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.9 = 1
+ t.10 = t.9
+ t.8 = t.10
+ t.13 = [this+20]
+ t.14 = 1
+ t.12 = Add(t.13 t.14)
+ t.15 = t.12
+ t.11 = t.15
+while146_test:
+ t.17 = t.8
+ t.18 = [this+20]
+ t.19 = t.18
+ t.20 = t.19
+ t.16 = LtS(t.17 t.20)
+ t.21 = t.16
+ t.22 = t.21
+ if0 t.22 goto :while146_end
+while146_body:
+ t.25 = 2
+ t.26 = t.8
+ t.24 = MulS(t.25 t.26)
+ t.27 = t.24
+ t.23 = t.27
+ t.30 = t.11
+ t.31 = 3
+ t.29 = Sub(t.30 t.31)
+ t.32 = t.29
+ t.28 = t.32
+ t.33 = [this+16]
+ t.35 = t.8
+ t.36 = t.35
+ t.34 = MulS(t.36 4)
+ t.34 = Add(t.34 4)
+ t.34 = Add(t.33 t.34)
+ t.38 = t.23
+ t.39 = t.28
+ t.37 = Add(t.38 t.39)
+ t.40 = t.37
+ [t.34] = t.40
+ t.42 = t.8
+ t.43 = 1
+ t.41 = Add(t.42 t.43)
+ t.44 = t.41
+ t.8 = t.44
+ t.46 = t.11
+ t.47 = 1
+ t.45 = Sub(t.46 t.47)
+ t.48 = t.45
+ t.11 = t.48
+ goto :while146_test
+while146_end:
+ t.49 = 0
+ t.50 = t.49
+ t.51 = t.50
+ ret t.51
func AllocArray(size)
bytes = MulS(size 4)