// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heather.cpp
// Function: adev_review(int, int)
void adev_review(int c, int why)
{
   // this routine lets you scroll around the adev tables and plots

   if(c == HOME_CHAR)  {  // go to start of adev data
      first_show_bin = 0;
   }
   else if(c == END_CHAR) { // go to end of adev data
      first_show_bin = max_bins_shown - adev_table_rows;
      if(first_show_bin < 0) first_show_bin = 0;
   }
   else if(c == LEFT_CHAR) {  // scroll adevs by 5 bins
      first_show_bin += 5;
      goto scroll_adevs;
   }
   else if(c == RIGHT_CHAR) {
      first_show_bin -= 5;
      goto scroll_adevs;
   }
   else if(c == PAGE_UP) {  // scroll adevs by one screen
      first_show_bin += (adev_page_size - 2);
      goto scroll_adevs;
   }
   else if(c == PAGE_DOWN)  {
      first_show_bin -= (adev_page_size - 2);
      goto scroll_adevs;
   }
   else if(c == UP_CHAR) {  // scroll adevs by 10 bins
first_show_bin += 10;
goto scroll_adevs;
   }
   else if(c == DOWN_CHAR) {
first_show_bin -= 10;
goto scroll_adevs;
   }
   else if(c == '<') {      // scroll adves one bin
goto scroll_left;
   }
   else if(c == '>') {
goto scroll_right;
   }
   else if(c == '[') {      // scroll adevs one bin
      scroll_left:
      ++first_show_bin;

      scroll_adevs:
      if(first_show_bin >= max_bins_shown) {
         first_show_bin = max_bins_shown-1;
         if(first_show_bin < 0) first_show_bin = 0;
         BEEP(12);
      }
      else if(first_show_bin < 0) {
         first_show_bin = 0;
         BEEP(13);
      }
      force_adev_redraw(3);
   }
   else if(c == ']') {
      scroll_right:
      --first_show_bin;
      goto scroll_adevs;
   }
   else {  // terminate adev scroll mode
      last_was_adev = 0;
      lwa = 1;
      force_adev_redraw(4);
      end_review(1);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leal -0x147(%rdi), %eax
cmpl $0xa, %eax
ja 0x1b83e
leaq 0xd7cd0(%rip), %rcx     # 0xf34fc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
andl $0x0, 0x20b444(%rip)    # 0x226c80
jmp 0x1b8a7
cmpl $0x3c, %edi
je 0x1b85f
cmpl $0x3e, %edi
je 0x1b852
cmpl $0x5b, %edi
je 0x1b85f
cmpl $0x5d, %edi
jne 0x1b86c
movl 0x20b428(%rip), %eax    # 0x226c80
decl %eax
jmp 0x1b8f7
movl 0x20b41b(%rip), %eax    # 0x226c80
incl %eax
jmp 0x1b8f7
andl $0x0, 0x1e9a91(%rip)    # 0x205304
movl $0x1, 0x1e9a8b(%rip)    # 0x205308
pushq $0x4
popq %rdi
callq 0xc7144
pushq $0x1
popq %rdi
popq %rbp
jmp 0x10ac9
movl 0x20b3fc(%rip), %eax    # 0x226c90
subl 0x1e6f26(%rip), %eax    # 0x2027c0
xorl %ecx, %ecx
testl %eax, %eax
cmovgl %eax, %ecx
movl %ecx, 0x20b3d9(%rip)    # 0x226c80
popq %rbp
retq
movl 0x20b3d1(%rip), %eax    # 0x226c80
addl $-0x5, %eax
jmp 0x1b8f7
movl 0x20b3c6(%rip), %eax    # 0x226c80
addl $0x5, %eax
jmp 0x1b8f7
movl 0x20b3bb(%rip), %eax    # 0x226c80
addl $-0xa, %eax
jmp 0x1b8f7
movl 0x20b3b0(%rip), %eax    # 0x226c80
addl $0xa, %eax
jmp 0x1b8f7
movl 0x1e6ee1(%rip), %eax    # 0x2027bc
movl 0x20b39f(%rip), %ecx    # 0x226c80
addl %ecx, %eax
addl $-0x2, %eax
jmp 0x1b8f7
movl 0x20b392(%rip), %eax    # 0x226c80
subl 0x1e6ec8(%rip), %eax    # 0x2027bc
addl $0x2, %eax
movl %eax, 0x20b383(%rip)    # 0x226c80
movl 0x20b38d(%rip), %ecx    # 0x226c90
cmpl %ecx, %eax
jge 0x1b912
testl %eax, %eax
jns 0x1b92b
pushq $0xd
popq %rdi
xorl %eax, %eax
jmp 0x1b920
cmpl $0x2, %ecx
pushq $0x1
popq %rax
cmovgel %ecx, %eax
decl %eax
pushq $0xc
popq %rdi
movl %eax, 0x20b35a(%rip)    # 0x226c80
callq 0x9d23
pushq $0x3
popq %rdi
popq %rbp
jmp 0xc7144