// File: /workspace/github_c_makefile_star2_O0/ThomasMadappattu[P]Sandmacs/window.c
// Function: enlargewind
int enlargewind (int f, int n)
{
  WINDOW *adjwp;
  LINE *lp;
  int i;

  if (n < 0)
    return (shrinkwind (f, -n));
  if (wheadp->w_wndp == NULL)
    {
      mlwrite ("Only one window");
      return (FALSE);
    }
  if ((adjwp = curwp->w_wndp) == NULL)
    {
      adjwp = wheadp;
      while (adjwp->w_wndp != curwp)
	adjwp = adjwp->w_wndp;
    }
  if (adjwp->w_ntrows <= n)
    {
      mlwrite ("Impossible change");
      return (FALSE);
    }
  if (curwp->w_wndp == adjwp)
    {				/* Shrink below */
      lp = adjwp->w_linep;
      for (i = 0; i < n && lp != adjwp->w_bufp->b_linep; ++i)
	lp = lforw (lp);
      adjwp->w_linep = lp;
      adjwp->w_toprow += n;
    }
  else
    {				/* Shrink above */
      lp = curwp->w_linep;
      for (i = 0; i < n && lback (lp) != curbp->b_linep; ++i)
	lp = lback (lp);
      curwp->w_linep = lp;
      curwp->w_toprow -= n;
    }
  curwp->w_ntrows += n;
  adjwp->w_ntrows -= n;
  curwp->w_flag |= WFMODE | WFHARD;
  adjwp->w_flag |= WFMODE | WFHARD;
  return (TRUE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jge 0xb1d9
movl -0x8(%rbp), %edi
xorl %esi, %esi
subl -0xc(%rbp), %esi
callq 0xb3e0
movl %eax, -0x4(%rbp)
jmp 0xb3d3
leaq 0x66b0(%rip), %rax      # 0x11890
movq (%rax), %rax
cmpq $0x0, (%rax)
jne 0xb203
leaq 0x25cf(%rip), %rdi      # 0xd7bf
movb $0x0, %al
callq 0x5970
movl $0x0, -0x4(%rbp)
jmp 0xb3d3
leaq 0x666e(%rip), %rax      # 0x11878
movq (%rax), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0xb24a
leaq 0x666f(%rip), %rax      # 0x11890
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
leaq 0x6642(%rip), %rcx      # 0x11878
cmpq (%rcx), %rax
je 0xb248
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0xb228
jmp 0xb24a
movq -0x18(%rbp), %rax
movsbl 0x39(%rax), %eax
cmpl -0xc(%rbp), %eax
jg 0xb271
leaq 0x2571(%rip), %rdi      # 0xd7cf
movb $0x0, %al
callq 0x5970
movl $0x0, -0x4(%rbp)
jmp 0xb3d3
leaq 0x6600(%rip), %rax      # 0x11878
movq (%rax), %rax
movq (%rax), %rax
cmpq -0x18(%rbp), %rax
jne 0xb2fa
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %ecx
xorl %eax, %eax
cmpl -0xc(%rbp), %ecx
movb %al, -0x25(%rbp)
jge 0xb2ba
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rcx
cmpq 0x28(%rcx), %rax
setne %al
movb %al, -0x25(%rbp)
movb -0x25(%rbp), %al
testb $0x1, %al
jne 0xb2c3
jmp 0xb2d9
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xb297
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movl -0xc(%rbp), %edx
movq -0x18(%rbp), %rax
movsbl 0x38(%rax), %ecx
addl %edx, %ecx
movb %cl, 0x38(%rax)
jmp 0xb384
leaq 0x6577(%rip), %rax      # 0x11878
movq (%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %ecx
xorl %eax, %eax
cmpl -0xc(%rbp), %ecx
movb %al, -0x26(%rbp)
jge 0xb33c
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
leaq 0x6539(%rip), %rcx      # 0x11868
movq (%rcx), %rcx
cmpq 0x28(%rcx), %rax
setne %al
movb %al, -0x26(%rbp)
movb -0x26(%rbp), %al
testb $0x1, %al
jne 0xb345
jmp 0xb35c
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xb313
movq -0x20(%rbp), %rcx
leaq 0x6511(%rip), %rax      # 0x11878
movq (%rax), %rax
movq %rcx, 0x10(%rax)
movl -0xc(%rbp), %edx
leaq 0x6500(%rip), %rax      # 0x11878
movq (%rax), %rax
movsbl 0x38(%rax), %ecx
subl %edx, %ecx
movb %cl, 0x38(%rax)
movl -0xc(%rbp), %edx
leaq 0x64ea(%rip), %rax      # 0x11878
movq (%rax), %rax
movsbl 0x39(%rax), %ecx
addl %edx, %ecx
movb %cl, 0x39(%rax)
movl -0xc(%rbp), %edx
movq -0x18(%rbp), %rax
movsbl 0x39(%rax), %ecx
subl %edx, %ecx
movb %cl, 0x39(%rax)
leaq 0x64c7(%rip), %rax      # 0x11878
movq (%rax), %rax
movsbl 0x3b(%rax), %ecx
orl $0x18, %ecx
movb %cl, 0x3b(%rax)
movq -0x18(%rbp), %rax
movsbl 0x3b(%rax), %ecx
orl $0x18, %ecx
movb %cl, 0x3b(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)