// File: /workspace/github_c_makefile_star2_O0/radekh[P]palbart/palbart-2.5.c
// Function: eval
SYM_T *eval()
{
  WORD16  digit;
  int     from;
  WORD16  loc;
  SYM_T  *sym;
  WORD16  val;

  val = 0;

  delimiter = line[lexterm];
  if( isalpha( line[lexstart] ))
  {
    sym = evalSymbol();
    if( M_UNDEFINED( sym->type ) && pass == 2 )
    {
      errorSymbol( &undefined_symbol, sym->name, lexstart );
      nextLexeme();
      return( sym );
    }
    else
    {
      nextLexeme();
      return( sym );
    }
  }
  else if( isdigit( line[lexstart] ))
  {
    from = lexstart;
    val = 0;
    while( from < lexterm )
    {
      if( isdigit( line[from] ))
      {
        digit = (WORD16) line[from++] - (WORD16) '0';
        if( digit < radix )
        {
          val = val * radix + digit;
        }
        else
        {
          errorLexeme( &number_not_radix, from - 1 );
          val = 0;
          from = lexterm;
        }
      }
      else
      {
        errorLexeme( &not_a_number, lexstart );
        val = 0;
        from = lexterm;
      }
    }
    nextLexeme();
    sym_eval.val = val;
    return( &sym_eval );
  }
  else
  {
    switch( line[lexstart] )
    {
    case '"':                   /* Character literal                          */
      if( cc + 2 < maxcc )
      {
        val = line[lexstart + 1] | 0200;
        delimiter = line[lexstart + 2];
        cc = lexstart + 2;
      }
      else
      {
        errorMessage( &no_literal_value, lexstart );
      }
      nextLexeme();
      break;

    case '.':                   /* Value of Current Location Counter          */
      val = clc + reloc;
      nextLexeme();
      break;

    case '[':                   /* Generate literal on page zero.             */
      if( !literals_on )
      {
        errorMessage( &literal_gen_off, lexstart );
      }
      nextLexBlank();           /* Skip bracket                               */
      val = (getExpr())->val & 07777;
      if( line[lexstart] == ']' )
      {
        nextLexBlank();         /* Skip end bracket                           */
      }
      else
      {
        /* errorMessage( "parens", lexstart );                                */
      }
      sym_eval.val = literals_on ? insertLiteral( &pz, val ) : 0;
      return( &sym_eval );

    case '(':                   /* Generate literal on current page.          */
      if( !literals_on )
      {
        errorMessage( &literal_gen_off, lexstart );
      }

      nextLexBlank();           /* Skip paren                                 */
      val = getExprs() & 07777;

      if( line[lexstart] == ')' )
      {
        nextLexBlank();         /* Skip end paren                             */
      }
      else
      {
        /* errorMessage( "parens", NULL );                                    */
      }

      loc = literals_on ? insertLiteral( &cp, val ) : 0;
      sym_eval.val = loc + (( clc + reloc ) & 077600 );
      return( &sym_eval );

    default:
      switch( line[lexstart] )
      {
      case '=':
        errorMessage( &illegal_equals, lexstart );
        moveToEndOfLine();
        break;

      default:
        errorMessage( &illegal_character, lexstart );
        break;
      }
      val = 0;                  /* On error, set value to zero.               */
      nextLexBlank();           /* Go past illegal character.                 */
    }
  }
  sym_eval.val = val;
  return( &sym_eval );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw $0x0, -0x22(%rbp)
movslq 0x69a3(%rip), %rcx      # 0xb768
leaq 0x6934(%rip), %rax      # 0xb700
movb (%rax,%rcx), %al
movb %al, 0x6997(%rip)       # 0xb76c
callq 0x1170
movq (%rax), %rax
movslq 0x697c(%rip), %rdx      # 0xb760
leaq 0x6915(%rip), %rcx      # 0xb700
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x4e5e
callq 0x3c10
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x1, %eax
je 0x4e4c
cmpl $0x2, 0x6442(%rip)      # 0xb260
jne 0x4e4c
movq -0x20(%rbp), %rsi
addq $0x4, %rsi
movl 0x6932(%rip), %edx      # 0xb760
leaq 0x61ab(%rip), %rdi      # 0xafe0
callq 0x37f0
callq 0x2cd0
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x5212
callq 0x2cd0
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x5212
callq 0x1170
movq (%rax), %rax
movslq 0x68f3(%rip), %rdx      # 0xb760
leaq 0x688c(%rip), %rcx      # 0xb700
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x4f86
movl 0x68cd(%rip), %eax      # 0xb760
movl %eax, -0x10(%rbp)
movw $0x0, -0x22(%rbp)
movl -0x10(%rbp), %eax
cmpl 0x68c3(%rip), %eax      # 0xb768
jge 0x4f66
callq 0x1170
movq (%rax), %rax
movslq -0x10(%rbp), %rdx
leaq 0x6842(%rip), %rcx      # 0xb700
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x4f40
movl -0x10(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x10(%rbp)
movslq %eax, %rcx
leaq 0x6818(%rip), %rax      # 0xb700
movsbl (%rax,%rcx), %eax
cwtl
subl $0x30, %eax
movw %ax, -0xa(%rbp)
movswl -0xa(%rbp), %eax
movswl 0x67fb(%rip), %ecx      # 0xb6fa
cmpl %ecx, %eax
jge 0x4f1d
movswl -0x22(%rbp), %eax
movswl 0x67ec(%rip), %ecx      # 0xb6fa
imull %ecx, %eax
movswl -0xa(%rbp), %ecx
addl %ecx, %eax
movw %ax, -0x22(%rbp)
jmp 0x4f3e
movl -0x10(%rbp), %esi
subl $0x1, %esi
leaq 0x6066(%rip), %rdi      # 0xaf90
callq 0x3910
movw $0x0, -0x22(%rbp)
movl 0x682d(%rip), %eax      # 0xb768
movl %eax, -0x10(%rbp)
jmp 0x4f61
movl 0x681a(%rip), %esi      # 0xb760
leaq 0x6033(%rip), %rdi      # 0xaf80
callq 0x3910
movw $0x0, -0x22(%rbp)
movl 0x680a(%rip), %eax      # 0xb768
movl %eax, -0x10(%rbp)
jmp 0x4e9c
callq 0x2cd0
movw -0x22(%rbp), %ax
movw %ax, 0x6186(%rip)       # 0xb0fc
leaq 0x6173(%rip), %rax      # 0xb0f0
movq %rax, -0x8(%rbp)
jmp 0x5212
movslq 0x67d3(%rip), %rax      # 0xb760
leaq 0x676c(%rip), %rcx      # 0xb700
movsbl (%rax,%rcx), %eax
movl %eax, -0x28(%rbp)
subl $0x22, %eax
je 0x4fcf
jmp 0x4fa2
movl -0x28(%rbp), %eax
subl $0x28, %eax
je 0x50fc
jmp 0x4fb0
movl -0x28(%rbp), %eax
subl $0x2e, %eax
je 0x5049
jmp 0x4fbe
movl -0x28(%rbp), %eax
subl $0x5b, %eax
je 0x5067
jmp 0x51ab
movl 0x67a3(%rip), %eax      # 0xb778
addl $0x2, %eax
cmpl 0x679e(%rip), %eax      # 0xb77c
jge 0x502d
movl 0x677a(%rip), %eax      # 0xb760
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x670d(%rip), %rax      # 0xb700
movsbl (%rax,%rcx), %eax
orl $0x80, %eax
movw %ax, -0x22(%rbp)
movl 0x675a(%rip), %eax      # 0xb760
addl $0x2, %eax
movslq %eax, %rcx
leaq 0x66ed(%rip), %rax      # 0xb700
movb (%rax,%rcx), %al
movb %al, 0x6750(%rip)       # 0xb76c
movl 0x673e(%rip), %eax      # 0xb760
addl $0x2, %eax
movl %eax, 0x674d(%rip)      # 0xb778
jmp 0x503f
movl 0x672d(%rip), %esi      # 0xb760
leaq 0x6066(%rip), %rdi      # 0xb0a0
callq 0x5220
callq 0x2cd0
jmp 0x51f8
movswl 0x6480(%rip), %eax      # 0xb4d0
movswl 0x647f(%rip), %ecx      # 0xb4d6
addl %ecx, %eax
movw %ax, -0x22(%rbp)
callq 0x2cd0
jmp 0x51f8
cmpb $0x0, 0x614c(%rip)      # 0xb1ba
jne 0x5082
movl 0x66ea(%rip), %esi      # 0xb760
leaq 0x6013(%rip), %rdi      # 0xb090
callq 0x5220
callq 0x3960
callq 0x2f70
movswl 0xc(%rax), %eax
andl $0xfff, %eax            # imm = 0xFFF
movw %ax, -0x22(%rbp)
movslq 0x66c0(%rip), %rcx      # 0xb760
leaq 0x6659(%rip), %rax      # 0xb700
movsbl (%rax,%rcx), %eax
cmpl $0x5d, %eax
jne 0x50b7
callq 0x3960
jmp 0x50b9
jmp 0x50b9
movzbl 0x60fa(%rip), %eax      # 0xb1ba
cmpl $0x0, %eax
je 0x50db
leaq 0x6510(%rip), %rdi      # 0xb5dc
movswl -0x22(%rbp), %esi
callq 0x4ce0
cwtl
movl %eax, -0x2c(%rbp)
jmp 0x50e2
xorl %eax, %eax
movl %eax, -0x2c(%rbp)
jmp 0x50e2
movl -0x2c(%rbp), %eax
movw %ax, 0x6010(%rip)       # 0xb0fc
leaq 0x5ffd(%rip), %rax      # 0xb0f0
movq %rax, -0x8(%rbp)
jmp 0x5212
cmpb $0x0, 0x60b7(%rip)      # 0xb1ba
jne 0x5117
movl 0x6655(%rip), %esi      # 0xb760
leaq 0x5f7e(%rip), %rdi      # 0xb090
callq 0x5220
callq 0x3960
callq 0x39d0
cwtl
andl $0xfff, %eax            # imm = 0xFFF
movw %ax, -0x22(%rbp)
movslq 0x662e(%rip), %rcx      # 0xb760
leaq 0x65c7(%rip), %rax      # 0xb700
movsbl (%rax,%rcx), %eax
cmpl $0x29, %eax
jne 0x5149
callq 0x3960
jmp 0x514b
jmp 0x514b
movzbl 0x6068(%rip), %eax      # 0xb1ba
cmpl $0x0, %eax
je 0x516d
leaq 0x637a(%rip), %rdi      # 0xb4d8
movswl -0x22(%rbp), %esi
callq 0x4ce0
cwtl
movl %eax, -0x30(%rbp)
jmp 0x5174
xorl %eax, %eax
movl %eax, -0x30(%rbp)
jmp 0x5174
movl -0x30(%rbp), %eax
movw %ax, -0x12(%rbp)
movswl -0x12(%rbp), %eax
movswl 0x634a(%rip), %ecx      # 0xb4d0
movswl 0x6349(%rip), %edx      # 0xb4d6
addl %edx, %ecx
andl $0x7f80, %ecx           # imm = 0x7F80
addl %ecx, %eax
movw %ax, 0x5f5e(%rip)       # 0xb0fc
leaq 0x5f4b(%rip), %rax      # 0xb0f0
movq %rax, -0x8(%rbp)
jmp 0x5212
movslq 0x65ae(%rip), %rax      # 0xb760
leaq 0x6547(%rip), %rcx      # 0xb700
movb (%rax,%rcx), %al
subb $0x3d, %al
jne 0x51db
jmp 0x51c2
movl 0x6598(%rip), %esi      # 0xb760
leaq 0x5de1(%rip), %rdi      # 0xafb0
callq 0x5220
callq 0x52c0
jmp 0x51ed
movl 0x657f(%rip), %esi      # 0xb760
leaq 0x5d68(%rip), %rdi      # 0xaf50
callq 0x5220
movw $0x0, -0x22(%rbp)
callq 0x3960
jmp 0x51fa
jmp 0x51fc
movw -0x22(%rbp), %ax
movw %ax, 0x5ef5(%rip)       # 0xb0fc
leaq 0x5ee2(%rip), %rax      # 0xb0f0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)