// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x10(%rbp)
movq $0x0, -0x20(%rbp)
movb $0x0, %al
callq 0x5ad0
leaq 0x14f5b(%rip), %rax     # 0x20f20
movl (%rax), %eax
movb %al, -0x15(%rbp)
leaq 0x14f4f(%rip), %rax     # 0x20f20
cmpl $0x2d, (%rax)
je 0xc006
leaq 0x14f43(%rip), %rax     # 0x20f20
cmpl $0x21, (%rax)
je 0xc006
leaq 0x14f37(%rip), %rax     # 0x20f20
cmpl $0x7e, (%rax)
je 0xc006
leaq 0x14f2b(%rip), %rax     # 0x20f20
cmpl $0x3e, (%rax)
je 0xc006
leaq 0x14f1f(%rip), %rax     # 0x20f20
cmpl $0x3c, (%rax)
jne 0xc00b
callq 0x59e0
leaq 0x14f0e(%rip), %rax     # 0x20f20
movl (%rax), %eax
addl $-0x22, %eax
movl %eax, %ecx
movq %rcx, -0xe8(%rbp)
subl $0x1e, %eax
ja 0xc290
movq -0xe8(%rbp), %rax
leaq 0x5515(%rip), %rcx      # 0x1154c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
callq 0x59e0
leaq -0x20(%rbp), %rdi
callq 0xbc50
movl %eax, -0x14(%rbp)
jmp 0xc2c4
callq 0x59e0
leaq -0x20(%rbp), %rdi
callq 0xbda0
movl %eax, -0x14(%rbp)
jmp 0xc2c4
callq 0x59e0
leaq 0xc328(%rip), %rax      # 0x183a0
movl (%rax), %eax
movq %rax, -0x20(%rbp)
movl $0x0, -0x14(%rbp)
jmp 0xc2c4
callq 0x59e0
leaq 0xc30a(%rip), %rax      # 0x183a0
movslq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x14(%rbp)
jmp 0xc2c4
leaq -0x70(%rbp), %rax
movq %rax, -0x78(%rbp)
movl $0x5, -0x7c(%rbp)
callq 0x59e0
leaq -0x70(%rbp), %rdi
movl $0x22, %esi
callq 0x5b40
cmpl $0x0, %eax
jne 0xc0ee
movl $0x12, %edi
leaq 0x51ac(%rip), %rsi      # 0x11289
callq 0xd130
movl $0x1, -0x4(%rbp)
jmp 0xc37f
jmp 0xc0f0
movq -0x78(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0xe9(%rbp)
je 0xc119
movl -0x7c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x7c(%rbp)
cmpl $0x0, %eax
setne %al
movb %al, -0xe9(%rbp)
movb -0xe9(%rbp), %al
testb $0x1, %al
jne 0xc125
jmp 0xc14b
movq -0x20(%rbp), %rax
shlq $0x8, %rax
movq -0x78(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x78(%rbp)
movsbl (%rcx), %ecx
movslq %ecx, %rcx
orq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0xc0f0
movl $0x0, -0x14(%rbp)
jmp 0xc2c4
leaq -0xd0(%rbp), %rax
movq %rax, -0xd8(%rbp)
movl $0x5, -0xdc(%rbp)
callq 0x59e0
leaq -0xd0(%rbp), %rdi
movl $0x27, %esi
callq 0x5b40
cmpl $0x0, %eax
jne 0xc1a7
movl $0x12, %edi
leaq 0x50ff(%rip), %rsi      # 0x11295
callq 0xd130
movl $0x1, -0x4(%rbp)
jmp 0xc37f
jmp 0xc1a9
movq -0xd8(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0xea(%rbp)
je 0xc1db
movl -0xdc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xdc(%rbp)
cmpl $0x0, %eax
setne %al
movb %al, -0xea(%rbp)
movb -0xea(%rbp), %al
testb $0x1, %al
jne 0xc1e7
jmp 0xc213
movq -0x20(%rbp), %rax
shlq $0x8, %rax
movq -0xd8(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0xd8(%rbp)
movsbl (%rcx), %ecx
movslq %ecx, %rcx
orq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0xc1a9
movl $0x0, -0x14(%rbp)
jmp 0xc2c4
callq 0x59e0
leaq -0x20(%rbp), %rdi
callq 0xc390
movl %eax, -0x14(%rbp)
movl $0x29, %edi
callq 0x5a90
cmpl $0x0, %eax
jne 0xc25c
movl $0x11, %edi
leaq 0x4e12(%rip), %rsi      # 0x1105d
callq 0xd130
movl $0x11, -0x4(%rbp)
jmp 0xc37f
jmp 0xc2c4
leaq 0x14cc3(%rip), %rax     # 0x20f28
cmpl $0x78, (%rax)
je 0xc276
leaq 0x14cb7(%rip), %rax     # 0x20f28
cmpl $0x58, (%rax)
jne 0xc28e
callq 0x59e0
callq 0x59e0
leaq -0x20(%rbp), %rdi
callq 0xbc50
movl %eax, -0x14(%rbp)
jmp 0xc2c4
jmp 0xc290
leaq 0x14c89(%rip), %rax     # 0x20f20
cmpl $0x30, (%rax)
jl 0xc2b6
leaq 0x14c7d(%rip), %rax     # 0x20f20
cmpl $0x39, (%rax)
jg 0xc2b6
leaq -0x20(%rbp), %rdi
callq 0xbb70
movl %eax, -0x14(%rbp)
jmp 0xc2c2
leaq -0x20(%rbp), %rdi
callq 0xbe80
movl %eax, -0x14(%rbp)
jmp 0xc2c4
cmpl $0x0, -0x14(%rbp)
je 0xc2d5
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xc37f
movsbl -0x15(%rbp), %eax
movl %eax, -0xf0(%rbp)
subl $0x21, %eax
je 0xc326
jmp 0xc2e6
movl -0xf0(%rbp), %eax
subl $0x2d, %eax
je 0xc31a
jmp 0xc2f3
movl -0xf0(%rbp), %eax
subl $0x3c, %eax
je 0xc34b
jmp 0xc300
movl -0xf0(%rbp), %eax
subl $0x3e, %eax
je 0xc35b
jmp 0xc30d
movl -0xf0(%rbp), %eax
subl $0x7e, %eax
je 0xc33d
jmp 0xc36d
xorl %eax, %eax
subq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0xc36d
cmpq $0x0, -0x20(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
movq %rax, -0x20(%rbp)
jmp 0xc36d
movq -0x20(%rbp), %rax
xorq $-0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0xc36d
movq -0x20(%rbp), %rax
andq $0xff, %rax
movq %rax, -0x20(%rbp)
jmp 0xc36d
movq -0x20(%rbp), %rax
sarq $0x8, %rax
andq $0xff, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xf0, %rsp
popq %rbp
retq
nopl (%rax,%rax)