// File: /workspace/github_c_makefile_star2_O0/AK6DN[P]dec-utilities-for-pdp/macro8x/macro8x.c
// Function: getExprs
WORD32 getExprs()
{
  SYM_T  *symv;
  SYM_T  *symt;
  WORD32  temp;
  SYMTYP  temp_type;
  WORD32  value;
  SYMTYP  value_type;

  symv = getExpr();
  value = symv->val;
  value_type = symv->type;

  while( TRUE )
  {
    if( is_done( line[lexstart] ))
    {
      return( value );
    }
    switch( line[lexstart] )
    {
    case ')':
    case ']':
      return( value );

    default:
      break;
    }

    /* Interpret space as logical or                                          */
    symt = getExpr();
    temp = symt->val & 07777;
    temp_type = symt->type;

    switch( value_type )
    {
    case MRI:
    case MRIFIX:
      /* Previous symbol was a Memory Reference Instruction.                  */
      switch( temp_type )
      {
      case MRI:
      case MRIFIX:
        /* Current symbol is also a Memory Reference Instruction.             */
        value |= temp;          /* Just OR the MRI instructions.              */
        break;

      default:
        /* Now have the address part of the MRI instruction.                  */
        if( temp < 00200 )
        {
          value |= temp;        /* Page zero MRI.                             */
        }
        else if( (( fieldlc + reloc ) & 07600 ) <= temp
             && temp <= (( fieldlc + reloc ) | 0177 ))
        {
          value |= ( PAGE_BIT | (temp & ADDRESS_FIELD )); /* Current page MRI */
        }
        else
        {
          if(( value & INDIRECT_BIT ) == INDIRECT_BIT )
          {
            /* Already indirect, can't generate                               */
            errorSymbol( &illegal_indirect, symt->name, lexstartprev );
          }
          else
          {
            /* Now fix off page reference.                                    */
            /* Search current page literal pool for needed value.             */
            /* Set Indirect Current Page                                      */
            if( testZeroPool( temp ))
            {
              value |= ( 00400 | insertLiteral( &pz, field, temp ));
            }
            else
            {
              value |= ( 00600 | insertLiteral( &cp, clc, temp ));
            }
            indirect_generated = TRUE;
          }
        }
        break;
      }
      break;

    default:
        value |= temp;          /* Normal 12 bit value.                       */
        break;
    }
  } /* end while                                                              */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
callq 0x47b0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x34(%rbp)
movq 0x1595b(%rip), %rcx     # 0x1aca8
leaq 0x1556c(%rip), %rax     # 0x1a8c0
movsbl (%rax,%rcx), %eax
cmpl $0x2f, %eax
je 0x53a2
movq 0x15944(%rip), %rcx     # 0x1aca8
leaq 0x15555(%rip), %rax     # 0x1a8c0
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x53a2
movq 0x1592d(%rip), %rcx     # 0x1aca8
leaq 0x1553e(%rip), %rax     # 0x1a8c0
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
je 0x53a2
movq 0x15916(%rip), %rcx     # 0x1aca8
leaq 0x15527(%rip), %rax     # 0x1a8c0
movsbl (%rax,%rcx), %eax
cmpl $0x3b, %eax
jne 0x53af
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x5548
movq 0x158f2(%rip), %rax     # 0x1aca8
leaq 0x15503(%rip), %rcx     # 0x1a8c0
movsbl (%rax,%rcx), %eax
movl %eax, -0x38(%rbp)
subl $0x29, %eax
je 0x53d5
jmp 0x53cb
movl -0x38(%rbp), %eax
subl $0x5d, %eax
jne 0x53e2
jmp 0x53d5
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x5548
jmp 0x53e4
callq 0x47b0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
andl $0xfff, %eax            # imm = 0xFFF
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x34(%rbp), %eax
orl $0x2, %eax
subl $0x7, %eax
je 0x5417
jmp 0x5537
movl -0x24(%rbp), %eax
orl $0x2, %eax
subl $0x7, %eax
je 0x5424
jmp 0x5435
movq -0x20(%rbp), %rax
orq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x5535
cmpq $0x80, -0x20(%rbp)
jge 0x5450
movq -0x20(%rbp), %rax
orq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x5533
movq 0x13c09(%rip), %rax     # 0x19060
addq 0x13c0a(%rip), %rax     # 0x19068
andq $0xf80, %rax            # imm = 0xF80
cmpq -0x20(%rbp), %rax
jg 0x54a0
movq -0x20(%rbp), %rax
movq 0x13beb(%rip), %rcx     # 0x19060
addq 0x13bec(%rip), %rcx     # 0x19068
orq $0x7f, %rcx
cmpq %rcx, %rax
jg 0x54a0
movq -0x20(%rbp), %rax
andq $0x7f, %rax
orq $0x80, %rax
orq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x5531
movq -0x30(%rbp), %rax
andq $0x100, %rax            # imm = 0x100
cmpq $0x100, %rax            # imm = 0x100
jne 0x54cf
movq -0x18(%rbp), %rsi
addq $0x4, %rsi
movq 0x15807(%rip), %rdx     # 0x1acc8
leaq 0x9538(%rip), %rdi      # 0xea00
callq 0x5140
jmp 0x552f
movq -0x20(%rbp), %rdi
callq 0x6f40
cmpb $0x0, %al
je 0x5503
movq 0x13b75(%rip), %rsi     # 0x19058
movq -0x20(%rbp), %rdx
leaq 0x14f9a(%rip), %rdi     # 0x1a488
callq 0x6fc0
orq $0x100, %rax            # imm = 0x100
orq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x5528
movq 0x13b46(%rip), %rsi     # 0x19050
movq -0x20(%rbp), %rdx
leaq 0x14b6b(%rip), %rdi     # 0x1a080
callq 0x6fc0
orq $0x180, %rax            # imm = 0x180
orq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movb $0x1, 0x15ba1(%rip)     # 0x1b0d0
jmp 0x5531
jmp 0x5533
jmp 0x5535
jmp 0x5543
movq -0x20(%rbp), %rax
orq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x5346
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)