// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/evaluate.c
// Function: check_designators
static struct expression *check_designators(struct expression *e,
					    struct symbol *ctype)
{
	struct expression *last = NULL;
	const char *err;
	while (1) {
		if (ctype->type == SYM_NODE)
			ctype = ctype->ctype.base_type;
		if (e->type == EXPR_INDEX) {
			struct symbol *type;
			if (ctype->type != SYM_ARRAY) {
				err = "array index in non-array";
				break;
			}
			type = ctype->ctype.base_type;
			if (ctype->bit_size >= 0 && type->bit_size >= 0) {
				unsigned offset = array_element_offset(type->bit_size, e->idx_to);
				if (offset >= ctype->bit_size) {
					err = "index out of bounds in";
					break;
				}
			}
			e->ctype = ctype = type;
			ctype = type;
			last = e;
			if (!e->idx_expression) {
				err = "invalid";
				break;
			}
			e = e->idx_expression;
		} else if (e->type == EXPR_IDENTIFIER) {
			int offset = 0;
			if (ctype->type != SYM_STRUCT && ctype->type != SYM_UNION) {
				err = "field name not in struct or union";
				break;
			}
			ctype = find_identifier(e->expr_ident, ctype->symbol_list, &offset);
			if (!ctype) {
				err = "unknown field name in";
				break;
			}
			e->offset = offset;
			e->field = e->ctype = ctype;
			last = e;
			if (!e->ident_expression) {
				err = "invalid";
				break;
			}
			e = e->ident_expression;
		} else if (e->type == EXPR_POS) {
			err = "internal front-end error: EXPR_POS in";
			break;
		} else
			return last;
	}
	expression_error(e, "%s initializer", err);
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
andl $0xff, %eax
cmpl $0x3, %eax
jne 0x551a4
movq -0x18(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0xff, %eax
cmpl $0x1a, %eax
jne 0x55279
movq -0x18(%rbp), %rax
movl (%rax), %eax
andl $0xff, %eax
cmpl $0x6, %eax
je 0x551d8
leaq 0x17405(%rip), %rax     # 0x6c5d4
movq %rax, -0x28(%rbp)
jmp 0x55372
movq -0x18(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x50(%rax)
jl 0x5522d
movq -0x30(%rbp), %rax
cmpl $0x0, 0x50(%rax)
jl 0x5522d
movq -0x30(%rbp), %rax
movslq 0x50(%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x24(%rax), %esi
callq 0x55410
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x50(%rcx), %eax
jb 0x5522b
leaq 0x173cb(%rip), %rax     # 0x6c5ed
movq %rax, -0x28(%rbp)
jmp 0x55372
jmp 0x5522d
movq -0x30(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x55268
leaq 0x173a5(%rip), %rax     # 0x6c604
movq %rax, -0x28(%rbp)
jmp 0x55372
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x5536d
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0xff, %eax
cmpl $0x19, %eax
jne 0x55344
movl $0x0, -0x38(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
andl $0xff, %eax
cmpl $0x7, %eax
je 0x552c4
movq -0x18(%rbp), %rax
movl (%rax), %eax
andl $0xff, %eax
cmpl $0x8, %eax
je 0x552c4
leaq 0x17351(%rip), %rax     # 0x6c60c
movq %rax, -0x28(%rbp)
jmp 0x55372
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x98(%rax), %rsi
leaq -0x38(%rbp), %rdx
callq 0x538c0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x552f8
leaq 0x1733c(%rip), %rax     # 0x6c62e
movq %rax, -0x28(%rbp)
jmp 0x55372
movl -0x38(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
jne 0x55336
leaq 0x172d4(%rip), %rax     # 0x6c604
movq %rax, -0x28(%rbp)
jmp 0x55372
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x5536b
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0xff, %eax
cmpl $0x1b, %eax
jne 0x55361
leaq 0x172e9(%rip), %rax     # 0x6c644
movq %rax, -0x28(%rbp)
jmp 0x55372
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x55390
jmp 0x5536d
jmp 0x55188
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq 0x17244(%rip), %rsi     # 0x6c5c5
movb $0x0, %al
callq 0x17030
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)