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

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

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

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

    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;
/* Computing 2nd power */
    d__1 = cosphi;
/* Computing 2nd power */
    d__2 = sinphi;
    cos2phi = d__1 * d__1 - d__2 * d__2;
    sinla = xsta[1] / cosphi / rsta;
    cosla = xsta[0] / cosphi / rsta;
    rmon = enorm8_(&xmon[0]);
    rsun = enorm8_(&xsun[0]);
/* Computing 2nd power */
    d__1 = rsun;
    drsun = dhi * -3. * sinphi * cosphi * *fac2sun * xsun[2] * (xsun[0] * 
            sinla - xsun[1] * cosla) / (d__1 * d__1);
/* Computing 2nd power */
    d__1 = rmon;
    drmon = dhi * -3. * sinphi * cosphi * *fac2mon * xmon[2] * (xmon[0] * 
            sinla - xmon[1] * cosla) / (d__1 * d__1);
/* Computing 2nd power */
    d__1 = rsun;
    dnsun = dli * -3. * cos2phi * *fac2sun * xsun[2] * (xsun[0] * sinla - 
            xsun[1] * cosla) / (d__1 * d__1);
/* Computing 2nd power */
    d__1 = rmon;
    dnmon = dli * -3. * cos2phi * *fac2mon * xmon[2] * (xmon[0] * sinla - 
            xmon[1] * cosla) / (d__1 * d__1);
/* Computing 2nd power */
    d__1 = rsun;
    desun = dli * -3. * sinphi * *fac2sun * xsun[2] * (xsun[0] * cosla + xsun[
            1] * sinla) / (d__1 * d__1);
/* Computing 2nd power */
    d__1 = rmon;
    demon = dli * -3. * sinphi * *fac2mon * xmon[2] * (xmon[0] * cosla + xmon[
            1] * sinla) / (d__1 * d__1);
    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:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1434b3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x143af8
