// File: /workspace/github_c_makefile_star2_O2/42Bastian[P]lyxass/expression.c
// Function: uni
int uni(int64_t *value)
{
  int err;
  char save;
  int64_t a = 0;


  KillSpace();

  save = atom;

  if ( atom == '-' || atom == '!' || atom == '~' ||
       atom == '>' || atom == '<' ){
    GetAtom();
  }

  switch ( atom ){
  case '$' :
    GetAtom();
    err = gethex( &a );
    break;
  case '%':
    GetAtom();
    err = getbin( &a );
    break;
  case '*':
    GetAtom();
    a = Global.pc;
    err = EXPR_OK;
    break;
  case '@':
    GetAtom();
    a = Global.var;
    err = EXPR_OK;
    break;
  case '"':
  {
    char help[80];
    char *ptr = help;
    int i = 5;

    GetAtom();
    if ( !GetString(help, '"') ){
      Error(SYNTAX_ERR, "Missing '\"'" );
      return EXPR_ERROR;
    }
    while ( *ptr && --i){
      a = (a<<8)| (int)*ptr++;
    }

    err = EXPR_OK;
  }
  break;
  case '\'':
  {
    char help[80];
    char *ptr = help;
    int i = 5;

    GetAtom();
    if ( !GetString(help, '\'') ){
      Error(SYNTAX_ERR, "Missing \"'\"");
      return EXPR_ERROR;
    }
    while ( *ptr && --i){
      a = (a<<8)| (int)*ptr++;
    }

    err = EXPR_OK;
  }
  break;
  case '(':
    GetAtom();
    err = sum( &a );
    if ( !TestAtom(')') ){
      Error(EXPR_ERR,"");
      return EXPR_ERR;
    }
    break;
  case '0':
    if ( next_atom == 'x' || next_atom == 'X' ){
      GetAtom();
      GetAtom();
      err = gethex(&a);
      break;
    }
  default:
    if ( atom >= '0' && atom <= '9' ){
      err = getdec( &a );
    }  else {
      err = getlabel( &a );
    }
  }
  if ( err ) return err;

  switch ( save ){
  case '-' : a = -a; break;
  case '!' : a = !a; break;
  case '~' : a = ~a; break;
  case '<' : a = a & 0xff; break;
  case '>' : a = (a >> 8) & 0xff; break;
  }
  *value = a;
  return EXPR_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
andq $0x0, 0x8(%rsp)
xorl %eax, %eax
callq 0x4dc3
leaq 0x141e4(%rip), %r15     # 0x1cf30
movl (%r15), %r14d
cmpq $0x3e, %r14
ja 0x8d65
movabsq $0x5000200200000000, %rax # imm = 0x5000200200000000
btq %r14, %rax
jb 0x8d6e
movl %r14d, %eax
cmpl $0x7e, %r14d
jne 0x8d76
callq 0x4d44
movl (%r15), %eax
leal -0x22(%rax), %ecx
cmpl $0xe, %ecx
ja 0x8dd0
leaq 0x373f(%rip), %rdx      # 0xc4c4
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
callq 0x4d44
leaq 0x10(%rsp), %rdi
pushq $0x22
popq %rsi
callq 0x4e09
testl %eax, %eax
je 0x8f30
xorl %eax, %eax
xorl %ecx, %ecx
movsbq 0x10(%rsp,%rax), %rdx
testq %rdx, %rdx
je 0x8e89
cmpl $0x4, %eax
je 0x8e89
shlq $0x8, %rcx
orq %rdx, %rcx
incq %rax
jmp 0x8dac
cmpl $0x40, %eax
jne 0x8dea
callq 0x4d44
leaq 0xb5cf(%rip), %rax      # 0x143b0
movslq 0x18(%rax), %rax
jmp 0x8ece
addl $-0x30, %eax
cmpl $0x9, %eax
jbe 0x8e25
leaq 0x8(%rsp), %rdi
callq 0x8c9c
jmp 0x8e40
leaq 0x14133(%rip), %rax     # 0x1cf38
movl (%rax), %eax
andl $-0x21, %eax
cmpl $0x58, %eax
jne 0x8e25
callq 0x4d44
callq 0x4d44
leaq 0x8(%rsp), %rdi
callq 0x8b7f
jmp 0x8e40
leaq 0x8(%rsp), %rdi
callq 0x8aeb
jmp 0x8e40
callq 0x4d44
leaq 0x8(%rsp), %rdi
callq 0x8c26
movl %eax, %ebp
testl %ebp, %ebp
jne 0x8f1a
jmp 0x8ed3
callq 0x4d44
leaq 0x10(%rsp), %rdi
pushq $0x27
popq %rsi
callq 0x4e09
testl %eax, %eax
je 0x8f27
xorl %eax, %eax
xorl %ecx, %ecx
movsbq 0x10(%rsp,%rax), %rdx
testq %rdx, %rdx
je 0x8e89
cmpl $0x4, %eax
je 0x8e89
shlq $0x8, %rcx
orq %rdx, %rcx
incq %rax
jmp 0x8e6d
movq %rcx, 0x8(%rsp)
jmp 0x8ed3
callq 0x4d44
leaq 0x8(%rsp), %rdi
callq 0x8f44
movl %eax, %ebp
pushq $0x29
popq %rdi
callq 0x4da7
testl %eax, %eax
jne 0x8e42
leaq 0x30de(%rip), %rsi      # 0xbf92
pushq $0x11
popq %rbp
movl %ebp, %edi
callq 0x96cc
jmp 0x8f1a
callq 0x4d44
leaq 0xb4e4(%rip), %rax      # 0x143b0
movl (%rax), %eax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpb $0x21, %r14b
je 0x8f0a
movsbl %r14b, %ecx
cmpl $0x7e, %ecx
je 0x8efb
cmpl $0x3c, %ecx
je 0x8f05
cmpl $0x3e, %ecx
je 0x8f00
cmpl $0x2d, %ecx
jne 0x8f15
negq %rax
jmp 0x8f15
notq %rax
jmp 0x8f15
movzbl %ah, %eax
jmp 0x8f15
movzbl %al, %eax
jmp 0x8f15
xorl %ecx, %ecx
testq %rax, %rax
sete %cl
movq %rcx, %rax
movq %rax, (%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x32e1(%rip), %rsi      # 0xc20f
jmp 0x8f37
leaq 0x32cc(%rip), %rsi      # 0xc203
pushq $0x12
popq %rdi
callq 0x96cc
pushq $0x1
popq %rbp
jmp 0x8f1a