// File: /workspace/github_cpp_makefile_star2_O1/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 0x1e71a4(%rip), %rdx    # 0x21b413
movb (%rdx), %cl
leaq 0x1e45b9(%rip), %rdi    # 0x218831
movzbl (%rdi), %eax
cmpl $0x74, %eax
jne 0x3428a
movb $0x0, (%rdx)
movl $0x2, %esi
jmp 0x342ab
leal -0x63(%rax), %r8d
cmpl $0x17, %r8d
ja 0x34411
xorl %esi, %esi
leaq 0xd7f63(%rip), %r9      # 0x10c204
movslq (%r9,%r8,4), %r8
addq %r9, %r8
jmpq *%r8
leaq 0x1e454e(%rip), %rdi    # 0x218800
cmpl $0x1c1, (%rdi)          # imm = 0x1C1
jg 0x342c4
leaq 0x1e7124(%rip), %rdi    # 0x21b3e5
movb $0x0, (%rdi)
movb (%rdx), %dil
leaq 0x1e7147(%rip), %r8     # 0x21b415
movb (%r8), %r8b
movl %edi, %r9d
orb %r8b, %r9b
je 0x342e4
leaq 0x1e7134(%rip), %r9     # 0x21b414
movb $0x1, (%r9)
leaq 0x1e44ed(%rip), %r9     # 0x2187d8
movl %esi, (%r9)
cmpl $0x74, %eax
je 0x3430a
leaq 0x1e4561(%rip), %rsi    # 0x21885b
xorl %r9d, %r9d
movb %r9b, (%rsi)
leaq 0x1e4553(%rip), %rsi    # 0x21885a
movb %r9b, (%rsi)
leaq 0x1e70f7(%rip), %rsi    # 0x21b408
cmpb $0x0, (%rsi)
je 0x3434d
movb %cl, (%rdx)
leaq 0x2d9b46(%rip), %rdx    # 0x30de65
cmpb $0x0, (%rdx)
jne 0x3433c
leaq 0x1e45a5(%rip), %rdx    # 0x2188d0
cmpq $0x400, (%rdx)          # imm = 0x400
leaq 0x1e70ac(%rip), %rdx    # 0x21b3e5
sete (%rdx)
orb %r8b, %cl
je 0x3437c
leaq 0x1e70cc(%rip), %rcx    # 0x21b414
movb $0x1, (%rcx)
jmp 0x3437c
leaq 0x2d9b11(%rip), %rcx    # 0x30de65
cmpb $0x0, (%rcx)
jne 0x3437c
leaq 0x1e4570(%rip), %rcx    # 0x2188d0
cmpq $0x400, (%rcx)          # imm = 0x400
jne 0x34372
leaq 0x1e7075(%rip), %rcx    # 0x21b3e5
jmp 0x34348
leaq 0x1e706c(%rip), %rcx    # 0x21b3e5
movb %dil, (%rcx)
cmpl $0x6d, %eax
jne 0x343a3
leaq 0x1e448c(%rip), %rax    # 0x218814
cmpl $0xc, (%rax)
jg 0x343a3
leaq 0x2d9ad1(%rip), %rax    # 0x30de65
cmpb $0x0, (%rax)
jne 0x343a3
leaq 0x1e7045(%rip), %rax    # 0x21b3e5
movb $0x1, (%rax)
leaq 0x20ab7a(%rip), %rax    # 0x23ef24
xorl %ebx, %ebx
cmpl $0x0, (%rax)
je 0x343c3
leaq 0x20ab70(%rip), %rax    # 0x23ef28
movl $0xfffffffd, (%rax)     # imm = 0xFFFFFFFD
callq 0x5e1a6
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x1e44fd(%rip), %rdi    # 0x2188d0
cmpq $0x400, (%rdi)          # imm = 0x400
jne 0x342ab
leaq 0x1e6ffe(%rip), %rdi    # 0x21b3e5
movb $0x1, (%rdi)
jmp 0x342ab
movb $0x0, (%rdx)
leaq 0x1e43e7(%rip), %rdi    # 0x2187e0
movl $0x1, %r8d
movl %r8d, (%rdi)
leaq 0x1e43df(%rip), %rdi    # 0x2187e8
movl %r8d, (%rdi)
jmp 0x342ab
movb $0x6d, (%rdi)
leaq 0x1e43bd(%rip), %rax    # 0x2187d8
movl $0x0, (%rax)
movl $0x1, %ebx
jmp 0x343c3