cmpq $0x0, -0x18(%rbp)
jne 0x1434c6
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x143af8
cmpq $0x0, -0x20(%rbp)
jne 0x1434d9
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x143af8
cmpq $0x0, -0x28(%rbp)
jne 0x1434ec
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x143af8
cmpq $0x0, -0x30(%rbp)
jne 0x1434ff
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x143af8
cmpq $0x0, -0x38(%rbp)
jne 0x143512
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x143af8
movq -0x10(%rbp), %rdi
callq 0x146850
movsd %xmm0, 0x2975cd(%rip)   # 0x3daaf0
movq -0x10(%rbp), %rax
movsd 0x10(%rax), %xmm0
divsd 0x2975bc(%rip), %xmm0   # 0x3daaf0
movsd %xmm0, 0x29762c(%rip)   # 0x3dab68
movq -0x10(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x40(%rbp)
movq -0x10(%rbp), %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0x48(%rbp)
movsd -0x40(%rbp), %xmm0
movsd -0x40(%rbp), %xmm2
movsd -0x48(%rbp), %xmm1
mulsd -0x48(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x9280
divsd 0x297570(%rip), %xmm0   # 0x3daaf0
movsd %xmm0, 0x2975d8(%rip)   # 0x3dab60
movsd 0x2975d0(%rip), %xmm0   # 0x3dab60
movsd %xmm0, -0x40(%rbp)
movsd 0x2975cb(%rip), %xmm0   # 0x3dab68
movsd %xmm0, -0x48(%rbp)
movsd -0x40(%rbp), %xmm0
movsd -0x40(%rbp), %xmm2
movsd -0x48(%rbp), %xmm1
mulsd -0x48(%rbp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x297593(%rip)   # 0x3dab70
movq -0x10(%rbp), %rax
movsd 0x8(%rax), %xmm0
divsd 0x297572(%rip), %xmm0   # 0x3dab60
divsd 0x2974fa(%rip), %xmm0   # 0x3daaf0
movsd %xmm0, 0x29751a(%rip)   # 0x3dab18
movq -0x10(%rbp), %rax
movsd (%rax), %xmm0
divsd 0x297552(%rip), %xmm0   # 0x3dab60
divsd 0x2974da(%rip), %xmm0   # 0x3daaf0
movsd %xmm0, 0x2974ea(%rip)   # 0x3dab08
movq -0x20(%rbp), %rdi
callq 0x146850
movsd %xmm0, 0x2974c9(%rip)   # 0x3daaf8
movq -0x18(%rbp), %rdi
callq 0x146850
movsd %xmm0, 0x2974c0(%rip)   # 0x3dab00
movsd 0x2974b8(%rip), %xmm0   # 0x3dab00
movsd %xmm0, -0x40(%rbp)
movsd 0x4ad43(%rip), %xmm0    # 0x18e398
mulsd 0x8becb(%rip), %xmm0    # 0x1cf528
mulsd 0x297503(%rip), %xmm0   # 0x3dab68
mulsd 0x2974f3(%rip), %xmm0   # 0x3dab60
movq -0x28(%rbp), %rax
mulsd (%rax), %xmm0
movq -0x18(%rbp), %rax
mulsd 0x10(%rax), %xmm0
movq -0x18(%rbp), %rax
movsd (%rax), %xmm1
movsd 0x29748a(%rip), %xmm3   # 0x3dab18
movq -0x18(%rbp), %rax
movsd 0x8(%rax), %xmm2
mulsd 0x297469(%rip), %xmm2   # 0x3dab08
movq %xmm2, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd -0x40(%rbp), %xmm1
mulsd -0x40(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x297468(%rip)   # 0x3dab40
movsd 0x297418(%rip), %xmm0   # 0x3daaf8
movsd %xmm0, -0x40(%rbp)
movsd 0x4acab(%rip), %xmm0    # 0x18e398
mulsd 0x8be33(%rip), %xmm0    # 0x1cf528
mulsd 0x29746b(%rip), %xmm0   # 0x3dab68
mulsd 0x29745b(%rip), %xmm0   # 0x3dab60
movq -0x30(%rbp), %rax
mulsd (%rax), %xmm0
movq -0x20(%rbp), %rax
mulsd 0x10(%rax), %xmm0
movq -0x20(%rbp), %rax
movsd (%rax), %xmm1
movsd 0x2973f2(%rip), %xmm3   # 0x3dab18
movq -0x20(%rbp), %rax
movsd 0x8(%rax), %xmm2
mulsd 0x2973d1(%rip), %xmm2   # 0x3dab08
movq %xmm2, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd -0x40(%rbp), %xmm1
mulsd -0x40(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x2973c0(%rip)   # 0x3dab30
movsd 0x297388(%rip), %xmm0   # 0x3dab00
movsd %xmm0, -0x40(%rbp)
movsd 0x4ac13(%rip), %xmm0    # 0x18e398
mulsd 0x8bda3(%rip), %xmm0    # 0x1cf530
mulsd 0x2973db(%rip), %xmm0   # 0x3dab70
movq -0x28(%rbp), %rax
mulsd (%rax), %xmm0
movq -0x18(%rbp), %rax
mulsd 0x10(%rax), %xmm0
movq -0x18(%rbp), %rax
movsd (%rax), %xmm1
movsd 0x297362(%rip), %xmm3   # 0x3dab18
movq -0x18(%rbp), %rax
movsd 0x8(%rax), %xmm2
mulsd 0x297341(%rip), %xmm2   # 0x3dab08
movq %xmm2, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd -0x40(%rbp), %xmm1
mulsd -0x40(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x297338(%rip)   # 0x3dab38
movsd 0x2972f0(%rip), %xmm0   # 0x3daaf8
movsd %xmm0, -0x40(%rbp)
movsd 0x4ab83(%rip), %xmm0    # 0x18e398
mulsd 0x8bd13(%rip), %xmm0    # 0x1cf530
mulsd 0x29734b(%rip), %xmm0   # 0x3dab70
movq -0x30(%rbp), %rax
mulsd (%rax), %xmm0
movq -0x20(%rbp), %rax
mulsd 0x10(%rax), %xmm0
movq -0x20(%rbp), %rax
movsd (%rax), %xmm1
movsd 0x2972d2(%rip), %xmm3   # 0x3dab18
movq -0x20(%rbp), %rax
movsd 0x8(%rax), %xmm2
mulsd 0x2972b1(%rip), %xmm2   # 0x3dab08
movq %xmm2, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd -0x40(%rbp), %xmm1
mulsd -0x40(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x297290(%rip)   # 0x3dab20
movsd 0x297268(%rip), %xmm0   # 0x3dab00
movsd %xmm0, -0x40(%rbp)
movsd 0x4aaf3(%rip), %xmm0    # 0x18e398
mulsd 0x8bc83(%rip), %xmm0    # 0x1cf530
mulsd 0x2972b3(%rip), %xmm0   # 0x3dab68
movq -0x28(%rbp), %rax
mulsd (%rax), %xmm0
movq -0x18(%rbp), %rax
mulsd 0x10(%rax), %xmm0
movq -0x18(%rbp), %rax
movsd (%rax), %xmm1
movsd 0x297232(%rip), %xmm3   # 0x3dab08
movq -0x18(%rbp), %rax
movsd 0x8(%rax), %xmm2
mulsd 0x297231(%rip), %xmm2   # 0x3dab18
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd -0x40(%rbp), %xmm1
mulsd -0x40(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x29721f(%rip)   # 0x3dab28
movsd 0x2971e7(%rip), %xmm0   # 0x3daaf8
movsd %xmm0, -0x40(%rbp)
movsd 0x4aa7a(%rip), %xmm0    # 0x18e398
mulsd 0x8bc0a(%rip), %xmm0    # 0x1cf530
mulsd 0x29723a(%rip), %xmm0   # 0x3dab68
movq -0x30(%rbp), %rax
mulsd (%rax), %xmm0
movq -0x20(%rbp), %rax
mulsd 0x10(%rax), %xmm0
movq -0x20(%rbp), %rax
movsd (%rax), %xmm1
movsd 0x2971b9(%rip), %xmm3   # 0x3dab08
movq -0x20(%rbp), %rax
movsd 0x8(%rax), %xmm2
mulsd 0x2971b8(%rip), %xmm2   # 0x3dab18
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd -0x40(%rbp), %xmm1
mulsd -0x40(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x29718e(%rip)   # 0x3dab10
movsd 0x2971b6(%rip), %xmm0   # 0x3dab40
addsd 0x29719e(%rip), %xmm0   # 0x3dab30
movsd %xmm0, 0x2971be(%rip)   # 0x3dab58
movsd 0x297196(%rip), %xmm0   # 0x3dab38
addsd 0x297176(%rip), %xmm0   # 0x3dab20
movsd %xmm0, 0x29719e(%rip)   # 0x3dab50
movsd 0x29716e(%rip), %xmm0   # 0x3dab28
addsd 0x29714e(%rip), %xmm0   # 0x3dab10
movsd %xmm0, 0x29717e(%rip)   # 0x3dab48
movsd 0x297186(%rip), %xmm1   # 0x3dab58
mulsd 0x29712e(%rip), %xmm1   # 0x3dab08
movsd 0x29717e(%rip), %xmm2   # 0x3dab60
movsd 0x29715e(%rip), %xmm0   # 0x3dab48
mulsd 0x297126(%rip), %xmm0   # 0x3dab18
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x297137(%rip), %xmm0   # 0x3dab50
mulsd 0x297147(%rip), %xmm0   # 0x3dab68
movsd 0x2970df(%rip), %xmm2   # 0x3dab08
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x38(%rbp), %rax
movsd %xmm0, (%rax)
movsd 0x297100(%rip), %xmm1   # 0x3dab58
mulsd 0x2970b8(%rip), %xmm1   # 0x3dab18
movsd 0x2970f8(%rip), %xmm2   # 0x3dab60
movsd 0x2970d8(%rip), %xmm0   # 0x3dab48
mulsd 0x297090(%rip), %xmm0   # 0x3dab08
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x2970c8(%rip), %xmm0   # 0x3dab50
mulsd 0x2970d8(%rip), %xmm0   # 0x3dab68
movsd 0x297080(%rip), %xmm2   # 0x3dab18
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x38(%rbp), %rax
movsd %xmm0, 0x8(%rax)
movsd 0x297090(%rip), %xmm0   # 0x3dab58
movsd 0x297098(%rip), %xmm2   # 0x3dab68
movsd 0x297078(%rip), %xmm1   # 0x3dab50
mulsd 0x297080(%rip), %xmm1   # 0x3dab60
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x38(%rbp), %rax
movsd %xmm0, 0x10(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)