// File: /workspace/github_c_makefile_star2_O1/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, 0x11f0d(%rip)     # 0x15e80
je 0x3fcb
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
callq 0x69ce
incl 0x13872(%rip)           # 0x17804
incl 0x13874(%rip)           # 0x1780c
cmpl $0x1, %ebp
je 0x402e
cmpl $0x2, %ebp
je 0x3fd6
cmpl $0x3, %ebp
je 0x3fe0
movq 0x11ece(%rip), %rdi     # 0x15e80
movl 0x13844(%rip), %edx     # 0x177fc
leaq 0x3878(%rip), %rsi      # 0x7837
xorl %eax, %eax
callq 0x2120
jmp 0x40c8
movl $0x0, 0x9d57(%rip)      # 0xdd2c
retq
cmpq $0x0, 0x13812(%rip)     # 0x177f0
je 0x4055
movq 0x11e99(%rip), %rdi     # 0x15e80
leaq 0x38a3(%rip), %rsi      # 0x7891
movl %ebx, %edx
movl %r14d, %ecx
xorl %eax, %eax
callq 0x2120
leaq 0x9d4f(%rip), %rax      # 0xdd50
movb $0x1, (%rbx,%rax)
cmpq %rbx, 0x11d4c(%rip)     # 0x15d58
jge 0x4015
movq %rbx, 0x11d43(%rip)     # 0x15d58
cmpq %rbx, 0x11d34(%rip)     # 0x15d50
jle 0x40e2
movq %rbx, 0x11d27(%rip)     # 0x15d50
jmp 0x40e2
cmpq $0x0, 0x137ba(%rip)     # 0x177f0
movq 0x11e43(%rip), %rdi     # 0x15e80
je 0x40b1
leaq 0x3814(%rip), %rsi      # 0x785a
movl %r14d, %edx
xorl %eax, %eax
callq 0x2120
jmp 0x40e2
cmpb $0x0, 0x1379c(%rip)     # 0x177f8
leaq 0x380a(%rip), %rsi      # 0x786d
leaq 0x3815(%rip), %rax      # 0x787f
cmoveq %rax, %rsi
cmpb $0x0, 0x13fbb(%rip)     # 0x18030
movq 0x11e04(%rip), %rdi     # 0x15e80
movl 0x1377a(%rip), %edx     # 0x177fc
cmoveq %rax, %rsi
movl %ebx, %ecx
movl %r14d, %r8d
xorl %eax, %eax
callq 0x2120
movq 0x11de7(%rip), %rsi     # 0x15e80
movq %r15, %rdi
callq 0x20c0
movq $0x1, 0x13744(%rip) # 0x177f0
jmp 0x3ffa
movl 0x13745(%rip), %edx     # 0x177fc
leaq 0x378a(%rip), %rsi      # 0x7848
movl %r14d, %ecx
xorl %eax, %eax
callq 0x2120
movq 0x11db1(%rip), %rsi     # 0x15e80
movq %r15, %rdi
callq 0x20c0
movq $0x1, 0x1370e(%rip) # 0x177f0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x6a3b