// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
callq 0x4500
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x20(%rbp)
movslq 0x102d5(%rip), %rcx     # 0x15160
leaq 0x1014e(%rip), %rax     # 0x14fe0
movsbl (%rax,%rcx), %eax
cmpl $0x2f, %eax
je 0x4ef7
movslq 0x102be(%rip), %rcx     # 0x15160
leaq 0x10137(%rip), %rax     # 0x14fe0
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x4ef7
movslq 0x102a7(%rip), %rcx     # 0x15160
leaq 0x10120(%rip), %rax     # 0x14fe0
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
je 0x4ef7
movslq 0x10290(%rip), %rcx     # 0x15160
leaq 0x10109(%rip), %rax     # 0x14fe0
movsbl (%rax,%rcx), %eax
cmpl $0x9, %eax
je 0x4ef7
movslq 0x10279(%rip), %rcx     # 0x15160
leaq 0x100f2(%rip), %rax     # 0x14fe0
movsbl (%rax,%rcx), %eax
cmpl $0x29, %eax
jne 0x4f00
movl -0x1c(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
callq 0x4500
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x3ffff, %eax          # imm = 0x3FFFF
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x18(%rbp)
movl -0x20(%rbp), %eax
orl $0x2, %eax
subl $0x7, %eax
je 0x4f31
jmp 0x4fd2
movl -0x18(%rbp), %eax
orl $0x2, %eax
subl $0x7, %eax
je 0x4f3e
jmp 0x4f4c
movl -0x14(%rbp), %eax
orl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0x4fd0
movl 0x844e(%rip), %eax      # 0xd3a0
andl $0x6000, %eax           # imm = 0x6000
movl -0x14(%rbp), %ecx
andl $0x6000, %ecx           # imm = 0x6000
cmpl %ecx, %eax
jne 0x4f74
movl -0x14(%rbp), %eax
andl $0x1fff, %eax           # imm = 0x1FFF
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0x4fce
movl -0x1c(%rbp), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x2000, %eax           # imm = 0x2000
jne 0x4f9f
movq -0x10(%rbp), %rsi
addq $0x4, %rsi
movl 0x101e7(%rip), %edx     # 0x15178
leaq 0x5e98(%rip), %rdi      # 0xae30
callq 0x4ca0
jmp 0x4fcc
movl 0x83fb(%rip), %esi      # 0xd3a0
movl -0x14(%rbp), %edx
andl $0x7fff, %edx           # imm = 0x7FFF
leaq 0x8403(%rip), %rdi      # 0xd3b8
callq 0x5cf0
orl $0x2000, %eax           # imm = 0x2000
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movb $0x1, 0x10338(%rip)     # 0x15304
jmp 0x4fce
jmp 0x4fd0
jmp 0x4ff4
movl -0x1c(%rbp), %eax
addl -0x14(%rbp), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x3ffff, -0x1c(%rbp)   # imm = 0x3FFFF
jl 0x4ff2
movl -0x1c(%rbp), %eax
addl $0x1, %eax
andl $0x3ffff, %eax          # imm = 0x3FFFF
movl %eax, -0x1c(%rbp)
jmp 0x4ff4
jmp 0x4e84
nopl (%rax)