// File: /workspace/github_cpp_makefile_star2_O1/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 0x25f32e(%rip), %rax    # 0x30d5c8
movq (%rax), %rax
testq %rax, %rax
je 0xae590
leaq 0x18ea91(%rip), %rcx    # 0x23cd3e
cmpb $0x0, (%rcx)
jne 0xae590
leaq 0x25f3c3(%rip), %rcx    # 0x30d680
movl $0x20, %r15d
cmpl $0x0, (%rcx)
je 0xae2d1
leaq 0x782db(%rip), %rbx     # 0x1265aa
jmp 0xae2e8
movsbl (%rax), %edi
leaq 0x782ea(%rip), %rbx     # 0x1265c5
testl %edi, %edi
je 0xae2e8
callq 0x9580
movsbl %al, %r15d
leaq 0x25ffd6(%rip), %rax    # 0x30e2c5
leaq 0x25f2c2(%rip), %rcx    # 0x30d5b8
movl (%rcx), %r13d
testl %r13d, %r13d
movl $0xe, %r12d
movl %r15d, %r9d
cmovnel %r12d, %r9d
cmpb $0x0, (%rax)
leaq 0x25ffb3(%rip), %rax    # 0x30e2c6
movb (%rax), %al
movb %al, -0x29(%rbp)
leaq 0x25f329(%rip), %rax    # 0x30d648
movl (%rax), %r14d
leaq 0x25f2d7(%rip), %rax    # 0x30d600
movl (%rax), %edx
leaq 0x25f2d2(%rip), %rax    # 0x30d604
movl (%rax), %ecx
leaq 0x25f2cd(%rip), %rax    # 0x30d608
movl (%rax), %r8d
cmovel %r15d, %r9d
leaq 0x28ded7(%rip), %rdi    # 0x33c220
movq %rbx, %rsi
xorl %eax, %eax
callq 0x9060
leaq 0x25e44e(%rip), %rax    # 0x30c7a8
cmpb $0x0, (%rax)
leaq 0x16a444(%rip), %rcx    # 0x2187a8
jne 0xae372
movq -0x38(%rbp), %rax
cmpl %eax, (%rcx)
jle 0xae590
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 0x28de87(%rip), %rcx    # 0x33c220
movl -0x30(%rbp), %esi
callq 0xe7d0
testl %r13d, %r13d
cmovel %r15d, %r12d
cmpb $0x0, -0x29(%rbp)
leaq 0x25f295(%rip), %rax    # 0x30d648
movl (%rax), %r14d
cmovel %r15d, %r12d
leaq 0x25f2bf(%rip), %rax    # 0x30d680
cmpl $0x0, (%rax)
leaq 0x25f29d(%rip), %rax    # 0x30d668
movl (%rax), %edx
leaq 0x25f298(%rip), %rax    # 0x30d66c
movl (%rax), %ecx
leaq 0x25f293(%rip), %rax    # 0x30d670
movl (%rax), %r8d
leaq 0x78214(%rip), %rax     # 0x1265fb
leaq 0x781f2(%rip), %rsi     # 0x1265e0
cmoveq %rax, %rsi
leaq 0x28de27(%rip), %rdi    # 0x33c220
movl %r12d, %r9d
xorl %eax, %eax
callq 0x9060
movl -0x3c(%rbp), %edi
leaq 0x16a39b(%rip), %rax    # 0x2187a8
leaq 0x25e394(%rip), %rcx    # 0x30c7a8
cmpb $0x0, (%rcx)
jne 0xae421
cmpl (%rax), %edi
jge 0xae590
movq -0x38(%rbp), %rax
leal 0x2(%rax), %r12d
testb $0x2, %r14b
movl $0x8, %eax
cmovel %eax, %ebx
leaq 0x28dde4(%rip), %r14    # 0x33c220
movl -0x30(%rbp), %esi
movl %ebx, %edx
movq %r14, %rcx
callq 0xe7d0
leaq 0x25f1f8(%rip), %rax    # 0x30d648
movl (%rax), %ebx
leaq 0x25f227(%rip), %rax    # 0x30d680
cmpl $0x0, (%rax)
leaq 0x25f1cd(%rip), %rax    # 0x30d630
movl (%rax), %edx
leaq 0x25f1c8(%rip), %rax    # 0x30d634
movl (%rax), %ecx
leaq 0x25f1c3(%rip), %rax    # 0x30d638
movl (%rax), %r8d
leaq 0x781b2(%rip), %rax     # 0x126631
leaq 0x78190(%rip), %rsi     # 0x126616
cmoveq %rax, %rsi
movq %r14, %rdi
movl %r15d, %r9d
xorl %eax, %eax
callq 0x9060
leaq 0x16a30a(%rip), %rax    # 0x2187a8
leaq 0x25e303(%rip), %rcx    # 0x30c7a8
cmpb $0x0, (%rcx)
jne 0xae4b3
cmpl (%rax), %r12d
jge 0xae590
testb $0x4, %bl
movl $0x8, %eax
movl $0xf, %edx
cmovel %eax, %edx
leaq 0x28dd56(%rip), %rcx    # 0x33c220
movl %r12d, %edi
movl -0x30(%rbp), %esi
callq 0xe7d0
leaq 0x25f1a4(%rip), %rax    # 0x30d680
cmpl $0x0, (%rax)
je 0xae52e
leaq 0x25f2b0(%rip), %rax    # 0x30d798
movsd (%rax), %xmm1
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jne 0xae4f8
jnp 0xae509
leaq 0x25f031(%rip), %rax    # 0x30d530
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jae 0xae559
leaq 0x25f328(%rip), %rax    # 0x30d838
movsd (%rax), %xmm0
ucomisd %xmm2, %xmm0
jne 0xae55d
jp 0xae55d
leaq 0x25f00d(%rip), %rax    # 0x30d530
movsd (%rax), %xmm0
callq 0xe91a6
jmp 0xae55d
leaq 0x25effb(%rip), %rax    # 0x30d530
movsd (%rax), %xmm0
callq 0xe0fbe
leaq 0x25f07b(%rip), %rax    # 0x30d5c0
movsd (%rax), %xmm0
leaq 0x28dcd0(%rip), %rdi    # 0x33c220
leaq 0x78106(%rip), %rsi     # 0x12665d
jmp 0xae56b
subsd %xmm1, %xmm0
leaq 0x28dcbc(%rip), %rdi    # 0x33c220
leaq 0x780e1(%rip), %rsi     # 0x12664c
movb $0x1, %al
callq 0x9060
movq -0x38(%rbp), %rax
leal 0x3(%rax), %edi
leaq 0x25e228(%rip), %rdx    # 0x30c7a8
cmpb $0x0, (%rdx)
leaq 0x16a21e(%rip), %rax    # 0x2187a8
jne 0xae59f
cmpl (%rax), %edi
jl 0xae59f
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 0x28dc70(%rip), %rcx    # 0x33c220
movl -0x30(%rbp), %esi
movq %rdx, %r14
movl $0xf, %edx
callq 0xe7d0
movb (%r14), %dl
testb %dl, %dl
sete %al
cmpl (%r15), %ebx
setge %cl
cmpb $0x49, %dl
je 0xae590
andb %cl, %al
jne 0xae590
leaq 0x25e9f2(%rip), %rax    # 0x30cfd0
leaq 0x25e9f3(%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 0xae590
leaq 0x25ea22(%rip), %rax    # 0x30d030
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jne 0xae61e
jnp 0xae590
movq %rbx, %r14
leaq 0x25ea10(%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 0x28dbd0(%rip), %rbx    # 0x33c220
leaq 0x78016(%rip), %rsi     # 0x12666d
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 0xe7d0