-
Notifications
You must be signed in to change notification settings - Fork 1
/
pmul.evm
214 lines (212 loc) · 4.04 KB
/
pmul.evm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
/* "pmul.sol":24:914 contract pmul {... */
mstore(0x40, 0x80)
/* "pmul.sol":207:208 0 */
0x00
/* "pmul.sol":196:208 uint out = 0 */
dup1
sstore
/* "pmul.sol":215:912 constructor() public {... */
callvalue
/* "--CODEGEN--":8:17 */
dup1
/* "--CODEGEN--":5:7 */
iszero
tag_1
jumpi
/* "--CODEGEN--":30:31 */
0x00
/* "--CODEGEN--":27:28 */
dup1
/* "--CODEGEN--":20:32 */
revert
/* "--CODEGEN--":5:7 */
tag_1:
pop
/* "pmul.sol":251:257 uint j */
0x00
/* "pmul.sol":246:880 for (uint j = 0; j < 100000; ++j) {... */
tag_4:
/* "pmul.sol":267:273 100000 */
0x0186a0
/* "pmul.sol":263:264 j */
dup2
/* "pmul.sol":263:273 j < 100000 */
lt
/* "pmul.sol":246:880 for (uint j = 0; j < 100000; ++j) {... */
iszero
tag_5
jumpi
/* "pmul.sol":149:164 0x313eb2922b35d */
0x0313eb2922b35d
/* "pmul.sol":303:308 K + j */
dup2
add
/* "pmul.sol":64:82 0xeb1342f02d62f9e7 */
0xeb1342f02d62f9e7
/* "pmul.sol":107:125 0xbd95ca60288bb093 */
0xbd95ca60288bb093
/* "pmul.sol":386:391 N - 2 */
0x30
/* "pmul.sol":372:840 for (uint i = N - 2; i > 0; --i) {... */
tag_7:
/* "pmul.sol":393:398 i > 0 */
dup1
iszero
/* "pmul.sol":372:840 for (uint i = N - 2; i > 0; --i) {... */
tag_8
jumpi
/* "pmul.sol":444:445 2 */
0x02
/* "pmul.sol":432:433 3 */
0x03
/* "pmul.sol":432:441 3 * x * x */
dup5
dup1
mul
mul
/* "pmul.sol":432:445 3 * x * x / 2 */
dup2
swap1
div
/* "pmul.sol":432:449 3 * x * x / 2 * y */
dup4
mul
swap1
/* "pmul.sol":487:492 2 * x */
dup5
mul
/* "pmul.sol":479:484 L * L */
dup2
dup1
mul
/* "pmul.sol":479:492 L * L - 2 * x */
sub
/* "pmul.sol":527:535 x - newX */
dup1
dup6
sub
/* "pmul.sol":522:536 L * (x - newX) */
dup3
mul
/* "pmul.sol":522:540 L * (x - newX) - x */
dup6
swap1
sub
/* "pmul.sol":562:567 k * i */
dup4
dup8
mul
/* "pmul.sol":571:572 1 */
0x01
/* "pmul.sol":562:572 k * i == 1 */
eq
/* "pmul.sol":558:774 if (k * i == 1) {... */
iszero
tag_11
jumpi
/* "pmul.sol":613:617 newX */
dup2
/* "pmul.sol":609:610 x */
dup7
/* "pmul.sol":609:617 x - newX */
sub
/* "pmul.sol":605:606 x */
dup7
/* "pmul.sol":601:602 y */
dup7
/* "pmul.sol":601:606 y - x */
sub
/* "pmul.sol":600:618 (y - x)/(x - newX) */
dup2
tag_12
jumpi
invalid
tag_12:
div
swap3
pop
/* "pmul.sol":685:690 L * L */
dup3
dup1
mul
/* "pmul.sol":685:697 L * L - newX */
dup3
swap1
sub
/* "pmul.sol":685:701 L * L - newX - x */
dup7
swap1
sub
swap2
/* "pmul.sol":735:746 xTmp - newX */
dup3
swap1
sub
/* "pmul.sol":730:748 L * (xTmp - newX ) */
dup4
mul
/* "pmul.sol":730:755 L * (xTmp - newX ) - newY */
sub
/* "pmul.sol":558:774 if (k * i == 1) {... */
tag_11:
/* "pmul.sol":795:799 newX */
swap1
swap5
pop
/* "pmul.sol":821:825 newY */
swap3
pop
pop
not(0x00)
/* "pmul.sol":400:403 --i */
add
/* "pmul.sol":372:840 for (uint i = N - 2; i > 0; --i) {... */
jump(tag_7)
tag_8:
pop
/* "pmul.sol":857:860 out */
0x00
/* "pmul.sol":857:869 out += x ^ y */
dup1
sload
/* "pmul.sol":864:869 x ^ y */
swap2
swap1
swap3
xor
/* "pmul.sol":857:869 out += x ^ y */
add
swap1
sstore
pop
0x01
/* "pmul.sol":275:278 ++j */
add
/* "pmul.sol":246:880 for (uint j = 0; j < 100000; ++j) {... */
jump(tag_4)
tag_5:
pop
/* "pmul.sol":896:899 out */
sload(0x00)
/* "pmul.sol":889:905 assert(out != 0) */
tag_13
jumpi
invalid
tag_13:
/* "pmul.sol":24:914 contract pmul {... */
dataSize(sub_0)
dup1
dataOffset(sub_0)
0x00
codecopy
0x00
return
stop
sub_0: assembly {
/* "pmul.sol":24:914 contract pmul {... */
mstore(0x40, 0x80)
0x00
dup1
revert
auxdata: 0xa265627a7a7230582023e112579bdb67289aa42db37d3935a51771809ebf2fca03543c0737d531c4e864736f6c63430005090032
}