// File: /workspace/github_c_makefile_star2_O3/AK6DN[P]dec-utilities-for-pdp/macro8x/macro8x.c
// Function: printLine
void printLine( char *line, WORD32 loc, WORD32 val, LINESTYLE_T linestyle )
{
  if( listfile == NULL )
  {
    save_error_count = 0;
    return;
  }

  printPageBreak();

  list_lineno++;
  page_lineno++;
  switch( linestyle )
  {
  default:
  case LINE:
    fprintf( listfile, "%5d             ", lineno );
    fputs( line, listfile );
    listed = TRUE;
    break;

  case LINE_VAL:
    if( !listed )
    {
	fprintf( listfile, "%5d       %4.4o  ", lineno, (unsigned)val );
      fputs( line, listfile );
      listed = TRUE;
    }
    else
    {
	fprintf( listfile, "            %4.4o\n", (unsigned)val );
    }
    break;

  case LINE_LOC_VAL:
    if( !listed )
    {
      if( indirect_generated && lgm_flag )
      {
	  fprintf( listfile, "%5d %5.5o %4.4o@ ", lineno, (unsigned)loc, (unsigned)val );
      }
      else
      {
	  fprintf( listfile, "%5d %5.5o %4.4o  ", lineno, (unsigned)loc, (unsigned)val );
      }
      fputs( line, listfile );
      listed = TRUE;
    }
    else
    {
	fprintf( listfile, "      %5.5o %4.4o\n", (unsigned)loc, (unsigned)val );
    }
    /* update memory map */
    memory_map[loc] = TRUE;
    if (loc > memory_max) memory_max = loc;
    if (loc < memory_min) memory_min = loc;
    break;

  case LOC_VAL:
      fprintf( listfile, "      %5.5o %4.4o\n", (unsigned)loc, (unsigned)val );
    /* update memory map */
    memory_map[loc] = TRUE;
    if (loc > memory_max) memory_max = loc;
    if (loc < memory_min) memory_min = loc;
    break;
  }
  printErrorMessages();
}

// Assembly:
cmpq $0x0, 0x12ef5(%rip)     # 0x16e80
je 0x3fe3
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
callq 0x6a89
incl 0x1485a(%rip)           # 0x18804
incl 0x1485c(%rip)           # 0x1880c
cmpl $0x1, %ebp
je 0x4046
cmpl $0x2, %ebp
je 0x3fee
cmpl $0x3, %ebp
je 0x3ff8
movq 0x12eb6(%rip), %rdi     # 0x16e80
movl 0x1482c(%rip), %edx     # 0x187fc
leaq 0x48bc(%rip), %rsi      # 0x8893
xorl %eax, %eax
callq 0x2120
jmp 0x40e0
movl $0x0, 0xad3f(%rip)      # 0xed2c
retq
cmpq $0x0, 0x147fa(%rip)     # 0x187f0
je 0x406d
movq 0x12e81(%rip), %rdi     # 0x16e80
leaq 0x48e7(%rip), %rsi      # 0x88ed
movl %ebx, %edx
movl %r14d, %ecx
xorl %eax, %eax
callq 0x2120
leaq 0xad37(%rip), %rax      # 0xed50
movb $0x1, (%rbx,%rax)
cmpq %rbx, 0x12d34(%rip)     # 0x16d58
jge 0x402d
movq %rbx, 0x12d2b(%rip)     # 0x16d58
cmpq %rbx, 0x12d1c(%rip)     # 0x16d50
jle 0x40fa
movq %rbx, 0x12d0f(%rip)     # 0x16d50
jmp 0x40fa
cmpq $0x0, 0x147a2(%rip)     # 0x187f0
movq 0x12e2b(%rip), %rdi     # 0x16e80
je 0x40c9
leaq 0x4858(%rip), %rsi      # 0x88b6
movl %r14d, %edx
xorl %eax, %eax
callq 0x2120
jmp 0x40fa
cmpb $0x0, 0x14784(%rip)     # 0x187f8
leaq 0x484e(%rip), %rsi      # 0x88c9
leaq 0x4859(%rip), %rax      # 0x88db
cmoveq %rax, %rsi
cmpb $0x0, 0x14fa3(%rip)     # 0x19030
movq 0x12dec(%rip), %rdi     # 0x16e80
movl 0x14762(%rip), %edx     # 0x187fc
cmoveq %rax, %rsi
movl %ebx, %ecx
movl %r14d, %r8d
xorl %eax, %eax
callq 0x2120
movq 0x12dcf(%rip), %rsi     # 0x16e80
movq %r15, %rdi
callq 0x20c0
movq $0x1, 0x1472c(%rip) # 0x187f0
jmp 0x4012
movl 0x1472d(%rip), %edx     # 0x187fc
leaq 0x47ce(%rip), %rsi      # 0x88a4
movl %r14d, %ecx
xorl %eax, %eax
callq 0x2120
movq 0x12d99(%rip), %rsi     # 0x16e80
movq %r15, %rdi
callq 0x20c0
movq $0x1, 0x146f6(%rip) # 0x187f0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x6af6