// File: /workspace/github_c_makefile_star2_O3/michaelforney[P]cproc/expr.c
// Function: exprassign
struct expr *
exprassign(struct expr *e, struct type *t)
{
	struct type *et;

	et = e->type;
	switch (t->kind) {
	case TYPEBOOL:
		if (!(et->prop & PROPARITH) && et->kind != TYPEPOINTER && et->kind != TYPENULLPTR)
			error(&tok.loc, "assignment to bool must be from arithmetic, pointer, or nullptr_t type");
		break;
	case TYPEPOINTER:
		if (nullpointer(e))
			break;
		if (et->kind != TYPEPOINTER)
			error(&tok.loc, "assignment to pointer must be from pointer or null pointer constant");
		if (t->base != &typevoid && et->base != &typevoid && !typecompatible(t->base, et->base))
			error(&tok.loc, "base types of pointer assignment must be compatible or void");
		if ((et->qual & t->qual) != et->qual)
			error(&tok.loc, "assignment to pointer discards qualifiers");
		break;
	case TYPENULLPTR:
		if (!nullpointer(e))
			error(&tok.loc, "assignment to nullptr_t must be from null pointer constant or expression with type nullptr_t");
		break;
	case TYPESTRUCT:
	case TYPEUNION:
		if (!typecompatible(t, et))
			error(&tok.loc, "assignment to %s type must be from compatible type", tokstr[t->kind]);
		break;
	default:
		assert(t->prop & PROPARITH);
		if (!(et->prop & PROPARITH))
			error(&tok.loc, "assignment to arithmetic type must be from arithmetic type");
		break;
	}
	return exprconvert(e, t);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %r15
movl (%rsi), %eax
cmpl $0xe, %eax
jle 0x67f0
leal -0xf(%rax), %ecx
cmpl $0x2, %ecx
jae 0x6890
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd8b8
testb %al, %al
jne 0x6903
movl (%rbx), %eax
leaq 0x14e42(%rip), %rcx     # 0x1b610
movq (%rcx,%rax,8), %rdx
leaq 0x1592f(%rip), %rdi     # 0x1c108
addq $0x8, %rdi
leaq 0xcd0a(%rip), %rsi      # 0x134ee
xorl %eax, %eax
callq 0xd55c
jmp 0x6903
cmpl $0x2, %eax
je 0x68b5
cmpl $0xc, %eax
jne 0x68dd
movq %r14, %rdi
callq 0x692f
testb %al, %al
jne 0x6903
cmpl $0xc, (%r15)
je 0x6831
leaq 0x158e9(%rip), %rdi     # 0x1c108
addq $0x8, %rdi
leaq 0xcbbd(%rip), %rsi      # 0x133e7
xorl %eax, %eax
callq 0xd55c
movq 0x20(%rbx), %rdi
cmpq 0x14764(%rip), %rdi     # 0x1afa0
je 0x686d
movq 0x20(%r15), %rsi
cmpq 0x14757(%rip), %rsi     # 0x1afa0
je 0x686d
callq 0xd8b8
testb %al, %al
jne 0x686d
leaq 0x158ad(%rip), %rdi     # 0x1c108
addq $0x8, %rdi
leaq 0xcbc5(%rip), %rsi      # 0x1342b
xorl %eax, %eax
callq 0xd55c
movl 0x38(%rbx), %eax
notl %eax
testl %eax, 0x38(%r15)
je 0x6903
leaq 0x15885(%rip), %rdi     # 0x1c108
addq $0x8, %rdi
leaq 0xcbd9(%rip), %rsi      # 0x13467
jmp 0x68fc
cmpl $0x11, %eax
jne 0x68dd
movq %r14, %rdi
callq 0x692f
testb %al, %al
jne 0x6903
leaq 0x15860(%rip), %rdi     # 0x1c108
addq $0x8, %rdi
leaq 0xcbde(%rip), %rsi      # 0x13491
jmp 0x68fc
testb $0x8, 0x4(%r15)
jne 0x6903
movl (%r15), %eax
cmpl $0xc, %eax
je 0x6903
cmpl $0x11, %eax
je 0x6903
leaq 0x15838(%rip), %rdi     # 0x1c108
addq $0x8, %rdi
leaq 0xcac5(%rip), %rsi      # 0x133a0
jmp 0x68fc
testb $0x8, 0x4(%rbx)
je 0x6910
testb $0x8, 0x4(%r15)
jne 0x6903
leaq 0x15817(%rip), %rdi     # 0x1c108
addq $0x8, %rdi
leaq 0xcc76(%rip), %rsi      # 0x13572
xorl %eax, %eax
callq 0xd55c
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x6965
leaq 0xcc0a(%rip), %rdi      # 0x13521
leaq 0xcc17(%rip), %rsi      # 0x13535
leaq 0xcc17(%rip), %rcx      # 0x1353c
movl $0xe0, %edx
callq 0x30e0