#NO_APP
	.text
	.even
	.globl	_myTextFit
_myTextFit:
	lea sp@(-24),sp
	moveml #0x3f3e,sp@-
	movel a1,a5
	movel a0,d5
	movel a2,a4
	movel a6,d6
	movew d0,d4
	movew d2,sp@(50)
	movel a1@(52),a0
	clrl d2
	tstw d0
	jeq L2
	cmpw a0@(20),d3
	jcs L2
	moveq #1,d7
	clrw a2@(4)
	movew a0@(26),d3
	negw d3
	movew d3,a2@(6)
	clrw a2@(8)
	movew a0@(20),d0
	subw a0@(26),d0
	subqw #1,d0
	movew d0,a2@(10)
	clrw a2@
	movew a0@(20),a2@(2)
	tstl a3
	jeq L3
	cmpw a3@(6),d3
	jlt L5
	cmpw a3@(10),d0
	jgt L5
	movew a2@(2),d0
	cmpw a3@(2),d0
	jls L3
	.even
L5:
	clrw d7
L3:
	tstw d7
	jeq L2
	subqw #1,d4
	cmpw #-1,d4
	jeq L2
	movew d1,a0
	movel a0,sp@(46)
	movel d6,a6
	lea sp@(52),a2
	clrl d6
	clrl d7
L17:
	movel a5,a1
	movel d5,a0
	moveq #1,d0
#APP
	jsr a6@(-0x2b2:W)
#NO_APP
	addl sp@(46),d5
	movew a4@,d0
	movew d0,a1
	addw sp@(52),a1
	movew d0,d1
	addw sp@(56),d1
	addw sp@(60),d0
	movew a4@(4),d3
	cmpw d3,d1
	jge L10
	movew d1,d3
L10:
	movew a4@(8),d1
	cmpw d1,d0
	jle L11
	movew d0,d1
L11:
	movew d1,a0
	subw d3,a0
	addql #1,a0
	movew sp@(50),d6
	cmpl a0,d6
	jlt L2
	tstl a3
	jeq L13
	cmpw a3@(4),d3
	jlt L2
	cmpw a3@(8),d1
	jgt L2
	movew a3@,d7
	movew a1,a0
	cmpl d7,a0
	jgt L2
L13:
	movew a1,a4@
	movew d3,a4@(4)
	movew d1,a4@(8)
	addql #1,d2
	dbra d4,L17
	.even
L2:
	tstl d2
	jne L18
	clrw a4@
	clrw a4@(2)
	clrw a4@(4)
	clrw a4@(6)
	clrw a4@(8)
	clrw a4@(10)
L18:
	movel d2,d0
	moveml sp@+,#0x7cfc
	lea sp@(24),sp
	rts
