// File: /workspace/github_c_makefile_star2_O2/simh[P]simtools/crossassemblers/macro7/macro7.c
// Function: getExprs
WORD32 getExprs()
{
  SYM_T  *symv;
  SYM_T  *symt;
  WORD32  temp;
  SYMTYP  temp_type;
  WORD32  value;
  SYMTYP  value_type;

  symv = getExpr();
  value = symv->val;
  value_type = symv->type;

  while( TRUE )
  {
    if( isdone( line[lexstart] ) || line[lexstart] == ')' )
    {
      return( value );
    }

    /* Interpret space as add */
    symt = getExpr();
    temp = symt->val & 0777777;
    temp_type = symt->type;

    switch( value_type )
    {
    case MRI:
    case MRIFIX:
      /* Previous symbol was a Memory Reference Instruction.                  */
      switch( temp_type )
      {
      case MRI:
      case MRIFIX:
        /* Current symbol is also a Memory Reference Instruction.             */
        value |= temp;          /* Just OR the MRI instructions.              */
        break;

      default:
        /* Now have the address part of the MRI instruction.                  */
        if(( clc & 060000) == ( temp & 060000))
        {
          value += ( temp & ADDRESS_FIELD );        /* In range MRI.          */
        }
        else
        {
          if(( value & INDIRECT_BIT ) == INDIRECT_BIT )
          {
            /* Already indirect, can't generate                               */
            errorSymbol( &illegal_indirect, symt->name, lexstartprev );
          }
          else
          {
            /* Now fix off page reference.                                  */
            /* Search current page literal pool for needed value.           */
            /* Set Indirect                                                 */
            value += ( INDIRECT_BIT | insertLiteral( &cp, clc, temp & 077777));
            indirect_generated = TRUE;
          }
        }
        break;
      }
      break;

    default:
        value = value + temp;          /* Normal 18 bit value.                */
        if( value >= 0777777 ) value = ( value + 1 ) & 0777777;
        break;
    }
  } /* end while                                                              */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0x37cd
movl 0x61df(%rip), %ebx      # 0x9f94
movl 0x61cd(%rip), %ebp      # 0x9f88
leaq 0x101ce(%rip), %r13     # 0x13f90
orl $0x2, %ebp
leaq 0x6064(%rip), %r15      # 0x9e30
leaq 0x61b9(%rip), %r12      # 0x9f8c
movabsq $0x820000000601, %r14   # imm = 0x820000000601
movslq 0x1032c(%rip), %rax     # 0x14110
movzbl (%rax,%r13), %eax
cmpq $0x2f, %rax
ja 0x3df9
btq %rax, %r14
jb 0x3e95
callq 0x37cd
movl 0x6190(%rip), %edx      # 0x9f94
cmpl $0x7, %ebp
jne 0x3e77
movl 0x6179(%rip), %eax      # 0x9f88
orl $0x2, %eax
cmpl $0x7, %eax
je 0x3e3e
movl 0x8533(%rip), %eax      # 0xc350
xorl %edx, %eax
testw $0x6000, %ax            # imm = 0x6000
je 0x3e48
btl $0xd, %ebx
jae 0x3e52
movl 0x102f7(%rip), %edx     # 0x14128
movq %r15, %rdi
movq %r12, %rsi
callq 0x3c3b
jmp 0x3ddd
andl $0x3ffff, %edx          # imm = 0x3FFFF
orl %edx, %ebx
jmp 0x3ddd
andl $0x1fff, %edx           # imm = 0x1FFF
addl %edx, %ebx
jmp 0x3ddd
andl $0x7fff, %edx           # imm = 0x7FFF
leaq 0x8509(%rip), %rdi      # 0xc368
callq 0x4660
orl $0x2000, %eax           # imm = 0x2000
addl %eax, %ebx
movb $0x1, 0x10442(%rip)     # 0x142b4
jmp 0x3ddd
movl $0x3ffff, %eax          # imm = 0x3FFFF
andl %eax, %edx
addl %edx, %ebx
cmpl %eax, %ebx
jl 0x3ddd
incl %ebx
andl $0x3ffff, %ebx          # imm = 0x3FFFF
jmp 0x3ddd
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq