// File: /workspace/github_c_makefile_star2_O1/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 0x4115(%rip), %rdi      # 0xf2a1
callq 0xa184
testq %rax, %rax
je 0xb224
movq %rax, %rbx
leaq 0x46ae(%rip), %rdi      # 0xf852
callq 0xa184
movq 0x7fa8(%rip), %r14      # 0x13158
testq %rax, %rax
je 0xb344
movq %r14, %rdi
callq 0xb115
testl %eax, %eax
je 0xb23f
callq 0xa6d2
movq %rax, %r14
leaq 0x42fb(%rip), %rdi      # 0xf4cf
callq 0xa184
testq %rax, %rax
je 0xb1fd
leaq 0x42ea(%rip), %r15      # 0xf4cf
movq %r14, %rdi
callq 0x9d9e
movq %rax, %r14
movq %r15, %rdi
callq 0xa184
testq %rax, %rax
jne 0xb1e5
movq %r14, %rdi
callq 0x9c8c
movq %rax, %r14
xorl %edi, %edi
movq %rbx, %rsi
callq 0x9c68
movq %rax, %rbx
movl %r14d, 0x28(%rax)
callq 0x9d54
movq %rax, 0x10(%rbx)
jmp 0xb258
leaq 0x4085(%rip), %rdi      # 0xf2b0
callq 0xa184
testq %rax, %rax
je 0xb276
popq %rbx
popq %r14
popq %r15
jmp 0xb025
movl $0x23, %edi
movq %rbx, %rsi
callq 0x9c68
movq %rax, %rbx
callq 0xb180
movq %rax, 0x38(%rbx)
leaq 0x4093(%rip), %rdi      # 0xf2f2
callq 0xa184
testq %rax, %rax
je 0xb35e
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x4036(%rip), %rdi      # 0xf2b3
callq 0xa184
testq %rax, %rax
je 0xb2c6
movq %rax, %r14
movl $0x4, %edi
movq %rax, %rsi
callq 0x9c68
movq %rax, %rbx
xorl %edi, %edi
movq %r14, %rsi
callq 0x9c68
movq %rax, %r14
movl $0x0, 0x28(%rax)
callq 0x9d54
movq %rax, 0x10(%r14)
movq %r14, 0x18(%rbx)
callq 0xb025
movq %rax, 0x20(%rbx)
jmp 0xb26d
leaq 0x3fc8(%rip), %rdi      # 0xf295
callq 0xa184
testq %rax, %rax
je 0xb2de
movl $0x19, %edi
jmp 0xb324
leaq 0x41ea(%rip), %rdi      # 0xf4cf
callq 0xa184
testq %rax, %rax
je 0xb2f6
movl $0x1a, %edi
jmp 0xb324
leaq 0x3fab(%rip), %rdi      # 0xf2a8
callq 0xa184
testq %rax, %rax
je 0xb30e
movl $0xe, %edi
jmp 0xb324
leaq 0x3f95(%rip), %rdi      # 0xf2aa
callq 0xa184
testq %rax, %rax
je 0xb33d
movl $0xf, %edi
movq %rax, %rsi
callq 0x9c68
movq %rax, %rbx
callq 0xb025
movq %rax, 0x38(%rbx)
jmp 0xb26d
popq %rbx
popq %r14
popq %r15
jmp 0xb385
leaq 0x2d05(%rip), %rdi      # 0xe050
leaq 0x4500(%rip), %rsi      # 0xf852
xorl %eax, %eax
callq 0xd7f2
movq %r14, %rdi
jmp 0xb37d
movq 0x7df3(%rip), %rbx      # 0x13158
leaq 0x2ce4(%rip), %rdi      # 0xe050
leaq 0x3f7f(%rip), %rsi      # 0xf2f2
xorl %eax, %eax
callq 0xd7f2
movq %rbx, %rdi
movq %rax, %rsi
callq 0xce4d