// File: /workspace/github_c_makefile_star2_O1/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 0x107b5(%rip), %rax     # 0x14130
leaq 0x1061e(%rip), %rbx     # 0x13fa0
movb (%rax,%rbx), %al
movb %al, 0x107a9(%rip)      # 0x14134
movslq 0x1078e(%rip), %rax     # 0x14120
cmpb $0x2d, (%rax,%rbx)
jne 0x39c3
callq 0x3f87
callq 0x4a26
movups (%rax), %xmm0
movups %xmm0, 0x65ec(%rip)     # 0x9f98
movq 0x10(%rax), %rax
movq %rax, 0x65f1(%rip)      # 0x9fa8
xorl $0x3ffff, 0x65e3(%rip)  # imm = 0x3FFFF
jmp 0x39dd
callq 0x4a26
movups (%rax), %xmm0
movups %xmm0, 0x65c6(%rip)     # 0x9f98
movq 0x10(%rax), %rax
movq %rax, 0x65cb(%rip)      # 0x9fa8
movzbl 0x10750(%rip), %eax     # 0x14134
movabsq $0x4000000100001000, %r14 # imm = 0x4000000100001000
cmpq $0x3e, %rax
ja 0x3a0a
btq %rax, %r14
jae 0x3a0a
leaq 0x6597(%rip), %rax      # 0x9f98
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x25ff(%rip), %r15      # 0x6010
movl $0x3ffff, %ebp          # imm = 0x3FFFF
movzbl 0x10717(%rip), %eax     # 0x14134
cmpq $0x3e, %rax
ja 0x3a29
btq %rax, %r14
jb 0x39fa
movslq 0x106f0(%rip), %rsi     # 0x14120
movzbl (%rsi,%rbx), %eax
cmpl $0x24, %eax
jle 0x3a66
leal -0x25(%rax), %ecx
cmpl $0x18, %ecx
ja 0x3a8a
movslq (%r15,%rcx,4), %rax
addq %r15, %rax
jmpq *%rax
callq 0x3f87
callq 0x4a26
movq %rax, %rcx
movl 0x6547(%rip), %eax      # 0x9fa4
cltd
idivl 0xc(%rcx)
jmp 0x3b0d
cmpl $0x21, %eax
jne 0x3b18
callq 0x3f87
callq 0x4a26
movq %rax, %rcx
movl 0x6522(%rip), %eax      # 0x9fa4
orl 0xc(%rcx), %eax
jmp 0x3b0d
cmpl $0x5e, %eax
jne 0x3b2c
callq 0x3f87
callq 0x4a26
movq %rax, %rcx
movl 0x64fe(%rip), %eax      # 0x9fa4
imull 0xc(%rcx), %eax
jmp 0x3b0d
callq 0x3f87
callq 0x4a26
movq %rax, %rcx
movl 0x64e5(%rip), %eax      # 0x9fa4
addl 0xc(%rcx), %eax
jmp 0x3af5
callq 0x3f87
callq 0x4a26
movq %rax, %rcx
movl 0x64cd(%rip), %eax      # 0x9fa4
andl 0xc(%rcx), %eax
jmp 0x3b0d
callq 0x3f87
movl 0x64bc(%rip), %r12d     # 0x9fa4
callq 0x4a26
movl 0xc(%rax), %eax
xorl %ebp, %eax
addl %r12d, %eax
movl %eax, 0x64a9(%rip)      # 0x9fa4
cmpl $0x40000, %eax          # imm = 0x40000
jl 0x3a16
incl %eax
andl $0x3ffff, %eax          # imm = 0x3FFFF
movl %eax, 0x6491(%rip)      # 0x9fa4
jmp 0x3a16
leal -0x9(%rax), %ecx
cmpl $0x2, %ecx
jb 0x39fa
testl %eax, %eax
je 0x39fa
leaq 0x62ad(%rip), %rdi      # 0x9de0
callq 0x4d89
movslq 0x105ed(%rip), %rax     # 0x1412c
leal 0x1(%rax), %ecx
movzbl (%rax,%rbx), %edx
testl %edx, %edx
je 0x3b8c
cmpl $0xa, %edx
je 0x3b8c
incq %rax
movl %ecx, 0x105d4(%rip)     # 0x1412c
incl %ecx
jmp 0x3b42
leaq 0x62cd(%rip), %rdi      # 0x9e30
callq 0x4d89
movslq 0x105bd(%rip), %rax     # 0x1412c
leal 0x1(%rax), %ecx
movzbl (%rax,%rbx), %edx
testl %edx, %edx
je 0x3b8c
cmpl $0xa, %edx
je 0x3b8c
incq %rax
movl %ecx, 0x105a4(%rip)     # 0x1412c
incl %ecx
jmp 0x3b72
movl %eax, 0x1058e(%rip)     # 0x14120
movl %eax, 0x10598(%rip)     # 0x14130
movl %eax, 0x1059a(%rip)     # 0x14138
movl $0x0, 0x63fc(%rip)      # 0x9fa4
jmp 0x39fa