// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: show_sun_rise_set(int, int)
void show_sun_rise_set(int row, int col)
{
char c1, c2, c3;
int color;
double mage;

   if(sunrise_type == 0) return;
   if(all_adevs) return;

   if(do_moonrise || (sunrise_type[0] == 0)) {
      c1 = c2 = c3 = ' ';
   }
   else c1 = c2 = c3 = tolower(sunrise_type[0]);

   if(sun_file && play_sun_song) {
      c2 = SONG_CHAR;
   }
   if(noon_file && play_sun_song) {
      c3 = SONG_CHAR;
   }

   if(have_sun_times & 0x01) color = WHITE;
   else                      color = GREY;
   if(do_moonrise) sprintf(out, "Moonrise: %02d:%02d:%02d%c", rise_hh,rise_mm,rise_ss,c2);
   else            sprintf(out, "Sunrise:  %02d:%02d:%02d%c", rise_hh,rise_mm,rise_ss,c2);
   if((zoom_screen == 0) && (row >= MOUSE_ROW)) return;
   vidstr(row++, col, color, out);

   if(have_sun_times & 0x02) color = WHITE;
   else                      color = GREY;
   if(do_moonrise) sprintf(out, "Transit:  %02d:%02d:%02d%c", noon_hh,noon_mm,noon_ss,c3);
   else            sprintf(out, "Sun noon: %02d:%02d:%02d%c", noon_hh,noon_mm,noon_ss,c3);
   if((zoom_screen == 0) && (row >= MOUSE_ROW)) return;
   vidstr(row++, col, color, out);

   if(have_sun_times & 0x04) color = WHITE;
   else                      color = GREY;
   if(do_moonrise) sprintf(out, "Moon set: %02d:%02d:%02d%c", set_hh,set_mm,set_ss,c1);
   else            sprintf(out, "Sunset:   %02d:%02d:%02d%c", set_hh,set_mm,set_ss,c1);
   if((zoom_screen == 0) && (row >= MOUSE_ROW)) return;
   vidstr(row++, col, color, out);

   if(do_moonrise) {
//    mage = MoonAge;
      if(new_moon_jd && (jd_utc >= new_moon_jd)) mage = (jd_utc - new_moon_jd);
      else if(MoonAge) mage = MoonAge;
      else mage = moon_age(jd_utc);
      sprintf(out, "Moon age: %8.5fd", mage); // moon_age(jd_utc));
   }
   else {
      eot(jd_utc); // uses NOAA algorithm, but seems a second or so off of NREL's numbers (which I don't fully trust, but included a fudge factor to make them match)
      sprintf(out, "EqTime:  %9.5fm", eot_ofs);
   }
   if((zoom_screen == 0) && (row >= MOUSE_ROW)) return;
   vidstr(row++, col, WHITE, out);

   if((zoom_screen == 0) && (row >= MOUSE_ROW)) return;
   if(zoom_screen == 'I') return;
   if((lat || lon) && ugals) {
      if(ugals > last_ugals) c1 = UP_ARROW;
      else if(ugals < last_ugals) c1 = DOWN_ARROW;
      else c1 = '=';
      sprintf(out, "uGals:   %9.5f%c", ugals,c1);
      vidstr(row++, col, WHITE, out);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, -0x30(%rbp)
movq %rdi, -0x38(%rbp)
leaq 0x25f07a(%rip), %rax    # 0x30d5c8
movq (%rax), %rax
testq %rax, %rax
je 0xae844
leaq 0x18e7dd(%rip), %rcx    # 0x23cd3e
cmpb $0x0, (%rcx)
jne 0xae844
leaq 0x25f10f(%rip), %rcx    # 0x30d680
movl $0x20, %r15d
cmpl $0x0, (%rcx)
je 0xae585
leaq 0x78107(%rip), %rbx     # 0x12668a
jmp 0xae59c
movsbl (%rax), %edi
leaq 0x78116(%rip), %rbx     # 0x1266a5
testl %edi, %edi
je 0xae59c
callq 0x9580
movsbl %al, %r15d
leaq 0x25fd22(%rip), %rax    # 0x30e2c5
leaq 0x25f00e(%rip), %rcx    # 0x30d5b8
movl (%rcx), %r13d
testl %r13d, %r13d
movl $0xe, %r12d
movl %r15d, %r9d
cmovnel %r12d, %r9d
cmpb $0x0, (%rax)
leaq 0x25fcff(%rip), %rax    # 0x30e2c6
movb (%rax), %al
movb %al, -0x29(%rbp)
leaq 0x25f075(%rip), %rax    # 0x30d648
movl (%rax), %r14d
leaq 0x25f023(%rip), %rax    # 0x30d600
movl (%rax), %edx
leaq 0x25f01e(%rip), %rax    # 0x30d604
movl (%rax), %ecx
leaq 0x25f019(%rip), %rax    # 0x30d608
movl (%rax), %r8d
cmovel %r15d, %r9d
leaq 0x28dc23(%rip), %rdi    # 0x33c220
movq %rbx, %rsi
xorl %eax, %eax
callq 0x9060
leaq 0x25e19a(%rip), %rax    # 0x30c7a8
cmpb $0x0, (%rax)
leaq 0x16a190(%rip), %rcx    # 0x2187a8
jne 0xae626
movq -0x38(%rbp), %rax
cmpl %eax, (%rcx)
jle 0xae844
movq -0x38(%rbp), %rdi
leal 0x1(%rdi), %eax
movl %eax, -0x3c(%rbp)
testb $0x1, %r14b
movl $0x8, %eax
movl $0xf, %ebx
movl $0xf, %edx
cmovel %eax, %edx
leaq 0x28dbd3(%rip), %rcx    # 0x33c220
movl -0x30(%rbp), %esi
callq 0xe787
testl %r13d, %r13d
cmovel %r15d, %r12d
cmpb $0x0, -0x29(%rbp)
leaq 0x25efe1(%rip), %rax    # 0x30d648
movl (%rax), %r14d
cmovel %r15d, %r12d
leaq 0x25f00b(%rip), %rax    # 0x30d680
cmpl $0x0, (%rax)
leaq 0x25efe9(%rip), %rax    # 0x30d668
movl (%rax), %edx
leaq 0x25efe4(%rip), %rax    # 0x30d66c
movl (%rax), %ecx
leaq 0x25efdf(%rip), %rax    # 0x30d670
movl (%rax), %r8d
leaq 0x78040(%rip), %rax     # 0x1266db
leaq 0x7801e(%rip), %rsi     # 0x1266c0
cmoveq %rax, %rsi
leaq 0x28db73(%rip), %rdi    # 0x33c220
movl %r12d, %r9d
xorl %eax, %eax
callq 0x9060
movl -0x3c(%rbp), %edi
leaq 0x16a0e7(%rip), %rax    # 0x2187a8
leaq 0x25e0e0(%rip), %rcx    # 0x30c7a8
cmpb $0x0, (%rcx)
jne 0xae6d5
cmpl (%rax), %edi
jge 0xae844
movq -0x38(%rbp), %rax
leal 0x2(%rax), %r12d
testb $0x2, %r14b
movl $0x8, %eax
cmovel %eax, %ebx
leaq 0x28db30(%rip), %r14    # 0x33c220
movl -0x30(%rbp), %esi
movl %ebx, %edx
movq %r14, %rcx
callq 0xe787
leaq 0x25ef44(%rip), %rax    # 0x30d648
movl (%rax), %ebx
leaq 0x25ef73(%rip), %rax    # 0x30d680
cmpl $0x0, (%rax)
leaq 0x25ef19(%rip), %rax    # 0x30d630
movl (%rax), %edx
leaq 0x25ef14(%rip), %rax    # 0x30d634
movl (%rax), %ecx
leaq 0x25ef0f(%rip), %rax    # 0x30d638
movl (%rax), %r8d
leaq 0x77fde(%rip), %rax     # 0x126711
leaq 0x77fbc(%rip), %rsi     # 0x1266f6
cmoveq %rax, %rsi
movq %r14, %rdi
movl %r15d, %r9d
xorl %eax, %eax
callq 0x9060
leaq 0x16a056(%rip), %rax    # 0x2187a8
leaq 0x25e04f(%rip), %rcx    # 0x30c7a8
cmpb $0x0, (%rcx)
jne 0xae767
cmpl (%rax), %r12d
jge 0xae844
testb $0x4, %bl
movl $0x8, %eax
movl $0xf, %edx
cmovel %eax, %edx
leaq 0x28daa2(%rip), %rcx    # 0x33c220
movl %r12d, %edi
movl -0x30(%rbp), %esi
callq 0xe787
leaq 0x25eef0(%rip), %rax    # 0x30d680
cmpl $0x0, (%rax)
je 0xae7e2
leaq 0x25effc(%rip), %rax    # 0x30d798
movsd (%rax), %xmm1
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jne 0xae7ac
jnp 0xae7bd
leaq 0x25ed7d(%rip), %rax    # 0x30d530
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jae 0xae80d
leaq 0x25f074(%rip), %rax    # 0x30d838
movsd (%rax), %xmm0
ucomisd %xmm2, %xmm0
jne 0xae811
jp 0xae811
leaq 0x25ed59(%rip), %rax    # 0x30d530
movsd (%rax), %xmm0
callq 0xe9c1c
jmp 0xae811
leaq 0x25ed47(%rip), %rax    # 0x30d530
movsd (%rax), %xmm0
callq 0xe1b1b
leaq 0x25edc7(%rip), %rax    # 0x30d5c0
movsd (%rax), %xmm0
leaq 0x28da1c(%rip), %rdi    # 0x33c220
leaq 0x77f32(%rip), %rsi     # 0x12673d
jmp 0xae81f
subsd %xmm1, %xmm0
leaq 0x28da08(%rip), %rdi    # 0x33c220
leaq 0x77f0d(%rip), %rsi     # 0x12672c
movb $0x1, %al
callq 0x9060
movq -0x38(%rbp), %rax
leal 0x3(%rax), %edi
leaq 0x25df74(%rip), %rdx    # 0x30c7a8
cmpb $0x0, (%rdx)
leaq 0x169f6a(%rip), %rax    # 0x2187a8
jne 0xae853
cmpl (%rax), %edi
jl 0xae853
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x38(%rbp), %rbx
addl $0x4, %ebx
movq %rax, %r15
leaq 0x28d9bc(%rip), %rcx    # 0x33c220
movl -0x30(%rbp), %esi
movq %rdx, %r14
movl $0xf, %edx
callq 0xe787
movb (%r14), %dl
testb %dl, %dl
sete %al
cmpl (%r15), %ebx
setge %cl
cmpb $0x49, %dl
je 0xae844
andb %cl, %al
jne 0xae844
leaq 0x25e73e(%rip), %rax    # 0x30cfd0
leaq 0x25e73f(%rip), %rcx    # 0x30cfd8
movsd (%rcx), %xmm0
xorpd %xmm1, %xmm1
movsd (%rax), %xmm2
cmpneqpd %xmm1, %xmm2
cmpneqpd %xmm1, %xmm0
orpd %xmm2, %xmm0
movd %xmm0, %eax
testb $0x1, %al
je 0xae844
leaq 0x25e76e(%rip), %rax    # 0x30d030
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jne 0xae8d2
jnp 0xae844
movq %rbx, %r14
leaq 0x25e75c(%rip), %rax    # 0x30d038
movsd (%rax), %xmm1
ucomisd %xmm0, %xmm1
movl $0x19, %eax
movl $0x3d, %ecx
cmoval %eax, %ecx
ucomisd %xmm1, %xmm0
movl $0x18, %edx
cmovbel %ecx, %edx
leaq 0x28d91c(%rip), %rbx    # 0x33c220
leaq 0x77e42(%rip), %rsi     # 0x12674d
movq %rbx, %rdi
movb $0x1, %al
callq 0x9060
movl %r14d, %edi
movl -0x30(%rbp), %esi
movl $0xf, %edx
movq %rbx, %rcx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe787