  cnop 0,4
FontExtent:
   suba.l #12,sp
   movem.l  d2-d7/a2-a6,-(sp)
   move.l   a0,a4
   move.l   a1,a6
   move.w   #-32767,d5
   move.w   #32767,(54,sp)
   clr.w d7
   clr.w d4
   move.b   (33,a0),(47,sp)
   clr.l d0
   move.b   (47,sp),d0
   move.b   (32,a0),(48,sp)
   clr.l d1
   move.b   (48,sp),d1
   sub.l d1,d0
   bmi   .L16
   move.l   (48,a0),d6
   lea   (0).w,a3
   move.l   (40,a0),(50,sp)
   move.l   (44,a0),a5
   move.b   (23,a0),(49,sp)
   clr.l d3
   clr.l d2
   clr.l d1

.L14:
   sub.l a2,a2
   tst.l d6
   beq   .L5
   move.l   d6,a0
   move.w   (a0,a3.l*2),a2
.L5:
   move.w   (54,sp),d0
   cmp.w a2,d0
   ble   .L6
   move.w   a2,(54,sp)
.L6:
   move.l   (50,sp),a0
   clr.l d0
   move.w   (2,a0,a3.l*4),d0
   move.l   d0,a1
   lea   (a1,a2.w),a0
   move.w   d5,a1
   cmp.l a0,a1
   ble   .L7
   move.l   a1,a0
.L7:
   move.w   a0,d5
   tst.l a5
   beq   .L8
   move.w   (a5,a3.l*2),d0
.L17:
   add.w a2,d0
   move.b   (49,sp),d3
   btst  #2,d3
   beq   .L10
   cmp.w d7,d0
   bge   .L4
   move.w   d0,d7

.L4:
   addq.w   #1,d4
   move.w   d4,a3
   move.b   (47,sp),d1
   move.b   (48,sp),d2
   move.l   d1,d0
   sub.l d2,d0
   cmp.l a3,d0
   bge   .L14
   bra   .L16

.L10:
   cmp.w d7,d0
   ble   .L4
   move.w   d0,d7
   bra   .L4

.L8:
   move.w   (24,a4),d0
   bra   .L17

.L16:
   move.w   d7,(a6)
   move.w   (20,a4),(2,a6)
   move.w   (54,sp),(4,a6)
   subq.w   #1,d5
   move.w   d5,(8,a6)
   move.w   (26,a4),d0
   neg.w d0
   move.w   d0,(6,a6)
   move.w   (20,a4),d0
   sub.w (26,a4),d0
   subq.w   #1,d0
   move.w   d0,(10,a6)
   movem.l  (sp)+,d2-d7/a2-a6
   adda.l #12,sp
   rts
