// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: adjust_screen_options()
int adjust_screen_options()
{
int stm;
int old_azel;

   stm = 0;   // set text mode
   old_azel = plot_azel;

// plot_signals = 0;
   if(screen_type == 't') {  // text mode
      plot_azel = 0;
      stm = 2;
   }
   else if(screen_type == 'z') ; // plot_azel = AZEL_OK;
   else if(screen_type == 'h') ; // plot_azel = AZEL_OK;
   else if(screen_type == 'x') ; // plot_azel = AZEL_OK;
   else if(screen_type == 'v') ; // plot_azel = AZEL_OK;
   else if(screen_type == 'l') ; // plot_azel = AZEL_OK;
   else if(screen_type == 'k') ; // plot_azel = AZEL_OK;
   else if(screen_type == 'j') ; // plot_azel = AZEL_OK;
   else if(screen_type == 'm') ; // plot_azel = 0;
   else if(screen_type == 'n') ; // plot_azel = 0;   // netbook
   else if(screen_type == 'p') ; // plot_azel = 0;   // Raspberry pi touchscreen
   else if(screen_type == 'r') ; // plot_azel = 0;   // Reduced screen size
   else if(screen_type == 's') ; // plot_azel = 0;
   else if(screen_type == 'u') ; // plot_azel = 0;
   else if(screen_type == 'c') ; // plot_azel = 0;   //!!! custom screen
   else if(screen_type == 'd') {
      if(rcvr_type == NO_RCVR) {
         plot_digital_clock = 1;
      }
   }
   else if(screen_type == 'e') {
      if(rcvr_type == NO_RCVR) {
         plot_digital_clock = 1;
      }
   }
   else if(screen_type == 'f') {
      plot_azel = 0;
      go_fullscreen = 1;
//      kill_deco = 1;
      need_screen_init = 1;
   }
   else {
      screen_type = 'm';
      text_mode = stm;
      return 1;
   }
   if(SCREEN_WIDTH < TINY_TINY_WIDTH) {  // TINY_TINY_SIZE vertical format 320x480
      plot_digital_clock = 0;
   }

   if(plot_azel || plot_signals) update_azel = 1;
   text_mode = stm;
if(text_mode == 0) no_x_margin = no_y_margin = 0;

   if(plot_watch) {
      plot_azel = old_azel;
      if(user_set_clock_plot == 0) {
         if(rcvr_type == NO_RCVR) plot_digital_clock = 1;
         else                     plot_digital_clock = 0;
      }
      if(plot_azel || plot_signals) update_azel = 1;
   }
   else if(user_set_clock_plot == 0) {
      if(rcvr_type == NO_RCVR) plot_digital_clock = 1;
      else                     plot_digital_clock = plot_azel;
   }
// shared_plot = 0;

   if(screen_type == 'm') {
      if((TEXT_HEIGHT <= 12) && (user_set_clock_plot == 0)) plot_digital_clock = 1;
   }

   if(ebolt) {  // adjust ebolt sat count for time clock display
      last_ebolt = (-3);
      saw_ebolt();
   }
   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x1d3e54(%rip), %rdx    # 0x205413
movb (%rdx), %cl
leaq 0x1d1269(%rip), %rsi    # 0x202831
movzbl (%rsi), %eax
cmpl $0x74, %eax
jne 0x315da
movb $0x0, (%rdx)
pushq $0x2
popq %rdi
xorl %esi, %esi
jmp 0x315fd
leal -0x63(%rax), %r8d
cmpl $0x17, %r8d
ja 0x31766
xorl %edi, %edi
leaq 0xc4c93(%rip), %r9      # 0xf6284
movslq (%r9,%r8,4), %r8
addq %r9, %r8
jmpq *%r8
movl %ecx, %esi
leaq 0x1d11fc(%rip), %r8     # 0x202800
cmpl $0x1c1, (%r8)           # imm = 0x1C1
jg 0x31618
leaq 0x1d3dd1(%rip), %r8     # 0x2053e5
movb $0x0, (%r8)
leaq 0x1d3df6(%rip), %r8     # 0x205415
movb (%r8), %r8b
movl %esi, %r9d
orb %r8b, %r9b
je 0x31635
leaq 0x1d3de3(%rip), %r9     # 0x205414
movb $0x1, (%r9)
leaq 0x1d119c(%rip), %r9     # 0x2027d8
movl %edi, (%r9)
cmpl $0x74, %eax
je 0x3165b
leaq 0x1d1210(%rip), %rdi    # 0x20285b
xorl %r9d, %r9d
movb %r9b, (%rdi)
leaq 0x1d1202(%rip), %rdi    # 0x20285a
movb %r9b, (%rdi)
leaq 0x1d3da6(%rip), %rdi    # 0x205408
cmpb $0x0, (%rdi)
je 0x3169f
movb %cl, (%rdx)
leaq 0x2c67f5(%rip), %rdx    # 0x2f7e65
movb (%rdx), %dl
testb %dl, %dl
jne 0x3168e
leaq 0x1d1253(%rip), %rsi    # 0x2028d0
cmpq $0x400, (%rsi)          # imm = 0x400
leaq 0x1d3d5a(%rip), %rsi    # 0x2053e5
sete (%rsi)
orb %r8b, %cl
je 0x316d4
leaq 0x1d3d7a(%rip), %rcx    # 0x205414
movb $0x1, (%rcx)
jmp 0x316d4
leaq 0x2c67bf(%rip), %rcx    # 0x2f7e65
movb (%rcx), %dl
testb %dl, %dl
jne 0x316d4
leaq 0x1d121d(%rip), %rcx    # 0x2028d0
cmpq $0x400, (%rcx)          # imm = 0x400
jne 0x316c8
leaq 0x1d3d22(%rip), %rcx    # 0x2053e5
movb $0x1, (%rcx)
jmp 0x316d2
leaq 0x1d3d16(%rip), %rcx    # 0x2053e5
movb %sil, (%rcx)
xorl %edx, %edx
cmpl $0x6d, %eax
jne 0x316f9
leaq 0x1d1134(%rip), %rax    # 0x202814
cmpl $0xd, (%rax)
setge %al
testb %dl, %dl
setne %cl
orb %al, %cl
jne 0x316f9
leaq 0x1d3cef(%rip), %rax    # 0x2053e5
movb $0x1, (%rax)
leaq 0x1f7824(%rip), %rax    # 0x228f24
xorl %ebx, %ebx
cmpl $0x0, (%rax)
je 0x31719
leaq 0x1f781a(%rip), %rax    # 0x228f28
movl $0xfffffffd, (%rax)     # imm = 0xFFFFFFFD
callq 0x56b98
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x1d11a7(%rip), %rsi    # 0x2028d0
cmpq $0x400, (%rsi)          # imm = 0x400
jne 0x315fb
leaq 0x1d3ca8(%rip), %rsi    # 0x2053e5
movb $0x1, (%rsi)
jmp 0x315fb
movb $0x0, (%rdx)
leaq 0x1d1091(%rip), %rsi    # 0x2027e0
pushq $0x1
popq %rdi
movl %edi, (%rsi)
leaq 0x1d108d(%rip), %rsi    # 0x2027e8
movl %edi, (%rsi)
xorl %esi, %esi
xorl %edi, %edi
jmp 0x315fd
movb $0x6d, (%rsi)
leaq 0x1d1068(%rip), %rax    # 0x2027d8
andl $0x0, (%rax)
pushq $0x1
popq %rbx
jmp 0x31719