IconBar::init:
		pushi	$258		; 600, setOpenRect
		push0
		self	$4
		bnot
		pushi	$255		; 597, advanceCurIcon
		push0
		self	$4
		bnot
		ret

IconBar::setOpenRect:
		link	$4
		pToa	openRect
		bnt	code_015c
		pushi	$95		; 149, dispose
		push0
		send	$4
		bnot
code_015c:	ldi	$0
		sat	temp[$2]
		ldi	$0
		sat	temp[$3]
		ldi	$0
		sat	temp[$0]
code_0168:	lst	temp[$0]
		pushi	$5a		; 90, 'Z', size
		push0
		self	$4
		bnot
		lt?
		bnt	code_01d2
		pushi	$4b		; 75, 'K', at
		push1
		lst	temp[$0]
		self	$6
		bnot
		sat	temp[$1]
		pushi	$89		; 137, top
		push0
		send	$4
		bnot
		push
		pushi	$8a		; 138, bottom
		push0
		lat	temp[$1]
		send	$4
		bnot
		eq?
		bnt	code_019a
		pushi	$1be		; 446, setSize
		push0
		lat	temp[$1]
		send	$4
		bnot
code_019a:	pushi	$88		; 136, right
		push0
		lat	temp[$1]
		send	$4
		bnot
		push
		lat	temp[$3]
		gt?
		bnt	code_01b4
		pushi	$88		; 136, right
		push0
		lat	temp[$1]
		send	$4
		bnot
		sat	temp[$3]
code_01b4:	pushi	$8a		; 138, bottom
		push0
		lat	temp[$1]
		send	$4
		bnot
		push
		lat	temp[$2]
		gt?
		bnt	code_01ce
		pushi	$8a		; 138, bottom
		push0
		lat	temp[$1]
		send	$4
		bnot
		sat	temp[$2]
code_01ce:	+at	temp[$0]
		jmp	code_0168

code_01d2:	pushi	$b5		; 181, set
		pushi	$4		; scaleX
		pTos	y
		pTos	x
		lst	temp[$2]
		lst	temp[$3]
		pushi	$8d		; 141, new
		push0
		class	Rect
		send	$4
		bnot
		aTop	openRect
		send	$c
		bnot
		ret

IconBar::shouldOpen:
		pushi	$254		; 596, keepUp
		push0
		self	$4
		bnot
		bt	code_0202
		pToa	openRect
		not
		bt	code_0202
		pTos	state
		ldi	$1
		and
code_0202:	bnt	code_0209
		ldi	$0
		ret

		jmp	code_0215

code_0209:	pushi	$a3		; 163, contains
		push1
		lsp	param[$1]
		pToa	openRect
		send	$6
		bnot
		ret

code_0215:	ret

IconBar::shouldClose:
		pushi	$254		; 596, keepUp
		push0
		self	$4
		bnot
		bt	code_0222
		pToa	openRect
		not
code_0222:	bnt	code_0229
		ldi	$0
		ret

		jmp	code_023d

code_0229:	pTos	state
		ldi	$1
		and
		bnt	code_023c
		pushi	$a3		; 163, contains
		push1
		lsp	param[$1]
		pToa	openRect
		send	$6
		bnot
		not
code_023c:	ret

code_023d:	ret

IconBar::open:
		link	$3
		pushi	$258		; 600, setOpenRect
		push0
		self	$4
		bnot
		pToa	priority
		not
		bt	code_0251
		pTos	priority
		ldi	$ff		; 255, asInteger
		eq?
code_0251:	bnt	code_025e
		push0
		callk	kernel_44, $0
		bnot
		push
		ldi	$1
		add
		aTop	priority
code_025e:	pushi	$9d		; 157, eachElementDo
		push1
		pushi	$1be		; 446, setSize
		self	$6
		bnot
		pushi	$7		; priority
		push1
		pushi	$1f4		; 500, setView
		pushi	$94		; 148, init
		pushi	$4		; scaleX
		pTos	x
		pTos	y
		pushi	$27f		; 639, rename
		pushi	$1df		; 479, validKey
		pushi	$1b8		; 440, addCast
		push1
		pushSelf
		pToa	plane
		send	$18
		bnot
		pTos	state
		ldi	$1
		or
		aTop	state
		pushi	$9d		; 157, eachElementDo
		push2
		pushi	$94		; 148, init
		pushSelf
		self	$8
		bnot
		pToa	curIcon
		not
		bnt	code_02a6
		pushi	$255		; 597, advanceCurIcon
		push0
		self	$4
		bnot
