SortedList::add:
		link	$3
		pToa	elements
		not
		bnt	code_0043
		push1
		push0
		callk	kernel_90, $2
		bnot
		aTop	elements
code_0043:	ldi	$0
		sat	temp[$1]
code_0047:	lst	temp[$1]
		lap	param[$0]
		lt?
		bnt	code_0088
		pushi	$a7		; 167, isDuplicate
		push1
		lat	temp[$1]
		lspi	param[$1]
		self	$6
		bnot
		not
		bnt	code_0084
		pushi	$342		; 834, findSlot
		push1
		lat	temp[$1]
		lspi	param[$1]
		self	$6
		bnot
		sat	temp[$0]
		bnt	code_0079
		pushi	$ad		; 173, addBefore
		push2
		push
		lat	temp[$1]
		lspi	param[$1]
		self	$8
		bnot
		jmp	code_0084

code_0079:	pushi	$ab		; 171, addToEnd
		push1
		lat	temp[$1]
		lspi	param[$1]
		self	$6
		bnot
code_0084:	+at	temp[$1]
		jmp	code_0047

code_0088:	selfID
		ret

SortedList::findSlot:
		link	$6
		ldi	$0
		sat	temp[$2]
		pToa	pSortSelector
		sat	temp[$3]
		not
		bnt	code_009a
		ldi	$0
		ret

code_009a:	pToa	elements
		bnt	code_0114
		pToa	size
		sat	temp[$5]
		ldi	$0
		sat	temp[$4]
code_00a7:	lst	temp[$4]
		lat	temp[$5]
		lt?
		bnt	code_0114
		pushi	$3		; z
		pushi	$11		; 17, bitmap
		pTos	elements
		lst	temp[$4]
		callk	kernel_90, $6
		bnot
		sat	temp[$0]
		pushi	$99		; 153, respondsTo
		push1
		lst	temp[$3]
		send	$6
		bnot
		not
		bnt	code_00cc
		ldi	$0
		jmp	code_0110

code_00cc:	pTos	pSortDirection
		ldi	$1
		eq?
		bnt	code_00ef
		lst	temp[$3]
		push0
		lat	temp[$0]
		send	$4
		bnot
		push
		lst	temp[$3]
		push0
		lap	param[$1]
		send	$4
		bnot
		ge?
		bnt	code_00ef
		lat	temp[$0]
		sat	temp[$2]
		jmp	code_0114

		jmp	code_0110

code_00ef:	pTos	pSortDirection
		ldi	$ff		; 255, asInteger
		eq?
		bnt	code_0110
		lst	temp[$3]
		push0
		lat	temp[$0]
		send	$4
		bnot
		push
		lst	temp[$3]
		push0
		lap	param[$1]
		send	$4
		bnot
		le?
		bnt	code_0110
		lat	temp[$0]
		sat	temp[$2]
		jmp	code_0114

code_0110:	+at	temp[$4]
		jmp	code_00a7

code_0114:	lat	temp[$2]
		ret

