// File: /workspace/github_c_makefile_star2_O0/AK6DN[P]dec-utilities-for-pdp/palbart/palbart.c
// Function: getExprs
WORD16 getExprs()
{
  SYM_T  *symv;
  SYM_T  *symt;
  WORD16  temp;
  SYMTYP  temp_type;
  WORD16  value;
  SYMTYP  value_type;
  BOOL    MRI_held = FALSE;
  WORD16  held_value = 0;

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

  while( TRUE )
  {
    if( isdone( line[lexstart] ))
    {
      if (MRI_held)
      {
        value = fixMRIInstruction(value, held_value);
      }
      return( value );
    }
    switch( line[lexstart] )
    {
    case ')':
    case ']':
    case '<':
      if (MRI_held)
      {
        value = fixMRIInstruction(value, held_value);
      }
      return( value );

    default:
      break;
    }

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

    switch( value_type & (MRI | MRIFIX))
    {
    case MRI:
    case MRIFIX:
      /* Previous symbol was a Memory Reference Instruction.                  */
      switch( temp_type & (MRI | MRIFIX) )
      {
      case MRI:
      case MRIFIX:
        /* If we have held value don't or in more MRI's to instuction, they */
        /* are now instuction value */
        if (MRI_held)
        {
          held_value |= temp;
        }
        else
        { 
          /* Current symbol is also a Memory Reference Instruction.           */
          value |= temp;          /* Just OR the MRI instructions.            */
        }
        break;

      default:
        held_value |= temp;
        MRI_held = TRUE;
        break;
      }
      break;

    default:
        if (value_type == UNDEFINED || temp_type == UNDEFINED) {
            value = 0;
        } else {
            value |= temp;          /* Normal 12 bit value.                       */
         }
        break;
    }
  } /* end while                                                              */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb $0x0, -0x29(%rbp)
movw $0x0, -0x2c(%rbp)
callq 0x45c0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movw 0xc(%rax), %ax
movw %ax, -0x22(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x28(%rbp)
movslq 0xa62d(%rip), %rcx      # 0xf874
leaq 0xa5a2(%rip), %rax      # 0xf7f0
movsbl (%rax,%rcx), %eax
cmpl $0x2f, %eax
je 0x529c
movslq 0xa616(%rip), %rcx      # 0xf874
leaq 0xa58b(%rip), %rax      # 0xf7f0
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x529c
movslq 0xa5ff(%rip), %rcx      # 0xf874
leaq 0xa574(%rip), %rax      # 0xf7f0
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
je 0x529c
movslq 0xa5e8(%rip), %rcx      # 0xf874
leaq 0xa55d(%rip), %rax      # 0xf7f0
movsbl (%rax,%rcx), %eax
cmpl $0x3b, %eax
jne 0x52c3
cmpb $0x0, -0x29(%rbp)
je 0x52b6
movw -0x22(%rbp), %ax
movswl %ax, %edi
movswl -0x2c(%rbp), %esi
callq 0x67c0
movw %ax, -0x22(%rbp)
movw -0x22(%rbp), %ax
movw %ax, -0x2(%rbp)
jmp 0x53b8
movslq 0xa5aa(%rip), %rax      # 0xf874
leaq 0xa51f(%rip), %rcx      # 0xf7f0
movsbl (%rax,%rcx), %eax
movl %eax, -0x30(%rbp)
subl $0x29, %eax
je 0x52f3
jmp 0x52df
movl -0x30(%rbp), %eax
subl $0x3c, %eax
je 0x52f3
jmp 0x52e9
movl -0x30(%rbp), %eax
subl $0x5d, %eax
jne 0x531a
jmp 0x52f3
cmpb $0x0, -0x29(%rbp)
je 0x530d
movw -0x22(%rbp), %ax
movswl %ax, %edi
movswl -0x2c(%rbp), %esi
callq 0x67c0
movw %ax, -0x22(%rbp)
movw -0x22(%rbp), %ax
movw %ax, -0x2(%rbp)
jmp 0x53b8
jmp 0x531c
callq 0x45c0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movzwl 0xc(%rax), %eax
andl $0xfff, %eax            # imm = 0xFFF
movw %ax, -0x1a(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x20(%rbp)
movl -0x28(%rbp), %eax
notl %eax
testb $0x5, %al
je 0x534a
jmp 0x538f
movl -0x20(%rbp), %eax
notl %eax
testb $0x5, %al
je 0x5355
jmp 0x537b
cmpb $0x0, -0x29(%rbp)
je 0x536b
movswl -0x1a(%rbp), %ecx
movswl -0x2c(%rbp), %eax
orl %ecx, %eax
movw %ax, -0x2c(%rbp)
jmp 0x5379
movswl -0x1a(%rbp), %ecx
movswl -0x22(%rbp), %eax
orl %ecx, %eax
movw %ax, -0x22(%rbp)
jmp 0x538d
movswl -0x1a(%rbp), %ecx
movswl -0x2c(%rbp), %eax
orl %ecx, %eax
movw %ax, -0x2c(%rbp)
movb $0x1, -0x29(%rbp)
jmp 0x53b3
cmpl $0x0, -0x28(%rbp)
je 0x539b
cmpl $0x0, -0x20(%rbp)
jne 0x53a3
movw $0x0, -0x22(%rbp)
jmp 0x53b1
movswl -0x1a(%rbp), %ecx
movswl -0x22(%rbp), %eax
orl %ecx, %eax
movw %ax, -0x22(%rbp)
jmp 0x53b3
jmp 0x5240
movw -0x2(%rbp), %ax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)