         Edinburgh IMP77 Compiler - Version 8.4
    1 %realslong
				.section	".text"
		.Ltext0:
				.section	.rodata.cst8,"aM",@progbits,8
				.align 8
		.LC8:
				.long	1072693248
				.long	0
				.align 8
		.LC9:
				.long	0
				.long	0
				.section	".text"
				.align 4
				.proc	07
		ARCSIN.6098:
		.LFB187:
    2
    3 %begin
		.LVL57:
				save	%sp, -4096, %sp
		.LVL58:
				add	%sp, -1840, %sp
				ldx	[%g7+40], %g1
				stx	%g1, [%fp+2039]
				mov	0, %g1
				add	%fp, 2047, %g1
				stx	%g1, [%fp+2031]
    4     %integer a line, b line, c line, d line,
				mov	%i1, %o1
				call	_imp_initialise, 0
				 mov	%i0, %o0
		.LVL59:
    5              e line, f line, g prime line,
    6              h line
    7     %real %array spectral line(1:8)
    8     %integer current surfaces
    9     %real %array test case(1:4, 1:4)
   10     %integer curvature radius, index of refraction, dispersion,
   11         edge thickness
   12
   13     %real clear aperture, aberr lspher, aberr osc, aberr lchrom,
   14          max lspher, max osc, max lchrom, radius of curvature,
   15          object distance, ray height, axis slope angle,
   16          from index, to index
   17     %integer number of iterations, iteration
   18     %integer paraxial, marginal ray, paraxial ray
   19     %integer od field, sa field
   20     %real %array od sa(1:2, 1:2)
   21     %real od cline, od fline
   22     %real %fn cot(%real x)
   23         %result = 1.0 / (sin(x) / cos(x))
				ldd	[%fp+695], %f8
				ldd	[%fp+703], %f12
				fdivd	%f8, %f12, %f8
				sethi	%hi(.LC11), %g1
				ldd	[%g1+%lo(.LC11)], %f12
				fdivd	%f12, %f8, %f8
		.LBE146:
		.LBE145:
   24     %end {cot}
   25     %real %fn arc sin(%real x)
		.LVL0:
				save	%sp, -192, %sp
				std	%f0, [%fp+2175]
		.LBB102:
		.LBB103:
				fmuld	%f0, %f0, %f8
		.LBE103:
		.LBE102:
   26         %result = 2 * arc tan1(x / (1 + sqrt(1 - x^2)))
				sethi	%hi(.LC8), %g1
				ldd	[%g1+%lo(.LC8)], %f0
		.LVL1:
				fsubd	%f0, %f8, %f0
		.LVL2:
		.LBB104:
		.LBB105:
				fsqrtd	%f0, %f8
				std	%f8, [%fp+2039]
				sethi	%hi(.LC9), %g1
				ldd	[%g1+%lo(.LC9)], %f8
				fcmpd	%fcc0, %f0, %f8
				fbl,pn	%fcc0, .L3
				 nop
		.LVL3:
		.LBE105:
		.LBE104:
				sethi	%hi(.LC8), %g1
		.L4:
				ldd	[%g1+%lo(.LC8)], %f0
				ldd	[%fp+2039], %f8
				faddd	%f8, %f0, %f0
		.LBB107:
		.LBB108:
				ldd	[%fp+2175], %f8
		.LVL4:
				call	atan, 0
				 fdivd	%f8, %f0, %f0
		.LVL5:
		.LBE108:
		.LBE107:
				ba,pt	%xcc, .L4
				 sethi	%hi(.LC8), %g1
		.LFE187:
				.section	.rodata.str1.8,"aMS",@progbits,1
				.align 8
		.LC12:
				.asciz	"Illegal cycle I = 1, 1, CURRENTSURFACES"
				.section	".rodata"
		.LC0:
				.byte	19
				.asciz	"test-new/fbench.imp"
				.skip	235
				.section	.rodata.cst8
				.align 8
		.LC10:
				.long	0
				.long	0
				.align 8
		.LC11:
				.long	1072693248
				.long	0
				.align 8
		.LC13:
				.long	1071644672
				.long	0
				.section	".text"
				.align 4
				.proc	020
		TRACELINE.6127:
		.LFB190:
   27     %end {arc sin}
				return	%i7+8
				 faddd	%f0, %f0, %f0
		.LVL6:
		.L3:
		.LBB109:
		.LBB106:
				call	sqrt, 0
				 nop
		.LVL7:
		.LBE106:
		.LBE109:
   28     %routine out big real(%integer channel, %real x)
   29         %real fraction
   30         fraction = x
   31     %end {out big real}
