// File: /workspace/github_c_makefile_star2_O0/ThomasMadappattu[P]Sandmacs/display.c
// Function: mlwrite
void mlwrite (char *fmt, int arg)
{
  int c;
  char *ap;

  if (eolexist == FALSE)
    {
      mlerase ();
      (*term.t_flush) ();
    }
  movecursor (term.t_nrow, 0);
  ap = (char *) &arg;
  while ((c = *fmt++) != 0)
    {
      if (c != '%')
	{
	  (*term.t_putchar) (c);
	  ++ttcol;
	}
      else
	{
	  c = *fmt++;
	  switch (c)
	    {
	    case 'd':
	      mlputi (*(int *) ap, 10);
	      ap += sizeof (int);
	      break;

	    case 'o':
	      mlputi (*(int *) ap, 8);
	      ap += sizeof (int);
	      break;

	    case 'x':
	      mlputi (*(int *) ap, 16);
	      ap += sizeof (int);
	      break;

	    case 'D':
	      mlputli (*(long *) ap, 10);
	      ap += sizeof (long);
	      break;

	    case 's':
	      mlputs (*(char **) &ap);
	      ap += sizeof (char *);
	      break;

	    case 'c':
	      (*term.t_putchar) (*ap);
	      ++ttcol;
	      ap += sizeof (char *);
	      break;

	    default:
	      (*term.t_putchar) (c);
	      ++ttcol;
	    }
	}
    }
  if (eolexist == TRUE)
    (*term.t_eeol) ();
  (*term.t_flush) ();
  mpresf = TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
leaq 0xb9be(%rip), %rax      # 0x11344
cmpl $0x0, (%rax)
jne 0x599c
callq 0x3f90
leaq 0xbe19(%rip), %rcx      # 0x117b0
movb $0x0, %al
callq *0x30(%rcx)
leaq 0xbe0d(%rip), %rax      # 0x117b0
movl (%rax), %edi
xorl %esi, %esi
callq 0x3f30
leaq -0xc(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movsbl (%rax), %eax
movl %eax, -0x10(%rbp)
cmpl $0x0, %eax
je 0x5b2f
cmpl $0x25, -0x10(%rbp)
je 0x59fe
leaq 0xbdd1(%rip), %rax      # 0x117b0
movq 0x28(%rax), %rcx
movl -0x10(%rbp), %edi
movb $0x0, %al
callq *%rcx
movl 0xb724(%rip), %eax      # 0x11114
addl $0x1, %eax
movl %eax, 0xb71b(%rip)      # 0x11114
jmp 0x5b2a
movq -0x8(%rbp), %rax
movq %rax, %rcx
incq %rcx
movq %rcx, -0x8(%rbp)
movsbl (%rax), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
addl $-0x44, %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x34, %eax
ja 0x5b07
movq -0x20(%rbp), %rax
leaq 0x768a(%rip), %rcx      # 0xd0bc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
movl (%rax), %edi
movl $0xa, %esi
callq 0x5b70
movq -0x18(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x18(%rbp)
jmp 0x5b28
movq -0x18(%rbp), %rax
movl (%rax), %edi
movl $0x8, %esi
callq 0x5b70
movq -0x18(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x18(%rbp)
jmp 0x5b28
movq -0x18(%rbp), %rax
movl (%rax), %edi
movl $0x10, %esi
callq 0x5b70
movq -0x18(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x18(%rbp)
jmp 0x5b28
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movl $0xa, %esi
callq 0x5c00
movq -0x18(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x18(%rbp)
jmp 0x5b28
movq -0x18(%rbp), %rdi
callq 0x5c90
movq -0x18(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x18(%rbp)
jmp 0x5b28
leaq 0xbcd5(%rip), %rax      # 0x117b0
movq 0x28(%rax), %rcx
movq -0x18(%rbp), %rax
movsbl (%rax), %edi
movb $0x0, %al
callq *%rcx
movl 0xb624(%rip), %eax      # 0x11114
addl $0x1, %eax
movl %eax, 0xb61b(%rip)      # 0x11114
movq -0x18(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x18(%rbp)
jmp 0x5b28
leaq 0xbca2(%rip), %rax      # 0x117b0
movq 0x28(%rax), %rcx
movl -0x10(%rbp), %edi
movb $0x0, %al
callq *%rcx
movl 0xb5f5(%rip), %eax      # 0x11114
addl $0x1, %eax
movl %eax, 0xb5ec(%rip)      # 0x11114
jmp 0x5b2a
jmp 0x59b4
leaq 0xb80e(%rip), %rax      # 0x11344
cmpl $0x1, (%rax)
jne 0x5b47
leaq 0xbc6e(%rip), %rcx      # 0x117b0
movb $0x0, %al
callq *0x40(%rcx)
leaq 0xbc62(%rip), %rcx      # 0x117b0
movb $0x0, %al
callq *0x30(%rcx)
leaq 0xbd0a(%rip), %rax      # 0x11864
movl $0x1, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)