// File: /workspace/github_c_makefile_star2_O1/AK6DN[P]dec-utilities-for-pdp/palbart/palbart.c
// Function: getExpr
SYM_T *getExpr()
{
  SYM_T *sym;
  delimiter = line[lexterm];


  if( line[lexstart] == '-' )
  {
    nextLexBlank();
    sym_getexpr = *(eval());
    sym_getexpr.val = ( - sym_getexpr.val ) & 07777;
  }
  else
  {
    if( line[lexstart] == '+' )
    {
      nextLexBlank();
    }
    sym_getexpr = *(eval());
    sym_getexpr.val = sym_getexpr.val & 07777;
  }

  if( is_blank( delimiter ))
  {
    return( &sym_getexpr );
  }

  /* Here we assume the current lexeme is the operator separating the         */
  /* previous operator from the next, if any.                                 */
  while( TRUE )
  {
    /* assert line[lexstart] == delimiter                                     */
    if( is_blank( delimiter ))
    {
      return( &sym_getexpr );
    }

    switch( line[lexstart] )
    {
    case '+':                   /* add                                        */
      nextLexBlank();           /* skip over the operator                     */
      sym = eval();
      sym_getexpr.val += sym->val;
      if (sym_getexpr.type == UNDEFINED || sym->type == UNDEFINED) {
         sym_getexpr.val = 0;
         sym_getexpr.type = UNDEFINED;
      }
      break;

    case '-':                   /* subtract                                   */
      nextLexBlank();           /* skip over the operator                     */
      sym = eval();
      sym_getexpr.val -= sym->val;
      if (sym_getexpr.type == UNDEFINED || sym->type == UNDEFINED) {
         sym_getexpr.val = 0;
         sym_getexpr.type = UNDEFINED;
      }
      break;

    case '^':                   /* multiply                                   */
      nextLexBlank();           /* skip over the operator                     */
      sym = eval();
      sym_getexpr.val *= sym->val;
      if (sym_getexpr.type == UNDEFINED || sym->type == UNDEFINED) {
         sym_getexpr.val = 0;
         sym_getexpr.type = UNDEFINED;
      }
      break;

    case '%':                   /* divide                                     */
      nextLexBlank();           /* skip over the operator                     */
      sym = eval();
      sym_getexpr.val /= sym->val;
      if (sym_getexpr.type == UNDEFINED || sym->type == UNDEFINED) {
         sym_getexpr.val = 0;
         sym_getexpr.type = UNDEFINED;
      }
      break;

    case '&':                   /* and                                        */
      nextLexBlank();           /* skip over the operator                     */
      sym = eval();
      sym_getexpr.val &= sym->val;
      if (sym_getexpr.type == UNDEFINED || sym->type == UNDEFINED) {
         sym_getexpr.val = 0;
         sym_getexpr.type = UNDEFINED;
      }
      break;

    case '!':                   /* or                                         */
      nextLexBlank();           /* skip over the operator                     */
      sym = eval();
      sym_getexpr.val |= sym->val;
      if (sym_getexpr.type == UNDEFINED || sym->type == UNDEFINED) {
         sym_getexpr.val = 0;
         sym_getexpr.type = UNDEFINED;
      }
      break;

    default:
      if( isend( line[lexstart] ))
      {
        return( &sym_getexpr );
      }

      switch( line[lexstart] )
      {
      case '/':
      case ';':
      case ')':
      case ']':
      case '<':
        break;

      case '=':
        errorMessage( &illegal_equals, lexstart );
        moveToEndOfLine();
        sym_getexpr.val = 0;
        break;

      default:
        errorMessage( &illegal_expression, lexstart );
        moveToEndOfLine();
        sym_getexpr.val = 0;
        break;
      }
      return( &sym_getexpr );
    }
  } /* end while                                                              */
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movslq 0x9b15(%rip), %rax      # 0xd81c
leaq 0x9a82(%rip), %rbx      # 0xd790
movb (%rax,%rbx), %al
movb %al, 0x9b09(%rip)       # 0xd820
movslq 0x9af6(%rip), %rax      # 0xd814
movzbl (%rax,%rbx), %eax
cmpl $0x2b, %eax
je 0x3d56
cmpl $0x2d, %eax
jne 0x3d5b
callq 0x4498
callq 0x57be
movups (%rax), %xmm0
movups %xmm0, 0x75c0(%rip)     # 0xb300
movq 0x10(%rax), %rax
movq %rax, 0x75c5(%rip)      # 0xb310
xorl %eax, %eax
subw 0x75b8(%rip), %ax       # 0xb30c
jmp 0x3d7c
callq 0x4498
callq 0x57be
movups (%rax), %xmm0
movups %xmm0, 0x7596(%rip)     # 0xb300
movq 0x10(%rax), %rax
movq %rax, 0x759b(%rip)      # 0xb310
movzwl 0x7590(%rip), %eax      # 0xb30c
andl $0xfff, %eax            # imm = 0xFFF
movw %ax, 0x7584(%rip)       # 0xb30c
movzbl 0x9a91(%rip), %eax      # 0xd820
movabsq $0x4000000100001200, %r14 # imm = 0x4000000100001200
cmpq $0x3e, %rax
ja 0x3db2
btq %rax, %r14
jae 0x3db2
leaq 0x7554(%rip), %rax      # 0xb300
popq %rbx
popq %r14
popq %r15
retq
leaq 0x32b7(%rip), %r15      # 0x7070
movzbl 0x9a60(%rip), %eax      # 0xd820
cmpq $0x3e, %rax
ja 0x3dcc
btq %rax, %r14
jb 0x3da5
movslq 0x9a41(%rip), %rsi      # 0xd814
movzbl (%rsi,%rbx), %eax
cmpl $0x3a, %eax
jg 0x3e0b
leal -0x21(%rax), %ecx
cmpl $0xe, %ecx
ja 0x3efb
movslq (%r15,%rcx,4), %rax
addq %r15, %rax
jmpq *%rax
callq 0x4498
callq 0x57be
movzwl 0xc(%rax), %ecx
orw %cx, 0x7506(%rip)       # 0xb30c
jmp 0x3eb5
cmpl $0x5d, %eax
jle 0x3edf
cmpl $0x5e, %eax
jne 0x3f0c
callq 0x4498
callq 0x57be
movzwl 0x74de(%rip), %ecx      # 0xb30c
imulw 0xc(%rax), %cx
movw %cx, 0x74d2(%rip)       # 0xb30c
jmp 0x3eb5
callq 0x4498
callq 0x57be
movzwl 0xc(%rax), %ecx
subw %cx, 0x74bb(%rip)       # 0xb30c
jmp 0x3eb5
callq 0x4498
callq 0x57be
movq %rax, %rcx
movswl 0xc(%rax), %esi
movswl 0x74a1(%rip), %eax      # 0xb30c
cltd
idivl %esi
movw %ax, 0x7497(%rip)       # 0xb30c
cmpl $0x0, 0x7484(%rip)      # 0xb300
je 0x3ec7
cmpl $0x0, (%rcx)
jne 0x3db9
jmp 0x3ec7
callq 0x4498
callq 0x57be
movzwl 0xc(%rax), %ecx
andw %cx, 0x746e(%rip)       # 0xb30c
jmp 0x3eb5
callq 0x4498
callq 0x57be
movzwl 0xc(%rax), %ecx
addw %cx, 0x7457(%rip)       # 0xb30c
cmpl $0x0, 0x7444(%rip)      # 0xb300
je 0x3ec7
cmpl $0x0, (%rax)
jne 0x3db9
movw $0x0, 0x743c(%rip)      # 0xb30c
movl $0x0, 0x7426(%rip)      # 0xb300
jmp 0x3db9
leal -0x3b(%rax), %ecx
cmpl $0x2, %ecx
jb 0x3da5
cmpl $0x3d, %eax
je 0x3f3c
cmpl $0x5d, %eax
je 0x3da5
jmp 0x3f0c
testl %eax, %eax
je 0x3da5
cmpl $0xa, %eax
je 0x3da5
leaq 0x7235(%rip), %rdi      # 0xb148
callq 0x5ab5
movslq 0x990d(%rip), %rax      # 0xd82c
leal 0x1(%rax), %ecx
movzbl (%rax,%rbx), %edx
testl %edx, %edx
je 0x3f6c
cmpl $0xa, %edx
je 0x3f6c
incq %rax
movl %ecx, 0x98f4(%rip)      # 0xd82c
incl %ecx
jmp 0x3f22
leaq 0x7255(%rip), %rdi      # 0xb198
callq 0x5ab5
movslq 0x98dd(%rip), %rax      # 0xd82c
leal 0x1(%rax), %ecx
movzbl (%rax,%rbx), %edx
testl %edx, %edx
je 0x3f6c
cmpl $0xa, %edx
je 0x3f6c
incq %rax
movl %ecx, 0x98c4(%rip)      # 0xd82c
incl %ecx
jmp 0x3f52
movl %eax, 0x98a2(%rip)      # 0xd814
movl %eax, 0x98a4(%rip)      # 0xd81c
movl %eax, 0x98a6(%rip)      # 0xd824
movw $0x0, 0x7385(%rip)      # 0xb30c
jmp 0x3da5