// File: /workspace/github_c_makefile_star2_O0/hughbarney[P]pEmacs/display.c
// Function: update
void update ()
{
  VIDEO *vp1, *vp2;
  LINE *lp;
  WINDOW *wp;
  int i, j, c;

  if (typahead())
    return;

  /* update the reverse video flags for any mode lines out there */
  for (i = 0; i < term.t_nrow; ++i)
    vscreen[i]->v_flag &= ~VFREQ;

  wp = wheadp;
  while (wp != NULL)
    {
      vscreen[wp->w_toprow + wp->w_ntrows]->v_flag |= VFREQ;
      wp = wp->w_wndp;
    }

  wp = wheadp;
  while (wp != NULL)
    {
      /* Look at any window with update flags set on */
      if (wp->w_flag != 0)
	{
	  /* If not force reframe, check the framing */
	  if ((wp->w_flag & WFFORCE) == 0)
	    {
	      lp = wp->w_linep;
	      for (i = 0; i < wp->w_ntrows; ++i)
		{
		  if (lp == wp->w_dotp)
		    goto out;
		  if (lp == wp->w_bufp->b_linep)
		    break;
		  lp = lforw (lp);
		}
	    }
	  /* Not acceptable, better compute a new value for the line at the top
	   * of the window. Then set the "WFHARD" flag to force full redraw */
	  i = wp->w_force;
	  if (i > 0)
	    {
	      --i;
	      if (i >= wp->w_ntrows)
		i = wp->w_ntrows - 1;
	    }
	  else if (i < 0)
	    {
	      i += wp->w_ntrows;
	      if (i < 0)
		i = 0;
	    }
	  else
	    i = wp->w_ntrows / 2;
	  lp = wp->w_dotp;
	  while (i != 0 && lback (lp) != wp->w_bufp->b_linep)
	    {
	      --i;
	      lp = lback (lp);
	    }
	  wp->w_linep = lp;
	  wp->w_flag |= WFHARD;	   /* Force full */

	out:
	  /* Try to use reduced update. Mode line update has its own special
	   * flag. The fast update is used if the only thing to do is within
	   * the line editing */
	  lp = wp->w_linep;
	  i = wp->w_toprow;
	  if ((wp->w_flag & ~WFMODE) == WFEDIT)
	    {
	      while (lp != wp->w_dotp)
		{
		  ++i;
		  lp = lforw (lp);
		}
	      vscreen[i]->v_flag |= VFCHG;
	      vtmove (i, 0);
	      for (j = 0; j < llength (lp); ++j)
		vtputc (lgetc (lp, j));
	      vteeol ();
	    }
	  else if ((wp->w_flag & (WFEDIT | WFHARD)) != 0)
	    {
	      while (i < wp->w_toprow + wp->w_ntrows)
		{
		  vscreen[i]->v_flag |= VFCHG;
		  vtmove (i, 0);
		  /* if line has been changed */
		  if (lp != wp->w_bufp->b_linep)
		    {
		      for (j = 0; j < llength (lp); ++j)
			vtputc (lgetc (lp, j));
		      lp = lforw (lp);
		    }
		  vteeol ();
		  ++i;
		}
	    }
	}
      if (wp->w_flag & WFMODE)
	modeline(wp);
      wp->w_flag = 0;
      wp->w_force = 0;

      wp = wp->w_wndp;		/* and onward to the next window */
    }

  /* Always recompute the row and column number of the hardware cursor. This
   * is the only update for simple moves */
  lp = curwp->w_linep;
  currow = curwp->w_toprow;
  while (lp != curwp->w_dotp)
    {
      ++currow;
      lp = lforw (lp);
    }

  curcol = 0;
  i = 0;
  while (i < curwp->w_doto)
    {
      c = lgetc (lp, i++);
      if (c == '\t')
	curcol |= 0x07;
      else if (c < 0x20 || c == 0x7F)
	++curcol;
      ++curcol;
    }
  if (curcol >= term.t_ncol - 1)
    {				 /* extended line */
      /* flag we are extended and changed */
      vscreen[currow]->v_flag |= VFEXT | VFCHG;
      updext ();		 /* and output extended line */
    }
  else
    lbound = 0;			/* not extended line */

  /* make sure no lines need to be de-extended because the cursor is no
   * longer on them */

  wp = wheadp;

  while (wp != NULL)
    {
      lp = wp->w_linep;
      i = wp->w_toprow;

      while (i < wp->w_toprow + wp->w_ntrows)
	{
	  if (vscreen[i]->v_flag & VFEXT)
	    {
	      /* always flag extended lines as changed */
	      vscreen[i]->v_flag |= VFCHG;
	      if ((wp != curwp) || (lp != wp->w_dotp) ||
		  (curcol < term.t_ncol - 1))
		{
		  vtmove (i, 0);
		  for (j = 0; j < llength (lp); ++j)
		    vtputc (lgetc (lp, j));
		  vteeol ();
		  /* this line no longer is extended */
		  vscreen[i]->v_flag &= ~VFEXT;
		}
	    }
	  lp = lforw (lp);
	  ++i;
	}
      /* and onward to the next window */
      wp = wp->w_wndp;
    }

  /* Special hacking if the screen is garbage. Clear the hardware screen, and
   * update your copy to agree with it. Set all the virtual screen change
   * bits, to force a full update */
  if (sgarbf != FALSE)
    {
      for (i = 0; i < term.t_nrow; ++i)
	{
	  vscreen[i]->v_flag |= VFCHG;
	  vp1 = pscreen[i];
	  for (j = 0; j < term.t_ncol; ++j)
	    vp1->v_text[j] = ' ';
	}

      movecursor (0, 0);	 /* Erase the screen */
      (*term.t_eeop) ();
      sgarbf = FALSE;		 /* Erase-page clears */
      mpresf = FALSE;		 /* the message area */
    }
  /* Make sure that the physical and virtual displays agree. Unlike before,
   * the "updateline" code is only called with a line that has been updated
   * for sure */
  for (i = 0; i < term.t_nrow; ++i)
    {
      vp1 = vscreen[i];

      /* for each line that needs to be updated, or that needs its reverse
       * video status changed, call the line updater */
      j = vp1->v_flag;
      if (((j & VFCHG) != 0) || (((j & VFREV) == 0) != ((j & VFREQ) == 0)))
	{
	  if (typahead ())
	    return;
	  vp2 = pscreen[i];
	  updateline (i, &vp1->v_text[0], &vp2->v_text[0], &vp1->v_flag);
	}
    }

  /* Finally, update the hardware cursor and flush out buffers */
  movecursor (currow, curcol - lbound);
  (*term.t_flush) ();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb $0x0, %al
callq 0xaf20
cmpl $0x0, %eax
je 0x46c9
jmp 0x4e94
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
leaq 0xc19e(%rip), %rcx      # 0x10878
cmpl (%rcx), %eax
jge 0x4701
movq 0xc22b(%rip), %rax      # 0x10910
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movswl (%rax), %ecx
andl $-0x9, %ecx
movw %cx, (%rax)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x46d0
leaq 0xc368(%rip), %rax      # 0x10a70
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x474c
movq 0xc1f3(%rip), %rax      # 0x10910
movq -0x20(%rbp), %rcx
movsbl 0x38(%rcx), %ecx
movq -0x20(%rbp), %rdx
movsbl 0x39(%rdx), %edx
addl %edx, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movswl (%rax), %ecx
orl $0x8, %ecx
movw %cx, (%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x470f
leaq 0xc31d(%rip), %rax      # 0x10a70
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x4a70
movq -0x20(%rbp), %rax
movsbl 0x3b(%rax), %eax
cmpl $0x0, %eax
je 0x4a37
movq -0x20(%rbp), %rax
movsbl 0x3b(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x47e7
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x20(%rbp), %rcx
movsbl 0x39(%rcx), %ecx
cmpl %ecx, %eax
jge 0x47e5
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jne 0x47bb
jmp 0x48c3
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movq 0x8(%rcx), %rcx
cmpq 0x28(%rcx), %rax
jne 0x47cf
jmp 0x47e5
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x4799
jmp 0x47e7
movq -0x20(%rbp), %rax
movsbl 0x3a(%rax), %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jle 0x4820
movl -0x24(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x20(%rbp), %rcx
movsbl 0x39(%rcx), %ecx
cmpl %ecx, %eax
jl 0x481e
movq -0x20(%rbp), %rax
movsbl 0x39(%rax), %eax
subl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x4858
cmpl $0x0, -0x24(%rbp)
jge 0x4843
movq -0x20(%rbp), %rax
movsbl 0x39(%rax), %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jge 0x4841
movl $0x0, -0x24(%rbp)
jmp 0x4856
movq -0x20(%rbp), %rax
movsbl 0x39(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x24(%rbp)
jmp 0x4858
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x24(%rbp)
movb %al, -0x2d(%rbp)
je 0x4889
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x8(%rcx), %rcx
cmpq 0x28(%rcx), %rax
setne %al
movb %al, -0x2d(%rbp)
movb -0x2d(%rbp), %al
testb $0x1, %al
jne 0x4892
jmp 0x48a9
movl -0x24(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x4864
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
movsbl 0x3b(%rax), %ecx
orl $0x8, %ecx
movb %cl, 0x3b(%rax)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
movsbl 0x38(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
movsbl 0x3b(%rax), %eax
andl $-0x11, %eax
cmpl $0x4, %eax
jne 0x4976
jmp 0x48f0
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x18(%rcx), %rax
je 0x4914
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x48f0
movq 0xbff5(%rip), %rax      # 0x10910
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movswl (%rax), %ecx
orl $0x1, %ecx
movw %cx, (%rax)
movl -0x24(%rbp), %edi
xorl %esi, %esi
callq 0x4480
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jge 0x496c
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rcx
movsbl 0x18(%rax,%rcx), %edi
andl $0xff, %edi
callq 0x44a0
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x493d
callq 0x4660
jmp 0x4a35
movq -0x20(%rbp), %rax
movsbl 0x3b(%rax), %eax
andl $0xc, %eax
cmpl $0x0, %eax
je 0x4a33
jmp 0x498c
movl -0x24(%rbp), %eax
movq -0x20(%rbp), %rcx
movsbl 0x38(%rcx), %ecx
movq -0x20(%rbp), %rdx
movsbl 0x39(%rdx), %edx
addl %edx, %ecx
cmpl %ecx, %eax
jge 0x4a31
movq 0xbf60(%rip), %rax      # 0x10910
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movswl (%rax), %ecx
orl $0x1, %ecx
movw %cx, (%rax)
movl -0x24(%rbp), %edi
xorl %esi, %esi
callq 0x4480
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movq 0x8(%rcx), %rcx
cmpq 0x28(%rcx), %rax
je 0x4a1e
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jge 0x4a13
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rcx
movsbl 0x18(%rax,%rcx), %edi
andl $0xff, %edi
callq 0x44a0
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x49e4
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
callq 0x4660
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x498c
jmp 0x4a33
jmp 0x4a35
jmp 0x4a37
movq -0x20(%rbp), %rax
movsbl 0x3b(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x4a50
movq -0x20(%rbp), %rdi
callq 0x4ea0
movq -0x20(%rbp), %rax
movb $0x0, 0x3b(%rax)
movq -0x20(%rbp), %rax
movb $0x0, 0x3a(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x475a
leaq 0xbfe1(%rip), %rax      # 0x10a58
movq (%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
leaq 0xbfcf(%rip), %rax      # 0x10a58
movq (%rax), %rax
movsbl 0x38(%rax), %ecx
leaq 0xc099(%rip), %rax      # 0x10b30
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
leaq 0xbfb4(%rip), %rcx      # 0x10a58
movq (%rcx), %rcx
cmpq 0x18(%rcx), %rax
je 0x4acf
leaq 0xc07c(%rip), %rax      # 0x10b30
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0xc070(%rip), %rax      # 0x10b30
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x4a99
leaq 0xc05e(%rip), %rax      # 0x10b34
movl $0x0, (%rax)
movl $0x0, -0x24(%rbp)
movslq -0x24(%rbp), %rax
leaq 0xbf6a(%rip), %rcx      # 0x10a58
movq (%rcx), %rcx
cmpq 0x20(%rcx), %rax
jge 0x4b70
movq -0x18(%rbp), %rax
movl -0x24(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x24(%rbp)
movslq %ecx, %rcx
movsbl 0x18(%rax,%rcx), %eax
andl $0xff, %eax
movl %eax, -0x2c(%rbp)
cmpl $0x9, -0x2c(%rbp)
jne 0x4b33
leaq 0xc011(%rip), %rax      # 0x10b34
movl (%rax), %ecx
orl $0x7, %ecx
leaq 0xc005(%rip), %rax      # 0x10b34
movl %ecx, (%rax)
jmp 0x4b56
cmpl $0x20, -0x2c(%rbp)
jl 0x4b3f
cmpl $0x7f, -0x2c(%rbp)
jne 0x4b54
leaq 0xbfee(%rip), %rax      # 0x10b34
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0xbfe2(%rip), %rax      # 0x10b34
movl %ecx, (%rax)
jmp 0x4b56
leaq 0xbfd7(%rip), %rax      # 0x10b34
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0xbfcb(%rip), %rax      # 0x10b34
movl %ecx, (%rax)
jmp 0x4ae3
leaq 0xbfbd(%rip), %rax      # 0x10b34
movl (%rax), %eax
leaq 0xbcf8(%rip), %rcx      # 0x10878
movl 0x4(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jl 0x4baf
movq 0xbd7f(%rip), %rax      # 0x10910
leaq 0xbf98(%rip), %rcx      # 0x10b30
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rax
movswl (%rax), %ecx
orl $0x3, %ecx
movw %cx, (%rax)
callq 0x5510
jmp 0x4bb9
movl $0x0, 0xbd4f(%rip)      # 0x10908
leaq 0xbeb0(%rip), %rax      # 0x10a70
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x4cfc
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
movsbl 0x38(%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x20(%rbp), %rcx
movsbl 0x38(%rcx), %ecx
movq -0x20(%rbp), %rdx
movsbl 0x39(%rdx), %edx
addl %edx, %ecx
cmpl %ecx, %eax
jge 0x4cec
movq 0xbd03(%rip), %rax      # 0x10910
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movswl (%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x4cd3
movq 0xbce5(%rip), %rax      # 0x10910
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movswl (%rax), %ecx
orl $0x1, %ecx
movw %cx, (%rax)
movq -0x20(%rbp), %rax
leaq 0xbe11(%rip), %rcx      # 0x10a58
cmpq (%rcx), %rax
jne 0x4c74
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jne 0x4c74
leaq 0xbed3(%rip), %rax      # 0x10b34
movl (%rax), %eax
leaq 0xbc0e(%rip), %rcx      # 0x10878
movl 0x4(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x4cd1
movl -0x24(%rbp), %edi
xorl %esi, %esi
callq 0x4480
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jge 0x4cb4
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rcx
movsbl 0x18(%rax,%rcx), %edi
andl $0xff, %edi
callq 0x44a0
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x4c85
callq 0x4660
movq 0xbc50(%rip), %rax      # 0x10910
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movswl (%rax), %ecx
andl $-0x3, %ecx
movw %cx, (%rax)
jmp 0x4cd3
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x4be9
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x4bc7
leaq 0xb681(%rip), %rax      # 0x10384
cmpl $0x0, (%rax)
je 0x4db6
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
leaq 0xbb5b(%rip), %rcx      # 0x10878
cmpl (%rcx), %eax
jge 0x4d87
movq 0xbbe8(%rip), %rax      # 0x10910
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movswl (%rax), %ecx
orl $0x1, %ecx
movw %cx, (%rax)
movq 0xbbd8(%rip), %rax      # 0x10918
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x8(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
leaq 0xbb1b(%rip), %rcx      # 0x10878
cmpl 0x4(%rcx), %eax
jge 0x4d7a
movq -0x8(%rbp), %rax
movslq -0x28(%rbp), %rcx
movb $0x20, 0x2(%rax,%rcx)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x4d53
jmp 0x4d7c
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x4d13
xorl %esi, %esi
movl %esi, %edi
callq 0x4200
leaq 0xbae1(%rip), %rcx      # 0x10878
movb $0x0, %al
callq *0x48(%rcx)
leaq 0xb5e1(%rip), %rax      # 0x10384
movl $0x0, (%rax)
leaq 0xbc94(%rip), %rax      # 0x10a44
movl $0x0, (%rax)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
leaq 0xbab1(%rip), %rcx      # 0x10878
cmpl (%rcx), %eax
jge 0x4e6b
movq 0xbb3a(%rip), %rax      # 0x10910
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movswl (%rax), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x4e1e
movl -0x28(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl -0x28(%rbp), %ecx
andl $0x8, %ecx
cmpl $0x0, %ecx
sete %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
je 0x4e5b
movb $0x0, %al
callq 0xaf20
cmpl $0x0, %eax
je 0x4e2c
jmp 0x4e94
movq 0xbae5(%rip), %rax      # 0x10918
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
movl -0x24(%rbp), %edi
movq -0x8(%rbp), %rsi
addq $0x2, %rsi
movq -0x10(%rbp), %rdx
addq $0x2, %rdx
movq -0x8(%rbp), %rcx
callq 0x51d0
jmp 0x4e5d
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x4dbd
leaq 0xbcbe(%rip), %rax      # 0x10b30
movl (%rax), %edi
leaq 0xbcb9(%rip), %rax      # 0x10b34
movl (%rax), %esi
subl 0xba85(%rip), %esi      # 0x10908
callq 0x4200
leaq 0xb9e9(%rip), %rcx      # 0x10878
movb $0x0, %al
callq *0x30(%rcx)
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)