?CHANNEL unused
   32     %routine transit surface
   33         %real iang, rang, iang sin, rang sin,
   34               old axis slope angle, sagitta
   35         %if paraxial = paraxial ray %then %start
				lduw	[%i5+276], %g2
				lduw	[%i5+272], %g1
				cmp	%g2, %g1
				be,pn	%icc, .L27
				 sethi	%hi(.LC10), %g1
		.L13:
   36             %if radius of curvature # 0 %then %start
				ldd	[%fp+727], %f8
				ldd	[%g1+%lo(.LC10)], %f10
				fcmpd	%fcc2, %f8, %f10
				fbe,pn	%fcc2, .L14
				 ldd	[%g1+%lo(.LC10)], %f12
   37                 %if object distance = 0 %then %start
				ldd	[%i5+224], %f10
				fcmpd	%fcc3, %f10, %f12
				fbne,a,pt %fcc3, .L15
				 ldd	[%i5+216], %f16
   38                     axis slope angle = 0
   39                     iang sin = ray height / radius of curvature
				ldd	[%i5+208], %f12
				fdivd	%f12, %f8, %f12
		.LVL23:
   40                 %finish %else                                         %c
   41                     iang sin = ((object distance -                    %c
   42                         radius of curvature) / radius of curvature) * %c
   43                         axis slope angle
				ldd	[%fp+727], %f8
				fsubd	%f10, %f8, %f12
				fdivd	%f12, %f8, %f12
				fmuld	%f12, %f16, %f12
		.LVL26:
   44                 rang sin = (from index / to index) * iang sin
				ldd	[%i5+200], %f10
				ldd	[%i5+192], %f14
				fdivd	%f10, %f14, %f10
				fmuld	%f10, %f12, %f10
		.LVL24:
				ldd	[%i5+200], %f14
				ldd	[%i5+192], %f18
				fdivd	%f14, %f18, %f14
				fmuld	%f14, %f12, %f12
		.LVL27:
   45                 old axis slope angle = axis slope angle
   46                 axis slope angle = axis slope angle +                 %c
				ldd	[%g1+%lo(.LC10)], %f8
				faddd	%f12, %f8, %f8
				fsubd	%f8, %f10, %f8
		.LBE138:
		.LBE137:
		.LBE167:
				ba,pt	%xcc, .L16
				 std	%f8, [%i5+216]
		.LVL25:
		.L15:
		.LBB168:
		.LBB160:
		.LBB155:
				faddd	%f16, %f12, %f8
				fsubd	%f8, %f12, %f8
				std	%f8, [%i5+216]
   47                     iang sin - rang sin
   48                 %if object distance # 0 %then                         %c
   49                     ray height = object distance * old axis slope angle
				fmuld	%f10, %f16, %f10
		.LVL28:
				std	%f10, [%i5+208]
		.LVL29:
		.L16:
   50                 object distance = ray height / axis slope angle
				ldd	[%i5+208], %f10
				fdivd	%f10, %f8, %f8
		.LBE155:
		.LBE160:
		.LBE168:
				ba,pt	%xcc, .L22
				 std	%f8, [%i5+224]
		.L14:
		.LBB169:
		.LBB161:
		.LBB156:
   51             %else
   52                 object distance = object distance * (to index / from index)
				ldd	[%i5+192], %f12
				ldd	[%i5+200], %f8
				fdivd	%f12, %f8, %f14
				ldd	[%i5+224], %f10
				fmuld	%f10, %f14, %f10
				std	%f10, [%i5+224]
   53                 axis slope angle = axis slope angle * (from index / to index)
				fdivd	%f8, %f12, %f8
				ldd	[%i5+216], %f10
				fmuld	%f10, %f8, %f8
		.LBE156:
		.LBE161:
		.LBE169:
				ba,pt	%xcc, .L22
				 std	%f8, [%i5+216]
		.L19:
		.LVL30:
		.LBB170:
		.LBB162:
		.LBB157:
		.LBB139:
		.LBB140:
				call	sin, 0
				 ldd	[%i5+216], %f0
		.LVL31:
		.LBE140:
		.LBE139:
   54             %finish
   55         %else
   56             %if radius of curvature # 0 %then %start
				ldd	[%fp+727], %f10
				ldd	[%g1+%lo(.LC10)], %f8
				fcmpd	%fcc0, %f10, %f8
				fbe,pn	%fcc0, .L18
				 ldd	[%g1+%lo(.LC10)], %f12
   57                 %if object distance = 0 %then %start
				ldd	[%i5+224], %f8
				fcmpd	%fcc1, %f8, %f12
				fbne,pt	%fcc1, .L19
				 std	%f8, [%fp+719]
   58                     axis slope angle = 0
				ba,pt	%xcc, .L11
				 sethi	%hi(.LC10), %i0
		.LVL12:
		.L26:
		.LBB165:
				ldd	[%i0+%lo(.LC10)], %f8
				std	%f8, [%i5+216]
   59                     iang sin = ray height / radius of curvature
				ldd	[%i5+208], %f8
				fdivd	%f8, %f10, %f8
		.LVL48:
		.LBE158:
		.LBE163:
		.LBE170:
				ba,pt	%xcc, .L20
				 std	%f8, [%fp+719]
		.LVL49:
		.L18:
		.LBB171:
		.LBB164:
		.LBB159:
		.LBB149:
		.LBB150:
				call	sin, 0
				 ldd	[%i5+216], %f0
		.LVL50:
		.LBE150:
		.LBE149:
   60                 %finish %else %c
   61                     iang sin = ((object distance -                    %c
   62                         radius of curvature) / radius of curvature) * %c
   63                         sin(axis slope angle)
				ldd	[%fp+719], %f8
				ldd	[%fp+727], %f10
				fsubd	%f8, %f10, %f8
				fdivd	%f8, %f10, %f8
				fmuld	%f8, %f0, %f8
				std	%f8, [%fp+719]
		.LVL32:
		.L20:
   64                 iang = arc sin(iang sin)
				call	ARCSIN.6098, 0
				 ldd	[%fp+719], %f0
		.LVL33:
   65                 rang sin = (from index / to index) * iang sin
				ldd	[%i5+200], %f0
		.LVL34:
				ldd	[%i5+192], %f8
				fdivd	%f0, %f8, %f0
   66                 old axis slope angle = axis slope angle
   67                 axis slope angle = axis slope angle +                 %c
				ldd	[%i5+216], %f8
				faddd	%f0, %f8, %f8
				std	%f8, [%fp+727]
				ldd	[%fp+719], %f10
		.LVL35:
				call	ARCSIN.6098, 0
				 fmuld	%f0, %f10, %f0
		.LVL36:
				ldd	[%fp+727], %f8
				fsubd	%f8, %f0, %f10
				add	%fp, 735, %o2
				add	%fp, 743, %o1
				std	%f10, [%fp+719]
		.LVL37:
				call	sincos, 0
				 fmovd	%f10, %f0
		.LVL38:
				ldd	[%fp+735], %f12
				std	%f12, [%fp+703]
				ldd	[%fp+743], %f14
				std	%f14, [%fp+695]
				ldd	[%fp+719], %f10
				std	%f10, [%i5+216]
   68                     iang - arcsin(rang sin)
   69
   70 ! for some reason imp2021 likes this but not the original!:
   71 sagitta = 2 * radius of curvature * (sin((old axis slope angle + iang) / 2) ^ 2)
				ldd	[%i5+232], %f10
				std	%f10, [%fp+719]
		.LVL39:
		.LBB141:
		.LBB142:
				sethi	%hi(.LC13), %g1
				ldd	[%fp+727], %f8
				ldd	[%g1+%lo(.LC13)], %f16
		.LVL40:
				call	sin, 0
				 fmuld	%f8, %f16, %f0
		.LVL41:
				std	%f0, [%fp+711]
		.LVL42:
		.LBE142:
		.LBE141:
		.LBB143:
		.LBB144:
				call	sin, 0
				 ldd	[%fp+727], %f0
		.LVL43:
		.LBE144:
		.LBE143:
		.LBB145:
		.LBB146:
				faddd	%f10, %f10, %f0
		.LBB147:
		.LBB148:
				ldd	[%fp+711], %f10
				fmuld	%f10, %f10, %f10
		.LBE148:
		.LBE147:
				fmuld	%f0, %f10, %f0
		.LVL44:
   72
   73 !                sagitta = sin((old axis slope angle + iang) / 2)
   74 !                sagitta = 2 * radius of curvature * (sagitta ^ 2)
   75 !%comment                 sagitta = sin((old axis slope angle + iang) / 2)
   76 !%comment                 sagitta = 2 * radius of curvature * (sagitta ^ 2)
   77
   78
   79 object distance = ((radius of curvature *             %c
				ldd	[%fp+719], %f10
				fmuld	%f10, %f0, %f0
				fmuld	%f8, %f0, %f8
				faddd	%f8, %f0, %f8
				std	%f8, [%i5+224]
		.L17:
		.L21:
		.LVL45:
		.L22:
		.LBE157:
		.LBE162:
   80                     sin(old axis slope angle + iang)) *               %c
   81                     cot(axis slope angle)) + sagitta
   82             %else
   83                 rang = -arcsin((from index / to index) *              %c
				ldd	[%i5+200], %f8
				ldd	[%i5+192], %f10
				fdivd	%f8, %f10, %f8
				call	ARCSIN.6098, 0
				 fmuld	%f8, %f0, %f0
		.LVL51:
		.LBB151:
		.LBB152:
				call	cos, 0
				 std	%f0, [%fp+727]
		.LVL52:
				std	%f0, [%fp+719]
		.LVL53:
		.LBE152:
		.LBE151:
		.LBB153:
		.LBB154:
				call	cos, 0
				 ldd	[%i5+216], %f0
		.LVL54:
		.LBE154:
		.LBE153:
   84                     sin(axis slope angle))
   85                 object distance = object distance * ((to index *      %c
				ldd	[%i5+192], %f8
				ldd	[%fp+719], %f10
				fmuld	%f10, %f8, %f8
				ldd	[%i5+200], %f10
				fmuld	%f0, %f10, %f0
				fdivd	%f8, %f0, %f8
				ldd	[%i5+224], %f10
				fmuld	%f10, %f8, %f8
				std	%f8, [%i5+224]
   86                     cos(-rang)) / (from index *                       %c
   87                     cos(axis slope angle)))
   88                 axis slope angle = -rang
				ldd	[%fp+727], %f8
		.LBE159:
		.LBE164:
		.LBE171:
				ba,pt	%xcc, .L22
				 std	%f8, [%i5+216]
		.L10:
		.LVL55:
		.L5:
   89             %finish
   90         %finish
   91     %end {transit surface}
   92     %routine trace line(%integer line, %real ray h)
				.register	%g2, #scratch
				.register	%g3, #scratch
				.register	%g7, #ignore
		.LVL8:
				save	%sp, -1536, %sp
		.LVL9:
				mov	%g5, %i5
				ldx	[%g7+40], %g1
				stx	%g1, [%fp+2039]
				mov	0, %g1
   93         %integer i
   94         object distance = 0
				sethi	%hi(.LC10), %g1
				ldd	[%g1+%lo(.LC10)], %f8
				std	%f8, [%g5+224]
   95         ray height = ray h
				std	%f2, [%g5+208]
   96         from index = 1
				sethi	%hi(.LC11), %g1
				ldd	[%g1+%lo(.LC11)], %f8
				std	%f8, [%g5+200]
		.LBB135:
   97         %for i = 1, 1, current surfaces %cycle
   98             radius of curvature = test case(i, curvature radius)
				lduw	[%g5+268], %i1
		.LVL10:
				lduw	[%i5+264], %g1
				add	%g1, -1, %g1
				sra	%g1, 0, %g1
				sra	%i4, 0, %g2
				sllx	%g2, 2, %g2
				add	%g2, %g1, %g1
				add	%g1, 8, %g1
				sllx	%g1, 3, %g1
				ldd	[%i5+%g1], %f8
				std	%f8, [%fp+727]
				std	%f8, [%i5+232]
   99             to index = test case(i, index of refraction)
				addcc	%i1, -1, %g0
				bneg,pn	%icc, .L26
				 cmp	%i1, 0
		.LVL11:
		.L29:
				sethi	%hi(_imp_current_file), %g1
				ldx	[%g1+%lo(_imp_current_file)], %o1
				brz,pn	%o1, .L7
				 mov	256, %o2
				call	_imp_c2istr, 0
				 add	%fp, 1527, %o0
		.LVL13:
				sethi	%hi(_imp_current_line), %g1
		.L30:
				lduw	[%g1+%lo(_imp_current_line)], %i4
				cmp	%i4, 0
				move	%icc, 99, %i4
				sethi	%hi(.LC12), %o1
				or	%o1, %lo(.LC12), %o1
				call	_imp_c2istr, 0
				 add	%fp, 1783, %o0
		.LVL14:
				mov	256, %o2
				add	%fp, 1527, %o1
				call	memcpy, 0
				 add	%fp, 1007, %o0
		.LVL15:
				mov	256, %o2
				add	%fp, 1783, %o1
				call	memcpy, 0
				 add	%fp, 751, %o0
		.LVL16:
				mov	0, %o5
				mov	1, %o4
				mov	5, %o3
				add	%fp, 751, %o2
				sra	%i4, 0, %o1
				call	_signal_event, 0
				 add	%fp, 1007, %o0
		.LVL17:
		.LBE165:
				ba,pt	%xcc, .L29
				 cmp	%i1, 0
		.LVL18:
		.L7:
		.LBB166:
		.LBB136:
				sethi	%hi(.LC0), %o1
				or	%o1, %lo(.LC0), %o1
				call	memcpy, 0
				 add	%fp, 1783, %o0
		.LVL19:
				mov	256, %o2
				add	%fp, 1783, %o1
				call	memcpy, 0
				 add	%fp, 1271, %o0
		.LVL20:
		.LBE136:
				mov	256, %o2
				add	%fp, 1271, %o1
				call	memcpy, 0
				 add	%fp, 1527, %o0
		.LVL21:
		.LBE166:
				ba,pt	%xcc, .L30
				 sethi	%hi(_imp_current_line), %g1
		.LVL22:
		.L27:
		.LBB167:
		.LBB137:
		.LBB138:
				lduw	[%i5+260], %g1
				add	%g1, -1, %g1
				sra	%g1, 0, %g1
				add	%g2, %g1, %g2
				add	%g2, 8, %g2
				sllx	%g2, 3, %g2
				ldd	[%i5+%g2], %f10
  100             %if to index > 1 %then                                     %c
				sethi	%hi(.LC11), %g3
				ldd	[%g3+%lo(.LC11)], %f8
				fcmped	%fcc1, %f10, %f8
				fble,pn	%fcc1, .L12
				 std	%f10, [%i5+192]
  101                 to index = to index + ((spectral line(d line) -        %c
				add	%i0, -1, %i2
				sra	%i2, 0, %i2
				sllx	%i2, 3, %i2
		.LBE135:
				lduw	[%i5+256], %g1
				add	%g1, -1, %g1
				sra	%g1, 0, %g1
				sllx	%g1, 3, %g1
				ldd	[%i5+%g1], %f8
				ldd	[%i5+%i2], %f12
				fsubd	%f8, %f12, %f8
				lduw	[%i5+252], %g2
				add	%g2, -1, %g2
				sra	%g2, 0, %g2
				sllx	%g2, 3, %g2
				lduw	[%i5+248], %g1
				add	%g1, -1, %g1
				sra	%g1, 0, %g1
				sllx	%g1, 3, %g1
				ldd	[%i5+%g2], %f12
				ldd	[%i5+%g1], %f14
				fsubd	%f12, %f14, %f12
				fdivd	%f8, %f12, %f8
				ldd	[%g3+%lo(.LC11)], %f12
				fsubd	%f10, %f12, %f12
				lduw	[%i5+244], %g1
				add	%g1, -1, %g1
				sra	%g1, 0, %g2
				sra	%i4, 0, %g1
				sllx	%g1, 2, %g1
				add	%g1, %g2, %g1
				add	%g1, 8, %g1
				sllx	%g1, 3, %g1
				ldd	[%i5+%g1], %f14
				fdivd	%f12, %f14, %f12
				fmuld	%f8, %f12, %f8
				faddd	%f8, %f10, %f8
				std	%f8, [%i5+192]
		.L12:
		.LBB163:
		.LBB158:
  102                     spectral line(line)) /                             %c
				be,pn	%icc, .L5
				 mov	0, %i4
				be,pn	%icc, .L5
				 mov	%i3, %i4
		.LVL46:
		.L11:
  103                     (spectral line(c line) - spectral line(f line))) * %c
				add	%i4, 1, %i3
		.LVL47:
  104                     ((test case(i, index of refraction) - 1.0) /       %c
  105                     test case(i, dispersion))
  106             transit surface
  107             from index = to index
				ldd	[%i5+192], %f8
				std	%f8, [%i5+200]
  108             %if i < current surfaces %then                             %c
				lduw	[%i5+268], %g1
				cmp	%i3, %g1
				bge,pt	%icc, .L31
				 cmp	%i1, %i3
  109                 object distance = object distance -                    %c
				lduw	[%i5+240], %g1
				add	%g1, -1, %g1
				sra	%g1, 0, %g2
				sra	%i4, 0, %g1
				sllx	%g1, 2, %g1
				add	%g1, %g2, %g1
				add	%g1, 8, %g1
				sllx	%g1, 3, %g1
				ldd	[%i5+224], %f8
				ldd	[%i5+%g1], %f10
				fsubd	%f8, %f10, %f8
				std	%f8, [%i5+224]
		.L31:
  110                     test case(i, edge thickness)
  111         %repeat
  112     %end {trace line}
  113     %comment END GLOBAL DECLARATONS
				ldx	[%fp+2039], %g1
				ldx	[%g7+40], %g2
				xor	%g1, %g2, %g1
				mov	0, %g2
				brnz,pn	%g1, .L28
				 nop
				return	%i7+8
				 nop
		.L28:
				call	__stack_chk_fail, 0
				 nop
		.LVL56:
				nop
		.LFE190:
				.section	".rodata"
		.LC1:
				.byte	18
				.asciz	"  Marginal ray    "
				.skip	236
		.LC2:
				.byte	3
				.asciz	"   "
				.skip	251
		.LC3:
				.byte	18
				.asciz	"  Paraxial ray    "
				.skip	236
		.LC4:
				.byte	35
				.asciz	"Longitudinal spherical aberration: "
				.skip	219
		.LC5:
				.byte	27
				.asciz	"    (Maximum permissible): "
				.skip	227
		.LC6:
				.byte	39
				.asciz	"Offense against sine condition (coma): "
				.skip	215
		.LC7:
				.byte	28
				.asciz	"Axial chromatic aberration: "
				.skip	226
				.section	.rodata.cst8
				.align 8
		.LC14:
				.long	1086178560
				.long	0
				.align 8
		.LC15:
				.long	1085986292
				.long	2061584302
				.align 8
		.LC16:
				.long	1085907664
				.long	-446676599
				.align 8
		.LC17:
				.long	1085736945
				.long	-1443109011
				.align 8
		.LC18:
				.long	1085576590
				.long	-1752346657
				.align 8
		.LC19:
				.long	1085472088
				.long	274877907
				.align 8
		.LC20:
				.long	1085338746
				.long	481036337
				.align 8
		.LC21:
				.long	1085210876
				.long	-309237645
				.align 8
		.LC22:
				.long	1077611724
				.long	-858993459
				.align 8
		.LC23:
				.long	1073231901
				.long	2109687936
				.align 8
		.LC24:
				.long	1078971596
				.long	-858993459
				.align 8
		.LC25:
				.long	1071686615
				.long	171798692
				.align 8
		.LC26:
				.long	-1070551532
				.long	2061584302
				.align 8
		.LC27:
				.long	1072693248
				.long	0
				.align 8
		.LC28:
				.long	0
				.long	0
				.align 8
		.LC29:
				.long	1069656571
				.long	-412316860
				.align 8
		.LC30:
				.long	1073339590
				.long	1058279942
				.align 8
		.LC31:
				.long	1078090137
				.long	-1717986918
				.align 8
		.LC32:
				.long	1071141355
				.long	-2061584302
				.align 8
		.LC33:
				.long	-1068267930
				.long	1717986918
				.align 8
		.LC34:
				.long	1073741824
				.long	0
				.align 8
		.LC35:
				.long	1058555463
				.long	-487743358
				.align 8
		.LC36:
				.long	1063549665
				.long	1202590843
				.section	".text"
				.align 4
				.global main
				.proc	04
		main:
		.LFB185:
  114     %comment Spectral lines
  115     a line = 1; b line = 2; c line = 3; d line = 4
  116         e line = 5; f line = 6; g prime line = 7
  117         h line = 8
				mov	3, %g3
				st	%g3, [%fp+2003]
				mov	6, %g2
				st	%g2, [%fp+1999]
		.LVL61:
				sethi	%hi(.LC14), %g2
				ldd	[%g2+%lo(.LC14)], %f8
				std	%f8, [%fp+1751]
  118     spectral line(a line)       = 7621.0
				mov	4, %g1
				st	%g1, [%fp+2007]
		.LVL60:
  119     spectral line(b line)       = 6869.955
				sethi	%hi(.LC15), %g2
				ldd	[%g2+%lo(.LC15)], %f8
				std	%f8, [%fp+1759]
  120     spectral line(c line)       = 6562.8160
				sethi	%hi(.LC16), %g2
				ldd	[%g2+%lo(.LC16)], %f8
				std	%f8, [%fp+1767]
  121     spectral line(d line)       = 5895.944
				sethi	%hi(.LC17), %g2
				ldd	[%g2+%lo(.LC17)], %f8
				std	%f8, [%fp+1775]
  122     spectral line(e line)       = 5269.557
				sethi	%hi(.LC18), %g2
				ldd	[%g2+%lo(.LC18)], %f8
				std	%f8, [%fp+1783]
  123     spectral line(f line)       = 4861.344
				sethi	%hi(.LC19), %g2
				ldd	[%g2+%lo(.LC19)], %f8
				std	%f8, [%fp+1791]
  124     spectral line(g prime line) = 4340.477
				sethi	%hi(.LC20), %g2
				ldd	[%g2+%lo(.LC20)], %f8
				std	%f8, [%fp+1799]
  125     spectral line(h line)       = 3968.494
				sethi	%hi(.LC21), %g2
				ldd	[%g2+%lo(.LC21)], %f8
				std	%f8, [%fp+1807]
  126     %comment  Initialise the test case array
  127     current surfaces = 4
				st	%g1, [%fp+2019]
  128     curvature radius = 1; index of refraction = 2; dispersion = 3
				mov	1, %g2
				st	%g2, [%fp+2015]
  129         edge thickness = 4
				mov	2, %g2
				st	%g2, [%fp+2011]
				st	%g1, [%fp+1991]
				sethi	%hi(.LC22), %g1
				ldd	[%g1+%lo(.LC22)], %f8
				std	%f8, [%fp+1815]
  130     test case(1, curvature radius)    =   27.05
				st	%g3, [%fp+1995]
  131     test case(1, index of refraction) =    1.5137
				sethi	%hi(.LC23), %g1
				ldd	[%g1+%lo(.LC23)], %f8
				std	%f8, [%fp+1823]
  132     test case(1, dispersion)          =   63.6
				sethi	%hi(.LC24), %g1
				ldd	[%g1+%lo(.LC24)], %f8
				std	%f8, [%fp+1831]
  133     test case(1, edge thickness)      =    0.52
				sethi	%hi(.LC25), %g1
				ldd	[%g1+%lo(.LC25)], %f8
				std	%f8, [%fp+1839]
  134     test case(2, curvature radius)    =  -16.68
				sethi	%hi(.LC26), %g1
				ldd	[%g1+%lo(.LC26)], %f12
				std	%f12, [%fp+1847]
  135     test case(2, index of refraction) =    1.0
				sethi	%hi(.LC27), %g1
				ldd	[%g1+%lo(.LC27)], %f10
				std	%f10, [%fp+1855]
  136     test case(2, dispersion)          =    0.0
				sethi	%hi(.LC28), %g1
				ldd	[%g1+%lo(.LC28)], %f8
				std	%f8, [%fp+1863]
  137     test case(2, edge thickness)      =    0.138
				sethi	%hi(.LC29), %g1
				ldd	[%g1+%lo(.LC29)], %f14
				std	%f14, [%fp+1871]
  138     test case(3, curvature radius)    =  -16.68
				std	%f12, [%fp+1879]
  139     test case(3, index of refraction) =    1.6164
				sethi	%hi(.LC30), %g1
				ldd	[%g1+%lo(.LC30)], %f12
				std	%f12, [%fp+1887]
  140     test case(3, dispersion)          =   36.7
				sethi	%hi(.LC31), %g1
				ldd	[%g1+%lo(.LC31)], %f12
				std	%f12, [%fp+1895]
  141     test case(3, edge thickness)      =    0.38
				sethi	%hi(.LC32), %g1
				ldd	[%g1+%lo(.LC32)], %f12
				std	%f12, [%fp+1903]
  142     test case(4, curvature radius)    =  -78.1
				sethi	%hi(.LC33), %g1
				ldd	[%g1+%lo(.LC33)], %f12
				std	%f12, [%fp+1911]
  143     test case(4, index of refraction) =    1.0
				std	%f10, [%fp+1919]
  144     test case(4, dispersion)          =    0.0
				std	%f8, [%fp+1927]
  145     test case(4, edge thickness)      =    0.0
				std	%f8, [%fp+1935]
		.LVL62:
  146     marginal ray = 1; paraxial ray = 2
  147     od field = 1; sa field = 2
				st	%g2, [%fp+2023]
		.LVL63:
		.LBB172:
		.LBB173:
  148     %comment  number of iterations = 40263820;
  149     number of iterations = 1
  150     clear aperture = 4
  151     %for iteration = 1, 1, number of iterations %cycle
  152         %for paraxial = marginal ray, 1, paraxial ray %cycle
  153             trace line(d line, clear aperture / 2)
				add	%fp, 1751, %g5
				sethi	%hi(.LC34), %g1
				ldd	[%g1+%lo(.LC34)], %f2
				call	TRACELINE.6127, 0
				 ldsw	[%fp+2007], %o0
		.LVL64:
  154             od sa(paraxial, od field) = object distance
				sethi	%hi(5120), %i5
				xor	%i5, -328, %i5
		.L33:
				lduw	[%fp+2027], %g2
				add	%g2, -1, %g1
				sra	%g1, 0, %g1
				sllx	%g1, 4, %g1
				add	%fp, 2047, %g3
				add	%g3, %g1, %g1
				ldd	[%fp+1975], %f8
				std	%f8, [%g1+%i5]
  155             od sa(paraxial, sa field) = axis slope angle
				add	%g1, %i5, %g1
				ldd	[%fp+1967], %f8
		.LDL1:
  156         %repeat
  157         %comment Trace marginal ray in C
				mov	0, %g2
				cmp	%g2, 2
				bne,pt	%icc, .L33
				 std	%f8, [%g1+8]
		.L34:
		.LBE173:
				mov	1, %g1
				st	%g1, [%fp+2027]
  158         paraxial = marginal ray
				add	%g2, 1, %g2
				st	%g2, [%fp+2027]
  159         trace line(c line, clear aperture / 2)
				add	%fp, 1751, %g5
				sethi	%hi(.LC34), %i5
				ldd	[%i5+%lo(.LC34)], %f2
				call	TRACELINE.6127, 0
				 ldsw	[%fp+2003], %o0
		.LVL65:
  160         od cline = object distance
				ldd	[%fp+1975], %f8
				std	%f8, [%fp-3697]
		.LVL66:
  161         %comment Trace marginal ray in F
  162         trace line(f line, clear aperture / 2)
				add	%fp, 1751, %g5
				ldd	[%i5+%lo(.LC34)], %f2
				call	TRACELINE.6127, 0
				 ldsw	[%fp+1999], %o0
		.LVL67:
  163         od fline = object distance
  164         aberr lspher = od sa(paraxial ray, od field) -               %c
				lduw	[%fp+2023], %i5
				add	%i5, -1, %i5
				sethi	%hi(5120), %i4
				xor	%i4, -328, %i3
				sra	%i5, 0, %i5
				sllx	%i5, 4, %i5
				add	%fp, 2047, %g1
				add	%g1, %i5, %i5
				ldd	[%i5+%i3], %f8
				ldd	[%g1+%i3], %f12
				std	%f8, [%fp-3673]
				std	%f12, [%fp-3681]
				fsubd	%f8, %f12, %f14
				std	%f14, [%fp-3705]
		.LVL68:
  165             od sa(marginal ray, od field)
  166         aberr osc = 1 - ((od sa(paraxial ray, od field) *            %c
				add	%g1, %i3, %g1
				ldd	[%g1+8], %f14
		.LVL69:
		.LBB174:
		.LBB175:
				std	%f14, [%fp-3689]
				call	sin, 0
				 fmovd	%f14, %f0
		.LVL70:
		.LBE175:
		.LBE174:
				add	%i5, %i3, %i5
				ldd	[%i5+8], %f8
				ldd	[%fp-3673], %f10
				fmuld	%f10, %f8, %f8
				ldd	[%fp-3681], %f12
				fmuld	%f12, %f0, %f10
				fdivd	%f8, %f10, %f8
				sethi	%hi(.LC27), %g1
				ldd	[%g1+%lo(.LC27)], %f10
				fsubd	%f10, %f8, %f12
				std	%f12, [%fp-3681]
		.LVL71:
  167                           od sa(paraxial ray, sa field)) /           %c
  168                           (sin(od sa(marginal ray, sa field)) *      %c
  169                            od sa(marginal ray, od field)))
  170         aberr lchrom = od fline - od cline
				ldd	[%fp+1975], %f8
		.LVL72:
				ldd	[%fp-3697], %f10
				fsubd	%f8, %f10, %f8
		.LVL73:
				std	%f8, [%fp-3697]
		.LVL74:
		.LBB176:
		.LBB177:
				fmuld	%f0, %f0, %f0
		.LBE177:
		.LBE176:
  171         max lspher = 0.0000926 / sin(od sa(marginal ray, sa field)) ^ 2
				sethi	%hi(.LC35), %g1
				ldd	[%g1+%lo(.LC35)], %f8
		.LVL75:
				fdivd	%f8, %f0, %f8
				std	%f8, [%fp-3673]
		.LDL2:
		.LVL76:
		.LDL3:
		.LBE172:
		.LBB178:
  172         max lchrom = max lspher
  173         max osc = 0.0025
  174     %repeat
  175     %comment Print the analysis of the ray trace
  176     print string("  Marginal ray    ")
				mov	256, %o2
				sethi	%hi(.LC1), %o1
				or	%o1, %lo(.LC1), %o1
				call	memcpy, 0
				 add	%fp, 1495, %o0
		.LVL77:
				xor	%i4, -296, %i5
				add	%fp, 2047, %g1
				add	%g1, %i5, %i5
				mov	256, %o2
				add	%fp, 1495, %o1
				call	memcpy, 0
				 mov	%i5, %o0
		.LVL78:
				mov	256, %o2
				mov	%i5, %o1
				call	memcpy, 0
				 add	%fp, 1495, %o0
		.LVL79:
		.LBE178:
		.LBB179:
		.LBB180:
				xor	%i4, -592, %i5
				add	%fp, 2047, %g1
				add	%g1, %i5, %i5
				mov	256, %o2
				add	%fp, 1495, %o1
				call	memcpy, 0
				 mov	%i5, %o0
		.LVL80:
				call	_imp_printstring, 0
				 mov	%i5, %o0
		.LVL81:
		.LBE180:
		.LBE179:
		.LBB181:
  177     outbigreal(1, od sa(marginal ray, od field))
  178     print string("   ")
				sethi	%hi(.LC2), %i2
				or	%i2, %lo(.LC2), %i2
				mov	256, %o2
				mov	%i2, %o1
				call	memcpy, 0
				 add	%fp, 1239, %o0
		.LVL82:
				xor	%i4, -40, %i4
				add	%fp, 2047, %g1
				add	%g1, %i4, %i4
				mov	256, %o2
				add	%fp, 1239, %o1
				call	memcpy, 0
				 mov	%i4, %o0
		.LVL83:
				mov	256, %o2
				mov	%i4, %o1
				call	memcpy, 0
				 add	%fp, 1239, %o0
		.LVL84:
		.LBE181:
		.LBB182:
		.LBB183:
				mov	256, %o2
				add	%fp, 1239, %o1
				call	memcpy, 0
				 mov	%i5, %o0
		.LVL85:
				call	_imp_printstring, 0
				 mov	%i5, %o0
		.LVL86:
		.LBE183:
		.LBE182:
		.LBB184:
		.LBB185:
				mov	11, %o2
				mov	5, %o1
				call	_imp_print, 0
				 ldd	[%fp-3689], %f0
		.LVL87:
		.LBE185:
		.LBE184:
		.LBB186:
		.LBB187:
				call	_imp_newline, 0
				 sethi	%hi(4096), %i4
		.LVL88:
		.LBE187:
		.LBE186:
		.LBB188:
  179     print(od sa(marginal ray, sa field), 5, 11); newline
  180     print string("  Paraxial ray    ")
				mov	256, %o2
				sethi	%hi(.LC3), %o1
				or	%o1, %lo(.LC3), %o1
				call	memcpy, 0
				 add	%fp, 983, %o0
		.LVL89:
				xor	%i4, -808, %i1
		.LVL90:
				add	%fp, 2047, %g1
				add	%g1, %i1, %i1
				mov	256, %o2
				add	%fp, 983, %o1
				call	memcpy, 0
				 mov	%i1, %o0
		.LVL91:
				mov	256, %o2
				mov	%i1, %o1
				call	memcpy, 0
				 add	%fp, 983, %o0
		.LVL92:
		.LBE188:
		.LBB189:
		.LBB190:
				mov	256, %o2
				add	%fp, 983, %o1
				call	memcpy, 0
				 mov	%i5, %o0
		.LVL93:
				call	_imp_printstring, 0
				 mov	%i5, %o0
		.LVL94:
		.LBE190:
		.LBE189:
		.LBB191:
  181     outbigreal(1, od sa(paraxial ray, od field))
  182     print string("   ")
				mov	256, %o2
				mov	%i2, %o1
				call	memcpy, 0
				 add	%fp, 727, %o0
		.LVL95:
				xor	%i4, -552, %i2
				add	%fp, 2047, %g1
				add	%g1, %i2, %i2
				mov	256, %o2
				add	%fp, 727, %o1
				call	memcpy, 0
				 mov	%i2, %o0
		.LVL96:
				mov	256, %o2
				mov	%i2, %o1
				call	memcpy, 0
				 add	%fp, 727, %o0
		.LVL97:
		.LBE191:
		.LBB192:
		.LBB193:
				mov	256, %o2
				add	%fp, 727, %o1
				call	memcpy, 0
				 mov	%i5, %o0
		.LVL98:
				call	_imp_printstring, 0
				 mov	%i5, %o0
		.LVL99:
		.LBE193:
		.LBE192:
  183     print(od sa(paraxial ray, sa field), 5, 11); newline
				lduw	[%fp+2023], %g1
				add	%g1, -1, %g1
				sra	%g1, 0, %g1
				sllx	%g1, 4, %g1
				add	%fp, 2047, %g2
				add	%g2, %g1, %g1
				add	%g1, %i3, %g1
		.LBB194:
		.LBB195:
				mov	11, %o2
				mov	5, %o1
				call	_imp_print, 0
				 ldd	[%g1+8], %f0
		.LVL100:
		.LBE195:
		.LBE194:
		.LBB196:
		.LBB197:
				call	_imp_newline, 0
				 xor	%i4, -296, %i3
		.LVL101:
		.LBE197:
		.LBE196:
		.LBB198:
  184     print string("Longitudinal spherical aberration: ")
				mov	256, %o2
				sethi	%hi(.LC4), %o1
				or	%o1, %lo(.LC4), %o1
				call	memcpy, 0
				 add	%fp, 471, %o0
		.LVL102:
				add	%fp, 2047, %g1
				add	%g1, %i3, %i3
				mov	256, %o2
				add	%fp, 471, %o1
				call	memcpy, 0
				 mov	%i3, %o0
		.LVL103:
				mov	256, %o2
				mov	%i3, %o1
				call	memcpy, 0
				 add	%fp, 471, %o0
		.LVL104:
		.LBE198:
		.LBB199:
		.LBB200:
				mov	256, %o2
				add	%fp, 471, %o1
				call	memcpy, 0
				 mov	%i5, %o0
		.LVL105:
				call	_imp_printstring, 0
				 mov	%i5, %o0
		.LVL106:
		.LBE200:
		.LBE199:
		.LBB201:
		.LBB202:
				mov	11, %o2
				mov	5, %o1
				call	_imp_print, 0
				 ldd	[%fp-3705], %f0
		.LVL107:
		.LBE202:
		.LBE201:
		.LBB203:
		.LBB204:
				call	_imp_newline, 0
				 sethi	%hi(.LC5), %i3
		.LVL108:
		.LBE204:
		.LBE203:
		.LBB205:
  185     print(aberr lspher, 5, 11); newline
  186     print string("    (Maximum permissible): ")
				or	%i3, %lo(.LC5), %i3
				mov	256, %o2
				mov	%i3, %o1
				call	memcpy, 0
				 add	%fp, 215, %o0
		.LVL109:
				xor	%i4, -40, %i4
				add	%fp, 2047, %g1
				add	%g1, %i4, %i4
				mov	256, %o2
				add	%fp, 215, %o1
				call	memcpy, 0
				 mov	%i4, %o0
		.LVL110:
				mov	256, %o2
				mov	%i4, %o1
				call	memcpy, 0
				 add	%fp, 215, %o0
		.LVL111:
		.LBE205:
		.LBB206:
		.LBB207:
				mov	256, %o2
				add	%fp, 215, %o1
				call	memcpy, 0
				 mov	%i5, %o0
		.LVL112:
				call	_imp_printstring, 0
				 mov	%i5, %o0
		.LVL113:
		.LBE207:
		.LBE206:
		.LBB208:
		.LBB209:
				mov	11, %o2
				mov	5, %o1
				call	_imp_print, 0
				 ldd	[%fp-3673], %f0
		.LVL114:
		.LBE209:
		.LBE208:
		.LBB210:
		.LBB211:
				call	_imp_newline, 0
				 nop
		.LVL115:
		.LBE211:
		.LBE210:
		.LBB212:
  187     print(max lspher, 5, 11); newline
  188     print string("Offense against sine condition (coma): ")
				mov	256, %o2
				sethi	%hi(.LC6), %o1
				or	%o1, %lo(.LC6), %o1
				call	memcpy, 0
				 add	%fp, -41, %o0
		.LVL116:
				mov	256, %o2
				add	%fp, -41, %o1
				call	memcpy, 0
				 add	%fp, -1833, %o0
		.LVL117:
				mov	256, %o2
				add	%fp, -1833, %o1
				call	memcpy, 0
				 add	%fp, -41, %o0
		.LVL118:
		.LBE212:
		.LBB213:
		.LBB214:
				mov	256, %o2
				add	%fp, -41, %o1
				call	memcpy, 0
				 mov	%i5, %o0
		.LVL119:
				call	_imp_printstring, 0
				 mov	%i5, %o0
		.LVL120:
		.LBE214:
		.LBE213:
		.LBB215:
		.LBB216:
				mov	11, %o2
				mov	5, %o1
				call	_imp_print, 0
				 ldd	[%fp-3681], %f0
		.LVL121:
		.LBE216:
		.LBE215:
		.LBB217:
		.LBB218:
				call	_imp_newline, 0
				 nop
		.LVL122:
		.LBE218:
		.LBE217:
		.LBB219:
  189     print(aberr osc, 5, 11); newline
  190     print string("    (Maximum permissible): ")
				mov	256, %o2
				mov	%i3, %o1
				call	memcpy, 0
				 add	%fp, -297, %o0
		.LVL123:
				mov	256, %o2
				add	%fp, -297, %o1
				call	memcpy, 0
				 add	%fp, -1577, %o0
		.LVL124:
				mov	256, %o2
				add	%fp, -1577, %o1
				call	memcpy, 0
				 add	%fp, -297, %o0
		.LVL125:
		.LBE219:
		.LBB220:
		.LBB221:
				mov	256, %o2
				add	%fp, -297, %o1
				call	memcpy, 0
				 mov	%i5, %o0
		.LVL126:
				call	_imp_printstring, 0
				 mov	%i5, %o0
		.LVL127:
		.LBE221:
		.LBE220:
		.LBB222:
		.LBB223:
				mov	11, %o2
				mov	5, %o1
				sethi	%hi(.LC36), %g1
				call	_imp_print, 0
				 ldd	[%g1+%lo(.LC36)], %f0
		.LVL128:
		.LBE223:
		.LBE222:
		.LBB224:
		.LBB225:
				call	_imp_newline, 0
				 nop
		.LVL129:
		.LBE225:
		.LBE224:
		.LBB226:
  191     print(max osc, 5, 11); newline
  192     print string("Axial chromatic aberration: ")
				mov	256, %o2
				sethi	%hi(.LC7), %o1
				or	%o1, %lo(.LC7), %o1
				call	memcpy, 0
				 add	%fp, -553, %o0
		.LVL130:
				mov	256, %o2
				add	%fp, -553, %o1
				call	memcpy, 0
				 add	%fp, -1321, %o0
		.LVL131:
				mov	256, %o2
				add	%fp, -1321, %o1
				call	memcpy, 0
				 add	%fp, -553, %o0
		.LVL132:
		.LBE226:
		.LBB227:
		.LBB228:
				mov	256, %o2
				add	%fp, -553, %o1
				call	memcpy, 0
				 mov	%i5, %o0
		.LVL133:
				call	_imp_printstring, 0
				 mov	%i5, %o0
		.LVL134:
		.LBE228:
		.LBE227:
		.LBB229:
		.LBB230:
				mov	11, %o2
				mov	5, %o1
				call	_imp_print, 0
				 ldd	[%fp-3697], %f0
		.LVL135:
		.LBE230:
		.LBE229:
		.LBB231:
		.LBB232:
				call	_imp_newline, 0
				 nop
		.LVL136:
		.LBE232:
		.LBE231:
		.LBB233:
  193     print(aberr lchrom, 5, 11); newline
  194     print string("    (Maximum permissible): ")
				mov	256, %o2
				mov	%i3, %o1
				call	memcpy, 0
				 add	%fp, -809, %o0
		.LVL137:
				mov	256, %o2
				add	%fp, -809, %o1
				call	memcpy, 0
				 add	%fp, -1065, %o0
		.LVL138:
				mov	256, %o2
				add	%fp, -1065, %o1
				call	memcpy, 0
				 add	%fp, -809, %o0
		.LVL139:
		.LBE233:
		.LBB234:
		.LBB235:
				mov	256, %o2
				add	%fp, -809, %o1
				call	memcpy, 0
				 mov	%i5, %o0
		.LVL140:
				call	_imp_printstring, 0
				 mov	%i5, %o0
		.LVL141:
		.LBE235:
		.LBE234:
		.LBB236:
		.LBB237:
				mov	11, %o2
				mov	5, %o1
				call	_imp_print, 0
				 ldd	[%fp-3673], %f0
		.LVL142:
		.LBE237:
		.LBE236:
		.LBB238:
		.LBB239:
				call	_imp_newline, 0
				 nop
		.LVL143:
		.LBE239:
		.LBE238:
		.LBB240:
		.LBB241:
				call	exit, 0
				 mov	0, %o0
		.LVL144:
		.LBE241:
		.LBE240:
				nop
		.LFE185:
		.Letext0:
  195     print(max lchrom, 5, 11); newline
  196 %end %of %program
  163 Statements compiled
