// File: /workspace/github_cpp_makefile_star2_O3/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 0x1e7090(%rip), %rdx    # 0x21b413
movb (%rdx), %cl
leaq 0x1e44a5(%rip), %rsi    # 0x218831
movzbl (%rsi), %eax
cmpl $0x74, %eax
jne 0x343a0
movb $0x0, (%rdx)
movl $0x2, %edi
xorl %esi, %esi
jmp 0x343c3
leal -0x63(%rax), %r8d
cmpl $0x17, %r8d
ja 0x3452e
xorl %edi, %edi
leaq 0xd7e55(%rip), %r9      # 0x10c20c
movslq (%r9,%r8,4), %r8
addq %r9, %r8
jmpq *%r8
movl %ecx, %esi
leaq 0x1e4436(%rip), %r8     # 0x218800
cmpl $0x1c1, (%r8)           # imm = 0x1C1
jg 0x343de
leaq 0x1e700b(%rip), %r8     # 0x21b3e5
movb $0x0, (%r8)
leaq 0x1e7030(%rip), %r8     # 0x21b415
movb (%r8), %r8b
movl %esi, %r9d
orb %r8b, %r9b
je 0x343fb
leaq 0x1e701d(%rip), %r9     # 0x21b414
movb $0x1, (%r9)
leaq 0x1e43d6(%rip), %r9     # 0x2187d8
movl %edi, (%r9)
cmpl $0x74, %eax
je 0x34421
leaq 0x1e444a(%rip), %rdi    # 0x21885b
xorl %r9d, %r9d
movb %r9b, (%rdi)
leaq 0x1e443c(%rip), %rdi    # 0x21885a
movb %r9b, (%rdi)
leaq 0x1e6fe0(%rip), %rdi    # 0x21b408
cmpb $0x0, (%rdi)
je 0x34465
movb %cl, (%rdx)
leaq 0x2d9a2f(%rip), %rdx    # 0x30de65
movb (%rdx), %dl
testb %dl, %dl
jne 0x34454
leaq 0x1e448d(%rip), %rsi    # 0x2188d0
cmpq $0x400, (%rsi)          # imm = 0x400
leaq 0x1e6f94(%rip), %rsi    # 0x21b3e5
sete (%rsi)
orb %r8b, %cl
je 0x3449a
leaq 0x1e6fb4(%rip), %rcx    # 0x21b414
movb $0x1, (%rcx)
jmp 0x3449a
leaq 0x2d99f9(%rip), %rcx    # 0x30de65
movb (%rcx), %dl
testb %dl, %dl
jne 0x3449a
leaq 0x1e4457(%rip), %rcx    # 0x2188d0
cmpq $0x400, (%rcx)          # imm = 0x400
jne 0x3448e
leaq 0x1e6f5c(%rip), %rcx    # 0x21b3e5
movb $0x1, (%rcx)
jmp 0x34498
leaq 0x1e6f50(%rip), %rcx    # 0x21b3e5
movb %sil, (%rcx)
xorl %edx, %edx
cmpl $0x6d, %eax
jne 0x344bf
leaq 0x1e436e(%rip), %rax    # 0x218814
cmpl $0xd, (%rax)
setge %al
testb %dl, %dl
setne %cl
orb %al, %cl
jne 0x344bf
leaq 0x1e6f29(%rip), %rax    # 0x21b3e5
movb $0x1, (%rax)
leaq 0x20aa5e(%rip), %rax    # 0x23ef24
xorl %ebx, %ebx
cmpl $0x0, (%rax)
je 0x344df
leaq 0x20aa54(%rip), %rax    # 0x23ef28
movl $0xfffffffd, (%rax)     # imm = 0xFFFFFFFD
callq 0x5e140
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x1e43e1(%rip), %rsi    # 0x2188d0
cmpq $0x400, (%rsi)          # imm = 0x400
jne 0x343c1
leaq 0x1e6ee2(%rip), %rsi    # 0x21b3e5
movb $0x1, (%rsi)
jmp 0x343c1
movb $0x0, (%rdx)
leaq 0x1e42cb(%rip), %rsi    # 0x2187e0
movl $0x1, %edi
movl %edi, (%rsi)
leaq 0x1e42c5(%rip), %rsi    # 0x2187e8
movl %edi, (%rsi)
xorl %esi, %esi
xorl %edi, %edi
jmp 0x343c3
movb $0x6d, (%rsi)
leaq 0x1e42a0(%rip), %rax    # 0x2187d8
movl $0x0, (%rax)
movl $0x1, %ebx
jmp 0x344df