// File: /workspace/github_c_makefile_star2_O3/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
movq $0x0, 0x8(%rsp)
xorl %eax, %eax
callq 0x4ff7
leaq 0x13768(%rip), %r15     # 0x1cf30
movl (%r15), %r14d
cmpq $0x3e, %r14
ja 0x97e1
movabsq $0x5000200200000000, %rax # imm = 0x5000200200000000
btq %r14, %rax
jb 0x97ea
movl %r14d, %eax
cmpl $0x7e, %r14d
jne 0x97f2
callq 0x4f1a
movl (%r15), %eax
leal -0x22(%rax), %ecx
cmpl $0xe, %ecx
ja 0x985a
leaq 0x3d2b(%rip), %rdx      # 0xd52c
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
callq 0x4f1a
leaq 0x10(%rsp), %rdi
movl $0x22, %esi
callq 0x50b3
testl %eax, %eax
je 0x99cd
movb 0x10(%rsp), %cl
testb %cl, %cl
je 0x9965
xorl %edx, %edx
xorl %eax, %eax
cmpl $0x4, %edx
je 0x9967
shlq $0x8, %rax
movsbq %cl, %rcx
orq %rcx, %rax
movb 0x11(%rsp,%rdx), %cl
incq %rdx
testb %cl, %cl
jne 0x9836
jmp 0x9967
cmpl $0x40, %eax
jne 0x9874
callq 0x4f1a
leaq 0xab45(%rip), %rax      # 0x143b0
movslq 0x18(%rax), %rax
jmp 0x9967
addl $-0x30, %eax
cmpl $0x9, %eax
jbe 0x98af
leaq 0x8(%rsp), %rdi
callq 0x970d
jmp 0x98ca
leaq 0x136a9(%rip), %rax     # 0x1cf38
movl (%rax), %eax
andl $-0x21, %eax
cmpl $0x58, %eax
jne 0x98af
callq 0x4f1a
callq 0x4f1a
leaq 0x8(%rsp), %rdi
callq 0x95cf
jmp 0x98ca
leaq 0x8(%rsp), %rdi
callq 0x9527
jmp 0x98ca
callq 0x4f1a
leaq 0x8(%rsp), %rdi
callq 0x9682
movl %eax, %ebp
testl %ebp, %ebp
jne 0x99b7
jmp 0x996c
callq 0x4f1a
leaq 0x10(%rsp), %rdi
movl $0x27, %esi
callq 0x50b3
testl %eax, %eax
je 0x99c4
movb 0x10(%rsp), %cl
testb %cl, %cl
je 0x9965
xorl %edx, %edx
xorl %eax, %eax
cmpl $0x4, %edx
je 0x9967
shlq $0x8, %rax
movsbq %cl, %rcx
orq %rcx, %rax
movb 0x11(%rsp,%rdx), %cl
incq %rdx
testb %cl, %cl
jne 0x9901
jmp 0x9967
callq 0x4f1a
leaq 0x8(%rsp), %rdi
callq 0x99e5
movl %eax, %ebp
movl $0x29, %edi
callq 0x4fa8
testl %eax, %eax
jne 0x98cc
leaq 0x364e(%rip), %rsi      # 0xcf92
movl $0x11, %ebp
movl $0x11, %edi
callq 0xa1d8
jmp 0x99b7
callq 0x4f1a
leaq 0xaa4f(%rip), %rax      # 0x143b0
movl (%rax), %eax
jmp 0x9967
xorl %eax, %eax
movq %rax, 0x8(%rsp)
movsbl %r14b, %ecx
movq 0x8(%rsp), %rax
cmpl $0x3b, %ecx
jle 0x998e
cmpl $0x3c, %ecx
je 0x999d
cmpl $0x3e, %ecx
je 0x99a2
cmpl $0x7e, %ecx
jne 0x99b2
notq %rax
jmp 0x99b2
cmpl $0x21, %ecx
je 0x99a7
cmpl $0x2d, %ecx
jne 0x99b2
negq %rax
jmp 0x99b2
movzbl %al, %eax
jmp 0x99b2
movzbl %ah, %eax
jmp 0x99b2
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 0x38ad(%rip), %rsi      # 0xd278
jmp 0x99d4
leaq 0x3898(%rip), %rsi      # 0xd26c
movl $0x12, %edi
callq 0xa1d8
movl $0x1, %ebp
jmp 0x99b7