
	NAME	MEDIAN
	ENTRY	MEDIAN
	EXT	SELECT
C	SET	          0
M	SET	          0
F	SET	          0
R	SET	          0
MEDIAN
	ENTR	D,2,9
	STMT	D,12289
	MOV	L,10(IX)
	MOV	H,11(IX)
	MOV	E,12(IX)
	MOV	D,13(IX)
	DSUB	D,0
	INX	H
	MOV	-3(IX),H
	MOV	-4(IX),L
	STMT	D,12290
	MOV	L,-4(IX)
	MOV	H,-3(IX)
	LXI	D,1
	LESS	D,0
	JNC	L255
	STMT	D,12291
	MOV	2(IX),A
	JMP	L268
L255
	STMT	D,12292
	STMT	D,12293
	MOV	L,-4(IX)
	MOV	H,-3(IX)
	LXI	D,1
	DSB1	D,0
	JNZ	L272
	STMT	D,12294
	MOV	L,12(IX)
	MOV	H,13(IX)
	DADD	C
	DADD	C
	XCHG
	MOV	H,15(IX)
	MOV	L,14(IX)
	DSUB
	LXI	B,4
	DADD	B
	LXI	D,-4
	DADD
	INX	H
	XCHG
	DADD	S
	SPHL
	XCHG
	LXI	B,4
	LDIR
	LXI	H,3
	DADD	S
	XCHG
	MOV	H,9(IX)
	MOV	L,8(IX)
	XCHG
	LXI	B,4
	LDDR
	POP	H
	POP	H
	JMP	L291
L272
	STMT	D,12295
	STMT	D,12296
	MOV	L,-4(IX)
	MOV	H,-3(IX)
	RRCR	L
	STMT	M,12296
	JNC	L295
	STMT	D,12297
	STMT	D,12298
	MOV	L,-4(IX)
	MOV	H,-3(IX)
	INX	H
	LXI	D,2
	DIVD	D,0
	MOV	-1(IX),H
	MOV	-2(IX),L
	STMT	D,12299
	MOV	H,15(IX)
	MOV	L,14(IX)
	PUSH	H
	MOV	L,12(IX)
	MOV	H,13(IX)
	PUSH	H
	MOV	L,10(IX)
	MOV	H,11(IX)
	PUSH	H
	MOV	L,-2(IX)
	MOV	H,-1(IX)
	PUSH	H
	CALL	SELECT
	STMT	M,12299
	JRNC	L320
	INR	A
L320
	MOV	L,A
	XRA	A
	MOV	H,A
	MOV	2(IX),L
	STMT	D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