2019-10-03 21:54:25 +02:00
|
|
|
"Asm.fif" include
|
|
|
|
// automatically generated from `/home/daniil/repos/contest/lib/crypto/smartcont/stdlib.fc` `wallet-code.fc`
|
|
|
|
PROGRAM{
|
2019-10-04 16:12:48 +02:00
|
|
|
DECLPROC collect_garbage
|
|
|
|
DECLPROC store_db
|
2019-10-03 21:54:25 +02:00
|
|
|
DECLPROC recv_internal
|
|
|
|
DECLPROC recv_external
|
|
|
|
85143 DECLMETHOD seqno
|
2019-10-04 16:12:48 +02:00
|
|
|
collect_garbage PROC:<{
|
|
|
|
-1 PUSHINT
|
|
|
|
UNTIL:<{
|
|
|
|
OVER
|
|
|
|
8 PUSHPOW2
|
|
|
|
DICTUGETNEXT
|
|
|
|
NULLSWAPIFNOT
|
|
|
|
NULLSWAPIFNOT
|
2019-10-03 21:54:25 +02:00
|
|
|
DUP
|
2019-10-04 16:12:48 +02:00
|
|
|
IF:<{
|
|
|
|
s0 s2 XCHG
|
|
|
|
32 LDU
|
|
|
|
DROP
|
|
|
|
NOW
|
|
|
|
LEQ
|
|
|
|
IF:<{
|
2019-10-04 18:00:14 +02:00
|
|
|
8 PUSHPOW2
|
|
|
|
s1 s3 s3 PUXC2
|
|
|
|
DICTUDEL
|
|
|
|
DROP
|
|
|
|
}>ELSE<{
|
|
|
|
s0 s2 XCHG
|
2019-10-04 16:12:48 +02:00
|
|
|
}>
|
|
|
|
}>ELSE<{
|
2019-10-04 18:00:14 +02:00
|
|
|
2SWAP
|
|
|
|
DROP
|
2019-10-04 16:12:48 +02:00
|
|
|
}>
|
|
|
|
SWAP
|
|
|
|
NOT
|
2019-10-04 18:00:14 +02:00
|
|
|
s1 s2 XCHG
|
2019-10-03 21:54:25 +02:00
|
|
|
}>
|
2019-10-04 16:12:48 +02:00
|
|
|
DROP
|
|
|
|
}>
|
|
|
|
store_db PROC:<{
|
2019-10-03 21:54:25 +02:00
|
|
|
NEWC
|
2019-10-04 16:12:48 +02:00
|
|
|
s1 s3 XCHG
|
2019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