// File: /workspace/github_c_makefile_star2_O3/simh[P]simtools/crossassemblers/macro7/macro7.c
// Function: getExpr
SYM_T *getExpr()
{
  delimiter = line[lexterm];

  if( line[lexstart] == '-' )
  {
    nextLexBlank();
    sym_getexpr = *(eval());
    sym_getexpr.val = sym_getexpr.val ^ 0777777;
  }
  else
  {
    sym_getexpr = *(eval());
  }


  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_getexpr.val += (eval())->val;
      if( sym_getexpr.val >= 01000000 )
      {
        sym_getexpr.val = ( sym_getexpr.val + 1 ) & 0777777;
      }
      break;

    case '-':                   /* subtract                                   */
      nextLexBlank();           /* skip over the operator                     */
      sym_getexpr.val = sym_getexpr.val +
        ( (eval())->val ^ 0777777 );
      if( sym_getexpr.val >= 01000000 )
      {
        sym_getexpr.val = ( sym_getexpr.val + 1 ) & 0777777;
      }
      break;

    case '^':                   /* multiply                                   */
      nextLexBlank();           /* skip over the operator                     */
      sym_getexpr.val *= (eval())->val;
      break;

    case '%':                   /* divide                                     */
      nextLexBlank();           /* skip over the operator                     */
      sym_getexpr.val /= (eval())->val;
      break;

    case '&':                   /* and                                        */
      nextLexBlank();           /* skip over the operator                     */
      sym_getexpr.val &= (eval())->val;
      break;

    case '!':                   /* or                                         */
      nextLexBlank();           /* skip over the operator                     */
      sym_getexpr.val |= (eval())->val;
      break;

    default:
      if( isend( line[lexstart] ))
      {
        return( &sym_getexpr );
      }

      switch( line[lexstart] )
      {
      case '/':
      case '\t':
      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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movslq 0x107be(%rip), %rax     # 0x14130
leaq 0x10627(%rip), %rbx     # 0x13fa0
movb (%rax,%rbx), %al
movb %al, 0x107b2(%rip)      # 0x14134
movslq 0x10797(%rip), %rax     # 0x14120
cmpb $0x2d, (%rax,%rbx)
jne 0x39ba
callq 0x3f6c
callq 0x49f1
movups (%rax), %xmm0
movups %xmm0, 0x65f5(%rip)     # 0x9f98
movq 0x10(%rax), %rax
movq %rax, 0x65fa(%rip)      # 0x9fa8
xorl $0x3ffff, 0x65ec(%rip)  # imm = 0x3FFFF
jmp 0x39d4
callq 0x49f1
movups (%rax), %xmm0
movups %xmm0, 0x65cf(%rip)     # 0x9f98
movq 0x10(%rax), %rax
movq %rax, 0x65d4(%rip)      # 0x9fa8
movzbl 0x10759(%rip), %eax     # 0x14134
movabsq $0x4000000100001000, %r14 # imm = 0x4000000100001000
cmpq $0x3e, %rax
ja 0x3a01
btq %rax, %r14
jae 0x3a01
leaq 0x65a0(%rip), %rax      # 0x9f98
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2608(%rip), %r15      # 0x6010
movl $0x3ffff, %ebp          # imm = 0x3FFFF
cmpb $0x3e, %al
ja 0x3a1a
movzbl %al, %eax
btq %rax, %r14
jb 0x39f1
movslq 0x106ff(%rip), %rsi     # 0x14120
movzbl (%rsi,%rbx), %eax
cmpl $0x24, %eax
jle 0x3a57
leal -0x25(%rax), %ecx
cmpl $0x18, %ecx
ja 0x3a78
movslq (%r15,%rcx,4), %rax
addq %r15, %rax
jmpq *%rax
callq 0x3f6c
callq 0x49f1
movq %rax, %rcx
movl 0x6556(%rip), %eax      # 0x9fa4
cltd
idivl 0xc(%rcx)
jmp 0x3af7
cmpl $0x21, %eax
jne 0x3b08
callq 0x3f6c
callq 0x49f1
movq %rax, %rcx
movl 0x6531(%rip), %eax      # 0x9fa4
orl 0xc(%rcx), %eax
jmp 0x3af7
cmpl $0x5e, %eax
jne 0x3b1c
callq 0x3f6c
callq 0x49f1
movq %rax, %rcx
movl 0x6510(%rip), %eax      # 0x9fa4
imull 0xc(%rcx), %eax
jmp 0x3af7
callq 0x3f6c
callq 0x49f1
movq %rax, %rcx
movl 0x64f7(%rip), %eax      # 0x9fa4
addl 0xc(%rcx), %eax
jmp 0x3ae3
callq 0x3f6c
callq 0x49f1
movq %rax, %rcx
movl 0x64df(%rip), %eax      # 0x9fa4
andl 0xc(%rcx), %eax
jmp 0x3af7
callq 0x3f6c
movl 0x64ce(%rip), %r12d     # 0x9fa4
callq 0x49f1
movl 0xc(%rax), %eax
xorl %ebp, %eax
addl %r12d, %eax
movl %eax, 0x64bb(%rip)      # 0x9fa4
cmpl $0x40000, %eax          # imm = 0x40000
jl 0x3afd
incl %eax
andl $0x3ffff, %eax          # imm = 0x3FFFF
movl %eax, 0x64a7(%rip)      # 0x9fa4
movb 0x10631(%rip), %al      # 0x14134
jmp 0x3a0d
leal -0x9(%rax), %ecx
cmpl $0x2, %ecx
jb 0x39f1
testl %eax, %eax
je 0x39f1
leaq 0x62bd(%rip), %rdi      # 0x9de0
callq 0x4d39
movslq 0x105fd(%rip), %rax     # 0x1412c
leal 0x1(%rax), %ecx
movzbl (%rax,%rbx), %edx
testl %edx, %edx
je 0x3b7c
cmpl $0xa, %edx
je 0x3b7c
incq %rax
movl %ecx, 0x105e4(%rip)     # 0x1412c
incl %ecx
jmp 0x3b32
leaq 0x62dd(%rip), %rdi      # 0x9e30
callq 0x4d39
movslq 0x105cd(%rip), %rax     # 0x1412c
leal 0x1(%rax), %ecx
movzbl (%rax,%rbx), %edx
testl %edx, %edx
je 0x3b7c
cmpl $0xa, %edx
je 0x3b7c
incq %rax
movl %ecx, 0x105b4(%rip)     # 0x1412c
incl %ecx
jmp 0x3b62
movl %eax, 0x1059e(%rip)     # 0x14120
movl %eax, 0x105a8(%rip)     # 0x14130
movl %eax, 0x105aa(%rip)     # 0x14138
movl $0x0, 0x640c(%rip)      # 0x9fa4
jmp 0x39f1