/* Ksqrtf.s 1.4 90/12/04 */
#include "../tahoe/SYS.h"
tstl 4(fp) # if (arg <= 0.) {
movl r0,-60(fp) # x = frexp(arg,&exp);
L20: cmpd2 -60(fp),half # while(x < 0.5){
bitl $1,-72(fp) # if(exp & 1) {
callf $24,_Kaddd # (1.0+x)
std -68(fp) # temp=0.5*(1.0+x);
callf $24,_Kmuld # temp*(1L<<30)
std -68(fp) # temp *=(1L<<30);
subl2 $60,-72(fp) # exp -= 60;}
L28: cmpl -72(fp),$60 # while(exp > 60){
std -68(fp) # temp /= (1L<<30);
addl2 $60,-72(fp) # exp +=60;}
L31: cmpl -72(fp),$-60 # while(exp < -60) {
tstl -72(fp) # if(exp >=0)
callf $24,_Kmuld # temp * (1L <<(exp/2))
jbr L2000006 # temp *= 1L << (exp/2));
L34: mnegl -72(fp),r0 # -exp
callf $24,_Kdivd # temp / (1L <<(-exp/2))
std -68(fp) # temp (*/)= 1L << (exp/2));
std -68(fp) # temp=0.5*(temp+arg/temp);
aobleq $3,-76(fp),L2000008
half: .long 0x40000000, 0x00000000 # .double .5
two: .long 0x41000000, 0x00000000 # .double 2
one: .long 0x40800000, 0x00000000 # .double 1
big: .long 0x4F800000, 0x00000000 # .double (1<<30)