// File: /workspace/github_c_makefile_star2_O3/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 0xc3cb(%rip), %r15      # 0x13228
movq (%r15), %rbx
movl (%rbx), %eax
cmpl $0x15, %eax
jle 0x6ea2
cmpl $0x26, %eax
jg 0x6ed8
cmpl $0x16, %eax
je 0x6f7c
cmpl $0x19, %eax
jne 0x6f6c
movq 0x8(%rbx), %rax
movq %rax, (%r15)
movl $0x1, %edi
movl $0x68, %esi
callq 0x10d0
movq %rax, %r14
movl $0xe, (%rax)
jmp 0x6fcf
cmpl $0x3, %eax
je 0x6f55
cmpl $0x4, %eax
je 0x6fde
cmpl $0x5, %eax
jne 0x6f6c
movq 0x8(%rbx), %rax
movq %rax, (%r15)
callq 0x70ed
movl $0x17, %edi
movq %rax, %rsi
xorl %edx, %edx
jmp 0x7082
cmpl $0x27, %eax
je 0x6fb0
cmpl $0x33, %eax
jne 0x6f6c
movq 0x8(%rbx), %rax
movq %rax, (%r15)
cmpl $0x1d, (%rax)
jne 0x6ff8
movq 0x8(%rax), %r14
movl (%r14), %eax
leal -0x34(%rax), %ecx
cmpl $0x8, %ecx
jb 0x6f22
addl $-0x3d, %eax
cmpl $0x2, %eax
jb 0x6f22
movq %r14, %rdi
callq 0x6217
testq %rax, %rax
je 0x6ff8
movq %r14, (%r15)
xorl %edi, %edi
callq 0x7095
movq 0x10(%rax), %r14
movq (%r15), %rdi
cmpl $0x1e, (%rdi)
je 0x6f49
leaq 0x6527(%rip), %rsi      # 0xd466
xorl %eax, %eax
callq 0x52cd
movq (%r15), %rdi
movq 0x8(%rdi), %rax
movq %rax, (%r15)
jmp 0x7008
movq 0x8(%rbx), %rax
movq %rax, (%r15)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x70ed
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x68f7
movq 0x8(%rbx), %rax
movq %rax, (%r15)
callq 0x70ed
movq %rax, %r15
movl $0x1, %edi
movl $0x68, %esi
callq 0x10d0
movq %rax, %r14
movl $0x16, (%rax)
movq %r15, 0x8(%rax)
movq %rbx, 0x50(%rax)
jmp 0x703e
movq 0x8(%rbx), %rax
movq %rax, (%r15)
movl $0x1, %edi
movl $0x68, %esi
callq 0x10d0
movq %rax, %r14
movl $0x14, (%rax)
movq %rbx, 0x50(%rax)
callq 0x70ed
movq %rax, 0x8(%r14)
jmp 0x7033
movq 0x8(%rbx), %rax
movq %rax, (%r15)
callq 0x70ed
movq %rax, %r14
cmpl $0x1, (%rax)
jne 0x704d
negq 0x20(%r14)
jmp 0x703e
callq 0x6e4e
movq %rax, %rdi
callq 0xb225
movq %rax, %r14
movq %r14, %rdi
callq 0xae77
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)
xorl %eax, %eax
callq 0xac48
movq %rax, 0x58(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq (%r15), %r12
movl $0x1, %edi
movl $0x68, %esi
callq 0x10d0
movq %rax, %r15
movl $0x1, (%rax)
movq %r12, 0x50(%rax)
xorl %eax, %eax
callq 0xac48
movq %rax, 0x58(%r15)
movl $0x5, %edi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x5ab9