// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathmsc.cpp
// Function: log_sun_posn()
void log_sun_posn()
{
   // record the position of the sun (as satellite PRN 1000)

   sunrise = sunset = 0;
   if(have_sun_el == 0) ;
   else if((last_sun_el < 0.0) && (sun_el >= 0.0)) sunrise = 1;
   else if((last_sun_el >= 0.0) && (sun_el < 0.0)) sunset = 1;
   last_sun_el = sun_el;

   sat[SUN_PRN].level_msg = 1;
   sat[SUN_PRN].sig_level = (-1.0);
   sat[SUN_PRN].azimuth = (float) sun_az;
   if(sun_el >= 0.0) {
      sat[SUN_PRN].elevation = (float) sun_el;
      sat[SUN_PRN].sig_level = (40.0F);
      sat[SUN_PRN].tracking = 1;
   }
   else {
      sat[SUN_PRN].elevation = 0.0F - (float) sun_el;
      sat[SUN_PRN].sig_level = (-40.0F);
      sat[SUN_PRN].tracking = 0;
   }
sat[SUN_PRN].elevation = (float) sun_el;
   if(sat[SUN_PRN].elevation > 90.0) sat[SUN_PRN].elevation = 90.0;
   if(sat[SUN_PRN].elevation < -90.0) sat[SUN_PRN].elevation = -90.0;
   if(sat[SUN_PRN].azimuth > 360.0) sat[SUN_PRN].azimuth -= 360.0;


   sat[MOON_PRN].level_msg = 1;
   sat[MOON_PRN].sig_level = (-1.0);
   sat[MOON_PRN].azimuth = (float) moon_az;
   if(moon_el >= 0.0) {
      sat[MOON_PRN].elevation = (float) moon_el;
      sat[MOON_PRN].sig_level = (40.0F);
      sat[MOON_PRN].tracking = 1;
   }
   else {
      sat[MOON_PRN].elevation = 0.0F - (float) moon_el;
      sat[MOON_PRN].sig_level = (-40.0F);
      sat[MOON_PRN].tracking = 0;
   }

sat[MOON_PRN].elevation = (float) moon_el;
   if(sat[MOON_PRN].elevation > 90.0) sat[MOON_PRN].elevation = 90.0;
   if(sat[MOON_PRN].elevation < -90.0) sat[MOON_PRN].elevation = -90.0;
   if(sat[MOON_PRN].azimuth > 360.0) sat[MOON_PRN].azimuth -= 360.0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
andl $0x0, 0x284250(%rip)    # 0x363d70
andl $0x0, 0x28424d(%rip)    # 0x363d74
leaq 0x217c9a(%rip), %rax    # 0x2f77c8
xorl %ecx, %ecx
leaq 0x217c81(%rip), %rdx    # 0x2f77b8
movsd (%rdx), %xmm0
cmpl %ecx, (%rax)
je 0xdfb80
leaq 0x217c7a(%rip), %rax    # 0x2f77c0
movsd (%rax), %xmm1
xorpd %xmm2, %xmm2
ucomisd %xmm1, %xmm2
jbe 0xdfb63
ucomisd %xmm2, %xmm0
jb 0xdfb63
leaq 0x284213(%rip), %rax    # 0x363d74
jmp 0xdfb7a
ucomisd %xmm2, %xmm1
jb 0xdfb80
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jbe 0xdfb80
leaq 0x2841f6(%rip), %rax    # 0x363d70
movl $0x1, (%rax)
leaq 0x217c39(%rip), %rax    # 0x2f77c0
movsd %xmm0, (%rax)
leaq 0x217c3e(%rip), %rax    # 0x2f77d0
cvtsd2ss (%rax), %xmm3
leaq 0x149413(%rip), %rax    # 0x228fb0
movl $0x1, 0xcd15c(%rax)
movss %xmm3, 0xcd348(%rax)
xorpd %xmm1, %xmm1
xorl %edx, %edx
ucomisd %xmm1, %xmm0
setae %dl
cvtsd2ss %xmm0, %xmm2
leaq 0x36ab1(%rip), %rcx     # 0x116678
movss (%rcx,%rdx,4), %xmm0
movss %xmm0, 0xcd160(%rax)
movl %edx, 0xcd358(%rax)
movss 0x17522(%rip), %xmm0    # 0xf7104
movaps %xmm0, %xmm4
minss %xmm2, %xmm4
movss 0x28daf(%rip), %xmm2    # 0x1089a0
movaps %xmm2, %xmm5
maxss %xmm4, %xmm5
movss %xmm5, 0xcd34c(%rax)
ucomiss 0x28d9d(%rip), %xmm3    # 0x1089a4
jbe 0xdfc19
addss 0x36af3(%rip), %xmm3    # 0x116704
movss %xmm3, 0xcd348(%rax)
leaq 0x217bc8(%rip), %rdx    # 0x2f77e8
cvtsd2ss (%rdx), %xmm3
movl $0x1, 0xcd4a4(%rax)
movss %xmm3, 0xcd690(%rax)
leaq 0x217bb3(%rip), %rdx    # 0x2f77f0
movsd (%rdx), %xmm4
xorl %edx, %edx
ucomisd %xmm1, %xmm4
setae %dl
cvtsd2ss %xmm4, %xmm1
movss (%rcx,%rdx,4), %xmm4
movss %xmm4, 0xcd4a8(%rax)
movl %edx, 0xcd6a0(%rax)
minss %xmm1, %xmm0
maxss %xmm0, %xmm2
movss %xmm2, 0xcd694(%rax)
ucomiss 0x28d2c(%rip), %xmm3    # 0x1089a4
jbe 0xdfc8a
addss 0x36a82(%rip), %xmm3    # 0x116704
movss %xmm3, 0xcd690(%rax)
popq %rbp
retq