// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
leaq 0x4212(%rip), %rdi      # 0xf27b
callq 0xa09f
testq %rax, %rax
je 0xb101
movq %rax, %rbx
leaq 0x47ad(%rip), %rdi      # 0xf82e
callq 0xa09f
movq 0x80cb(%rip), %r14      # 0x13158
testq %rax, %rax
je 0xb221
movq %r14, %rdi
callq 0xaff5
testl %eax, %eax
je 0xb11c
callq 0xa5b8
movq %rax, %r14
leaq 0x4197(%rip), %rdi      # 0xf248
callq 0xa09f
testq %rax, %rax
je 0xb0da
leaq 0x4186(%rip), %r15      # 0xf248
movq %r14, %rdi
callq 0x9cf6
movq %rax, %r14
movq %r15, %rdi
callq 0xa09f
testq %rax, %rax
jne 0xb0c2
movq %r14, %rdi
callq 0x9bf4
movq %rax, %r14
xorl %edi, %edi
movq %rbx, %rsi
callq 0x9bd0
movq %rax, %rbx
movl %r14d, 0x28(%rax)
callq 0x9cac
movq %rax, 0x10(%rbx)
jmp 0xb135
leaq 0x4182(%rip), %rdi      # 0xf28a
callq 0xa09f
testq %rax, %rax
je 0xb153
popq %rbx
popq %r14
popq %r15
jmp 0xaf0d
movl $0x23, %edi
movq %rbx, %rsi
callq 0x9bd0
movq %rax, %rbx
callq 0xb05d
movq %rax, 0x38(%rbx)
leaq 0x4190(%rip), %rdi      # 0xf2cc
callq 0xa09f
testq %rax, %rax
je 0xb23b
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x4133(%rip), %rdi      # 0xf28d
callq 0xa09f
testq %rax, %rax
je 0xb1a3
movq %rax, %r14
movl $0x4, %edi
movq %rax, %rsi
callq 0x9bd0
movq %rax, %rbx
xorl %edi, %edi
movq %r14, %rsi
callq 0x9bd0
movq %rax, %r14
movl $0x0, 0x28(%rax)
callq 0x9cac
movq %rax, 0x10(%r14)
movq %r14, 0x18(%rbx)
callq 0xaf0d
movq %rax, 0x20(%rbx)
jmp 0xb14a
leaq 0x40c5(%rip), %rdi      # 0xf26f
callq 0xa09f
testq %rax, %rax
je 0xb1bb
movl $0x19, %edi
jmp 0xb201
leaq 0x4086(%rip), %rdi      # 0xf248
callq 0xa09f
testq %rax, %rax
je 0xb1d3
movl $0x1a, %edi
jmp 0xb201
leaq 0x40a8(%rip), %rdi      # 0xf282
callq 0xa09f
testq %rax, %rax
je 0xb1eb
movl $0xe, %edi
jmp 0xb201
leaq 0x4092(%rip), %rdi      # 0xf284
callq 0xa09f
testq %rax, %rax
je 0xb21a
movl $0xf, %edi
movq %rax, %rsi
callq 0x9bd0
movq %rax, %rbx
callq 0xaf0d
movq %rax, 0x38(%rbx)
jmp 0xb14a
popq %rbx
popq %r14
popq %r15
jmp 0xb262
leaq 0x2e28(%rip), %rdi      # 0xe050
leaq 0x45ff(%rip), %rsi      # 0xf82e
xorl %eax, %eax
callq 0xd86a
movq %r14, %rdi
jmp 0xb25a
movq 0x7f16(%rip), %rbx      # 0x13158
leaq 0x2e07(%rip), %rdi      # 0xe050
leaq 0x407c(%rip), %rsi      # 0xf2cc
xorl %eax, %eax
callq 0xd86a
movq %rbx, %rdi
movq %rax, %rsi
callq 0xcd01