// File: /workspace/github_c_makefile_star2_O0/hughbarney[P]pEmacs/buffer.c
// Function: makelist
int makelist ()
{
  BUFFER *bp;
  LINE *lp;
  char *cp1, *cp2;
  char b[8], line[128];
  int nbytes, s, c;

  blistp->b_flag &= ~BFCHG;	/* Don't complain! */
  if ((s = bclear (blistp)) != TRUE) /* Blow old text away */
    return (s);
  strncpy (blistp->b_fname, "", 1);
  if (addline ("ACV    Size Buffer           File") == FALSE ||
      addline ("--- ------- ------           ----") == FALSE)
    return (FALSE);
  bp = bheadp;

  /* build line to report global mode settings */
  cp1 = &line[0];
  *cp1++ = ' ';
  *cp1++ = ' ';
  *cp1++ = ' ';
  *cp1++ = ' ';

  /* output the list of buffers */
  while (bp != 0)
    {
      if ((bp->b_flag & BFTEMP) != 0)
	{				/* Skip magic ones */
	  bp = bp->b_bufp;
	  continue;
	}
      cp1 = &line[0];		/* Start at left edge */

      /* output status of ACTIVE flag (has the file been read in? */
      if (bp->b_active == TRUE)	 /* "@" if activated */
	*cp1++ = '@';
      else
	*cp1++ = ' ';

      /* output status of changed flag */
      if ((bp->b_flag & BFCHG) != 0) /* "*" if changed */
	*cp1++ = '*';
      else
	*cp1++ = ' ';

      /* output status of readonly flag */
      if ((bp->b_flag & BFRO) != 0) /* "%" if view mode */
	*cp1++ = '%';
      else
	*cp1++ = ' ';
      *cp1++ = ' ';		/* Gap */

      nbytes = 0;			/* Count bytes in buf */
      lp = lforw (bp->b_linep);
      while (lp != bp->b_linep)
	{
	  nbytes += llength (lp) + 1;
	  lp = lforw (lp);
	}
      itoa (b, 7, nbytes);	/* 7 digit buffer size */
      cp2 = &b[0];
      while ((c = *cp2++) != 0)
	*cp1++ = (char)c;
      *cp1++ = ' ';		/* Gap */
      cp2 = &bp->b_bname[0];	/* Buffer name */
      while ((c = *cp2++) != 0)
	*cp1++ = (char)c;
      cp2 = &bp->b_fname[0];	/* File name */
      if (*cp2 != 0)
	{
	  while (cp1 < &line[3 + 1 + 7 + 1 + NBUFN + 1]) /* ACV, space, size, space, bufname, space */
	    *cp1++ = ' ';
	  while ((c = *cp2++) != 0)
	    {
	      if (cp1 < &line[128 - 1])
		*cp1++ = (char)c;
	    }
	}
      *cp1 = 0;			/* Add to the buffer */
      if (addline (line) == FALSE)
	return (FALSE);
      bp = bp->b_bufp;
    }
  return (TRUE);		/* All done */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
leaq 0xd2d6(%rip), %rax      # 0x10a68
movq (%rax), %rax
movsbl 0x32(%rax), %ecx
andl $-0x3, %ecx
movb %cl, 0x32(%rax)
leaq 0xd2c2(%rip), %rax      # 0x10a68
movq (%rax), %rdi
callq 0x3530
movl %eax, -0xb8(%rbp)
cmpl $0x1, %eax
je 0x37c7
movl -0xb8(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3b19
leaq 0xd29a(%rip), %rax      # 0x10a68
movq (%rax), %rdi
addq $0x33, %rdi
leaq 0x90fd(%rip), %rsi      # 0xc8d9
movl $0x1, %edx
callq 0x2070
leaq 0x8859(%rip), %rdi      # 0xc046
callq 0x3b30
cmpl $0x0, %eax
je 0x3808
leaq 0x886a(%rip), %rdi      # 0xc068
callq 0x3b30
cmpl $0x0, %eax
jne 0x3814
movl $0x0, -0x4(%rbp)
jmp 0x3b19
leaq 0xd325(%rip), %rax      # 0x10b40
movq (%rax), %rax
movq %rax, -0x10(%rbp)
leaq -0xb0(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $0x20, (%rax)
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $0x20, (%rax)
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $0x20, (%rax)
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $0x20, (%rax)
cmpq $0x0, -0x10(%rbp)
je 0x3b12
movq -0x10(%rbp), %rax
movsbl 0x32(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x389d
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x3875
leaq -0xb0(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movsbl 0x30(%rax), %eax
cmpl $0x1, %eax
jne 0x38c9
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $0x40, (%rax)
jmp 0x38db
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $0x20, (%rax)
movq -0x10(%rbp), %rax
movsbl 0x32(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x38ff
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $0x2a, (%rax)
jmp 0x3911
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $0x20, (%rax)
movq -0x10(%rbp), %rax
movsbl 0x32(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x3935
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $0x25, (%rax)
jmp 0x3947
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $0x20, (%rax)
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $0x20, (%rax)
movl $0x0, -0xb4(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x28(%rcx), %rax
je 0x39a3
movq -0x18(%rbp), %rax
movl 0x14(%rax), %eax
addl $0x1, %eax
addl -0xb4(%rbp), %eax
movl %eax, -0xb4(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x3972
leaq -0x30(%rbp), %rdi
movl -0xb4(%rbp), %edx
movl $0x7, %esi
callq 0x3c40
leaq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movsbl (%rax), %eax
movl %eax, -0xbc(%rbp)
cmpl $0x0, %eax
je 0x39f7
movl -0xbc(%rbp), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
jmp 0x39bf
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $0x20, (%rax)
movq -0x10(%rbp), %rax
addq $0x83, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movsbl (%rax), %eax
movl %eax, -0xbc(%rbp)
cmpl $0x0, %eax
je 0x3a4f
movl -0xbc(%rbp), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
jmp 0x3a17
movq -0x10(%rbp), %rax
addq $0x33, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x3ae1
jmp 0x3a69
movq -0x20(%rbp), %rax
leaq -0xb0(%rbp), %rcx
addq $0x1d, %rcx
cmpq %rcx, %rax
jae 0x3a91
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $0x20, (%rax)
jmp 0x3a69
jmp 0x3a93
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movsbl (%rax), %eax
movl %eax, -0xbc(%rbp)
cmpl $0x0, %eax
je 0x3adf
movq -0x20(%rbp), %rax
leaq -0xb0(%rbp), %rcx
addq $0x7f, %rcx
cmpq %rcx, %rax
jae 0x3add
movl -0xbc(%rbp), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
jmp 0x3a93
jmp 0x3ae1
movq -0x20(%rbp), %rax
movb $0x0, (%rax)
leaq -0xb0(%rbp), %rdi
callq 0x3b30
cmpl $0x0, %eax
jne 0x3b02
movl $0x0, -0x4(%rbp)
jmp 0x3b19
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x3875
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)