// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/expr.c
// Function: primary_expr
static struct Expr *primary_expr(void)
{
  lword val = 0;
  int type = ABS;
  struct Expr *new;

  if (*s == '(') {
    s++;
    skip();
    new = expression();
    if (*s != ')')
      error(66,scriptname,line,')');  /* ')' expected */
    else
      s++;
    skip();
    return new;
  }

  if (isdigit((unsigned char)*s)) {
    /* octal, decimal or hex constant */
    if (s[0]=='0' && (s[1]=='x' || s[1]=='X')) {
      s += 2;
      while (isxdigit((unsigned char)*s)) {
        if (*s>='0' && *s<='9')
          val = (val<<4) + *s++ - '0';
        else if (*s>='a' && *s<='f')
          val = (val<<4) + *s++ - 'a' + 10;
        else
          val = (val<<4) + *s++ - 'A' + 10;
      }
    }
    else {
      int base = (*s=='0') ? 8 : 10;

      while (*s>='0' && *s<('0'+base)) {
        val = base*val + *s++ - '0';
      }
    }

    if (toupper((unsigned char)*s) == 'K') {
      val <<= 10;
      s++;
    }
    else if (toupper((unsigned char)*s) == 'M') {
      val <<= 20;
      s++;
    }
  }

  else {
    char *word;

    if (word = getarg(1)) {
      if (word[0]=='.' && word[1]=='\0') {  /* current address symbol '.' */
        if (caddr != -1) {
          if (caddr != -2) {
            val = caddr;
            type = REL;
          }
        }
        else {
          /* Address symbol '.' invalid outside SECTIONS block */
          error(101,scriptname,line);
        }
      }
      else {  /* otherwise it's possibly a function- or symbol-name */
        struct Symbol *sym;

        if (sym = findsymbol(gv,NULL,word)) {
          if (caddr==-1 && sym->type!=SYM_ABS) {
            /* Reference to non-absolute symbol */
            error(102,scriptname,line,sym->name);
          }
          else if (caddr != -2) {
            if (sym->type == SYM_ABS) {
              val = sym->value;
            }
            else if (sym->type==SYM_RELOC && sym->relsect->lnksec!=NULL) {
              val = (lword)sym->relsect->va + sym->value;
              type = REL;
            }
            else {
              /* Symbol is not yet assigned */
              error(106,scriptname,line,sym->name);
            }
          }
        }
        else {
          struct ScriptFunc *sfptr;

          for (sfptr=ldFunctions; sfptr->name; sfptr++) {
            if (!strcmp(sfptr->name,word))
              break;
          }
          if (sfptr->name) {
            if (caddr == -2) {
              if (getchr() == '(')
                skipblock(1,'(',')');
              else
                back(1);
            }
            else if (caddr != -1)
              type = sfptr->funcptr(gv,caddr,&val) ? ABS : REL;
            else
              error(105,scriptname,line);  /* No function-calls allowed here */
          }
          else
            error(104,scriptname,line,word);  /* Unknown symbol or function */
        }
      }
    }
    else
      error(78,scriptname,line);   /* missing argument */
  }

  skip();
  new = new_expr();
  new->type = type;
  new->val = val;
  return new;
}