code_02a6:	pushi	$57		; 87, 'W', draw
		push0
		self	$4
		bnot
		ret

IconBar::close:
		pushi	$254		; 596, keepUp
		push0
		self	$4
		bnot
		not
		bnt	code_02dd
		pushi	$9d		; 157, eachElementDo
		push2
		pushi	$1ca		; 458, select
		push0
		self	$8
		bnot
		pushi	$1ba		; 442, erase
		push0
		self	$4
		bnot
		pTos	state
		ldi	$fe		; 254, strIndex
		and
		aTop	state
		pushi	$95		; 149, dispose
		push0
		pToa	plane
		send	$4
		bnot
		ldi	$0
		aTop	plane
code_02dd:	ret

IconBar::keepUp:
		lap	param[$0]
		not
		bnt	code_02eb
		pTos	state
		ldi	$4		; scaleX
		and
		ret

		jmp	code_0315

code_02eb:	lap	param[$1]
		bnt	code_030d
		pTos	state
		ldi	$4		; scaleX
		or
		aTop	state
		pTos	state
		ldi	$1
		and
		not
		bnt	code_0305
		pushi	$248		; 584, open
		push0
		self	$4
		bnot
code_0305:	pTos	state
		ldi	$4		; scaleX
		and
		ret

		jmp	code_0315

code_030d:	pTos	state
		ldi	$fb		; 251, subStr
		and
		aTop	state
		ret

code_0315:	ret

IconBar::handleEvent:
		link	$1
		pushi	$b9		; 185, localize
		push1
		pTos	plane
		lap	param[$1]
		send	$6
		bnot
		pushi	$1bf		; 447, isHidden
		push0
		self	$4
		bnot
		bt	code_0334
		pushi	$50		; 80, 'P', claimed
		push0
		lap	param[$1]
		send	$4
		bnot
code_0334:	bnt	code_033b
		ldi	$0
		jmp	code_04cd

code_033b:	pushi	$256		; 598, shouldOpen
		push1
		lsp	param[$1]
		self	$6
		bnot
		bnt	code_035c
		pushi	$50		; 80, 'P', claimed
		push1
		push1
		lap	param[$1]
		send	$6
		bnot
		pushi	$248		; 584, open
		push0
		self	$4
		bnot
		ldi	$1
		ret

		jmp	code_04cd

code_035c:	pushi	$257		; 599, shouldClose
		push1
		lsp	param[$1]
		self	$6
		bnot
		bnt	code_037d
		pushi	$50		; 80, 'P', claimed
		push1
		push1
		lap	param[$1]
		send	$6
		bnot
		pushi	$253		; 595, close
		push0
		self	$4
		bnot
		ldi	$1
		ret

		jmp	code_04cd

code_037d:	pTos	state
		ldi	$1
		and
		bnt	code_03bc
		pushi	$c8		; 200, handleEvent
		push1
		lsp	param[$1]
		super	Dialog, $6
		bnot
		sat	temp[$0]
		bnt	code_03bc
		push
		ldi	$ff		; 255, asInteger
		ne?
		bnt	code_03bc
		pushi	$29		; 41, ')', state
		push0
		lat	temp[$0]
		send	$4
		bnot
		push
		ldi	$2
		and
		bnt	code_03bc
		pushi	$50		; 80, 'P', claimed
		push1
		push1
		lap	param[$1]
		send	$6
		bnot
		pushi	$253		; 595, close
		push0
		self	$4
		bnot
		ldi	$1
		ret

		jmp	code_04cd

code_03bc:	pushi	$50		; 80, 'P', claimed
		push0
		lap	param[$1]
		send	$4
		bnot
		bt	code_03e2
		pTos	state
		ldi	$1
		and
		bnt	code_03f3
		pushi	$254		; 596, keepUp
		push0
		self	$4
		bnot
		not
		bnt	code_03f3
		pushi	$a3		; 163, contains
		push1
		lsp	param[$1]
		pToa	openRect
		send	$6
		bnot
