// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathmsc.cpp
// Function: st1isem_(double*, double*, double*, double*, double*, double*)
int st1isem_(double *xsta, double *xsun, double *xmon,
             double *fac2sun, double *fac2mon, double *xcorsta)
{
    /* Initialized data */

    static double dhi = -.0022;
    static double dli = -7e-4;

    /* F2C generated locals */
    double d__1, d__2, d__3, d__4;

    /* Local variables */
    static double rsta, rmon, rsun, costwola, sintwola, cosla, demon, 
                  sinla, dnmon, desun, drmon, dnsun, drsun;
    static double de, dn, dr, cosphi, sinphi;

    if(xsta == 0) return (-1);
    if(xsun == 0) return (-1);
    if(xmon == 0) return (-1);
    if(fac2sun == 0) return (-1);
    if(fac2mon == 0) return (-1);
    if(xcorsta == 0) return (-1);

/* this subroutine gives the out-of-phase corrections induced by */
/* mantle inelasticity in the diurnal band */
/*  input: xsta,xsun,xmon,fac2sun,fac2mon */
/* output: xcorsta */

    /* Function Body */
    rsta = enorm8_(&xsta[0]);
    sinphi = xsta[2] / rsta;
/* Computing 2nd power */
    d__1 = xsta[0];
/* Computing 2nd power */
    d__2 = xsta[1];
    cosphi = sqrt(d__1 * d__1 + d__2 * d__2) / rsta;
    sinla = xsta[1] / cosphi / rsta;
    cosla = xsta[0] / cosphi / rsta;
/* Computing 2nd power */
    d__1 = cosla;
/* Computing 2nd power */
    d__2 = sinla;
    costwola = d__1 * d__1 - d__2 * d__2;
    sintwola = cosla * 2. * sinla;
    rmon = enorm8_(&xmon[0]);
    rsun = enorm8_(&xsun[0]);
/* Computing 2nd power */
    d__1 = cosphi;
/* Computing 2nd power */
    d__2 = xsun[0];
/* Computing 2nd power */
    d__3 = xsun[1];
/* Computing 2nd power */
    d__4 = rsun;
    drsun = dhi * -.75 * (d__1 * d__1) * *fac2sun * ((d__2 * d__2 - d__3 * 
            d__3) * sintwola - xsun[0] * 2.f * xsun[1] * costwola) / (d__4 * 
            d__4);
/* Computing 2nd power */
    d__1 = cosphi;
/* Computing 2nd power */
    d__2 = xmon[0];
/* Computing 2nd power */
    d__3 = xmon[1];
/* Computing 2nd power */
    d__4 = rmon;
    drmon = dhi * -.75 * (d__1 * d__1) * *fac2mon * ((d__2 * d__2 - d__3 * 
            d__3) * sintwola - xmon[0] * 2.f * xmon[1] * costwola) / (d__4 * 
            d__4);
/* Computing 2nd power */
    d__1 = xsun[0];
/* Computing 2nd power */
    d__2 = xsun[1];
/* Computing 2nd power */
    d__3 = rsun;
    dnsun = dli * 1.5 * sinphi * cosphi * *fac2sun * ((d__1 * d__1 - d__2 * 
            d__2) * sintwola - xsun[0] * 2. * xsun[1] * costwola) / (d__3 * 
            d__3);
/* Computing 2nd power */
    d__1 = xmon[0];
/* Computing 2nd power */
    d__2 = xmon[1];
/* Computing 2nd power */
    d__3 = rmon;
    dnmon = dli * 1.5 * sinphi * cosphi * *fac2mon * ((d__1 * d__1 - d__2 * 
            d__2) * sintwola - xmon[0] * 2. * xmon[1] * costwola) / (d__3 * 
            d__3);
/* Computing 2nd power */
    d__1 = xsun[0];
/* Computing 2nd power */
    d__2 = xsun[1];
/* Computing 2nd power */
    d__3 = rsun;
    desun = dli * -1.5 * cosphi * *fac2sun * ((d__1 * d__1 - d__2 * d__2) * 
            costwola + xsun[0] * 2.f * xsun[1] * sintwola) / (d__3 * d__3);
/* Computing 2nd power */
    d__1 = xmon[0];
/* Computing 2nd power */
    d__2 = xmon[1];
/* Computing 2nd power */
    d__3 = rmon;
    demon = dli * -1.5 * cosphi * *fac2mon * ((d__1 * d__1 - d__2 * d__2) * 
            costwola + xmon[0] * 2. * xmon[1] * sintwola) / (d__3 * d__3);
    dr = drsun + drmon;
    dn = dnsun + dnmon;
    de = desun + demon;
    xcorsta[0] = dr * cosla * cosphi - de * sinla - dn * sinphi * cosla;
    xcorsta[1] = dr * sinla * cosphi + de * cosla - dn * sinphi * sinla;
    xcorsta[2] = dr * sinphi + dn * cosphi;
    return 0;
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %r10b
orb %al, %r10b
testq %rdx, %rdx
sete %al
testq %rcx, %rcx
sete %r11b
orb %al, %r11b
orb %r10b, %r11b
testq %r8, %r8
sete %al
testq %r9, %r9
sete %r10b
orb %al, %r10b
orb %r11b, %r10b
je 0xd82cd
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
pushq %rbp
movq %rsp, %rbp
movsd (%rdi), %xmm5
movsd 0x8(%rdi), %xmm6
movapd %xmm6, %xmm1
mulsd %xmm6, %xmm1
movapd %xmm5, %xmm2
mulsd %xmm5, %xmm2
addsd %xmm1, %xmm2
movsd 0x10(%rdi), %xmm0
movapd %xmm0, %xmm4
mulsd %xmm0, %xmm4
addsd %xmm2, %xmm4
sqrtsd %xmm4, %xmm4
divsd %xmm4, %xmm0
movsd %xmm0, -0x8(%rbp)
sqrtsd %xmm2, %xmm2
divsd %xmm4, %xmm2
divsd %xmm2, %xmm6
divsd %xmm4, %xmm6
movapd %xmm5, %xmm1
divsd %xmm2, %xmm1
divsd %xmm4, %xmm1
movapd %xmm6, %xmm4
mulsd %xmm6, %xmm4
movapd %xmm1, %xmm5
movsd %xmm1, -0x18(%rbp)
mulsd %xmm1, %xmm5
subsd %xmm4, %xmm5
movsd (%rdx), %xmm3
movsd 0x8(%rdx), %xmm9
movapd %xmm3, %xmm4
movsd (%rsi), %xmm7
movsd 0x1d73c(%rip), %xmm8    # 0xf5a98
movapd %xmm7, %xmm10
mulsd %xmm8, %xmm10
mulsd %xmm3, %xmm8
mulsd %xmm9, %xmm8
addsd %xmm3, %xmm3
mulsd %xmm9, %xmm3
movsd %xmm3, -0x10(%rbp)
movapd %xmm9, %xmm15
mulsd %xmm9, %xmm15
mulsd %xmm4, %xmm4
movapd %xmm4, %xmm9
addsd %xmm15, %xmm9
movsd 0x10(%rdx), %xmm12
mulsd %xmm12, %xmm12
addsd %xmm9, %xmm12
movsd 0x8(%rsi), %xmm9
movapd %xmm7, %xmm11
mulsd %xmm9, %xmm10
addsd %xmm7, %xmm7
mulsd %xmm9, %xmm7
mulsd %xmm9, %xmm9
mulsd %xmm11, %xmm11
movapd %xmm11, %xmm13
addsd %xmm9, %xmm13
movsd 0x10(%rsi), %xmm14
mulsd %xmm14, %xmm14
addsd %xmm13, %xmm14
movapd %xmm1, %xmm13
addsd %xmm1, %xmm13
mulsd %xmm6, %xmm13
sqrtsd %xmm12, %xmm12
sqrtsd %xmm14, %xmm14
subsd %xmm9, %xmm11
mulsd %xmm5, %xmm10
movapd %xmm11, %xmm0
mulsd %xmm13, %xmm0
addsd %xmm10, %xmm0
movapd %xmm2, %xmm9
mulsd %xmm2, %xmm9
mulsd 0x3df88(%rip), %xmm9    # 0x1163b0
subsd %xmm15, %xmm4
mulsd %xmm5, %xmm8
movapd %xmm4, %xmm10
mulsd %xmm13, %xmm10
addsd %xmm8, %xmm10
movsd (%rcx), %xmm1
movapd %xmm9, %xmm8
mulsd %xmm1, %xmm8
mulsd %xmm0, %xmm8
mulsd %xmm14, %xmm14
divsd %xmm14, %xmm8
movsd (%r8), %xmm3
mulsd %xmm3, %xmm9
mulsd %xmm10, %xmm9
mulsd %xmm12, %xmm12
divsd %xmm12, %xmm9
addsd %xmm8, %xmm9
movsd 0x3df33(%rip), %xmm8    # 0x1163b8
mulsd -0x8(%rbp), %xmm8
mulsd %xmm2, %xmm8
movapd %xmm1, %xmm15
mulsd %xmm8, %xmm15
mulsd %xmm0, %xmm15
mulsd %xmm3, %xmm8
mulsd %xmm10, %xmm8
mulsd %xmm13, %xmm7
mulsd %xmm5, %xmm11
addsd %xmm7, %xmm11
movsd 0x3df00(%rip), %xmm0    # 0x1163c0
mulsd %xmm2, %xmm0
movapd %xmm2, %xmm7
mulsd %xmm0, %xmm1
mulsd %xmm1, %xmm11
divsd %xmm14, %xmm15
divsd %xmm14, %xmm11
mulsd %xmm3, %xmm0
movsd -0x10(%rbp), %xmm1
mulsd %xmm13, %xmm1
mulsd %xmm5, %xmm4
addsd %xmm1, %xmm4
mulsd %xmm0, %xmm4
divsd %xmm12, %xmm8
divsd %xmm12, %xmm4
addsd %xmm11, %xmm4
addsd %xmm15, %xmm8
movapd %xmm6, %xmm0
mulsd %xmm4, %xmm0
movapd 0x1ac97(%rip), %xmm1    # 0xf31b0
xorpd %xmm8, %xmm1
movsd -0x8(%rbp), %xmm3
mulsd %xmm3, %xmm1
movapd %xmm1, %xmm2
movsd -0x18(%rbp), %xmm5
mulsd %xmm5, %xmm2
mulsd %xmm5, %xmm4
mulsd %xmm9, %xmm5
mulsd %xmm7, %xmm5
subsd %xmm0, %xmm5
addsd %xmm5, %xmm2
movsd %xmm2, (%r9)
mulsd %xmm6, %xmm1
mulsd %xmm9, %xmm6
mulsd %xmm7, %xmm6
addsd %xmm4, %xmm6
addsd %xmm1, %xmm6
movsd %xmm6, 0x8(%r9)
mulsd %xmm7, %xmm8
mulsd %xmm3, %xmm9
addsd %xmm8, %xmm9
movsd %xmm9, 0x10(%r9)
xorl %eax, %eax
popq %rbp
retq