// File: /workspace/github_c_makefile_star2_O3/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 0x9ab8(%rip), %rax      # 0xd81c
leaq 0x9a25(%rip), %rbx      # 0xd790
movb (%rax,%rbx), %al
movb %al, 0x9aac(%rip)       # 0xd820
movslq 0x9a99(%rip), %rax      # 0xd814
movzbl (%rax,%rbx), %eax
cmpl $0x2b, %eax
je 0x3db3
cmpl $0x2d, %eax
jne 0x3db8
callq 0x44ee
callq 0x57e6
movups (%rax), %xmm0
movups %xmm0, 0x7563(%rip)     # 0xb300
movq 0x10(%rax), %rax
movq %rax, 0x7568(%rip)      # 0xb310
xorl %eax, %eax
subw 0x755b(%rip), %ax       # 0xb30c
jmp 0x3dd9
callq 0x44ee
callq 0x57e6
movups (%rax), %xmm0
movups %xmm0, 0x7539(%rip)     # 0xb300
movq 0x10(%rax), %rax
movq %rax, 0x753e(%rip)      # 0xb310
movzwl 0x7533(%rip), %eax      # 0xb30c
andl $0xfff, %eax            # imm = 0xFFF
movw %ax, 0x7527(%rip)       # 0xb30c
movzbl 0x9a34(%rip), %eax      # 0xd820
movabsq $0x4000000100001200, %r14 # imm = 0x4000000100001200
cmpq $0x3e, %rax
ja 0x3e0f
btq %rax, %r14
jae 0x3e0f
leaq 0x74f7(%rip), %rax      # 0xb300
popq %rbx
popq %r14
popq %r15
retq
leaq 0x325a(%rip), %r15      # 0x7070
cmpb $0x3e, %al
ja 0x3e23
movzbl %al, %eax
btq %rax, %r14
jb 0x3e02
movslq 0x99ea(%rip), %rsi      # 0xd814
movzbl (%rsi,%rbx), %eax
cmpl $0x3a, %eax
jg 0x3e62
leal -0x21(%rax), %ecx
cmpl $0xe, %ecx
ja 0x3f50
movslq (%r15,%rcx,4), %rax
addq %r15, %rax
jmpq *%rax
callq 0x44ee
callq 0x57e6
movzwl 0xc(%rax), %ecx
orw %cx, 0x74af(%rip)       # 0xb30c
jmp 0x3f08
cmpl $0x5d, %eax
jle 0x3f34
cmpl $0x5e, %eax
jne 0x3f61
callq 0x44ee
callq 0x57e6
movzwl 0x7487(%rip), %ecx      # 0xb30c
imulw 0xc(%rax), %cx
movw %cx, 0x747b(%rip)       # 0xb30c
jmp 0x3f08
callq 0x44ee
callq 0x57e6
movzwl 0xc(%rax), %ecx
subw %cx, 0x7464(%rip)       # 0xb30c
jmp 0x3f08
callq 0x44ee
callq 0x57e6
movq %rax, %rcx
movswl 0xc(%rax), %esi
movswl 0x744a(%rip), %eax      # 0xb30c
cltd
idivl %esi
movw %ax, 0x7440(%rip)       # 0xb30c
cmpl $0x0, 0x742d(%rip)      # 0xb300
je 0x3f16
cmpl $0x0, (%rcx)
jne 0x3f29
jmp 0x3f16
callq 0x44ee
callq 0x57e6
movzwl 0xc(%rax), %ecx
andw %cx, 0x741b(%rip)       # 0xb30c
jmp 0x3f08
callq 0x44ee
callq 0x57e6
movzwl 0xc(%rax), %ecx
addw %cx, 0x7404(%rip)       # 0xb30c
cmpl $0x0, 0x73f1(%rip)      # 0xb300
je 0x3f16
cmpl $0x0, (%rax)
jne 0x3f29
movw $0x0, 0x73ed(%rip)      # 0xb30c
movl $0x0, 0x73d7(%rip)      # 0xb300
movb 0x98f1(%rip), %al       # 0xd820
jmp 0x3e16
leal -0x3b(%rax), %ecx
cmpl $0x2, %ecx
jb 0x3e02
cmpl $0x3d, %eax
je 0x3f91
cmpl $0x5d, %eax
je 0x3e02
jmp 0x3f61
testl %eax, %eax
je 0x3e02
cmpl $0xa, %eax
je 0x3e02
leaq 0x71e0(%rip), %rdi      # 0xb148
callq 0x5ac8
movslq 0x98b8(%rip), %rax      # 0xd82c
leal 0x1(%rax), %ecx
movzbl (%rax,%rbx), %edx
testl %edx, %edx
je 0x3fc1
cmpl $0xa, %edx
je 0x3fc1
incq %rax
movl %ecx, 0x989f(%rip)      # 0xd82c
incl %ecx
jmp 0x3f77
leaq 0x7200(%rip), %rdi      # 0xb198
callq 0x5ac8
movslq 0x9888(%rip), %rax      # 0xd82c
leal 0x1(%rax), %ecx
movzbl (%rax,%rbx), %edx
testl %edx, %edx
je 0x3fc1
cmpl $0xa, %edx
je 0x3fc1
incq %rax
movl %ecx, 0x986f(%rip)      # 0xd82c
incl %ecx
jmp 0x3fa7
movl %eax, 0x984d(%rip)      # 0xd814
movl %eax, 0x984f(%rip)      # 0xd81c
movl %eax, 0x9851(%rip)      # 0xd824
movw $0x0, 0x7330(%rip)      # 0xb30c
jmp 0x3e02