// File: /workspace/github_c_makefile_star2_O0/AK6DN[P]dec-utilities-for-pdp/palbart/palbart.c
// Function: punchLiteralPool
void punchLiteralPool( LPOOL_T *p, BOOL punch_page0 )
{
  WORD16  loc;
  WORD16  tmplc;
  int lpool_page = 0; /* Silence false uninitialized error from GCC */
  int i;

  for (i = MAX_PAGES-1; i >= 0;  i--) {
    lpool_page = (i << 7) & 07600;

    if ( p[i].loc != p[i].last_punched && (punch_page0 || lpool_page != 0) )
    {
      if( !rim_mode )
      {
        /* Put out origin if not in rim mode.                                 */
        punchOrigin( p[i].loc | lpool_page );
      }
      /* Put the literals in the object file.                                 */
      for( loc = p[i].loc; loc < p[i].last_punched; loc++ )
      {
        tmplc = loc + lpool_page;
        printLine( line, (field | tmplc), p[i].pool[loc], LOC_VAL );
        punchLocObject( tmplc, p[i].pool[loc] );
      }
      p[i].last_punched = p[i].loc;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movl $0x0, -0x14(%rbp)
movl $0x1f, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jl 0x4be1
movl -0x18(%rbp), %eax
shll $0x7, %eax
andl $0xf80, %eax            # imm = 0xF80
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
imulq $0x104, %rcx, %rcx      # imm = 0x104
addq %rcx, %rax
movswl (%rax), %eax
movq -0x8(%rbp), %rcx
movslq -0x18(%rbp), %rdx
imulq $0x104, %rdx, %rdx      # imm = 0x104
addq %rdx, %rcx
movswl 0x2(%rcx), %ecx
cmpl %ecx, %eax
je 0x4bd1
movzbl -0x9(%rbp), %eax
cmpl $0x0, %eax
jne 0x4abe
cmpl $0x0, -0x14(%rbp)
je 0x4bd1
cmpb $0x0, 0x88e8(%rip)      # 0xd3ad
jne 0x4ae7
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
imulq $0x104, %rcx, %rcx      # imm = 0x104
addq %rcx, %rax
movswl (%rax), %eax
orl -0x14(%rbp), %eax
movswl %ax, %edi
callq 0x40f0
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
imulq $0x104, %rcx, %rcx      # imm = 0x104
addq %rcx, %rax
movw (%rax), %ax
movw %ax, -0xc(%rbp)
movswl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
movslq -0x18(%rbp), %rdx
imulq $0x104, %rdx, %rdx      # imm = 0x104
addq %rdx, %rcx
movswl 0x2(%rcx), %ecx
cmpl %ecx, %eax
jge 0x4ba6
movswl -0xc(%rbp), %eax
addl -0x14(%rbp), %eax
movw %ax, -0xe(%rbp)
movswl 0xac8e(%rip), %eax      # 0xf7c2
movswl -0xe(%rbp), %ecx
orl %ecx, %eax
movw %ax, %si
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
imulq $0x104, %rcx, %rcx      # imm = 0x104
addq %rcx, %rax
movswq -0xc(%rbp), %rdx
leaq 0xac95(%rip), %rdi      # 0xf7f0
movl $0x3, %ecx
movswl %si, %esi
movswl 0x4(%rax,%rdx,2), %edx
callq 0x4bf0
movw -0xe(%rbp), %dx
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
imulq $0x104, %rcx, %rcx      # imm = 0x104
addq %rcx, %rax
movswq -0xc(%rbp), %rcx
movswl %dx, %edi
movswl 0x4(%rax,%rcx,2), %esi
callq 0x8250
movw -0xc(%rbp), %ax
addw $0x1, %ax
movw %ax, -0xc(%rbp)
jmp 0x4b00
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
imulq $0x104, %rcx, %rcx      # imm = 0x104
addq %rcx, %rax
movw (%rax), %cx
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rdx
imulq $0x104, %rdx, %rdx      # imm = 0x104
addq %rdx, %rax
movw %cx, 0x2(%rax)
jmp 0x4bd3
movl -0x18(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x4a60
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)