// File: /workspace/github_c_makefile_star2_O0/hughbarney[P]pEmacs/line.c
// Function: lnewline
int lnewline ()
{
  WINDOW *wp;
  char *cp1, *cp2;
  LINE *lp1, *lp2;
  int doto;

  lchange (WFHARD);
  lp1 = curwp->w_dotp;	       /* Get the address and */
  doto = curwp->w_doto;	       /* offset of "." */
  if ((lp2 = lalloc (doto)) == NULL)	/* New first half line */
    return (FALSE);
  cp1 = &lp1->l_text[0];       /* Shuffle text around */
  cp2 = &lp2->l_text[0];
  while (cp1 != &lp1->l_text[doto])
    *cp2++ = *cp1++;
  cp2 = &lp1->l_text[0];
  while (cp1 != &lp1->l_text[lp1->l_used])
    *cp2++ = *cp1++;
  lp1->l_used -= doto;
  lp2->l_bp = lp1->l_bp;
  lp1->l_bp = lp2;
  lp2->l_bp->l_fp = lp2;
  lp2->l_fp = lp1;
  wp = wheadp;		       /* Windows */
  while (wp != NULL)
    {
      if (wp->w_linep == lp1)
	wp->w_linep = lp2;
      if (wp->w_dotp == lp1)
	{
	  if (wp->w_doto < doto)
	    wp->w_dotp = lp2;
	  else
	    wp->w_doto -= doto;
	}
      if (wp->w_markp == lp1)
	{
	  if (wp->w_marko < doto)
	    wp->w_markp = lp2;
	  else
	    wp->w_marko -= doto;
	}
      wp = wp->w_wndp;
    }
  return (TRUE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl $0x8, %edi
callq 0x6ce0
leaq 0x98cf(%rip), %rax      # 0x10a58
movq (%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
leaq 0x98bd(%rip), %rax      # 0x10a58
movq (%rax), %rax
movq 0x20(%rax), %rax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %edi
callq 0x6b00
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x71c3
movl $0x0, -0x4(%rbp)
jmp 0x7376
movq -0x28(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x18(%rbp)
movq -0x30(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
addq $0x18, %rcx
movslq -0x34(%rbp), %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
je 0x7217
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb (%rax), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
jmp 0x71db
movq -0x28(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
addq $0x18, %rcx
movq -0x28(%rbp), %rdx
movslq 0x14(%rdx), %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
je 0x7263
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb (%rax), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
jmp 0x7223
movl -0x34(%rbp), %edx
movq -0x28(%rbp), %rax
movl 0x14(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x14(%rax)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rcx
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
leaq 0x97c1(%rip), %rax      # 0x10a70
movq (%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x736f
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
cmpq -0x28(%rbp), %rax
jne 0x72db
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpq -0x28(%rbp), %rax
jne 0x731d
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x34(%rbp), %rcx
cmpq %rcx, %rax
jge 0x7308
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
jmp 0x731b
movslq -0x34(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x20(%rax)
jmp 0x731d
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
cmpq -0x28(%rbp), %rax
jne 0x735f
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x34(%rbp), %rcx
cmpq %rcx, %rax
jge 0x734a
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
jmp 0x735d
movslq -0x34(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x30(%rax)
jmp 0x735f
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x72b6
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nop