code_03e2:	bnt	code_03f3
		pushi	$50		; 80, 'P', claimed
		push1
		push1
		lap	param[$1]
		send	$6
		bnot
		ldi	$1
		ret

		jmp	code_04cd

code_03f3:	pushi	$2b		; 43, '+', type
		push0
		lap	param[$1]
		send	$4
		bnot
		push
		ldi	$1
		eq?
		bnt	code_043d
		pToa	curIcon
		bnt	code_043d
		pushi	$259		; 601, isCursor
		push0
		send	$4
		bnot
		bnt	code_043d
		pushi	$48		; 72, 'H', modifiers
		push0
		lap	param[$1]
		send	$4
		bnot
		push
		ldi	$4		; scaleX
		and
		bt	code_0428
		pushi	$48		; 72, 'H', modifiers
		push0
		lap	param[$1]
		send	$4
		bnot
		push
		ldi	$3		; z
		and
code_0428:	bnt	code_043d
		pushi	$50		; 80, 'P', claimed
		push1
		push1
		lap	param[$1]
		send	$6
		bnot
		pushi	$255		; 597, advanceCurIcon
		push0
		self	$4
		bnot
		jmp	code_04cd

code_043d:	pushi	$2b		; 43, '+', type
		push0
		lap	param[$1]
		send	$4
		bnot
		push
		ldi	$1
		eq?
		bnt	code_04cd
		pushi	$48		; 72, 'H', modifiers
		push0
		lap	param[$1]
		send	$4
		bnot
		not
		bnt	code_04cd
		pToa	curIcon
		bnt	code_04cd
		lag	global[$b]
		bnt	code_04cd
		pushi	$e		; 14, view
		push0
		pToa	curIcon
		send	$4
		bnot
		push
		ldi	$ff		; 255, asInteger
		eq?
		bt	code_047c
		pToa	curIcon
		bnt	code_04cd
		pushi	$259		; 601, isCursor
		push0
		send	$4
		bnot
code_047c:	bnt	code_04cd
		pushi	$ba		; 186, globalize
		push0
		lap	param[$1]
		send	$4
		bnot
		pushi	$a3		; 163, contains
		push1
		lsp	param[$1]
		pToa	plane
		send	$6
		bnot
		bnt	code_04ab
		pushi	$25a		; 602, pFallThru
		push0
		pToa	curIcon
		send	$4
		bnot
		not
		bnt	code_04ab
		pushi	$50		; 80, 'P', claimed
		push1
		push1
		lap	param[$1]
		send	$6
		bnot
		jmp	code_04cd

code_04ab:	pushi	$2b		; 43, '+', type
		push1
		pushi	$2b		; 43, '+', type
		push0
		pToa	curIcon
		send	$4
		bnot
		push
		pushi	$31		; 49, '1', message
		push1
		pushi	$25b		; 603, verb
		push0
		pToa	curIcon
		send	$4
		bnot
		push
		pushi	$50		; 80, 'P', claimed
		push1
		push0
		lap	param[$1]
		send	$12
		bnot
code_04cd:	pushi	$ba		; 186, globalize
		push0
		lap	param[$1]
		send	$4
		bnot
		pushi	$50		; 80, 'P', claimed
		push0
		lap	param[$1]
		send	$4
		bnot
		ret

IconBar::enable:
		pushi	$1b4		; 436, enable
		push2
		push1
		pTos	state
		ldi	$1
		and
		not
		push
		lap	param[$1]
		send	$8
		bnot
		ret

IconBar::disable:
		pushi	$1b4		; 436, enable
		push2
		push0
		pTos	state
		ldi	$1
		and
		not
		push
		lap	param[$1]
		send	$8
		bnot
		ret

IconBar::advanceCurIcon:
		link	$3
		pTos	state
		ldi	$8		; fixPriority
		and
		bnt	code_050d
		ret

code_050d:	pToa	curIcon
		not
		bnt	code_0518
		ldi	$ff		; 255, asInteger
		sat	temp[$1]
		jmp	code_0523

code_0518:	pushi	$ae		; 174, indexOf
		push1
		pTos	curIcon
		self	$6
		bnot
		sat	temp[$1]
code_0523:	lat	temp[$1]
		sat	temp[$2]
