// File: /workspace/github_cpp_makefile_star2_O3/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
xorl %eax, %eax
movl %eax, 0x284d10(%rip)    # 0x379d70
movl %eax, 0x284d0e(%rip)    # 0x379d74
leaq 0x21875b(%rip), %rcx    # 0x30d7c8
leaq 0x218744(%rip), %rdx    # 0x30d7b8
movsd (%rdx), %xmm0
cmpl %eax, (%rcx)
je 0xf50bd
leaq 0x21873d(%rip), %rax    # 0x30d7c0
movsd (%rax), %xmm1
xorpd %xmm2, %xmm2
ucomisd %xmm1, %xmm2
jbe 0xf50a0
ucomisd %xmm2, %xmm0
jb 0xf50a0
leaq 0x284cd6(%rip), %rax    # 0x379d74
jmp 0xf50b7
ucomisd %xmm2, %xmm1
jb 0xf50bd
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jbe 0xf50bd
leaq 0x284cb9(%rip), %rax    # 0x379d70
movl $0x1, (%rax)
leaq 0x2186fc(%rip), %rax    # 0x30d7c0
movsd %xmm0, (%rax)
leaq 0x218701(%rip), %rax    # 0x30d7d0
cvtsd2ss (%rax), %xmm3
leaq 0x149ed6(%rip), %rax    # 0x23efb0
movl $0x1, 0xcd15c(%rax)
movss %xmm3, 0xcd348(%rax)
xorpd %xmm1, %xmm1
xorl %edx, %edx
ucomisd %xmm1, %xmm0
setae %dl
xorps %xmm2, %xmm2
cvtsd2ss %xmm0, %xmm2
leaq 0x37651(%rip), %rcx     # 0x12c758
movss (%rcx,%rdx,4), %xmm0
movss %xmm0, 0xcd160(%rax)
movl %edx, 0xcd358(%rax)
movss 0x17f62(%rip), %xmm0    # 0x10d084
movaps %xmm0, %xmm4
minss %xmm2, %xmm4
movss 0x298f7(%rip), %xmm2    # 0x11ea28
movaps %xmm2, %xmm5
maxss %xmm4, %xmm5
movss %xmm5, 0xcd34c(%rax)
ucomiss 0x298e5(%rip), %xmm3    # 0x11ea2c
jbe 0xf5159
addss 0x37693(%rip), %xmm3    # 0x12c7e4
movss %xmm3, 0xcd348(%rax)
leaq 0x218688(%rip), %rdx    # 0x30d7e8
xorps %xmm3, %xmm3
cvtsd2ss (%rdx), %xmm3
movl $0x1, 0xcd4a4(%rax)
movss %xmm3, 0xcd690(%rax)
leaq 0x218670(%rip), %rdx    # 0x30d7f0
movsd (%rdx), %xmm4
xorl %edx, %edx
ucomisd %xmm1, %xmm4
setae %dl
xorps %xmm1, %xmm1
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 0x2986e(%rip), %xmm3    # 0x11ea2c
jbe 0xf51d0
addss 0x3761c(%rip), %xmm3    # 0x12c7e4
movss %xmm3, 0xcd690(%rax)
popq %rbp
retq