// Assembly:
subq $0x48, %rsp
movq $0x0, 0x38(%rsp)
movl $0x15, 0x34(%rsp)
movq 0x2b1f4(%rip), %rax     # 0x44a60
movsbl (%rax), %eax
cmpl $0x28, %eax
jne 0x198ea
movq 0x2b1e5(%rip), %rax     # 0x44a60
addq $0x1, %rax
movq %rax, 0x2b1da(%rip)     # 0x44a60
callq 0x18610
callq 0x18aa0
movq %rax, 0x28(%rsp)
movq 0x2b1c4(%rip), %rax     # 0x44a60
movsbl (%rax), %eax
cmpl $0x29, %eax
je 0x198c4
movq 0x2b3d5(%rip), %rsi     # 0x44c80
movl 0x2b1b7(%rip), %edx     # 0x44a68
movl $0x42, %edi
movl $0x29, %ecx
movb $0x0, %al
callq 0x8c00
jmp 0x198d6
movq 0x2b195(%rip), %rax     # 0x44a60
addq $0x1, %rax
movq %rax, 0x2b18a(%rip)     # 0x44a60
callq 0x18610
movq 0x28(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0x19e31
callq 0x5260
movq (%rax), %rax
movq 0x2b167(%rip), %rcx     # 0x44a60
movzbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x19b5e
movq 0x2b148(%rip), %rax     # 0x44a60
movsbl (%rax), %eax
cmpl $0x30, %eax
jne 0x19a62
movq 0x2b135(%rip), %rax     # 0x44a60
movsbl 0x1(%rax), %eax
cmpl $0x78, %eax
je 0x19948
movq 0x2b125(%rip), %rax     # 0x44a60
movsbl 0x1(%rax), %eax
cmpl $0x58, %eax
jne 0x19a62
movq 0x2b111(%rip), %rax     # 0x44a60
addq $0x2, %rax
movq %rax, 0x2b106(%rip)     # 0x44a60
callq 0x5260
movq (%rax), %rax
movq 0x2b0f7(%rip), %rcx     # 0x44a60
movzbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
je 0x19a5d
movq 0x2b0d8(%rip), %rax     # 0x44a60
movsbl (%rax), %eax
cmpl $0x30, %eax
jl 0x199d2
movq 0x2b0c9(%rip), %rax     # 0x44a60
movsbl (%rax), %eax
cmpl $0x39, %eax
jg 0x199d2
movq 0x38(%rsp), %rax
shlq $0x4, %rax
movq 0x2b0b1(%rip), %rcx     # 0x44a60
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, 0x2b0a3(%rip)     # 0x44a60
movsbq (%rcx), %rcx
addq %rcx, %rax
subq $0x30, %rax
movq %rax, 0x38(%rsp)
jmp 0x19a58
movq 0x2b087(%rip), %rax     # 0x44a60
movsbl (%rax), %eax
cmpl $0x61, %eax
jl 0x19a24
movq 0x2b078(%rip), %rax     # 0x44a60
movsbl (%rax), %eax
cmpl $0x66, %eax
jg 0x19a24
movq 0x38(%rsp), %rax
shlq $0x4, %rax
movq 0x2b060(%rip), %rcx     # 0x44a60
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, 0x2b052(%rip)     # 0x44a60
movsbq (%rcx), %rcx
addq %rcx, %rax
subq $0x61, %rax
addq $0xa, %rax
movq %rax, 0x38(%rsp)
jmp 0x19a56
movq 0x38(%rsp), %rax
shlq $0x4, %rax
movq 0x2b02c(%rip), %rcx     # 0x44a60
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, 0x2b01e(%rip)     # 0x44a60
movsbq (%rcx), %rcx
addq %rcx, %rax
subq $0x41, %rax
addq $0xa, %rax
movq %rax, 0x38(%rsp)
jmp 0x19a58
jmp 0x1995a
jmp 0x19aed
movq 0x2aff7(%rip), %rax     # 0x44a60
movsbl (%rax), %edx
movl $0xa, %eax
movl $0x8, %ecx
cmpl $0x30, %edx
cmovel %ecx, %eax
movl %eax, 0x24(%rsp)
movq 0x2afd9(%rip), %rax     # 0x44a60
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x30, %ecx
movb %al, 0x7(%rsp)
jl 0x19aaf
movq 0x2afc4(%rip), %rax     # 0x44a60
movsbl (%rax), %eax
movl 0x24(%rsp), %ecx
addl $0x30, %ecx
cmpl %ecx, %eax
setl %al
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0x19ab9
jmp 0x19aeb
movslq 0x24(%rsp), %rax
imulq 0x38(%rsp), %rax
movq 0x2af95(%rip), %rcx     # 0x44a60
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, 0x2af87(%rip)     # 0x44a60
movsbq (%rcx), %rcx
addq %rcx, %rax
subq $0x30, %rax
movq %rax, 0x38(%rsp)
jmp 0x19a80
jmp 0x19aed
movq 0x2af6c(%rip), %rax     # 0x44a60
movzbl (%rax), %edi
callq 0x5070
cmpl $0x4b, %eax
jne 0x19b23
movq 0x38(%rsp), %rax
shlq $0xa, %rax
movq %rax, 0x38(%rsp)
movq 0x2af4a(%rip), %rax     # 0x44a60
addq $0x1, %rax
movq %rax, 0x2af3f(%rip)     # 0x44a60
jmp 0x19b59
movq 0x2af36(%rip), %rax     # 0x44a60
movzbl (%rax), %edi
callq 0x5070
cmpl $0x4d, %eax
jne 0x19b57
movq 0x38(%rsp), %rax
shlq $0x14, %rax
movq %rax, 0x38(%rsp)
movq 0x2af14(%rip), %rax     # 0x44a60
addq $0x1, %rax
movq %rax, 0x2af09(%rip)     # 0x44a60
jmp 0x19b59
jmp 0x19dff
movl $0x1, %edi
callq 0x18870
movq %rax, 0x18(%rsp)
cmpq $0x0, %rax
je 0x19de4
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x19bda
movq 0x18(%rsp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x19bda
cmpq $-0x1, 0x2b0d6(%rip)    # 0x44c70
je 0x19bbc
cmpq $-0x2, 0x2b0cc(%rip)    # 0x44c70
je 0x19bba
movq 0x2b0c3(%rip), %rax     # 0x44c70
movq %rax, 0x38(%rsp)
movl $0x16, 0x34(%rsp)
jmp 0x19bd5
movq 0x2b0bd(%rip), %rsi     # 0x44c80
movl 0x2ae9f(%rip), %edx     # 0x44a68
movl $0x65, %edi
movb $0x0, %al
callq 0x8c00
jmp 0x19de2
movq 0x2b097(%rip), %rdi     # 0x44c78
movq 0x18(%rsp), %rdx
xorl %eax, %eax
movl %eax, %esi
callq 0xf580
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
je 0x19cd9
cmpq $-0x1, 0x2b06a(%rip)    # 0x44c70
jne 0x19c3d
movq 0x10(%rsp), %rax
movzbl 0x40(%rax), %eax
cmpl $0x1, %eax
je 0x19c3d
movq 0x2b063(%rip), %rsi     # 0x44c80
movl 0x2ae45(%rip), %edx     # 0x44a68
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rcx
movl $0x66, %edi
movb $0x0, %al
callq 0x8c00
jmp 0x19cd4
cmpq $-0x2, 0x2b02b(%rip)    # 0x44c70
je 0x19cd2
movq 0x10(%rsp), %rax
movzbl 0x40(%rax), %eax
cmpl $0x1, %eax
jne 0x19c69
movq 0x10(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x38(%rsp)
jmp 0x19cd0
movq 0x10(%rsp), %rax
movzbl 0x40(%rax), %eax
cmpl $0x2, %eax
jne 0x19cac
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rax
cmpq $0x0, 0x18(%rax)
je 0x19cac
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x30(%rax), %rax
movq 0x10(%rsp), %rcx
addq 0x30(%rcx), %rax
movq %rax, 0x38(%rsp)
movl $0x16, 0x34(%rsp)
jmp 0x19cce
movq 0x2afcd(%rip), %rsi     # 0x44c80
movl 0x2adaf(%rip), %edx     # 0x44a68
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rcx
movl $0x6a, %edi
movb $0x0, %al
callq 0x8c00
jmp 0x19cd0
jmp 0x19cd2
jmp 0x19cd4
jmp 0x19de0
leaq 0x26000(%rip), %rax     # 0x3fce0
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpq $0x0, (%rax)
je 0x19d1b
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x18(%rsp), %rsi
callq 0x5130
cmpl $0x0, %eax
jne 0x19d09
jmp 0x19d1b
jmp 0x19d0b
movq 0x8(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x8(%rsp)
jmp 0x19ce5
movq 0x8(%rsp), %rax
cmpq $0x0, (%rax)
je 0x19dc0
cmpq $-0x2, 0x2af3e(%rip)    # 0x44c70
jne 0x19d63
callq 0x18790
movsbl %al, %eax
cmpl $0x28, %eax
jne 0x19d57
movl $0x1, %edi
movl $0x28, %esi
movl $0x29, %edx
callq 0x187c0
jmp 0x19d61
movl $0x1, %edi
callq 0x18830
jmp 0x19dbe
cmpq $-0x1, 0x2af05(%rip)    # 0x44c70
je 0x19da3
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x2aefb(%rip), %rdi     # 0x44c78
movq 0x2aeec(%rip), %rsi     # 0x44c70
leaq 0x38(%rsp), %rdx
callq *%rax
movl %eax, %edx
movl $0x16, %eax
movl $0x15, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, 0x34(%rsp)
jmp 0x19dbc
movq 0x2aed6(%rip), %rsi     # 0x44c80
movl 0x2acb8(%rip), %edx     # 0x44a68
movl $0x69, %edi
movb $0x0, %al
callq 0x8c00
jmp 0x19dbe
jmp 0x19dde
movq 0x2aeb9(%rip), %rsi     # 0x44c80
movl 0x2ac9b(%rip), %edx     # 0x44a68
movq 0x18(%rsp), %rcx
movl $0x68, %edi
movb $0x0, %al
callq 0x8c00
jmp 0x19de0
jmp 0x19de2
jmp 0x19dfd
movq 0x2ae95(%rip), %rsi     # 0x44c80
movl 0x2ac77(%rip), %edx     # 0x44a68
movl $0x4e, %edi
movb $0x0, %al
callq 0x8c00
jmp 0x19dff
callq 0x18610
callq 0x19060
movq %rax, 0x28(%rsp)
movl 0x34(%rsp), %ecx
movq 0x28(%rsp), %rax
movl %ecx, (%rax)
movq 0x38(%rsp), %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x28(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopl (%rax,%rax)