code_0527:	+at	temp[$1]
		push
		pushi	$5a		; 90, 'Z', size
		push0
		self	$4
		bnot
		ge?
		bnt	code_0537
		ldi	$0
		sat	temp[$1]
code_0537:	lst	temp[$2]
		lat	temp[$1]
		eq?
		bnt	code_0540
		jmp	code_056b

code_0540:	pushi	$4b		; 75, 'K', at
		push1
		lst	temp[$1]
		self	$6
		bnot
		sat	temp[$0]
		bnt	code_0527
		pushi	$29		; 41, ')', state
		push0
		send	$4
		bnot
		push
		ldi	$1
		and
		bnt	code_0527
		pushi	$29		; 41, ')', state
		push0
		lat	temp[$0]
		send	$4
		bnot
		push
		ldi	$200		; 512, bottomValue
		and
		bnt	code_0527
		jmp	code_056b

		jmp	code_0527

code_056b:	pTos	curIcon
		lat	temp[$0]
		ne?
		bnt	code_0589
		lst	temp[$0]
		pToa	inventoryIcon
		ne?
		bnt	code_057d
		ldi	$0
		sag	global[$44]
code_057d:	lat	temp[$0]
		aTop	curIcon
		pushi	$45		; 69, 'E', doit
		push0
		pToa	curIcon
		send	$4
		bnot
code_0589:	ret

IconBar::hide:
		pToa	plane
		bnt	code_0594
		pushi	$69		; 105, 'i', hide
		push0
		send	$4
		bnot
code_0594:	ret

IconBar::show:
		pToa	plane
		bnt	code_059f
		pushi	$75		; 117, 'u', show
		push0
		send	$4
		bnot
code_059f:	ret

IconButton::isCursor:
		lag	global[$b]
		bnt	code_05c7
		pTos	cursorView
		pushi	$e		; 14, view
		push0
		send	$4
		bnot
		eq?
		bnt	code_05c7
		pTos	cursorLoop
		pushi	$f		; 15, loop
		push0
		lag	global[$b]
		send	$4
		bnot
		eq?
		bnt	code_05c7
		pTos	cursorCel
		pushi	$10		; 16, cel
		push0
		lag	global[$b]
		send	$4
		bnot
		eq?
code_05c7:	ret

IconButton::setSize:
		pushi	$db		; 219, moveTo
		push2
		pTos	x
		pTos	y
		self	$8
		bnot
		pushi	$1be		; 446, setSize
		push0
		&rest	$1
		super	Button, $4
		bnot
		ret

IconButton::doit:
		ret

IconButton::choose:
		link	$2
		pTos	btnType
		ldi	$1
		eq?
		bnt	code_05f2
		pTos	state
		ldi	$4		; scaleX
		xor
		aTop	state
		jmp	code_0662

code_05f2:	pTos	btnType
		ldi	$0
		eq?
		bnt	code_05fc
		jmp	code_0662

code_05fc:	pTos	btnType
		ldi	$2
		eq?
		bnt	code_0662
		pTos	state
		ldi	$4		; scaleX
		or
		aTop	state
		pToa	buttonSet
		bnt	code_0662
		ldi	$0
		sat	temp[$0]
code_0614:	lst	temp[$0]
		pushi	$5a		; 90, 'Z', size
		push0
		pToa	buttonSet
		send	$4
		bnot
		lt?
		bnt	code_0662
		pushi	$4b		; 75, 'K', at
		push1
		lst	temp[$0]
		pToa	buttonSet
		send	$6
		bnot
		sat	temp[$1]
		push
		selfID
		ne?
		bnt	code_065e
		pushi	$1cc		; 460, checkState
		push1
		pushi	$4		; scaleX
		lat	temp[$1]
		send	$6
		bnot
		bnt	code_065e
		pushi	$29		; 41, ')', state
		push1
		pushi	$29		; 41, ')', state
		push0
		lat	temp[$1]
		send	$4
		bnot
		push
		ldi	$fb		; 251, subStr
		and
		push
		lat	temp[$1]
		send	$6
		bnot
		pushi	$57		; 87, 'W', draw
		push0
		lat	temp[$1]
		send	$4
		bnot
		jmp	code_0662

code_065e:	+at	temp[$0]
		jmp	code_0614

code_0662:	pushi	$1ca		; 458, select
		push2
		push0
		push1
		self	$8
		bnot
		ret

