// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
leaq 0xc919(%rip), %rax      # 0x15218
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movl $0x3, %edi
callq 0x7860
testb $0x1, %al
jne 0x8916
jmp 0x8924
callq 0x8ba0
movq %rax, -0x8(%rbp)
jmp 0x8b33
movl $0x4, %edi
callq 0x7860
testb $0x1, %al
jne 0x8934
jmp 0x8996
callq 0x8ba0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x8965
movq -0x18(%rbp), %rax
xorl %ecx, %ecx
subq 0x20(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x8b33
leaq 0xc8ac(%rip), %rax      # 0x15218
movq (%rax), %rsi
xorl %eax, %eax
movl %eax, %edi
callq 0x69f0
movq %rax, %rsi
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rcx
movl $0x5, %edi
callq 0x6e30
movq %rax, -0x8(%rbp)
jmp 0x8b33
movl $0x16, %edi
callq 0x7860
testb $0x1, %al
jne 0x89a6
jmp 0x89c9
callq 0x8ba0
movq %rax, %rsi
movq -0x10(%rbp), %rcx
movl $0x16, %edi
xorl %eax, %eax
movl %eax, %edx
callq 0x6f70
movq %rax, -0x8(%rbp)
jmp 0x8b33
movl $0x5, %edi
callq 0x7860
testb $0x1, %al
jne 0x89d9
jmp 0x8a01
callq 0x8ba0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rcx
movl $0x17, %edi
xorl %eax, %eax
movl %eax, %edx
callq 0x6e30
movq %rax, -0x8(%rbp)
jmp 0x8b33
movl $0x33, %edi
callq 0x7860
testb $0x1, %al
jne 0x8a11
jmp 0x8a8e
movl $0x1d, %edi
callq 0x77d0
testb $0x1, %al
jne 0x8a21
jmp 0x8a5f
leaq 0xc7f0(%rip), %rax      # 0x15218
movq (%rax), %rax
movq 0x8(%rax), %rdi
callq 0x7ac0
testb $0x1, %al
jne 0x8a3a
jmp 0x8a5f
movl $0x1d, %edi
callq 0x7980
xorl %edi, %edi
callq 0x8b40
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movl $0x1e, %edi
callq 0x7980
jmp 0x8a70
callq 0x88f0
movq %rax, %rdi
callq 0xdda0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0xd640
movslq %eax, %rdi
movq -0x10(%rbp), %rsi
callq 0x69f0
movq %rax, -0x8(%rbp)
jmp 0x8b33
movl $0x19, %edi
callq 0x7860
testb $0x1, %al
jne 0x8a9e
jmp 0x8adc
movq -0x10(%rbp), %rsi
movl $0xe, %edi
callq 0x71a0
movq %rax, -0x30(%rbp)
callq 0x8ba0
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movb $0x0, %al
callq 0xd0b0
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x8b33
movl $0x27, %edi
callq 0x7860
testb $0x1, %al
jne 0x8aec
jmp 0x8b2a
movq -0x10(%rbp), %rsi
movl $0x14, %edi
callq 0x71a0
movq %rax, -0x38(%rbp)
callq 0x8ba0
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
movb $0x0, %al
callq 0xd0b0
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x8b33
callq 0x83e0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)