Skip to content

Instantly share code, notes, and snippets.

@fabre-thibaud
Created December 17, 2014 14:55
Show Gist options
  • Save fabre-thibaud/bd707b1037f19cfc5b59 to your computer and use it in GitHub Desktop.
Save fabre-thibaud/bd707b1037f19cfc5b59 to your computer and use it in GitHub Desktop.
Opcodes for EC point multiplication
==================================================================================================================================================
Opcodes for point multiplication via Montgomery Ladder without branching
// Significant lines are l. 185 - 197 - content of loop, previous branches are irrelevant (at least I think they are))
==================================================================================================================================================
Function mul:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 7, Position 2 = 18
Branch analysis from position: 7
Jump found. Position 1 = 18
Branch analysis from position: 18
Jump found. Position 1 = 28, Position 2 = 35
Branch analysis from position: 28
Jump found. Position 1 = -2
Branch analysis from position: 35
Jump found. Position 1 = 105, Position 2 = 66
Branch analysis from position: 105
Jump found. Position 1 = -2
Branch analysis from position: 66
Jump found. Position 1 = 63
Branch analysis from position: 63
Jump found. Position 1 = 60
Branch analysis from position: 60
Branch analysis from position: 18
filename: /home/thibaud/Documents/Workspaces/forks/php-ecc/src/Point.php
function name: mul
number of ops: 110
compiled vars: !0 = $n, !1 = $r, !2 = $this, !3 = $k, !4 = $i, !5 = $b
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
175 0 E > EXT_NOP
1 RECV !0
177 2 EXT_STMT
3 FETCH_OBJ_R $0 'order'
4 FETCH_CONSTANT ~1 'Mdanter%5CEcc%5Cnull'
5 IS_NOT_EQUAL ~2 $0, ~1
6 > JMPZ ~2, ->18
178 7 > EXT_STMT
8 FETCH_OBJ_R $3 'adapter'
9 INIT_METHOD_CALL $3, 'mod'
10 EXT_FCALL_BEGIN
11 SEND_VAR !0
12 FETCH_OBJ_FUNC_ARG $5 'order'
13 SEND_VAR $5
14 DO_FCALL_BY_NAME 2 $6
15 EXT_FCALL_END
16 ASSIGN !0, $6
179 17 > JMP ->18
181 18 > EXT_STMT
19 FETCH_OBJ_R $8 'adapter'
20 INIT_METHOD_CALL $8, 'cmp'
21 EXT_FCALL_BEGIN
22 SEND_VAR !0
23 SEND_VAL 0
24 DO_FCALL_BY_NAME 2 $10
25 EXT_FCALL_END
26 IS_EQUAL ~11 $10, 0
27 > JMPZ ~11, ->35
182 28 > EXT_STMT
29 INIT_STATIC_METHOD_CALL 'Mdanter%5CEcc%5CPoints', 'infinity'
30 EXT_FCALL_BEGIN
31 DO_FCALL_BY_NAME 0 $12
32 EXT_FCALL_END
33 > RETURN $12
183 34* JMP ->35
186 35 > EXT_STMT
36 FETCH_CLASS 4 :13 'Mdanter%5CEcc%5CNullPoint'
37 EXT_FCALL_BEGIN
38 NEW $14 :13
39 FETCH_OBJ_FUNC_ARG $15 'curve'
40 SEND_VAR $15
41 FETCH_OBJ_FUNC_ARG $16 'order'
42 SEND_VAR $16
43 DO_FCALL_BY_NAME 2
44 EXT_FCALL_END
45 INIT_ARRAY ~18 $14
188 46 ADD_ARRAY_ELEMENT ~18 !2
47 ASSIGN !1, ~18
189 48 EXT_STMT
49 INIT_NS_FCALL_BY_NAME
50 EXT_FCALL_BEGIN
51 SEND_VAR !0
52 DO_FCALL_BY_NAME 1 $21
53 EXT_FCALL_END
54 MUL ~22 $21, 8
55 SUB ~23 ~22, 1
56 ASSIGN !3, ~23
191 57 EXT_STMT
58 SUB ~25 !3, 1
59 ASSIGN !4, ~25
60 > IS_SMALLER ~27 0, !4
61 EXT_STMT
62 > JMPZNZ 66 ~27, ->105
63 > POST_DEC ~28 !4
64 FREE ~28
65 > JMP ->60
193 66 > EXT_STMT
67 FETCH_OBJ_R $29 'adapter'
68 INIT_METHOD_CALL $29, 'rightShift'
69 EXT_FCALL_BEGIN
70 SEND_VAR !0
71 SUB ~31 !4, 1
72 SEND_VAL ~31
73 DO_FCALL_BY_NAME 2 $32
74 EXT_FCALL_END
75 ASSIGN !5, $32
194 76 EXT_STMT
77 FETCH_OBJ_R $34 'adapter'
78 INIT_METHOD_CALL $34, 'bitwiseAnd'
79 EXT_FCALL_BEGIN
80 SEND_VAR !5
81 SEND_VAL '1'
82 DO_FCALL_BY_NAME 2 $36
83 EXT_FCALL_END
84 ASSIGN !5, $36
196 85 EXT_STMT
86 SUB ~38 1, !5
87 FETCH_DIM_R $40 !1, 0
88 INIT_METHOD_CALL $40, 'add'
89 EXT_FCALL_BEGIN
90 FETCH_DIM_FUNC_ARG $42 !1, 1
91 SEND_VAR $42
92 DO_FCALL_BY_NAME 1 $43
93 EXT_FCALL_END
94 ASSIGN_DIM !1, ~38
95 OP_DATA $43, $44
197 96 EXT_STMT
97 FETCH_DIM_R $46 !1, !5
98 INIT_METHOD_CALL $46, 'getDouble'
99 EXT_FCALL_BEGIN
100 DO_FCALL_BY_NAME 0 $48
101 EXT_FCALL_END
102 ASSIGN_DIM !1, !5
103 OP_DATA $48, $49
198 104 > JMP ->63
200 105 > EXT_STMT
106 FETCH_DIM_R $50 !1, 0
107 > RETURN $50
201 108* EXT_STMT
109* > RETURN null
End of function mul
==================================================================================================================================================
Opcodes for Point::getDouble()
==================================================================================================================================================
Function getdouble:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 132, Position 2 = 141
Branch analysis from position: 132
Jump found. Position 1 = 141
Branch analysis from position: 141
Jump found. Position 1 = -2
Branch analysis from position: 141
filename: /home/thibaud/Documents/Workspaces/forks/php-ecc/src/Point.php
function name: getDouble
number of ops: 158
compiled vars: !0 = $math, !1 = $p, !2 = $a, !3 = $inverse, !4 = $threeX2, !5 = $l, !6 = $x3, !7 = $y3
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
228 0 E > EXT_NOP
230 1 EXT_STMT
2 FETCH_OBJ_R $0 'adapter'
3 ASSIGN !0, $0
232 4 EXT_STMT
5 FETCH_OBJ_R $2 'curve'
6 INIT_METHOD_CALL $2, 'getPrime'
7 EXT_FCALL_BEGIN
8 DO_FCALL_BY_NAME 0 $4
9 EXT_FCALL_END
10 ASSIGN !1, $4
233 11 EXT_STMT
12 FETCH_OBJ_R $6 'curve'
13 INIT_METHOD_CALL $6, 'getA'
14 EXT_FCALL_BEGIN
15 DO_FCALL_BY_NAME 0 $8
16 EXT_FCALL_END
17 ASSIGN !2, $8
235 18 EXT_STMT
19 INIT_METHOD_CALL !0, 'inverseMod'
20 EXT_FCALL_BEGIN
21 INIT_METHOD_CALL !0, 'mul'
22 EXT_FCALL_BEGIN
23 SEND_VAL 2
24 FETCH_OBJ_FUNC_ARG $12 'y'
25 SEND_VAR $12
26 DO_FCALL_BY_NAME 2 $13
27 EXT_FCALL_END
28 SEND_VAR_NO_REF 4 $13
29 SEND_VAR !1
30 DO_FCALL_BY_NAME 2 $14
31 EXT_FCALL_END
32 ASSIGN !3, $14
236 33 EXT_STMT
34 INIT_METHOD_CALL !0, 'mul'
35 EXT_FCALL_BEGIN
36 SEND_VAL 3
37 INIT_METHOD_CALL !0, 'pow'
38 EXT_FCALL_BEGIN
39 FETCH_OBJ_FUNC_ARG $18 'x'
40 SEND_VAR $18
41 SEND_VAL 2
42 DO_FCALL_BY_NAME 2 $19
43 EXT_FCALL_END
44 SEND_VAR_NO_REF 4 $19
45 DO_FCALL_BY_NAME 2 $20
46 EXT_FCALL_END
47 ASSIGN !4, $20
238 48 EXT_STMT
49 INIT_METHOD_CALL !0, 'mod'
50 EXT_FCALL_BEGIN
51 INIT_METHOD_CALL !0, 'mul'
52 EXT_FCALL_BEGIN
53 INIT_METHOD_CALL !0, 'add'
54 EXT_FCALL_BEGIN
55 SEND_VAR !4
56 SEND_VAR !2
57 DO_FCALL_BY_NAME 2 $25
58 EXT_FCALL_END
59 SEND_VAR_NO_REF 4 $25
60 SEND_VAR !3
61 DO_FCALL_BY_NAME 2 $26
62 EXT_FCALL_END
63 SEND_VAR_NO_REF 4 $26
64 SEND_VAR !1
65 DO_FCALL_BY_NAME 2 $27
66 EXT_FCALL_END
67 ASSIGN !5, $27
239 68 EXT_STMT
69 INIT_METHOD_CALL !0, 'mod'
70 EXT_FCALL_BEGIN
71 INIT_METHOD_CALL !0, 'sub'
72 EXT_FCALL_BEGIN
73 INIT_METHOD_CALL !0, 'pow'
74 EXT_FCALL_BEGIN
75 SEND_VAR !5
76 SEND_VAL 2
77 DO_FCALL_BY_NAME 2 $32
78 EXT_FCALL_END
79 SEND_VAR_NO_REF 4 $32
80 INIT_METHOD_CALL !0, 'mul'
81 EXT_FCALL_BEGIN
82 SEND_VAL 2
83 FETCH_OBJ_FUNC_ARG $34 'x'
84 SEND_VAR $34
85 DO_FCALL_BY_NAME 2 $35
86 EXT_FCALL_END
87 SEND_VAR_NO_REF 4 $35
88 DO_FCALL_BY_NAME 2 $36
89 EXT_FCALL_END
90 SEND_VAR_NO_REF 4 $36
91 SEND_VAR !1
92 DO_FCALL_BY_NAME 2 $37
93 EXT_FCALL_END
94 ASSIGN !6, $37
240 95 EXT_STMT
96 INIT_METHOD_CALL !0, 'mod'
97 EXT_FCALL_BEGIN
98 INIT_METHOD_CALL !0, 'sub'
99 EXT_FCALL_BEGIN
100 INIT_METHOD_CALL !0, 'mul'
101 EXT_FCALL_BEGIN
102 SEND_VAR !5
103 INIT_METHOD_CALL !0, 'sub'
104 EXT_FCALL_BEGIN
105 FETCH_OBJ_FUNC_ARG $43 'x'
106 SEND_VAR $43
107 SEND_VAR !6
108 DO_FCALL_BY_NAME 2 $44
109 EXT_FCALL_END
110 SEND_VAR_NO_REF 4 $44
111 DO_FCALL_BY_NAME 2 $45
112 EXT_FCALL_END
113 SEND_VAR_NO_REF 4 $45
114 FETCH_OBJ_FUNC_ARG $46 'y'
115 SEND_VAR $46
116 DO_FCALL_BY_NAME 2 $47
117 EXT_FCALL_END
118 SEND_VAR_NO_REF 4 $47
119 SEND_VAR !1
120 DO_FCALL_BY_NAME 2 $48
121 EXT_FCALL_END
122 ASSIGN !7, $48
242 123 EXT_STMT
124 INIT_METHOD_CALL !0, 'cmp'
125 EXT_FCALL_BEGIN
126 SEND_VAL 0
127 SEND_VAR !7
128 DO_FCALL_BY_NAME 2 $51
129 EXT_FCALL_END
130 IS_SMALLER ~52 0, $51
131 > JMPZ ~52, ->141
243 132 > EXT_STMT
133 INIT_METHOD_CALL !0, 'add'
134 EXT_FCALL_BEGIN
135 SEND_VAR !1
136 SEND_VAR !7
137 DO_FCALL_BY_NAME 2 $54
138 EXT_FCALL_END
139 ASSIGN !7, $54
244 140 > JMP ->141
246 141 > EXT_STMT
142 FETCH_CLASS 1 :56
143 EXT_FCALL_BEGIN
144 NEW $57 :56
145 FETCH_OBJ_FUNC_ARG $58 'curve'
146 SEND_VAR $58
147 SEND_VAR !6
148 SEND_VAR !7
149 FETCH_CONSTANT ~59 'Mdanter%5CEcc%5Cnull'
150 SEND_VAL ~59
151 FETCH_OBJ_FUNC_ARG $60 'adapter'
152 SEND_VAR $60
153 DO_FCALL_BY_NAME 5
154 EXT_FCALL_END
155 > RETURN $57
247 156* EXT_STMT
157* > RETURN null
1; eop: 51; out1: 52
branch: # 52; line: 136- 137; sop: 52; eop: 54
path #1: 0, 49, 52,
path #2: 0, 51, 52,
branch: # 0; line: 143- 146; sop: 0; eop: 11
path #1: 0,
branch: # 0; line: 152- 155; sop: 0; eop: 13
path #1: 0,
branch: # 0; line: 49- 49; sop: 0; eop: 4; out1: -2
path #1: 0,
branch: # 0; line: 58- 58; sop: 0; eop: 4; out1: -2
path #1: 0,
branch: # 0; line: 66- 66; sop: 0; eop: 4; out1: -2
path #1: 0,
branch: # 0; line: 74- 74; sop: 0; eop: 4; out1: -2
path #1: 0,
branch: # 0; line: 81- 81; sop: 0; eop: 3; out1: -2
path #1: 0,
branch: # 0; line: 88- 88; sop: 0; eop: 3; out1: -2
path #1: 0,
branch: # 0; line: 95- 95; sop: 0; eop: 3; out1: -2
path #1: 0,
branch: # 0; line: 102- 102; sop: 0; eop: 3; out1: -2
path #1: 0,
branch: # 0; line: 109- 109; sop: 0; eop: 3; out1: -2
path #1: 0,
branch: # 0; line: 116- 116; sop: 0; eop: 3; out1: -2
path #1: 0,
branch: # 0; line: 81- 89; sop: 0; eop: 32; out1: 33; out2: 49
branch: # 33; line: 90- 90; sop: 33; eop: 47; out1: -2
branch: # 49; line: 93- 93; sop: 49; eop: 53; out1: 54; out2: 70
branch: # 54; line: 93- 93; sop: 54; eop: 69; out1: 70
branch: # 70; line: 93- 93; sop: 70; eop: 70; out1: 71; out2: 88
branch: # 71; line: 94- 94; sop: 71; eop: 86; out1: -2
branch: # 88; line: 96- 96; sop: 88; eop: 89; out1: -2
path #1: 0, 33,
path #2: 0, 49, 54, 70, 71,
path #3: 0, 49, 54, 70, 88,
path #4: 0, 49, 70, 71,
path #5: 0, 49, 70, 88,
branch: # 0; line: 103- 105; sop: 0; eop: 12; out1: 13; out2: 16
branch: # 13; line: 106- 106; sop: 13; eop: 14; out1: -2
branch: # 16; line: 109- 115; sop: 16; eop: 60; out1: 61; out2: 64
branch: # 61; line: 116- 116; sop: 61; eop: 62; out1: -2
branch: # 64; line: 119- 120; sop: 64; eop: 67
path #1: 0, 13,
path #2: 0, 16, 61,
path #3: 0, 16, 64,
branch: # 0; line: 127- 130; sop: 0; eop: 11
path #1: 0,
branch: # 0; line: 137- 139; sop: 0; eop: 12; out1: 13; out2: 16
branch: # 13; line: 140- 140; sop: 13; eop: 14; out1: -2
branch: # 16; line: 143- 145; sop: 16; eop: 31; out1: 32; out2: 41
branch: # 32; line: 146- 146; sop: 32; eop: 39; out1: -2
branch: # 41; line: 149- 149; sop: 41; eop: 65; out1: 66; out2: 105
branch: # 66; line: 150- 150; sop: 66; eop: 90; out1: 91; out2: 98
branch: # 91; line: 151- 151; sop: 91; eop: 96; out1: -2
branch: # 98; line: 153- 153; sop: 98; eop: 103; out1: -2
branch: #105; line: 157- 163; sop: 105; eop: 221; out1: 222; out2: 231
branch: #222; line: 164- 165; sop: 222; eop: 230; out1: 231
branch: #231; line: 167- 168; sop: 231; eop: 241
path #1: 0, 13,
path #2: 0, 16, 32,
path #3: 0, 16, 41, 66, 91,
path #4: 0, 16, 41, 66, 98,
path #5: 0, 16, 41, 105, 222, 231,
path #6: 0, 16, 41, 105, 231,
branch: # 0; line: 175- 177; sop: 0; eop: 6; out1: 7; out2: 18
branch: # 7; line: 178- 179; sop: 7; eop: 17; out1: 18
branch: # 18; line: 181- 181; sop: 18; eop: 27; out1: 28; out2: 35
branch: # 28; line: 182- 182; sop: 28; eop: 33; out1: -2
branch: # 35; line: 186- 191; sop: 35; eop: 59; out1: 60
branch: # 60; line: 191- 191; sop: 60; eop: 62; out1: 105; out2: 66
branch: # 63; line: 191- 191; sop: 63; eop: 65; out1: 60
branch: # 66; line: 193- 198; sop: 66; eop: 104; out1: 63
branch: #105; line: 200- 201; sop: 105; eop: 109
path #1: 0, 7, 18, 28,
path #2: 0, 7, 18, 35, 60, 105,
path #3: 0, 7, 18, 35, 60, 66, 63, 60, 105,
path #4: 0, 18, 28,
path #5: 0, 18, 35, 60, 105,
path #6: 0, 18, 35, 60, 66, 63, 60, 105,
branch: # 0; line: 208- 211; sop: 0; eop: 5
path #1: 0,
branch: # 0; line: 218- 221; sop: 0; eop: 22
path #1: 0,
branch: # 0; line: 228- 242;End of function getdouble
==================================================================================================================================================
Opcodes for Point::add()
==================================================================================================================================================
Function add:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 13, Position 2 = 16
Branch analysis from position: 13
Jump found. Position 1 = -2
Branch analysis from position: 16
Jump found. Position 1 = 32, Position 2 = 41
Branch analysis from position: 32
Jump found. Position 1 = -2
Branch analysis from position: 41
Jump found. Position 1 = 66, Position 2 = 105
Branch analysis from position: 66
Jump found. Position 1 = 91, Position 2 = 98
Branch analysis from position: 91
Jump found. Position 1 = -2
Branch analysis from position: 98
Jump found. Position 1 = -2
Branch analysis from position: 105
Jump found. Position 1 = 222, Position 2 = 231
Branch analysis from position: 222
Jump found. Position 1 = 231
Branch analysis from position: 231
Jump found. Position 1 = -2
Branch analysis from position: 231
filename: /home/thibaud/Documents/Workspaces/forks/php-ecc/src/Point.php
function name: add
number of ops: 242
compiled vars: !0 = $addend, !1 = $this, !2 = $math, !3 = $p, !4 = $l, !5 = $x3, !6 = $y3
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
137 0 E > EXT_NOP
1 RECV !0
139 2 EXT_STMT
3 INIT_METHOD_CALL !0, 'equals'
4 EXT_FCALL_BEGIN
5 INIT_STATIC_METHOD_CALL 'Mdanter%5CEcc%5CPoints', 'infinity'
6 EXT_FCALL_BEGIN
7 DO_FCALL_BY_NAME 0 $1
8 EXT_FCALL_END
9 SEND_VAR_NO_REF 4 $1
10 DO_FCALL_BY_NAME 1 $2
11 EXT_FCALL_END
12 > JMPZ $2, ->16
140 13 > EXT_STMT
14 > RETURN !1
141 15* JMP ->16
143 16 > EXT_STMT
17 FETCH_OBJ_R $4 'adapter'
18 ASSIGN !2, $4
145 19 EXT_STMT
20 FETCH_OBJ_R $6 'curve'
21 INIT_METHOD_CALL $6, 'equals'
22 EXT_FCALL_BEGIN
23 INIT_METHOD_CALL !0, 'getCurve'
24 EXT_FCALL_BEGIN
25 DO_FCALL_BY_NAME 0 $9
26 EXT_FCALL_END
27 SEND_VAR_NO_REF 4 $9
28 DO_FCALL_BY_NAME 1 $10
29 EXT_FCALL_END
30 BOOL_NOT ~11 $10
31 > JMPZ ~11, ->41
146 32 > EXT_STMT
33 FETCH_CLASS 4 :12 'RuntimeException'
34 EXT_FCALL_BEGIN
35 NEW $13 :12
36 SEND_VAL 'The+Elliptic+Curves+do+not+match.'
37 DO_FCALL_BY_NAME 1
38 EXT_FCALL_END
39 > THROW 0 $13
147 40* JMP ->41
149 41 > EXT_STMT
42 INIT_METHOD_CALL !2, 'mod'
43 EXT_FCALL_BEGIN
44 INIT_METHOD_CALL !2, 'cmp'
45 EXT_FCALL_BEGIN
46 FETCH_OBJ_FUNC_ARG $17 'x'
47 SEND_VAR $17
48 INIT_METHOD_CALL !0, 'getX'
49 EXT_FCALL_BEGIN
50 DO_FCALL_BY_NAME 0 $19
51 EXT_FCALL_END
52 SEND_VAR_NO_REF 4 $19
53 DO_FCALL_BY_NAME 2 $20
54 EXT_FCALL_END
55 SEND_VAR_NO_REF 4 $20
56 FETCH_OBJ_R $21 'curve'
57 INIT_METHOD_CALL $21, 'getPrime'
58 EXT_FCALL_BEGIN
59 DO_FCALL_BY_NAME 0 $23
60 EXT_FCALL_END
61 SEND_VAR_NO_REF 4 $23
62 DO_FCALL_BY_NAME 2 $24
63 EXT_FCALL_END
64 IS_EQUAL ~25 $24, 0
65 > JMPZ ~25, ->105
150 66 > EXT_STMT
67 INIT_METHOD_CALL !2, 'mod'
68 EXT_FCALL_BEGIN
69 INIT_METHOD_CALL !2, 'add'
70 EXT_FCALL_BEGIN
71 FETCH_OBJ_FUNC_ARG $28 'y'
72 SEND_VAR $28
73 INIT_METHOD_CALL !0, 'getY'
74 EXT_FCALL_BEGIN
75 DO_FCALL_BY_NAME 0 $30
76 EXT_FCALL_END
77 SEND_VAR_NO_REF 4 $30
78 DO_FCALL_BY_NAME 2 $31
79 EXT_FCALL_END
80 SEND_VAR_NO_REF 4 $31
81 FETCH_OBJ_R $32 'curve'
82 INIT_METHOD_CALL $32, 'getPrime'
83 EXT_FCALL_BEGIN
84 DO_FCALL_BY_NAME 0 $34
85 EXT_FCALL_END
86 SEND_VAR_NO_REF 4 $34
87 DO_FCALL_BY_NAME 2 $35
88 EXT_FCALL_END
89 IS_EQUAL ~36 $35, 0
90 > JMPZ ~36, ->98
151 91 > EXT_STMT
92 INIT_STATIC_METHOD_CALL 'Mdanter%5CEcc%5CPoints', 'infinity'
93 EXT_FCALL_BEGIN
94 DO_FCALL_BY_NAME 0 $37
95 EXT_FCALL_END
96 > RETURN $37
152 97* JMP ->104
153 98 > EXT_STMT
99 INIT_METHOD_CALL 'getDouble'
100 EXT_FCALL_BEGIN
101 DO_FCALL_BY_NAME 0 $39
102 EXT_FCALL_END
103 > RETURN $39
155 104* JMP ->105
157 105 > EXT_STMT
106 FETCH_OBJ_R $40 'curve'
107 INIT_METHOD_CALL $40, 'getPrime'
108 EXT_FCALL_BEGIN
109 DO_FCALL_BY_NAME 0 $42
110 EXT_FCALL_END
111 ASSIGN !3, $42
158 112 EXT_STMT
113 INIT_METHOD_CALL !2, 'mod'
114 EXT_FCALL_BEGIN
115 INIT_METHOD_CALL !2, 'mul'
116 EXT_FCALL_BEGIN
117 INIT_METHOD_CALL !2, 'sub'
118 EXT_FCALL_BEGIN
119 INIT_METHOD_CALL !0, 'getY'
120 EXT_FCALL_BEGIN
121 DO_FCALL_BY_NAME 0 $48
122 EXT_FCALL_END
123 SEND_VAR_NO_REF 4 $48
124 FETCH_OBJ_FUNC_ARG $49 'y'
125 SEND_VAR $49
126 DO_FCALL_BY_NAME 2 $50
127 EXT_FCALL_END
128 SEND_VAR_NO_REF 4 $50
129 INIT_METHOD_CALL !2, 'inverseMod'
130 EXT_FCALL_BEGIN
131 INIT_METHOD_CALL !2, 'sub'
132 EXT_FCALL_BEGIN
133 INIT_METHOD_CALL !0, 'getX'
134 EXT_FCALL_BEGIN
135 DO_FCALL_BY_NAME 0 $54
136 EXT_FCALL_END
137 SEND_VAR_NO_REF 4 $54
138 FETCH_OBJ_FUNC_ARG $55 'x'
139 SEND_VAR $55
140 DO_FCALL_BY_NAME 2 $56
141 EXT_FCALL_END
142 SEND_VAR_NO_REF 4 $56
143 SEND_VAR !3
144 DO_FCALL_BY_NAME 2 $57
145 EXT_FCALL_END
146 SEND_VAR_NO_REF 4 $57
147 DO_FCALL_BY_NAME 2 $58
148 EXT_FCALL_END
149 SEND_VAR_NO_REF 4 $58
150 SEND_VAR !3
151 DO_FCALL_BY_NAME 2 $59
152 EXT_FCALL_END
153 ASSIGN !4, $59
160 154 EXT_STMT
155 INIT_METHOD_CALL !2, 'mod'
156 EXT_FCALL_BEGIN
157 INIT_METHOD_CALL !2, 'sub'
158 EXT_FCALL_BEGIN
159 INIT_METHOD_CALL !2, 'sub'
160 EXT_FCALL_BEGIN
161 INIT_METHOD_CALL !2, 'pow'
162 EXT_FCALL_BEGIN
163 SEND_VAR !4
164 SEND_VAL 2
165 DO_FCALL_BY_NAME 2 $65
166 EXT_FCALL_END
167 SEND_VAR_NO_REF 4 $65
168 FETCH_OBJ_FUNC_ARG $66 'x'
169 SEND_VAR $66
170 DO_FCALL_BY_NAME 2 $67
171 EXT_FCALL_END
172 SEND_VAR_NO_REF 4 $67
173 INIT_METHOD_CALL !0, 'getX'
174 EXT_FCALL_BEGIN
175 DO_FCALL_BY_NAME 0 $69
176 EXT_FCALL_END
177 SEND_VAR_NO_REF 4 $69
178 DO_FCALL_BY_NAME 2 $70
179 EXT_FCALL_END
180 SEND_VAR_NO_REF 4 $70
181 SEND_VAR !3
182 DO_FCALL_BY_NAME 2 $71
183 EXT_FCALL_END
184 ASSIGN !5, $71
161 185 EXT_STMT
186 INIT_METHOD_CALL !2, 'mod'
187 EXT_FCALL_BEGIN
188 INIT_METHOD_CALL !2, 'sub'
189 EXT_FCALL_BEGIN
190 INIT_METHOD_CALL !2, 'mul'
191 EXT_FCALL_BEGIN
192 SEND_VAR !4
193 INIT_METHOD_CALL !2, 'sub'
194 EXT_FCALL_BEGIN
195 FETCH_OBJ_FUNC_ARG $77 'x'
196 SEND_VAR $77
197 SEND_VAR !5
198 DO_FCALL_BY_NAME 2 $78
199 EXT_FCALL_END
200 SEND_VAR_NO_REF 4 $78
201 DO_FCALL_BY_NAME 2 $79
202 EXT_FCALL_END
203 SEND_VAR_NO_REF 4 $79
204 FETCH_OBJ_FUNC_ARG $80 'y'
205 SEND_VAR $80
206 DO_FCALL_BY_NAME 2 $81
207 EXT_FCALL_END
208 SEND_VAR_NO_REF 4 $81
209 SEND_VAR !3
210 DO_FCALL_BY_NAME 2 $82
211 EXT_FCALL_END
212 ASSIGN !6, $82
163 213 EXT_STMT
214 INIT_METHOD_CALL !2, 'cmp'
215 EXT_FCALL_BEGIN
216 SEND_VAL 0
217 SEND_VAR !6
218 DO_FCALL_BY_NAME 2 $85
219 EXT_FCALL_END
220 IS_SMALLER ~86 0, $85
221 > JMPZ ~86, ->231
164 222 > EXT_STMT
223 INIT_METHOD_CALL !2, 'add'
224 EXT_FCALL_BEGIN
225 SEND_VAR !3
226 SEND_VAR !6
227 DO_FCALL_BY_NAME 2 $88
228 EXT_FCALL_END
229 ASSIGN !6, $88
165 230 > JMP ->231
167 231 > EXT_STMT
232 FETCH_OBJ_R $90 'curve'
233 INIT_METHOD_CALL $90, 'getPoint'
234 EXT_FCALL_BEGIN
235 SEND_VAR !5
236 SEND_VAR !6
237 DO_FCALL_BY_NAME 2 $92
238 EXT_FCALL_END
239 > RETURN $92
168 240* EXT_STMT
241* > RETURN null
End of function add
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment