// File: /workspace/github_c_makefile_star2_O0/michaelforney[P]cproc/expr.c
// Function: unaryexpr
static struct expr *
unaryexpr(struct scope *s)
{
	enum tokenkind op;
	struct expr *e, *l;
	struct type *t;

	op = tok.kind;
	switch (op) {
	case TINC:
	case TDEC:
		next();
		l = unaryexpr(s);
		e = mkincdecexpr(op, l, false);
		break;
	case TBAND:
	case TMUL:
		next();
		return mkunaryexpr(op, castexpr(s));
	case TADD:
		next();
		e = castexpr(s);
		if (!(e->type->prop & PROPARITH))
			error(&tok.loc, "operand of unary '+' operator must have arithmetic type");
		if (e->type->prop & PROPINT)
			e = exprpromote(e);
		break;
	case TSUB:
		next();
		e = castexpr(s);
		if (!(e->type->prop & PROPARITH))
			error(&tok.loc, "operand of unary '-' operator must have arithmetic type");
		if (e->type->prop & PROPINT)
			e = exprpromote(e);
		e = mkexpr(EXPRUNARY, e->type, e);
		e->op = op;
		break;
	case TBNOT:
		next();
		e = castexpr(s);
		if (!(e->type->prop & PROPINT))
			error(&tok.loc, "operand of '~' operator must have integer type");
		e = exprpromote(e);
		e = mkbinaryexpr(&tok.loc, TXOR, e, mkconstexpr(e->type, -1));
		break;
	case TLNOT:
		next();
		e = castexpr(s);
		if (!(e->type->prop & PROPSCALAR))
			error(&tok.loc, "operator '!' must have scalar operand");
		e = mkbinaryexpr(&tok.loc, TEQL, e, mkconstexpr(&typeint, 0));
		break;
	case TSIZEOF:
	case TALIGNOF:
		next();
		if (consume(TLPAREN)) {
			t = typename(s, NULL, NULL);
			if (t) {
				expect(TRPAREN, "after type name");
				/* might be part of a compound literal */
				if (op == TSIZEOF && tok.kind == TLBRACE)
					parseinit(s, t);
				e = NULL;
			} else {
				e = expr(s);
				expect(TRPAREN, "after expression");
				if (op == TSIZEOF)
					e = postfixexpr(s, e);
			}
		} else if (op == TSIZEOF) {
			t = NULL;
			e = unaryexpr(s);
		} else {
			error(&tok.loc, "expected ')' after 'alignof'");
			return NULL;  /* unreachable */
		}
		if (!t) {
			if (e->decayed)
				e = e->base;
			if (e->kind == EXPRBITFIELD)
				error(&tok.loc, "%s operator applied to bitfield expression", tokstr[op]);
			t = e->type;
		}
		if (t->incomplete)
			error(&tok.loc, "%s operator applied to incomplete type", tokstr[op]);
		if (t->kind == TYPEFUNC)
			error(&tok.loc, "%s operator applied to function type", tokstr[op]);
		if (t->kind == TYPEARRAY && t->size == 0 && op == TSIZEOF) {
			e = mkexpr(EXPRSIZEOF, &typeulong, e);
			e->u.szof.type = e ? t : e->base->type;
		} else {
			e = mkconstexpr(&typeulong, op == TSIZEOF ? t->size : t->align);
		}
		break;
	default:
		e = postfixexpr(s, NULL);
	}

	return e;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
leaq 0x17a95(%rip), %rax     # 0x221a8
movl (%rax), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addl $-0x9, %eax
movl %eax, %ecx
movq %rcx, -0x38(%rbp)
subl $0x46, %eax
ja 0xabc6
movq -0x38(%rbp), %rax
leaq 0xee4c(%rip), %rcx      # 0x19584
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
callq 0xd540
movq -0x10(%rbp), %rdi
callq 0xa700
movq %rax, -0x28(%rbp)
movl -0x14(%rbp), %edi
movq -0x28(%rbp), %rsi
xorl %edx, %edx
callq 0xb860
movq %rax, -0x20(%rbp)
jmp 0xabd7
callq 0xd540
movl -0x14(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x9da0
movl -0x3c(%rbp), %edi
movq %rax, %rsi
callq 0x9410
movq %rax, -0x8(%rbp)
jmp 0xabdf
callq 0xd540
movq -0x10(%rbp), %rdi
callq 0x9da0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x4(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0xa7d0
leaq 0x179ea(%rip), %rdi     # 0x221a8
addq $0x8, %rdi
leaq 0xfbea(%rip), %rsi      # 0x1a3b3
movb $0x0, %al
callq 0x11190
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x4(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0xa7f0
movq -0x20(%rbp), %rdi
callq 0x82f0
movq %rax, -0x20(%rbp)
jmp 0xabd7
callq 0xd540
movq -0x10(%rbp), %rdi
callq 0x9da0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x4(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0xa833
leaq 0x17987(%rip), %rdi     # 0x221a8
addq $0x8, %rdi
leaq 0xfbbf(%rip), %rsi      # 0x1a3eb
movb $0x0, %al
callq 0x11190
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x4(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0xa853
movq -0x20(%rbp), %rdi
callq 0x82f0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x20(%rbp), %rdx
movl $0x7, %edi
callq 0x9040
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x14(%rax)
jmp 0xabd7
callq 0xd540
movq -0x10(%rbp), %rdi
callq 0x9da0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x4(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0xa8ba
leaq 0x17900(%rip), %rdi     # 0x221a8
addq $0x8, %rdi
leaq 0xfb70(%rip), %rsi      # 0x1a423
movb $0x0, %al
callq 0x11190
movq -0x20(%rbp), %rdi
callq 0x82f0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movq $-0x1, %rsi
callq 0xb820
movq -0x48(%rbp), %rdx
movq %rax, %rcx
leaq 0x178b7(%rip), %rdi     # 0x221a8
addq $0x8, %rdi
movl $0x5a, %esi
callq 0x95f0
movq %rax, -0x20(%rbp)
jmp 0xabd7
callq 0xd540
movq -0x10(%rbp), %rdi
callq 0x9da0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x4(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0xa946
leaq 0x17874(%rip), %rdi     # 0x221a8
addq $0x8, %rdi
leaq 0xfb13(%rip), %rsi      # 0x1a452
movb $0x0, %al
callq 0x11190
movq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq 0x1734b(%rip), %rdi     # 0x21ca0
xorl %eax, %eax
movl %eax, %esi
callq 0xb820
movq -0x50(%rbp), %rdx
movq %rax, %rcx
leaq 0x1783c(%rip), %rdi     # 0x221a8
addq $0x8, %rdi
movl $0x58, %esi
callq 0x95f0
movq %rax, -0x20(%rbp)
jmp 0xabd7
callq 0xd540
movl $0x42, %edi
callq 0xd910
testb $0x1, %al
jne 0xa99b
jmp 0xaa29
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0x3960
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0xa9f0
movl $0x43, %edi
leaq 0xf24b(%rip), %rsi      # 0x19c0d
callq 0xd8d0
cmpl $0x26, -0x14(%rbp)
jne 0xa9e6
leaq 0x177d4(%rip), %rax     # 0x221a8
cmpl $0x44, (%rax)
jne 0xa9e6
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0xbee0
movq $0x0, -0x20(%rbp)
jmp 0xaa27
movq -0x10(%rbp), %rdi
callq 0x8f10
movq %rax, -0x20(%rbp)
movl $0x43, %edi
leaq 0xf4f1(%rip), %rsi      # 0x19efa
callq 0xd8d0
cmpl $0x26, -0x14(%rbp)
jne 0xaa25
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xa080
movq %rax, -0x20(%rbp)
jmp 0xaa27
jmp 0xaa6e
cmpl $0x26, -0x14(%rbp)
jne 0xaa46
movq $0x0, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0xa700
movq %rax, -0x20(%rbp)
jmp 0xaa6c
leaq 0x1775b(%rip), %rdi     # 0x221a8
addq $0x8, %rdi
leaq 0xfa20(%rip), %rsi      # 0x1a478
movb $0x0, %al
callq 0x11190
movq $0x0, -0x8(%rbp)
jmp 0xabdf
jmp 0xaa6e
cmpq $0x0, -0x30(%rbp)
jne 0xaac9
movq -0x20(%rbp), %rax
testb $0x1, 0x5(%rax)
je 0xaa8b
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x4, (%rax)
jne 0xaabd
movl -0x14(%rbp), %eax
movl %eax, %ecx
leaq 0x16c10(%rip), %rax     # 0x216b0
movq (%rax,%rcx,8), %rdx
leaq 0x176fd(%rip), %rdi     # 0x221a8
addq $0x8, %rdi
leaq 0xf9df(%rip), %rsi      # 0x1a495
movb $0x0, %al
callq 0x11190
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
testb $0x1, 0x3c(%rax)
je 0xaafc
movl -0x14(%rbp), %eax
movl %eax, %ecx
leaq 0x16bd1(%rip), %rax     # 0x216b0
movq (%rax,%rcx,8), %rdx
leaq 0x176be(%rip), %rdi     # 0x221a8
addq $0x8, %rdi
leaq 0xf9cb(%rip), %rsi      # 0x1a4c0
movb $0x0, %al
callq 0x11190
movq -0x30(%rbp), %rax
cmpl $0xe, (%rax)
jne 0xab2e
movl -0x14(%rbp), %eax
movl %eax, %ecx
leaq 0x16b9f(%rip), %rax     # 0x216b0
movq (%rax,%rcx,8), %rdx
leaq 0x1768c(%rip), %rdi     # 0x221a8
addq $0x8, %rdi
leaq 0xf9c0(%rip), %rsi      # 0x1a4e7
movb $0x0, %al
callq 0x11190
movq -0x30(%rbp), %rax
cmpl $0xd, (%rax)
jne 0xab90
movq -0x30(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0xab90
cmpl $0x26, -0x14(%rbp)
jne 0xab90
movq -0x20(%rbp), %rdx
movl $0xf, %edi
leaq 0x17250(%rip), %rsi     # 0x21da8
callq 0x9040
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xab72
movq -0x30(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0xab82
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x30(%rax)
jmp 0xabc4
cmpl $0x26, -0x14(%rbp)
jne 0xaba4
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x60(%rbp)
jmp 0xabb0
movq -0x30(%rbp), %rax
movslq 0x8(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rsi
leaq 0x171ed(%rip), %rdi     # 0x21da8
callq 0xb820
movq %rax, -0x20(%rbp)
jmp 0xabd7
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xa080
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)