// File: /workspace/github_c_makefile_star2_O1/sisshiki1969[P]monocc/src/parse.c
// Function: parse_unary_expr
Node *parse_unary_expr() {
  Token *op_token = token;
  if (consume_if(TK_ADD)) {
    return parse_cast_expr();
  } else if (consume_if(TK_SUB)) {
    Node *node = parse_cast_expr();
    if (node->kind == ND_NUM) {
      node->num_val = -(node->num_val);
      return node;
    } else {
      return new_node_binary(ND_SUB, new_node_num(0, token), node, op_token);
    }
  } else if (consume_if(TK_AND)) {
    return new_node_expr(ND_ADDR, parse_cast_expr(), NULL, op_token);
  } else if (consume_if(TK_MUL)) {
    Node *node = parse_cast_expr();
    return new_node_binary(ND_DEREF, node, NULL, op_token);
  } else if (consume_if(TK_SIZEOF)) {
    Type *ty;
    if (peek(TK_OP_PAREN) && is_type_specifier(token->next)) {
      expect(TK_OP_PAREN);
      ty = parse_decl(false)->type;
      expect(TK_CL_PAREN);
    } else {
      ty = type(parse_unary_expr());
    }
    return new_node_num(sizeof_type(ty), op_token);
  } else if (consume_if(TK_NOT)) {
    Node *node = new_node(ND_NOT, op_token);
    node->lhs = parse_cast_expr();
    node->type = new_type_int();
    return node;
  } else if (consume_if(TK_TILDA)) {
    Node *node = new_node(ND_CMP, op_token);
    node->lhs = parse_cast_expr();
    node->type = new_type_int();
    return node;
  } else {
    return parse_postfix_expr();
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0xc36d(%rip), %r15      # 0x13228
movq (%r15), %rbx
cmpl $0x3, (%rbx)
jne 0x6eda
movq 0x8(%rbx), %rax
movq %rax, (%r15)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x713e
movq (%r15), %rax
cmpl $0x4, (%rax)
jne 0x6eff
movq 0x8(%rax), %rax
movq %rax, (%r15)
callq 0x713e
movq %rax, %r14
cmpl $0x1, (%rax)
jne 0x6f43
negq 0x20(%r14)
jmp 0x70c7
movq (%r15), %rax
cmpl $0x16, (%rax)
jne 0x6f82
movq 0x8(%rax), %rax
movq %rax, (%r15)
callq 0x713e
movq %rax, %r15
movl $0x1, %edi
movl $0x68, %esi
callq 0x10d0
movq %rax, %r14
movl $0x16, (%rax)
movq %r15, 0x8(%rax)
movq $0x0, 0x10(%rax)
movq %rbx, 0x50(%rax)
jmp 0x70c7
movq (%r15), %r12
movl $0x1, %edi
movl $0x68, %esi
callq 0x10d0
movq %rax, %r15
movl $0x1, (%rax)
movq $0x0, 0x20(%rax)
movq %r12, 0x50(%rax)
xorl %eax, %eax
callq 0xad70
movq %rax, 0x58(%r15)
movl $0x5, %edi
movq %r15, %rsi
movq %r14, %rdx
jmp 0x6fa0
movq (%r15), %rax
cmpl $0x5, (%rax)
jne 0x6fb3
movq 0x8(%rax), %rax
movq %rax, (%r15)
callq 0x713e
movl $0x17, %edi
movq %rax, %rsi
xorl %edx, %edx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x5b07
movq (%r15), %rax
cmpl $0x33, (%rax)
jne 0x7022
movq 0x8(%rax), %rax
movq %rax, (%r15)
cmpl $0x1d, (%rax)
jne 0x704b
movq 0x8(%rax), %rdi
movl (%rdi), %eax
leal -0x34(%rax), %ecx
cmpl $0x8, %ecx
jb 0x6feb
addl $-0x3d, %eax
cmpl $0x2, %eax
jb 0x6feb
callq 0x626a
testq %rax, %rax
je 0x704b
movq (%r15), %rax
movq 0x8(%rax), %rax
movq %rax, (%r15)
xorl %edi, %edi
callq 0x70e6
movq 0x10(%rax), %r14
movq (%r15), %rdi
cmpl $0x1e, (%rdi)
je 0x7016
leaq 0x641b(%rip), %rsi      # 0xd42a
xorl %eax, %eax
callq 0x52f9
movq (%r15), %rax
movq 0x8(%rax), %rax
movq %rax, (%r15)
jmp 0x705b
movq (%r15), %rax
cmpl $0x19, (%rax)
jne 0x7088
movq 0x8(%rax), %rax
movq %rax, (%r15)
movl $0x1, %edi
movl $0x68, %esi
callq 0x10d0
movq %rax, %r14
movl $0xe, (%rax)
jmp 0x70af
callq 0x6eac
movq %rax, %rdi
callq 0xb354
movq %rax, %r14
movq %r14, %rdi
callq 0xafa3
movslq %eax, %r15
movl $0x1, %edi
movl $0x68, %esi
callq 0x10d0
movq %rax, %r14
movl $0x1, (%rax)
movq %r15, 0x20(%rax)
movq %rbx, 0x50(%rax)
jmp 0x70bc
movq (%r15), %rax
cmpl $0x27, (%rax)
jne 0x70d6
movq 0x8(%rax), %rax
movq %rax, (%r15)
movl $0x1, %edi
movl $0x68, %esi
callq 0x10d0
movq %rax, %r14
movl $0x14, (%rax)
movq %rbx, 0x50(%rax)
callq 0x713e
movq %rax, 0x8(%r14)
xorl %eax, %eax
callq 0xad70
movq %rax, 0x58(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x694e