// File: jkingan[P]ladyheather/heather.cpp
// Function: config_options()
void config_options(void)
{
int k;
char old_buf[SLEN+1];     // the text string the user is typing in

   // configure system for any screen related command line options that were set
   old_buf[0] = 0;

   if(need_screen_init) {
#ifdef USE_X11
      if(need_screen_init == 99999) {  // piss go to full screen mode (/fu from keyboard)
         need_screen_init = 0;
         have_restore_size = 0;
         have_root_info = 0;
         x11_maxed = 0;
         SCREEN_WIDTH = display_width;
         SCREEN_HEIGHT = display_height;
         restore_width = display_width;
         restore_height = display_height;

         go_fullscreen = 1;   // piss   go_full()
         kill_deco = go_fullscreen; // disable X11 window decorations

         screen_type = 'c';
         strcpy(old_buf, edit_buffer);
         sprintf(edit_buffer, "%dx%d",SCREEN_WIDTH,SCREEN_HEIGHT);
         if(display) XFlush(display);
         keyboard_cmd = 1;
         edit_screen_res();
         strcpy(edit_buffer, old_buf);
         keyboard_cmd = 0;
go_fullscreen = kill_deco = 0;
      }
      else {
         need_screen_init = 0;
         init_screen(9106);
      }
#else
      need_screen_init = 0;
      init_screen(9106);
#endif
   }

   if(keyboard_cmd == 0) {
      if(SCREEN_WIDTH < MEDIUM_WIDTH) {  // blank clock name for small screens
         if(watch_name[0] == 0)  strcpy(watch_name,  " ");
         if(watch_name2[0] == 0) strcpy(watch_name2, " ");
      }
      else if(0) {
         if((watch_name[0] == ' ') && (watch_name[1] == 0)) watch_name[0] = 0;
         if((watch_name2[0] == ' ') && (watch_name2[1] == 0)) watch_name2[0] = 0;
      }
   }

   // set where the first point in the graphs will be
   last_count_y = PLOT_ROW + (PLOT_HEIGHT - VERT_MINOR);
   for(k=0; k<NUM_PLOTS+DERIVED_PLOTS; k++) {
      plot[k].last_y = PLOT_ROW+PLOT_CENTER;
      plot[k].last_trend_y = PLOT_ROW+PLOT_CENTER;
   }

   if(user_view_string[0]) {  // user set a plot view interval on the command line
      edit_user_view(user_view_string);
   }
   else if(new_user_view && (keyboard_cmd == 0) && user_view && (queue_interval > 0)) {   // set user specified plot window time (in hours)
      view_interval = (user_view * 60L*60L) / queue_interval;
      view_interval /= PLOT_WIDTH;
      if(view_interval <= 1L) view_interval = 1L;
      user_view = view_interval;
   }
   new_user_view = 0;

   // user set a daylight savings time definition
   if(user_set_dst && have_year) {
      calc_dst_times(this_year, dst_list[dst_area]);
   }

   // if user did not enable/disable the big clock,  turn it on if it will fit
   if(user_set_clock_plot == 0) {
      if(SCREEN_WIDTH > NARROW_SCREEN) plot_digital_clock = 1;
      else if(rcvr_type == NO_RCVR) plot_digital_clock = 1;
      else if((TEXT_HEIGHT <= 8) && (text_mode == 0)) plot_digital_clock = 1; ////
      else if((small_font == 1) && text_mode) plot_digital_clock = 1;
   }

   #ifdef TEMP_CONTROL
      if(do_temp_control) {  // user wants to actively stabilize the unit temperature
         if(desired_temp) enable_temp_control();
         else             disable_temp_control();
      }
   #endif

   if(not_safe) {
      if(not_safe == 3) ;   // xyzzy
      else if(com[RCVR_PORT].process_com == 0) ;  // xyzzy
      else if(com[RCVR_PORT].com_running <= 0) ;  // xyzzy
      else if(did_init1) init_messages(1, 0);
      else               init_messages(1, 1);
      did_init1 = 1;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movb $0x0, -0x100(%rbp)
cmpl $0x0, 0x267cdf(%rip)    # 0x2779c8
je 0xfe10
cmpl $0x1869f, 0x267ccf(%rip) # imm = 0x1869F
jne 0xfdfa
movl $0x0, 0x267cbf(%rip)    # 0x2779c8
movl $0x0, 0x1c037d(%rip)    # 0x1d0090
movl $0x0, 0x1c036f(%rip)    # 0x1d008c
movl $0x0, 0x1c0375(%rip)    # 0x1d009c
movl 0x267cab(%rip), %eax    # 0x2779d8
movl %eax, 0x267cad(%rip)    # 0x2779e0
movl 0x267ca3(%rip), %eax    # 0x2779dc
movl %eax, 0x267ca5(%rip)    # 0x2779e4
movl 0x267c93(%rip), %eax    # 0x2779d8
movl %eax, 0x1c0349(%rip)    # 0x1d0094
movl 0x267c8b(%rip), %eax    # 0x2779dc
movl %eax, 0x1c0341(%rip)    # 0x1d0098
movl $0x1, 0x267c5f(%rip)    # 0x2779c0
movl 0x267c59(%rip), %eax    # 0x2779c0
movl %eax, 0x267c97(%rip)    # 0x277a04
movb $0x63, 0x267c9d(%rip)   # 0x277a11
leaq -0x100(%rbp), %rdi
leaq 0x38e73e(%rip), %rsi    # 0x39e4c0
callq 0x9350
movl 0x267c53(%rip), %edx    # 0x2779e0
movl 0x267c51(%rip), %ecx    # 0x2779e4
leaq 0x38e726(%rip), %rdi    # 0x39e4c0
leaq 0x160fb4(%rip), %rsi    # 0x170d55
movb $0x0, %al
callq 0x9060
cmpq $0x0, 0x1c02f0(%rip)    # 0x1d00a0
je 0xfdbe
movq 0x1c02e7(%rip), %rdi    # 0x1d00a0
callq 0x95b0
movb $0x1, 0x35d287(%rip)    # 0x36d04c
callq 0x49c40
leaq -0x100(%rbp), %rsi
leaq 0x38e6e8(%rip), %rdi    # 0x39e4c0
callq 0x9350
movb $0x0, 0x35d268(%rip)    # 0x36d04c
movl $0x0, 0x267c16(%rip)    # 0x277a04
movl $0x0, 0x267bc8(%rip)    # 0x2779c0
jmp 0xfe0e
movl $0x0, 0x267bc4(%rip)    # 0x2779c8
movl $0x2392, %edi           # imm = 0x2392
callq 0xd430
jmp 0xfe10
movzbl 0x35d235(%rip), %eax    # 0x36d04c
cmpl $0x0, %eax
jne 0xfe6c
cmpl $0x3e2, 0x267bba(%rip)  # imm = 0x3E2
jge 0xfe68
movsbl 0x38daa1(%rip), %eax    # 0x39d8d0
cmpl $0x0, %eax
jne 0xfe47
leaq 0x38da95(%rip), %rdi    # 0x39d8d0
leaq 0x175fa2(%rip), %rsi    # 0x185de4
callq 0x9350
movsbl 0x38daa2(%rip), %eax    # 0x39d8f0
cmpl $0x0, %eax
jne 0xfe66
leaq 0x38da96(%rip), %rdi    # 0x39d8f0
leaq 0x175f83(%rip), %rsi    # 0x185de4
callq 0x9350
jmp 0xfe6a
jmp 0xfe6a
jmp 0xfe6c
movl 0x267bea(%rip), %eax    # 0x277a5c
movl 0x267bf0(%rip), %ecx    # 0x277a68
subl 0x267bd2(%rip), %ecx    # 0x277a50
addl %ecx, %eax
movl %eax, 0x267bfe(%rip)    # 0x277a84
movl $0x0, -0x4(%rbp)
cmpl $0x14, -0x4(%rbp)
jge 0xfeec
movl 0x267bc3(%rip), %ecx    # 0x277a5c
addl 0x267bd5(%rip), %ecx    # 0x277a74
movslq -0x4(%rbp), %rdx
leaq 0x1ace76(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0xc0(%rax)
movl 0x267b9c(%rip), %ecx    # 0x277a5c
addl 0x267bae(%rip), %ecx    # 0x277a74
movslq -0x4(%rbp), %rdx
leaq 0x1ace4f(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0xd8(%rax)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xfe8d
cmpb $0x0, 0x38a71d(%rip)    # 0x39a610
je 0xff06
leaq 0x38a714(%rip), %rdi    # 0x39a610
callq 0x426f0
jmp 0xff8a
cmpb $0x0, 0x26a697(%rip)    # 0x27a5a4
je 0xff88
movzbl 0x35d136(%rip), %eax    # 0x36d04c
cmpl $0x0, %eax
jne 0xff88
cmpq $0x0, 0x26a675(%rip)    # 0x27a598
je 0xff88
cmpq $0x0, 0x26a64b(%rip)    # 0x27a578
jle 0xff88
imulq $0x3c, 0x26a661(%rip), %rax # 0x27a598
imulq $0x3c, %rax, %rax
cqto
idivq 0x26a634(%rip)          # 0x27a578
movq %rax, 0x26a635(%rip)    # 0x27a580
movslq 0x267b12(%rip), %rcx    # 0x277a64
movq 0x26a627(%rip), %rax    # 0x27a580
cqto
idivq %rcx
movq %rax, 0x26a61b(%rip)    # 0x27a580
cmpq $0x1, 0x26a613(%rip)    # 0x27a580
jg 0xff7a
movq $0x1, 0x26a606(%rip) # 0x27a580
movq 0x26a5ff(%rip), %rax    # 0x27a580
movq %rax, 0x26a610(%rip)    # 0x27a598
jmp 0xff8a
movb $0x0, 0x26a613(%rip)    # 0x27a5a4
cmpb $0x0, 0x35caec(%rip)    # 0x36ca84
je 0xffc0
cmpl $0x0, 0x28e11f(%rip)    # 0x29e0c0
je 0xffc0
movl 0x35c757(%rip), %edi    # 0x36c700
movslq 0x35cacc(%rip), %rcx    # 0x36ca7c
leaq 0x1b9879(%rip), %rax    # 0x1c9830
movq (%rax,%rcx,8), %rsi
callq 0x1339f0
movzbl 0x35d07e(%rip), %eax    # 0x36d045
cmpl $0x0, %eax
jne 0x10058
movl 0x267a0a(%rip), %eax    # 0x2779e0
movl %eax, -0x104(%rbp)
imull $0x31a, 0x27273e(%rip), %eax # imm = 0x31A
movl $0x64, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x104(%rbp), %eax
cmpl %ecx, %eax
jle 0x10003
movb $0x1, 0x26a5c4(%rip)    # 0x27a5c5
jmp 0x10056
cmpq $0x400, 0x267aa2(%rip) # imm = 0x400
jne 0x10019
movb $0x1, 0x26a5ae(%rip)    # 0x27a5c5
jmp 0x10054
cmpl $0x8, 0x2679d4(%rip)    # 0x2779f4
jg 0x10034
cmpl $0x0, 0x26798f(%rip)    # 0x2779b8
jne 0x10034
movb $0x1, 0x26a593(%rip)    # 0x27a5c5
jmp 0x10052
movzbl 0x2679fe(%rip), %eax    # 0x277a39
cmpl $0x1, %eax
jne 0x10050
cmpl $0x0, 0x267971(%rip)    # 0x2779b8
je 0x10050
movb $0x1, 0x26a575(%rip)    # 0x27a5c5
jmp 0x10052
jmp 0x10054
jmp 0x10056
jmp 0x10058
cmpb $0x0, 0x38ef41(%rip)    # 0x39efa0
je 0x10084
movsd 0x38ef3f(%rip), %xmm0   # 0x39efa8
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x10076
jp 0x10076
jmp 0x1007d
callq 0x16ad70
jmp 0x10082
callq 0x16ae60
jmp 0x10084
cmpb $0x0, 0x35cfc2(%rip)    # 0x36d04d
je 0x100e4
movzbl 0x35cfb9(%rip), %eax    # 0x36d04d
cmpl $0x3, %eax
jne 0x1009b
jmp 0x100da
cmpl $0x0, 0x374e12(%rip)    # 0x384eb4
jne 0x100a6
jmp 0x100d8
cmpl $0x0, 0x374e03(%rip)    # 0x384eb0
jg 0x100b1
jmp 0x100d6
cmpl $0x0, 0x386138(%rip)    # 0x3961f0
je 0x100c8
movl $0x1, %edi
xorl %esi, %esi
callq 0x86290
jmp 0x100d4
movl $0x1, %esi
movl %esi, %edi
callq 0x86290
jmp 0x100d6
jmp 0x100d8
jmp 0x100da
movl $0x1, 0x38610c(%rip)    # 0x3961f0
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopl (%rax)