// File: /workspace/github_cpp_makefile_star2_O2/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 0x2590fe(%rip), %rax    # 0x2f75c8
movq (%rax), %rax
testq %rax, %rax
je 0x9e7a9
leaq 0x188861(%rip), %rcx    # 0x226d3e
cmpb $0x0, (%rcx)
jne 0x9e7a9
leaq 0x259193(%rip), %rcx    # 0x2f7680
pushq $0x20
popq %r15
cmpl $0x0, (%rcx)
je 0x9e4ff
leaq 0x720d2(%rip), %rbx     # 0x1105cf
jmp 0x9e516
movsbl (%rax), %edi
leaq 0x720e1(%rip), %rbx     # 0x1105ea
testl %edi, %edi
je 0x9e516
callq 0x9580
movsbl %al, %r15d
leaq 0x259da8(%rip), %rax    # 0x2f82c5
leaq 0x259094(%rip), %rcx    # 0x2f75b8
movl (%rcx), %r12d
testl %r12d, %r12d
pushq $0xe
popq %r13
movl %r15d, %r9d
cmovnel %r13d, %r9d
cmpb $0x0, (%rax)
leaq 0x259d87(%rip), %rax    # 0x2f82c6
movb (%rax), %al
movb %al, -0x29(%rbp)
leaq 0x2590fd(%rip), %rax    # 0x2f7648
movl (%rax), %r14d
leaq 0x2590ab(%rip), %rax    # 0x2f7600
movl (%rax), %edx
leaq 0x2590a6(%rip), %rax    # 0x2f7604
movl (%rax), %ecx
leaq 0x2590a1(%rip), %rax    # 0x2f7608
movl (%rax), %r8d
cmovel %r15d, %r9d
leaq 0x287cab(%rip), %rdi    # 0x326220
movq %rbx, %rsi
xorl %eax, %eax
callq 0x9060
leaq 0x258222(%rip), %rax    # 0x2f67a8
cmpb $0x0, (%rax)
leaq 0x164218(%rip), %rcx    # 0x2027a8
jne 0x9e59e
movq -0x38(%rbp), %rax
cmpl %eax, (%rcx)
jle 0x9e7a9
movq -0x38(%rbp), %rdi
leal 0x1(%rdi), %ebx
testb $0x1, %r14b
pushq $0x8
popq %rax
pushq $0xf
popq %rdx
cmovel %eax, %edx
leaq 0x287c67(%rip), %r14    # 0x326220
movl -0x30(%rbp), %esi
movq %r14, %rcx
callq 0xe2d2
testl %r12d, %r12d
cmovel %r15d, %r13d
cmpb $0x0, -0x29(%rbp)
leaq 0x259072(%rip), %rax    # 0x2f7648
movl (%rax), %r12d
cmovel %r15d, %r13d
leaq 0x25909c(%rip), %rax    # 0x2f7680
cmpl $0x0, (%rax)
leaq 0x25907a(%rip), %rax    # 0x2f7668
movl (%rax), %edx
leaq 0x259075(%rip), %rax    # 0x2f766c
movl (%rax), %ecx
leaq 0x259070(%rip), %rax    # 0x2f7670
movl (%rax), %r8d
leaq 0x72016(%rip), %rax     # 0x110620
leaq 0x71ff4(%rip), %rsi     # 0x110605
cmoveq %rax, %rsi
movq %r14, %rdi
movl %r13d, %r9d
xorl %eax, %eax
callq 0x9060
leaq 0x16417f(%rip), %rax    # 0x2027a8
leaq 0x258178(%rip), %rcx    # 0x2f67a8
cmpb $0x0, (%rcx)
jne 0x9e63d
cmpl (%rax), %ebx
jge 0x9e7a9
movq -0x38(%rbp), %rax
leal 0x2(%rax), %r13d
testb $0x2, %r12b
pushq $0xf
popq %rdx
pushq $0x8
popq %rax
cmovel %eax, %edx
leaq 0x287bc7(%rip), %r14    # 0x326220
movl %ebx, %edi
movl -0x30(%rbp), %esi
movq %r14, %rcx
callq 0xe2d2
leaq 0x258fdb(%rip), %rax    # 0x2f7648
movl (%rax), %ebx
leaq 0x25900a(%rip), %rax    # 0x2f7680
cmpl $0x0, (%rax)
leaq 0x258fb0(%rip), %rax    # 0x2f7630
movl (%rax), %edx
leaq 0x258fab(%rip), %rax    # 0x2f7634
movl (%rax), %ecx
leaq 0x258fa6(%rip), %rax    # 0x2f7638
movl (%rax), %r8d
leaq 0x71fba(%rip), %rax     # 0x110656
leaq 0x71f98(%rip), %rsi     # 0x11063b
cmoveq %rax, %rsi
movq %r14, %rdi
movl %r15d, %r9d
xorl %eax, %eax
callq 0x9060
leaq 0x1640ed(%rip), %rax    # 0x2027a8
leaq 0x2580e6(%rip), %rcx    # 0x2f67a8
cmpb $0x0, (%rcx)
jne 0x9e6d0
cmpl (%rax), %r13d
jge 0x9e7a9
testb $0x4, %bl
pushq $0xf
popq %rdx
pushq $0x8
popq %rax
cmovel %eax, %edx
leaq 0x287b3d(%rip), %rcx    # 0x326220
movl %r13d, %edi
movl -0x30(%rbp), %esi
callq 0xe2d2
leaq 0x258f8b(%rip), %rax    # 0x2f7680
cmpl $0x0, (%rax)
je 0x9e747
leaq 0x259097(%rip), %rax    # 0x2f7798
movsd (%rax), %xmm1
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jne 0x9e711
jnp 0x9e722
leaq 0x258e18(%rip), %rax    # 0x2f7530
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jae 0x9e772
leaq 0x25910f(%rip), %rax    # 0x2f7838
movsd (%rax), %xmm0
ucomisd %xmm2, %xmm0
jne 0x9e776
jp 0x9e776
leaq 0x258df4(%rip), %rax    # 0x2f7530
movsd (%rax), %xmm0
callq 0xd563a
jmp 0x9e776
leaq 0x258de2(%rip), %rax    # 0x2f7530
movsd (%rax), %xmm0
callq 0xce933
leaq 0x258e62(%rip), %rax    # 0x2f75c0
movsd (%rax), %xmm0
leaq 0x287ab7(%rip), %rdi    # 0x326220
leaq 0x71f12(%rip), %rsi     # 0x110682
jmp 0x9e784
subsd %xmm1, %xmm0
leaq 0x287aa3(%rip), %rdi    # 0x326220
leaq 0x71eed(%rip), %rsi     # 0x110671
movb $0x1, %al
callq 0x9060
movq -0x38(%rbp), %rax
leal 0x3(%rax), %edi
leaq 0x25800f(%rip), %rdx    # 0x2f67a8
cmpb $0x0, (%rdx)
leaq 0x164005(%rip), %rax    # 0x2027a8
jne 0x9e7b8
cmpl (%rax), %edi
jl 0x9e7b8
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 0x287a57(%rip), %rcx    # 0x326220
movq %rdx, %r14
pushq $0xf
popq %rdx
movl -0x30(%rbp), %esi
callq 0xe2d2
movb (%r14), %dl
testb %dl, %dl
sete %al
cmpl (%r15), %ebx
setge %cl
cmpb $0x49, %dl
je 0x9e7a9
andb %cl, %al
jne 0x9e7a9
leaq 0x2587db(%rip), %rax    # 0x2f6fd0
leaq 0x2587dc(%rip), %rcx    # 0x2f6fd8
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 0x9e7a9
leaq 0x25880b(%rip), %rax    # 0x2f7030
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jne 0x9e835
jnp 0x9e7a9
movq %rbx, %r14
leaq 0x2587f9(%rip), %rax    # 0x2f7038
movsd (%rax), %xmm1
ucomisd %xmm0, %xmm1
pushq $0x19
popq %rax
pushq $0x3d
popq %rcx
cmoval %eax, %ecx
ucomisd %xmm1, %xmm0
pushq $0x18
popq %rdx
cmovbel %ecx, %edx
leaq 0x2879bf(%rip), %rbx    # 0x326220
leaq 0x71e2a(%rip), %rsi     # 0x110692
movq %rbx, %rdi
movb $0x1, %al
callq 0x9060
pushq $0xf
popq %rdx
movl %r14d, %edi
movl -0x30(%rbp), %esi
movq %rbx, %rcx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe2d2