// File: 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
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
leaq 0x27fda3(%rip), %rax    # 0x36c7a8
cmpq $0x0, (%rax)
jne 0xeca10
jmp 0xecf6d
leaq 0x1af507(%rip), %rax    # 0x29bf1e
cmpb $0x0, (%rax)
je 0xeca21
jmp 0xecf6d
leaq 0x27fe38(%rip), %rax    # 0x36c860
cmpl $0x0, (%rax)
jne 0xeca3f
leaq 0x27fd74(%rip), %rax    # 0x36c7a8
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0xeca4d
movb $0x20, -0xb(%rbp)
movb $0x20, -0xa(%rbp)
movb $0x20, -0x9(%rbp)
jmp 0xeca68
leaq 0x27fd54(%rip), %rax    # 0x36c7a8
movq (%rax), %rax
movsbl (%rax), %edi
callq 0x9570
movb %al, -0xb(%rbp)
movb %al, -0xa(%rbp)
movb %al, -0x9(%rbp)
leaq 0x280a36(%rip), %rax    # 0x36d4a5
cmpb $0x0, (%rax)
je 0xeca84
leaq 0x27fd1d(%rip), %rax    # 0x36c798
cmpl $0x0, (%rax)
je 0xeca84
movb $0xe, -0xa(%rbp)
leaq 0x280a1b(%rip), %rax    # 0x36d4a6
cmpb $0x0, (%rax)
je 0xecaa0
leaq 0x27fd01(%rip), %rax    # 0x36c798
cmpl $0x0, (%rax)
je 0xecaa0
movb $0xe, -0xb(%rbp)
leaq 0x27fd81(%rip), %rax    # 0x36c828
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xecaba
movl $0xf, -0x10(%rbp)
jmp 0xecac1
movl $0x8, -0x10(%rbp)
leaq 0x27fd98(%rip), %rax    # 0x36c860
cmpl $0x0, (%rax)
je 0xecb05
leaq 0x27fd0c(%rip), %rax    # 0x36c7e0
movl (%rax), %edx
leaq 0x27fd07(%rip), %rax    # 0x36c7e4
movl (%rax), %ecx
leaq 0x27fd02(%rip), %rax    # 0x36c7e8
movl (%rax), %r8d
movsbl -0xa(%rbp), %r9d
leaq 0x2ae90b(%rip), %rdi    # 0x39b400
leaq 0x9cf27(%rip), %rsi     # 0x189a23
movb $0x0, %al
callq 0x9060
jmp 0xecb3b
leaq 0x27fcd4(%rip), %rax    # 0x36c7e0
movl (%rax), %edx
leaq 0x27fccf(%rip), %rax    # 0x36c7e4
movl (%rax), %ecx
leaq 0x27fcca(%rip), %rax    # 0x36c7e8
movl (%rax), %r8d
movsbl -0xa(%rbp), %r9d
leaq 0x2ae8d3(%rip), %rdi    # 0x39b400
leaq 0x9cf0a(%rip), %rsi     # 0x189a3e
movb $0x0, %al
callq 0x9060
leaq 0x27ee46(%rip), %rax    # 0x36b988
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0xecb5d
movl -0x4(%rbp), %eax
leaq 0x18ae34(%rip), %rcx    # 0x277988
cmpl (%rcx), %eax
jl 0xecb5d
jmp 0xecf6d
movl -0x4(%rbp), %edi
movl %edi, %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
movl -0x8(%rbp), %esi
movl -0x10(%rbp), %eax
leaq 0x2ae88b(%rip), %rcx    # 0x39b400
movzbl %al, %edx
callq 0x10ee0
leaq 0x27fca4(%rip), %rax    # 0x36c828
movl (%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0xecb97
movl $0xf, -0x10(%rbp)
jmp 0xecb9e
movl $0x8, -0x10(%rbp)
leaq 0x27fcbb(%rip), %rax    # 0x36c860
cmpl $0x0, (%rax)
je 0xecbe2
leaq 0x27fc97(%rip), %rax    # 0x36c848
movl (%rax), %edx
leaq 0x27fc92(%rip), %rax    # 0x36c84c
movl (%rax), %ecx
leaq 0x27fc8d(%rip), %rax    # 0x36c850
movl (%rax), %r8d
movsbl -0xb(%rbp), %r9d
leaq 0x2ae82e(%rip), %rdi    # 0x39b400
leaq 0x9ce80(%rip), %rsi     # 0x189a59
movb $0x0, %al
callq 0x9060
jmp 0xecc18
leaq 0x27fc5f(%rip), %rax    # 0x36c848
movl (%rax), %edx
leaq 0x27fc5a(%rip), %rax    # 0x36c84c
movl (%rax), %ecx
leaq 0x27fc55(%rip), %rax    # 0x36c850
movl (%rax), %r8d
movsbl -0xb(%rbp), %r9d
leaq 0x2ae7f6(%rip), %rdi    # 0x39b400
leaq 0x9ce63(%rip), %rsi     # 0x189a74
movb $0x0, %al
callq 0x9060
leaq 0x27ed69(%rip), %rax    # 0x36b988
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0xecc3a
movl -0x4(%rbp), %eax
leaq 0x18ad57(%rip), %rcx    # 0x277988
cmpl (%rcx), %eax
jl 0xecc3a
jmp 0xecf6d
movl -0x4(%rbp), %edi
movl %edi, %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
movl -0x8(%rbp), %esi
movl -0x10(%rbp), %eax
leaq 0x2ae7ae(%rip), %rcx    # 0x39b400
movzbl %al, %edx
callq 0x10ee0
leaq 0x27fbc7(%rip), %rax    # 0x36c828
movl (%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0xecc74
movl $0xf, -0x10(%rbp)
jmp 0xecc7b
movl $0x8, -0x10(%rbp)
leaq 0x27fbde(%rip), %rax    # 0x36c860
cmpl $0x0, (%rax)
je 0xeccbf
leaq 0x27fb82(%rip), %rax    # 0x36c810
movl (%rax), %edx
leaq 0x27fb7d(%rip), %rax    # 0x36c814
movl (%rax), %ecx
leaq 0x27fb78(%rip), %rax    # 0x36c818
movl (%rax), %r8d
movsbl -0x9(%rbp), %r9d
leaq 0x2ae751(%rip), %rdi    # 0x39b400
leaq 0x9cdd9(%rip), %rsi     # 0x189a8f
movb $0x0, %al
callq 0x9060
jmp 0xeccf5
leaq 0x27fb4a(%rip), %rax    # 0x36c810
movl (%rax), %edx
leaq 0x27fb45(%rip), %rax    # 0x36c814
movl (%rax), %ecx
leaq 0x27fb40(%rip), %rax    # 0x36c818
movl (%rax), %r8d
movsbl -0x9(%rbp), %r9d
leaq 0x2ae719(%rip), %rdi    # 0x39b400
leaq 0x9cdbc(%rip), %rsi     # 0x189aaa
movb $0x0, %al
callq 0x9060
leaq 0x27ec8c(%rip), %rax    # 0x36b988
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0xecd17
movl -0x4(%rbp), %eax
leaq 0x18ac7a(%rip), %rcx    # 0x277988
cmpl (%rcx), %eax
jl 0xecd17
jmp 0xecf6d
movl -0x4(%rbp), %edi
movl %edi, %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
movl -0x8(%rbp), %esi
movl -0x10(%rbp), %eax
leaq 0x2ae6d1(%rip), %rcx    # 0x39b400
movzbl %al, %edx
callq 0x10ee0
leaq 0x27fb22(%rip), %rax    # 0x36c860
cmpl $0x0, (%rax)
je 0xecdf1
leaq 0x27fc2a(%rip), %rax    # 0x36c978
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xecd5f
jp 0xecd5f
jmp 0xecd94
leaq 0x27f9aa(%rip), %rax    # 0x36c710
movsd (%rax), %xmm0
leaq 0x27fc07(%rip), %rax    # 0x36c978
ucomisd (%rax), %xmm0
jb 0xecd94
leaq 0x27f992(%rip), %rax    # 0x36c710
movsd (%rax), %xmm0
leaq 0x27fbef(%rip), %rax    # 0x36c978
subsd (%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
jmp 0xecdd5
leaq 0x27fc7d(%rip), %rax    # 0x36ca18
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xecdac
jp 0xecdac
jmp 0xecdbe
leaq 0x27fc65(%rip), %rax    # 0x36ca18
movsd (%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
jmp 0xecdd3
leaq 0x27f94b(%rip), %rax    # 0x36c710
movsd (%rax), %xmm0
callq 0x13f170
movsd %xmm0, -0x18(%rbp)
jmp 0xecdd5
movsd -0x18(%rbp), %xmm0
leaq 0x2ae61f(%rip), %rdi    # 0x39b400
leaq 0x9ccdd(%rip), %rsi     # 0x189ac5
movb $0x1, %al
callq 0x9060
jmp 0xece21
leaq 0x27f918(%rip), %rax    # 0x36c710
movsd (%rax), %xmm0
callq 0x134540
leaq 0x27f998(%rip), %rax    # 0x36c7a0
movsd (%rax), %xmm0
leaq 0x2ae5ed(%rip), %rdi    # 0x39b400
leaq 0x9ccbc(%rip), %rsi     # 0x189ad6
movb $0x1, %al
callq 0x9060
leaq 0x27eb60(%rip), %rax    # 0x36b988
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0xece43
movl -0x4(%rbp), %eax
leaq 0x18ab4e(%rip), %rcx    # 0x277988
cmpl (%rcx), %eax
jl 0xece43
jmp 0xecf6d
movl -0x4(%rbp), %edi
movl %edi, %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
movl -0x8(%rbp), %esi
movl $0xf, %edx
leaq 0x2ae5a3(%rip), %rcx    # 0x39b400
callq 0x10ee0
leaq 0x27eb1f(%rip), %rax    # 0x36b988
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0xece84
movl -0x4(%rbp), %eax
leaq 0x18ab0d(%rip), %rcx    # 0x277988
cmpl (%rcx), %eax
jl 0xece84
jmp 0xecf6d
leaq 0x27eafd(%rip), %rax    # 0x36b988
movzbl (%rax), %eax
cmpl $0x49, %eax
jne 0xece98
jmp 0xecf6d
leaq 0x27f311(%rip), %rax    # 0x36c1b0
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xecec9
jp 0xecec9
leaq 0x27f303(%rip), %rax    # 0x36c1b8
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xecec9
jp 0xecec9
jmp 0xecf6d
leaq 0x27f340(%rip), %rax    # 0x36c210
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xecee4
jp 0xecee4
jmp 0xecf6d
leaq 0x27f325(%rip), %rax    # 0x36c210
movsd (%rax), %xmm0
leaq 0x27f322(%rip), %rax    # 0x36c218
ucomisd (%rax), %xmm0
jbe 0xecf02
movb $0x18, -0x9(%rbp)
jmp 0xecf2a
leaq 0x27f307(%rip), %rax    # 0x36c210
movsd (%rax), %xmm1
leaq 0x27f304(%rip), %rax    # 0x36c218
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xecf24
movb $0x19, -0x9(%rbp)
jmp 0xecf28
movb $0x3d, -0x9(%rbp)
jmp 0xecf2a
leaq 0x27f2df(%rip), %rax    # 0x36c210
movsd (%rax), %xmm0
movsbl -0x9(%rbp), %edx
leaq 0x2ae4c0(%rip), %rdi    # 0x39b400
leaq 0x9cb9f(%rip), %rsi     # 0x189ae6
movb $0x1, %al
callq 0x9060
movl -0x4(%rbp), %edi
movl %edi, %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
movl -0x8(%rbp), %esi
movl $0xf, %edx
leaq 0x2ae498(%rip), %rcx    # 0x39b400
callq 0x10ee0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)