// File: /workspace/github_c_makefile_star2_O0/takoeight0821[P]hoc_nyan/src/parse.c
// Function: unary
static Node *unary() {
  Token *tok;
  if ((tok = match("sizeof"))) {
    if (!match("(")) {
      parse_error("(", peek(0));
    }
    Node *node;
    if (is_typename(peek(0))) {
      // sizeof(type)は計算してしまってNINTノードにする
      Type *type = type_specifier();
      while (match("*")) {
        type = ptr_to(type);
      }
      node = new_int_node(tok, size_of(type));
    } else {
      // sizeof(expr)はsemaで型付けしてemitで計算する
      node = new_node(NSIZEOF, tok);
      node->expr = unary();
    }
    if (!match(")")) {
      parse_error(")", peek(0));
    }
    return node;
  } else if (match("+")) {
    return cast();
  } else if ((tok = match("-"))) {
    Node *node = new_node(NSUB, tok);
    node->lhs = new_int_node(tok, 0);
    node->rhs = cast();
    return node;
  } else if ((tok = match("&"))) {
    Node *node = new_node(NADDR, tok);
    node->expr = cast();
    return node;
  } else if ((tok = match("*"))) {
    Node *node = new_node(NDEREF, tok);
    node->expr = cast();
    return node;
  } else if ((tok = match("!"))) {
    Node *node = new_node(NLOGNOT, tok);
    node->expr = cast();
    return node;
  } else if ((tok = match("~"))) {
    Node *node = new_node(NNOT, tok);
    node->expr = cast();
    return node;
  } else {
    Node *node = postfix();
    return node;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
leaq 0x7682(%rip), %rdi      # 0x132b1
callq 0xa330
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0xbd27
leaq 0x7d85(%rip), %rdi      # 0x139ce
callq 0xa330
cmpq $0x0, %rax
jne 0xbc6c
xorl %eax, %eax
movl %eax, %edi
callq 0xa990
movq %rax, %rsi
leaq 0x7d67(%rip), %rdi      # 0x139ce
callq 0xaa00
xorl %eax, %eax
movl %eax, %edi
callq 0xa990
movq %rax, %rdi
callq 0xbb60
cmpl $0x0, %eax
je 0xbcce
callq 0xaad0
movq %rax, -0x20(%rbp)
leaq 0x79b7(%rip), %rdi      # 0x13649
callq 0xa330
cmpq $0x0, %rax
je 0xbcac
movq -0x20(%rbp), %rdi
callq 0x9ed0
movq %rax, -0x20(%rbp)
jmp 0xbc8b
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x20(%rbp), %rdi
callq 0x9d60
movq -0x58(%rbp), %rdi
movl %eax, %esi
callq 0xb170
movq %rax, -0x18(%rbp)
jmp 0xbcf0
movq -0x10(%rbp), %rsi
movl $0x23, %edi
callq 0x9d10
movq %rax, -0x18(%rbp)
callq 0xbc20
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x38(%rax)
leaq 0x760b(%rip), %rdi      # 0x13302
callq 0xa330
cmpq $0x0, %rax
jne 0xbd1a
xorl %eax, %eax
movl %eax, %edi
callq 0xa990
movq %rax, %rsi
leaq 0x75ed(%rip), %rdi      # 0x13302
callq 0xaa00
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xbec1
leaq 0x7592(%rip), %rdi      # 0x132c0
callq 0xa330
cmpq $0x0, %rax
je 0xbd47
callq 0xba60
movq %rax, -0x8(%rbp)
jmp 0xbec1
leaq 0x7575(%rip), %rdi      # 0x132c3
callq 0xa330
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0xbda2
movq -0x10(%rbp), %rsi
movl $0x4, %edi
callq 0x9d10
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0xb170
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x18(%rax)
callq 0xba60
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xbec1
leaq 0x74fc(%rip), %rdi      # 0x132a5
callq 0xa330
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0xbde7
movq -0x10(%rbp), %rsi
movl $0x19, %edi
callq 0x9d10
movq %rax, -0x30(%rbp)
callq 0xba60
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xbec1
leaq 0x785b(%rip), %rdi      # 0x13649
callq 0xa330
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0xbe2c
movq -0x10(%rbp), %rsi
movl $0x1a, %edi
callq 0x9d10
movq %rax, -0x38(%rbp)
callq 0xba60
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xbec1
leaq 0x7485(%rip), %rdi      # 0x132b8
callq 0xa330
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0xbe6e
movq -0x10(%rbp), %rsi
movl $0xe, %edi
callq 0x9d10
movq %rax, -0x40(%rbp)
callq 0xba60
movq %rax, %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xbec1
leaq 0x7445(%rip), %rdi      # 0x132ba
callq 0xa330
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0xbeb0
movq -0x10(%rbp), %rsi
movl $0xf, %edi
callq 0x9d10
movq %rax, -0x48(%rbp)
callq 0xba60
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x48(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xbec1
callq 0xbed0
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)