1
0
mirror of https://github.com/danog/toncontest.git synced 2024-12-02 09:27:47 +01:00
toncontest/wallet-code.fif
2019-10-05 17:53:22 +02:00

220 lines
3.2 KiB
Plaintext

"Asm.fif" include
// automatically generated from `/home/daniil/repos/contest/lib/crypto/smartcont/stdlib.fc` `wallet/wallet-code.fc`
PROGRAM{
DECLPROC ~collect_garbage
DECLPROC store_db
DECLPROC recv_internal
DECLPROC recv_external
85143 DECLMETHOD seqno
~collect_garbage PROC:<{
-1 PUSHINT
UNTIL:<{
OVER
8 PUSHPOW2
DICTUGETNEXT
NULLSWAPIFNOT
NULLSWAPIFNOT
DUP
IF:<{
s0 s2 XCHG
SKIPDICT
32 PLDU
NOW
LEQ
IF:<{
8 PUSHPOW2
s1 s3 s3 PUXC2
DICTUDEL
DROP
}>ELSE<{
s0 s2 XCHG
}>
}>ELSE<{
2SWAP
DROP
}>
SWAP
NOT
s1 s2 XCHG
}>
DROP
}>
store_db PROC:<{
NEWC
s1 s3 XCHG
32 STU
STDICT
STDICT
ENDC
c4 POP
}>
recv_internal PROC:<{
DROP
}>
recv_external PROC:<{
1 LDU
SWAP
32 THROWIFNOT
DUP
1 PLDU
33 THROWIFNOT
LDDICT
DUP
32 LDU
32 LDU
s2 PUSH
NOW
LEQ
34 THROWIF
s0 s3 XCHG
HASHSU
c4 PUSH
CTOS
32 LDU
4 LDU
LDDICT
LDDICT
ENDS
NEWDICT
s4 s6 PUSH2
EQUAL
IF:<{
s0 s4 XCHG
INC
}>ELSE<{
s5 s1 PUSH2
8 PUSHPOW2
DICTUGET
NULLSWAPIFNOT
35 THROWIFNOT
LDREF
NIP
ENDS
s0 s4 XCHG
}>
ACCEPT
s0 s8 XCHG
-1 PUSHINT
UNTIL:<{
s10 PUSH
4 PUSHINT
DICTUGETNEXT
NULLSWAPIFNOT
NULLSWAPIFNOT
DUP
IF:<{
s1 s5 PUSH2
4 PUSHINT
DICTUGET
NULLSWAPIFNOT
36 THROWIFNOT
LDREF
SWAP
CTOS
256 PLDU
s0 s4 XCHG
LDREF
DROP
DUP
CTOS
DUP
ENDS
s0 s2 XCHG
ENDS
s10 s(-1) s4 PUXC2
CHKSIGNU
37 THROWIFNOT
s1 s2 XCHG
4 PUSHINT
s3 s8 s8 PUXC2
DICTUSETREF
}>ELSE<{
s1 s7 s7 XCHG3
DROP
}>
s0 s6 XCHG
NOT
}>
DROP
s9 POP
s0 s8 XCHG
8 LDU
LDREF
ENDS
0 PUSHINT
-1 PUSHINT
UNTIL:<{
s6 PUSH
4 PUSHINT
DICTUGETNEXT
NULLSWAPIFNOT
NULLSWAPIFNOT
s2 POP
OVER
IF:<{
s0 s2 XCHG
INC
s0 s6 PUSH2
GEQ
IF:<{
NIP
s2 s3 PUSH2
SENDRAWMSG
8 PUSHPOW2
s8 s12 s12 PUXC2
DICTUDEL
DROP
0 PUSHINT
}>ELSE<{
s12 s12 XCHG2
}>
}>ELSE<{
s0 s12 s12 XCHG3
}>
NOT
s12 s12 s0 XCHG3
}>
DROP
s4 PUSH
LESS
IF:<{
NEWC
s1 s5 XCHG
STDICT
s1 s7 XCHG
32 STU
s1 s5 XCHG
32 STU
s1 s5 XCHG
8 STU
STREF
ENDC
s0 s1 s5 XCHG3
8 PUSHPOW2
DICTUSETREF
}>ELSE<{
s2 s9 XCHG
s3 s7 XCHG
s2 s6 XCHG
6 BLKDROP
}>
~collect_garbage CALLDICT
s0 s2 XCHG
INC
NEWC
32 STU
4 STU
s1 s2 XCHG
STDICT
STDICT
ENDC
c4 POP
}>
seqno PROC:<{
c4 PUSH
CTOS
32 PLDU
}>
}END>c
2 boc+>B "RS" B>file